From 0ae8ac707e13ac9934845f3d240ab7b2ad1726f8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 6 Apr 2014 16:48:46 +0200 Subject: [PATCH] Renaming conf.pDel to conf.paramDel --- lib/controller/controller.py | 2 +- lib/core/common.py | 4 ++-- lib/core/option.py | 4 ++-- lib/core/optiondict.py | 2 +- lib/parse/cmdline.py | 2 +- lib/request/connect.py | 2 +- sqlmap.conf | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 8221fbb81..b6a01dde9 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -277,7 +277,7 @@ def start(): testSqlInj = False if PLACE.GET in conf.parameters and not any([conf.data, conf.testParameter]): - for parameter in re.findall(r"([^=]+)=([^%s]+%s?|\Z)" % (conf.pDel or DEFAULT_GET_POST_DELIMITER, conf.pDel or DEFAULT_GET_POST_DELIMITER), conf.parameters[PLACE.GET]): + for parameter in re.findall(r"([^=]+)=([^%s]+%s?|\Z)" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER, conf.paramDel or DEFAULT_GET_POST_DELIMITER), conf.parameters[PLACE.GET]): paramKey = (conf.hostname, conf.path, PLACE.GET, parameter[0]) if paramKey not in kb.testedParams: diff --git a/lib/core/common.py b/lib/core/common.py index 420850bd5..631775331 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -541,7 +541,7 @@ def paramToDict(place, parameters=None): if place == PLACE.COOKIE: splitParams = parameters.split(conf.cDel or DEFAULT_COOKIE_DELIMITER) else: - splitParams = parameters.split(conf.pDel or DEFAULT_GET_POST_DELIMITER) + splitParams = parameters.split(conf.paramDel or DEFAULT_GET_POST_DELIMITER) for element in splitParams: element = re.sub(r"%s(.+?)%s" % (PARAMETER_AMP_MARKER, PARAMETER_SEMICOLON_MARKER), r"&\g<1>;", element) @@ -550,7 +550,7 @@ def paramToDict(place, parameters=None): if len(parts) >= 2: parameter = parts[0].replace(" ", "") - if conf.pDel and conf.pDel == '\n': + if conf.paramDel and conf.paramDel == '\n': parts[-1] = parts[-1].rstrip() condition = not conf.testParameter diff --git a/lib/core/option.py b/lib/core/option.py index 2436a84be..960747e14 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1431,8 +1431,8 @@ def _cleanupOptions(): else: conf.rParam = [] - if conf.pDel and '\\' in conf.pDel: - conf.pDel = conf.pDel.decode("string_escape") + if conf.paramDel and '\\' in conf.paramDel: + conf.paramDel = conf.paramDel.decode("string_escape") if conf.skip: conf.skip = conf.skip.replace(" ", "") diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index c2f31bbbb..7694c0fdf 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -23,7 +23,7 @@ optDict = { "Request": { "data": "string", - "pDel": "string", + "paramDel": "string", "cookie": "string", "cDel": "string", "loadCookies": "string", diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 473f86e72..f5418a0f1 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -82,7 +82,7 @@ def cmdLineParser(): request.add_option("--data", dest="data", help="Data string to be sent through POST") - request.add_option("--param-del", dest="pDel", + request.add_option("--param-del", dest="paramDel", help="Character used for splitting parameter values") request.add_option("--cookie", dest="cookie", diff --git a/lib/request/connect.py b/lib/request/connect.py index 4d220adc9..b683c6991 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -757,7 +757,7 @@ class Connect(object): cookie = _randomizeParameter(cookie, randomParameter) if conf.evalCode: - delimiter = conf.pDel or DEFAULT_GET_POST_DELIMITER + delimiter = conf.paramDel or DEFAULT_GET_POST_DELIMITER variables = {} originals = {} diff --git a/sqlmap.conf b/sqlmap.conf index 3f1288480..942888d41 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -40,7 +40,7 @@ googleDork = data = # Character used for splitting parameter values -pDel = +paramDel = # HTTP Cookie header value. cookie =