Some refactoring (data)

This commit is contained in:
Miroslav Stampar
2019-05-24 12:01:39 +02:00
parent 82efb0ca79
commit ef7d4bb404
79 changed files with 50 additions and 30 deletions

View File

@@ -55,6 +55,7 @@ from lib.core.common import getPublicTypeMembers
from lib.core.common import getSafeExString
from lib.core.common import hashDBRetrieve
from lib.core.common import hashDBWrite
from lib.core.common import isZipFile
from lib.core.common import normalizeUnicode
from lib.core.common import openFile
from lib.core.common import paths
@@ -1003,7 +1004,7 @@ def dictionaryAttack(attack_dict):
for dictPath in dictPaths:
checkFile(dictPath)
if os.path.splitext(dictPath)[1].lower() == ".zip":
if isZipFile(dictPath):
_ = zipfile.ZipFile(dictPath, 'r')
if len(_.namelist()) == 0:
errMsg = "no file(s) inside '%s'" % dictPath