Actualizar 'domain_cleaner.sh'

This commit is contained in:
borekon 2023-06-20 11:47:24 +00:00
parent 4153142a57
commit 2c4cf84bce

View File

@ -5,7 +5,8 @@ BLUE='\033[1;35m'
YELLOW='\033[1;33m'
NC='\033[0m'
ip_to_find="0.0.0.0"
blocked=0
deleted=0
kept=0
rojo(){
echo -e "${RED}$1${NC}"
}
@ -23,10 +24,14 @@ domains=$(curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/dat
for j in $domains; do
output=$(dig @192.168.1.1 $j +short)
if [ -z "$output" ];then
rojo "$output NXDOMAIN"
rojo "$j NXDOMAIN"
echo ""
((deleted++))
else
echo $j\:$output
echo -e "0.0.0.0\t$j" >> lista.txt
((kept++))
fi
done;
amarillo "Domains kept = $kept"
amarillo "Domains deleted = $deleted"