Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e14647

Browse files
committed
Minor refactoring
1 parent bfe8785 commit 0e14647

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

lib/core/option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
19291929
kb.lastParserStatus = None
19301930

19311931
kb.locks = AttribDict()
1932-
for _ in ("cache", "connError", "count", "handlers", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
1932+
for _ in ("cache", "connError", "count", "handlers", "hint", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
19331933
kb.locks[_] = threading.Lock()
19341934

19351935
kb.matchRatio = None

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.8.10"
21+
VERSION = "1.3.8.11"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/techniques/blind/inference.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from __future__ import division
99

1010
import re
11-
import threading
1211
import time
1312

1413
from extra.safe2bin.safe2bin import safecharencode
@@ -190,10 +189,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
190189
else:
191190
dataToStdout("\r[%s] [INFO] retrieved: " % time.strftime("%X"))
192191

193-
hintlock = threading.Lock()
194-
195192
def tryHint(idx):
196-
with hintlock:
193+
with kb.locks.hint:
197194
hintValue = kb.hintValue
198195

199196
if payload is not None and len(hintValue or "") > 0 and len(hintValue) >= idx:
@@ -212,7 +209,7 @@ def tryHint(idx):
212209
if result:
213210
return hintValue[idx - 1]
214211

215-
with hintlock:
212+
with kb.locks.hint:
216213
kb.hintValue = ""
217214

218215
return None

0 commit comments

Comments
 (0)