Skip to main content

Scapy Socket Logger

Build PyPI Snyk License: GPL v3

Log all traffic going through an Scapy socket to a PCAP file.

Installation

Just use pip :)

pip install scapy-socketlogger

Usage

Practical examples can be found in the Examples folder.

For a plain quick usage reference, you may look into the following snippet:

from scapy.all import SuperSocket, PcapWriter
from scapy_socketlogger import SocketLogger

# Create your socket
sock = SuperSocket(...)

# Create a PCAP writer
pcap_writer = PcapWriter("traffic.pcap")

# Wrap the socket with the logger
logger = SocketLogger(sock, pcap_writer)

# Use the socket normally - all traffic will be logged
# ...

# Close the logger when done
logger.close()

Or use as a context manager:

with SocketLogger(sock, pcap_writer) as logger:
    # Use sock here
    pass
# Automatically closes and restores socket methods

Metadata

Release files for scapy-socketlogger 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scapy-socketlogger 0.0.2
File Size Uploaded
scapy_socketlogger-0.0.2.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scapy-socketlogger 0.0.2
File Interpreter ABI Platform
scapy_socketlogger-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.2 kB

Release files / scapy_socketlogger-0.0.2.tar.gz

Download URL scapy_socketlogger-0.0.2.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
94fae97326f0c9490ed514583c4610a9eb74570e29738c7e954cb6b3c611569e
BLAKE2b-256 checksum
How to use checksums
ceec8fcd0116573fe2812bd7027298a055cd3667b32582f4c1df6dacba16194d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2025.

Transparency log

Release files / scapy_socketlogger-0.0.2-py3-none-any.whl

Download URL scapy_socketlogger-0.0.2-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8752d4551adb2ff5526a13e7fe0f32987357254b4ee4d8dcfd9f683f750b6ebc
BLAKE2b-256 checksum
How to use checksums
8ebd4b7e1264b20dfc46de1eca88d5ba584c7c021f1531fb736fab100f8d1006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page