Minor refactoring

This commit is contained in:
Miroslav Stampar
2025-07-09 20:53:58 +02:00
parent 71e18a98d2
commit ea892f9d62
3 changed files with 6 additions and 9 deletions

View File

@@ -16,7 +16,6 @@ from lib.core.threads import getCurrentThreadData
_cache = {}
_cache_lock = threading.Lock()
_method_locks = {}
def cachedmethod(f):
"""
@@ -87,14 +86,12 @@ def stackedmethod(f):
return _
def lockedmethod(f):
lock = threading.RLock()
@functools.wraps(f)
def _(*args, **kwargs):
if f not in _method_locks:
_method_locks[f] = threading.RLock()
with _method_locks[f]:
with lock:
result = f(*args, **kwargs)
return result
return _

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.7.0"
VERSION = "1.9.7.1"
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)