robertdavidgraham

masscan: Scan TCP Ports at Internet Scale with Its Own TCP/IP Stack

Masscan is a C-based, asynchronous TCP port scanner built around its own ad hoc TCP/IP stack, designed to probe large address ranges quickly. It offers Nmap-like options and runs on Linux, Windows, macOS, and other systems.

MaintainedCAGPL-3.0NetworkingSecurityCLI
View on GitHub Compare
Stars
26.1k
Forks
3.2k
Last commit
1 month ago
Contributors
71
Releases, 12 months
0

Our take

Maintaineda few commits in the last 90 days

Health score

46/100

How it is scored
Activity
30
Community
57
Issues
53
Pull requests
43

Masscan is a specialized, actively maintained scanner for broad, high-speed port discovery, but its low recent release activity and reliance on one main contributor deserve consideration.

Good fit if

  • You need asynchronous port discovery across large, authorized IP ranges rather than deep inspection of a small number of hosts.
  • Your workflow benefits from IPv4 and IPv6 support, scan sharding, or machine-readable output.
  • You can configure network interfaces, source addresses or ports, and firewall rules to accommodate its custom stack.

Look elsewhere if

  • You need detailed single-host enumeration or DNS-name scanning, which the project says are outside its focus.
  • You need a recently released version on a regular cadence. There has been no release in over a year.
  • Your organization cannot meet the obligations of the AGPL-3.0 license.
All health signals
Last commit2026-10-05 (1 month ago)
Commits, last 90 days2
Releases, last 12 months0 (latest 1.3.2, 2021-01-31)
Contributors71 (top contributor: 77% of commits)
Issues closed, last 90 days2
Pull requests merged, last 90 days1
Project age13 years

Checked on 2026-11-07 with the GitHub API.

Project history

Daily GitHub snapshots since Nov 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

26,126

Forks

3,248

More snapshots will appear as the daily collection continues.

Overview

Masscan is a C-based, asynchronous TCP port scanner built around its own ad hoc TCP/IP stack. It is designed for scanning large IP address and port ranges quickly, rather than for intensive inspection of a single host. Its command-line options and several output formats are familiar to Nmap users, while its scanning model is built for broad, high-rate probes.

The project supports Linux, Windows, macOS, and other systems, with performance depending on the platform and network hardware. It also supports IPv4 and IPv6, and can optionally establish connections to collect basic service banners. Masscan's separate network stack can conflict with the host's TCP/IP stack, so source IP or port selection and firewall configuration may be needed, especially for banner checks.

Key Features

  • Asynchronously sends probes and receives responses for wide-range scans.
  • Scans configurable IP address and port ranges, including IPv4 and IPv6 targets.
  • Randomizes probe order to spread traffic across target addresses.
  • Supports sharding scans across multiple machines, adapters, or source addresses.
  • Offers optional banner checks for protocols including HTTP, SSH, FTP, and SMB.
  • Writes results as XML, binary, grepable text, JSON, or a simple host-and-port list.
  • Provides Nmap-like command-line options and configuration files.
  • Includes a built-in self-test and regression test target.

Use Cases

  • Network and security teams can inventory exposed ports across large address ranges they are authorized to assess.
  • Researchers can run broad, controlled measurements of reachable services, using exclusions and a deliberate transmit rate.
  • Operators can schedule repeat scans from saved configuration files and compare or process results in their existing tooling.
  • Teams that need service identification can enable banner checks on selected targets, after accounting for the separate TCP/IP stack.

What you need

Detected in the repository

  • C (main language on GitHub)
  • Automated checks on GitHub Actions

License in plain words

AGPL-3.0network copyleft

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the license notice
  • Share your changes: yes, the full source, also when people only use it over a network (e.g. as a hosted service)
  • Includes an explicit patent grant from the contributors:

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

On Debian or Ubuntu, install the compiler and build tools, then build from source:

sudo apt-get install git make gcc
 git clone https://github.com/robertdavidgraham/masscan
cd masscan
make

See the README for platform-specific build guidance, scan options, and network configuration details. Only scan systems and networks you are authorized to assess.

Alternatives

  • RustScan: RustScan is a Rust-based port scanner that can hand discovered ports to Nmap, while masscan uses its own TCP/IP stack for high-speed large-range scans.
ProjectLanguageLicenseStarsStatus
masscanCAGPL-3.026.1kMaintained
RustScanRustGPL-3.020.5kActive

Considerations

Masscan can transmit probes at very high rates, and the README warns that traffic can overwhelm networks, particularly when scanning a focused IPv6 subnet. Start with a conservative rate, use exclusions where appropriate, and plan scans to avoid disrupting target networks. Its own TCP/IP stack may conflict with the operating system's stack; banner checks can require a separate source IP or firewall rules. The project has recent commits and is marked maintained, but has had no release in over a year, and most of the code comes from one person. It is licensed under AGPL-3.0.

Found this useful?

Share it with someone who would like masscan.

Comparisons