Skip to content

Commit e0d9ee0

Browse files
committed
Use HttpClientTimeout
1 parent c29bb35 commit e0d9ee0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/msf/core/exploit/http/client.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def initialize(info = {})
5353
OptEnum.new('SSLVersion', [ false, 'Specify the version of SSL that should be used', 'Auto', ['Auto', 'SSL2', 'SSL3', 'TLS1']]),
5454
OptBool.new('FingerprintCheck', [ false, 'Conduct a pre-exploit fingerprint verification', true]),
5555
OptString.new('DOMAIN', [ true, 'The domain to use for windows authentification', 'WORKSTATION']),
56-
OptInt.new('HttpRequestTimeout', [false, 'HTTP connection and receive timeout', 20])
56+
OptInt.new('HttpClientTimeout', [false, 'HTTP connection and receive timeout', 20])
5757
], self.class
5858
)
5959

@@ -308,7 +308,7 @@ def cleanup
308308
# Passes +opts+ through directly to Rex::Proto::Http::Client#request_raw.
309309
#
310310
def send_request_raw(opts={}, timeout = 20)
311-
actual_timeout = datastore['HttpRequestTimeout'] || opts[:timeout] || timeout
311+
actual_timeout = datastore['HttpClientTimeout'] || opts[:timeout] || timeout
312312
begin
313313
c = connect(opts)
314314
r = c.request_raw(opts)
@@ -325,7 +325,7 @@ def send_request_raw(opts={}, timeout = 20)
325325
# Passes +opts+ through directly to Rex::Proto::Http::Client#request_cgi.
326326
#
327327
def send_request_cgi(opts={}, timeout = 20)
328-
actual_timeout = datastore['HttpRequestTimeout'] || opts[:timeout] || timeout
328+
actual_timeout = datastore['HttpClientTimeout'] || opts[:timeout] || timeout
329329
begin
330330
c = connect(opts)
331331
r = c.request_cgi(opts)
@@ -344,7 +344,7 @@ def send_request_cgi(opts={}, timeout = 20)
344344
# will contain the full URI.
345345
#
346346
def send_request_cgi!(opts={}, timeout = 20, redirect_depth = 1)
347-
actual_timeout = datastore['HttpRequestTimeout'] || opts[:timeout] || timeout
347+
actual_timeout = datastore['HttpClientTimeout'] || opts[:timeout] || timeout
348348
res = send_request_cgi(opts, actual_timeout)
349349
return res unless res && res.redirect? && redirect_depth > 0
350350

0 commit comments

Comments
 (0)