mirror of
https://github.com/DandelionSprout/adfilt.git
synced 2026-09-24 22:03:36 +01:00
Wrote a presumably better RegEx for Pi-hole
This commit is contained in:
@@ -220,47 +220,47 @@ wo.tc
|
||||
|
||||
# ——— Anti-phishing filters for tools that support wildcards, are below this line. ———
|
||||
# ——— Don't be worried if you see entries that resemble major Nordic websites; those are wildcard entries for use with e.g. Samsung Knox, that attempts to stop phishing sites that have stolen the website brands in question. ———
|
||||
(^|\.)vg\.no\..*$
|
||||
(^|\.)elkjop\.no\..*$
|
||||
(^|\.)coop\.no\..*$
|
||||
(^|\.)shell\.no\..*$
|
||||
(^|\.)finn\.no\..*$
|
||||
(^|\.)dnb\.no\..*$
|
||||
(^|\.)sparebank1\.no\..*$
|
||||
(^|\.)nordea\.no\..*$
|
||||
(^|\.)sbanken\.no\..*$
|
||||
(^|\.)danskebank\.no\..*$
|
||||
(^|\.)komplett\.no\..*$
|
||||
(^|\.)nordnet\.no\..*$
|
||||
(^|\.)skatteetaten\.no\..*$
|
||||
(^|\.)norwegian\.com\..*$
|
||||
(^|\.)flysas-no\..*$
|
||||
(^|\.)tusenfryd-com\..*$
|
||||
(^|\.)*\.gratis-reisebilletter\..*$
|
||||
(^|\.)paypal\..*\.no$
|
||||
(^|\.)kiwi\.com-*$
|
||||
(^|\.)kongeparken\.com-*$
|
||||
(^|\.)vipps-sikkerhet\..*$
|
||||
(^|\.)getmail-no\..*$
|
||||
(^|\.)legoland\\.com-*$\..*$
|
||||
(^|\.)faarup\\.com-*$\..*$
|
||||
(^|\.)djurs\\.com-*$\..*$
|
||||
(^|\.)appleid\..*\.no$
|
||||
(^|\.)itunesconnect-.*\.no$
|
||||
(^|\.)fintechnow.*\.buzz$
|
||||
(^|\.)wealthnews.*\.xyz$
|
||||
(.*\.)?vg\.no\..*$
|
||||
(.*\.)?elkjop\.no\..*$
|
||||
(.*\.)?coop\.no\..*$
|
||||
(.*\.)?shell\.no\..*$
|
||||
(.*\.)?finn\.no\..*$
|
||||
(.*\.)?dnb\.no\..*$
|
||||
(.*\.)?sparebank1\.no\..*$
|
||||
(.*\.)?nordea\.no\..*$
|
||||
(.*\.)?sbanken\.no\..*$
|
||||
(.*\.)?danskebank\.no\..*$
|
||||
(.*\.)?komplett\.no\..*$
|
||||
(.*\.)?nordnet\.no\..*$
|
||||
(.*\.)?skatteetaten\.no\..*$
|
||||
(.*\.)?norwegian\.com\..*$
|
||||
(.*\.)?flysas-no\..*$
|
||||
(.*\.)?tusenfryd-com\..*$
|
||||
(.*\.)?*\.gratis-reisebilletter\..*$
|
||||
(.*\.)?paypal\..*\.no$
|
||||
(.*\.)?kiwi\.com-*$
|
||||
(.*\.)?kongeparken\.com-*$
|
||||
(.*\.)?vipps-sikkerhet\..*$
|
||||
(.*\.)?getmail-no\..*$
|
||||
(.*\.)?legoland\\.com-*$\..*$
|
||||
(.*\.)?faarup\\.com-*$\..*$
|
||||
(.*\.)?djurs\\.com-*$\..*$
|
||||
(.*\.)?appleid\..*\.no$
|
||||
(.*\.)?itunesconnect-.*\.no$
|
||||
(.*\.)?fintechnow.*\.buzz$
|
||||
(.*\.)?wealthnews.*\.xyz$
|
||||
|
||||
# ——— Anti-ad filters for tools that support wildcards, are below this line. ———
|
||||
(^|\.)annonse\..*\.no$
|
||||
(^|\.)ad\..*\.no$
|
||||
(^|\.)ad1\..*\.no$
|
||||
(^|\.)ad1\..*\.dk$
|
||||
(^|\.)adcache\..*\.no$
|
||||
(^|\.)ads\..*\.no$
|
||||
(^|\.)ads\..*\.dk$
|
||||
(^|\.)adserver\..*\.dk$
|
||||
(^|\.)annonser\..*\.no$
|
||||
(^|\.)banner\..*\.no$
|
||||
(^|\.)helios\..*\.no$
|
||||
(^|\.)auglysingar\..*\.is$
|
||||
(^|\.)vevlysinger\.*\..*$
|
||||
(.*\.)?annonse\..*\.no$
|
||||
(.*\.)?ad\..*\.no$
|
||||
(.*\.)?ad1\..*\.no$
|
||||
(.*\.)?ad1\..*\.dk$
|
||||
(.*\.)?adcache\..*\.no$
|
||||
(.*\.)?ads\..*\.no$
|
||||
(.*\.)?ads\..*\.dk$
|
||||
(.*\.)?adserver\..*\.dk$
|
||||
(.*\.)?annonser\..*\.no$
|
||||
(.*\.)?banner\..*\.no$
|
||||
(.*\.)?helios\..*\.no$
|
||||
(.*\.)?auglysingar\..*\.is$
|
||||
(.*\.)?vevlysinger\.*\..*$
|
||||
|
||||
@@ -2158,43 +2158,43 @@ def prepare_pihole(lines) -> str:
|
||||
|
||||
line = re.sub(
|
||||
r"^([a-z0-9].*)\.(.*)\.\*",
|
||||
r"(^|\.)\1\\.\2\\..*$",
|
||||
r"(.*\.)?\1\\.\2\\..*$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^([a-z0-9].*)\.\*$",
|
||||
r"(^|\.)\1\\..*$",
|
||||
r"(.*\.)?\1\\..*$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^(.*)\.(.*)-\*",
|
||||
r"(^|\.)\1\\.\2-*$",
|
||||
r"(.*\.)?\1\\.\2-*$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^([a-z0-9].*)\.\*\.(.*)",
|
||||
r"(^|\.)\1\\..*\\.\2$",
|
||||
r"(.*\.)?\1\\..*\\.\2$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\*\.(.*)\.\*",
|
||||
r"(^|\.)*\\.\1\\..*$",
|
||||
r"(.*\.)?*\\.\1\\..*$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^([a-z0-9].*)\*\.(.*)",
|
||||
r"(^|\.)\1.*\\.\2$",
|
||||
r"(.*\.)?\1.*\\.\2$",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"(\(\^\|\\\.\)){2}",
|
||||
r"(^|\.)",
|
||||
r"(\(\.\*\\\.\)\?){2}",
|
||||
r"(.*\.)?",
|
||||
line
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user