title: How would I make a packet sniffer in python?
body: <p>I used a code snippet from stackoverflow, I can't find the post now, but this is what it was</p>
  
  <pre><code>from scapy.all import *
  sniff(filter="192.168.1.25", prn=lambda x:x.sprintf("{IP:%IP.src% -&gt; %IP.dst%\n}")
  </code></pre>
  
  <p>I'm getting an unexpected EOF while parsing</p>
  
  <p>I don't know much about scapy, nor socket. I have no idea how to approach it. Can anyone provide a working example below? I've looked all over and was unable to find one, and this topic has been dead for years</p>
  
  <p>I'm not really willing to learn socket/scapy, just want an example, something temporary, so if socket is the best, post below</p>