小编use*_*822的帖子

如何在python中发送数据包?

我尝试使用这段代码在python中使用scapy发送数据包

data= "University of texas at San Antonio"
a=IP(dst="129.132.2.21")/TCP()/Raw(load=data)
sendp(a)
Run Code Online (Sandbox Code Playgroud)

但我在第三行"sendp(a)"中说错了

Traceback (most recent call last):
   File "<pyshell#7>", line 1, in <module>
     sendp(a)
   File "C:\Python25\lib\site-packages\scapy\sendrecv.py", line 259, in sendp
     __gen_send(conf.L2socket(iface=iface, *args, **kargs), x, inter=inter, loop=loop, 
   count=count, verbose=verbose, realtime=realtime)
   File "C:\Python25\lib\site-packages\scapy\arch\pcapdnet.py", line 313, in __init__
     self.outs = dnet.eth(iface)
   File "dnet.pyx", line 112, in dnet.eth.__init__
   OSError: No such file or directory
Run Code Online (Sandbox Code Playgroud)

请告诉我哪里错了.

python scapy

5
推荐指数
1
解决办法
4691
查看次数

标签 统计

python ×1

scapy ×1