mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-12 01:29:02 +00:00
Minor update
This commit is contained in:
@@ -103,6 +103,17 @@ def stackedmethod(f):
|
||||
return _
|
||||
|
||||
def lockedmethod(f):
|
||||
"""
|
||||
Decorates a function or method with a reentrant lock (only one thread can execute the function at a time)
|
||||
|
||||
>>> @lockedmethod
|
||||
... def recursive_count(n):
|
||||
... if n <= 0: return 0
|
||||
... return n + recursive_count(n - 1)
|
||||
>>> recursive_count(5)
|
||||
15
|
||||
"""
|
||||
|
||||
lock = threading.RLock()
|
||||
|
||||
@functools.wraps(f)
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.1.19"
|
||||
VERSION = "1.10.1.20"
|
||||
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)
|
||||
|
||||
@@ -248,6 +248,7 @@ def checkCharEncoding(encoding, warn=True):
|
||||
|
||||
return encoding
|
||||
|
||||
@lockedmethod
|
||||
def getHeuristicCharEncoding(page):
|
||||
"""
|
||||
Returns page encoding charset detected by usage of heuristics
|
||||
|
||||
Reference in New Issue
Block a user