Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I encounter an error when I use the scapy-python3 in PyCharm(Windows) #244

Open
YuanTianxin opened this issue May 4, 2018 · 3 comments
Open

Comments

@YuanTianxin
Copy link

Code here :
from scapy.all import rdpcap
p = rdpcap('pcap/arp.pcap')
print(p)

error:
Traceback (most recent call last):
File "F:/PyCharmWorkSpace/Test/testrdpcap.py", line 1, in
from scapy.all import rdpcap
File "F:\PyCharmWorkSpace\Test\venv\lib\site-packages\scapy\all.py", line 16, in
from .arch import *
File "F:\PyCharmWorkSpace\Test\venv\lib\site-packages\scapy\arch_init_.py", line 95, in
from .windows import *
File "F:\PyCharmWorkSpace\Test\venv\lib\site-packages\scapy\arch\windows_init_.py", line 212, in
ifaces.load_from_powershell()
File "F:\PyCharmWorkSpace\Test\venv\lib\site-packages\scapy\arch\windows_init_.py", line 163, in load_from_powershell
for i in get_windows_if_list():
File "F:\PyCharmWorkSpace\Test\venv\lib\site-packages\scapy\arch\windows_init_.py", line 78, in get_windows_if_list
stdout, stdin = ps.communicate(timeout = 10)
File "D:\python3.6.5\lib\subprocess.py", line 843, in communicate
stdout, stderr = self.communicate(input, endtime, timeout)
File "D:\python3.6.5\lib\subprocess.py", line 1094, in communicate
raise TimeoutExpired(self.args, orig_timeout)
subprocess.TimeoutExpired: Command '['powershell', '-NoProfile', 'Get-WMIObject -class Win32_NetworkAdapter', '|', 'select Name, @{Name="InterfaceIndex";Expression={$
.InterfaceIndex}}, @{Name="InterfaceDescription";Expression={$
.Description}},@{Name="InterfaceGuid";Expression={$.GUID}}, @{Name="MacAddress";Expression={$.MacAddress.Replace(":","-")}} | where InterfaceGuid -ne $null', '|', 'fl']' timed out after 10 seconds

@YuanTianxin
Copy link
Author

when I use it in Linux or using the scapy-python2, it's no problem

@YuanTianxin YuanTianxin changed the title I encounter an error when I use the scapy-python3 in PyCharm(Windows), I find it's an internal code error I encounter an error when I use the scapy-python3 in PyCharm(Windows) May 4, 2018
@YuanTianxin
Copy link
Author

Windows 7

@phaethon
Copy link
Owner

phaethon commented May 9, 2018

scapy3k is designed for Windows 10. It is not thoroughly tested for Windows 7. There are some users who made it work and some patches were integrated in the repo, but it is not supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants