Skip to content

Building 70 Projects ranging from beginner to advanced so anyone can β€” learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company πŸ‘‡

2.9 KB
Raw Blame
β–„β–„β–„β–„β–„β–„ β–„β–„β–„β–„   β–„β–„β–„  β–„β–„β–„β–„β–„ β–„β–„β–„β–„β–„ β–„β–„  β–„β–„β–„β–„    β–„β–„β–„  β–„β–„  β–„β–„  β–„β–„β–„  β–„β–„  β–„β–„ β–„β–„ β–„β–„β–„β–„β–„ β–„β–„β–„β–„β–„ β–„β–„β–„β–„
  β–ˆβ–ˆ   β–ˆβ–ˆβ–„β–ˆβ–„ β–ˆβ–ˆβ–€β–ˆβ–ˆ β–ˆβ–ˆβ–„β–„  β–ˆβ–ˆβ–„β–„  β–ˆβ–ˆ β–ˆβ–ˆβ–€β–€β–€   β–ˆβ–ˆβ–€β–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–„β–ˆβ–ˆ β–ˆβ–ˆβ–€β–ˆβ–ˆ β–ˆβ–ˆ  β–€β–ˆβ–ˆβ–ˆβ–€   β–„β–ˆβ–€ β–ˆβ–ˆβ–„β–„  β–ˆβ–ˆβ–„β–ˆβ–„
  β–ˆβ–ˆ   β–ˆβ–ˆ β–ˆβ–ˆ β–ˆβ–ˆβ–€β–ˆβ–ˆ β–ˆβ–ˆ    β–ˆβ–ˆ    β–ˆβ–ˆ β–€β–ˆβ–ˆβ–ˆβ–ˆ   β–ˆβ–ˆβ–€β–ˆβ–ˆ β–ˆβ–ˆ β–€β–ˆβ–ˆ β–ˆβ–ˆβ–€β–ˆβ–ˆ β–ˆβ–ˆβ–„β–„β–„ β–ˆ   β–„β–ˆβ–ˆβ–„β–„ β–ˆβ–ˆβ–„β–„β–„ β–ˆβ–ˆ β–ˆβ–ˆ

A high-performance CLI network analyzer built with libpcap for raw packet capture and FTXUI for a fully interactive terminal UI. The application captures packets directly from a network interface, parses protocol headers manually, aggregates statistics in real time

Developed by @deniskhud


Preview

[!IMPORTANT] Packet capture requires elevated privileges.

Run with:

sudo ./network-traffic-analyzer

Or grant capabilities:

sudo setcap cap_net_raw,cap_net_admin=eip ./network-traffic-analyzer

Or you can use just command

just run

Features

  1. Live Packet Capture

  • Capture traffic from a selected network interface
  • Support for BPF filters (e.g. tcp, port 80, udp)
  • Real-time processing using libpcap
  1. Real-Time Statistics Engine

  • Total packets & traffic volume
  • Transport protocol distribution (TCP / UDP / ICMP)
  • Application-level classification (port-based)
  • Top IP addresses
  • Top source > destination pairs
  1. Flexible Capture Modes

  • Live capture from selected network interface (-i, --interface)
  • Offline analysis from .pcap file (-r, --offline)
  • Packet count limit (-c)
  • Time limit for capture (-t)
  • Interface discovery (--interfaces)

[!TIP] For the complete list of CLI options, use: --help

Technologies

  • C++20+
  • Boost::program_options
  • libpcap
  • FTXUI
  • CMake

Setup

1. clone the repo then

cd network-traffic-analyzer
./install.sh

Usage Example

Live capture on eth0

just capture -i eth0

Capture 100 packets

just run -i wlan0 -c 100

Analyze offline pcap file

just run --offline traffic.pcap

Export results (json / csv)

just run --json result.json --csv result.csv

Learn More

Doc Contents
00-OVERVIEW.md Quick start, prerequisites, project structure
01-CONCEPTS.md libpcap internals, BPF filters, protocol header parsing
02-ARCHITECTURE.md System design, component breakdown, data flow, threading model
03-IMPLEMENTATION.md Line-by-line code walkthrough
04-CHALLENGES.md Extension ideas and advanced topics