Do better check method

bug/bundler_fix
jvazquez-r7 2013-11-30 09:46:22 -06:00
parent 0a7c0eea78
commit 749e6bd65b
1 changed files with 8 additions and 4 deletions

View File

@ -86,14 +86,18 @@ class Metasploit3 < Msf::Exploit::Remote
'method' => 'GET'
})
if res and
res.code == 200 and
unless res
return Exploit::CheckCode::Unknown
end
if res.code == 200 and
res.body.to_s =~ /Data Center Network Manager/ and
res.body.to_s =~ /<div class="productVersion">Version: (.*)<\/div>/
version = $1
print_status("Cisco Primer Data Center Network Manager version #{version} found")
else
return Exploit::CheckCode::Safe
elsif res.code == 200 and
res.body.to_s =~ /Data Center Network Manager/
return Exploit::CheckCode::Detected
end
if version =~ /6.1/