Add files via upload

This commit is contained in:
Imre Kristoffer Eilertsen
2023-10-15 06:03:41 +02:00
committed by GitHub
parent e6f6e7e0d5
commit 3242e66b20
2 changed files with 200 additions and 71 deletions
+31 -19
View File
@@ -1,7 +1,7 @@
import requests
import re
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/AdGuard%20Home%20Compilation%20List/TopDescription.notlist', 'https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt', 'https://filters.adtidy.org/extension/ublock/filters/2_without_easylist.txt', 'https://filters.adtidy.org/extension/ublock/filters/16.txt', 'https://www.i-dont-care-about-cookies.eu/abp/', 'https://easylist-downloads.adblockplus.org/easylistgermany.txt', 'https://raw.githubusercontent.com/abp-filters/abp-filters-anti-cv/master/english.txt', 'https://raw.githubusercontent.com/abp-filters/abp-filters-anti-cv/master/french.txt', 'https://easylist-downloads.adblockplus.org/antiadblockfilters.txt', 'https://easylist-downloads.adblockplus.org/advblock.txt', 'https://easylist-downloads.adblockplus.org/Liste_AR.txt', 'https://easylist-downloads.adblockplus.org/easylistspanish.txt']
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/AdGuard%20Home%20Compilation%20List/TopDescription.notlist', 'https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters-2020.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt', 'https://filters.adtidy.org/extension/ublock/filters/2_without_easylist.txt', 'https://raw.githubusercontent.com/AdguardTeam/AdguardFilters/master/BaseFilter/sections/adservers.txt', 'https://raw.githubusercontent.com/AdguardTeam/AdguardFilters/master/BaseFilter/sections/general_extensions.txt', 'https://filters.adtidy.org/extension/ublock/filters/16.txt', 'https://www.i-dont-care-about-cookies.eu/abp/', 'https://easylist-downloads.adblockplus.org/easylistgermany.txt', 'https://raw.githubusercontent.com/abp-filters/abp-filters-anti-cv/master/english.txt', 'https://raw.githubusercontent.com/abp-filters/abp-filters-anti-cv/master/french.txt', 'https://easylist-downloads.adblockplus.org/antiadblockfilters.txt', 'https://easylist-downloads.adblockplus.org/advblock.txt', 'https://easylist-downloads.adblockplus.org/Liste_AR.txt', 'https://easylist-downloads.adblockplus.org/easylistspanish.txt']
UNSUPPORTED_AGH = ['##', '@#', '#?#', '#%#', '!+', 'domain=', 'generichide', '$ghide', ',ghide', '$csp', 'xmlhttprequest', '$xhr', '$stylesheet', '$elemhide', '$inline-script', '$other', '$~object', 'redirect=', '#$#', '$domain', ',domain', '[Adblock Plus 2.0]', 'CV-', '$csp']
UNSUPPORTED_IP = ['##', '@#', '#?#', '#%#', 'domain=', 'generichide', '$csp', 'badfilter', 'xmlhttprequest', '$xhr', '$stylesheet', '$elemhide', '$inline-script', '$other', '$~object', 'redirect=', '#$#', '!+']
@@ -138,6 +138,12 @@ def prepare_agh(lines) -> str:
line
)
line = re.sub(
r"([$,])network",
"",
line
)
line = re.sub(
r",important",
"$important",
@@ -982,6 +988,12 @@ def prepare_ip(lines) -> str:
if line == previous_line:
continue
line = re.sub(
r"^.*\)([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.\..*$",
r"\1.\2.\3.0/24",
line
)
line = re.sub(
r"([$,])third-party",
"",
@@ -1084,6 +1096,18 @@ def prepare_ip(lines) -> str:
line
)
line = re.sub(
r"([$,])network",
"",
line
)
line = re.sub(
r"([$,])websocket.*",
"",
line
)
line = re.sub(
r",important",
"$important",
@@ -1114,12 +1138,6 @@ def prepare_ip(lines) -> str:
line
)
line = re.sub(
r"^[0-9].*",
"",
line
)
line = re.sub(
r"^\|[a-z0-9].*",
"",
@@ -1270,12 +1288,6 @@ def prepare_ip(lines) -> str:
line
)
line = re.sub(
r"^/.*[a-z0-9]\\?/[a-z0-9\(].*",
r"",
line
)
line = re.sub(
r"^/\^[h.].*",
r"",
@@ -1288,12 +1300,6 @@ def prepare_ip(lines) -> str:
line
)
line = re.sub(
r"^/\(https\?:\\/\\/\)([0-9][0-9]?[0-9]?)\\.([0-9][0-9]?[0-9]?)\\.([0-9][0-9]?[0-9]?)\\.\..*/",
r"\1.\2.\3.0/24",
line
)
line = re.sub(
r"^/\(https\?:\\/\\/\)([0-9][0-9]?[0-9]?)\\.([0-9][0-9]?[0-9]?)\\.\..*/",
r"",
@@ -1354,6 +1360,12 @@ def prepare_ip(lines) -> str:
line
)
line = re.sub(
r"^[a-zA-Z0-9].*[#$|a-z].*",
r"",
line
)
if is_supported_ip(line) and not line == '':
text += line + '\n'
@@ -4,67 +4,184 @@
! Licence: In accordance with the Dandelicence, the borrowed entries are considered to have been changed and reduced enough from their original lists, that they're counted as transformative work, meaning that creditation and seperate paragraphs are not necessary unless one of the lists' makers were to ask for such.
! Description: This was made as a proof-of-concept to see if the IP-based entries of major adblock lists, could be used to create an IP adblocker list for IP blockers, despite how IP lists are normally only meant to block malware, E-mail spam, or port scanners.
! Version: 15October2023v2-PreAlpha
5.45.79.15
5.61.55.143
5.101.115.170
23.83.114.131
23.109.82.0/24
23.109.87.0/24
23.109.150.101
23.109.150.208
23.109.150.253
23.109.248.0/24
23.195.91.195
34.102.137.201
35.178.185.67
35.184.188.211
35.193.89.147
35.224.227.218
35.226.75.50
35.227.234.222
35.232.188.118
35.238.205.163
37.1.209.213
37.1.213.100
51.77.227.96/29
51.89.115.13
51.89.187.136/29
51.178.195.171
51.195.31.0/24
51.195.115.102
62.109.18.206
62.212.73.45
85.114.133.62
88.42.84.136
91.241.60.117
95.213.229.88
95.213.231.34
104.198.76.219
117.254.84.212
130.211.212.60
142.91.159.0/24
143.244.184.39
146.59.223.83
213.32.115.0/24
217.182.11.0/24
51.195.31.0/24
142.91.159.127
142.91.159.136
142.91.159.139
142.91.159.146
142.91.159.147
142.91.159.150
142.91.159.164
142.91.159.169
142.91.159.179
142.91.159.201
142.91.159.220
142.91.159.223
142.91.159.244
158.247.208.0/24
158.247.208.115
162.252.214.4
167.99.31.227
167.206.10.148
172.255.6.0/24
176.31.68.242
176.114.0.131
185.147.34.126
185.161.248.253
188.42.84.21
188.42.84.23
172.255.6.135
172.255.6.137
172.255.6.139
172.255.6.140
172.255.6.150
172.255.6.152
172.255.6.199
172.255.6.228
172.255.6.248
172.255.6.252
172.255.6.254
172.255.6.2
172.255.6.59
188.42.84.110
188.42.84.137
188.42.84.159
188.42.84.160
188.42.84.162
188.42.84.21
188.42.84.23
203.195.121.0
203.195.121.103
203.195.121.119
203.195.121.11
203.195.121.134
203.195.121.184
203.195.121.195
203.195.121.1
203.195.121.209
203.195.121.217
203.195.121.219
203.195.121.224
203.195.121.229
203.195.121.24
203.195.121.28
203.195.121.29
203.195.121.34
203.195.121.36
203.195.121.40
203.195.121.46
203.195.121.70
203.195.121.72
203.195.121.73
203.195.121.74
23.109.150.208
23.109.150.253
23.109.248.125
23.109.248.129
23.109.248.130
23.109.248.135
23.109.248.139
23.109.248.149
23.109.248.14
23.109.248.174
23.109.248.183
23.109.248.20
23.109.248.229
23.109.248.247
23.109.248.29
23.109.82.0/24
23.109.82.119
23.109.82.173
23.109.82.202
23.109.82.44
23.109.87.0/24
23.109.87.101
23.109.87.118
23.109.87.123
23.109.87.127
23.109.87.139
23.109.87.14
23.109.87.182
23.109.87.192
23.109.87.213
23.109.87.217
23.109.87.42
23.109.87.45
23.109.87.47
23.109.87.55
23.109.87.71
23.109.87.74
23.195.91.195
34.102.137.201
35.227.234.222
35.232.188.118
37.1.209.213
51.77.227.100
51.77.227.101
51.77.227.102
51.77.227.103
51.77.227.96
51.77.227.97
51.77.227.98
51.77.227.99
51.89.187.136
51.89.187.137
51.89.187.138
51.89.187.139
51.89.187.140
51.89.187.141
51.89.187.142
51.89.187.143
88.42.84.136
167.206.10.148
142.91.159.107
143.244.184.39
146.59.223.83
176.31.68.242
185.147.34.126
188.42.84.199
188.72.219.36
198.16.64.66
203.195.121.0/24
213.32.115.0/24
23.109.150.101
23.109.248.0/24
23.109.82.104
23.109.82.74
23.109.87.15
5.45.79.15
51.178.195.171
51.195.115.102
51.89.115.13
35.226.75.50
35.224.227.218
35.238.205.163
5.61.55.143
37.1.213.100
23.109.87.170
91.241.60.117
185.161.248.253
188.72.219.36
117.254.84.212:3000
185.165.169.108
57.128.71.215
185.246.188.125
185.246.188.124
194.63.140.103
194.63.143.61
194.63.143.96
104.155.51.226:443
139.45.197.151
139.45.197.152
139.45.197.153
139.45.197.154
54.229.21.199:3480
54.246.248.134:3480
198.16.64.66
213.206.98.70
217.182.11.0/24
23.83.114.131
172.255.6.0/24
62.212.73.45
85.114.133.62
130.211.212.60
176.114.0.131
35.184.188.211
104.198.76.219
35.178.185.67
5.101.115.170
62.109.18.206
95.213.229.88
95.213.231.34
35.193.89.147