mirror of
https://github.com/DandelionSprout/adfilt.git
synced 2026-10-05 22:04:30 +01:00
Add files via upload
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
127.0.0.1 linkshe.com
|
||||
127.0.0.1 liveshopdealz.com
|
||||
127.0.0.1 locchalet2alpes.com
|
||||
127.0.0.1 look-like-star.myshipify.com
|
||||
127.0.0.1 look-like-star.myshopify.com
|
||||
127.0.0.1 lrgst.com
|
||||
127.0.0.1 manasporthorse.com
|
||||
127.0.0.1 marissatomei.com
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
msFilterList
|
||||
# Version: 04December2019v1-Beta
|
||||
# Version: 07December2019v1-Beta
|
||||
# Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider
|
||||
# Translated title: Dandelion Sprout's Nordic filters for tidier websites
|
||||
: expires = 1
|
||||
@@ -268,7 +268,7 @@ contentMarketing
|
||||
-d nymelding.com
|
||||
-d mrcal365.com
|
||||
-d ultimate-tech-products.myshopify.com
|
||||
-d look-like-star.myshipify.com
|
||||
-d look-like-star.myshopify.com
|
||||
-d limitedvoucher.com
|
||||
-d vouchersnationhub.com
|
||||
-d com-airs1.com
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "linkshe.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "liveshopdealz.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "locchalet2alpes.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "look-like-star.myshipify.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "look-like-star.myshopify.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "lrgst.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "manasporthorse.com" },
|
||||
{ "action": "deny", "process": "any", "remote-hosts": "marissatomei.com" },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Adblock Plus 3.4]
|
||||
! Version: 041220191
|
||||
! Version: 071220191
|
||||
! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (for AdBlock og Adblock Plus)
|
||||
! Translated title: Dandelion Sprout's Nordic filters for tidier websites (for AdBlock and Adblock Plus)
|
||||
! Expires: 12 hours
|
||||
@@ -901,7 +901,7 @@ fuglelyder.net#@##banner_ad
|
||||
||nymelding.com^
|
||||
||mrcal365.com^
|
||||
||ultimate-tech-products.myshopify.com^
|
||||
||look-like-star.myshipify.com^
|
||||
||look-like-star.myshopify.com^
|
||||
||limitedvoucher.com^
|
||||
||vouchersnationhub.com^
|
||||
||djurs.com-*.*^
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
! Version: 04December2019v1
|
||||
! Version: 07December2019v1
|
||||
! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (for AdGuard)
|
||||
! Translated title: Dandelion Sprout's Nordic filters for tidier websites (for AdGuard)
|
||||
! Expires: 12 hours
|
||||
@@ -940,7 +940,7 @@ fuglelyder.net#@##banner_ad
|
||||
||nymelding.com^$empty,important
|
||||
||mrcal365.com^$empty,important
|
||||
||ultimate-tech-products.myshopify.com^$empty,important
|
||||
||look-like-star.myshipify.com^$empty,important
|
||||
||look-like-star.myshopify.com^$empty,important
|
||||
||limitedvoucher.com^$empty,important
|
||||
||vouchersnationhub.com^$empty,important
|
||||
||djurs.com-*.*^$empty,important
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
||linkshe.com^
|
||||
||liveshopdealz.com^
|
||||
||locchalet2alpes.com^
|
||||
||look-like-star.myshipify.com^
|
||||
||look-like-star.myshopify.com^
|
||||
||lrgst.com^
|
||||
||manasporthorse.com^
|
||||
||marissatomei.com^
|
||||
|
||||
@@ -99,7 +99,7 @@ address=/lindseysopticians.com/127.0.0.1
|
||||
address=/linkshe.com/127.0.0.1
|
||||
address=/liveshopdealz.com/127.0.0.1
|
||||
address=/locchalet2alpes.com/127.0.0.1
|
||||
address=/look-like-star.myshipify.com/127.0.0.1
|
||||
address=/look-like-star.myshopify.com/127.0.0.1
|
||||
address=/lrgst.com/127.0.0.1
|
||||
address=/manasporthorse.com/127.0.0.1
|
||||
address=/marissatomei.com/127.0.0.1
|
||||
|
||||
@@ -107,7 +107,7 @@ Note: This list does not actually block any mining-related stuff.
|
||||
*://*.linkshe.com/*
|
||||
*://*.liveshopdealz.com/*
|
||||
*://*.locchalet2alpes.com/*
|
||||
*://*.look-like-star.myshipify.com/*
|
||||
*://*.look-like-star.myshopify.com/*
|
||||
*://*.lrgst.com/*
|
||||
*://*.manasporthorse.com/*
|
||||
*://*.marissatomei.com/*
|
||||
|
||||
@@ -106,7 +106,7 @@ ALL: lindseysopticians.com
|
||||
ALL: linkshe.com
|
||||
ALL: liveshopdealz.com
|
||||
ALL: locchalet2alpes.com
|
||||
ALL: look-like-star.myshipify.com
|
||||
ALL: look-like-star.myshopify.com
|
||||
ALL: lrgst.com
|
||||
ALL: manasporthorse.com
|
||||
ALL: marissatomei.com
|
||||
|
||||
@@ -106,7 +106,7 @@ lindseysopticians.com
|
||||
linkshe.com
|
||||
liveshopdealz.com
|
||||
locchalet2alpes.com
|
||||
look-like-star.myshipify.com
|
||||
look-like-star.myshopify.com
|
||||
lrgst.com
|
||||
manasporthorse.com
|
||||
marissatomei.com
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
! Version: 04December2019v1
|
||||
! Version: 07December2019v1
|
||||
! Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (uten sporerhvitelisting)
|
||||
! Translated title: Dandelion Sprout's Nordic filters for tidier websites (without tracker whitelistings)
|
||||
! Expires: 12 hours
|
||||
@@ -940,7 +940,7 @@ fuglelyder.net#@##banner_ad
|
||||
||nymelding.com^$doc
|
||||
||mrcal365.com^$doc,domain=~ Warning displayed due to: Bitcoin scam fraudsters.
|
||||
||ultimate-tech-products.myshopify.com^$doc,domain=~ Advarslen vises fordi: Falsk webbutikkfup
|
||||
||look-like-star.myshipify.com^$doc,domain=~ Advarslen vises fordi: Falsk webbutikkfup
|
||||
||look-like-star.myshopify.com^$doc,domain=~ Advarslen vises fordi: Falsk webbutikkfup
|
||||
||limitedvoucher.com^$doc,domain=~ Advarslen vises fordi: Falsk webbutikkfup
|
||||
||vouchersnationhub.com^$doc,domain=~ Advarslen vises fordi: Falsk fupversjon af Ryanair
|
||||
||djurs.com-*.*^$doc,domain=~ Advarslen vises fordi: Falsk fupversjon af Djurs Sommerland
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Version: 04December2019v1-Alpha
|
||||
# Version: 07December2019v1-Alpha
|
||||
# Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider (for Privoxy)
|
||||
# Translated title: Dandelion Sprout's Nordic filters for tidier websites (for Privoxy)
|
||||
# Expires: 12 hours
|
||||
@@ -326,7 +326,7 @@ contentMarketing
|
||||
.nymelding.com
|
||||
.mrcal365.com
|
||||
.ultimate-tech-products.myshopify.com
|
||||
.look-like-star.myshipify.com
|
||||
.look-like-star.myshopify.com
|
||||
.limitedvoucher.com
|
||||
.vouchersnationhub.com
|
||||
.djurs.com-*.*
|
||||
|
||||
@@ -106,7 +106,7 @@ lindseysopticians.com CNAME .
|
||||
linkshe.com CNAME .
|
||||
liveshopdealz.com CNAME .
|
||||
locchalet2alpes.com CNAME .
|
||||
look-like-star.myshipify.com CNAME .
|
||||
look-like-star.myshopify.com CNAME .
|
||||
lrgst.com CNAME .
|
||||
manasporthorse.com CNAME .
|
||||
marissatomei.com CNAME .
|
||||
|
||||
@@ -106,7 +106,7 @@ DOMAIN-SUFFIX,lindseysopticians.com
|
||||
DOMAIN-SUFFIX,linkshe.com
|
||||
DOMAIN-SUFFIX,liveshopdealz.com
|
||||
DOMAIN-SUFFIX,locchalet2alpes.com
|
||||
DOMAIN,look-like-star.myshipify.com
|
||||
DOMAIN,look-like-star.myshopify.com
|
||||
DOMAIN-SUFFIX,lrgst.com
|
||||
DOMAIN-SUFFIX,manasporthorse.com
|
||||
DOMAIN-SUFFIX,marissatomei.com
|
||||
|
||||
@@ -106,7 +106,7 @@ local-zone: "lindseysopticians.com" static
|
||||
local-zone: "linkshe.com" static
|
||||
local-zone: "liveshopdealz.com" static
|
||||
local-zone: "locchalet2alpes.com" static
|
||||
local-zone: "look-like-star.myshipify.com" static
|
||||
local-zone: "look-like-star.myshopify.com" static
|
||||
local-zone: "lrgst.com" static
|
||||
local-zone: "manasporthorse.com" static
|
||||
local-zone: "marissatomei.com" static
|
||||
|
||||
@@ -1599,13 +1599,9 @@ if __name__ == "__main__":
|
||||
|
||||
print('The domains-based list versions have been generated.')
|
||||
|
||||
|
||||
|
||||
|
||||
import requests
|
||||
import re
|
||||
import os
|
||||
os.mkdir('Anti-Malware List')
|
||||
#/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\
|
||||
#•X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X•
|
||||
#\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Dandelion%20Sprout\'s%20Anti-Malware%20List.txt']
|
||||
|
||||
@@ -2527,4 +2523,747 @@ if __name__ == "__main__":
|
||||
with open(OUTPUT_AGH, "w") as text_file:
|
||||
text_file.write(agh_filter)
|
||||
|
||||
print('The script has finished its work')
|
||||
print('The script has finished its work')
|
||||
|
||||
#/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\/•\
|
||||
#•X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X•
|
||||
#\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Anti-F%D1%96%D0%9C%20List.txt']
|
||||
|
||||
UNSUPPORTED_DOMAINS = ['/', '##', '#.', '#@', '#?', '!#', '[', '!']
|
||||
|
||||
OUTPUT = 'Domeneversjoner/xyzzyxfim.txt'
|
||||
OUTPUT_DOMAINS = 'Domeneversjoner/AntiF%D1%96%D0%9C%20ListDomains.txt'
|
||||
OUTPUT_HOSTS = 'Domeneversjoner/AntiF%D1%96%D0%9C%20ListHosts.txt'
|
||||
|
||||
# function that downloads the filter list
|
||||
def download_filters() -> str:
|
||||
text = ''
|
||||
for url in SOURCES:
|
||||
r = requests.get(url)
|
||||
text += r.text
|
||||
return text
|
||||
|
||||
def is_supported_domains(line) -> bool:
|
||||
for token in UNSUPPORTED_DOMAINS:
|
||||
if token in line:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# function that prepares the filter list for AdGuard Home
|
||||
def prepare_domains(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r".*[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 (Domains version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
def prepare_hosts(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r".*[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"127.0.0.1 ",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 («Hosts» version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
if __name__ == "__main__":
|
||||
print('Starting the script')
|
||||
text = download_filters()
|
||||
lines = text.splitlines(False)
|
||||
print('Total number of rules: ' + str(len(lines)))
|
||||
|
||||
domains_filter = prepare_domains(lines)
|
||||
hosts_filter = prepare_hosts(lines)
|
||||
|
||||
with open(OUTPUT, "w") as text_file:
|
||||
text_file.write(text)
|
||||
|
||||
with open(OUTPUT_DOMAINS, "w") as text_file:
|
||||
text_file.write(domains_filter)
|
||||
|
||||
with open(OUTPUT_HOSTS, "w") as text_file:
|
||||
text_file.write(hosts_filter)
|
||||
|
||||
print('The list versions have been generated.')
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/WikiaPureBrowsingExperience.txt']
|
||||
|
||||
UNSUPPORTED_DOMAINS = ['/', '##', '#.', '#@', '#?', '!#', '[', '!']
|
||||
|
||||
OUTPUT = 'Domeneversjoner/xyzzyxwikia.txt'
|
||||
OUTPUT_DOMAINS = 'Domeneversjoner/WikiaPureBrowsingExperienceDomains.txt'
|
||||
OUTPUT_HOSTS = 'Domeneversjoner/WikiaPureBrowsingExperienceHosts.txt'
|
||||
|
||||
# function that downloads the filter list
|
||||
def download_filters() -> str:
|
||||
text = ''
|
||||
for url in SOURCES:
|
||||
r = requests.get(url)
|
||||
text += r.text
|
||||
return text
|
||||
|
||||
def is_supported_domains(line) -> bool:
|
||||
for token in UNSUPPORTED_DOMAINS:
|
||||
if token in line:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# function that prepares the filter list for AdGuard Home
|
||||
def prepare_domains(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 (Domains version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
def prepare_hosts(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"127.0.0.1 ",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 («Hosts» version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
if __name__ == "__main__":
|
||||
print('Starting the script')
|
||||
text = download_filters()
|
||||
lines = text.splitlines(False)
|
||||
print('Total number of rules: ' + str(len(lines)))
|
||||
|
||||
domains_filter = prepare_domains(lines)
|
||||
hosts_filter = prepare_hosts(lines)
|
||||
|
||||
with open(OUTPUT, "w") as text_file:
|
||||
text_file.write(text)
|
||||
|
||||
with open(OUTPUT_DOMAINS, "w") as text_file:
|
||||
text_file.write(domains_filter)
|
||||
|
||||
with open(OUTPUT_HOSTS, "w") as text_file:
|
||||
text_file.write(hosts_filter)
|
||||
|
||||
print('The list versions have been generated.')
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/BrowseWebsitesWithoutLoggingIn.txt']
|
||||
|
||||
UNSUPPORTED_DOMAINS = ['/', '##', '#.', '#@', '#?', '!#', '[', '!']
|
||||
|
||||
OUTPUT = 'Domeneversjoner/xyzzyxbrowsewebsites.txt'
|
||||
OUTPUT_DOMAINS = 'Domeneversjoner/BrowseWebsitesWithoutLoggingInDomains.txt'
|
||||
OUTPUT_HOSTS = 'Domeneversjoner/BrowseWebsitesWithoutLoggingInHosts.txt'
|
||||
|
||||
# function that downloads the filter list
|
||||
def download_filters() -> str:
|
||||
text = ''
|
||||
for url in SOURCES:
|
||||
r = requests.get(url)
|
||||
text += r.text
|
||||
return text
|
||||
|
||||
def is_supported_domains(line) -> bool:
|
||||
for token in UNSUPPORTED_DOMAINS:
|
||||
if token in line:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# function that prepares the filter list for AdGuard Home
|
||||
def prepare_domains(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 (Domains version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"/\*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"/\?meter",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]third-party.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
def prepare_hosts(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"127.0.0.1 ",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 («Hosts» version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"/\*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"/\?meter",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]third-party.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^(cdn\.)",
|
||||
r"127.0.0.1 \1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
if __name__ == "__main__":
|
||||
print('Starting the script')
|
||||
text = download_filters()
|
||||
lines = text.splitlines(False)
|
||||
print('Total number of rules: ' + str(len(lines)))
|
||||
|
||||
domains_filter = prepare_domains(lines)
|
||||
hosts_filter = prepare_hosts(lines)
|
||||
|
||||
with open(OUTPUT, "w") as text_file:
|
||||
text_file.write(text)
|
||||
|
||||
with open(OUTPUT_DOMAINS, "w") as text_file:
|
||||
text_file.write(domains_filter)
|
||||
|
||||
with open(OUTPUT_HOSTS, "w") as text_file:
|
||||
text_file.write(hosts_filter)
|
||||
|
||||
print('The list versions have been generated.')
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/AntiAmazonListForTwitch.txt']
|
||||
|
||||
UNSUPPORTED_DOMAINS = ['/', '##', '#.', '#@', '#?', '!#', '[', '!']
|
||||
|
||||
OUTPUT = 'Domeneversjoner/xyzzyxantiamazon.txt'
|
||||
OUTPUT_DOMAINS = 'Domeneversjoner/AntiAmazonListForTwitchDomains.txt'
|
||||
OUTPUT_HOSTS = 'Domeneversjoner/AntiAmazonListForTwitchHosts.txt'
|
||||
|
||||
# function that downloads the filter list
|
||||
def download_filters() -> str:
|
||||
text = ''
|
||||
for url in SOURCES:
|
||||
r = requests.get(url)
|
||||
text += r.text
|
||||
return text
|
||||
|
||||
def is_supported_domains(line) -> bool:
|
||||
for token in UNSUPPORTED_DOMAINS:
|
||||
if token in line:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# function that prepares the filter list for AdGuard Home
|
||||
def prepare_domains(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 (Domains version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
def prepare_hosts(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"127.0.0.1 ",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 («Hosts» version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
if __name__ == "__main__":
|
||||
print('Starting the script')
|
||||
text = download_filters()
|
||||
lines = text.splitlines(False)
|
||||
print('Total number of rules: ' + str(len(lines)))
|
||||
|
||||
domains_filter = prepare_domains(lines)
|
||||
hosts_filter = prepare_hosts(lines)
|
||||
|
||||
with open(OUTPUT, "w") as text_file:
|
||||
text_file.write(text)
|
||||
|
||||
with open(OUTPUT_DOMAINS, "w") as text_file:
|
||||
text_file.write(domains_filter)
|
||||
|
||||
with open(OUTPUT_HOSTS, "w") as text_file:
|
||||
text_file.write(hosts_filter)
|
||||
|
||||
print('The list versions have been generated.')
|
||||
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/AntiStevenUniverseList.txt']
|
||||
|
||||
UNSUPPORTED_DOMAINS = ['/', '##', '#.', '#@', '#?', '!#', '[', '!']
|
||||
|
||||
OUTPUT = 'Domeneversjoner/xyzzyxsu.txt'
|
||||
OUTPUT_DOMAINS = 'Domeneversjoner/AntiStevenUniverseListDomains.txt'
|
||||
OUTPUT_HOSTS = 'Domeneversjoner/AntiStevenUniverseListHosts.txt'
|
||||
|
||||
# function that downloads the filter list
|
||||
def download_filters() -> str:
|
||||
text = ''
|
||||
for url in SOURCES:
|
||||
r = requests.get(url)
|
||||
text += r.text
|
||||
return text
|
||||
|
||||
def is_supported_domains(line) -> bool:
|
||||
for token in UNSUPPORTED_DOMAINS:
|
||||
if token in line:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
# function that prepares the filter list for AdGuard Home
|
||||
def prepare_domains(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 (Domains version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
def prepare_hosts(lines) -> str:
|
||||
text = ''
|
||||
|
||||
previous_line = None
|
||||
|
||||
for line in lines:
|
||||
|
||||
if line == previous_line:
|
||||
continue
|
||||
|
||||
line = re.sub(
|
||||
r"[$,]document.*",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"\^$",
|
||||
r"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|\|",
|
||||
r"127.0.0.1 ",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! (Title: .*)",
|
||||
r"# \1 («Hosts» version)",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"!(.*:)",
|
||||
r"#\1",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_domains(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
if __name__ == "__main__":
|
||||
print('Starting the script')
|
||||
text = download_filters()
|
||||
lines = text.splitlines(False)
|
||||
print('Total number of rules: ' + str(len(lines)))
|
||||
|
||||
domains_filter = prepare_domains(lines)
|
||||
hosts_filter = prepare_hosts(lines)
|
||||
|
||||
with open(OUTPUT, "w") as text_file:
|
||||
text_file.write(text)
|
||||
|
||||
with open(OUTPUT_DOMAINS, "w") as text_file:
|
||||
text_file.write(domains_filter)
|
||||
|
||||
with open(OUTPUT_HOSTS, "w") as text_file:
|
||||
text_file.write(hosts_filter)
|
||||
|
||||
print('The list versions have been generated.')
|
||||
Reference in New Issue
Block a user