Replaced print_error and return with a fail_with

master
Julien Legras 2018-12-05 10:11:09 +01:00
parent 2735c71bda
commit 2774c17ca1
1 changed files with 2 additions and 4 deletions

View File

@ -98,12 +98,10 @@ class MetasploitModule < Msf::Exploit::Remote
if response && response.code == 200
print_status("Successfully created the wp-config.php file!")
else
print_error("The archive file #{archive_name} was probably deleted.")
return
fail_with(Failure::Unknown, "The archive file #{archive_name} was probably deleted.")
end
else
print_error("Failed to retrieve the archive name, cannot create the wp-config.php file")
return
fail_with(Failure::NotFound, "Failed to retrieve the archive name, cannot create the wp-config.php file.")
end
end