1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 12:19:02 +00:00

Patch to firewalk.nse from Henri Doreau; avoids an error when giving a

timespec.
This commit is contained in:
david
2011-02-23 02:34:47 +00:00
parent 19352635ed
commit 53d71389da

View File

@@ -337,6 +337,18 @@ local function setregs(host, ports)
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
--- set scan parameters using user values if specified or defaults otherwise --- set scan parameters using user values if specified or defaults otherwise
local function getopts() local function getopts()
@@ -804,18 +816,6 @@ local function generate_initial_probes(scanner)
end end
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 --- firewalk entry point
action = function(host) action = function(host)
local saddr = packet.toip(host.bin_ip_src) local saddr = packet.toip(host.bin_ip_src)