1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Don't init payloads for non-udp scans

This commit is contained in:
dmiller
2021-12-12 23:42:37 +00:00
parent ccf0f3af78
commit e20093b16d

View File

@@ -2731,10 +2731,6 @@ void ultra_scan(std::vector<Target *> &Targets, const struct scan_lists *ports,
stype scantype, struct timeout_info *to) {
o.current_scantype = scantype;
/* Load up _all_ payloads into a mapped table. Only needed for raw scans. */
init_payloads();
if (Targets.size() == 0) {
return;
}
@@ -2751,6 +2747,11 @@ void ultra_scan(std::vector<Target *> &Targets, const struct scan_lists *ports,
UltraScanInfo USI(Targets, ports, scantype);
/* Load up _all_ payloads into a mapped table. Only needed for raw scans. */
if (USI.udp_scan) {
init_payloads();
}
if (USI.gstats->numprobes <= 0) {
if (o.debugging) {
log_write(LOG_STDOUT, "Skipping %s: no probes to send\n", scantype2str(scantype));