mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 02:53:46 +03:00
Fixes #4464
This commit is contained in:
parent
760563dbd1
commit
8a783702d9
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.4.12.14"
|
VERSION = "1.4.12.15"
|
||||||
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)
|
||||||
|
|
|
@ -80,6 +80,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
|
||||||
debugMsg = "searching for error chunk length..."
|
debugMsg = "searching for error chunk length..."
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
|
seen = set()
|
||||||
current = MAX_ERROR_CHUNK_LENGTH
|
current = MAX_ERROR_CHUNK_LENGTH
|
||||||
while current >= MIN_ERROR_CHUNK_LENGTH:
|
while current >= MIN_ERROR_CHUNK_LENGTH:
|
||||||
testChar = str(current % 10)
|
testChar = str(current % 10)
|
||||||
|
@ -91,6 +92,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
|
||||||
testQuery = "SELECT %s" % (agent.hexConvertField(testQuery) if conf.hexConvert else testQuery)
|
testQuery = "SELECT %s" % (agent.hexConvertField(testQuery) if conf.hexConvert else testQuery)
|
||||||
|
|
||||||
result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
|
result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
|
||||||
|
seen.add(current)
|
||||||
|
|
||||||
if (result or "").startswith(testChar):
|
if (result or "").startswith(testChar):
|
||||||
if result == testChar * current:
|
if result == testChar * current:
|
||||||
|
@ -99,7 +101,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
|
||||||
else:
|
else:
|
||||||
result = re.search(r"\A\w+", result).group(0)
|
result = re.search(r"\A\w+", result).group(0)
|
||||||
candidate = len(result) - len(kb.chars.stop)
|
candidate = len(result) - len(kb.chars.stop)
|
||||||
current = candidate if candidate != current else current - 1
|
current = candidate if candidate != current and candidate not in seen else current - 1
|
||||||
else:
|
else:
|
||||||
current = current // 2
|
current = current // 2
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user