gpt4 book ai didi

windows - Scapy 在 Windows 7 64 位 Python 3.5 上安装失败

转载 作者:可可西里 更新时间:2023-11-01 14:23:12 24 4
gpt4 key购买 nike

我一直对这个安装感到疯狂,但似乎没有任何效果。

Python 3.5 安装在:“C:\Program Files (x86)\Python35-32”下,所以中间有一个空格。

我通过两种方式安装了scapy:

  1. pip3 安装 scapy-python3
  2. 来自网站http://www.secdev.org/projects/scapy ,我下载了 Scapy-2.3.2 的链接,然后将其编译为 python setup.py install(这很可能适用于 Python 2,因为首先,它在 fname(chmod,0755) 上失败,我将其更正为 fname(chmod,0o755 ) 但它期待更多的参数)

每次我都尝试运行 scapy 终端但无济于事。它返回以下错误:

python: can't open file 'C:\Program': [Errno 2] No such file or directory

尝试运行以下代码(想要 ping google):

from scapy.all import sr1,IP,ICMP

p=sr1(IP(dst="8.8.8.8")/ICMP())
if p:
p.show()

但是得到如下错误:

WARNING: Windows support for scapy3k is currently in testing.

Sniffing/sending/receiving packets should be working with WinPcap driver and
Powershell. Create issues at https://github.com/phaethon/scapy
Traceback (most recent call last):
File "C:\Users\rads x\Desktop\FIX\connectivity.py", line 13, in
<module>

from scapy.all import sr1,IP,ICMP
File "C:\Program Files (x86)\Python35-32\lib\site-packages\scapy\all.py",
line 16, in <module>
from .arch import *
File "C:\Program Files (x86)\Python35-32\lib\site-
packages\scapy\arch\__init__.py", line 88, in <module>
from .windows import *
File "C:\Program Files (x86)\Python35-32\lib\site-
packages\scapy\arch\windows\__init__.py", line 23, in <module>
from scapy.arch import pcapdnet
File "C:\Program Files (x86)\Python35-32\lib\site-
packages\scapy\arch\pcapdnet.py", line 32, in <module>
from .winpcapy import *
File "C:\Program Files (x86)\Python35-32\lib\site-\
packages\scapy\arch\winpcapy.py", line 26, in <module>
_lib=CDLL('wpcap.dll')
File "C:\Program Files (x86)\Python35-32\lib\ctypes\__init__.py", line 347,
in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

最佳答案

很老的帖子。

郑重声明,官方 secdev/scapy 现在支持 Python 3。随意看看他们的官方 github 页面: https://github.com/secdev/scapy

祝你有个愉快的一周

关于windows - Scapy 在 Windows 7 64 位 Python 3.5 上安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37870510/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com