Introduction to pcapy

Pcapy is a Python extension module that interfaces with the libpcap packet capture library. Pcapy enables Python scripts to capture packets on the network. Pcapy is highly effective when used in conjunction with other collections of Python classes for constructing and packet-handling.

You can download the source code and the latest stable and development version at https://github.com/CoreSecurity/pcapy.

To install python-pcapy on the Ubuntu linux distribution, run the following commands:

sudo apt-get updatesudo apt-get install python-pcapy

Get Mastering Python for Networking and Security now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.