Minor patch

This commit is contained in:
Miroslav Štampar
2026-08-23 17:12:19 +02:00
parent 0ee19bdf3d
commit 91239a3c10
2 changed files with 8 additions and 5 deletions
+7 -4
View File
@@ -1529,6 +1529,8 @@ def cleanQuery(query):
>>> cleanQuery("select id from users")
'SELECT id FROM users'
>>> cleanQuery("select a from selected where b='from'")
"SELECT a FROM selected WHERE b='from'"
"""
retVal = query
@@ -1544,10 +1546,11 @@ def cleanQuery(query):
if not candidate or candidate.lower() not in queryLower:
continue
queryMatch = re.search(r"(?i)\b(%s)\b" % candidate, query)
if queryMatch and "sys_exec" not in query:
retVal = retVal.replace(queryMatch.group(1), candidate.upper())
if "sys_exec" not in query:
# NOTE: the leading branch consumes whole quoted parts (hence keeping keyword-alike data
# and case sensitive quoted identifiers intact), while the keyword itself is switched only
# at word boundaries (e.g. 'selected' must not turn into 'SELECTed')
retVal = re.sub(r"(?i)('[^']*'|\"[^\"]*\")|\b%s\b" % candidate, lambda match: match.group(1) or candidate.upper(), retVal)
return retVal
+1 -1
View File
@@ -20,7 +20,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.8.53"
VERSION = "1.10.8.54"
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)