Better counting on domains blocked

This commit is contained in:
borekon 2024-05-31 07:27:57 +00:00
parent 04b40b4c38
commit ab53c7be75

View File

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
source <(curl -s https://gitea.avc.cx/borekon/scripts/raw/branch/main/colores.sh) source <(curl -s https://gitea.avc.cx/borekon/scripts/raw/branch/main/colores.sh)
ip_to_find="0.0.0.0"
blocked=0 blocked=0
#if [ -z "$1" ] #if [ -z "$1" ]
@ -19,7 +18,7 @@ azul "##################"
for j in $domains; do for j in $domains; do
echo -e "${YELLOW}$j${NC}:" echo -e "${YELLOW}$j${NC}:"
output=$(dig -4 @${dns[0]} $j +short) output=$(dig -4 @${dns[0]} $j +short)
if [[ "$output" == *"$ip_to_find"* ]]; then if [[ -z $output || $output == "0.0.0.0" ]]; then
verde $output verde $output
((blocked++)) ((blocked++))
else else