minor fix (writing to HashDB on any interrupt)

This commit is contained in:
Miroslav Stampar 2012-03-16 10:15:43 +00:00
parent 577caac4de
commit b130a9e14e

View File

@ -517,6 +517,12 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
finally:
setFormatterPrependFlag(False)
if finalValue is not None:
finalValue = decodeHexValue(finalValue) if conf.hexConvert else finalValue
hashDBWrite(expression, finalValue)
else:
hashDBWrite(expression, "%s%s" % (PARTIAL_VALUE_MARKER, partialValue))
if conf.verbose in (1, 2) or showEta:
dataToStdout("\n")
@ -524,12 +530,6 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
infoMsg = "retrieved: %s" % filterControlChars(finalValue)
logger.info(infoMsg)
if finalValue is not None:
finalValue = decodeHexValue(finalValue) if conf.hexConvert else finalValue
hashDBWrite(expression, finalValue)
else:
hashDBWrite(expression, "%s%s" % (PARTIAL_VALUE_MARKER, partialValue))
if kb.threadException:
raise sqlmapThreadException, "something unexpected happened inside the threads"