Python 2.7.X安装dpkt, sendpkt, pycap

Python 2.7.X安装dpkt, sendpkt, pycap

相关下载:

复制代码
1 WinPcap installer:         http://www.winpcap.org/archive/
2 WinPcap WpdPack:           http://www.winpcap.org/archive/
3 Mingw:                     http://www.mingw.org/
4 pycap:                     http://code.google.com/p/pypcap/
5 sendpkt:                   http://code.google.com/p/sendpkt/
6 dpkt:                      http://code.google.com/p/dpkt/ 
复制代码
复制代码
 1     安装mingw32, 确认mingw32\bin在path里
 2     安装wincap
 3     mingw-get install pexports
 4     D:\Python27\Lib\distutils\cygwinccompiler.py 里删除 -mno-cygwin
 5     cd D:\Python27\libs\
 6     pexports c:\WINDOWS\system32\python27.dll > python27.def
 7     dlltool -d python27.def -l libpython27.a
 8     dpkt不依赖于WpdPack, 但是可能会出现错误提示
 9     请将dpkt目录下ip.py 此行注释掉 #IP_PROTO_VISA  = 70  # VISA Protocol
10     新建文件 setup.cfg
11         [build]
12         compiler=mingw32
13     setup.py build
14     setup.py install
15     sendpkt,pycap,WpdPack目录并列,分别进入sendpkt和pycap目录里执行10-14步
复制代码

 参考:

http://zephorcn.blogspot.com/2011/04/python-get-pypcap-working-on-python-27.html ([Python] pypcap for python [email protected])GFW
http://agile-boy.iteye.com/blog/1143815 (mingw32环境下安装Native的第三方扩展)
http://www.iteye.com/topic/810507 (局域网内实现飞鸽欺骗)
http://www.iteye.com/topic/600032 (python2.6(windows 7)下安装pycap、sendpkt、dpkt)

你可能感兴趣的:(Python 2.7.X安装dpkt, sendpkt, pycap)