mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 02:09:03 +00:00
Don't init payloads for non-udp scans
This commit is contained in:
@@ -2731,10 +2731,6 @@ void ultra_scan(std::vector<Target *> &Targets, const struct scan_lists *ports,
|
|||||||
stype scantype, struct timeout_info *to) {
|
stype scantype, struct timeout_info *to) {
|
||||||
o.current_scantype = scantype;
|
o.current_scantype = scantype;
|
||||||
|
|
||||||
/* Load up _all_ payloads into a mapped table. Only needed for raw scans. */
|
|
||||||
|
|
||||||
init_payloads();
|
|
||||||
|
|
||||||
if (Targets.size() == 0) {
|
if (Targets.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2751,6 +2747,11 @@ void ultra_scan(std::vector<Target *> &Targets, const struct scan_lists *ports,
|
|||||||
|
|
||||||
UltraScanInfo USI(Targets, ports, scantype);
|
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 (USI.gstats->numprobes <= 0) {
|
||||||
if (o.debugging) {
|
if (o.debugging) {
|
||||||
log_write(LOG_STDOUT, "Skipping %s: no probes to send\n", scantype2str(scantype));
|
log_write(LOG_STDOUT, "Skipping %s: no probes to send\n", scantype2str(scantype));
|
||||||
|
|||||||
Reference in New Issue
Block a user