Skip to main content

Python multi-engine PCAP analyse kit.

Project description

For any technical and/or maintenance information, please kindly refer to the Official Documentation.

The PyPCAPKit project is an open source Python program focus on PCAP parsing and analysis, which works as a stream PCAP file extractor. With support of DictDumper, it shall support multiple output report formats.

The whole project supports Python 3.6 or later.

About

PyPCAPKit is an independent open source library, using only DictDumper as its formatted output dumper.

There is a project called jspcapy works on pcapkit, which is a command line tool for PCAP extraction.

Unlike popular PCAP file extractors, such as Scapy, DPKT, PyShark, and etc, pcapkit uses streaming strategy to read input files. That is to read frame by frame, decrease occupation on memory, as well as enhance efficiency in some way.

Module Structure

In pcapkit, all files can be described as following eight parts.

  • Interface (pcapkit.interface)

    User interface for the pcapkit library, which standardises and simplifies the usage of this library.

  • Foundation (pcapkit.foundation)

    Synthesises file I/O and protocol analysis, coordinates information exchange in all network layers, as well as provides the foundamental functions for pcapkit.

  • Protocols (pcapkit.protocols)

    Collection of all protocol family, with detailed implementation and methods.

  • Utilities (pcapkit.utilities)

    Auxiliary functions and tools for pcapkit.

  • CoreKit (pcapkit.corekit)

    Core utilities for pcapkit implementation, mainly for internal data structure and processing.

  • ToolKit (pcapkit.toolkit)

    Auxiliary tools for pcapkit to support the multiple extraction engines with a unified interface.

  • DumpKit (pcapkit.dumpkit)

    File output formatters for pcapkit.

  • Constants (pcapkit.const)

    Constant enumerations used in pcapkit for protocol family extraction and representation.

Engine Comparison

Due to the general overhead of pcapkit, its extraction procedure takes around 0.0008 seconds per packet, which is already impressive but not enough comparing to other popular extration engines availbale on the market. Thus pcapkit introduced alternative extractionengines to accelerate this procedure. By now pcapkit supports Scapy, DPKT, and PyShark.

Test Environment

Operating System

macOS Monterey

Processor Name

Intel Core i7

Processor Speed

2.6 GHz

Total Number of Cores

6

Memory

16 GB

Test Results

Engine

Performance (seconds per packet)

dpkt

0.00006832083066304525

scapy

0.0002489296595255534

pcapkit

0.0008274253209431966

pyshark

0.039607704480489093

Installation

Simply run the following to install the current version from PyPI:

pip install pypcapkit

Or install the latest version from the gi repository:

git clone https://github.com/JarryShaw/PyPCAPKit.git
cd pypcapkit
pip install -e .
# and to update at any time
git pull

And since pcapkit supports various extraction engines, and extensive plug-in functions, you may want to install the optional ones:

# for DPKT only
pip install pypcapkit[DPKT]
# for Scapy only
pip install pypcapkit[Scapy]
# for PyShark only
pip install pypcapkit[PyShark]
# and to install all the optional packages
pip install pypcapkit[all]
# or to do this explicitly
pip install pypcapkit dpkt scapy pyshark

For CLI usage, you will need to install the optional packages:

pip install pypcapkit[cli]
# or explicitly...
pip install pypcapkit emoji

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

pypcapkit-0.16.3.tar.gz (242.4 kB view details)

Uploaded Source

Built Distributions

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

pypcapkit-0.16.3-py3.11.egg (1.1 MB view details)

Uploaded Egg

pypcapkit-0.16.3-py3.10.egg (901.0 kB view details)

Uploaded Egg

pypcapkit-0.16.3-py3.9.egg (894.2 kB view details)

Uploaded Egg

pypcapkit-0.16.3-py3.8.egg (907.2 kB view details)

Uploaded Egg

pypcapkit-0.16.3-py3.7.egg (902.2 kB view details)

Uploaded Egg

pypcapkit-0.16.3-pp39-none-any.whl (400.6 kB view details)

Uploaded PyPy

pypcapkit-0.16.3-pp38-none-any.whl (402.3 kB view details)

Uploaded PyPy

pypcapkit-0.16.3-pp37-none-any.whl (402.3 kB view details)

Uploaded PyPy

pypcapkit-0.16.3-cp311-none-any.whl (400.6 kB view details)

Uploaded CPython 3.11

pypcapkit-0.16.3-cp310-none-any.whl (400.6 kB view details)

Uploaded CPython 3.10

pypcapkit-0.16.3-cp39-none-any.whl (400.6 kB view details)

Uploaded CPython 3.9

pypcapkit-0.16.3-cp38-none-any.whl (402.3 kB view details)

Uploaded CPython 3.8

pypcapkit-0.16.3-cp37-none-any.whl (402.3 kB view details)

Uploaded CPython 3.7

File details

Details for the file pypcapkit-0.16.3.tar.gz.

File metadata

  • Download URL: pypcapkit-0.16.3.tar.gz
  • Upload date:
  • Size: 242.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3.tar.gz
Algorithm Hash digest
SHA256 0db9c3dd5853dd7bd276984dfe63867d1666e8b09bf15e995ba3dcec86e83a0b
MD5 9e918d12766bf0c14fac9f94fcdc998b
BLAKE2b-256 6b949fda6e55a79f9b3e43a04f061943abccae12dfd31610b1b354e24d1af3ca

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-py3.11.egg.

File metadata

  • Download URL: pypcapkit-0.16.3-py3.11.egg
  • Upload date:
  • Size: 1.1 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-py3.11.egg
Algorithm Hash digest
SHA256 4b704c07b37530857ca99b39d2c806068e89c19f6fd000c4ff0ee0d2b0968c9a
MD5 794d2df282f34535b5ff22472814241f
BLAKE2b-256 5e8fbc34a01b18a2b3ec26d07858c588b5dab14658cd6bf0b31c486466d19e8a

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-py3.10.egg.

File metadata

  • Download URL: pypcapkit-0.16.3-py3.10.egg
  • Upload date:
  • Size: 901.0 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-py3.10.egg
Algorithm Hash digest
SHA256 0db0d57e7b23d92af1776bb3bdae51eb384456ea28e06d1b03253d2adfd13f5b
MD5 8562b74aa6a9b1d1db2baaf4865c91ad
BLAKE2b-256 cc33b0518083afc0b22b93c983d33a2b19cc7622fb134abba896b294021f48de

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-py3.9.egg.

File metadata

  • Download URL: pypcapkit-0.16.3-py3.9.egg
  • Upload date:
  • Size: 894.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-py3.9.egg
Algorithm Hash digest
SHA256 62932898019369e852bbbbb3d81bac442fd1a8a69b6343010bc576ceb0e014fa
MD5 e1aeb5041c69d16d23c28efd41381ee5
BLAKE2b-256 8c34db6e7e3e03ec7904f32cea02f6d786a31e67476379030eb9894ca85ee776

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-py3.8.egg.

File metadata

  • Download URL: pypcapkit-0.16.3-py3.8.egg
  • Upload date:
  • Size: 907.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-py3.8.egg
Algorithm Hash digest
SHA256 d7922fef745bccca75bfd12df987a6bf7888ea85d651f032d7ea0ab32ae6cf6b
MD5 0d75c9a06466c76e5c35be66d9ac8070
BLAKE2b-256 d6a5120325f8a27fc87137ffba849a94331c4a8f000567ae900866aafca0b003

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-py3.7.egg.

File metadata

  • Download URL: pypcapkit-0.16.3-py3.7.egg
  • Upload date:
  • Size: 902.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-py3.7.egg
Algorithm Hash digest
SHA256 e1b136d49c81f0fba4b45d3d7bb1480521027df2416b6aab1392726768497da0
MD5 cf308aee963b5eac9d498db60945c044
BLAKE2b-256 d8c38b7baefda9aaccb7de1c56fc5f182e93d4a317ac29852bec26021c1dee62

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-pp39-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-pp39-none-any.whl
  • Upload date:
  • Size: 400.6 kB
  • Tags: PyPy
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-pp39-none-any.whl
Algorithm Hash digest
SHA256 590238e26e644779cb729d49472159750f44fcdfdc5fcafa479d3de92f079d70
MD5 426b8215ee1985e44fb936febbfc25e9
BLAKE2b-256 bb2f95d6f71dde884058e06b3f5c72f559333c4f5d0c614a9d2e24052b61ab5a

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-pp38-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-pp38-none-any.whl
  • Upload date:
  • Size: 402.3 kB
  • Tags: PyPy
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-pp38-none-any.whl
Algorithm Hash digest
SHA256 e455f24da729b3b38798d668ab0aaae81c5404301a3bec19b6181bed343f9041
MD5 75619fa4a8d0095b8f4eeb4aef94a49f
BLAKE2b-256 4832fda1a1b10f8e25b4181cc51078c6cc27f6d1dd6841fdb460438e1d3eab38

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-pp37-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-pp37-none-any.whl
  • Upload date:
  • Size: 402.3 kB
  • Tags: PyPy
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-pp37-none-any.whl
Algorithm Hash digest
SHA256 733dd2421eb8b95ea9eccbe9cdb5ab6e75c2fe2da49e189f2313e5b8a353b6db
MD5 93daae0d9f741fc596df1197593b306b
BLAKE2b-256 24b5049a7a78540cb75b229497963bd1cf8eda5991b333f8ed8e784aad4d9e82

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-cp311-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-cp311-none-any.whl
  • Upload date:
  • Size: 400.6 kB
  • Tags: CPython 3.11
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-cp311-none-any.whl
Algorithm Hash digest
SHA256 1443878b8c34464db6dd42ec5f77f6642cca366031dd51a00449cab4bd267ba2
MD5 b794a156e00b903c3bfa70e31db29015
BLAKE2b-256 2c85c375e5e3be1c6c650ad9899445194f771a1061f7cb0f0713bbd1a1e06785

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-cp310-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-cp310-none-any.whl
  • Upload date:
  • Size: 400.6 kB
  • Tags: CPython 3.10
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-cp310-none-any.whl
Algorithm Hash digest
SHA256 c7b06fb0350f441465790dbe5650f16c00c08743d9764ecb8b7d77d8130d3b69
MD5 b0a401d7311fa1ea0978eb0fc927b84d
BLAKE2b-256 175d3b899f12a13a90e4f6966cf1b97242f2f5102c36646fc63a4bafcd6708a2

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-cp39-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-cp39-none-any.whl
  • Upload date:
  • Size: 400.6 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-cp39-none-any.whl
Algorithm Hash digest
SHA256 c7b5a95192ca1ebecbe6ef9d4f84aeb0cb4d0cd3db305571fc0e9785802e53fa
MD5 50b6fbea7cd7d43d05c95217567450e7
BLAKE2b-256 7f1dfb3ba22f8f51a723c85ee11c9417640636a4f9823f03b09436722c86a4de

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-cp38-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-cp38-none-any.whl
  • Upload date:
  • Size: 402.3 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-cp38-none-any.whl
Algorithm Hash digest
SHA256 719662f21b98efe0ccf060d5562e24c35c0c407e887ad6e2e6952d1299e7552a
MD5 52f1d2795109eeccf8b06f81ef7dafb9
BLAKE2b-256 0b6a8ae54abc76aaeec749d64889793dc6ef5fdc9b71b633597920f6b05f4123

See more details on using hashes here.

File details

Details for the file pypcapkit-0.16.3-cp37-none-any.whl.

File metadata

  • Download URL: pypcapkit-0.16.3-cp37-none-any.whl
  • Upload date:
  • Size: 402.3 kB
  • Tags: CPython 3.7
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for pypcapkit-0.16.3-cp37-none-any.whl
Algorithm Hash digest
SHA256 5a3dc31692d2315dd4567b38b6ee86b5811e2792e0e5c2787558ba77e4298b61
MD5 7d4bb7c37c23c265bf1bc3fbc5d8fd9b
BLAKE2b-256 e273eb540acb127e0b7f9f2ab8a3f46fa0a311fb37a4ada88e998c4c8407d176

See more details on using hashes here.

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