sfeakes / ipfire-scripts

Scripts for ipfire
30 stars 9 forks source link

Windows 7/10 Anti-Spy List #1

Open shellshocker opened 7 years ago

shellshocker commented 7 years ago

Hi sfeakes,

I tried your script. Working nice so far. Is it possible to get these lists working? https://github.com/crazy-max/WindowsSpyBlocker/tree/master/data/dnscrypt/win7 https://github.com/crazy-max/WindowsSpyBlocker/tree/master/data/dnscrypt/win10

I tried to add the text files in raw format. For example: https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/dnscrypt/win7/extra.txt

This should work:

bash dns_blocklist.sh -s 1,2,3,5,12,13,14,"https://easylist.to/easylist/fanboy-social.txt","https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/dnscrypt/win7/extra.txt","https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/dnscrypt/win7/spy.txt"

But the Windows 7 Extra- and Spywarelist is not working. Any suggestions?

shellshocker commented 7 years ago

Ah I get it now.

Maybe you can change this line:

 curl -v --max-time 30 --connect-timeout 5 --silent "$1" --stderr - | awk -F'[\\\\|\\\\^| \t]+' -v RS='\r|\n' '{if (($0 ~ /^\|\|.*\^$/ || $1 ~ /^0.0.0.0|127.0.0.1/) && $2 ~ /.*\.[a-z].*/)  printf "%s\n",tolower($2) }' >> $TMP_HOSTS_FILE

so that also lists in host file format accepted as source.

shellshocker commented 7 years ago

Have a look. I'm not 100% sure of my edit, but this works for me:

curl -v --max-time 30 --connect-timeout 5 --silent "$1" --stderr - | awk -F'[\\\\|\\\\^| \t]+' -v RS='\r|\n' '{if (($0 ~ /^\|\|.*\^$/ || $1 ~ /^0.0.0.0|127.0.0.1/) && $2 ~ /.*\.[a-z].*/) printf "%s\n",tolower($2); else if ($1 ~ /^[a-z0-9]+\.[a-z]+/) printf "%s\n",tolower($1); }'  >> $TMP_HOSTS_FILE