From 643c464268bdd46bf974f51e6acb64ff47ea3dc3 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 11 Jan 2011 12:16:20 +0000 Subject: [PATCH] minor fix --- lib/utils/hash.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 352eb8379..d261ea070 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -23,6 +23,7 @@ from lib.core.common import dataToStdout from lib.core.common import getCompiledRegex from lib.core.common import getFileItems from lib.core.common import getPublicTypeMembers +from lib.core.common import getUnicode from lib.core.common import paths from lib.core.common import readInput from lib.core.convert import hexdecode @@ -334,14 +335,14 @@ def dictionaryAttack(attack_dict): logger.info(infoMsg) kb.wordlist = getFileItems(dictpath, None, False) - length = len(kb.wordlist) - infoMsg = "starting dictionary attack (%s)" % __functions__[hash_regex].func_name logger.info(infoMsg) for item in attack_info: ((user, _), _) = item - kb.wordlist.append(user) + kb.wordlist.append(getUnicode(user)) + + length = len(kb.wordlist) if hash_regex in (HASH.MYSQL, HASH.MYSQL_OLD, HASH.MD5_GENERIC, HASH.SHA1_GENERIC): count = 0 @@ -356,7 +357,7 @@ def dictionaryAttack(attack_dict): if hash_ == current: results.append((user, hash_, word)) clearConsoleLine() - + infoMsg = "[%s] [INFO] found: '%s'" % (time.strftime("%X"), word) if user and not user.startswith(DUMMY_USER_PREFIX):