From 8720aad6dcf5b534cce2cef55d2be3d73cab82c6 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 6 Oct 2011 22:03:33 +0000 Subject: [PATCH] transformed cDel to pDel as a more generic option --- lib/core/common.py | 2 +- lib/core/defaults.py | 1 - lib/core/optiondict.py | 2 +- lib/parse/cmdline.py | 6 +++--- sqlmap.conf | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 7898ce9bf..7202ed89c 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -652,7 +652,7 @@ def paramToDict(place, parameters=None): if place != PLACE.SOAP: parameters = parameters.replace(", ", ",") - splitParams = parameters.split(conf.cDel if place == PLACE.COOKIE else "&") + splitParams = parameters.split(conf.pDel or (";" if place == PLACE.COOKIE else "&")) for element in splitParams: elem = element.split("=") diff --git a/lib/core/defaults.py b/lib/core/defaults.py index 9bd96fe74..8aadb02c1 100644 --- a/lib/core/defaults.py +++ b/lib/core/defaults.py @@ -14,7 +14,6 @@ _defaults = { "googlePage": 1, "cpuThrottle": 5, "verbose": 1, - "cDel": ";", "delay": 0, "timeout": 30, "retries": 3, diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index e8e90c2f5..c1ac8cae4 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -24,8 +24,8 @@ optDict = { "Request": { "data": "string", + "pDel": "string", "cookie": "string", - "cDel": "string", "cookieUrlencode": "boolean", "dropSetCookie": "boolean", "agent": "string", diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 7910c0ede..e93c74141 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -68,12 +68,12 @@ def cmdLineParser(): request.add_option("--data", dest="data", help="Data string to be sent through POST") + request.add_option("--param-del", dest="pDel", + help="Character used for splitting parameter values") + request.add_option("--cookie", dest="cookie", help="HTTP Cookie header") - request.add_option("--cookie-del", dest="cDel", - help="Delimiter character used for splitting cookie values") - request.add_option("--cookie-urlencode", dest="cookieUrlencode", action="store_true", help="URL Encode generated cookie injections") diff --git a/sqlmap.conf b/sqlmap.conf index 7a6c78ec7..6569958c7 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -36,12 +36,12 @@ googleDork = # Data string to be sent through POST. data = +# Character used for splitting cookie values +pDel = + # HTTP Cookie header. cookie = -# Delimiter character used for splitting cookie values -cDel = ";" - # URL-encode generated cookie injections. # Valid: True or False cookieUrlencode = False