A real-time network visibility tool built with Scapy for packet capture and Dash/Plotly for interactive visualization.
It provides live charts of bandwidth usage, protocol distribution, and top talkers, along with alerts for suspicious activity.
Captured traffic can be exported to CSV for offline analysis or PCAP for inspection in Wireshark.
- Real-time capture using Scapy (supports Ethernet, Wi-Fi, and loopback adapters via Npcap).
- Interactive dashboard powered by Dash/Plotly.
- Visualizations:
- Bandwidth over time
- Protocol distribution (TCP/UDP/ICMP/etc.)
- Top talkers by traffic volume
- Alerts:
- Traffic bursts (packets/sec threshold)
- Suspicious ports (22, 23, 3389, 4444, 8080, 5353 by default)
- Blacklist hits (configurable in
blacklist.txt)
- Exports:
- CSV: structured flows for quick offline analysis
- PCAP: raw packets for deep dives in Wireshark
- Configurable via
config.yaml
├── dashboard.py # Dash + Flask web app
├── capture.py # Packet sniffer thread & blacklist utilities
├── config.yaml # Main configuration
├── blacklist.txt # Blacklisted IPs/CIDRs
├── requirements.txt # Python dependencies
└── captures/ # Generated CSV + PCAP files
- Python 3.10+
- Npcap (Windows) or libpcap (Linux/macOS)
- Admin/root privileges for raw packet capture
Clone and install dependencies:
git clone https://github.com/<your-username>/network-traffic-dashboard.git
cd network-traffic-dashboard
python -m venv .venv
source .venv/bin/activate # (Linux/macOS)
.venv\Scripts\Activate.ps1 # (Windows PowerShell)
pip install -r requirements.txt
Edit config.yaml:
iface: "Wi-Fi" # network adapter name (see below)
bpf_filter: "tcp or udp or icmp"
burst_pps_threshold: 800
blacklist_file: "./blacklist.txt"
host: "127.0.0.1"
port: 8050Find available interfaces:
python -c "from scapy.all import get_if_list; print(get_if_list())"Start the dashboard:
python dashboard.pyOpen in browser: https://127.0.0.1:8050
- Suspicious Port:
Test-NetConnection 192.168.1.50 -Port 3389 # replace with your LAN IP- Blacklist Hit:
- Add your IP (e.g., 192.168.1.50) to blacklist.txt, restart app, then ping/curl it.
- Burst PPS:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
for _ in range(5000):
s.sendto(b'x'*200, ('192.168.1.50', 9999))Scapy – packet capture & parsing
Dash – interactive web dashboard
Plotly – charts & visualizations
Flask – web server
Pandas – structured data handling
YAML – configuration
This project is for educational and monitoring purposes only. Do not run packet sniffers on networks you don’t own or have permission to monitor.