Skip to content

DaviAlcanfor/port-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

port-scanner

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.

Features

  • 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)

Requirements

  • Rust 1.85+ (edition 2024)
  • Cargo

Installation

git clone https://github.com/DaviAlcanfor/port-scanner.git
cd port-scanner
cargo build --release

The binary will be at ./target/release/port-scanner.

Usage

port-scanner [OPTIONS] --host <HOST>

Examples

# 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 80

Note: ICMP ping requires elevated privileges on some systems. Run with sudo if the ping step fails.

Dependencies

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

License

MIT — see LICENSE.

About

Fast async TCP port scanner written in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages