mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
update (smaller memory footprint in postprocessing phase because of safecharencode part)
This commit is contained in:
parent
5770c08784
commit
6bbb8139a0
|
@ -1442,6 +1442,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.reflectiveCounters = {REFLECTIVE_COUNTER.MISS:0, REFLECTIVE_COUNTER.HIT:0}
|
||||
kb.responseTimes = []
|
||||
kb.resumedQueries = {}
|
||||
kb.safeCharEncode = False
|
||||
kb.singleLogFlags = set()
|
||||
kb.skipOthersDbms = None
|
||||
kb.suppressSession = False
|
||||
|
|
|
@ -28,7 +28,6 @@ from lib.core.common import randomInt
|
|||
from lib.core.common import readInput
|
||||
from lib.core.common import replaceNewlineTabs
|
||||
from lib.core.common import safeStringFormat
|
||||
from lib.core.convert import safecharencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -401,6 +400,8 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
|||
(if selected).
|
||||
"""
|
||||
|
||||
kb.safeCharEncode = safeCharEncode
|
||||
|
||||
if suppressOutput is not None:
|
||||
pushValue(getCurrentThreadData().disableStdOut)
|
||||
getCurrentThreadData().disableStdOut = suppressOutput
|
||||
|
@ -499,8 +500,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
|||
elif value == [None]:
|
||||
value = None
|
||||
|
||||
if safeCharEncode:
|
||||
value = safecharencode(value)
|
||||
kb.safeCharEncode = False
|
||||
|
||||
return value
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ from lib.core.common import replaceNewlineTabs
|
|||
from lib.core.common import safeStringFormat
|
||||
from lib.core.common import singleTimeWarnMessage
|
||||
from lib.core.common import unhandledExceptionMessage
|
||||
from lib.core.convert import safecharencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -521,4 +522,4 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
if kb.threadException:
|
||||
raise sqlmapThreadException, "something unexpected happened inside the threads"
|
||||
|
||||
return queriesCount[0], finalValue
|
||||
return queriesCount[0], safecharencode(finalValue) if kb.safeCharEncode else finalValue
|
||||
|
|
|
@ -131,7 +131,7 @@ def __oneShotErrorUse(expression, field):
|
|||
|
||||
dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, replaceNewlineTabs(retVal)))
|
||||
|
||||
return retVal
|
||||
return safecharencode(retVal) if kb.safeCharEncode else retVal
|
||||
|
||||
def __errorFields(expression, expressionFields, expressionFieldsList, expected=None, num=None, resumeValue=True):
|
||||
outputs = []
|
||||
|
|
|
@ -97,7 +97,7 @@ def __oneShotUnionUse(expression, unpack=True):
|
|||
warnMsg += "issues)"
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
|
||||
return output
|
||||
return safecharencode(output) if kb.safeCharEncode else output
|
||||
|
||||
def configUnion(char=None, columns=None):
|
||||
def __configUnionChar(char):
|
||||
|
|
Loading…
Reference in New Issue
Block a user