Linux command
masscan 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Scan single port
sudo masscan [192.168.1.0/24] -p [80]
Scan port range
sudo masscan [192.168.1.0/24] -p [1-65535]
Scan common ports
sudo masscan [192.168.1.0/24] --ports [0-1023]
Scan at specific rate
sudo masscan [192.168.1.0/24] -p [80] --rate [10000]
Output to file
sudo masscan [192.168.1.0/24] -p [80] -oL [results.txt]
Exclude targets
sudo masscan [10.0.0.0/8] -p [80] --excludefile [exclude.txt]
说明
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.
参数
- -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.
FAQ
What is the masscan command used for?
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.
How do I run a basic masscan example?
Run `sudo masscan [192.168.1.0/24] -p [80]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -p _ports_ do in masscan?
Ports to scan.