From fcac3d494b3c701e24b702b95a08e4ef8b76483e Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 21 Nov 2011 22:18:04 +0000 Subject: [PATCH] minor beautification --- lib/utils/hash.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/utils/hash.py b/lib/utils/hash.py index c1cdb49ff..d77ab72eb 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -714,10 +714,12 @@ def dictionaryAttack(attack_dict): finally: if retVal: conf.hashDB.beginTransaction() + while not retVal.empty(): _, hash_, word = item = retVal.get(block=False) conf.hashDB.write(hash_, word) results.append(item) + conf.hashDB.endTransaction() clearConsoleLine() @@ -795,10 +797,12 @@ def dictionaryAttack(attack_dict): finally: if retVal: conf.hashDB.beginTransaction() + while not retVal.empty(): _, hash_, word = item = retVal.get(block=False) conf.hashDB.write(hash_, word) results.append(item) + conf.hashDB.endTransaction() clearConsoleLine()