Post Reply 
Fake cookie function.
Apr. 25, 2008, 11:54 PM
Post: #5
RE: Fake cookie function.
I seem to have problems testing my filter (even the original Fake cookie filter doesn't seem to be working), but I just wanted to post this anyways to give people an idea of what I'm after:

Code:
[HTTP headers]
In = FALSE
Out = TRUE
Key = "Cookie: 2 Fake/Replace Selected Cookies (Out)"
URL = "($TST(keyword=\0&*.(a_cookie|i_level:[12]).)|$LST(AllowCookies))$SET(keyword=$TST(\0=\1.f_cookie.\2)\1.\2)$SET(sCookieN=)$SET(sCookieV=)PrxFail$TST()|$TST(\0=*.f_cookie.*)"
Match = "\0&($TST(\0=\1$GET(sCookieN)=\2(;|)\3)$SET(9=\1$GET(sCookieN)=$GET(sCookieV);\3)|(^$TST(\0=*$GET(sCookieN)=*))$SET(9=$GET(sCookieN)=$GET(sCookieV);\0))"
Replace = "\9$SET(sCookieN=)$SET(sCookieV=)"

What you'd put in IncludeExclude-U:

Quote:[^.]+.domain.com/ $SET(0=f_cookie.) $SET(sCookieN=CookieName) $SET(sCookieV=CookieValue)

Theoretically, it should be working. The way I created this filter was, I started off with a fresh new filter, then entered some expressions, tested it, entered some more, entered some operators and tests, and when it was fully working, I injected the $GET() values in place of my test name and value, and added in the URL Match. Thus, it should work. (Make sure you backup the original filter just in case)

I'm pretty rusty with Header filters. Let me know how it goes!

This filter would replace the previous filter. It simply replaces the value of the attribute if it exists. If the attribute doesn't exist, then it'll insert the attribute and value at the beginning of the cookie. So, no functionality is lost with this filter Smile! (if it works, that is!)
Visit this user's website
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
Fake cookie function. - Toppy - Apr. 24, 2008, 10:59 PM
RE: Fake cookie function. - Kye-U - Apr. 24, 2008, 11:32 PM
RE: Fake cookie function. - whenever - Apr. 25, 2008, 02:26 PM
RE: Fake cookie function. - Toppy - Apr. 24, 2008, 11:46 PM
RE: Fake cookie function. - Kye-U - Apr. 25, 2008 11:54 PM
RE: Fake cookie function. - Toppy - Apr. 26, 2008, 10:27 AM
RE: Fake cookie function. - Kye-U - Apr. 26, 2008, 07:55 PM
RE: Fake cookie function. - Toppy - Aug. 06, 2008, 07:41 PM
RE: Fake cookie function. - Kye-U - Aug. 06, 2008, 07:46 PM
RE: Fake cookie function. - Toppy - Aug. 22, 2008, 10:56 AM
RE: Fake cookie function. - ProxRocks - Aug. 22, 2008, 01:52 PM
RE: Fake cookie function. - Kye-U - Aug. 23, 2008, 03:32 AM
RE: Fake cookie function. - whenever - Aug. 22, 2008, 02:55 PM
RE: Fake cookie function. - ProxRocks - Aug. 23, 2008, 01:11 PM

Forum Jump: