sefinek / Sefinek-Blocklist-Collection

🌍 A comprehensive repository of blocklists for various DNS servers, featuring over 100 links and more than 6 million domains. Additionally, you can use our personalized Blocklist Generator to tailor content filtering according to your specific needs, giving you full control over what gets blocked on your network.
https://blocklist.sefinek.net
Other
554 stars 26 forks source link

Duplicates files names #35

Closed alsyundawy closed 4 months ago

alsyundawy commented 4 months ago

Can you rename all Duplicates files names?

https://blocklist.sefinek.net/generated/v1/unbound/abuse/blocklistproject/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/abuse/urlhaus.abuse.ch/hostfile.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/0Zinc/easylist.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/DandelionSprout.GameConsoleAdblockList.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/FadeMind/UncheckyAds.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/MajkiIT/SmartTV-ads.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/ShadowWhisperer/Ads.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/adaway/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/anudeepND/adservers.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/blocklistproject/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/blocklistproject/youtube.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/craiu/mobiletrackers.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/crazy-max/spy.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/disconnectme/simple-ad.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/firebog/AdguardDNS.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/firebog/Admiral.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/firebog/Easylist.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/firebog/Prigent-Ads.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/jerryn70/GoodbyeAds.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/r-a-y/AdguardMobileAds.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/sefinek.hosts.conf https://blocklist.sefinek.net/generated/v1/unbound/ads/yoyo/ads-trackers-etc.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/amp/developerdan/amp-hosts-extended.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/amp/ente-dev/google-amp-hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/anime/myanimelist.net.txt https://blocklist.sefinek.net/generated/v1/unbound/anime/shinden.pl.txt https://blocklist.sefinek.net/generated/v1/unbound/apps/discord.txt https://blocklist.sefinek.net/generated/v1/unbound/apps/skype.txt https://blocklist.sefinek.net/generated/v1/unbound/apps/spotify.txt https://blocklist.sefinek.net/generated/v1/unbound/apps/whatsapp.txt https://blocklist.sefinek.net/generated/v1/unbound/crypto/cryptojacking/Snota418/Crypto-streams.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/crypto/cryptojacking/firebog/Prigent/Crypto.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/crypto/cryptojacking/hoshsadiq/adblock-nocoin-list.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/crypto/cryptojacking/zerodot1/CoinBlockerLists-hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/dating-services/developerdan/extended.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/dead-domains/jarelllama/dead-domains.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/drugs/blocklistproject/drugs.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/FadeMind/add-2o7Net.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/MajkiIT/adguard-host.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/MajkiIT/easy-privacy-host.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/deathbybandaid/CountryCodesLists-France.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/deathbybandaid/ParsedBlacklists-EasyList-Liste-FR.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/deathbybandaid/ParsedBlacklists-EasyList.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/hagezi/pro.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/justdomains/adguarddns-justdomains.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/oisd/big.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/r-a-y/AdguardApps.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/extensions/r-a-y/AdguardMobileSpyware.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/fakenews/StevenBlack/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/fakenews/marktron/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/fraud/blocklistproject/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/gambling/MajkiIT/gambling-hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/gambling/StevenBlack/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/gambling/TrustPositif/gambling-indonesia.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/gambling/blocklistproject/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/gambling/sefinek.hosts.conf https://blocklist.sefinek.net/generated/v1/unbound/games/league-of-legends.conf https://blocklist.sefinek.net/generated/v1/unbound/games/valorant.conf https://blocklist.sefinek.net/generated/v1/unbound/hate-and-junk/developerdan/extended.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/AssoEchap/stalkerware-indicators.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/DandelionSprout-AntiMalwareHosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/RPiList/Malware.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/Spam404/main-blacklist.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/bigdargon/hostsVN.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/blocklistproject/malware.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/digitalside/latestdomains.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/disconnectme/simple-malvertising.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/malware-filter/urlhaus-filter-hosts-online.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/phishing.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/quidsup/notrack-malware.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/reported-by-norton.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/sefinek.hosts1.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/sefinek.hosts2.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/suspicious.conf https://blocklist.sefinek.net/generated/v1/unbound/malicious/web-attacks.conf https://blocklist.sefinek.net/generated/v1/unbound/other/StevenBlack/fakenews-gambling-porn.fork.txt https://blocklist.sefinek.net/generated/v1/unbound/other/polish-blocklists/MajkiIT/hostfile.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/other/polish-blocklists/PolishFiltersTeam/KADhosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/other/polish-blocklists/cert.pl/domains-hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/phishing/Dogino/Discord-Phishing-URLs-phishing.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/phishing/RPiList/Phishing-Angriffe.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/phishing/blocklistproject/phishing.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/phishing/phishing.army/blocklist-extended.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/piracy/blocklistproject/piracy.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/4skinSkywalker/hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/Sinfonietta/pornography-hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/StevenBlack/porn.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/blocklistproject/porn.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/chadmayfield/pi-blocklist-porn-all.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/oisd/nsfw.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/porn/sefinek.hosts.conf https://blocklist.sefinek.net/generated/v1/unbound/ransomware/blocklistproject/ransomware.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/redirect/blocklistproject/redirect.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/scam/Dogino/Discord-Phishing-URLs-scam.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/scam/blocklistproject/scam.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/scam/durablenapkin/scamblocklist.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/scam/jarelllama/scam.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/sites/booth.pm.txt https://blocklist.sefinek.net/generated/v1/unbound/sites/gamebanana.conf https://blocklist.sefinek.net/generated/v1/unbound/sites/omegle.conf https://blocklist.sefinek.net/generated/v1/unbound/sites/patreon.conf https://blocklist.sefinek.net/generated/v1/unbound/sites/pinterest.txt https://blocklist.sefinek.net/generated/v1/unbound/sites/pixiv.conf https://blocklist.sefinek.net/generated/v1/unbound/sites/riotgames.conf https://blocklist.sefinek.net/generated/v1/unbound/sites/youtube.txt https://blocklist.sefinek.net/generated/v1/unbound/social/facebook.txt https://blocklist.sefinek.net/generated/v1/unbound/social/instagram.txt https://blocklist.sefinek.net/generated/v1/unbound/social/snapchat.conf https://blocklist.sefinek.net/generated/v1/unbound/social/tiktok.conf https://blocklist.sefinek.net/generated/v1/unbound/social/twitter.txt https://blocklist.sefinek.net/generated/v1/unbound/spam/FadeMind/add-Spam.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/spam/RPiList/spam-mails.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/spam/stopforumspam/toxic-domains-whole.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/suspicious/FadeMind/add-Risk.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/suspicious/firebog/w3kbl.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/test.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/0Zinc/easyprivacy.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/MajkiIT/adguard-mobile-host.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/ente-dev/tv.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/frogeye/firstparty-trackers-hosts.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/mitchellkrogza/INACTIVE.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/neodevpro/host.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/tracking-and-telemetry/quidsup/trackers-hosts.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/useless-websites/jarelllama/parked-domains.fork.conf https://blocklist.sefinek.net/generated/v1/unbound/useless-websites/sefinek.hosts.conf

sefinek commented 4 months ago

Hmm, I don't quite understand what the issue is

alsyundawy commented 4 months ago

here you go

https://blocklist.sefinek.net/generated/v1/unbound/abuse/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/ads/adaway/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/ads/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/fakenews/StevenBlack/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/fakenews/marktron/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/fraud/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/gambling/StevenBlack/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/gambling/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/unbound/porn/4skinSkywalker/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/abuse/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/ads/adaway/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/ads/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/fakenews/StevenBlack/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/fakenews/marktron/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/fraud/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/gambling/StevenBlack/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/gambling/blocklistproject/hosts.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/porn/4skinSkywalker/hosts.fork.conf

the name must like

https://blocklist.sefinek.net/generated/v1/rpz/porn/4skinSkywalker/4skinSkywalker-porn.fork.conf
https://blocklist.sefinek.net/generated/v1/rpz/gambling/blocklistproject/blocklistproject-gambling.fork.conf
sefinek commented 4 months ago

I named these files hosts.fork.txt because they are the only files in a specific folder

alsyundawy commented 4 months ago

I found the same name again

https://blocklist.sefinek.net/generated/v1/0.0.0.0/abuse/blocklistproject/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/fraud/blocklistproject/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/porn/4skinSkywalker/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/fakenews/StevenBlack/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/fakenews/marktron/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/gambling/StevenBlack/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/gambling/blocklistproject/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/127.0.0.1/ads/adaway/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/127.0.0.1/ads/blocklistproject/hosts.fork.txt

https://blocklist.sefinek.net/generated/v1/0.0.0.0/abuse/blocklistproject/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/fraud/blocklistproject/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/porn/4skinSkywalker/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/fakenews/StevenBlack/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/fakenews/marktron/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/gambling/StevenBlack/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/0.0.0.0/gambling/blocklistproject/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/noip/ads/adaway/hosts.fork.txt https://blocklist.sefinek.net/generated/v1/noip/ads/blocklistproject/hosts.fork.txt

then I focused on naming this file because it didn't occur to you that if the user were to download all the files there would definitely be a conflict or overwrite.

sefinek commented 4 months ago

Ah, now I understand what you mean. Usually, these lists are downloaded by an automated script written by the user, not by the user themselves. Therefore, in my opinion, renaming these files differently is unnecessary, as the end user can freely manipulate the file names when downloading.

In theory, it could look like this:

const axios = require('axios');
const fs = require('fs/promises');
const path = require('path');

// List of files to download with their respective URLs and paths
const filesToDownload = [
    {
        url: 'https://blocklist.sefinek.net/generated/v1/0.0.0.0/gambling/StevenBlack/hosts.fork.txt',
        path: 'lists/StevenBlack.hosts.txt'
    },
    {
        url: 'https://blocklist.sefinek.net/generated/v1/0.0.0.0/gambling/blocklistproject/hosts.fork.txt',
        path: 'lists/blocklistproject.hosts.txt'
    }
];

// Function to download a file given its URL and save it to the specified path
const downloadFile = async file => {
    try {
        // Fetch the file data from the URL
        const res = await axios.get(file.url, { responseType: 'arraybuffer' });

        // Ensure the directory exists or create it recursively
        await fs.mkdir(path.dirname(file.path), { recursive: true });

        // Write the fetched data to the specified file path
        await fs.writeFile(file.path, res.data);
        console.log(`Downloaded file ${file.url} to ${file.path}`);
    } catch (err) {
        // Log any errors that occur during the download process
        console.error(`Error downloading file ${file.url}.`, err);
    }
};

// Main function to download all files concurrently
(async () => {
    await Promise.all(filesToDownload.map(downloadFile));
})();
alsyundawy commented 4 months ago

this my bash script dns rpz updater

BLACKLIST_URLS=(
  "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-only/hosts"
  "https://raw.githubusercontent.com/Bon-Appetit/porn-domains/master/block.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/doh-onlydomains.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/fake-onlydomains.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/gambling-onlydomains.txt"
)
ADDITIONAL_URLS=(
  "https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-rpz.conf"
  "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-rpz.conf"
  "https://malware-filter.gitlab.io/pup-filter/pup-filter-rpz.conf"
  "https://malware-filter.gitlab.io/malware-filter/phishing-filter-rpz.conf"
)
WHITELIST_URL="https://raw.githubusercontent.com/alsyundawy/hds-pihole-blacklist/main/dnssehat/whitelist.txt"

BLACKLIST_OUTPUT="/etc/bind/zones/blacklist.rpz"
WHITELIST_OUTPUT="/etc/bind/zones/whitelist.rpz"
SAFESEARCH_OUTPUT="/etc/bind/zones/google_safesearch.rpz"
ADDITIONAL_OUTPUT_DIR="/etc/bind/zones/"
sefinek commented 4 months ago

In theory, it could look like this in bash:

#!/bin/bash

# List of URLs and their corresponding file paths for blacklists
BLACKLIST_URLS=(
  "https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-only/hosts, lists/StevenBlack.hosts.txt"
  "https://raw.githubusercontent.com/Bon-Appetit/porn-domains/master/block.txt, lists/Bon-Appetit.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/doh-onlydomains.txt, lists/hagezi-doh-onlydomains.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/fake-onlydomains.txt, lists/hagezi-fake-onlydomains.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/tif-onlydomains.txt, lists/hagezi-tif-onlydomains.txt"
  "https://raw.githubusercontent.com/hagezi/dns-blocklists/main/wildcard/gambling-onlydomains.txt, lists/hagezi-gambling-onlydomains.txt"
)

# List of URLs and their corresponding file paths for additional URLs
ADDITIONAL_URLS=(
  "https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-rpz.conf, lists/urlhaus-filter-rpz.conf"
  "https://malware-filter.gitlab.io/malware-filter/vn-badsite-filter-rpz.conf, lists/vn-badsite-filter-rpz.conf"
  "https://malware-filter.gitlab.io/pup-filter/pup-filter-rpz.conf, lists/pup-filter-rpz.conf"
  "https://malware-filter.gitlab.io/malware-filter/phishing-filter-rpz.conf, lists/phishing-filter-rpz.conf"
)

# URL and file path for the whitelist
WHITELIST_URL="https://raw.githubusercontent.com/alsyundawy/hds-pihole-blacklist/main/dnssehat/whitelist.txt, lists/whitelist.txt"

# Function to create necessary directories
# Takes a list of URL-path pairs, extracts paths, and creates directories
create_directories() {
  local entries=("$@")
  for entry in "${entries[@]}"; do
    IFS=', ' read -r _ path <<< "$entry"
    dir=$(dirname "$path")
    mkdir -p "$dir"
  done
}

# Function to download files
# Takes a list of URL-path pairs, downloads each file to the specified path
download_files() {
  local entries=("$@")
  for entry in "${entries[@]}"; do
    IFS=', ' read -r url path <<< "$entry"
    echo "Downloading $url to $(realpath $path)..."
    curl -s -o "$path" "$url"
  done
}

# Create directories for all lists
create_directories "${BLACKLIST_URLS[@]}"
create_directories "${ADDITIONAL_URLS[@]}"
create_directories "$WHITELIST_URL"

# Download files for all lists
download_files "${BLACKLIST_URLS[@]}"
download_files "${ADDITIONAL_URLS[@]}"
download_files "$WHITELIST_URL"
alsyundawy commented 4 months ago

Function to process the blacklist using aria2c

process_blacklist() { local output_file=$BLACKLIST_OUTPUT echo "$(generate_rpz_header)" > "$output_file" for url in "${BLACKLIST_URLS[@]}"; do aria2c --check-certificate=false -x 16 -s 16 --retry-wait=5 --retry=3 --allow-overwrite=true --conditional-get=true -o temp_blacklist.txt "$url"

Ensure proper RPZ format: domains should be redirected to a specific domain

cat temp_blacklist.txt | sed '/^#/d' | sed '/^;/d' |sed '/^\s*$/d' | sort | uniq | awk '{if ($1 ~ /^0\.0\.0\.0/) print $2 " IN CNAME ."; else print $1 " IN CNAME ."; "*." $1 " IN CNAME ."}' >> "$output_file"
rm -rf temp_blacklist.txt

done }