2011-10-19 54 views
3

我试图用win32上python2.7 Scapy的编译libdnet为Python 2.7

我设法编译所有其他依赖想到这一个

可以在达到这个目标有所帮助可执行? “DNET-1.12.win32-py2.7.exe”

(我答应过更新这个问题与Scapy的手册,

Running Scapy on Windows with Python 2.7

更新:

我设法使用mingw32编译它 我使用的是vs2005,并且我必须对libdnet进行一些修复以实际工作(看起来像他们上次在vs6.0上编译它的那样)

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

+0

你能否提供你承诺的方法作为答案? – desolat

回答

3

您是否阅读过自述文件?从http://prdownloads.sourceforge.net/libdnet/libdnet-1.11.tar.gz?download下载源码包,解压,看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 

正如你最有可能注意到了,你需要Cygwin的MinGW的+。我不知道您是否想要MinGW本地库或Microsoft Visual C++本机库。另外请注意,您必须使用C:/Python27/python.exe来构建它。

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

+0

感谢naeg为快速回答,我设法编译它 – Fruch

+0

那么你应该考虑接受我的答案 - 看到这里如果你是古怪的原因:http://meta.stackexchange.com/questions/5234/how-does-accepting -an回答工作 – naeg