Add a check method for tomcat_mgr_deploy

This commit is contained in:
James Lee 2012-03-06 23:22:44 -07:00
parent 6b9a21936e
commit 02ea38516f
1 changed files with 12 additions and 0 deletions

View File

@ -116,6 +116,18 @@ class Metasploit3 < Msf::Exploit::Remote
], self.class)
end
def check
res = query_serverinfo
disconnect
return CheckCode::Unknown if res.nil?
if (res.code.between?(400, 499))
print_error("Server rejected the credentials")
return CheckCode::Unknown
end
print_status("Target is #{detect_platform(res.body)} #{detect_arch(res.body)}")
return CheckCode::Vulnerable
end
def auto_target
print_status("Attempting to automatically select a target...")