diff --git a/lib/core/common.py b/lib/core/common.py index 2db4e7ef9..a5301bc10 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -488,10 +488,7 @@ def paramToDict(place, parameters=None): if place != PLACE.SOAP: parameters = parameters.replace(", ", ",") - if place == PLACE.COOKIE: - splitParams = parameters.split(";") - else: - splitParams = parameters.split("&") + splitParams = parameters.split(conf.cDel if place == PLACE.COOKIE else "&") for element in splitParams: elem = element.split("=") diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index e0f60a524..29417106a 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -69,6 +69,9 @@ def cmdLineParser(): request.add_option("--cookie", dest="cookie", help="HTTP Cookie header") + request.add_option("--cookie-del", dest="cDel", default=";", + help="Delimiter character used for splitting cookie values") + request.add_option("--cookie-urlencode", dest="cookieUrlencode", action="store_true", default=False, help="URL Encode generated cookie injections") diff --git a/sqlmap.conf b/sqlmap.conf index c000acf58..f26eca41c 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -39,6 +39,9 @@ data = # HTTP Cookie header. cookie = +# Delimiter character used for splitting cookie values +cDel = ";" + # URL-encode generated cookie injections. # Valid: True or False cookieUrlencode = False