Initial version

This commit is contained in:
mrrfv
2023-05-02 17:26:54 +02:00
parent 2802571c9d
commit d51b99214d
11 changed files with 501 additions and 2 deletions
+32
View File
@@ -0,0 +1,32 @@
#!/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."