diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index d0c80312c..6ac8fcd9d 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -225,16 +225,7 @@ def unionUse(expression, unpack=True, dump=False): if output: count = parseUnionPage(output, countedExpression) - if (not count or (count.isdigit() and int(count) == 0)): - warnMsg = "it was not possible to count the number " - warnMsg += "of entries for the used SQL query. " - warnMsg += "sqlmap will assume that it returns only " - warnMsg += "one entry" - logger.warn(warnMsg) - - stopLimit = 1 - - elif isNumPosStrValue(count): + if isNumPosStrValue(count): if isinstance(stopLimit, int) and stopLimit > 0: stopLimit = min(int(count), int(stopLimit)) else: @@ -244,6 +235,15 @@ def unionUse(expression, unpack=True, dump=False): infoMsg += "%d entries" % stopLimit logger.info(infoMsg) + else: + warnMsg = "it was not possible to count the number " + warnMsg += "of entries for the used SQL query. " + warnMsg += "sqlmap will assume that it returns only " + warnMsg += "one entry" + logger.warn(warnMsg) + + stopLimit = 1 + try: if stopLimit > TURN_OFF_RESUME_INFO_LIMIT: kb.suppressResumeInfo = True