From 6f97f4796bb22b5b2a12b7f9e0e9dabd7182fdf7 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 24 May 2016 16:34:07 +0200 Subject: [PATCH] Fixes #1891 --- lib/core/common.py | 37 +++++++++++++++++++------------------ lib/core/settings.py | 2 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 409cdb34c..11bf1e42e 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -650,27 +650,28 @@ def paramToDict(place, parameters=None): testableParameters[parameter] = re.sub(regex, "\g<1>%s\g<2>" % BOUNDED_INJECTION_MARKER, testableParameters[parameter]) break - if conf.testParameter and not testableParameters: - paramStr = ", ".join(test for test in conf.testParameter) + if conf.testParameter: + if not testableParameters: + paramStr = ", ".join(test for test in conf.testParameter) - if len(conf.testParameter) > 1: - warnMsg = "provided parameters '%s' " % paramStr - warnMsg += "are not inside the %s" % place - logger.warn(warnMsg) - else: - parameter = conf.testParameter[0] + if len(conf.testParameter) > 1: + warnMsg = "provided parameters '%s' " % paramStr + warnMsg += "are not inside the %s" % place + logger.warn(warnMsg) + else: + parameter = conf.testParameter[0] - if not intersect(USER_AGENT_ALIASES + REFERER_ALIASES + HOST_ALIASES, parameter, True): - debugMsg = "provided parameter '%s' " % paramStr - debugMsg += "is not inside the %s" % place - logger.debug(debugMsg) + if not intersect(USER_AGENT_ALIASES + REFERER_ALIASES + HOST_ALIASES, parameter, True): + debugMsg = "provided parameter '%s' " % paramStr + debugMsg += "is not inside the %s" % place + logger.debug(debugMsg) - elif len(conf.testParameter) != len(testableParameters.keys()): - for parameter in conf.testParameter: - if parameter not in testableParameters: - debugMsg = "provided parameter '%s' " % parameter - debugMsg += "is not inside the %s" % place - logger.debug(debugMsg) + elif len(conf.testParameter) != len(testableParameters.keys()): + for parameter in conf.testParameter: + if parameter not in testableParameters: + debugMsg = "provided parameter '%s' " % parameter + debugMsg += "is not inside the %s" % place + logger.debug(debugMsg) if testableParameters: for parameter, value in testableParameters.items(): diff --git a/lib/core/settings.py b/lib/core/settings.py index c08aa7e0d..51d308181 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from lib.core.revision import getRevisionNumber # sqlmap version (...) -VERSION = "1.0.5.58" +VERSION = "1.0.5.59" REVISION = getRevisionNumber() STABLE = VERSION.count('.') <= 2 VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")