From dcd6842d3b9c4004ebaafafb86a24924039f1ebd Mon Sep 17 00:00:00 2001 From: borekon Date: Wed, 11 Oct 2023 08:59:30 +0000 Subject: [PATCH] Actualizar 'domain_cleaner.sh' --- domain_cleaner.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/domain_cleaner.sh b/domain_cleaner.sh index 3c6ec10..05ca697 100644 --- a/domain_cleaner.sh +++ b/domain_cleaner.sh @@ -4,9 +4,8 @@ source <(curl -s https://gitea.avc.cx/borekon/scripts/raw/branch/main/colores.sh ip_to_find="0.0.0.0" deleted=0 kept=0 -domains=${1:-$(curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts)} -for j in $domains; do - j=$(echo $j | grep -v ^# | cut -d" " -f2) +domains=$(curl -s ${1:-https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts} | grep -v -e ^# -e localhost | cut -d" " -f2) +for j in $domains; do output=$(dig @192.168.1.1 $j +short) if [ -z "$output" ];then rojo "$j NXDOMAIN"