Properly encode the cookie

This commit is contained in:
Bernardo Damele 2010-10-31 11:26:33 +00:00
parent 79c3a5e527
commit 3eda4510e2
2 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,6 @@ from lib.core.common import getCompiledRegex
from lib.core.common import getUnicode
from lib.core.common import isWindowsDriveLetterPath
from lib.core.common import posixToNtSlashes
from lib.core.common import urlEncodeCookieValues
from lib.core.data import conf
from lib.core.data import kb
from lib.core.data import logger

View File

@ -20,6 +20,7 @@ from lib.core.agent import agent
from lib.core.common import readInput
from lib.core.common import getUnicode
from lib.core.convert import urlencode
from lib.core.common import urlEncodeCookieValues
from lib.core.data import conf
from lib.core.data import kb
from lib.core.data import logger
@ -316,7 +317,10 @@ class Connect:
value = agent.replacePayload(value, payload)
if place:
if place == "Cookie" and conf.cookieUrlencode:
value = agent.removePayloadDelimiters(value, False)
value = urlEncodeCookieValues(value)
elif place:
value = agent.removePayloadDelimiters(value, toUrlencode[place])
if conf.checkPayload: