mirror of
https://github.com/nmap/nmap.git
synced 2025-12-23 07:59:03 +00:00
ultrascan: bail early if there are no probes in the current scan
This shouldn't ever happen, but it currently does for host discovery scans using -PR where the target is not directly connected. See #1361
This commit is contained in:
@@ -2730,6 +2730,13 @@ void ultra_scan(std::vector<Target *> &Targets, struct scan_lists *ports,
|
||||
|
||||
UltraScanInfo USI(Targets, ports, scantype);
|
||||
|
||||
if (USI.gstats->numprobes <= 0) {
|
||||
if (o.debugging) {
|
||||
log_write(LOG_STDOUT, "Skipping %s: no probes to send\n", scantype2str(scantype));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Use the requested timeouts. */
|
||||
if (to != NULL)
|
||||
USI.gstats->to = *to;
|
||||
|
||||
Reference in New Issue
Block a user