From 823119a247070f116868f97547d70c4cdd1add50 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 16 Jul 2019 13:37:41 +0200 Subject: [PATCH] Update regarding #3826 --- lib/core/option.py | 11 +++++++++-- lib/core/settings.py | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 9c3076218..0c49093d8 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -455,12 +455,14 @@ def _findPageForms(): if conf.url and not checkConnection(): return + found = False infoMsg = "searching for forms" logger.info(infoMsg) if not any((conf.bulkFile, conf.googleDork, conf.sitemapUrl)): page, _, _ = Request.queryPage(content=True) - findPageForms(page, conf.url, True, True) + if findPageForms(page, conf.url, True, True): + found = True else: if conf.bulkFile: targets = getFileItems(conf.bulkFile) @@ -473,7 +475,8 @@ def _findPageForms(): try: target = targets[i] page, _, _ = Request.getPage(url=target.strip(), cookie=conf.cookie, crawling=True, raise404=False) - findPageForms(page, target, False, True) + if findPageForms(page, target, False, True): + found = True if conf.verbose in (1, 2): status = '%d/%d links visited (%d%%)' % (i + 1, len(targets), round(100.0 * (i + 1) / len(targets))) @@ -484,6 +487,10 @@ def _findPageForms(): errMsg = "problem occurred while searching for forms at '%s' ('%s')" % (target, getSafeExString(ex)) logger.error(errMsg) + if not found: + warnMsg = "no forms found" + logger.warn(warnMsg) + def _setDBMSAuthentication(): """ Check and set the DBMS authentication credentials to run statements as diff --git a/lib/core/settings.py b/lib/core/settings.py index 2de3b52f0..5580d994c 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.7.24" +VERSION = "1.3.7.25" 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)