<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on No Subject - nosubject.io -</title><link>https://nosubject.io/en/tags/python/</link><description>Recent content in Python on No Subject - nosubject.io -</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 19 Jan 2023 10:56:58 +0900</lastBuildDate><atom:link href="https://nosubject.io/en/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>[Python] What to Do When Sending Packets with Scapy as a General User Returns error: [Errno 1] Operation not permitted</title><link>https://nosubject.io/en/python-scapy-send-packet-operation-not-permitted-error/</link><pubDate>Thu, 19 Jan 2023 10:56:58 +0900</pubDate><guid>https://nosubject.io/en/python-scapy-send-packet-operation-not-permitted-error/</guid><description>&lt;p&gt;Apparently, handling raw packets requires the Linux capability &lt;code&gt;cap_net_raw&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The only apparent options are to run Python with sudo or grant the capability to &lt;code&gt;/usr/bin/python3&lt;/code&gt;.&lt;/p&gt;
&lt;pre class="wp-block-code"&gt;&lt;code&gt;$ sudo setcap cap_net_raw=eip $(readlink -f $(which python3))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For a development environment, I think this is fine.&lt;/p&gt;
&lt;p&gt;Reference: &lt;a href="https://stackoverflow.com/questions/22421290/scapy-operation-not-permitted-when-sending-packets"&gt;https://stackoverflow.com/questions/22421290/scapy-operation-not-permitted-when-sending-packets&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>