mirror of
https://github.com/nmap/nmap.git
synced 2026-08-03 22:29:06 +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:
parent
76307e992b
commit
6cb76e801f
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue