mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 20:01:04 +00:00
32 lines
1.2 KiB
Bash
32 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# create an empty input.csv file
|
|
touch input.csv
|
|
|
|
# declare an array of urls
|
|
urls=(
|
|
https://raw.githubusercontent.com/mullvad/dns-blocklists/main/output/doh/doh_adblock.txt
|
|
https://raw.githubusercontent.com/mullvad/dns-blocklists/main/output/doh/doh_gambling.txt
|
|
https://raw.githubusercontent.com/mullvad/dns-blocklists/main/output/doh/doh_privacy.txt
|
|
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.Risk/hosts
|
|
https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareHosts.txt
|
|
https://rescure.me/rescure_domain_blacklist.txt
|
|
https://adaway.org/hosts.txt
|
|
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
|
|
)
|
|
|
|
# loop through the urls and download each file with curl
|
|
for url in "${urls[@]}"; do
|
|
# get the file name from the url
|
|
file=$(basename "$url")
|
|
# download the file with curl and save it as file.txt
|
|
curl -o "$file.txt" "$url"
|
|
# append the file contents to input.csv and add a newline
|
|
cat "$file.txt" >> input.csv
|
|
echo "" >> input.csv
|
|
# remove the file.txt
|
|
rm "$file.txt"
|
|
done
|
|
|
|
# print a message when done
|
|
echo "Done. The input.csv file contains merged data from recommended filter lists." |