From 9abac43eb4dffb71bd6cd48e7e4f331e7a13f4b5 Mon Sep 17 00:00:00 2001 From: borekon Date: Mon, 25 Mar 2024 18:03:44 +0000 Subject: [PATCH] Fixed use local DNS --- adblock_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adblock_test.sh b/adblock_test.sh index a05c5a5..7688ed7 100644 --- a/adblock_test.sh +++ b/adblock_test.sh @@ -10,7 +10,7 @@ blocked=0 # else # dns=$1 #fi -dns=${1:-$(head -n 1 /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2)} +dns=${1:-$(cat /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