3

我正在尝试在 win32 python2.7 上使用 scapy

我已经设法编译了所有其他依赖项,除了这个

可以帮助实现这个可执行文件的目标吗?“dnet-1.12.win32-py2.7.exe”

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

使用 Python 2.7 在 Windows 上运行 Scapy

更新:

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

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

4

2 回答 2

3

你读过 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 本机库或 Microsoft Visual C++ 本机库。另请注意,您必须使用 C:/Python27/python.exe 来构建它。

如果你尝试这个,你可能会想出一个具体的问题,你最有可能,但不是 100% 必须提出一个新问题,如果你有编译问题,最好询问 libdnet 的邮件列表。

于 2011-10-19T08:57:01.443 回答
3

Dirk Loss为 Python 2.7 的 dnet 包提供了一个 Windows 安装程序。连同适用于 Python 2.7 的 pypcap 包的 Windows 安装程序,我能够在 Windows 上的 Python 2.7 上成功运行 Scapy。

于 2014-04-24T20:35:50.010 回答