How to parse packets in a python library?

PSS picture PSS · Feb 9, 2011 · Viewed 54.9k times · Source

How to you parse a packet from either a .pcap file, or an interface, using python?

I'm specifically looking for a solution that uses a well documented library.

Answer

Andrea Spadaccini picture Andrea Spadaccini · Feb 9, 2011

Try scapy. It is a very powerful program for packet inspection, manipulation and creation.

You can use it to build your own tools.