I am working on a dns_spoof school project. I have imported the following to my program:
import netfilterqueue
import scapy.all as scapy
My problem is that when I try to run the program via terminal with the python2 interpreter scapy doesn't work and when I try to run it in terminal with the python3 interpreter then netfilterqueue does not work.
When trying to run the program with the python2 interpreter I get the following error:
root@kali:~/PycharmProjects/dns_spoof# python dns_spoof.py
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).
Traceback (most recent call last):
File "dns_spoof.py", line 3, in <module>
import scapy.all as scapy
File "/usr/local/lib/python2.7/dist-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).
When I try to run the program with the python3 interpreter via the terminal I get the following error:
root@kali:~/PycharmProjects/dns_spoof# python3 dns_spoof.py
Traceback (most recent call last):
File "dns_spoof.py", line 2, in <module>
import netfilterqueue
ModuleNotFoundError: No module named 'netfilterqueue'
So netfilterqueue is only working in python2 and scapy is only working in python3. How do I solve this? I need to use both at the same time.