mirror of
https://github.com/nmap/nmap.git
synced 2025-12-16 04:39:03 +00:00
Fixed a global access for 'opts' using check_globals script.
This commit is contained in:
@@ -303,6 +303,7 @@ end
|
|||||||
-- * <code>header</code>: A table containing additional headers to be used for the request.
|
-- * <code>header</code>: A table containing additional headers to be used for the request.
|
||||||
-- * <code>content</code>: The content of the message (content-length will be added -- set header['Content-Length'] to override)
|
-- * <code>content</code>: The content of the message (content-length will be added -- set header['Content-Length'] to override)
|
||||||
request = function( host, port, data, options )
|
request = function( host, port, data, options )
|
||||||
|
local opts
|
||||||
options = options or {}
|
options = options or {}
|
||||||
|
|
||||||
if type(host) == 'table' then
|
if type(host) == 'table' then
|
||||||
@@ -330,10 +331,10 @@ request = function( host, port, data, options )
|
|||||||
end
|
end
|
||||||
|
|
||||||
if options.timeout then
|
if options.timeout then
|
||||||
local opts = {timeout=options.timeout, recv_before=false}
|
opts = {timeout=options.timeout, recv_before=false}
|
||||||
else
|
else
|
||||||
local df_timeout = get_default_timeout( nmap.timing_level() )
|
local df_timeout = get_default_timeout( nmap.timing_level() )
|
||||||
local opts = {connect_timeout=df_timeout.connect, request_timeout = df_timeout.request, recv_before=false}
|
opts = {connect_timeout=df_timeout.connect, request_timeout = df_timeout.request, recv_before=false}
|
||||||
end
|
end
|
||||||
|
|
||||||
local response = {}
|
local response = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user