diff --git a/nmap.cc b/nmap.cc index 80425f841..4bf89d448 100644 --- a/nmap.cc +++ b/nmap.cc @@ -1621,7 +1621,6 @@ int nmap_main(int argc, char *argv[]) { if (!currenths) break; } - o.numhosts_scanned++; if (currenths->flags & HOST_UP && !o.listscan) o.numhosts_up++; diff --git a/scan_engine.cc b/scan_engine.cc index 61092a96d..3315b08b2 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -4873,6 +4873,9 @@ void ultra_scan(vector &Targets, struct scan_lists *ports, } #endif + // Set the variable for status printing + o.numhosts_scanning = Targets.size(); + startTimeOutClocks(Targets); USI = new UltraScanInfo(Targets, ports, scantype); diff --git a/targets.cc b/targets.cc index 449ad72e5..0e1692fed 100644 --- a/targets.cc +++ b/targets.cc @@ -529,6 +529,7 @@ do { goto batchfull; } hs->current_batch_sz++; + o.numhosts_scanned++; } if (hs->current_batch_sz < hs->max_batch_sz &&