From ac1789dd6cc70c0c46f499b5dbb3d4072b88e815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20M=C3=A9heut?= Date: Sun, 10 Jan 2016 20:47:08 +0100 Subject: [PATCH 1/2] Modified logging of cleartext credentials --- utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index c391a43..9b4833f 100644 --- a/utils.py +++ b/utils.py @@ -173,7 +173,10 @@ def SaveToDb(result): # Write JtR-style hash string to file with open(logfile,"a") as outf: - outf.write(result['fullhash']) + if len(result['cleartext']): + outf.write('%s:%s' % (result['user'], result['cleartext'])) + else: + outf.write(result['fullhash']) outf.write("\n") outf.close() From 08535e55391d762be4259a1fada330ef3f0ac134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20M=C3=A9heut?= Date: Sun, 10 Jan 2016 20:52:36 +0100 Subject: [PATCH 2/2] Changed comment to be more clear about what is being done when logging --- utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 9b4833f..b88c0ee 100644 --- a/utils.py +++ b/utils.py @@ -171,7 +171,8 @@ def SaveToDb(result): 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: if len(result['cleartext']): outf.write('%s:%s' % (result['user'], result['cleartext']))