Network Analysis CLI/TUI Tool — ping, traceroute, port scan, DNS resolution, whois lookups, and speed tests, all from the terminal.
- ping — ICMP echo request with statistics (raw ICMP or system ping fallback)
- trace — Traceroute via UDP probes with TTL stepping (raw socket or system fallback)
- scan — TCP connect port scan on 20 common ports (SSH, HTTP, HTTPS, MySQL, etc.)
- dns — DNS resolution showing A, AAAA records and canonical names
- whois — Domain whois lookup via raw TCP connection to whois servers
- speedtest — Download speed test using test files from speedtest.tele2.net
- all — Comprehensive run: DNS + ping + trace + scan + whois in one command
- TUI mode — Interactive curses-based menu interface (
--tui)
# Clone or copy the project
cd net-analyzer
# Install in editable mode
pip install -e .python -m net_analyzer ping google.com# Ping a host (4 packets)
net-analyzer ping google.com
# Ping with custom count
net-analyzer ping google.com 10
# Traceroute
net-analyzer trace cloudflare.com
# Port scan (20 common ports)
net-analyzer scan localhost
# DNS resolution
net-analyzer dns github.com
# Whois lookup
net-analyzer whois example.com
# Speed test (download 10MB file)
net-analyzer speedtest
# Speed test with custom size (1MB, 10MB, 50MB, 100MB)
net-analyzer speedtest 50MB
# Run ALL network checks against a host
net-analyzer all example.com
# Show help
net-analyzer --helpnet-analyzer --tuiNavigate with arrow keys, press Enter to select, type target when prompted.
# Quick network diagnostics
$ net-analyzer all google.com
# Check if a web server is running
$ net-analyzer scan myserver.local
# Trace the route to a CDN
$ net-analyzer trace cloudflare.com- Python 3.8+
- No external dependencies (standard library only)
ping/traceroutesystem commands (optional — raw sockets used when available)
- Raw ICMP ping and raw traceroute require root/Administrator permissions. If unavailable, the tool falls back to calling the system
ping/traceroutecommands. - Port scanning uses TCP connect (SYN-ACK) — no elevated privileges needed.
- Speedtest downloads a file from speedtest.tele2.net — internet connection required.
net-analyzer/
├── pyproject.toml
├── README.md
└── src/
└── net_analyzer/
├── __init__.py
├── __main__.py # Entry point
├── cli.py # All CLI commands + dispatch
└── tui.py # Curses TUI interface
MIT