| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -539,7 +539,7 @@ def paramToDict(place, parameters=None): | |||
| 539 | 539 | parameters = parameters.replace(", ", ",") | |
| 540 | 540 | parameters = re.sub(r"&(\w{1,4});", r"%s\g<1>%s" % (PARAMETER_AMP_MARKER, PARAMETER_SEMICOLON_MARKER), parameters) | |
| 541 | 541 | if place == PLACE.COOKIE: | |
| 542 | - splitParams = parameters.split(conf.cDel or DEFAULT_COOKIE_DELIMITER) | ||
| 542 | + splitParams = parameters.split(conf.cookieDel or DEFAULT_COOKIE_DELIMITER) | ||
| 543 | 543 | else: | |
| 544 | 544 | splitParams = parameters.split(conf.paramDel or DEFAULT_GET_POST_DELIMITER) | |
| 545 | 545 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ | |||
| 25 | 25 | "data": "string", | |
| 26 | 26 | "paramDel": "string", | |
| 27 | 27 | "cookie": "string", | |
| 28 | - "cDel": "string", | ||
| 28 | + "cookieDel": "string", | ||
| 29 | 29 | "loadCookies": "string", | |
| 30 | 30 | "dropSetCookie": "boolean", | |
| 31 | 31 | "agent": "string", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,7 @@ def cmdLineParser(): | |||
| 88 | 88 | request.add_option("--cookie", dest="cookie", | |
| 89 | 89 | help="HTTP Cookie header value") | |
| 90 | 90 | ||
| 91 | - request.add_option("--cookie-del", dest="cDel", | ||
| 91 | + request.add_option("--cookie-del", dest="cookieDel", | ||
| 92 | 92 | help="Character used for splitting cookie values") | |
| 93 | 93 | ||
| 94 | 94 | request.add_option("--load-cookies", dest="loadCookies", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,7 +94,7 @@ def title(self): | |||
| 94 | 94 | kb.mergeCookies = not _ or _[0] in ("y", "Y") | |
| 95 | 95 | ||
| 96 | 96 | if kb.mergeCookies: | |
| 97 | - _ = lambda x: re.sub("(?i)%s=[^%s]+" % (cookie.name, conf.cDel or DEFAULT_COOKIE_DELIMITER), "%s=%s" % (cookie.name, getUnicode(cookie.value)), x) | ||
| 97 | + _ = lambda x: re.sub("(?i)%s=[^%s]+" % (cookie.name, conf.cookieDel or DEFAULT_COOKIE_DELIMITER), "%s=%s" % (cookie.name, getUnicode(cookie.value)), x) | ||
| 98 | 98 | headers[HTTP_HEADER.COOKIE] = _(headers[HTTP_HEADER.COOKIE]) | |
| 99 | 99 | ||
| 100 | 100 | if PLACE.COOKIE in conf.parameters: | |
@@ -103,7 +103,7 @@ def title(self): | |||
| 103 | 103 | conf.httpHeaders = [(item[0], item[1] if item[0] != HTTP_HEADER.COOKIE else _(item[1])) for item in conf.httpHeaders] | |
| 104 | 104 | ||
| 105 | 105 | elif not kb.testMode: | |
| 106 | - headers[HTTP_HEADER.COOKIE] += "%s %s=%s" % (conf.cDel or DEFAULT_COOKIE_DELIMITER, cookie.name, getUnicode(cookie.value)) | ||
| 106 | + headers[HTTP_HEADER.COOKIE] += "%s %s=%s" % (conf.cookieDel or DEFAULT_COOKIE_DELIMITER, cookie.name, getUnicode(cookie.value)) | ||
| 107 | 107 | ||
| 108 | 108 | if kb.testMode: | |
| 109 | 109 | resetCookieJar(conf.cj) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -769,7 +769,7 @@ def _randomizeParameter(paramString, randomParameter): | |||
| 769 | 769 | evaluateCode("%s=%s" % (name.strip(), repr(value)), variables) | |
| 770 | 770 | ||
| 771 | 771 | if cookie: | |
| 772 | - for part in cookie.split(conf.cDel or DEFAULT_COOKIE_DELIMITER): | ||
| 772 | + for part in cookie.split(conf.cookieDel or DEFAULT_COOKIE_DELIMITER): | ||
| 773 | 773 | if '=' in part: | |
| 774 | 774 | name, value = part.split('=', 1) | |
| 775 | 775 | value = urldecode(value, convall=True) | |
@@ -793,7 +793,7 @@ def _randomizeParameter(paramString, randomParameter): | |||
| 793 | 793 | found = True | |
| 794 | 794 | post = re.sub(regex, "\g<1>%s\g<3>" % value, post) | |
| 795 | 795 | ||
| 796 | - regex = r"((\A|%s)%s=).+?(%s|\Z)" % (re.escape(conf.cDel or DEFAULT_COOKIE_DELIMITER), name, re.escape(conf.cDel or DEFAULT_COOKIE_DELIMITER)) | ||
| 796 | + regex = r"((\A|%s)%s=).+?(%s|\Z)" % (re.escape(conf.cookieDel or DEFAULT_COOKIE_DELIMITER), name, re.escape(conf.cookieDel or DEFAULT_COOKIE_DELIMITER)) | ||
| 797 | 797 | if re.search(regex, (cookie or "")): | |
| 798 | 798 | found = True | |
| 799 | 799 | cookie = re.sub(regex, "\g<1>%s\g<3>" % value, cookie) | |
@@ -804,7 +804,7 @@ def _randomizeParameter(paramString, randomParameter): | |||
| 804 | 804 | elif get is not None: | |
| 805 | 805 | get += "%s%s=%s" % (delimiter, name, value) | |
| 806 | 806 | elif cookie is not None: | |
| 807 | - cookie += "%s%s=%s" % (conf.cDel or DEFAULT_COOKIE_DELIMITER, name, value) | ||
| 807 | + cookie += "%s%s=%s" % (conf.cookieDel or DEFAULT_COOKIE_DELIMITER, name, value) | ||
| 808 | 808 | ||
| 809 | 809 | if not conf.skipUrlEncode: | |
| 810 | 810 | get = urlencode(get, limit=True) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -113,7 +113,7 @@ def http_error_302(self, req, fp, code, msg, headers): | |||
| 113 | 113 | if redurl and kb.redirectChoice == REDIRECTION.YES: | |
| 114 | 114 | req.headers[HTTP_HEADER.HOST] = getHostHeader(redurl) | |
| 115 | 115 | if headers and HTTP_HEADER.SET_COOKIE in headers: | |
| 116 | - req.headers[HTTP_HEADER.COOKIE] = headers[HTTP_HEADER.SET_COOKIE].split(conf.cDel or DEFAULT_COOKIE_DELIMITER)[0] | ||
| 116 | + req.headers[HTTP_HEADER.COOKIE] = headers[HTTP_HEADER.SET_COOKIE].split(conf.cookieDel or DEFAULT_COOKIE_DELIMITER)[0] | ||
| 117 | 117 | result = urllib2.HTTPRedirectHandler.http_error_302(self, req, fp, code, msg, headers) | |
| 118 | 118 | else: | |
| 119 | 119 | result = fp | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,7 +46,7 @@ paramDel = | |||
| 46 | 46 | cookie = | |
| 47 | 47 | ||
| 48 | 48 | # Character used for splitting cookie values | |
| 49 | - cDel = | ||
| 49 | + cookieDel = | ||
| 50 | 50 | ||
| 51 | 51 | # File containing cookies in Netscape/wget format | |
| 52 | 52 | loadCookies = | |
| Back | FazBrowse Home | New Git URL |
0 commit comments