A simple asynchronous TCP port scanner written in Rust using tokio and clap.
- Scan a range of TCP ports on a target IP or domain.
- Asynchronous and concurrent scanning for speed.
- Configurable timeout, concurrency, and port range via command-line arguments.
- Rust (stable)
- Cargo (Rust package manager)
Clone the repository and build the project:
git clone
cd port-scanner
cargo build --releaseRun the scanner with the following options:
cargo run -- --target <IP_OR_DOMAIN> [OPTIONS] --target, -t — Target IP address or domain to scan (required).
--start-port — Starting port number (default: 1).
--end-port — Ending port number (default: 1024).
--timeout-ms, -T — Timeout in milliseconds for each connection attempt (default: 500).
--concurrency, -c — Maximum number of concurrent connection attempts (default: 100).
Scan ports 1 to 500 on 192.168.0.1 with 300ms timeout and concurrency of 50:
cargo run -- --target 192.168.0.1 --start-port 1 --end-port 500 --timeout-ms 300 --concurrency 50Or using short options:
cargo run -- -t 192.168.0.1 -T 300 -c 50License
MIT License