1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-28 10:29:03 +00:00

Fix timeout handling for broadcast-listener

Documentation says broadcast-listener.timeout takes a time spec (s, m,
h), but it only took seconds. Now it obeys its own documentation.
This commit is contained in:
dmiller
2013-03-04 22:16:42 +00:00
parent 76307e992b
commit 6cb76e801f

View File

@@ -134,7 +134,7 @@ end
sniffInterface = function(iface, Decoders, decodertab)
local condvar = nmap.condvar(decodertab)
local sock = nmap.new_socket()
local timeout = tonumber(stdnse.get_script_args("broadcast-listener.timeout"))
local timeout = stdnse.parse_timespec(stdnse.get_script_args("broadcast-listener.timeout"))
-- default to 30 seconds, if nothing else was set
timeout = timeout and (timeout * 1000) or (30 * 1000)