mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Minor patch (safer alternative)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user