Skip to main content

A command-line tool to analyze PCAP file for Protocol Statistics, Visited Domains, OSI Layer Analysis, Bandwidth Analysis & Port Analysis with the option to export it as a HTML report

Project description

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

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

pcapana-0.1.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

pcapana-0.1.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pcapana-0.1.3.tar.gz.

File metadata

  • Download URL: pcapana-0.1.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pcapana-0.1.3.tar.gz
Algorithm Hash digest
SHA256 de4dce2fc29a7f2e9d5ae568f8d0d6f0ec209e9b8bf7952144eb57db36984369
MD5 50af174d610fc51b10509de1eb5d95f5
BLAKE2b-256 65dd53f3ce71ff89c67ce5ee9ee309f1c3d497f782c4f117ea2b7b705cbba094

See more details on using hashes here.

File details

Details for the file pcapana-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pcapana-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pcapana-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5c8ac7a1fe36933e8ada8d0d17294f65e0380ac6b1cb9f4cb082147892d0e10a
MD5 3e8f318dfe3504b66221366bf83a04c5
BLAKE2b-256 2a9faff6a607f3d328739048b117f8cb5cc2067817d816a7c08765000469f3cd

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