1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 05:39:01 +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

@@ -21,7 +21,7 @@ Performs brute force password auditing against the classic UNIX rexec (remote ex
-- | Statistics
-- |_ Performed 16 guesses in 7 seconds, average tps: 2
--
-- @args rexec-brute.timeout number
-- @args rexec-brute.timeout socket timeout for connecting to rexec (default 10s)
-- Version 0.1
-- Created 11/02/2011 - v0.1 - created by Patrik Karlsson <patrik@cqure.net>
@@ -85,16 +85,14 @@ Driver = {
}
local arg_timeout = stdnse.parse_timespec(stdnse.get_script_args(SCRIPT_NAME .. ".timeout"))
arg_timeout = (arg_timeout or 10) * 1000
action = function(host, port)
local options = {
timeout = stdnse.get_script_args("rexec-brute.timeout")
timeout = arg_timeout
}
options.timeout = options.timeout and
tonumber(options.timeout) * 1000 or
10000
local engine = brute.Engine:new(Driver, host, port, options)
engine.options.script_name = SCRIPT_NAME
local status, result = engine:start()