mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Don't use 1ms timeout for writes. Actual time can be >100ms because of NSE overhead
This commit is contained in:
@@ -32,7 +32,7 @@ local arg_timeout = stdnse.parse_timespec(stdnse.get_script_args(SCRIPT_NAME ..
|
|||||||
action = function()
|
action = function()
|
||||||
|
|
||||||
local host, port = { ip = "255.255.255.255" }, { number = 177, protocol = "udp" }
|
local host, port = { ip = "255.255.255.255" }, { number = 177, protocol = "udp" }
|
||||||
local options = { timeout = 1 }
|
local options = { timeout = 500 } -- milliseconds
|
||||||
local helper = xdmcp.Helper:new(host, port, options)
|
local helper = xdmcp.Helper:new(host, port, options)
|
||||||
local status = helper:connect()
|
local status = helper:connect()
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ action = function()
|
|||||||
return false, err
|
return false, err
|
||||||
end
|
end
|
||||||
|
|
||||||
local timeout = arg_timeout or 5
|
local timeout = arg_timeout or 5 -- seconds
|
||||||
local start = os.time()
|
local start = os.time()
|
||||||
local result = {}
|
local result = {}
|
||||||
repeat
|
repeat
|
||||||
|
|||||||
Reference in New Issue
Block a user