Merge pull request #67 from the-useless-one/cleartex_log

Cleartex log
This commit is contained in:
lgandx 2016-03-10 09:25:54 -05:00
commit fb42aa35a9

View file

@ -171,8 +171,12 @@ def SaveToDb(result):
if count == 0: if count == 0:
# Write JtR-style hash string to file # If we obtained cleartext credentials, write them to file
# Otherwise, write JtR-style hash string to file
with open(logfile,"a") as outf: with open(logfile,"a") as outf:
if len(result['cleartext']):
outf.write('%s:%s' % (result['user'], result['cleartext']))
else:
outf.write(result['fullhash']) outf.write(result['fullhash'])
outf.write("\n") outf.write("\n")
outf.close() outf.close()