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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user