mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-28 17:53:23 +03:00
Cleaning a mess where multi-threaded HTTP requests (in log) had sometimes same UIDs
This commit is contained in:
parent
c0a6e1c3a7
commit
fb7243c237
|
@ -1556,7 +1556,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.lastParserStatus = None
|
kb.lastParserStatus = None
|
||||||
|
|
||||||
kb.locks = AttribDict()
|
kb.locks = AttribDict()
|
||||||
for _ in ("cache", "count", "index", "io", "limit", "log", "value"):
|
for _ in ("cache", "count", "index", "io", "limit", "log", "request", "value"):
|
||||||
kb.locks[_] = threading.Lock()
|
kb.locks[_] = threading.Lock()
|
||||||
|
|
||||||
kb.matchRatio = None
|
kb.matchRatio = None
|
||||||
|
@ -1595,6 +1595,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.redirectSetCookie = None
|
kb.redirectSetCookie = None
|
||||||
kb.reflectiveMechanism = True
|
kb.reflectiveMechanism = True
|
||||||
kb.reflectiveCounters = {REFLECTIVE_COUNTER.MISS: 0, REFLECTIVE_COUNTER.HIT: 0}
|
kb.reflectiveCounters = {REFLECTIVE_COUNTER.MISS: 0, REFLECTIVE_COUNTER.HIT: 0}
|
||||||
|
kb.requestCounter = 0
|
||||||
kb.responseTimes = []
|
kb.responseTimes = []
|
||||||
kb.resumeValues = True
|
kb.resumeValues = True
|
||||||
kb.safeCharEncode = False
|
kb.safeCharEncode = False
|
||||||
|
|
|
@ -179,7 +179,9 @@ class Connect(object):
|
||||||
cpuThrottle(conf.cpuThrottle)
|
cpuThrottle(conf.cpuThrottle)
|
||||||
|
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
threadData.lastRequestUID += 1
|
with kb.locks.request:
|
||||||
|
kb.requestCounter += 1
|
||||||
|
threadData.lastRequestUID = kb.requestCounter
|
||||||
|
|
||||||
url = kwargs.get('url', conf.url)
|
url = kwargs.get('url', conf.url)
|
||||||
get = kwargs.get('get', None)
|
get = kwargs.get('get', None)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user