mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Patch to firewalk.nse from Henri Doreau; avoids an error when giving a
timespec.
This commit is contained in:
parent
19352635ed
commit
53d71389da
1 changed files with 12 additions and 12 deletions
|
|
@ -337,6 +337,18 @@ local function setregs(host, ports)
|
|||
|
||||
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 @@ local function generate_initial_probes(scanner)
|
|||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue