[Python] What to Do When Sending Packets with Scapy as a General User Returns error: [Errno 1] Operation not permitted

Python Notes

Apparently, handling raw packets requires the Linux capability cap_net_raw.

The only apparent options are to run Python with sudo or grant the capability to /usr/bin/python3.

$ sudo setcap cap_net_raw=eip $(readlink -f $(which python3))

For a development environment, I think this is fine.

Reference: https://stackoverflow.com/questions/22421290/scapy-operation-not-permitted-when-sending-packets

Python
Sponsored links
Follow ☆Geha☆