#!/bin/bash source <(curl -s https://gitea.avc.cx/borekon/scripts/raw/branch/main/colores.sh) ip_to_find="0.0.0.0" blocked=0 #if [ -z "$1" ] # then # dns=$(cat /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2) # else # dns=$1 #fi dns=${1:-$(head -n 1 /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2)} domains=$(curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts | grep -v ^# | shuf -n 10 | cut -d" " -f2) verde "Using $dns DNS server" for j in $domains; do echo -e "${YELLOW}$j${NC}:" output=$(dig @$dns $j +short) if [[ "$output" == *"$ip_to_find"* ]]; then verde $output ((blocked++)) else rojo $output fi echo "" done; porcentaje=$(( blocked * 10 )) azul "$porcentaje % dominios bloqueados"