Skip to content

Commit a40e716

Browse files
committed
Refactor QNAP module for traditional creds
1 parent 3e20296 commit a40e716

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

modules/auxiliary/gather/qnap_backtrace_admin_hash.rb

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

9191
if admin_hash
9292
print_good("Hopefully this is your hash: #{admin_hash}")
93-
store_valid_credential(
94-
user: 'admin',
95-
private: admin_hash,
96-
private_type: :nonreplayable_hash
97-
)
93+
credential_data = {
94+
workspace_id: myworkspace_id,
95+
module_fullname: self.fullname,
96+
username: 'admin',
97+
private_data: admin_hash,
98+
private_type: :nonreplayable_hash,
99+
jtr_format: 'md5crypt'
100+
}.merge(service_details)
101+
create_credential(credential_data)
98102
else
99103
print_error('Looks like we didn\'t find the hash :(')
100104
end

0 commit comments

Comments
 (0)