.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "MASSCAN" "8" "January 2014" "" "" . .SH "NAME" \fBmasscan\fR \- Fast scan of the Internet . .SH "SYNOPSIS" masscan \-p \fIports\fR \fIoptions\fR . .SH "DESCRIPTION" \fBmasscan\fR is an Internet\-scale port scanner, useful for large scale surveys of the Internet, or of internal networks\. While the default transmit rate is only 100 packets/second, it can optional go as fast as 25 million packets/second, a rate sufficient to scan the Internet in 3 minutes for one port\. . .SH "OPTIONS" . .IP "\(bu" 4 \fB\fR: anything on the command\-line not prefixed with a \'\-\' is assumed to be an IP address or range\. There are three valid formats\. The first is a single IPv4 address like "192\.168\.0\.1"\. The second is a range like "10\.0\.0\.1\-10\.0\.0\.100"\. The third is a CIDR address, like "0\.0\.0\.0/0"\. At least one target must be specified\. Multiple targets can be specified\. This can be specified as multiple options separated by space, or can be separated by a comma as a single option, such as \fB10\.0\.0\.0/8,192\.168\.0\.1\fR\. . .IP "\(bu" 4 \fB\-\-range \fR: the same as target range spec described above, except as a named parameter instead of an unnamed one\. . .IP "\(bu" 4 \fB\-p \fR: specifies the port(s) to be scanned\. A single port can be specified, like \fB\-p80\fR\. A range of ports can be specified, like \fB\-p 20\-25\fR\. A list of ports/ranges can be specified, like \fB\-p80,20\-25\fR\. UDP ports can also be specified, like \fB\-\-ports U:161,U:1024\-1100\fR\. . .IP "\(bu" 4 \fB\-\-banners\fR: specifies that banners should be grabbed, like HTTP server versions, HTML title fields, and so forth\. Only a few protocols are supported\. . .IP "\(bu" 4 \fB\-\-rate \fR: specifies the desired rate for transmitting packets\. This can be very small numbers, like \fB0\.1\fR for transmitting packets at rates of one every 10 seconds, for very large numbers like 10000000, which attempts to transmit at 10 million packets/second\. In my experience, Windows and can do 250 thousand packets per second, and latest versions of Linux can do 2\.5 million packets per second\. The PF_RING driver is needed to get to 25 million packets/second\. . .IP "\(bu" 4 \fB\-c \fR, \fB\-\-conf \fR: reads in a configuration file\. The format of the configuration file is described below\. . .IP "\(bu" 4 \fB\-\-resume \fR: the same as \fB\-\-conf\fR, except that a few options are automatically set, such as \fB\-\-append\-output\fR\. The format of the configuration file is described below\. . .IP "\(bu" 4 \fB\-\-echo\fR: don\'t run, but instead dump the current configuration to a file\. This file can then be used with the \fB\-c\fR option\. The format of this output is described below under \'CONFIGURATION FILE\'\. . .IP "\(bu" 4 \fB\-e \fR, \fB\-\-adapter \fR: use the named raw network interface, such as "eth0" or "dna1"\. If not specified, the first network interface found with a default gateway will be used\. . .IP "\(bu" 4 \fB\-\-adapter\-ip \fR: send packets using this IP address\. If not specified, then the first IP address bound to the network interface will be used\. Instead of a single IP address, a range may be specified\. NOTE: The size of the range must be an even power of 2, such as 1, 2, 4, 8, 16, 1024 etc\. addresses\. . .IP "\(bu" 4 \fB\-\-adapter\-port \fR: send packets using this port number as the source\. If not specified, a random port will be chosen in the range 40000 through 60000\. This port should be filtered by the host firewall (like iptables) to prevent the host network stack from interfering with arriving packets\. Instead of a single port, a range can be specified, like \fB40000\-40003\fR\. NOTE: The size of the range must be an even power of 2, such as the example above that has a total of 4 addresses\. . .IP "\(bu" 4 \fB\-\-adapter\-mac \fR: send packets using this as the source MAC address\. If not specified, then the first MAC address bound to the network interface will be used\. . .IP "\(bu" 4 \fB\-\-router\-mac \fR: send packets to this MAC address as the destination\. If not specified, then the gateway address of the network interface will be ARPed\. . .IP "\(bu" 4 \fB\-\-ping\fR: indicates that the scan should include an ICMP echo request\. This may be included with TCP and UDP scanning\. . .IP "\(bu" 4 \fB\-\-exclude \fR: blacklist an IP address or range, preventing it from being scanned\. This overrides any target specification, guaranteeing that this address/range won\'t be scanned\. This has the same format as the normal target specification\. . .IP "\(bu" 4 \fB\-\-excludefile \fR: reads in a list of exclude ranges, in the same target format described above\. These ranges override any targets, preventing them from being scanned\. . .IP "\(bu" 4 \fB\-\-append\-output\fR: causes output to append to file, rather than overwriting the file\. . .IP "\(bu" 4 \fB\-\-iflist\fR: list the available network interfaces, and then exits\. . .IP "\(bu" 4 \fB\-\-retries\fR: the number of retries to send, at 1 second intervals\. Note that since this scanner is stateless, retries are sent regardless if replies have already been received\. . .IP "\(bu" 4 \fB\-\-nmap\fR: print help aobut nmap\-compatibility alternatives for these options\. . .IP "\(bu" 4 \fB\-\-pcap\-payloads\fR: read packets from a libpcap file containing packets and extract the UDP payloads, and associate those payloads with the destination port\. These payloads will then be used when sending UDP packets with the matching destination port\. Only one payload will be remembered per port\. Similar to \fB\-\-nmap\-payloads\fR\. . .IP "\(bu" 4 \fB\-\-nmap\-payloads \fR: read in a file in the same format as the nmap file \fBnmap\-payloads\fR\. This contains UDP payload, so that we can send useful UDP packets instead of empty ones\. Similar to \fB\-\-pcap\-payloads\fR\. . .IP "\(bu" 4 \fB\-\-http\-user\-agent \fR: replaces the existing user\-agent field with the indicated value when doing HTTP requests\. . .IP "\(bu" 4 \fB\-\-open\-only\fR: report only open ports, not closed ports\. . .IP "\(bu" 4 \fB\-\-pcap \fR: saves received packets (but not transmitted packets) to the libpcap\-format file\. . .IP "\(bu" 4 \fB\-\-packet\-trace\fR: prints a summary of those packets sent and received\. This is useful at low rates, like a few packets per second, but will overwhelm the terminal at high rates\. . .IP "\(bu" 4 \fB\-\-pfring\fR: force the use of the PF_RING driver\. The program will exit if PF_RING DNA drvers are not available\. . .IP "\(bu" 4 \fB\-\-resume\-index\fR: the point in the scan at when it was paused\. . .IP "\(bu" 4 \fB\-\-resume\-count\fR: the maximum number of probes to send before exiting\. This is useful with the \fB\-\-resume\-index\fR to chop up a scan and split it among multiple instances, though the \fB\-\-shards\fR option might be better\. . .IP "\(bu" 4 \fB\-\-shards /\fR: splits the scan among instances\. \fBx\fR is the id for this scan, while \fBy\fR is the total number of instances\. For example, \fB\-\-shards 1/2\fR tells an instance to send every other packet, starting with index 0\. Likewise, \fB\-\-shards 2/2\fR sends every other packet, but starting with index 1, so that it doesn\'t overlap with the first example\. . .IP "\(bu" 4 \fB\-\-rotate