diff --git a/lib/core/settings.py b/lib/core/settings.py index 7cf9acacb..bbf8b4168 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from lib.core.revision import getRevisionNumber # sqlmap version (...) -VERSION = "1.0.5.5" +VERSION = "1.0.5.6" REVISION = getRevisionNumber() STABLE = VERSION.count('.') <= 2 VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev") diff --git a/lib/utils/hash.py b/lib/utils/hash.py index cc3acda56..95831b235 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -30,6 +30,7 @@ import os import re import tempfile import time +import zipfile from hashlib import md5 from hashlib import sha1 @@ -61,6 +62,7 @@ from lib.core.data import kb from lib.core.data import logger from lib.core.enums import DBMS from lib.core.enums import HASH +from lib.core.exception import SqlmapDataException from lib.core.exception import SqlmapUserQuitException from lib.core.settings import COMMON_PASSWORD_SUFFIXES from lib.core.settings import COMMON_USER_COLUMNS @@ -786,6 +788,14 @@ def dictionaryAttack(attack_dict): for dictPath in dictPaths: checkFile(dictPath) + if os.path.splitext(dictPath)[1].lower() == ".zip": + _ = zipfile.ZipFile(dictPath, 'r') + if len(_.namelist()) == 0: + errMsg = "no file(s) inside '%s'" % dictPath + raise SqlmapDataException(errMsg) + else: + _.open(_.namelist()[0]) + kb.wordlists = dictPaths except Exception, ex: