mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Error chunk length bug fix (reported privately)
This commit is contained in:
parent
b43c1747e0
commit
6f3511dcc3
|
@ -74,12 +74,15 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
|
|||
testChar = str(current % 10)
|
||||
testQuery = "SELECT %s('%s',%d)" % ("REPEAT" if Backend.isDbms(DBMS.MYSQL) else "REPLICATE", testChar, current)
|
||||
result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
|
||||
|
||||
if result and testChar in result:
|
||||
if result == testChar * current:
|
||||
kb.errorChunkLength = current
|
||||
break
|
||||
else:
|
||||
current = len(result) - len(kb.chars.stop)
|
||||
result = re.search(r"\A\w+", result).group(0)
|
||||
candidate = len(result) - len(kb.chars.stop)
|
||||
current = candidate if candidate != current else current - 1
|
||||
else:
|
||||
current = current / 2
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user