mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor refactoring
This commit is contained in:
parent
bfe8785ed5
commit
0e14647573
|
@ -1929,7 +1929,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.lastParserStatus = None
|
||||
|
||||
kb.locks = AttribDict()
|
||||
for _ in ("cache", "connError", "count", "handlers", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
|
||||
for _ in ("cache", "connError", "count", "handlers", "hint", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
|
||||
kb.locks[_] = threading.Lock()
|
||||
|
||||
kb.matchRatio = None
|
||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.8.10"
|
||||
VERSION = "1.3.8.11"
|
||||
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)
|
||||
|
|
|
@ -8,7 +8,6 @@ See the file 'LICENSE' for copying permission
|
|||
from __future__ import division
|
||||
|
||||
import re
|
||||
import threading
|
||||
import time
|
||||
|
||||
from extra.safe2bin.safe2bin import safecharencode
|
||||
|
@ -190,10 +189,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
else:
|
||||
dataToStdout("\r[%s] [INFO] retrieved: " % time.strftime("%X"))
|
||||
|
||||
hintlock = threading.Lock()
|
||||
|
||||
def tryHint(idx):
|
||||
with hintlock:
|
||||
with kb.locks.hint:
|
||||
hintValue = kb.hintValue
|
||||
|
||||
if payload is not None and len(hintValue or "") > 0 and len(hintValue) >= idx:
|
||||
|
@ -212,7 +209,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
if result:
|
||||
return hintValue[idx - 1]
|
||||
|
||||
with hintlock:
|
||||
with kb.locks.hint:
|
||||
kb.hintValue = ""
|
||||
|
||||
return None
|
||||
|
|
Loading…
Reference in New Issue
Block a user