mirror of
https://github.com/nmap/nmap.git
synced 2025-12-17 05:09:00 +00:00
Fix an embarrassing error: In nmap-perf I had moved the bit of code that
increases the scan dealy with an increase in max_successful_tryno. When I reverted a bunch of changes in r11651, I removed the moved code, leaving the scan delay increase nowhere. This puts it back in ultrascan_port_probe_update where it was before.
This commit is contained in:
@@ -2699,9 +2699,25 @@ static void ultrascan_port_probe_update(UltraScanInfo *USI, HostScanStats *hss,
|
|||||||
adjust_ping = false;
|
adjust_ping = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adjust_timing)
|
if (adjust_timing) {
|
||||||
ultrascan_adjust_timing(USI, hss, probe, rcvdtime);
|
ultrascan_adjust_timing(USI, hss, probe, rcvdtime);
|
||||||
|
|
||||||
|
if (rcvdtime != NULL && probe->tryno > hss->max_successful_tryno) {
|
||||||
|
/* We got a positive response to a higher tryno than we've seen so far. */
|
||||||
|
hss->max_successful_tryno = probe->tryno;
|
||||||
|
if (o.debugging)
|
||||||
|
log_write(LOG_STDOUT, "Increased max_successful_tryno for %s to %d (packet drop)\n", hss->target->targetipstr(), hss->max_successful_tryno);
|
||||||
|
if (hss->max_successful_tryno > ((o.timing_level >= 4)? 4 : 3)) {
|
||||||
|
unsigned int olddelay = hss->sdn.delayms;
|
||||||
|
hss->boostScanDelay();
|
||||||
|
if (o.verbose && hss->sdn.delayms != olddelay)
|
||||||
|
log_write(LOG_STDOUT, "Increasing send delay for %s from %d to %d due to max_successful_tryno increase to %d\n",
|
||||||
|
hss->target->targetipstr(), olddelay, hss->sdn.delayms,
|
||||||
|
hss->max_successful_tryno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* If this probe received a positive response, consider making it the new
|
/* If this probe received a positive response, consider making it the new
|
||||||
timing ping probe. */
|
timing ping probe. */
|
||||||
if (rcvdtime != NULL && adjust_ping
|
if (rcvdtime != NULL && adjust_ping
|
||||||
|
|||||||
Reference in New Issue
Block a user