mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
Fixes #1837
This commit is contained in:
parent
48044f7a46
commit
34c2172391
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.0.5.5"
|
VERSION = "1.0.5.6"
|
||||||
REVISION = getRevisionNumber()
|
REVISION = getRevisionNumber()
|
||||||
STABLE = VERSION.count('.') <= 2
|
STABLE = VERSION.count('.') <= 2
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")
|
||||||
|
|
|
@ -30,6 +30,7 @@ import os
|
||||||
import re
|
import re
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
import zipfile
|
||||||
|
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
|
@ -61,6 +62,7 @@ from lib.core.data import kb
|
||||||
from lib.core.data import logger
|
from lib.core.data import logger
|
||||||
from lib.core.enums import DBMS
|
from lib.core.enums import DBMS
|
||||||
from lib.core.enums import HASH
|
from lib.core.enums import HASH
|
||||||
|
from lib.core.exception import SqlmapDataException
|
||||||
from lib.core.exception import SqlmapUserQuitException
|
from lib.core.exception import SqlmapUserQuitException
|
||||||
from lib.core.settings import COMMON_PASSWORD_SUFFIXES
|
from lib.core.settings import COMMON_PASSWORD_SUFFIXES
|
||||||
from lib.core.settings import COMMON_USER_COLUMNS
|
from lib.core.settings import COMMON_USER_COLUMNS
|
||||||
|
@ -786,6 +788,14 @@ def dictionaryAttack(attack_dict):
|
||||||
for dictPath in dictPaths:
|
for dictPath in dictPaths:
|
||||||
checkFile(dictPath)
|
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
|
kb.wordlists = dictPaths
|
||||||
|
|
||||||
except Exception, ex:
|
except Exception, ex:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user