Skip to content

Commit 4316d52

Browse files
committed
trim exception list
1 parent a511729 commit 4316d52

File tree

1 file changed

+5
-2
lines changed
  • lib/metasploit/framework/login_scanner

1 file changed

+5
-2
lines changed

lib/metasploit/framework/login_scanner/base.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ def scan!
251251
break if total_error_count >= 10
252252
end
253253
end
254-
rescue Rex::ConnectionRefused, Rex::SocketError, Rex::HostCommunicationError, Rex::ConnectionError, Rex::TimeoutError, OpenSSL::Cipher::CipherError, Rex::ConnectionProxyError, Errno::ECONNRESET, Errno::EINTR, Errno::EPIPE, ::SystemCallError, ::EOFError, Errno::ENOTCONN, ::Timeout::Error, Rex::Proto::Kerberos::Model::Error::KerberosEncryptionNotSupported, ::JSON::ParserError, Errno::ECONNRESET, OpenSSL::SSL::SSLError, Rex::StreamClosedError, ::Rex::Proto::Kerberos::Model::Error::KerberosError, Errno::ETIMEDOUT => e
255-
framework_module.print_error("Error, scan may not produce results: #{e.message}")
254+
rescue => e
255+
if framework_module
256+
prefix = framework_module.respond_to?(:peer) ? "#{framework_module.peer} - LOGIN FAILED:" : "LOGIN FAILED:"
257+
framework_module.print_warning("#{prefix} #{credential.to_h} - Unhandled error - scan may not produce correct results: #{e.message} - #{e.backtrace}")
258+
end
256259
elog("Scan Error: #{e.message}", error: e)
257260
consecutive_error_count += 1
258261
total_error_count += 1

0 commit comments

Comments
 (0)