Skip to content

Commit f5ed2c0

Browse files
committed
Fixes #4990
1 parent dd55d97 commit f5ed2c0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/core/agent.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def payload(self, place=None, parameter=None, value=None, newValue=None, where=N
129129
if kb.postHint in (POST_HINT.SOAP, POST_HINT.XML):
130130
origValue = re.split(r"['\">]", origValue)[-1]
131131
elif kb.postHint in (POST_HINT.JSON, POST_HINT.JSON_LIKE):
132-
origValue = extractRegexResult(r":\s*['\"]?(?P<result>\w+\Z)", origValue) or extractRegexResult(r'(?s)[\s:]*(?P<result>[^"\[,]+\Z)', origValue)
132+
match = re.search(r"['\"]", origValue)
133+
quote = match.group(0) if match else '"'
134+
origValue = extractRegexResult(r"%s\s*:\s*(?P<result>\d+)\Z" % quote, origValue) or extractRegexResult(r"(?P<result>[^%s]*)\Z" % quote, origValue)
133135
else:
134136
_ = extractRegexResult(r"(?s)(?P<result>[^\s<>{}();'\"&]+\Z)", origValue) or ""
135137
origValue = _.split('=', 1)[1] if '=' in _ else ""

lib/core/settings.py

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

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

0 commit comments

Comments
 (0)