diff --git a/lib/core/decorators.py b/lib/core/decorators.py index 6f7ce5cae..c3823dd19 100644 --- a/lib/core/decorators.py +++ b/lib/core/decorators.py @@ -5,6 +5,8 @@ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'LICENSE' for copying permission """ +import hashlib + def cachedmethod(f, cache={}): """ Method with a cached content @@ -13,14 +15,9 @@ def cachedmethod(f, cache={}): """ def _(*args, **kwargs): - try: - key = hash((f, tuple(args), frozenset(kwargs.items()))) - if key not in cache: - cache[key] = f(*args, **kwargs) - except: - key = hash("".join(str(_) for _ in (f, args, kwargs))) - if key not in cache: - cache[key] = f(*args, **kwargs) + key = int(hashlib.md5("".join(str(_) for _ in (f, args, kwargs))).hexdigest()[:8], 16) + if key not in cache: + cache[key] = f(*args, **kwargs) return cache[key] diff --git a/lib/core/settings.py b/lib/core/settings.py index c77767281..18f36275b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.1.12.26" +VERSION = "1.1.12.27" 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) diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 099400028..f340762f1 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -31,7 +31,7 @@ d2cdb9e832e18a81e936ca3348144b16 lib/controller/handler.py 5c918135b3776bb129edbfdd422ece1b lib/core/convert.py 90b1b08368ac8a859300e6fa6a8c796e lib/core/data.py 1c14bdbf47b8dba31f73da9ad731a54a lib/core/datatype.py -2c16cdbbccbfcfc0ddac2cff876ce9f3 lib/core/decorators.py +a73da01cee9d00ba385b05adc4903037 lib/core/decorators.py d3ed5f9baa074df33390d33164d9d8b5 lib/core/defaults.py 1c428d1b036ff81b459121a0e57925c9 lib/core/dicts.py 956be8ca65c7f04f08c6f2dce710b3b2 lib/core/dump.py @@ -46,7 +46,7 @@ f872699e948d0692ce11b54781da814c lib/core/log.py 760d9df2a27ded29109b390ab202e72d lib/core/replication.py a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py 02d4762140a72fd44668d3dab5eabda9 lib/core/session.py -1f35b3da2c4497b5fb39f50a6d8e0738 lib/core/settings.py +c9d7d58cff59c79667e150b3fd6bcd6c lib/core/settings.py 35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py d93501771b41315f9fb949305b6ed257 lib/core/target.py