Skip to content

Commit

Permalink
Land #5019, add rescues to some LoginScanners
Browse files Browse the repository at this point in the history
  • Loading branch information
Tod Beardsley committed Mar 30, 2015
2 parents b770f8d + 103373a commit 3f0f659
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/metasploit/framework/login_scanner/chef_webui.rb
Expand Up @@ -29,7 +29,7 @@ def attempt_login(credential)
begin
status = try_login(credential)
result_opts.merge!(status)
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error => e
rescue ::EOFError, Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit/framework/login_scanner/gitlab.rb
Expand Up @@ -83,7 +83,7 @@ def attempt_login(credential)
else
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: res)
end
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
rescue ::EOFError, Errno::ETIMEDOUT ,Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
ensure
cli.close
Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit/framework/login_scanner/glassfish.rb
Expand Up @@ -183,7 +183,7 @@ def attempt_login(credential)
status = try_glassfish_3(credential)
result_opts.merge!(status)
end
rescue ::EOFError, Rex::ConnectionError, ::Timeout::Error => e
rescue ::EOFError, Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit/framework/login_scanner/http.rb
Expand Up @@ -231,7 +231,7 @@ def send_request(opts)
cli.connect
req = cli.request_cgi(opts)
res = cli.send_recv(req)
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
rescue ::EOFError, Errno::ETIMEDOUT ,Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
raise Rex::ConnectionError, e.message
ensure
cli.close
Expand Down
2 changes: 1 addition & 1 deletion lib/metasploit/framework/login_scanner/jenkins.rb
Expand Up @@ -50,7 +50,7 @@ def attempt_login(credential)
else
result_opts.merge!(status: Metasploit::Model::Login::Status::INCORRECT, proof: res)
end
rescue ::EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error => e
rescue ::EOFError, Errno::ETIMEDOUT ,Errno::ECONNRESET, Rex::ConnectionError, OpenSSL::SSL::SSLError, ::Timeout::Error => e
result_opts.merge!(status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT, proof: e)
end
Result.new(result_opts)
Expand Down

0 comments on commit 3f0f659

Please sign in to comment.