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

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/robertdavidgraham-masscan
Generated for open source discovery and AI-assisted research.

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.

GitHub: https://github.com/robertdavidgraham/masscan
OSRepos URL: https://osrepos.com/repo/robertdavidgraham-masscan

## Summary

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.

## Topics

- networking
- security
- cli
- c
- port-scanner
- internet-scanning

## Repository Information

Last analyzed by OSRepos: Sat Nov 07 2026 01:37:25 GMT+0000 (Western European Standard Time)
Detail views: 4
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## 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.

## Our Take

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.

## Project Health

| Signal | Value |
|---|---|
| Status | **Maintained**: a few commits in the last 90 days |
| Last commit | 2026-10-05 (1 month ago) |
| Commits, last 90 days | 2 |
| Releases, last 12 months | 0 (latest 1.3.2, 2021-01-31) |
| Contributors | 71 (top contributor: 77% of commits) |
| Issues closed, last 90 days | 2 |
| Pull requests merged, last 90 days | 1 |
| Project age | 13 years |

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

## Project Facts

- Language: C
- License: AGPL-3.0
- Stars: 26.1k
- Forks: 3.2k
- Archived: no

## What You Need

Detected in the repository:

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

## Getting Started

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

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

See the [README](https://github.com/robertdavidgraham/masscan) for platform-specific build guidance, scan options, and network configuration details. Only scan systems and networks you are authorized to assess.

## License in Plain Words

**AGPL-3.0** (network 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.

## Alternatives

- [RustScan](https://osrepos.com/repo/bee-san-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.

| Project | Language | License | Stars | Status |
|---|---|---|---|---|
| **masscan** | C | AGPL-3.0 | 26.1k | Maintained |
| [RustScan](https://osrepos.com/repo/bee-san-rustscan) | Rust | GPL-3.0 | 20.5k | Active |

## 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.