Skip to main content

Python pcap extension

Project description

This file is an extract from the the online documentation at https://github.com/stamparm/pcapy-ng/blob/master/README.md

What is Pcapy-NG?

Pcapy-NG is a Python extension module that enables software written in Python to access the routines from the pcap packet capture library. It is a replacement of Pcapy, which is not maintained any more and stopped working altogether on Python3.10.

From libpcap’s documentation: “Libpcap is a system-independent interface for user-level packet capture. Libpcap provides a portable framework for low-level network monitoring. Applications include network statistics collection, security monitoring, network debugging, etc.”

What makes pcapy different from the others?

  • works with Python threads.

  • works both in UNIX with libpcap and Windows with WinPcap.

  • provides a simpler Object Oriented API.

Setup

Quick start

Grab the latest stable release, unpack it and run ‘python setup.py install’ from the directory where you placed it. Isn’t that easy?

Requirements

  • A Python interpreter. Versions 2.1.3 and newer are known to work.

  • A C++ compiler. GCC G++ 2.95, as well as Microsoft Visual Studio 6.0, are known to work.

  • Libpcap 0.7.2 or newer. Windows user are best to check WinPcap 3.0 or newer.

  • A recent release of Pcapy.

Compiling the source and installing

As this extension is written in C++ it needs to be compiled for the host system before it can be accessed from Python. Fortunately this process has been made easy by the setup.py script. In order to compile and install the source execute the following command from the directory where the pcapy’s distribution has been unpacked: ‘python setup.py install’. This will install the extension into the default Python’s modules path; note that you might need special permissions to write there. For more information on what commands and options are available from setup.py, run ‘python setup.py –help-commands’.

This extension has been tested under Linux and Windows systems and is known to work there, but it ought to work out-of-the-box on any system where Python and libpcap are available.

Licensing

This software is provided under under the Apache Software License. See the accompanying LICENSE file for more information.

Contact Us

Whether you want to report a bug, send a patch or give some suggestions on this package, drop a few lines at miroslav@sqlmap.org.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pcapy_ng-1.1.0.tar.gz (38.7 kB view details)

Uploaded Source

File details

Details for the file pcapy_ng-1.1.0.tar.gz.

File metadata

  • Download URL: pcapy_ng-1.1.0.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for pcapy_ng-1.1.0.tar.gz
Algorithm Hash digest
SHA256 802da2f3a66929e82d29d9ab101ffa841ee4ea91fc94472f401eeecf06495cd1
MD5 009e8fac1bf560dafc5475f6634ffb79
BLAKE2b-256 ce1919bc650e1f58a6ef7376d85ef2b9cd24554c032858bb5e6b05092939d900

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page