From a9a1146155dabfa60b6f46a991a8577b2f1cfbaa Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 20 Sep 2016 01:30:35 -0500 Subject: [PATCH] fix more ssh option hashes --- .../scanner/ssh/cerberus_sftp_enumusers.rb | 24 +++++++++---------- .../apple_ios/ssh/cydia_default_ssh.rb | 16 ++++++------- 2 files changed, 18 insertions(+), 22 deletions(-) diff --git a/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb b/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb index 77c2124361..ef389b824f 100644 --- a/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb +++ b/modules/auxiliary/scanner/ssh/cerberus_sftp_enumusers.rb @@ -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) diff --git a/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb b/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb index d7b1b3c8aa..97841fc0b7 100644 --- a/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb +++ b/modules/exploits/apple_ios/ssh/cydia_default_ssh.rb @@ -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']