From 4541cb1c9260891bdcd998b2f321c3c882dc47c2 Mon Sep 17 00:00:00 2001 From: Imre Eilertsen Date: Mon, 30 Sep 2024 04:47:02 +0200 Subject: [PATCH] Add files via upload --- .../XYZPrepareFilters.py | 93 ++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py index 88c3169e8..3039b54a6 100644 --- a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py +++ b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py @@ -4962,6 +4962,18 @@ def prepare_ag(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + text += line + '\n' return text @@ -5005,9 +5017,15 @@ def prepare_abp(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + line = re.sub( "Dandelion Sprout's Anti-Malware List", - "Dandelion Sprout's Anti-Malware List (for Adblock Plus and AdBlock)", + "Dandelion Sprout's Anti-Malware List (for Adblock Plus 3.x and Adblock Plus on Firefox)", line ) @@ -5280,6 +5298,18 @@ def prepare_abp(lines) -> str: line ) + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + + line = re.sub( + r"\$popup,~inline-font,.*", + r"$popup", + line + ) + if is_supported_abp(line): text += line + '\n' @@ -5720,6 +5750,18 @@ def prepare_tpl(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + if is_supported_tpl(line): text += line + '\n' @@ -5874,6 +5916,18 @@ def prepare_privoxy(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + if is_supported_privoxy(line): text += line + '\n' @@ -6098,7 +6152,6 @@ def prepare_hosts(lines) -> str: line ) - line = re.sub( r"(# (Version|Last[ -]?[Mm]odified):.*)", r"\1\n# Users of Pi-Hole FTL 5.22 and later are STRONGLY RECOMMENDED to switch to the || version at https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareAdGuardHome.txt, unless otherwise proven.", @@ -6117,6 +6170,18 @@ def prepare_hosts(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + if is_supported_hosts(line): text += line + '\n' @@ -6323,6 +6388,18 @@ def prepare_domains(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + if is_supported_domains(line): text += line + '\n' @@ -6754,6 +6831,18 @@ def prepare_agh(lines) -> str: line ) + line = re.sub( + r"^.*[,$]ipaddress.*$", + r"", + line + ) + + line = re.sub( + r"^[a-zA-Z0-9*,:;^$=?!+&%#@_-]{1,5}$", + r"", + line + ) + if is_supported_agh(line): text += line + '\n'