Skip to content

Commit 33a6547

Browse files
committed
Fixes #5252
1 parent ad529f2 commit 33a6547

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

lib/core/option.py

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

20992099
kb.locks = AttribDict()
2100-
for _ in ("cache", "connError", "count", "handlers", "hint", "index", "io", "limit", "liveCookies", "log", "socket", "redirect", "request", "value"):
2100+
for _ in ("cache", "connError", "count", "handlers", "hint", "identYwaf", "index", "io", "limit", "liveCookies", "log", "socket", "redirect", "request", "value"):
21012101
kb.locks[_] = threading.Lock()
21022102

21032103
kb.matchRatio = None

lib/core/settings.py

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

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

lib/request/basic.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,14 @@ def processResponse(page, responseHeaders, code=None, status=None):
401401
if not conf.skipWaf and kb.processResponseCounter < IDENTYWAF_PARSE_LIMIT:
402402
rawResponse = "%s %s %s\n%s\n%s" % (_http_client.HTTPConnection._http_vsn_str, code or "", status or "", "".join(getUnicode(responseHeaders.headers if responseHeaders else [])), page[:HEURISTIC_PAGE_SIZE_THRESHOLD])
403403

404-
identYwaf.non_blind.clear()
405-
if identYwaf.non_blind_check(rawResponse, silent=True):
406-
for waf in identYwaf.non_blind:
407-
if waf not in kb.identifiedWafs:
408-
kb.identifiedWafs.add(waf)
409-
errMsg = "WAF/IPS identified as '%s'" % identYwaf.format_name(waf)
410-
singleTimeLogMessage(errMsg, logging.CRITICAL)
404+
with kb.locks.identYwaf:
405+
identYwaf.non_blind.clear()
406+
if identYwaf.non_blind_check(rawResponse, silent=True):
407+
for waf in set(identYwaf.non_blind):
408+
if waf not in kb.identifiedWafs:
409+
kb.identifiedWafs.add(waf)
410+
errMsg = "WAF/IPS identified as '%s'" % identYwaf.format_name(waf)
411+
singleTimeLogMessage(errMsg, logging.CRITICAL)
411412

412413
if kb.originalPage is None:
413414
for regex in (EVENTVALIDATION_REGEX, VIEWSTATE_REGEX):

0 commit comments

Comments
 (0)