pcap-fuzzer
This program randomly edits packets from a PCAP file, one field per edited packet.
The edited field will be chosen at random, starting from the highest layer, and going down until it finds a supported protocol layer.
Example: a DNS packet will have one of its DNS fields edited, and not one of the UDP or IP fields.
Installation
pip install pcap-fuzzer
Usage
Import statement:
import pcap_fuzzer
fuzz_pcaps function doc:
pcap_fuzzer.fuzz_pcaps(
pcaps: Union[str, list] # (List of) input PCAP files
output: str, # [Optional] Output PCAP file path. Used only if a single input file is specified.
random_range: int = 1, # [Optional] Upper bound for random range (not included). Defaults to 1.
packet_numbers: list = None, # [Optional] List of indices, starting from 1, of packets to edit. If not specified, packets are randomly picked.
dry_run: bool = False # [Optional] If True, do not write output PCAP file(s).
) -> None
This function produces new, edited PCAP file(s).
If no output file is specified (for a single input file),
or if multiple input files are given,
the output file(s) will have the same name as the input file(s),
but with the suffix .edit,
and will be placed in a directory called edited,
in the same directory as the input files.
It will be created if it doesn't exist.
The program also produces CSV log files,
indicating which fields were edited for each packet.
The log files will be placed in a directory called logs,
in the same directory as the input files.
It will be created if it doesn't exist.
Supported protocols (for now)
- Datalink Layer (2)
- ARP
- Network Layer (3)
- IPv4
- IPv6
- Transport Layer (4)
- TCP
- UDP
- ICMP
- IGMP(v2 and v3)
- Application Layer (7)
- HTTP
- DNS
- DHCP
- SSDP
- CoAP
Metadata
Release files for pcap-fuzzer 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pcap_fuzzer-0.5.0.tar.gz | 25.2 kB | Without provenance | Details for pcap_fuzzer-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pcap_fuzzer-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for pcap_fuzzer-0.5.0-py3-none-any.whl |
Total release size: 55.3 kB
Release files / pcap_fuzzer-0.5.0.tar.gz
| Download URL | pcap_fuzzer-0.5.0.tar.gz |
|---|---|
| Size | 25.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d334d9cda4ee83c49dcaff463a492b3e124a4560d2586f1373d4f989178f7b1e
|
|
BLAKE2b-256 checksum How to use checksums |
b2a39d64410e13dd953b89535e05f273998bc77292abed6d6378aaa2bf883f3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / pcap_fuzzer-0.5.0-py3-none-any.whl
| Download URL | pcap_fuzzer-0.5.0-py3-none-any.whl |
|---|---|
| Size | 30.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f5693aed9a5ec7388cae2f66a358b888493662e79e1eec155c172d81f7d8d68
|
|
BLAKE2b-256 checksum How to use checksums |
2e81cb58835cc84ad3fbec5ec9e2ccd8c376b8814ad35f0fb481f89ebb7c294f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for pcap-fuzzer 0.5.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.