fix more ssh option hashes
This commit is contained in:
parent
e315ec4e73
commit
a9a1146155
|
@ -87,11 +87,11 @@ class MetasploitModule < Msf::Auxiliary
|
|||
auth_method = auth.allowed_auth_methods.join('|')
|
||||
print_status "#{peer(ip)} Server Version: #{auth.transport.server_version.version}"
|
||||
report_service(
|
||||
:host => ip,
|
||||
:port => rport,
|
||||
:name => "ssh",
|
||||
:proto => "tcp",
|
||||
:info => auth.transport.server_version.version
|
||||
host: ip,
|
||||
port: rport,
|
||||
name: "ssh",
|
||||
proto: "tcp",
|
||||
info: auth.transport.server_version.version
|
||||
)
|
||||
|
||||
if auth_method.empty?
|
||||
|
@ -105,16 +105,14 @@ class MetasploitModule < Msf::Auxiliary
|
|||
pass = Rex::Text.rand_text_alphanumeric(8)
|
||||
|
||||
opt_hash = {
|
||||
:auth_methods => ['password', 'keyboard-interactive'],
|
||||
:msframework => framework,
|
||||
:msfmodule => self,
|
||||
:port => port,
|
||||
:use_agent => false,
|
||||
:config => false,
|
||||
:proxies => datastore['Proxies']
|
||||
auth_methods: ['password', 'keyboard-interactive'],
|
||||
port: port,
|
||||
use_agent: false,
|
||||
config: false,
|
||||
proxies: datastore['Proxies']
|
||||
}
|
||||
|
||||
opt_hash.merge!(:verbose => :debug) if datastore['SSH_DEBUG']
|
||||
opt_hash.merge!(verbose: :debug) if datastore['SSH_DEBUG']
|
||||
transport = Net::SSH::Transport::Session.new(ip, opt_hash)
|
||||
auth = Net::SSH::Authentication::Session.new(transport, opt_hash)
|
||||
|
||||
|
|
|
@ -79,15 +79,13 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
def do_login(user, pass)
|
||||
factory = ssh_socket_factory
|
||||
opts = {
|
||||
:auth_methods => ['password', 'keyboard-interactive'],
|
||||
:framework => framework,
|
||||
:msfmodule => self,
|
||||
:port => rport,
|
||||
:use_agent => false,
|
||||
:config => false,
|
||||
:password => pass,
|
||||
:proxy => factory,
|
||||
:non_interactive => true
|
||||
auth_methods: ['password', 'keyboard-interactive'],
|
||||
port: rport,
|
||||
use_agent: false,
|
||||
config: false,
|
||||
password: pass,
|
||||
proxy: factory,
|
||||
non_interactive: true
|
||||
}
|
||||
|
||||
opts.merge!(:verbose => :debug) if datastore['SSH_DEBUG']
|
||||
|
|
Loading…
Reference in New Issue