diff --git a/lib/core/decorators.py b/lib/core/decorators.py index 93019ad89..2ea6bb8e6 100644 --- a/lib/core/decorators.py +++ b/lib/core/decorators.py @@ -15,10 +15,13 @@ def cachedmethod(f, cache={}): def _(*args, **kwargs): try: key = (f, tuple(args), frozenset(kwargs.items())) + if key not in cache: + cache[key] = f(*args, **kwargs) except: key = "".join(str(_) for _ in (f, args, kwargs)) - if key not in cache: - cache[key] = f(*args, **kwargs) + if key not in cache: + cache[key] = f(*args, **kwargs) + return cache[key] return _ diff --git a/lib/core/settings.py b/lib/core/settings.py index 556aaa423..d8a6e6ba1 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from lib.core.revision import getRevisionNumber # sqlmap version (...) -VERSION = "1.0.5.23" +VERSION = "1.0.5.24" REVISION = getRevisionNumber() STABLE = VERSION.count('.') <= 2 VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")