mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-17 21:48:59 +00:00
Fix for interrupted --first/--last corrupting stored value
This commit is contained in:
parent
6aa218f720
commit
eda9b00185
2 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.19"
|
||||
VERSION = "1.10.11.20"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
threadData = getCurrentThreadData()
|
||||
threadData.lowCardHit = False # set when this value is confirmed by the (self-verifying) low-card guess
|
||||
timeBasedCompare = (getTechnique() in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED))
|
||||
retVal = hashDBRetrieve(expression, checkConf=True)
|
||||
retVal = hashDBRetrieve(expression, checkConf=True) if not (conf.firstChar or conf.lastChar) else None # Note: stored (complete) value doesn't correspond to a --first/--last range
|
||||
|
||||
if retVal:
|
||||
if conf.repair and INFERENCE_UNKNOWN_CHAR in retVal:
|
||||
|
|
@ -1251,7 +1251,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
and 0 < len(finalValue) <= PREDICTION_FEEDBACK_MAX_LENGTH
|
||||
and len(kb.commonOutputs.get(kb.partRun) or ()) < PREDICTION_FEEDBACK_MAX_ITEMS):
|
||||
kb.commonOutputs.setdefault(kb.partRun, set()).add(finalValue)
|
||||
elif partialValue:
|
||||
elif partialValue and not (conf.firstChar or conf.lastChar): # Note: same as above (otherwise resumed as the start of the complete value)
|
||||
hashDBWrite(expression, "%s%s" % (PARTIAL_VALUE_MARKER if not conf.hexConvert else PARTIAL_HEX_VALUE_MARKER, partialValue))
|
||||
|
||||
if conf.hexConvert and not any((abortedFlag, conf.api, kb.bruteMode)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue