@@ -180,7 +180,7 @@ def run_host(ip)
180
180
181
181
# Write the rakp hash to the database
182
182
hash = "#{ rhost } #{ username } :$rakp$#{ sha1_salt } $#{ sha1_hash } "
183
- report_hash ( username , hash )
183
+ core_id = report_hash ( username , hash )
184
184
# Write the vulnerability to the database
185
185
unless reported_vuln
186
186
report_vuln (
@@ -205,7 +205,7 @@ def run_host(ip)
205
205
print_good ( "#{ rhost } :#{ rport } - IPMI - Hash for user '#{ username } ' matches password '#{ pass } '" )
206
206
207
207
# Report the clear-text credential to the database
208
- report_cracked_cred ( username , pass )
208
+ report_cracked_cred ( username , pass , core_id )
209
209
break
210
210
end
211
211
end
@@ -269,24 +269,18 @@ def report_hash(user, hash)
269
269
status : Metasploit ::Model ::Login ::Status ::UNTRIED
270
270
} . merge ( service_data )
271
271
272
- create_credential_login ( login_data )
272
+ cl = create_credential_login ( login_data )
273
+ cl . core_id
273
274
end
274
275
275
- def report_cracked_cred ( user , password )
276
- credential_data = {
277
- module_fullname : self . fullname ,
278
- origin_type : :service ,
279
- private_data : password ,
280
- private_type : :password ,
276
+ def report_cracked_cred ( user , password , core_id )
277
+ cred_data = {
278
+ core_id : core_id ,
281
279
username : user ,
282
- } . merge ( service_data )
283
-
284
- login_data = {
285
- core : create_credential ( credential_data ) ,
286
- status : Metasploit ::Model ::Login ::Status ::UNTRIED
287
- } . merge ( service_data )
280
+ password : password
281
+ }
288
282
289
- create_credential_login ( login_data )
283
+ create_cracked_credential ( cred_data )
290
284
end
291
285
292
286
#
0 commit comments