Skip to content

Commit 8a8d6fb

Browse files
committed
Some more changes
1 parent 855cadc commit 8a8d6fb

File tree

1 file changed

+19
-9
lines changed
  • lib/metasploit/framework/login_scanner

1 file changed

+19
-9
lines changed

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,22 +193,32 @@ def check_setup
193193
# @raise [Rex::ConnectionError] Something has gone wrong while sending the HTTP request
194194
# @return [Rex::Proto::Http::Response] The HTTP response
195195
def send_request(opts)
196+
rhost = opts['host'] || host
197+
rport = opts['rport'] || port
198+
cli_ssl = opts['ssl'] || ssl
199+
cli_ssl_version = opts['ssl_version'] || ssl_version
200+
cli_proxies = opts['proxies'] || proxies
201+
username = opts['username'] || ''
202+
password = opts['password'] || ''
203+
context = opts['context'] || { 'Msf' => framework, 'MsfExploit' => framework_module}
204+
196205
res = nil
197-
cli = Rex::Proto::Http::Client.new(host, port,
198-
{
199-
'Msf' => framework,
200-
'MsfExploit' => framework_module
201-
},
202-
ssl,
203-
ssl_version,
204-
proxies
206+
cli = Rex::Proto::Http::Client.new(
207+
rhost,
208+
rport,
209+
context,
210+
cli_ssl,
211+
cli_ssl_version,
212+
cli_proxies,
213+
username,
214+
password
205215
)
206216
configure_http_client(cli)
207217
begin
208218
cli.connect
209219
req = cli.request_cgi(opts)
210220
res = cli.send_recv(req)
211-
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
221+
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e]
212222
raise Rex::ConnectionError, e.message
213223
ensure
214224
cli.close

0 commit comments

Comments
 (0)