diff --git a/modules/exploits/multi/http/glpi_install_rce.rb b/modules/exploits/multi/http/glpi_install_rce.rb index f5ead78913..b49a85ffdb 100644 --- a/modules/exploits/multi/http/glpi_install_rce.rb +++ b/modules/exploits/multi/http/glpi_install_rce.rb @@ -70,12 +70,13 @@ class Metasploit3 < Msf::Exploit::Remote m = Regexp.new(re, Regexp::IGNORECASE) matched = m.match(res.body) if matched and matched[3] =~ /0.(8[0-4].[0-1])|([0-7][0-9].[0-9])/ - print_good("Detected Version : #{matched[3]}") - return Exploit::CheckCode::Appears - else - print_error("Version #{matched[3]} is not vulnerable") - return Exploit::CheckCode::Safe + print_good("Detected Version : #{matched[3]}") + return Exploit::CheckCode::Appears + elsif matched + print_error("Version #{matched[3]} is not vulnerable") end + return Exploit::CheckCode::Safe + end def exploit @@ -94,7 +95,7 @@ class Metasploit3 < Msf::Exploit::Remote } }) - unless res and res.code == 200 and res.body !~ /You will update the GLPI database/ + unless res and res.code == 200 and res.body =~ /You will update the GLPI database/ print_warning("Unexpected response while injecting the payload, trying to execute anyway...") end