[英]Scapy - OSError: No such file or directory
我試圖運行以下代碼:
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
print "hhhh"
from scapy.all import send
from scapy.layers.inet import IP, UDP
send(IP()/UDP())
print "BBBB"
我得到這個輸出錯誤:
hhhh
Traceback (most recent call last):
File "C:/Users/Tamir/PycharmProjects/SIP/main.py", line 12, in <module>
send(IP()/UDP())
File "C:\Python27\lib\site-packages\scapy\sendrecv.py", line 251, in send
__gen_send(conf.L3socket(*args, **kargs), x, inter=inter, loop=loop, count=count,verbose=verbose, realtime=realtime)
File "C:\Python27\lib\site-packages\scapy\sendrecv.py", line 234, in __gen_send
s.send(p)
File "C:\Python27\lib\site-packages\scapy\arch\pcapdnet.py", line 252, in send
ifs = dnet.ip()
File "dnet.pyx", line 250, in dnet.ip.__init__ (./dnet.c:2317)
OSError: No such file or directory
但是,其他功能(例如sniff())也可以正常工作。
有誰知道如何解決這一問題? 我正在使用Windows 7和python 2.7
Scapy需要dnet庫。 發送數據包是必需的。 沒有它,嗅探和解剖可能會很好。
您可以刪除導入的dnet或安裝dnet庫。
這是一個可能的解決方案的類似問題: 在Windows上使用Python 2.7運行Scapy
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.