-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide stop for sniff even when no packets received #1505
Comments
Hi & sorry for the delay. Would a thing such as #1523 fit your needs ? |
Thank you for the heads up! I think that sniff interface turned into a beast - way too many arguments. However, I think that it'd fit for our use case - I haven't had a chance to play with it. Regards, |
This is going to sound pretty dumb, but when I ran into a similar issue, I worked around it by exploiting the fact that scapy can sniff its own packets. Just send a dummy packet that matches the filter you set up and it'll cause Just my $0.02. |
See #1999 |
Hi there,
this is a request to reopen #989 - I haven't received any feedback to my recent question.
Missing the functionality affects our code.
Quoting myself:
Can it be reopened?
We observe the problem on Windows.
With scapy 2.3.1 we distributed local version of scapy, which used the following pattern:
p = None
while stop_filter and stop_filter(p):
... the loop as normal
On Windows it works, because there's PcapTimeout exception raised in case of no packets, which allows the condition to be checked.
It breaks backward compatibility, because it requires stop_filter to be aware of possible "None" as packet.
What about the mentioned stop_sniff additional parameter to sniff as alternative? On Windows it would work, as indicated before, even if stop wouldn't occur immediately. I don't know about other platforms, though.
What's your opinion?
Regards,
Robert
The text was updated successfully, but these errors were encountered: