Comments (10)
@keestux @piv-22 @gpotter2
1.10.0b8 is ready.
It has preliminary support for Linux x64 (libpcap.so v.1.9.1 - with remote capture support) .
Simple (preliminary) tests are passed.
from libpcap.
Sorry, but I'v mentioned in README:
"ATTENTION: currently works and tested only for Windows."
..but of course I will try also to make support for Linux but (because I am not good familiar with Linux)
please get me a time (suppose max. 1 week).
from libpcap.
I have the same problem with python 3.7 and libpcap-1.10.0b3. Did you manage to fix the problem ? is there a new release availbale that fixes the issue or do I need to get a developement version ?
from libpcap.
@gpotter2
Also take a look at (maybe will be useful for you/scapy?).
https://pypi.org/project/pcap-ct/
https://github.com/karpierz/pcap-ct/
It is created strictly on top libpcap (so Cython/C envinronment is not needed).
BTW: It's nice to meet you after years :)
from libpcap.
Thanks for the note.
We currently have dropped support any external libpcap bindings, because of how clunky they were: we couldn't get pcapy to be updated quickly when we needed new features, and pylibpcap was basically abandoned (according to his maintainer).
Because this repo didn't support Linux at the time, we just moved everything to the modified winpcapy
versions we were already using for Windows, and moved on. This way we could keep it up to date whenever we need new libpcap features without going through the process of contacting maintainers of dead projects (which is not the case for libpcap
though 😄)
I don't think we're going to reimplement external bindings anytime soon. This project also has several things I don't really think will suit Scapy:
- it packs binaries: Npcap very clearly forbids redistribution of their software. https://github.com/nmap/npcap/blob/master/LICENSE (BTW if I were you I would quickly remove this)
- it stopped supporting Python 2 (we still do)
- it doesn't support native Npcap's but rather uses the compatibility mode
from libpcap.
Thanks for the note :)
:: I don't think we're going to reimplement external bindings anytime soon.
I'm quite open to ev. insert a copy of repo as internal part of scapy.
That is why/I intentionally distribute libpcap on the same license as original libpcap:
Copyright (c) 2016-2019, Adam Karpierz
Licensed under the BSD license
https://opensource.org/licenses/BSD-3-Clause/
Please refer to the accompanying LICENSE file.
:: (BTW if I were you I would quickly remove this)
No. I did precisely check npcap license(s).
I only distribute tcpdump's part of npcap, but it is distributed by npcap
in the same license like original libpcap.
Mention in npcap's license about this:
WINPCAP & LIBPCAP ATTRIBUTION
Some of the Npcap code is originally from WinPcap software (http://www.winpcap.org/).
See https://github.com/nmap/npcap/blob/master/WinPcap-License-And-Acknowledgements.txt
for further information and attribution related to that.
Npcap also includes and depends on the Libpcap packet capturing
library, which is under a 3-clause BSD license allowing free
redistribution and use in other software. The Libpcap license can be
found at: https://github.com/nmap/npcap/blob/master/Libpcap-License.txt
https://github.com/nmap/npcap/blob/master/WinPcap-License-And-Acknowledgements.txt
https://github.com/nmap/npcap/blob/master/Libpcap-License.txt
In libpcap I do not distribute any other parts of npcap.
Of course user should/can install npcap himself (as pointed on npcap page,
this way no breaks the license):
Free and open source software producers are also welcome to contact us
for redistribution requests. However, we normally recommend that such
authors instead ask your users to download and install Npcap themselves.
or even use old winpcap or even use OS's pcap or any other dll/so
complies with the original tcdump's libpcap API.
Take a look at: libpcap.libpcap.cfg
Options are:
For Windows:
LIBPCAP = "npcap" # default for now # libpcap's internal npcap dll will be used
LIBPCAP = "wpcap" # libpcap's internal wpcap dll will be used
#LIBPCAP # then "system" wpcap will be used: "C:/Windows/System32/wpcap.dll"
LIBPCAP = "<absolute path for pcap's .dll>"
For Linux:
LIBPCAP = "tcpdump" # default # libpcap's internal "tcpdump" will be used
#LIBPCAP # then also libpcap's internal "tcpdump" will be used
LIBPCAP = "<absolute path for pcap's .so>"
:: it stopped supporting Python 2 (we still do)
It is not any problem :). I can revert Py2 support in 5 minutes:)
::it doesn't support native Npcap's but rather uses the compatibility mode
Yep. For now it is default but there is no any problem to choose also npcap's native mode.
Thanks,
Adam
from libpcap.
I was only talking about
https://github.com/karpierz/libpcap/blob/master/src/libpcap/_platform/_windows/x64/npcap/packet.dll
I didn't really check them though. Maybe you're packaging winpcap under the "npcap" name, which is fine. Anyways I'm not on Insecure.org license team.
About Scapy I'm happy with the current solution (packaging winpcapy), because of how light it is. I don't see why we would switch that (except if using your fork were to be much faster than C bindings, which I don't think would be the case)
from libpcap.
:: I was only talking about.
You might be right. Thanks.
I have to ask another guy from Npcam team to precisely point me what is possible to distribute.
from libpcap.
FYI: @keestux @piv-22 @gpotter2
1.10.0b9 is ready (1.10.0b8 has been removed).
From CHANGES.rst:
1.10.0b9 (2019-11-27)
---------------------
- Add support for Python 3.8.
- Drop support for Python 3.4.
- Drop support for Python 2.
- Upgrade to the latest libpcap API 1.10.0-PRE
- Establishing npcap as default backend.
- Internal npcap's dll-s have been removed due to ev. license problems.
- Add support for Linux x64:
add internal tcpdump's libpcap.so v.1.9.1 with remote capture support.
system's tcpdump's libpcap.so can also be used (via libpcap.libpcap.cfg).
- Setup update and cleanup.
Options in libpcap.libpcap.cfg are:
For Windows:
LIBPCAP = "npcap" # default for now # system's npcap's dlls will be used
#LIBPCAP # system's pcap's will be used (in order: npcap's, wpcap's dlls)
LIBPCAP = "wpcap" # internal wpcap's dlls will be used
LIBPCAP = "<absolute path for pcap's .dll>"
For Linux:
LIBPCAP = "tcpdump" # or other no path str # default # internal tcpdump's libpcap.so will be used
#LIBPCAP # system's libpcap.so will be used
LIBPCAP = "<absolute path for pcap's .so>"
@gpotter2
Sorry for missunderstanding :(. I forgot most from scapy since our colaboration :)
I thought that https://pypi.org/project/WinPcapy/ is not actively mainatined
so libpcap would be better option for You/scapy.
As I see winpcapy.py uses almost exactly same way - ctypes wrapping- as my
libpcap (except that libpcap use newer libpcap's API - 1.10.0) so maybe
so maybe there's no need to replace it in scapy.
PS: Thanks for suggestion to remove npcap's internal dlls.
(I even did'nt ask guys from npcap).
Thanks,
Adam
from libpcap.
We actually don't use the project you linked but a modified version the original 2010 code.
Thanks for the note, good luck with your projects
from libpcap.
Related Issues (12)
- No libpcap.so when installed through pip HOT 1
- Support Macos HOT 5
- Using a backend different from npcap HOT 7
- Release timeline HOT 1
- Windows Server compatibility HOT 3
- Some examples from Linux HOT 4
- Linux find_library return relative path HOT 1
- Integration with pytest?
- Do we support multi-process ?
- Problem with set_immediate_mode for a not activated pcap_t struct. Error: Struct already activated. HOT 2
- libpcap inject or sendpacket function error "send: message too large" or "send: bad address" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libpcap.