From 779b352f6b710504598abe6d032f2b157a3577b9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 6 Jan 2021 15:47:50 +0100 Subject: [PATCH] Minor cosmetics --- lib/core/settings.py | 2 +- lib/request/connect.py | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index a32ca3e8f..f7c130787 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.5.1.10" +VERSION = "1.5.1.11" 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) diff --git a/lib/request/connect.py b/lib/request/connect.py index e228b3667..66be54d27 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -193,11 +193,18 @@ class Connect(object): warnMsg += "(e.g. 'https://help.ubuntu.com/community/Tor')" else: warnMsg = "if the problem persists please check that the provided " - warnMsg += "target URL is reachable. In case that it is, " - warnMsg += "you can try to rerun with " + warnMsg += "target URL is reachable" + + items = [] if not conf.randomAgent: - warnMsg += "switch '--random-agent' and/or " - warnMsg += "proxy switches ('--ignore-proxy', '--proxy',...)" + items.append("switch '--random-agent'") + if not any((conf.proxy, conf.proxyFile, conf.tor)): + items.append("proxy switches ('--proxy', '--proxy-file'...)") + if items: + warnMsg += ". In case that it is, " + warnMsg += "you can try to rerun with " + warnMsg += " and/or ".join(items) + singleTimeWarnMessage(warnMsg) elif conf.threads > 1: