mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-20 13:29:02 +00:00
Minor patch
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user