简体   繁体   中英

Scapy OSError when importing scapy.all: 'wpcap.dll' does not exsist

I tried to import scapy.all , but an error saying 'wpcap.dll' does not exist. Why does this happen? I am sure I downloaded everything correctly. I saved everything into a folder called scapy . I got an OSError from module ctypes . Does Python expect me to have something pre-installed?

This is my error (I used scapy.scapy.all since I saved it into a folder)

>>> 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。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM