Do not fail_with on method used from check
This commit is contained in:
@@ -99,7 +99,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
print_status("#{peer} - Password retrieved [ #{pass} ]")
|
||||
return pass
|
||||
else
|
||||
fail_with(Failure::Unknown, "#{peer} - Retrieving password failed!")
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -130,6 +130,10 @@ class Metasploit3 < Msf::Exploit::Remote
|
||||
def execute_command(cmd, opts)
|
||||
|
||||
admin_password = password
|
||||
if admin_password.nil?
|
||||
fail_with(Failure::Unknown, "#{peer} - Retrieving password failed!")
|
||||
end
|
||||
|
||||
session = login(admin_password)
|
||||
|
||||
scriptname = rand_text_alphanumeric(8)
|
||||
|
||||
Reference in New Issue
Block a user