为Python2.7编译libdnet

2024-09-26 17:43:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我想在win32 python2.7上使用scapy

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

在达到这个可执行文件的目标方面有什么帮助吗? “dnet-1.12.win32-py2.7.exe”

(我保证也会更新这个问题和scapy手册

Running Scapy on Windows with Python 2.7

更新:

我设法用mingw32编译了它 我使用的是vs2005,我必须对libdnet进行一些修复才能真正工作(看起来上次他们在windows上编译libdnet时,它是用vs6.0编写的

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


Tags: 可执行文件目标onwindowswith手册exerunning
2条回答

德克损失提供了一个Windows installer for the dnet package for Python 2.7。与Windows installer for the pypcap package for Python 2.7一起,我能够在Windows上的Python 2.7上成功地运行Scapy。

你读过自述文件吗?从http://prdownloads.sourceforge.net/libdnet/libdnet-1.11.tar.gz?download下载源tarball,将其解压缩并参阅自述文件:

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。我不知道你是否想要MIW本地LIB或微软Visual C++原生LIB。还要注意,您必须使用C:/Python27/python.exe来构建它。

如果你试着这样做,你可以提出一个具体的问题,我猜,这是你最有可能,但不是100%必要的,最好放进一个新的问题,如果你有编译问题,最好问libdnet的邮件列表。

相关问题 更多 >

    热门问题