pentesting, updated
RustScan
RustScan: a very fast port scanner that finds open ports in seconds and hands them to nmap for service/version detection.
What it’s for
Scan all 65535 ports in seconds, then pipe the open ones straight into nmap for the detail a full-range nmap scan would take far longer to produce.
Options
Targets and ports
| Flag | Effect |
|---|---|
-a | Target address, hostname or CIDR (comma-separate several) |
-p | Specific ports, e.g. -p 80,443 |
-r | Port range, e.g. -r 1-1000 |
--top | Scan only the top ports from the config |
-addresses list file via -a $(cat f) | No native file flag — expand in the shell |
Speed and reliability
| Flag | Effect |
|---|---|
-b | Batch size — concurrent ports (raise to go faster) |
-t | Timeout per port in milliseconds |
--ulimit | Raise the open-file-descriptor limit (biggest speed lever) |
--tries | Retries per port before giving up |
--scan-order | serial or random |
Behaviour and output
| Flag | Effect |
|---|---|
-g | Greppable output (one line per host) |
-A / --accessible | Accessible, screen-reader-friendly output |
--no-config | Ignore ~/.rustscan.toml |
-- <nmap args> | Everything after -- is passed to nmap on the open ports |
Examples
Fast sweeps
rustscan -a 10.0.0.5 # all ports, default settings
rustscan -a 10.0.0.0/24 # a whole subnet
rustscan -a 10.0.0.5 -r 1-1000 # a specific range
rustscan -a 10.0.0.5 --ulimit 5000 # raise FD limit for speed
rustscan -a 10.0.0.5 -b 4500 -t 1500 # bigger batch, longer timeout for lossy links
Hand off to nmap
rustscan -a 10.0.0.5 -- -sV -sC # open ports → nmap version + default scripts
rustscan -a 10.0.0.5 -- -sV -O -A # open ports → aggressive nmap
rustscan -a 10.0.0.5 -- --script vuln # open ports → nmap vuln scripts
Multiple hosts and files
rustscan -a 10.0.0.5,10.0.0.6,example.com # comma-separated targets
rustscan -a "$(paste -sd, hosts.txt)" # expand a host file into the -a list
rustscan -a 10.0.0.0/24 -g # greppable, one line per host for scripting
References
- RustScan on GitHub
- RustScan wiki (usage & config)
- Pairs with nmap for the deep scan.