Skip to main content

pcapana

A command-line tool for comprehensive network analysis from PCAP files. It provides detailed statistics on protocol usage, OSI layer distribution, open port communications, bandwidth consumption, and visited domains for network troubleshooting and security insights.


Note: You must have wireshark/tshark installed for this to work on your machine

🚀 Features

pcapana dissects network traffic from a .pcap file and presents the data in a human-readable format. Its key features include:

  • 📊 Protocol Statistics: Get a breakdown of all protocols present in the capture, sorted by usage.
  • 📡 OSI Layer Analysis: View packet distribution across the OSI layers (L2, L3, L4, L5, L6, L7) for a high-level overview.
  • 🌐 Visited Domains: Identify the top visited domains from DNS, HTTP, and TLS traffic, ranked by frequency and traffic volume.
  • 💻 Port Analysis: Discover which local ports are communicating with which remote ports and services (e.g., HTTPS, SSH).
  • 📈 Bandwidth Usage: Analyze bandwidth consumption per IP address, showing sent, received, and total bytes.
  • 📄 HTML Report: Generate HTML report instead of just printing to terminal

⚙️ Installation

To install pcapana, simply use pip:

pip install pcapana

👨‍💻 Usage

The pcapana tool can be run with a simple command, with or without flags. If no flags are provided, it will run all available analyses by default.

Running all analyses:

To run all available analyses on a PCAP file, provide the file path as the only argument:

pcapana path/to/your/file.pcap

Running specific analyses:

You can use optional flags to run only the analyses you need.

Flag Description
-p, --protocol Runs protocol statistics
-o, --osi Runs OSI analysis
-po, --ports Runs port communication analysis
-d, --domains Runs visited domains analysis
-b, --bandwidth Runs bandwidth analysis
-r,--report Generates Detailed HTML Report of Analysis

Example: To run only the port and protocol analysis and save it as a HTML report

pcapana -po -p -r path/to/your/file.pcap

Metadata

Release files for pcapana 0.1.4

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

Source distribution (sdist)

Source distribution for pcapana 0.1.4
File Size Uploaded Provenance Actions
pcapana-0.1.4.tar.gz 11.5 kB Without provenance Details for pcapana-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pcapana 0.1.4
File Interpreter ABI Platform Actions
pcapana-0.1.4-py3-none-any.whl Python 3 none any Details for pcapana-0.1.4-py3-none-any.whl

Total release size: 27.3 kB

Release files / pcapana-0.1.4.tar.gz

Download URL pcapana-0.1.4.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
16bd887f15f38e226a8664b7af0db9a2150d5280c78e5bcd479dced5d478b2e6
BLAKE2b-256 checksum
How to use checksums
1425dcbaeac9688b40b803c14fcfe0f742d30f9ba4d5466a85bae419002e6708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / pcapana-0.1.4-py3-none-any.whl

Download URL pcapana-0.1.4-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faac6cf1d3ee588d2495c92589c9567c1e8b6d003698ef88d4eac838090ff6ae
BLAKE2b-256 checksum
How to use checksums
c6d8d8b9f2e245f231ecfc7063552cf04a6e0d6ad1c9d217e10b65f6019307cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for pcapana 0.1.4

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.

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