Nmap resolveall NSE Script
This page contains detailed information about how to use the resolveall NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/resolveall.nse
Script categories: safe, discovery
Target service / protocol: -
Target network port(s): -
List of CVEs: -
Script Description
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.
Resolveall NSE Script Arguments
This is a full list of arguments supported by the resolveall.nse script:
resolveall.hostsTable of hostnames to resolve
max-newtargetsSets the number of the maximum allowed new targets. If set to 0 or less then there is no limit. The default value is 0.
newtargetsIf specified, lets NSE scripts add new targets.
- - -
To use these script arguments, add them to the Nmap command line using the --script-args arg1=value,[arg2=value,..]
syntax. For example:
nmap --script=resolveall --script-args resolveall.hosts=value,max-newtargets=value <target>
Resolveall NSE Script Example Usage
Here's an example of how to use the resolveall.nse script:
nmap --script=resolveall --script-args=newtargets,resolveall.hosts={<host1>, ...} ...
nmap --script=resolveall manyaddresses.example.com
Resolveall NSE Script Example Output
Here's a sample output from the resolveall.nse script:
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
Resolveall NSE Script Example XML Output
Here's a sample XML output from the resolveall.nse script produced by providing the -oX <file>
Nmap option:
<elem key="newtargets">4</elem>
<table key="hosts">
<table key="google.com">
<elem>74.125.39.106</elem>
<elem>74.125.39.147</elem>
<elem>74.125.39.99</elem>
<elem>74.125.39.103</elem>
</table>
</table>
Author
- Kris Katterjohn
References
- https://nmap.org/nsedoc/scripts/resolveall.html
- https://github.com/nmap/nmap/tree/master/scripts/resolveall.nse
See Also
Visit Nmap NSE Library for more scripts.
Version
This page has been created based on Nmap version 7.92.