Improvement regarding #5171

This commit is contained in:
Miroslav Stampar 2022-09-13 22:59:34 +02:00
parent 111620e395
commit 70665c5d2b
3 changed files with 8 additions and 3 deletions

View File

@ -2045,6 +2045,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
kb.delayCandidates = TIME_DELAY_CANDIDATES * [0]
kb.dep = None
kb.disableHtmlDecoding = False
kb.disableShiftTable = False
kb.dnsMode = False
kb.dnsTest = None
kb.docRoot = None

View File

@ -20,7 +20,7 @@ from thirdparty import six
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.6.9.0"
VERSION = "1.6.9.1"
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

@ -274,9 +274,11 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
originalTbl = type(charTbl)(charTbl)
if continuousOrder and shiftTable is None:
if kb.disableShiftTable:
shiftTable = None
elif continuousOrder and shiftTable is None:
# Used for gradual expanding into unicode charspace
shiftTable = [2, 2, 3, 3, 5, 4]
shiftTable = [2, 2, 3, 3, 3]
if "'%s'" % CHAR_INFERENCE_MARK in payload:
for char in ('\n', '\r'):
@ -358,6 +360,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
kb.responseTimePayload = None
result = Request.queryPage(forgedPayload, timeBasedCompare=timeBasedCompare, raise404=False)
incrementCounter(getTechnique())
if not timeBasedCompare and getTechniqueData() is not None:
@ -405,6 +408,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
maxChar = maxValue = charTbl[-1]
minValue = charTbl[0]
else:
kb.disableShiftTable = True
return None
else:
retVal = minValue + 1