This commit is contained in:
Miroslav Stampar 2016-05-14 14:18:34 +02:00
parent ad0ca69579
commit 75478c1181
2 changed files with 6 additions and 3 deletions

View File

@ -15,10 +15,13 @@ def cachedmethod(f, cache={}):
def _(*args, **kwargs): def _(*args, **kwargs):
try: try:
key = (f, tuple(args), frozenset(kwargs.items())) key = (f, tuple(args), frozenset(kwargs.items()))
if key not in cache:
cache[key] = f(*args, **kwargs)
except: except:
key = "".join(str(_) for _ in (f, args, kwargs)) key = "".join(str(_) for _ in (f, args, kwargs))
if key not in cache: if key not in cache:
cache[key] = f(*args, **kwargs) cache[key] = f(*args, **kwargs)
return cache[key] return cache[key]
return _ return _

View File

@ -19,7 +19,7 @@ from lib.core.enums import OS
from lib.core.revision import getRevisionNumber from lib.core.revision import getRevisionNumber
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.0.5.23" VERSION = "1.0.5.24"
REVISION = getRevisionNumber() REVISION = getRevisionNumber()
STABLE = VERSION.count('.') <= 2 STABLE = VERSION.count('.') <= 2
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev") VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")