LinuxCommandLibrary

masscan

fastest Internet port scanner, capable of scanning the entire Internet

TLDR

Scan single port

$ sudo masscan [192.168.1.0/24] -p [80]
copy
Scan port range
$ sudo masscan [192.168.1.0/24] -p [1-65535]
copy
Scan common ports
$ sudo masscan [192.168.1.0/24] --ports [0-1023]
copy
Scan at specific rate
$ sudo masscan [192.168.1.0/24] -p [80] --rate [10000]
copy
Output to file
$ sudo masscan [192.168.1.0/24] -p [80] -oL [results.txt]
copy
Exclude targets
$ sudo masscan [10.0.0.0/8] -p [80] --excludefile [exclude.txt]
copy

SYNOPSIS

masscan [options] targets

DESCRIPTION

masscan is the fastest Internet port scanner, capable of scanning the entire Internet in under 6 minutes. It uses asynchronous transmission, sending packets without waiting for responses.
The tool is designed for large-scale network reconnaissance during authorized security assessments. It produces output similar to nmap for compatibility.

PARAMETERS

-p ports

Ports to scan.
--rate pps
Packets per second.
--banners
Grab banners.
-oL file
List output.
-oJ file
JSON output.
-oG file
Grepable output.
-oX file
XML output.
--excludefile file
Exclude addresses.
--adapter name
Network interface.
-c file
Configuration file.
--wait seconds
Wait after sending.

CAVEATS

Requires root/raw sockets. High rates may overwhelm networks. Only for authorized testing. May trigger IDS alerts. Stateless scanning may miss filtered ports.

HISTORY

masscan was created by Robert David Graham and released in 2013. It was designed to demonstrate that Internet-wide scanning was feasible and to provide a tool for legitimate security research at scale.

SEE ALSO

nmap(1), zmap(1), rustscan(1), unicornscan(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community