# RustScan

> Port scanner written in Rust that scans all 65k ports in about 3 seconds and can pipe open ports into Nmap or custom Python, Lua, and Shell scripts.

Stars: 20.6k · Language: Rust · License: GPL-3.0 · Categories: Network

- Repository: https://github.com/bee-san/RustScan
- Page: https://www.trmn.sh/tools/rustscan

## Install

- Homebrew: `brew install rustscan`
- Pacman: `pacman -S rustscan`
- Cargo: `cargo install rustscan`

## Overview

RustScan is a port scanner written in Rust. It finds open ports on target hosts and reports scanning all 65k ports in as little as 3 seconds at its fastest. Slower scans are also possible when stealth matters more than speed. It supports the usual inputs, including IPv6, CIDR ranges, and file input.

Its scripting engine runs scripts written in Python, Lua, or Shell against the discovered ports. RustScan can pipe open ports into Nmap automatically for further analysis. Scripts can also be conditional, such as running `smb-enum` when SMB is found open. Users can use the bundled scripts or write their own. A config file is documented for persistent settings.

RustScan also has "Adaptive Learning", a set of features that tune the scan to the host OS and to how the user runs it. The README describes this as basic maths rather than machine learning. For performance, CI tests compare each change against the previous version and fail the build if RustScan becomes significantly slower, with HyperFine used to track speed over time. The README also says CI checks accessibility. The tool is aimed at penetration testers, security researchers, and network administrators, and it has Docker usage documentation.

### Installation

```bash
# via Homebrew
brew install rustscan
```

```bash
# via Pacman
pacman -S rustscan
```

```bash
# via Cargo
cargo install rustscan
```

## Alternatives

- [monolith](https://www.trmn.sh/tools/monolith.md): CLI tool that bundles web pages into single HTML files with all CSS, images, and JavaScript embedded inline (Rust, 15.6k stars)
- [gping](https://www.trmn.sh/tools/gping.md): Ping utility with real-time graphical display of response times and command execution times (Rust, 12.7k stars)
- [bandwhich](https://www.trmn.sh/tools/bandwhich.md): CLI utility that displays current network utilization by process, connection and remote IP/hostname (Rust, 12.0k stars)
- [oha](https://www.trmn.sh/tools/oha.md): HTTP load generator written in Rust that sends requests to a web application and shows live results in a terminal UI, inspired by rakyll/hey. (Rust, 10.6k stars)
- [websocat](https://www.trmn.sh/tools/websocat.md): Command-line WebSocket client and server, like netcat, curl and socat for ws:// and wss://, with TCP/UNIX socket proxying and program execution. (Rust, 8.7k stars)

---

Canonical: https://www.trmn.sh/tools/rustscan
