From 6cb76e801fd5ec6d68806fcc4a58ae390a3de006 Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 4 Mar 2013 22:16:42 +0000 Subject: [PATCH] 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. --- scripts/broadcast-listener.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/broadcast-listener.nse b/scripts/broadcast-listener.nse index 303bcf660..4b4fe2df3 100644 --- a/scripts/broadcast-listener.nse +++ b/scripts/broadcast-listener.nse @@ -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)