Minor patch

This commit is contained in:
Miroslav Štampar 2026-06-05 13:35:01 +02:00
parent 0ac9883767
commit 5a4a8eed62
3 changed files with 7 additions and 4 deletions

View file

@ -283,6 +283,8 @@ def getBytes(value, encoding=None, errors="strict", unsafe=True):
>>> getBytes(u"foo\\\\x01\\\\x83\\\\xffbar") == b"foo\\x01\\x83\\xffbar"
True
>>> getBytes(u"C:\\\\\\\\x64\\\\secrets.txt") == b"C:\\\\x64\\\\secrets.txt"
True
"""
retVal = value
@ -316,7 +318,8 @@ def getBytes(value, encoding=None, errors="strict", unsafe=True):
retVal = value.encode(UNICODE_ENCODING, errors="replace")
if unsafe:
retVal = re.sub(b"\\\\x([0-9a-f]{2})", lambda _: decodeHex(_.group(1)), retVal)
retVal = re.sub(b"(?<!\\\\)\\\\x([0-9a-fA-F]{2})", lambda _: decodeHex(_.group(1)), retVal)
retVal = retVal.replace(b"\\\\x", b"\\x")
return retVal

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.6.45"
VERSION = "1.10.6.46"
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)