我正在尝试在 win32 python2.7 上使用 scapy
我已经设法编译了除此之外的所有其他依赖项
对达到这个可执行文件的目标有什么帮助吗? “dnet-1.12.win32-py2.7.exe”
(我保证也会更新这个问题和 scapy 手册,
Running Scapy on Windows with Python 2.7 )
更新:
我已经成功地用 mingw32 编译了它 我正在使用 vs2005,我必须对 libdnet 进行一些修复才能实际工作(看起来就像他们上次在 Windows 上编译它时使用的是 vs6.0
我会尝试更新 scapy 手册...(并将可执行文件上传到那里)
最佳答案
你读过 README 文件了吗?从 http://prdownloads.sourceforge.net/libdnet/libdnet-1.11.tar.gz?download 下载源压缩包,解压并查看自述文件:
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
正如您很可能注意到的那样,您将需要 Cygwin+MinGW。我不知道您是想要 MinGW native 库还是 Microsoft Visual C++ native 库。另请注意,您必须使用 C:/Python27/python.exe 来构建它。
如果你尝试这个,我猜你可以提出一个具体的问题,你最有可能,但不是 100% 必须,最好提出一个新问题,如果你有编译问题,最好询问 libdnet 的邮件列表.
关于python - 为 python 2.7 编译 libdnet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7817926/