Minor patch (safer alternative)

This commit is contained in:
Miroslav Stampar
2025-09-14 22:23:54 +02:00
parent f79e774d31
commit f7aa757a9f
3 changed files with 6 additions and 6 deletions

View File

@@ -43,11 +43,11 @@ def cachedmethod(f):
def _f(*args, **kwargs):
parts = (
f.__module__ + "." + f.__name__,
"|".join(repr(a) for a in args),
"|".join("%s=%r" % (k, kwargs[k]) for k in sorted(kwargs))
"^".join(repr(a) for a in args),
"^".join("%s=%r" % (k, kwargs[k]) for k in sorted(kwargs))
)
try:
key = int(hashlib.md5("|".join(parts).encode(UNICODE_ENCODING)).hexdigest(), 16) & 0x7fffffffffffffff
key = int(hashlib.md5("`".join(parts).encode(UNICODE_ENCODING)).hexdigest(), 16) & 0x7fffffffffffffff
except ValueError: # https://github.com/sqlmapproject/sqlmap/issues/4281 (NOTE: non-standard Python behavior where hexdigest returns binary value)
result = f(*args, **kwargs)
else:

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.9.9.2"
VERSION = "1.9.9.3"
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)