dpkt icon indicating copy to clipboard operation
dpkt copied to clipboard

Sniff example

Open brifordwylie opened this issue 4 years ago • 2 comments

So this is mostly for my own edification, would it be useful/helpful to add an example/ that reads packet from a live interface? Even if the example included an external dependency it could nicely inform the user to $ pip install to run the example...

Options:

  • https://github.com/pynetwork/pypcap
  • https://github.com/helpsystems/pcapy
  • (Just sockets/linux only) https://www.binarytides.com/python-packet-sniffer-code-linux/
  • Other???

Happy to take suggestions here... @obormot @kbandla any pointers?

brifordwylie avatar Jan 01 '21 02:01 brifordwylie

FYI https://github.com/kbandla/dpkt/blob/master/examples/old/dhcprequest.py

obormot avatar Aug 30 '21 19:08 obormot

FYI https://github.com/dugsong/pypcap/blob/master/testsniff.py

obormot avatar Oct 08 '21 01:10 obormot