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-b9f4589650daunstable
parent
14e147c931
commit
80853f0e10
|
@ -31,14 +31,22 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
))
|
))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def target
|
||||||
|
[rhost,rport].join(":")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
def run_host(ip)
|
def run_host(ip)
|
||||||
|
begin
|
||||||
if mysql_version_check("4.1.1") # Pushing down to 4.1.1.
|
if mysql_version_check("4.1.1") # Pushing down to 4.1.1.
|
||||||
each_user_pass { |user, pass|
|
each_user_pass { |user, pass|
|
||||||
do_login(user, pass)
|
do_login(user, pass)
|
||||||
}
|
}
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -52,8 +60,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
s = connect(false)
|
s = connect(false)
|
||||||
data = s.get
|
data = s.get
|
||||||
disconnect(s)
|
disconnect(s)
|
||||||
rescue ::Rex::ConnectionError, ::EOFError
|
rescue ::Rex::ConnectionError, ::EOFError => e
|
||||||
return false
|
raise e
|
||||||
rescue ::Exception => e
|
rescue ::Exception => e
|
||||||
vprint_error("#{rhost}:#{rport} error checking version #{e.class} #{e}")
|
vprint_error("#{rhost}:#{rport} error checking version #{e.class} #{e}")
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue