mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor patch
This commit is contained in:
parent
1f05e85408
commit
a33ee69337
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty import six
|
from thirdparty import six
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# 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 = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -11,8 +11,9 @@ import zipfile
|
||||||
from lib.core.common import getSafeExString
|
from lib.core.common import getSafeExString
|
||||||
from lib.core.exception import SqlmapDataException
|
from lib.core.exception import SqlmapDataException
|
||||||
from lib.core.exception import SqlmapInstallationException
|
from lib.core.exception import SqlmapInstallationException
|
||||||
|
from thirdparty import six
|
||||||
|
|
||||||
class Wordlist(object):
|
class Wordlist(six.Iterator):
|
||||||
"""
|
"""
|
||||||
Iterator for looping over a large dictionaries
|
Iterator for looping over a large dictionaries
|
||||||
"""
|
"""
|
||||||
|
@ -63,7 +64,7 @@ class Wordlist(object):
|
||||||
self.fp.close()
|
self.fp.close()
|
||||||
self.fp = None
|
self.fp = None
|
||||||
|
|
||||||
def next(self):
|
def __next__(self):
|
||||||
retVal = None
|
retVal = None
|
||||||
while True:
|
while True:
|
||||||
self.counter += 1
|
self.counter += 1
|
||||||
|
|
|
@ -703,20 +703,19 @@ def attackDumpedTable():
|
||||||
def hashRecognition(value):
|
def hashRecognition(value):
|
||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
if six.PY2: # currently only supported on Python2
|
isOracle, isMySQL = Backend.isDbms(DBMS.ORACLE), Backend.isDbms(DBMS.MYSQL)
|
||||||
isOracle, isMySQL = Backend.isDbms(DBMS.ORACLE), Backend.isDbms(DBMS.MYSQL)
|
|
||||||
|
|
||||||
if isinstance(value, six.string_types):
|
if isinstance(value, six.string_types):
|
||||||
for name, regex in getPublicTypeMembers(HASH):
|
for name, regex in getPublicTypeMembers(HASH):
|
||||||
# Hashes for Oracle and old MySQL look the same hence these checks
|
# Hashes for Oracle and old MySQL look the same hence these checks
|
||||||
if isOracle and regex == HASH.MYSQL_OLD or isMySQL and regex == HASH.ORACLE_OLD:
|
if isOracle and regex == HASH.MYSQL_OLD or isMySQL and regex == HASH.ORACLE_OLD:
|
||||||
|
continue
|
||||||
|
elif regex == HASH.CRYPT_GENERIC:
|
||||||
|
if any((value.lower() == value, value.upper() == value)):
|
||||||
continue
|
continue
|
||||||
elif regex == HASH.CRYPT_GENERIC:
|
elif re.match(regex, value):
|
||||||
if any((value.lower() == value, value.upper() == value)):
|
retVal = regex
|
||||||
continue
|
break
|
||||||
elif re.match(regex, value):
|
|
||||||
retVal = regex
|
|
||||||
break
|
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
@ -737,7 +736,9 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
|
||||||
|
|
||||||
count += 1
|
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
|
continue
|
||||||
|
|
||||||
if suffix:
|
if suffix:
|
||||||
|
@ -812,7 +813,9 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
|
||||||
|
|
||||||
count += 1
|
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
|
continue
|
||||||
|
|
||||||
if suffix:
|
if suffix:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user