Possible fix to changes in net::ssh usage
parent
dc2b5df2ef
commit
8f75d3a46b
|
@ -81,7 +81,10 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
auth = Net::SSH::Authentication::Session.new(transport, opt_hash)
|
auth = Net::SSH::Authentication::Session.new(transport, opt_hash)
|
||||||
auth.authenticate("ssh-connection", Rex::Text.rand_text_alphanumeric(8), Rex::Text.rand_text_alphanumeric(8))
|
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('|')
|
auth_method = auth.allowed_auth_methods.join('|')
|
||||||
print_good "#{peer(ip)} Server Version: #{auth.transport.server_version.version}"
|
print_good "#{peer(ip)} Server Version: #{auth.transport.server_version.version}"
|
||||||
report_service(
|
report_service(
|
||||||
|
@ -116,7 +119,10 @@ class MetasploitModule < Msf::Auxiliary
|
||||||
|
|
||||||
begin
|
begin
|
||||||
::Timeout.timeout(datastore['SSH_TIMEOUT']) do
|
::Timeout.timeout(datastore['SSH_TIMEOUT']) do
|
||||||
auth.authenticate("ssh-connection", user, pass)
|
begin
|
||||||
|
auth.authenticate("ssh-connection", user, pass)
|
||||||
|
rescue NoMethodError
|
||||||
|
end
|
||||||
auth_method = auth.allowed_auth_methods.join('|')
|
auth_method = auth.allowed_auth_methods.join('|')
|
||||||
if auth_method != ''
|
if auth_method != ''
|
||||||
:success
|
:success
|
||||||
|
|
Loading…
Reference in New Issue