1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 13:49:03 +00:00

Only print the first warning that a name resolves to multiple addresses

(the one that happens right after then name is resolved) with -vv. That
information is also printed out above the ports table later.
This commit is contained in:
david
2009-10-27 06:16:22 +00:00
parent 398e53b3de
commit bf29b139bd

View File

@@ -227,7 +227,7 @@ int TargetGroup::parse_expr(const char * const target_expr, int af) {
count++;
}
if (count > 1)
if (count > 1 && o.verbose > 1)
error("Warning: Hostname %s resolves to %d IPs. Using %s.", target_net, count, inet_ntoa(*((struct in_addr *)target->h_addr_list[0])));
} else {
error("Failed to resolve given hostname/IP: %s. Note that you can't use '/mask' AND '1-4,7,100-' style IP ranges", target_net);