Update ai cwlist from ublock origin

main
Bob Mottram 2025-07-15 16:06:02 +01:00
parent 6c3ebac1c6
commit 8931da1a1f
2 changed files with 1288 additions and 43 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
#!/bin/bash
wget https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/refs/heads/main/noai_hosts.txt
if [ ! -f noai_hosts.txt ]; then
exit 0
fi
TEMPFILENAME=noai_hosts.txt.tmp
CW_FILENAME=cwlists/ai_generated.json
grep "0.0.0.0" noai_hosts.txt | awk -F ' ' '{print $2}' > $TEMPFILENAME
{ echo "{";
echo " \"name\": \"AI Generated Content\",";
echo " \"warning\": \"AI Generated Content\",";
echo " \"description\": \"Typically images generated by 'AI' generative models\",";
echo " \"words\": [],";
echo " \"hashtags\": [],";
echo " \"domains\": ["; } > $CW_FILENAME
while IFS= read -r line
do
linestr=$(echo "$line" | sed 's/\r$//')
linestr2=" \"${linestr}\","
echo "$linestr2" >> $CW_FILENAME
done < $TEMPFILENAME
{ echo " ]";
echo "}"; } >> $CW_FILENAME
rm $TEMPFILENAME
rm noai_hosts.txt