mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
compatibility with partial union and error technique resumed data
This commit is contained in:
parent
58a4a02b7e
commit
f622995a29
|
@ -472,7 +472,6 @@ def checkSqlInjection(place, parameter, value):
|
|||
injection.data[stype].comment = comment
|
||||
injection.data[stype].templatePayload = templatePayload
|
||||
injection.data[stype].matchRatio = kb.matchRatio
|
||||
injection.data[stype].chars = kb.chars
|
||||
|
||||
injection.conf.textOnly = conf.textOnly
|
||||
injection.conf.titles = conf.titles
|
||||
|
|
|
@ -176,12 +176,16 @@ def __saveToSessionFile():
|
|||
|
||||
setInjection(inj)
|
||||
|
||||
def __saveAbsFilePaths():
|
||||
def __saveToHashDB():
|
||||
key = "kb.absFilePaths"
|
||||
value = unserializeObject(conf.hashDB.retrieve(key)) or set()
|
||||
value.update(kb.absFilePaths)
|
||||
conf.hashDB.write(key, serializeObject(value))
|
||||
|
||||
key = "kb.chars"
|
||||
if not conf.hashDB.retrieve(key):
|
||||
conf.hashDB.write(key, serializeObject(kb.chars))
|
||||
|
||||
def __saveToResultsFile():
|
||||
if not conf.resultsFP:
|
||||
return
|
||||
|
@ -568,7 +572,7 @@ def start():
|
|||
|
||||
__saveToSessionFile()
|
||||
__saveToResultsFile()
|
||||
__saveAbsFilePaths()
|
||||
__saveToHashDB()
|
||||
__showInjections()
|
||||
__selectInjection()
|
||||
|
||||
|
|
|
@ -2505,7 +2505,6 @@ def initTechnique(technique=None):
|
|||
if data:
|
||||
kb.pageTemplate, kb.errorIsNone = getPageTemplate(data.templatePayload, kb.injection.place)
|
||||
kb.matchRatio = data.matchRatio
|
||||
kb.chars = data.chars
|
||||
|
||||
# Restoring stored conf options
|
||||
for key, value in kb.injection.conf.items():
|
||||
|
|
|
@ -210,6 +210,7 @@ def __resumeHashDBValues():
|
|||
"""
|
||||
|
||||
kb.absFilePaths = unserializeObject(conf.hashDB.retrieve("kb.absFilePaths")) or kb.absFilePaths
|
||||
kb.chars = unserializeObject(conf.hashDB.retrieve("kb.chars")) or kb.chars
|
||||
|
||||
def __setOutputResume():
|
||||
"""
|
||||
|
|
|
@ -130,6 +130,10 @@ def __oneShotErrorUse(expression, field):
|
|||
|
||||
conf.hashDB.write(expression, retVal)
|
||||
|
||||
else:
|
||||
check = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)
|
||||
retVal = extractRegexResult(check, retVal, re.DOTALL | re.IGNORECASE) or retVal
|
||||
|
||||
return safecharencode(retVal) if kb.safeCharEncode else retVal
|
||||
|
||||
def __errorFields(expression, expressionFields, expressionFieldsList, expected=None, num=None, resumeValue=True):
|
||||
|
|
Loading…
Reference in New Issue
Block a user