From 737b4abf1331979fd99b6995a280f1b05d1f921e Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 25 Mar 2011 20:30:15 +0000 Subject: [PATCH] this is a must for partial union. there are lots of cases with dumping of huge tables and user doesn't know a squirt if sqlmap is running or not (compromise is that this is only displayed if the verbose level is not touched by the user) --- lib/techniques/inband/union/use.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index 1719b8853..cb6bdb361 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -13,6 +13,8 @@ import time from lib.core.agent import agent from lib.core.common import Backend from lib.core.common import calculateDeltaSeconds +from lib.core.common import clearConsoleLine +from lib.core.common import dataToStdout from lib.core.common import extractRegexResult from lib.core.common import filterStringValue from lib.core.common import getUnicode @@ -250,6 +252,15 @@ def unionUse(expression, unpack=True, dump=False): value += output parseUnionPage(output, limitedExpr) + if conf.verbose == 1: + length = stopLimit - startLimit + count = num - startLimit + 1 + status = '%d/%d entries (%d%s)' % (count, length, round(100.0*count/length), '%') + dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), status), True) + + if conf.verbose == 1: + clearConsoleLine(True) + except KeyboardInterrupt: print warnMsg = "Ctrl+C detected in dumping phase"