From 0abc923d0df73d69d67e967f7736cb085d719187 Mon Sep 17 00:00:00 2001 From: borekon Date: Tue, 20 Jun 2023 11:26:01 +0000 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20'domain=5Fcleaner.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain_cleaner.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 domain_cleaner.sh diff --git a/domain_cleaner.sh b/domain_cleaner.sh new file mode 100644 index 0000000..7e3c865 --- /dev/null +++ b/domain_cleaner.sh @@ -0,0 +1,32 @@ +#!/bin/bash +RED='\033[1;31m' +GREEN='\033[1;32m' +BLUE='\033[1;35m' +YELLOW='\033[1;33m' +NC='\033[0m' +ip_to_find="0.0.0.0" +blocked=0 +rojo(){ + echo -e "${RED}$1${NC}" +} +amarillo(){ + echo -e "${YELLOW}$1${NC}" +} +verde(){ + echo -e "${GREEN}$1${NC}" +} +azul(){ + echo -e "${BLUE}$1${NC}" +} + +domains=$(curl -s https://raw.githubusercontent.com/StevenBlack/hosts/master/data/StevenBlack/hosts | grep -v ^# | cut -d" " -f2) +for j in $domains; do + output=$(dig @192.168.1.1 $j +short) + if [ -z "$output" ];then + rojo "\$output is empty" + echo "" + else + #echo "\$output is NOT empty" + echo $j\:$output + fi +done;