我的是python3.6,最近在接触scapy模块,已经安装了scapy-python3,发现可以导入scapy(import scapy),但是导入scapy.all(from scapy.all import *)就出问题,说找不到指定文件
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\all.py", line 16, in <module>
from .arch import *
...
...
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
不知是否有大神知道如何解决
参考:http://blog.csdn.net/zhangda0000001/article/details/73608847?locationNum=4&fps=1
这个我试过了,不行
还有其他提示么?
有呢,提示倒是不少
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\all.py", line 16, in <module>
from .arch import *
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\__init__.py", line 95, in <module>
from .windows import *
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\windows\__init__.py", line 200, in <module>
ifaces.load_from_powershell()
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\windows\__init__.py", line 151, in load_from_powershell
for i in get_windows_if_list():
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\site-
packages\scapy\arch\windows\__init__.py", line 77, in get_windows_if_list
ps = sp.Popen(['powershell', '-NoProfile', 'Get-WMIObject -class Win32_Netwo
rkAdapter', '|', 'select Name, @{Name="InterfaceIndex";Expression={$_.InterfaceI
ndex}}, @{Name="InterfaceDescription";Expression={$_.Description}},@{Name="Inter
faceGuid";Expression={$_.GUID}}, @{Name="MacAddress";Expression={$_.MacAddress.R
eplace(":","-")}} | where InterfaceGuid -ne $null', '|', 'fl'], stdout = sp.PIPE
, universal_newlines = True)
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\subpr
ocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Users\Mr.zhanglongqi\AppData\Local\Programs\Python\Python36\lib\subpr
ocess.py", line 992, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
你觉得你这样写没问题么....
import scapy.all as sa
调用sa.XXXX
这样写应该是可以的啊