Skip to main content

A command-line tool to analyze PCAP files 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.4.tar.gz (11.5 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.4-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pcapana-0.1.4.tar.gz
  • Upload date:
  • Size: 11.5 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.4.tar.gz
Algorithm Hash digest
SHA256 16bd887f15f38e226a8664b7af0db9a2150d5280c78e5bcd479dced5d478b2e6
MD5 40f38afcfbd8f75dda34c347cd9a0883
BLAKE2b-256 1425dcbaeac9688b40b803c14fcfe0f742d30f9ba4d5466a85bae419002e6708

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pcapana-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 faac6cf1d3ee588d2495c92589c9567c1e8b6d003698ef88d4eac838090ff6ae
MD5 ab529d1cbdf8efb6b4f5f53bf85ee0f8
BLAKE2b-256 c6d8d8b9f2e245f231ecfc7063552cf04a6e0d6ad1c9d217e10b65f6019307cc

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