mirror of
https://github.com/nmap/nmap.git
synced 2026-01-30 10:09:03 +00:00
Corrects a unit-of-measure mismatch between the desired packet delay and
an observed roundtrip time. Closes #1038, closes #1037.
This commit is contained in:
@@ -484,12 +484,9 @@ action = function(host)
|
||||
|
||||
-- Unlike qscan.cc which loops around while waiting for
|
||||
-- the delay, I just sleep here (depending on rtt)
|
||||
if rtt < (3 * delay) / 2 then
|
||||
if rtt < (delay / 2) then
|
||||
stdnse.sleep(((delay / 2) + math.random(0, delay) - rtt))
|
||||
else
|
||||
stdnse.sleep(math.random((3 * delay) / 2 - rtt))
|
||||
end
|
||||
local sleep = delay * (0.5 + math.random()) - rtt / 1000000
|
||||
if sleep > 0 then
|
||||
stdnse.sleep(sleep)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user