首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > winpcapy

winpcapy

  • 资源大小:16.93 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

Python porting of winpcap - pcap exported functions using ctypes. No automatic install. Copy winpcapy.py into your site-packages dir. Some examples are in the examples directory. Get documentation about functions from official winpcap site Python version of winpcap sendpack example: ``` from ctypes import * from winpcapy import * fp=pcap_t errbuf= createstringbuffer(PCAPERRBUFSIZE) packet=(c_ubyte * 100)() ## Check the validity of the command line if len(sys.argv) != 2: print ("usage: %s interface" % sys.argv[0]) sys.exit(1) ## Open the adapter fp = pcapopenlive(sys.argv[1],65536,PCAPOPENFLAGPROMISCUOUS ,1000,errbuf) if not bool(fp): print (" Unable to open the adapter. %s is not supported by WinPcap " % sys.argv[1]) sys.exit(2) ## Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 packet[0]=1 packet[1]=1 packet[2]=1 packet[3]=1 packet[4]=1 packet[5]=1 ## set mac source

文 件 列 表

examples
Examples-pcap
winpcapy.py

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.173846s