added switch --cookie-del by request

This commit is contained in:
Miroslav Stampar 2011-06-08 08:27:24 +00:00
parent 4eeeb3655e
commit f65abdaae3
3 changed files with 7 additions and 4 deletions

View File

@ -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("=")

View File

@ -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")

View File

@ -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