Minor patch

This commit is contained in:
Miroslav Stampar 2019-05-03 00:13:05 +02:00
parent 1f05e85408
commit a33ee69337
3 changed files with 21 additions and 17 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.5.6"
VERSION = "1.3.5.7"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -11,8 +11,9 @@ import zipfile
from lib.core.common import getSafeExString
from lib.core.exception import SqlmapDataException
from lib.core.exception import SqlmapInstallationException
from thirdparty import six
class Wordlist(object):
class Wordlist(six.Iterator):
"""
Iterator for looping over a large dictionaries
"""
@ -63,7 +64,7 @@ class Wordlist(object):
self.fp.close()
self.fp = None
def next(self):
def __next__(self):
retVal = None
while True:
self.counter += 1

View File

@ -703,7 +703,6 @@ def attackDumpedTable():
def hashRecognition(value):
retVal = None
if six.PY2: # currently only supported on Python2
isOracle, isMySQL = Backend.isDbms(DBMS.ORACLE), Backend.isDbms(DBMS.MYSQL)
if isinstance(value, six.string_types):
@ -737,7 +736,9 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
count += 1
if not isinstance(word, six.string_types):
if isinstance(word, six.binary_type):
word = getUnicode(word)
elif not isinstance(word, six.string_types):
continue
if suffix:
@ -812,7 +813,9 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
count += 1
if not isinstance(word, six.string_types):
if isinstance(word, six.binary_type):
word = getUnicode(word)
elif not isinstance(word, six.string_types):
continue
if suffix: