Ошибка при использовании библиотека scapy

Dranfion

Новичок
Пользователь
Апр 13, 2020
1
0
1
Kali linux 2020.1
Python 3.7
код:

#/usr/bin/env python

import scapy.all as scapy

def scan(ip):
scapy.arping(ip)

scan("192.168.1.87")

Ошибка в терминале:

Traceback (most recent call last):
File "test.py", line 8, in <module>
scan("192.168.1.87")
File "test.py", line 6, in scan
scapy.arping(ip)
File "/usr/lib/python3/dist-packages/scapy/layers/l2.py", line 630, in arping
filter="arp and arp[7] = 2", timeout=timeout, iface_hint=net, **kargs) # noqa: E501
File "/usr/lib/python3/dist-packages/scapy/sendrecv.py", line 504, in srp
filter=filter, nofilter=nofilter, type=type)
File "/usr/lib/python3/dist-packages/scapy/arch/linux.py", line 467, in __init__
self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type)) # noqa: E501
File "/usr/lib/python3.7/socket.py", line 151, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 1] Operation not permitted
 
Последнее редактирование:

Форум IT Специалистов