Nmap can accomplish something like this with the resolveall
NSE script. It needs the newtargets
script argument to be set in order to actually add the other addresses to the scan queue instead of only listing them. So your solution would be:
nmap --script resolveall --script-args newtargets -p25 rr-test.jacobdevans.com
This will work for a name that has multiple A (or AAAA, with the -6
option) records, all of which are returned in response to a single query. Round-robin DNS can be implemented by returning a single A record from a pool in response to each query; the resolveall
script will not be able to detect this, since it only sends one query.
EDIT: I forgot that this is a new feature in Nmap 7.40, so earlier versions won't work the same way. For those versions (back to version 5.50) you need to use this syntax:
nmap --script resolveall --script-args "newtargets,resolveall.hosts={rr-test.jacobdevans.com}" -p25