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步