Я довольно новичок в Python и нахожу некоторые трудности в использовании модуля scapy в приложении, над которым я работаю. Я работаю в Python 3 с использованием PyCharm в системе Kali Linux.
Я установил scapy , выполнив эту команду:
pip install scapy-python3
Collecting scapy-python3
Downloading https://files.pythonhosted.org/packages/4f/f3/e33d21e25b0dda2ffeebcc3ad06d26eff7f913c9b8b397c30f443b68b8e4/scapy-python3-0.26.tar.gz
Installing collected packages: scapy-python3
Running setup.py install for scapy-python3 ... done
Successfully installed scapy-python3-0.26
Хорошо, тогда это мой код:
#!/usr/bin/env python
import scapy.all as scapy
def scan(ip):
scapy.arping(ip)
scan("MY_IP_ADDRESS")
Проблема в том, что при запуске этого скрипта из PyCharm я получаю следующее сообщение об ошибке:
/root/Documents/PycharmWS/network_scanner/venv/bin/python /root/Documents/PycharmWS/network_scanner/network_scanner.py
Traceback (most recent call last):
File "/root/Documents/PycharmWS/network_scanner/network_scanner.py", line 3, in <module>
import scapy.all as scapy
File "/root/Documents/PycharmWS/network_scanner/venv/lib/python3.7/site-packages/scapy/all.py", line 5, in <module>
raise Exception(msg)
Exception:
PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene.
You should use either pip package kamene for scapy3k (see http://github.com/phaethon/kamene for differences in use) or mainstream scapy (pip package scapy, http://github.com/secdev/scapy).
PIP package scapy-python3 used to provide scapy3k, which was a fork from scapy implementing python3 compatibility since 2016. This package was included in some of the Linux distros under name of python3-scapy. Starting from scapy version 2.4 (released in March, 2018) mainstream scapy supports python3. To reduce any confusion scapy3k was renamed to kamene.
You should use either pip package kamene for scapy3k (see http://github.com/phaethon/kamene for differences in use) or mainstream scapy (pip package scapy, http://github.com/secdev/scapy).
Process finished with exit code 1
Почему? Что не так? Что мне не хватает? Как я могу попытаться решить эту проблему?