Land #2237 - Fix check function
commit
2e4e3fdbe6
|
@ -61,10 +61,16 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
def check
|
||||
uri = datastore['PHPURI'] ? datastore['PHPURI'].dup : ""
|
||||
|
||||
tpath = normalize_uri(datastore['PATH'])
|
||||
if tpath[-1,1] == '/'
|
||||
tpath = tpath.chop
|
||||
end
|
||||
|
||||
if(uri and ! uri.empty?)
|
||||
uri.gsub!(/\?.*/, "")
|
||||
print_status("Checking uri #{uri}")
|
||||
response = send_request_raw({ 'uri' => uri})
|
||||
print_status("Checking uri #{rhost+tpath+uri}")
|
||||
response = send_request_raw({ 'uri' => tpath+uri})
|
||||
return Exploit::CheckCode::Detected if response.code == 200
|
||||
print_error("Server responded with #{response.code}")
|
||||
return Exploit::CheckCode::Safe
|
||||
|
@ -128,7 +134,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
uris.each do |uri|
|
||||
break if session_created?
|
||||
|
||||
# print_status("Sending #{tpath+uri}")
|
||||
vprint_status("Sending: #{rhost+tpath+uri}")
|
||||
begin
|
||||
if http_method == "GET"
|
||||
response = send_request_raw( {
|
||||
|
|
Loading…
Reference in New Issue