Fix for overly strict IP blockings

This commit is contained in:
Imre Kristoffer Eilertsen
2020-02-09 12:17:36 +01:00
committed by GitHub
parent 004782a737
commit 4e2a7f6a2e
3 changed files with 155 additions and 5351 deletions
+66
View File
@@ -318,6 +318,72 @@ def prepare_agh(lines) -> str:
line
)
line = re.sub(
r"^\|\|9anime\.\*\^$",
r"",
line
)
line = re.sub(
r"\|\|([0-9][0-9]?[0-9]?)\.([0-9][0-9]?[0-9]?)\.([0-9][0-9]?[0-9]?)\.$",
r"/^\1\.\2\.\3\..*/",
line
)
line = re.sub(
r"\|\|([0-9][0-9]?[0-9]?)\.([0-9][0-9]?[0-9]?)\.$",
r"/^\1\.\2\..*/",
line
)
line = re.sub(
r"! https?://forums\.lanik\.us.*",
r"",
line
)
line = re.sub(
r"! https?://www\.reddit\.com/r/uBlockOrigin.*",
r"",
line
)
line = re.sub(
r"! https?://github\.com/uBlockOrigin.*",
r"",
line
)
line = re.sub(
r"! https://github\.com/NanoMeow.*",
r"",
line
)
line = re.sub(
r"! https://github\.com/jspenguin2017/uBlockProtector.*",
r"",
line
)
line = re.sub(
r"! https://github.com/reek/anti-adblock-killer.*",
r"",
line
)
line = re.sub(
r"! https://github.com/NanoAdblocker.*",
r"",
line
)
line = re.sub(
r"! https://github\.com/jspenguin2017/uBlockProtector.*",
r"",
line
)
if is_supported_agh(line) and not line == '':
text += line + '\r\n'
File diff suppressed because it is too large Load Diff
@@ -3,7 +3,7 @@
! Expires: 14 days
! 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: 08February2020v1-Alpha
! Version: 09February2020v1-Alpha
@@104.198.251.169
104.154.237.93
174.142.194.177