Make the MySQL aux scanner a little more helpful in the event of a missing target.

git-svn-id: file:///home/svn/framework3/trunk@11094 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2010-11-22 14:12:35 +00:00
parent 14e147c931
commit 80853f0e10
1 changed files with 16 additions and 8 deletions

View File

@ -31,14 +31,22 @@ class Metasploit3 < Msf::Auxiliary
))
end
def target
[rhost,rport].join(":")
end
def run_host(ip)
begin
if mysql_version_check("4.1.1") # Pushing down to 4.1.1.
each_user_pass { |user, pass|
do_login(user, pass)
}
else
print_error "#{rhost}:#{rport} - Unsupported target version of MySQL detected. Skipping."
print_error "#{target} - Unsupported target version of MySQL detected. Skipping."
end
rescue ::Rex::ConnectionError, ::EOFError => e
print_error "#{target} - Unable to connect: #{e.to_s}"
end
end
@ -52,8 +60,8 @@ class Metasploit3 < Msf::Auxiliary
s = connect(false)
data = s.get
disconnect(s)
rescue ::Rex::ConnectionError, ::EOFError
return false
rescue ::Rex::ConnectionError, ::EOFError => e
raise e
rescue ::Exception => e
vprint_error("#{rhost}:#{rport} error checking version #{e.class} #{e}")
return false