小编典典

为python 2.7编译libdnet

python

我正在尝试在Win32 python2.7上使用Scapy

我已经设法编译了所有其他依赖项

可以帮助达到此可执行文件的目标吗?“ dnet-1.12.win32-py2.7.exe”

(我保证也会更新这个问题和船长手册,

更新:

我已经设法使用mingw32编译了它,而我正在使用vs2005,并且我必须对libdnet进行一些修复才能正常工作(看起来就像他们上一次在Windows上使用vs6.0编译它一样)

我将尝试更新scapy手册…(并将可执行文件上传到那里)


阅读 198

收藏
2021-01-20

共1个答案

小编典典

您阅读自述文件了吗?从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本机库还是Microsoft Visual C
++本机库。还要注意,您必须使用C:/Python27/python.exe来构建它。

如果您尝试这样做,我想您可能会提出一个具体的问题,您很可能会(但不一定是100%)将其提交一个新问题,如果您遇到编译问题,最好向libdnet的邮件列表询问。

2021-01-20