Script resolveall

Script types:
Categories: safe, discovery
Download: https://svn.nmap.org/nmap/scripts/resolveall.nse

Script Summary

NOTE: This script has been replaced by the --resolve-all command-line option in Nmap 7.70

Resolves hostnames and adds every address (IPv4 or IPv6, depending on Nmap mode) to Nmap's target list. This differs from Nmap's normal host resolution process, which only scans the first address (A or AAAA record) returned for each host name.

The script will run on any target provided by hostname. It can also be fed hostnames via the resolveall.hosts argument. Because it adds new targets by IP address it will not run recursively, since those new targets were not provided by hostname. It will also not add the same IP that was initially chosen for scanning by Nmap.

Script Arguments

resolveall.hosts

Table of hostnames to resolve

max-newtargets, newtargets

See the documentation for the target library.

Example Usage

nmap --script=resolveall --script-args=newtargets,resolveall.hosts={<host1>, ...} ...
nmap --script=resolveall manyaddresses.example.com

Script Output

Pre-scan script results:
| resolveall:
|   Host 'google.com' resolves to:
|     74.125.39.106
|     74.125.39.147
|     74.125.39.99
|     74.125.39.103
|     74.125.39.105
|     74.125.39.104
|_  Successfully added 6 new targets
Host script results:
| resolveall:
|   Host 'chat.freenode.net' also resolves to:
|     94.125.182.252
|     185.30.166.37
|     162.213.39.42
|     193.10.255.100
|     139.162.227.51
|     195.154.200.232
|     164.132.77.237
|     185.30.166.38
|     130.185.232.126
|     38.229.70.22
|_  Successfully added 10 new targets

Requires


Author:

  • Kris Katterjohn

License: Same as Nmap--See https://nmap.org/book/man-legal.html