mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
Speedup of caching for char encoding (non-Unicode chars in page)
This commit is contained in:
@@ -259,7 +259,7 @@ def getHeuristicCharEncoding(page):
|
||||
"""
|
||||
|
||||
key = hash(page)
|
||||
retVal = kb.cache.encoding.get(key) or detect(page[:HEURISTIC_PAGE_SIZE_THRESHOLD])["encoding"]
|
||||
retVal = kb.cache.encoding[key] if key in kb.cache.encoding else detect(page[:HEURISTIC_PAGE_SIZE_THRESHOLD])["encoding"]
|
||||
kb.cache.encoding[key] = retVal
|
||||
|
||||
if retVal and retVal.lower().replace('-', "") == UNICODE_ENCODING.lower().replace('-', ""):
|
||||
|
||||
@@ -252,6 +252,9 @@ class Connect(object):
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
break
|
||||
|
||||
if conf.yuge:
|
||||
retVal = 100 * retVal
|
||||
|
||||
return retVal
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user