Use HttpClientTimeout
parent
c29bb35e28
commit
e0d9ee062f
|
@ -53,7 +53,7 @@ module Exploit::Remote::HttpClient
|
|||
OptEnum.new('SSLVersion', [ false, 'Specify the version of SSL that should be used', 'Auto', ['Auto', 'SSL2', 'SSL3', 'TLS1']]),
|
||||
OptBool.new('FingerprintCheck', [ false, 'Conduct a pre-exploit fingerprint verification', true]),
|
||||
OptString.new('DOMAIN', [ true, 'The domain to use for windows authentification', 'WORKSTATION']),
|
||||
OptInt.new('HttpRequestTimeout', [false, 'HTTP connection and receive timeout', 20])
|
||||
OptInt.new('HttpClientTimeout', [false, 'HTTP connection and receive timeout', 20])
|
||||
], self.class
|
||||
)
|
||||
|
||||
|
@ -308,7 +308,7 @@ module Exploit::Remote::HttpClient
|
|||
# Passes +opts+ through directly to Rex::Proto::Http::Client#request_raw.
|
||||
#
|
||||
def send_request_raw(opts={}, timeout = 20)
|
||||
actual_timeout = datastore['HttpRequestTimeout'] || opts[:timeout] || timeout
|
||||
actual_timeout = datastore['HttpClientTimeout'] || opts[:timeout] || timeout
|
||||
begin
|
||||
c = connect(opts)
|
||||
r = c.request_raw(opts)
|
||||
|
@ -325,7 +325,7 @@ module Exploit::Remote::HttpClient
|
|||
# Passes +opts+ through directly to Rex::Proto::Http::Client#request_cgi.
|
||||
#
|
||||
def send_request_cgi(opts={}, timeout = 20)
|
||||
actual_timeout = datastore['HttpRequestTimeout'] || opts[:timeout] || timeout
|
||||
actual_timeout = datastore['HttpClientTimeout'] || opts[:timeout] || timeout
|
||||
begin
|
||||
c = connect(opts)
|
||||
r = c.request_cgi(opts)
|
||||
|
@ -344,7 +344,7 @@ module Exploit::Remote::HttpClient
|
|||
# will contain the full URI.
|
||||
#
|
||||
def send_request_cgi!(opts={}, timeout = 20, redirect_depth = 1)
|
||||
actual_timeout = datastore['HttpRequestTimeout'] || opts[:timeout] || timeout
|
||||
actual_timeout = datastore['HttpClientTimeout'] || opts[:timeout] || timeout
|
||||
res = send_request_cgi(opts, actual_timeout)
|
||||
return res unless res && res.redirect? && redirect_depth > 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue