diff --git a/modules/exploits/multi/http/cisco_dcnm_upload.rb b/modules/exploits/multi/http/cisco_dcnm_upload.rb index 4ddad87080..e32d401905 100644 --- a/modules/exploits/multi/http/cisco_dcnm_upload.rb +++ b/modules/exploits/multi/http/cisco_dcnm_upload.rb @@ -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 =~ /
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/