Traceback (most recent call last):
File "arp_scan.py", line 9, in <module>
from kamene.all import ARP
File "/usr/local/lib/python3.7/site-packages/kamene/all.py", line 16, in <module>
from .arch import *
File "/usr/local/lib/python3.7/site-packages/kamene/arch/__init__.py", line 91, in <module>
from .bsd import *
File "/usr/local/lib/python3.7/site-packages/kamene/arch/bsd.py", line 12, in <module>
from .unix import *
File "/usr/local/lib/python3.7/site-packages/kamene/arch/unix.py", line 22, in <module>
from .pcapdnet import *
File "/usr/local/lib/python3.7/site-packages/kamene/arch/pcapdnet.py", line 32, in <module>
from .winpcapy import *
File "/usr/local/lib/python3.7/site-packages/kamene/arch/winpcapy.py", line 31, in <module>
raise OSError("Cannot fine libpcap.so library")
OSError: Cannot fine libpcap.so library
首先确保安装libpcap
brew reinstall libpcap
ls /usr/local/Cellar/libpcap/1.10.1/lib/
libpcap.1.10.1.dylib libpcap.a pkgconfig
libpcap.A.dylib libpcap.dylib
安装完还是不行
查看错误代码
if WIN32:
SOCKET = c_uint
_lib=CDLL('wpcap.dll')
else:
SOCKET = c_int
_lib_name = find_library('pcap')
if not _lib_name:
raise OSError("Cannot fine libpcap.so library")
_lib=CDLL(_lib_name)
了解find_library 该函数的库查找路径
print(find_library('dnet'))
/usr/local/lib/libdnet.dylib
复制pcap 安装路径下的文件到指定文件下
print(find_library('pcap'))
/usr/local/lib/libpcap.dylib
|