问题
I'm trying to use scapy on win32 python2.7
I've manage to compile all the other dependencies expect this one
can some help in the goal of reaching this executable ? "dnet-1.12.win32-py2.7.exe"
(I promise to update the this question too and the scapy manual,
Running Scapy on Windows with Python 2.7)
Update:
I've managed to compile it with mingw32 I'm using vs2005, and I have to make some fixes to libdnet to actually work (look like last time they compiled it on windows it was with vs6.0
I'll try updating scapy manual... (and upload the executables to there)
回答1:
Did you read the README file? Download the source tarball from http://prdownloads.sourceforge.net/libdnet/libdnet-1.11.tar.gz?download, extract it and see README:
Windows 2000/XP
---------------
For raw Ethernet sending, install the WinPcap driver and DLLs, and
extract their developer pack to a build directory:
http://winpcap.polito.it/install/default.htm
# XXX - unsupported for now
# For tunnel interface support, install the OpenVPN "TAP-Win32 Virtual
# Ethernet Adapter" component (their Windows installer will let you
# install it alone):
#
# http://openvpn.sourceforge.net/
For firewall support, install HSC's PktFilter service:
http://www.hsc.fr/ressources/outils/pktfilter/index.html.en
Most Windows developers should just use the libdnet developer's pack
(with MinGW and MSVC++ libraries) instead of building it themselves.
But for those who really want to know...
To build a MinGW native library (under Cygwin+MinGW):
./configure && make
To build a Microsoft Visual C++ native library and Python module
(again, under Cygwin+MinGW):
./configure
cd python && C:/Python23/python.exe setup.py build
cd ../src && lib /out:dnet.lib *.obj
As you most likely noticed you will need Cygwin+MinGW. I don't know whether you want the MinGW native lib or the Microsoft Visual C++ native lib. Also note that you have to use the C:/Python27/python.exe to build it.
If you try this, you can come up with a concrete problem I guess, which you most likely, but not 100% necessarly, better put into a new question and might better ask the mailing list of libdnet if you have compilation problems.
回答2:
Dirk Loss provides an Windows installer for the dnet package for Python 2.7. Together with the Windows installer for the pypcap package for Python 2.7 I was able to run Scapy successfully on Python 2.7 on Windows.
来源:https://stackoverflow.com/questions/7817926/compile-libdnet-for-python-2-7