File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919from 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 "
2323REVISION = getRevisionNumber ()
2424STABLE = VERSION .count ('.' ) <= 2
2525VERSION_STRING = "sqlmap/%s#%s" % (VERSION , "stable" if STABLE else "dev" )
Original file line number Diff line number Diff line change 3030import re
3131import tempfile
3232import time
33+ import zipfile
3334
3435from hashlib import md5
3536from hashlib import sha1
6162from lib .core .data import logger
6263from lib .core .enums import DBMS
6364from lib .core .enums import HASH
65+ from lib .core .exception import SqlmapDataException
6466from lib .core .exception import SqlmapUserQuitException
6567from lib .core .settings import COMMON_PASSWORD_SUFFIXES
6668from 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 :
You can’t perform that action at this time.
0 commit comments