Skip to content

trevjacq/network-traffic-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Traffic Analyzer

A real-time network packet capture and analysis tool built in Python. Monitors live network traffic, classifies it by protocol and service, logs it to a SQLite database, and displays a live terminal dashboard.

Features

  • Live packet capture using Scapy
  • Protocol classification (TCP, UDP, ICMP)
  • Service identification by port number (HTTPS, DNS, SSH, etc.)
  • Persistent logging to SQLite database
  • Real-time terminal dashboard showing top IPs and services

Technologies Used

  • Python 3.8+
  • Scapy — packet capture and parsing
  • Rich — terminal dashboard UI
  • SQLite3 — local database storage

Requirements

  • Npcap driver installed (npcap.com) — Windows only
  • Python packages: scapy, rich

How to Run

pip install scapy rich
python main.py

Project Structure

  • capture.py — opens network interface and captures raw packets
  • parser.py — extracts IP, port, and protocol from each packet
  • classifier.py — maps port numbers to service names
  • storage.py — saves data to SQLite and queries statistics
  • dashboard.py — renders live terminal UI
  • main.py — entry point, wires all modules together

Security Concepts Demonstrated

  • Network protocol analysis (OSI layers 3 and 4)
  • Packet inspection and metadata extraction
  • Traffic baseline monitoring
  • Network forensics data collection

About

Real-time network packet capture and analysis tool built in Python. Demonstrates OSI layer 3/4 analysis, protocol classification, and network forensics.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages