diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index e36f2ef67..c9f468313 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -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"