0
我嘗試導入Scapy的,但我得到這個錯誤:Python的Scapy的錯誤
Traceback (most recent call last):
File "ip2.py", line 17, in <module>
ans, unans = srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst = ips), timeout = 2, iface=interface, inter = 0.1)
File "C:\Python27\lib\site-packages\scapy\sendrecv.py", line 378, in srp
a,b=sndrcv(s ,x,*args,**kargs)
File "C:\Python27\lib\site-packages\scapy\arch\windows\compatibility.py", line 14, in sndrcv
if not isinstance(pkt, Gen):
NameError: global name 'Gen' is not defined
這些都是進口:
import sys
from datetime import datetime
from scapy.base_classes import Gen, SetGen
from scapy.utils import PcapReader
from scapy.data import MTU, ETH_P_ARP
我已經嘗試了所有我能在網上找到。沒什麼幫助。 我正在使用Windows 10,並且我有最新版本的scapy。我不知道這個錯誤來自哪裏或做什麼。任何幫助,將不勝感激。謝謝。