MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / queryOutputLength

Function queryOutputLength

lib/techniques/blind/inference.py:732–751  ·  view source on GitHub ↗

Returns the query output length.

(expression, payload)

Source from the content-addressed store, hash-verified

730 return getCounter(getTechnique()), safecharencode(_) if kb.safeCharEncode else _
731
732def queryOutputLength(expression, payload):
733 """
734 Returns the query output length.
735 """
736
737 infoMsg = "retrieving the length of query output"
738 logger.info(infoMsg)
739
740 start = time.time()
741
742 lengthExprUnescaped = agent.forgeQueryOutputLength(expression)
743 count, length = bisection(payload, lengthExprUnescaped, charsetType=CHARSET_TYPE.DIGITS)
744
745 debugMsg = "performed %d quer%s in %.2f seconds" % (count, 'y' if count == 1 else "ies", calculateDeltaSeconds(start))
746 logger.debug(debugMsg)
747
748 if isinstance(length, six.string_types) and length.isspace():
749 length = 0
750
751 return length

Callers 1

_goInferenceFunction · 0.90

Calls 5

calculateDeltaSecondsFunction · 0.90
bisectionFunction · 0.85
infoMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…