diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 4456db1f1..f43dbbc21 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -310,15 +310,22 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False): infoMsg += "%d entries" % stopLimit logger.info(infoMsg) - else: + elif count and not count.isdigit(): warnMsg = "it was not possible to count the number " - warnMsg += "of entries for the used SQL query. " + warnMsg += "of entries for the SQL query provided. " warnMsg += "sqlmap will assume that it returns only " warnMsg += "one entry" logger.warn(warnMsg) stopLimit = 1 + elif (not count or int(count) == 0): + warnMsg = "the SQL query provided does not " + warnMsg += "return any output" + logger.warn(warnMsg) + + return outputs + threadData = getCurrentThreadData() threadData.shared.limits = iter(xrange(startLimit, stopLimit)) numThreads = min(conf.threads, (stopLimit - startLimit)) diff --git a/lib/techniques/union/use.py b/lib/techniques/union/use.py index b95752e5a..9fa1a46fe 100644 --- a/lib/techniques/union/use.py +++ b/lib/techniques/union/use.py @@ -251,15 +251,22 @@ def unionUse(expression, unpack=True, dump=False): infoMsg += "%d entries" % stopLimit logger.info(infoMsg) - else: + elif count and not count.isdigit(): warnMsg = "it was not possible to count the number " - warnMsg += "of entries for the used SQL query. " + warnMsg += "of entries for the SQL query provided. " warnMsg += "sqlmap will assume that it returns only " warnMsg += "one entry" logger.warn(warnMsg) stopLimit = 1 + elif (not count or int(count) == 0): + warnMsg = "the SQL query provided does not " + warnMsg += "return any output" + logger.warn(warnMsg) + + return outputs + threadData = getCurrentThreadData() threadData.shared.limits = iter(xrange(startLimit, stopLimit)) numThreads = min(conf.threads, (stopLimit - startLimit))