Returns the query output length.
(expression, payload)
| 730 | return getCounter(getTechnique()), safecharencode(_) if kb.safeCharEncode else _ |
| 731 | |
| 732 | def 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 |
no test coverage detected
searching dependent graphs…