I have written a program that uses Scapy
. Python
is able to import the scapy
module perfectly but using sniff
function of scapy
requires running the program as administrator.
However, running the program as sudo python3 <program_name>
produces an import error
, why is it so?
Here is the import line : import scapy.all as scapy
You can fix it with:
And then try again.
I would recommend using
virtualenv
to run your program though. Instead of installing package after package in your main environment.As using python3, I would recommend