Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b700485

Browse files
committed
Minor adjustment, still to work on the cookie urlencoding/decoding
1 parent 578bcb9 commit b700485

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

lib/core/target.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def __setRequestParams():
7777

7878
# Perform checks on Cookie parameters
7979
if conf.cookie:
80-
urlDecodedCookie = urldecode(conf.cookie).replace("%", "%%")
80+
# TODO: sure about decoding the cookie?
81+
#urlDecodedCookie = urldecode(conf.cookie).replace("%", "%%")
82+
urlDecodedCookie = conf.cookie.replace("%", "%%")
8183
conf.parameters["Cookie"] = urlDecodedCookie
8284
__paramDict = paramToDict("Cookie", urlDecodedCookie)
8385

lib/request/connect.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def getPage(**kwargs):
105105
requestMsg += " HTTP/1.1"
106106

107107
if cookie:
108-
cookie = urlencode(cookie).replace("%%", "%")
108+
# TODO: sure about encoding the cookie?
109+
#cookie = urlencode(cookie).replace("%%", "%")
110+
cookie = cookie.replace("%%", "%")
109111

110112
try:
111113
# Perform HTTP request

0 commit comments

Comments
 (0)