From d63401632c0382b5ef3b2248b77f99532505b8be Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 26 Aug 2021 18:08:48 +0200 Subject: [PATCH] Fixes #4776 --- lib/controller/controller.py | 12 ++++++------ lib/core/settings.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 14a2174bb..e10a1d78b 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -295,10 +295,12 @@ def start(): infoMsg = "found a total of %d targets" % len(kb.targets) logger.info(infoMsg) - hostCount = 0 + targetCount = 0 initialHeaders = list(conf.httpHeaders) for targetUrl, targetMethod, targetData, targetCookie, targetHeaders in kb.targets: + targetCount += 1 + try: if conf.checkInternet: infoMsg = "checking for Internet connection" @@ -375,12 +377,10 @@ def start(): continue if conf.multipleTargets: - hostCount += 1 - if conf.forms and conf.method: - message = "[#%d] form:\n%s %s" % (hostCount, conf.method, targetUrl) + message = "[%d/%d] Form:\n%s %s" % (targetCount, len(kb.targets), conf.method, targetUrl) else: - message = "URL %d:\n%s %s" % (hostCount, HTTPMETHOD.GET, targetUrl) + message = "[%d/%d] URL:\n%s %s" % (targetCount, len(kb.targets), HTTPMETHOD.GET, targetUrl) if conf.cookie: message += "\nCookie: %s" % conf.cookie @@ -738,7 +738,7 @@ def start(): if conf.multipleTargets: _saveToResultsFile() - errMsg += ", skipping to the next %s" % ("form" if conf.forms else "URL") + errMsg += ", skipping to the next target" logger.error(errMsg.lstrip(", ")) else: logger.critical(errMsg) diff --git a/lib/core/settings.py b/lib/core/settings.py index d5f4a8316..7916dbdc6 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.5.8.5" +VERSION = "1.5.8.6" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)