Skip to content

Commit b841427

Browse files
David MaloneyDavid Maloney
authored andcommitted
rescue mysql host blocked
rbmysql can throw an exception if the server blocked this host due to too many connection errors
1 parent 0ccb39c commit b841427

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

lib/metasploit/framework/login_scanner/mysql.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ def attempt_login(credential)
7070
status: Metasploit::Model::Login::Status::INCORRECT,
7171
proof: "Access Denied"
7272
})
73+
rescue RbMysql::HostIsBlocked
74+
result_options.merge!({
75+
status: Metasploit::Model::Login::Status::UNABLE_TO_CONNECT,
76+
proof: "Host blocked"
77+
})
7378
end
7479

7580
unless result_options[:status]

0 commit comments

Comments
 (0)