mirror of
https://github.com/nmap/nmap.git
synced 2026-06-09 17:22:26 +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:
parent
8366c90893
commit
5fa53d064a
2 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue