Skip to content

Commit 8a78370

Browse files
committed
Fixes #4464
1 parent 760563d commit 8a78370

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.12.14"
21+
VERSION = "1.4.12.15"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/techniques/error/use.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
8080
debugMsg = "searching for error chunk length..."
8181
logger.debug(debugMsg)
8282

83+
seen = set()
8384
current = MAX_ERROR_CHUNK_LENGTH
8485
while current >= MIN_ERROR_CHUNK_LENGTH:
8586
testChar = str(current % 10)
@@ -91,6 +92,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
9192
testQuery = "SELECT %s" % (agent.hexConvertField(testQuery) if conf.hexConvert else testQuery)
9293

9394
result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
95+
seen.add(current)
9496

9597
if (result or "").startswith(testChar):
9698
if result == testChar * current:
@@ -99,7 +101,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
99101
else:
100102
result = re.search(r"\A\w+", result).group(0)
101103
candidate = len(result) - len(kb.chars.stop)
102-
current = candidate if candidate != current else current - 1
104+
current = candidate if candidate != current and candidate not in seen else current - 1
103105
else:
104106
current = current // 2
105107

0 commit comments

Comments
 (0)