From 6753d2efdd0df1a9275b6f130e9cf011c69fcb74 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 20 Feb 2020 16:35:22 +0000 Subject: [PATCH] Report actual number of hosts being resolved. Fixes #1918 --- nmap_dns.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nmap_dns.cc b/nmap_dns.cc index 8ab73c217..cc6144549 100644 --- a/nmap_dns.cc +++ b/nmap_dns.cc @@ -1204,7 +1204,7 @@ static void nmap_mass_rdns_core(Target **targets, int num_targets) { read_timeout_index = MIN(sizeof(read_timeouts)/sizeof(read_timeouts[0]), servs.size()) - 1; - Snprintf(spmobuf, sizeof(spmobuf), "Parallel DNS resolution of %d host%s.", num_targets, num_targets-1 ? "s" : ""); + Snprintf(spmobuf, sizeof(spmobuf), "Parallel DNS resolution of %d host%s.", stat_actual, stat_actual-1 ? "s" : ""); SPM = new ScanProgressMeter(spmobuf); while (total_reqs > 0) { @@ -1281,7 +1281,7 @@ static void nmap_system_rdns_core(Target **targets, int num_targets) { if (((currenths->flags & HOST_UP) || o.always_resolve) && !o.noresolve) stat_actual++; } - Snprintf(spmobuf, sizeof(spmobuf), "System DNS resolution of %d host%s.", num_targets, num_targets-1 ? "s" : ""); + Snprintf(spmobuf, sizeof(spmobuf), "System DNS resolution of %d host%s.", stat_actual, stat_actual-1 ? "s" : ""); SPM = new ScanProgressMeter(spmobuf); for(i=0, hostI = targets; hostI < targets+num_targets; hostI++, i++) {