Skip to main content

Cap: lightweight package for use network captures

Project description

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.

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

nrevah_cap-0.2.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nrevah_cap-0.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file nrevah_cap-0.2.0.tar.gz.

File metadata

  • Download URL: nrevah_cap-0.2.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nrevah_cap-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b69bd81263ccf1c72a9e648114d844877e4950d852acb7c72e9c13ee6e7760aa
MD5 dcab41f1a6245509e42038337d7ec861
BLAKE2b-256 19e15afbb50c707ecdd6de88531bae958d4bee118c945278010d6ca8b6d0699b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nrevah_cap-0.2.0.tar.gz:

Publisher: release.yml on netanelrevah/cap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nrevah_cap-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nrevah_cap-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nrevah_cap-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef3f227cb0f1a438f599c211eae9657ea835ce2d2664dae6cf42fd6abf6fe524
MD5 8fff3371f74f12280db8113a9e92b248
BLAKE2b-256 4edf4c94f1d60fe6e68ea1648d2f41693a9fa2fc83a3a1e89002a7b91ce51f94

See more details on using hashes here.

Provenance

The following attestation bundles were made for nrevah_cap-0.2.0-py3-none-any.whl:

Publisher: release.yml on netanelrevah/cap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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