mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 13:49: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:
@@ -1,5 +1,8 @@
|
||||
#s wa Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [NSE][GH#1038][GH#1037] Script qscan was not observing interpacket delays
|
||||
(parameter qscan.delay). [nnposter]
|
||||
|
||||
o [NSE][GH#1046] Script http-headers now fails properly if the target does not
|
||||
return a valid HTTP response. [spacewander]
|
||||
|
||||
|
||||
@@ -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