tldr/pages/common/masscan.md

34 lines
1.1 KiB
Markdown
Raw Normal View History

# masscan
2021-10-17 15:36:55 +01:00
> Network scanner for scanning as fast as possible.
2022-06-30 20:57:34 +01:00
> Best run with elevated privileges. Nmap compatibility run `masscan --nmap` to find out more.
2021-10-17 15:36:55 +01:00
> More information: <https://github.com/robertdavidgraham/masscan>.
2024-04-15 18:24:05 +01:00
- Scan an IP or network subnet for [p]ort 80:
2021-10-17 15:36:55 +01:00
`masscan {{ip_address|network_prefix}} --ports {{80}}`
- Scan a class B subnet for the top 100 ports at 100,000 packets per second:
`masscan {{10.0.0.0/16}} --top-ports {{100}} --rate {{100000}}`
- Scan a class B subnet avoiding ranges from a specific exclude file:
2021-11-17 17:53:43 +00:00
`masscan {{10.0.0.0/16}} --top-ports {{100}} --excludefile {{path/to/file}}`
2021-10-17 15:36:55 +01:00
2024-04-15 18:24:05 +01:00
- Scan the Internet for web servers running on port 80 and 443:
2021-10-17 15:36:55 +01:00
2024-04-15 18:24:05 +01:00
`masscan {{0.0.0.0/0}} --ports {{80,443}} --rate {{10000000}}`
- Scan the Internet for DNS servers running on UDP port 53:
`masscan {{0.0.0.0/0}} --ports {{U:53}} --rate {{10000000}}`
2021-10-17 15:36:55 +01:00
- Scan the Internet for a specific port range and export to a file:
2024-04-15 18:24:05 +01:00
`masscan {{0.0.0.0/0}} --ports {{0-65535}} --output-format {{binary|grepable|json|list|xml}} --output-filename {{path/to/file}}`
- Read binary scan results from a file and output to `stdout`:
`masscan --readscan {{path/to/file}}`