Commit 124a9452 authored by robertdavidgraham's avatar robertdavidgraham
Browse files

resume sharding

parent dc9fd1bb
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -230,6 +230,25 @@ Let\'s say that you want to scan the entire Internet and spread the scan across
.
.IP "" 0
.
.P
An alternative is with the "resume" feature\. A scan has an internal index that goes from zero to the number of ports times then number of IP addresses\. The following example shows splitting up a scan into chunks of a 1000 items each:
.
.IP "" 4
.
.nf

# masscan 0\.0\.0\.0/0 \-p0\-65535 \-\-resume\-index 0 \-\-resume\-count 1000
# masscan 0\.0\.0\.0/0 \-p0\-65535 \-\-resume\-index 1000 \-\-resume\-count 1000
# masscan 0\.0\.0\.0/0 \-p0\-65535 \-\-resume\-index 2000 \-\-resume\-count 1000
# masscan 0\.0\.0\.0/0 \-p0\-65535 \-\-resume\-index 3000 \-\-resume\-count 1000
.
.fi
.
.IP "" 0
.
.P
A script can use this to split smaller tasks across many other machines, such as Amazon EC2 instances\. As each instance completes a job, the script might send a request to a central coordinating server for more work\.
.
.SH "SPURIOUS RESETS"
When scanning TCP using the default IP address of your adapter, the built\-in stack will generate RST packets\. This will prevent banner grabbing\. There are are two ways to solve this\. The first way is to create a firewall rule to block that port from being seen by the stack\. How this works is dependent on the operating system, but on Linux this looks something like:
.
+15 −0
Original line number Diff line number Diff line
@@ -264,6 +264,21 @@ using the following command-lines:
	# masscan 0.0.0.0/0 -p0-65535 --shard 2/3
	# masscan 0.0.0.0/0 -p0-65535 --shard 3/3

An alternative is with the "resume" feature. A scan has an internal index that
goes from zero to the number of ports times then number of IP addresses. The
following example shows splitting up a scan into chunks of a 1000 items each:

	# masscan 0.0.0.0/0 -p0-65535 --resume-index 0 --resume-count 1000
	# masscan 0.0.0.0/0 -p0-65535 --resume-index 1000 --resume-count 1000
	# masscan 0.0.0.0/0 -p0-65535 --resume-index 2000 --resume-count 1000
	# masscan 0.0.0.0/0 -p0-65535 --resume-index 3000 --resume-count 1000

A script can use this to split smaller tasks across many other machines,
such as Amazon EC2 instances. As each instance completes a job, the
script might send a request to a central coordinating server for more 
work.

    
## SPURIOUS RESETS

When scanning TCP using the default IP address of your adapter, the built-in