mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Don't init payloads for non-udp scans
This commit is contained in:
parent
ccf0f3af78
commit
e20093b16d
1 changed files with 5 additions and 4 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue