Skip to content

Commit e223343

Browse files
committed
Use store_valid_credential in my modules
I used report_note because using the creds API was a pain in the ass.
1 parent 4198efa commit e223343

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

modules/auxiliary/gather/qnap_backtrace_admin_hash.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ def run
9090

9191
if admin_hash
9292
print_good("Hopefully this is your hash: #{admin_hash}")
93-
report_note(
94-
host: rhost,
95-
port: rport,
96-
type: 'qnap.admin.hash',
97-
data: admin_hash
93+
store_valid_credential(
94+
user: 'admin',
95+
private: admin_hash,
96+
private_type: :nonreplayable_hash
9897
)
9998
else
10099
print_error('Looks like we didn\'t find the hash :(')

modules/exploits/linux/ssh/ubiquiti_airos_file_upload.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,10 @@ def ssh_login
148148
refs: self.references,
149149
info: ssh.transport.server_version.version
150150
)
151-
report_note(
152-
host: rhost,
153-
port: datastore['SSH_PORT'],
154-
type: 'airos.ssh.key',
155-
data: private_key
151+
store_valid_credential(
152+
user: username,
153+
private: private_key,
154+
private_type: :ssh_key
156155
)
157156
return Net::SSH::CommandStream.new(ssh, '/bin/sh', true)
158157
end

0 commit comments

Comments
 (0)