Add a check method for tomcat_mgr_deploy
This commit is contained in:
parent
6b9a21936e
commit
02ea38516f
|
@ -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...")
|
||||
|
|
Loading…
Reference in New Issue