RE: Beta Config (Sep 19 2010) - sidki3003 - Oct. 17, 2010 11:28 AM
Here is an update for the session-only cookie filters.
Since "pYY" holds the respective previous year in 2-digit format, the filters should do their job the next years without further editing the "year" strings. (The contained test is a little redundant for the rest of 2010, but that doesn't really matter.)
Code:
[HTTP headers]
In = TRUE
Out = FALSE
Key = "Set-Cookie: 4b Make Cookies Session only 10.10.17 (cch!) [srl sd] (d.r) (In)"
URL = "$TST(flag=*.cookie_s:[12].*)"
Match = "?&\0&(\#; ((expires)\1=(^[^;]++(19[#10:99]|20(0[0-9]|$TST(pYY))|-([#70:99]|0[0-9]|([0-9][0-9]&&$TST(pYY)))(^-)))|(max-age)\1=[#1:*])$LOG(wRESP $DTM(c) : Set-Cookie \1 filtered: \0)($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tHDR_In Set-Cook_\1 \t\0 \tRef: $GET(hOrigRef) URL: \u)|)[^;]+)+{1,*}\#"
Replace = "\@"
[Patterns]
Name = "<meta> Rename: Make Cookies Session only 10.10.17 (cch!) [srl sd] (d.1)"
Active = TRUE
URL = "$TST(hCT=*html)$TST(flag=*.cookie_s:[12].*)(^$TST(keyword=*.a_code.*))"
Bounds = "<meta\s*>"
Limit = 512
Match = "*http-equiv=$AV(Set-Cookie)"
"&\1; ("
"expires=(^[^;"'/>]++("
"19[#10:99]|20(0[0-9]|$TST(pYY))|-([#70:99]|0[0-9]|([0-9][0-9]&&$TST(pYY)))"
"))$SET(0=Expires)"
"|max-age=[#1:*]$SET(0=Max-Age)"
")[^;"'/>]+\2"
"&*content="+ \3 ="
"&$SET(eHits=$GET(eHits)"
"%3Cspan class=%22Pr0xFly-Span%22%3E$GET(mHead) Meta Cookie:%3C/span%3E"
" $ESC(\3)%3Cbr class=%22Pr0xFly-Br%22 /%3E"
")"
"($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB meta_Set-Cookie_\0 \t---\t\u)|)"
Replace = "\1\2"
Name = "Remove: Make Server-Push Cookies Session only 10.10.17 (cch!) [sd] (d.1)"
Active = TRUE
URL = "$TST(hCT=*html)$TST(spBounds=*)$TST(flag=*.cookie_s:[12].*)"
Limit = 4096
Match = "Set-Cookie:(^$TST(tHtml=*))([^\r\n]++)\1; ("
"expires=(^[^;\r\n]++("
"19[#10:99]|20(0[0-9]|$TST(pYY))|-([#70:99]|0[0-9]|([0-9][0-9]&&$TST(pYY)))"
"))$SET(0=Expires)"
"|max-age=[#1:*]$SET(0=Max-Age)"
")[^;\r\n]+"
"&($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB Push_Cookie_\0 \t--- \t\u)|)"
Replace = "Set-Cookie:\1"
Name = "Block: Make JS Cookies Session only 10.10.17 (cch!) [srl sd] (d.2)"
Active = TRUE
URL = "($TST(hCT=*html)|$TYPE(js)|$TYPE(vbs))$TST(flag=*.cookie_s:[12].*)(^$TST(keyword=*.a_code.*))"
Limit = 64
Match = "expires("
"$TST(script=[1s]*)(=|($)\2)"
"(^"
"\=|new Date|" '|(" ;+ |)expires"
"|[0-9][^a-z/"';,\r\n]+["';,\r\n]"
"|[^"';]++(19[#10:99]|20(0[0-9]|$TST(pYY))|-([#70:99]|0[0-9]|([0-9][0-9]&&$TST(pYY))))"
")*["';?]"
"|" ,[^;\r\n]++.to(GMT|UTC)String"
")\1$SET(0=Expires\2)"
""
"|max-age(=$TST(script=[1s]*)(^[=-])*["';])\1$SET(0=Max-Age)"
""
"&($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB JS_Cookie_\0 \t---\t\u)|)"
Replace = "prxVoidV\1"
RE: Beta Config (Sep 19 2010) - sidki3003 - Oct. 17, 2010 05:15 PM
Another update. It will also match at http://www.shoutcast.com/ , thus making radio station selection work again.
Code:
[Patterns]
Name = "<script>: Cut: Chained Ad Path URLs 10.10.17 (multi) [sd] (d.1)"
Active = TRUE
Multi = TRUE
URL = "$TST(hCT=*html)"
Bounds = "$NEST(<script\s,*src=$AV(*,*)*,>)"
Limit = 1024
Match = "(*src=)\1$AVQ("
"(*\?(*\=|\?)|[^?,]+,)\2("
"[^,="']+[,=]+"
"&&"
",+((https+%3a)+//($LST(AdHosts-J))\8$SET(a=$GET(a) AdHj \8)|((^(^http))|(^http))("
"$LST(AdList)$SET(a=$GET(a) \9)|(^$TST(keyword=*.a_track_s.*))"
"((^http|[/.])|((https+%3a)+//[^/?]+)+*[/=_-])($LST(AdPaths-J)(^[a-z0-9]))\8$SET(a=$GET(a) AdPj \8)"
"))(*(\&*)\#|*)"
"|\#"
")+\#"
")\3"
""
"&$TST(\8=*)$TST(\2=*(?)\4(^?))"
"$SET(eAdJS=$GET(eAdJS)"
"%3Cspan class=%22Pr0xFly-Span%22%3E$GET(mHead) Chain URL:%3C/span%3E"
"$ESC($GET(a))%3Cbr class=%22Pr0xFly-Br%22 /%3E"
")"
"($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB JS_Chain_URL \4 \t$GET(a) \t\u)|)"
"($TST(\4=[=?,])$TST(volat=*.log:[12]*)$ADDLST(Log-Rare,WEB JS_Chain_URL \4 \t$GET(a) \t\u)|)"
"$SET(a=\@)$TST(a=\4,+ ("+)\5(^?))$SET(a=\4\5)"
Replace = "\1\2$GET(a)\3$SET(a=)"
To listen to a radio station at shoutcast.com, either click the "flash" link at the page bottom, before selecting a station.
Or add below entry to the global Exceptions list (have done this too):
Code:
www.shoutcast.com/ $SET(0=a_flash.)
RE: Beta Config (Sep 19 2010) - sidki3003 - Oct. 19, 2010 03:00 PM
Another update.
Code:
[Patterns]
Name = "<script> Block: All Third Party Scripts 10.10.19 (cch!) [u sd] (d.0)"
Active = TRUE
URL = "($TST(hCT=*html)|$TYPE(js)|$TYPE(vbs))$TST(keyword=*.i_script:11.*)"
Bounds = "<(s|\" [+,] \"s|\' [+,] \'s|\\s)(\\|" [+,] ')+c[^>]++src=$AV(*)*>"
Limit = 2048
Match = "$TST(script=[1s]&\2)<(*c)+{1}(\\|" [+,] ')+r(\\|" [+,] ')+i(\\|" [+,] ')+"
"p(\\|" [+,] ')+t(" [+,] ')+(\sfor\=\"proxMoved|\s)\1*src=("
"(^$TST(\2=1c))(http[^>]+)\4|\\(")\6 (^\\$TST(\6))(\4) \\$TST(\6)|$AV( \4)"
"&$TST(\4=[^/.]+//(^([^/]++.|)$TST(uDom)(^.))(\9)\\+/*&[^/]++\\/$SET(6=\\/)|$SET(6=/))"
"&($TST(\2=1c)("+)\5|)"
")\4"
"&"
"<(\#(src=$TST(\4)"
"$SET(#=src=\5http:\6\6local.ptron\6sidki_h_$GET(cfg)\6dummy.js)"
"$SET(#=$TST((\7)=*)?prx-w:$ESC(\7))$SET(#=\5 charset=\4)"
"| charset=$AV(*)))+"
"($TST(\2=1c)( [a-z][a-z]+=$AV((^")*))\#+(*( /)\#$SET(#=$TST(hCT=xhtml)$SET(script=))|*)"
"|\#)>(^?)"
"&"
"$TST(\2="
"1(c$SET(script=void)|)($TST(\1=\sfor*)$SET(1=pre )|$SET(1=$GET(mHead)))"
"$SET(eAdJS=$GET(eAdJS)"
"%3Cspan class=%22Pr0xFly-Span%22%3E\1 3rd Party:%3C/span%3E"
" $ESC(\9)%3Cbr class=%22Pr0xFly-Br%22 /%3E"
")"
"$SET(0=$TST(keyword=(^$TST(tFrameset=*))*.i_level:5.*)"
"<span class=\5Pr0x Pr0xAdScript\5 style=\5display:$GET(displayD)\5>"
"• JS 3rd Party: \9</span>"
")*"
"|s*)"
"&"
"($TST(volat=*.log:2*)$ADDLST(Log-Main,[$DTM(d T)]\tWEB JS_3rdP\t\9 \t\u)|)"
Replace = "\0<\@>"
RE: Beta Config (Sep 19 2010) - sidki3003 - Oct. 20, 2010 04:30 PM
I'm in process of finalizing the next config version now. 
What's not in:
YouTube specific Flash Toggle adjustments:
Posted "Proof of Concept" versions of the supposedly generic Flash filter contain code that is specifically targeted at YouTube.
More importantly, increasing the byte limit of such a complex filter by factor four may have a severe impact on reliability and/or CPU usage.
If at all, effects of such a change would need to be monitored for a longer period.
As has been stated before, this kind of job should be done by a site-specific filter.
YouTube InVideo Ads:
Not long ago lnminente and myself were looking for a generic way to remove ads coupled to Flash movies.
Bottom line: For every approach we tried there was a major site becoming defunct, because it was testing for the presence of blocked ad code.
IOW, again an issue calling for a site-specific (and possibly frequently updated) solution.
RE: Beta Config (Sep 19 2010) - sidki3003 - Oct. 23, 2010 07:59 PM
Beta stage is now finished. I have uploaded the release config version.
All bug reports and suggestions (if appropriate) have been taken into account.
Also, there were a lot of Log submissions, accelerating things considerably.
Thanks for your help!
Thread closed.
|