Possible fix to changes in net::ssh usage

MS-2855/keylogger-mettle-extension
Steve Embling 2018-01-19 15:10:14 +00:00
parent dc2b5df2ef
commit 8f75d3a46b
1 changed files with 8 additions and 2 deletions

View File

@ -81,7 +81,10 @@ class MetasploitModule < Msf::Auxiliary
end
auth = Net::SSH::Authentication::Session.new(transport, opt_hash)
begin
auth.authenticate("ssh-connection", Rex::Text.rand_text_alphanumeric(8), Rex::Text.rand_text_alphanumeric(8))
rescue NoMethodError
end
auth_method = auth.allowed_auth_methods.join('|')
print_good "#{peer(ip)} Server Version: #{auth.transport.server_version.version}"
report_service(
@ -116,7 +119,10 @@ class MetasploitModule < Msf::Auxiliary
begin
::Timeout.timeout(datastore['SSH_TIMEOUT']) do
begin
auth.authenticate("ssh-connection", user, pass)
rescue NoMethodError
end
auth_method = auth.allowed_auth_methods.join('|')
if auth_method != ''
:success