sidki规则变量绕来绕去太复杂没看懂。
想以一个简单的例子请教,方便我琢磨。谢谢!
我制作了一个规则,实际生效。
Code: Select all
[Patterns]
Name = "Killad_src_script"
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "<script\s*</script>"
Limit = 256
Match = "[^>]++\s(src=$AV(\0))\1*"
"$TST(\0=(*//(^\h|local.ptron)*&&((us.|)(code|ucpn)[0-9]+.*|[^/]++.(ad[a-z]++|alimama|allyes|[a-z]++ad).*|[^?]++\?[a-z_\-]++{2,12}=*|[^/]+\w/[0-9]+{2,18}.js|[^/]+\w/?.js)))"
Replace = "<prox killad_script_\1 />\r\n"
Code: Select all
(*//(^\h|local.ptron)*&&((us.|)(code|ucpn)[0-9]+.*|[^/]++.(ad[a-z]++|alimama|allyes|[a-z]++ad).*|[^?]++\?[a-z_\-]++{2,12}=*|[^/]+\w/[0-9]+{2,18}.js|[^/]+\w/?.js))
Code: Select all
[Patterns]
Name = "Killad_src_script"
Active = FALSE
URL = "$TYPE(htm)"
Bounds = "<script\s*</script>"
Limit = 256
Match = "[^>]++\s(src=$AV(\0))\1*"
"$TST(\0=$GET(adsrc1))"
"$SET(adsrc1=(*//(^\h|local.ptron)*&&((us.|)(code|ucpn)[0-9]+.*|[^/]++.(ad[a-z]++|alimama|allyes|[a-z]++ad).*|[^?]++\?[a-z_\-]++{2,12}=*|[^/]+\w/[0-9]+{2,18}.js|[^/]+\w/?.js)))"
Replace = "<prox killad_script_\1 />\r\n"
另好像全局变量不能和过滤名单这么写,直接崩溃。
Code: Select all
$SET(adsrc1=*$LST(Ad_src)*)