Skip to content

Commit 3f0f659

Browse files
author
Tod Beardsley
committed
Land rapid7#5019, add rescues to some LoginScanners
2 parents b770f8d + 103373a commit 3f0f659

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/metasploit/framework/login_scanner/chef_webui.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def attempt_login(credential)
2929
begin
3030
status = try_login(credential)
3131
result_opts.merge!(status)
32-
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error => e
32+
rescue ::EOFError, Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
3333
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
3434
end
3535

lib/metasploit/framework/login_scanner/gitlab.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def attempt_login(credential)
8383
else
8484
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: res)
8585
end
86-
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
86+
rescue ::EOFError, Errno::ETIMEDOUT ,Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
8787
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
8888
ensure
8989
cli.close

lib/metasploit/framework/login_scanner/glassfish.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def attempt_login(credential)
183183
status = try_glassfish_3(credential)
184184
result_opts.merge!(status)
185185
end
186-
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error => e
186+
rescue ::EOFError, Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
187187
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
188188
end
189189

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def send_request(opts)
231231
cli.connect
232232
req = cli.request_cgi(opts)
233233
res = cli.send_recv(req)
234-
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
234+
rescue ::EOFError, Errno::ETIMEDOUT ,Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
235235
raise Rex::ConnectionError, e.message
236236
ensure
237237
cli.close

lib/metasploit/framework/login_scanner/jenkins.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def attempt_login(credential)
5050
else
5151
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: res)
5252
end
53-
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
53+
rescue ::EOFError, Errno::ETIMEDOUT ,Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
5454
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
5555
end
5656
Result.new(result_opts)

0 commit comments

Comments
 (0)