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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user