Guardian of the gates — a fast, async TCP port scanner written in Rust.
Scans a host, grabs service banners, shows live progress, and saves the results to a file.
Warning
Educational project. Built for learning networking, Rust and async programming. Only run it against hosts you own or have explicit permission to scan. Unauthorized scanning may violate local laws.
| Async by default | Tokio drives every probe — no thread-per-port overhead |
| Sequential mode | --sync scans one port at a time when you want to go easy on the target |
| Smart banner grabbing | The payload is chosen per port: HTTP ports get a GET, Redis gets a PING, and services that greet first (SSH, FTP, SMTP…) get nothing at all |
| Live feedback | Open ports print as they are found, under a spinner (indicatif) |
| Clean CLI | Flags and --help via clap |
| Structured logs | tracing with uptime timestamps |
| Saved output | One port per line in results.txt |
- Rust 1.85+ (edition 2024)
- Cargo
git clone https://github.com/DaviAlcanfor/anubis.git
cd anubis
cargo build --releaseThe binary lands at ./target/release/anubis.
anubis [OPTIONS] --host <HOST>| Flag | Default | Description |
|---|---|---|
--host |
required | Target IP or hostname |
--ports |
1-1024 |
Port range, as start-end |
--timeout |
200 |
Connection timeout per port, in ms |
--threads |
2 |
Ports probed concurrently (ignored with --sync) |
--sync |
off | Scan one port at a time instead of concurrently |
# Default range (1-1024)
anubis --host 192.168.1.1
# Full range, 500 ports at a time
anubis --host 192.168.1.1 --ports 1-65535 --threads 500
# Slower and gentler: one port at a time, generous timeout
anubis --host 192.168.1.1 --ports 1-1024 --timeout 500 --syncOpen ports are printed live and written to results.txt in the current directory:
OPEN 22 | SSH-2.0-OpenSSH_9.6
OPEN 80 | HTTP/1.0 200 OK
OPEN 443
A port with no | answered the connection but stayed silent — it is open, just not talkative.
src/
├── main.rs # wiring only: parse args, run a scan, write the file
├── cli.rs # flags and port-range parsing
├── scan.rs # async and sequential scan strategies, result formatting
├── probe.rs # single-port connect + per-port banner payloads
└── ui.rs # logger and progress bar setup
Adding a banner payload for a new service is a single line in the PAYLOADS map in src/probe.rs.
cargo test| Crate | Purpose |
|---|---|
tokio |
Async runtime |
futures |
Stream combinators for bounded concurrency |
clap |
CLI argument parsing |
indicatif |
Progress spinner |
colored |
Terminal colors |
tracing + tracing-subscriber |
Structured logging |
MIT — see LICENSE.