1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 13:19:04 +00:00

Update timeout script-args to use standard timespec

Many scripts were documented as using timespecs (10s, 5000ms, etc) for
timeout script-args, but one 1 or 2 actually did. Now all timeout
script-args will accept timespecs, except those which took a number of
milliseconds, which remain unchanged.

Also fixed some documentation issues (missing script name in arg
description, missing nsedoc for args, etc)
This commit is contained in:
dmiller
2013-03-05 21:34:25 +00:00
parent 3150d2fff6
commit fdb0f775e2
32 changed files with 113 additions and 108 deletions

View File

@@ -137,11 +137,8 @@ end
action = function()
local host, port = "255.255.255.255", 67
local timeout = stdnse.get_script_args("broadcast-dhcp-discover.timeout")
timeout = tonumber(timeout) or 10
-- convert from seconds to ms
timeout = timeout * 1000
local timeout = stdnse.parse_timespec(stdnse.get_script_args("broadcast-dhcp-discover.timeout"))
timeout = (timeout or 10) * 1000
-- randomizing the MAC could exhaust dhcp servers with small scopes
-- if ran multiple times, so we should probably refrain from doing