From 39c6c9f38668f4a753d25edc00ff7c7574da6d76 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 15 Nov 2010 12:19:22 +0000 Subject: [PATCH] minor update --- lib/controller/checks.py | 7 ++++--- lib/controller/controller.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index ba298e3cd..a4f738060 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -405,15 +405,16 @@ def checkNullConnection(): return kb.nullConnection is not None -def checkConnection(): +def checkConnection(suppressOutput=False): try: socket.gethostbyname(conf.hostname) except socket.gaierror: errMsg = "host '%s' does not exist" % conf.hostname raise sqlmapConnectionException, errMsg - infoMsg = "testing connection to the target url" - logger.info(infoMsg) + if not suppressOutput: + infoMsg = "testing connection to the target url" + logger.info(infoMsg) try: page, _ = Request.queryPage(content=True) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index aadd5fc9b..7887a385c 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -193,7 +193,7 @@ def start(): setupTargetEnv() - if not checkConnection() or not checkString() or not checkRegexp(): + if not checkConnection(conf.forms) or not checkString() or not checkRegexp(): continue if conf.nullConnection: @@ -361,7 +361,7 @@ def start(): e = getUnicode(e) if conf.multipleTargets: - e += ", skipping to next url" + e += ", skipping to the next %s" % ("form" if conf.forms else "url") logger.error(e) else: logger.critical(e)