Index: firewalk.nse =================================================================== --- firewalk.nse (revision 22344) +++ firewalk.nse (working copy) @@ -337,6 +337,18 @@ end +--- wrapper for stdnse.parse_timespec() to get specified value in milliseconds +-- @param spec the time specification string (like "10s", "120ms"...) +-- @return the equivalent number of milliseconds or nil on failure +local function parse_timespec_ms(spec) + local t = stdnse.parse_timespec(spec) + if t then + return t * 1000 + else + return nil + end +end + --- set scan parameters using user values if specified or defaults otherwise local function getopts() @@ -804,18 +816,6 @@ end end ---- wrapper for stdnse.parse_timespec() to get specified value in milliseconds --- @param spec the time specification string (like "10s", "120ms"...) --- @return the equivalent number of milliseconds or nil on failure -local function parse_timespec_ms(spec) - local t = stdnse.parse_timespec(spec) - if t then - return t * 1000 - else - return nil - end -end - --- firewalk entry point action = function(host) local saddr = packet.toip(host.bin_ip_src)