Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34c2172

Browse files
committed
Fixes #1837
1 parent 48044f7 commit 34c2172

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.revision import getRevisionNumber
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.5.5"
22+
VERSION = "1.0.5.6"
2323
REVISION = getRevisionNumber()
2424
STABLE = VERSION.count('.') <= 2
2525
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

lib/utils/hash.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import re
3131
import tempfile
3232
import time
33+
import zipfile
3334

3435
from hashlib import md5
3536
from hashlib import sha1
@@ -61,6 +62,7 @@
6162
from lib.core.data import logger
6263
from lib.core.enums import DBMS
6364
from lib.core.enums import HASH
65+
from lib.core.exception import SqlmapDataException
6466
from lib.core.exception import SqlmapUserQuitException
6567
from lib.core.settings import COMMON_PASSWORD_SUFFIXES
6668
from lib.core.settings import COMMON_USER_COLUMNS
@@ -786,6 +788,14 @@ def dictionaryAttack(attack_dict):
786788
for dictPath in dictPaths:
787789
checkFile(dictPath)
788790

791+
if os.path.splitext(dictPath)[1].lower() == ".zip":
792+
_ = zipfile.ZipFile(dictPath, 'r')
793+
if len(_.namelist()) == 0:
794+
errMsg = "no file(s) inside '%s'" % dictPath
795+
raise SqlmapDataException(errMsg)
796+
else:
797+
_.open(_.namelist()[0])
798+
789799
kb.wordlists = dictPaths
790800

791801
except Exception, ex:

0 commit comments

Comments
 (0)