Skip to content

Commit 55be2ef

Browse files
committed
Replace return with fail_with
1 parent c63fdad commit 55be2ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

modules/auxiliary/gather/wp_all_in_one_migration_export.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ def run
5555
'vars_post' => { 'options[action]' => 'export' }
5656
}, datastore['MAXTIME'])
5757

58-
if res.nil?
59-
print_error("#{peer} - No response from the target")
60-
return
61-
elsif res.code != 200
62-
print_error("#{peer} - Server responded with status code #{res.code}")
63-
return
58+
unless res
59+
fail_with(Failure::Unknown, "#{peer} - No response from the target")
60+
end
61+
62+
if res.code != 200
63+
fail_with(Failure::UnexpectedReply, "#{peer} - Server responded with status code #{res.code}")
6464
end
6565

6666
store_path = store_loot('wordpress.export', 'zip', datastore['RHOST'], res.body, 'wordpress_backup.zip', 'WordPress Database and Content Backup')

0 commit comments

Comments
 (0)