rapid7/metasploit-framework — pull request #2906 by wchen-r7 (2014-01-23 06:53:20+00:00)
Title: Add support to scan a range of IPs for the check command

This allows the check command to scan multiple hosts. It is related to the following redmine ticket:
http://dev.metasploit.com/redmine/issues/8737

It is also related to these pull requests: #2894, #2896, and #2905. They're all part of the feature package.

### Basic Usage Example:

```
msf> use exploit/windows/smb/ms08_067_netapi
msf exploit(ms08_067_netapi) > check 192.168.0.0/24
```

### Verification 1: Make sure an exploit check can scan multiple hosts:

- [ ] Start up msfconsole
- [ ] Use the ms08-067 module for testing: ```use exploit/windows/smb/ms08_067_netapi```
- [ ] Supply an IP range: ```check [IP range]```
- [ ] Confirm that the module is indeed scanning a range of hosts.

### Verification 2: Make sure msfconsole remembers the last RHOST datastore option if previously specified:

- [ ] Start up msfconsole
- [ ] Use the ms08-067 module for testing: ```use exploit/windows/smb/ms08_067_netapi```
- [ ] Set a fake RHOST: ```set RHOST [IP]```
- [ ] Supply an IP range: ```check [IP range]```
- [ ] Press [Ctrl]+[C] to abort the scan.
- [ ] Enter ```show options```
- [ ] Confirm that the RHOST option is the same one you set.

### Verification 3: Make sure msfconsole can still scan a single host:

- [ ] Start up msfconsole
- [ ] Use the ms08-067 module for testing: ```use exploit/windows/smb/ms08_067_netapi```
- [ ] ```set RHOST [IP]```
- [ ] ```check```
- [ ] Confirm that it's scanning the IP you want

### Verification 4: Make sure the same feature works for an auxiliary module:

- [ ] Make sure you have a fake web server for testing for this. For example: ```ruby -run -e httpd . -p 8181```
- [ ] Do ```use auxiliary/dos/http/nodejs_pipelining```
- [ ] Do ```check [IP]```
- [ ] Confirm that the check works

Note: Without the #2905 patch, you will see a lot of output while scanning multiple IPs. This is normal.