Skip to content

Commit 6920c71

Browse files
committed
Land rapid7#3775 - ssh_login_pubkey fix for the uninit prepended_creds bug
Closes rapid7#3774
2 parents 99c9d5a + 257f0fc commit 6920c71

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

modules/auxiliary/scanner/ssh/ssh_login_pubkey.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def run_host(ip)
198198

199199
keys = prepend_db_keys(keys)
200200

201-
print_brute :level => :vstatus, :ip => ip, :msg => "Testing #{keys.key_data.count} keys"
201+
print_brute :level => :vstatus, :ip => ip, :msg => "Testing #{keys.key_data.count} keys from #{datastore['KEY_PATH']}"
202202
scanner = Metasploit::Framework::LoginScanner::SSH.new(
203203
host: ip,
204204
port: rport,
@@ -240,12 +240,10 @@ def run_host(ip)
240240

241241
class KeyCollection < Metasploit::Framework::CredentialCollection
242242
attr_accessor :key_data
243+
attr_accessor :key_path
243244

244245
def initialize(opts={})
245-
@username = opts[:username]
246-
@user_file = opts[:user_file]
247-
@key_path = opts.fetch(:key_path)
248-
246+
super
249247
valid!
250248
end
251249

0 commit comments

Comments
 (0)