Minor patch

This commit is contained in:
Miroslav Stampar
2026-01-17 23:21:13 +01:00
parent 57047ba8cf
commit e62e8c6cea
3 changed files with 8 additions and 8 deletions

View File

@@ -1411,7 +1411,7 @@ def parseJson(content):
"""
This function parses POST_HINT.JSON and POST_HINT.JSON_LIKE content
>>> parseJson("{'id':1}")["id"] == 1
>>> parseJson("{'id':1, 'foo':[2,3,4]}")["id"] == 1
True
>>> parseJson('{"id":1}')["id"] == 1
True
@@ -1429,10 +1429,10 @@ def parseJson(content):
if quote == '"':
retVal = json.loads(content)
elif quote == "'":
content = content.replace('"', '\\"')
content = content.replace("\\'", BOUNDARY_BACKSLASH_MARKER)
content = content.replace("'", '"')
content = content.replace(BOUNDARY_BACKSLASH_MARKER, "'")
def _(match):
return '"%s"' % match.group(1).replace('"', '\\"')
content = re.sub(r"'((?:[^'\\]|\\.)*)'", _, content)
retVal = json.loads(content)
except:
pass

View File

@@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.1.50"
VERSION = "1.10.1.51"
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)