A fast, async TCP port scanner built in Rust. Scans one or multiple hosts, shows a real-time progress bar, and prints results with colored output.
- Async scanning via Tokio — no thread-per-port overhead
- ICMP ping check before scanning (
surge-ping) - Progress bar during scan (
indicatif) - Colored output for open/closed ports (
colored) - Clean CLI interface with flags (
clap) - Structured logging (
tracing)
- Rust 1.85+ (edition 2024)
- Cargo
git clone https://github.com/DaviAlcanfor/port-scanner.git
cd port-scanner
cargo build --releaseThe binary will be at ./target/release/port-scanner.
port-scanner [OPTIONS] --host <HOST># Scan default ports on a host
port-scanner --host 192.168.1.1
# Scan a specific port range
port-scanner --host 192.168.1.1 --start 1 --end 1024
# Scan a single port
port-scanner --host scanme.nmap.org --start 80 --end 80Note: ICMP ping requires elevated privileges on some systems. Run with
sudoif the ping step fails.
| Crate | Purpose |
|---|---|
tokio |
Async runtime |
futures |
Future combinators |
clap |
CLI argument parsing |
surge-ping |
ICMP ping |
indicatif |
Progress bar |
colored |
Terminal color output |
tracing + tracing-subscriber |
Logging |
MIT — see LICENSE.