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

Normalize some timeouts in scripts

Added use of stdnse.parse_timespec for timeout args. Used comm.lua
default timeouts in a couple cases. Corrected 2 cases of incorrect
documentation ("Default 60" when the default was 30 seconds).
This commit is contained in:
dmiller
2014-09-20 05:40:46 +00:00
parent 5db940fc70
commit bf457ee12c
5 changed files with 13 additions and 23 deletions

View File

@@ -52,7 +52,7 @@ action = function(host, port)
local result = {}
-- Set timeout
local timeout = tonumber(nmap.registry.args[SCRIPT_NAME .. '.timeout'])
local timeout = stdnse.parse_timespec(stdnse.get_script_args(SCRIPT_NAME .. ".timeout"))
if not timeout or timeout < 0 then timeout = 10 end
-- Set bytes