Script changes + update lists

This commit is contained in:
root 2023-12-22 15:41:12 -05:00
parent f439af6e9b
commit 35cd1cb533
4 changed files with 14 additions and 7 deletions

View file

@ -984,3 +984,6 @@ raw.githubusercontent.com/PythonBotCAI
raw.githubusercontent.com/LocalAlloc
raw.githubusercontent.com/RedVoid999
raw.githubusercontent.com/nekotonk
github.com/64-bithuman
codeload.github.com/64-bithuman
raw.githubusercontent.com/64-bithuman

View file

@ -462,3 +462,4 @@ nos.wjv-1.neo.id
zorox.to
ivynicolenaturalremedies.com
image-generation.perchance.org

View file

@ -1,5 +1,5 @@
#!/bin/bash
echo Fetching OISD blocklists
echo "Fetching OISD blocklists"
if ! command -v curl >/dev/null; then
echo 'curl is required for this script to run.'
exit 1

View file

@ -1,6 +1,7 @@
#!/bin/bash
if ! command -v ftp >/dev/null; then
echo 'ftp is required for this script to work.'
echo "Fetching UT1 blocklists"
if ! command -v curl >/dev/null; then
echo 'curl is required for this script to work.'
exit 1
fi
if ! command -v tar >/dev/null; then
@ -13,10 +14,12 @@ if ! command -v sed >/dev/null; then
fi
categories=("adult" "dating" "lingerie" "remote-control" "sexual_education" "vpn" "redirector")
for category in "${categories[@]}"; do
mkdir -p "ut1/$category"
ftp "ftp://ftp.ut-capitole.fr/pub/reseau/cache/squidguard_contrib/${category}.tar.gz" -o "ut1/${category}.tar.gz"
mkdir -p "ut1/${category}"
curl "https://dsi.ut-capitole.fr/blacklists/download/${category}.tar.gz" -o "ut1/${category}.tar.gz"
tar xzf "ut1/${category}.tar.gz" -C ut1/
sed -i "1s|^|#listcategory: \"UT1 $category (Report False Block: https://dsi.ut-capitole.fr/cgi-bin/squidguard_modify.cgi)\"\n|" "ut1/$category/domains"
sed -i "1s|^|#listcategory: \"UT1 $category (Report False Block: https://dsi.ut-capitole.fr/cgi-bin/squidguard_modify.cgi)\"\n|" "ut1/$category/urls"
sed -i "1s|^|#listcategory: \"UT1 ${category} (Report False Block: https://dsi.ut-capitole.fr/cgi-bin/squidguard_modify.cgi)\"\n|" "ut1/${category}/domains"
if [ -f "ut1/${category}/urls" ]; then
sed -i "1s|^|#listcategory: \"UT1 ${category} (Report False Block: https://dsi.ut-capitole.fr/cgi-bin/squidguard_modify.cgi)\"\n|" "ut1/${category}/urls"
fi
rm "ut1/${category}.tar.gz"
done