Skip to content

Commit c795cef

Browse files
committed
Land rapid7#9099, disconnect option for send_request_cgi
2 parents 1319175 + a3912e4 commit c795cef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def send_request_raw(opts={}, timeout = 20)
334334
# Passes `opts` through directly to {Rex::Proto::Http::Client#request_cgi}.
335335
#
336336
# @return (see Rex::Proto::Http::Client#send_recv))
337-
def send_request_cgi(opts={}, timeout = 20)
337+
def send_request_cgi(opts={}, timeout = 20, disconnect = true)
338338
if datastore['HttpClientTimeout'] && datastore['HttpClientTimeout'] > 0
339339
actual_timeout = datastore['HttpClientTimeout']
340340
else
@@ -362,7 +362,7 @@ def send_request_cgi(opts={}, timeout = 20)
362362
print_line('#' * 20)
363363
print_line(res.to_terminal_output)
364364
end
365-
disconnect(c)
365+
disconnect(c) if disconnect
366366
res
367367
rescue ::Errno::EPIPE, ::Timeout::Error => e
368368
print_line(e.message) if datastore['HttpTrace']

0 commit comments

Comments
 (0)