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
|
if admin_hash
|
||||||
print_good("Hopefully this is your hash: #{admin_hash}")
|
print_good("Hopefully this is your hash: #{admin_hash}")
|
||||||
report_note(
|
store_valid_credential(
|
||||||
host: rhost,
|
user: 'admin',
|
||||||
port: rport,
|
private: admin_hash,
|
||||||
type: 'qnap.admin.hash',
|
private_type: :nonreplayable_hash
|
||||||
data: admin_hash
|
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
print_error('Looks like we didn\'t find the hash :(')
|
print_error('Looks like we didn\'t find the hash :(')
|
||||||
|
|
|
@ -148,11 +148,10 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
refs: self.references,
|
refs: self.references,
|
||||||
info: ssh.transport.server_version.version
|
info: ssh.transport.server_version.version
|
||||||
)
|
)
|
||||||
report_note(
|
store_valid_credential(
|
||||||
host: rhost,
|
user: username,
|
||||||
port: datastore['SSH_PORT'],
|
private: private_key,
|
||||||
type: 'airos.ssh.key',
|
private_type: :ssh_key
|
||||||
data: private_key
|
|
||||||
)
|
)
|
||||||
return Net::SSH::CommandStream.new(ssh, '/bin/sh', true)
|
return Net::SSH::CommandStream.new(ssh, '/bin/sh', true)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue