python - 导入 scapy.all : 'wpcap.dll' does not exsist 时出现 Scapy OSError

标签 python scapy

我尝试导入 scapy.all,但出现“wpcap.dll”不存在的错误。为什么会这样?我确定我正确下载了所有内容。我将所有内容保存到一个名为 scapy 的文件夹中。我从模块 ctypes 得到了一个 OSError。 Python 是否希望我预先安装一些东西?

这是我的错误(我使用 scapy.scapy.all 因为我将它保存到一个文件夹中)

>>> import scapy.scapy.all
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 "<pyshell#12>", line 1, in <module>
    import scapy.scapy.all
  File "C:\Python34\scapy\scapy\all.py", line 16, in <module>
    from .arch import *
  File "C:\Python34\scapy\scapy\arch\__init__.py", line 88, in <module>
    from .windows import *
  File "C:\Python34\scapy\scapy\arch\windows\__init__.py", line 23, in <module>
    from scapy.scapy.arch import pcapdnet
  File "C:\Python34\scapy\scapy\arch\pcapdnet.py", line 32, in <module>
    from .winpcapy import *
  File "C:\Python34\scapy\scapy\arch\winpcapy.py", line 26, in <module>
    _lib=CDLL('wpcap.dll')
  File "C:\Python34\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
>>> 

最佳答案

确保你有 WinPcap安装是为了使用 scapy。

关于python - 导入 scapy.all : 'wpcap.dll' does not exsist 时出现 Scapy OSError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34375180/

相关文章:

python - 有什么方法可以将 Scapy Packet 中的字段链接到构建的 str 中的部分吗?

python - 索引错误 : Layer [4] not found

Python3 Scapy - 嗅探分段 IP 数据包

python - docker中python虚拟环境GCC错误

python - 具有非重复字符的最长子串

python - 在 Python 中创建日期范围

python - 在 Django 中使用带有外键的模型的正确方法

python - 如何将 python 和 pygame 放在闪存驱动器上?

python - Scapy - 在其他两个层之间插入数据包层

python - Scapy ICMPv6EchoRequest 从 Scapy 命令提示符发送,但不是从脚本内发送?