Log all traffic going through an Scapy socket to a PCAP file.
Project description
Scapy Socket Logger
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scapy_socketlogger-0.0.2.tar.gz.
File metadata
- Download URL: scapy_socketlogger-0.0.2.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94fae97326f0c9490ed514583c4610a9eb74570e29738c7e954cb6b3c611569e
|
|
| MD5 |
43dc5f3e37d9cfd715ccd924e07d795e
|
|
| BLAKE2b-256 |
ceec8fcd0116573fe2812bd7027298a055cd3667b32582f4c1df6dacba16194d
|
Provenance
The following attestation bundles were made for scapy_socketlogger-0.0.2.tar.gz:
Publisher:
build.yml on antoniovazquezblanco/scapy-socketlogger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scapy_socketlogger-0.0.2.tar.gz -
Subject digest:
94fae97326f0c9490ed514583c4610a9eb74570e29738c7e954cb6b3c611569e - Sigstore transparency entry: 738417663
- Sigstore integration time:
-
Permalink:
antoniovazquezblanco/scapy-socketlogger@21ee9f2dde893ec6e9fef8503bcdad5654523eff -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/antoniovazquezblanco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@21ee9f2dde893ec6e9fef8503bcdad5654523eff -
Trigger Event:
push
-
Statement type:
File details
Details for the file scapy_socketlogger-0.0.2-py3-none-any.whl.
File metadata
- Download URL: scapy_socketlogger-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8752d4551adb2ff5526a13e7fe0f32987357254b4ee4d8dcfd9f683f750b6ebc
|
|
| MD5 |
f76330b00f6224751e0459aefecfb83a
|
|
| BLAKE2b-256 |
8ebd4b7e1264b20dfc46de1eca88d5ba584c7c021f1531fb736fab100f8d1006
|
Provenance
The following attestation bundles were made for scapy_socketlogger-0.0.2-py3-none-any.whl:
Publisher:
build.yml on antoniovazquezblanco/scapy-socketlogger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scapy_socketlogger-0.0.2-py3-none-any.whl -
Subject digest:
8752d4551adb2ff5526a13e7fe0f32987357254b4ee4d8dcfd9f683f750b6ebc - Sigstore transparency entry: 738417683
- Sigstore integration time:
-
Permalink:
antoniovazquezblanco/scapy-socketlogger@21ee9f2dde893ec6e9fef8503bcdad5654523eff -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/antoniovazquezblanco
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@21ee9f2dde893ec6e9fef8503bcdad5654523eff -
Trigger Event:
push
-
Statement type: