Input Code
from scapy.all import*
Error
File "sniffer0_with_scapy.py", line 1, in
from scapy.all import*
File "C:\python\lib\site-packages\scapy\all.py", line 16, in from .arch import * File "C:\python\lib\site-packages\scapy\arch_init.py", line 95, in from .windows import * File "C:\python\lib\site-packages\scapy\arch\windows__init.py", line 201, in ifaces.load_from_powershell() File "C:\python\lib\site-packages\scapy\arch\windows__init.py", line 152, in load_from_powershell for i in get_windows_if_list(): File "C:\python\lib\site-packages\scapy\arch\windows__init.py", line 78, in get_windows_if_list ps = sp.Popen(['powershell', '-NoProfile', 'Get-WMIObject -class Win32_NetworkAdapter', '|', 'select Name, @{Name="InterfaceIndex";Expression={$.Index}}, @{Name="InterfaceDescription";Expression={$.Description}},@{Name="InterfaceGuid";Expression={$.GUID}}, @{Name="MacAddress";Expression={$.MacAddress.Replace(":","-")}} | where InterfaceGuid -ne $null', '|', 'fl'], stdout = sp.PIPE, universal_newlines = True) File "C:\python\lib\subprocess.py", line 947, in __init_ restore_signals, start_new_session) File "C:\python\lib\subprocess.py", line 1224, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The specified file could not be found
Help me! ㅜ<
scapy subprocess winerror2
Scrapy version 1 and version 2 are different, so this problem occurs.
In Scapy v2 use from scapy.all import * instead of from scapy import *.
That's what it says. I think Kim Hansoo is using Scapy version 1.
Use with from scan import *
in version 1.
© 2024 OneMinuteCode. All rights reserved.