Skip to content

Commit

Permalink
Aktualizacja EDRFF do 1.8
Browse files Browse the repository at this point in the history
* Teraz automatycznie uruchomi skrypt do aktualizowania wyjątków dla KADa
  • Loading branch information
hawkeye116477 committed Sep 21, 2024
1 parent f23379f commit 04092d3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/EDRFF.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
# pylint: disable=anomalous-backslash-in-string
# pylint: disable=C0103
# Expired Domains Remover For Filterlists
# v1.7.5
# v1.8
# Usage: EDRFF.py pathToSections listOfExpiredDomains.txt TLD (optional) "exclude"(optional)

import os
import sys
import shutil
import re
from tempfile import NamedTemporaryFile
from multiprocessing import Pool
import subprocess

pj = os.path.join
pn = os.path.normpath
Expand Down Expand Up @@ -93,3 +93,12 @@ def remove_domains(line):

os.chdir(main_path)
os.rmdir(temp_path)

if "KAD" in sections_path and not "KADhosts" in sections_path:
tp_names = ["CERT", "LWS"]
main_path = pn(pj(sections_path, ".."))
for tp_name in tp_names:
U3E_result = subprocess.run([pj(main_path, "scripts", "update3pExpired.py"), tp_name, sys.argv[2]], check=False, capture_output=True, text=True)
print(U3E_result.stdout)
if U3E_result := U3E_result:
print(U3E_result)

0 comments on commit 04092d3

Please sign in to comment.