From 0bae6114944dc46f26e39b958a072cb6bd2547e0 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 8 Oct 2024 21:14:40 +0000 Subject: [PATCH] Don't use 1ms timeout for writes. Actual time can be >100ms because of NSE overhead --- scripts/broadcast-xdmcp-discover.nse | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/broadcast-xdmcp-discover.nse b/scripts/broadcast-xdmcp-discover.nse index c557bdb04..fd5f023b6 100644 --- a/scripts/broadcast-xdmcp-discover.nse +++ b/scripts/broadcast-xdmcp-discover.nse @@ -32,7 +32,7 @@ local arg_timeout = stdnse.parse_timespec(stdnse.get_script_args(SCRIPT_NAME .. action = function() 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 status = helper:connect() @@ -42,7 +42,7 @@ action = function() return false, err end - local timeout = arg_timeout or 5 + local timeout = arg_timeout or 5 -- seconds local start = os.time() local result = {} repeat