From 749e6bd65b52e44d86312caae5bd7724bee470d7 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Sat, 30 Nov 2013 09:46:22 -0600 Subject: [PATCH] Do better check method --- modules/exploits/multi/http/cisco_dcnm_upload.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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/