Skip to content

Commit 26f2b35

Browse files
committed
Land rapid7#5168, more fail_with fixes
2 parents 7886ac6 + 5c98270 commit 26f2b35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/exploits/unix/webapp/wp_nmediawebsite_file_upload.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ def exploit
6363
begin
6464
new_php_pagename = JSON.parse(res.body)["filename"]
6565
rescue JSON::ParserError
66-
new_php_pagename = ''
66+
fail_with(Failure::Unknown, 'Unable to parse JSON data for the filename')
6767
end
6868
print_good("#{peer} - Our payload is at: #{new_php_pagename}. Calling payload...")
6969
register_files_for_cleanup(new_php_pagename)
7070
else
7171
fail_with("#{peer} - Unable to deploy payload, server returned #{res.code}")
7272
end
7373
else
74-
fail_with('ERROR')
74+
fail_with(Failure::Unknown,'ERROR')
7575
end
7676

7777
print_status("#{peer} - Calling payload...")

0 commit comments

Comments
 (0)