Skip to main content

Cap: lightweight package for use network captures

The idea is to read and write capture files like it is really a serialized data. The API is ment to be close as possible to json and pickle APIs.

Installation:

install the package by:

pip install cap

or from the source:

python setup.py install

Usage:

read cap:

import cap
captured_packets = cap.load(open("C:\\test.cap", "rb"))

filter about somthing

ip_v4_captured_packet = []
for captured_packet in captured_packets:
    if captured_packet.data[12:14] == '\x08\x00':
        ip_v4_captured_packet.append(p)

dump filtered packets

cap.dump(ip_v4_captured_packet, open('C:\\new_test.cap', "wb"))

Have a nice use and please report about problems and issues. Thank you.

Metadata

Release files for nrevah-cap 0.2.0

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

Source distribution (sdist)

Source distribution for nrevah-cap 0.2.0
File Size Uploaded Provenance
nrevah_cap-0.2.0.tar.gz 3.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nrevah-cap 0.2.0
File Interpreter ABI Platform
nrevah_cap-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / nrevah_cap-0.2.0.tar.gz

Download URL nrevah_cap-0.2.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b69bd81263ccf1c72a9e648114d844877e4950d852acb7c72e9c13ee6e7760aa
BLAKE2b-256 checksum
How to use checksums
19e15afbb50c707ecdd6de88531bae958d4bee118c945278010d6ca8b6d0699b
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 Jun 3, 2026.

Transparency log

Release files / nrevah_cap-0.2.0-py3-none-any.whl

Download URL nrevah_cap-0.2.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef3f227cb0f1a438f599c211eae9657ea835ce2d2664dae6cf42fd6abf6fe524
BLAKE2b-256 checksum
How to use checksums
4edf4c94f1d60fe6e68ea1648d2f41693a9fa2fc83a3a1e89002a7b91ce51f94
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 Jun 3, 2026.

Transparency log

Security for nrevah-cap 0.2.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nrevah_cap-0.2.0.tar.gz

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 Jun 3, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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