> For the complete documentation index, see [llms.txt](https://davidtancredi.gitbook.io/pentesting-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/webapp-pentest/port-scanning/masscan.md).

# masscan

**#Single port scan**

`masscan 10.11.0.0 -p443`

**#Multi-port Scans**

`masscan 10.11.0.0/16 -p80,443`

**#Scan a Range of Ports**

`masscan 10.11.0.0/16 -p22-25`

**#Scan n Number of nmap‘s Top Ports**

`masscan 10.11.0.0/16 ‐‐top-ports 100`

**#Scanning Fast**

`masscan 10.11.0.0/16 ‐‐top-ports 100 ––rate 100000`

In order to scan very large networks at high speeds you’ll need to use rates of a million or more (––rate 1000000).

**#Excluding Targets**

`masscan 10.11.0.0/16 ‐‐top-ports 100 ‐‐excludefile exclude.txt`

**#Saving Your Configuration**

`masscan 10.11.0.0/16 ‐‐top-ports 100 ‐‐echo > scan.txt`

**#Scan a Network for Web Ports**

`masscan 10.11.0.0/16 -p80,443,8080 ––rate 1000000`

**#Scan a Network for the Top 10 Ports**

`masscan 10.11.0.0/16 ‐‐top-ten ––rate 1000000`

**#Scan a Network for All Ports**

`masscan 10.11.0.0/16 -p0-65535 ––rate 1000000`

**#Scan The Internet for A Port**

`masscan 0.0.0.0/0 -p443 ––rate 10000000`

**#Scan The Internet for All Port**

`masscan 0.0.0.0/0 -p0-65535 ––rate 1000000`

**#Crawler**

```
Crawl for a specific port
Max rate for extra torque,exclude one IP  

masscan  1.0.0.0/0 --max-rate 1000000 -p 6379 --open-only --exclude 255.255.255.255 > redis.txt
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/webapp-pentest/port-scanning/masscan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
