-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Drop pcapy-like integrations in favor of winpcapy.py (no acitivity) #2057
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2057 +/- ##
==========================================
+ Coverage 86.32% 86.51% +0.18%
==========================================
Files 197 197
Lines 44478 44357 -121
==========================================
- Hits 38396 38374 -22
+ Misses 6082 5983 -99
|
@guedou This is ready for reviewing! As you'll notice, I've removed the I'm pretty happy about how this PR turned out, I didn't expect it to work immediately 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really cool PR! Small comment: did you notice performance issue before and after the PR?
I did some tests comparing this against |
@gpotter2 you referenced helpsystems/pcapy#60 from this PR, and since it is now merged I would like to ask you: Now that support for pcapy has been dropped, I cannot find in winpcapy reference to the functionality we implemented on in that very same PR, that is the My point is, all libpcap integrations have always been crappy in a way or another, and we are replacing all of them for another crappy one or this is really the best and best of the best? We use Scapy for packet building and we use Concretely we use Futhermore the interfaces by provided by winpcapy aren't enough nor complete to get the same functionality. Simply put, winpcapy doesn't replace pcapy. Could we discuss this more, it looks like the drop of pcapy was rushed on, in my opinion. Right now, we have pined Scapy to 2.4.2 to avoid any problem with the drop of this important functionality. |
You are right about However I am not sure if this has any effect on users: this change was supposed to only be internal, as only Scapy was supposed to use I guess that some users could have tried to use I understand you concerns. It might look crappy, but it brings two things:
I have myself contributed to
It probably isn't. But it wastes less of our time than patching
We have a very low usage of We are most likely not going to reintroduce
Feel free to, but note we really do not recommend the 2.4.1/2.4.2 releases. They were rushed due to security concerns, and have some stuff unfinished :/ We're on verge of releasing 2.4.3, we could add |
Edit: if you have more questions, have a look at #2057 (comment)
With a few little tricks, it's actually very possible to re-use the
Windows
integration that useswinpcapy.py
to callNpcap
, to calllibpcap
on non-Windows platforms. Indeed, the originalwinpcapy.py
also had plain libpcap supportThis PR:
pcapy
,pypcap
,pylibpcap
integrations, and usewinpcapy.py
insteadWhy
pypcap
: low activity. See thispcapy
: the project maintainers have been replaced during an organization-level restructuring (Add setdirection method helpsystems/pcapy#60). The last PR I did there took months (monitor mode). It'll probably be even worse. Update: this added guid/luid translations for windows helpsystems/pcapy#61 is a very bad PR. It'll probably break a few things in Scapy.python-libpcap
: against all odds, it's probably the less known but the most maintained option (https://github.com/karpierz/libpcap). But it doesn't seem to support Linux (NameError: name 'time_t' is not defined karpierz/libpcap#1)Tested on:
Notes: