Use store_valid_credential in my modules
I used report_note because using the creds API was a pain in the ass.bug/bundler_fix
parent
4198efa41f
commit
e22334343e
|
@ -90,11 +90,10 @@ class MetasploitModule < Msf::Auxiliary
|
|||
|
||||
if admin_hash
|
||||
print_good("Hopefully this is your hash: #{admin_hash}")
|
||||
report_note(
|
||||
host: rhost,
|
||||
port: rport,
|
||||
type: 'qnap.admin.hash',
|
||||
data: admin_hash
|
||||
store_valid_credential(
|
||||
user: 'admin',
|
||||
private: admin_hash,
|
||||
private_type: :nonreplayable_hash
|
||||
)
|
||||
else
|
||||
print_error('Looks like we didn\'t find the hash :(')
|
||||
|
|
|
@ -148,11 +148,10 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
refs: self.references,
|
||||
info: ssh.transport.server_version.version
|
||||
)
|
||||
report_note(
|
||||
host: rhost,
|
||||
port: datastore['SSH_PORT'],
|
||||
type: 'airos.ssh.key',
|
||||
data: private_key
|
||||
store_valid_credential(
|
||||
user: username,
|
||||
private: private_key,
|
||||
private_type: :ssh_key
|
||||
)
|
||||
return Net::SSH::CommandStream.new(ssh, '/bin/sh', true)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue