From c6ded92531afca4504203fd7bb1c5f7a97f3550e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A1ndor?= Date: Mon, 26 Feb 2024 00:31:52 +0100 Subject: [PATCH] use custom dns --- check_dnsbl.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/check_dnsbl.sh b/check_dnsbl.sh index e4477ac..029370a 100644 --- a/check_dnsbl.sh +++ b/check_dnsbl.sh @@ -10,9 +10,11 @@ if [[ $# -ne 2 ]]; then exit 1 fi +DNS="84.2.44.1" + # Get IPs -IPS=$(dig +short $1 A | sort -u) -IP6S=$(dig +short $1 AAAA | sort -u) +IPS=$(dig +short $1 A @$DNS | sort -u) +IP6S=$(dig +short $1 AAAA @$DNS | sort -u) IPSP="" @@ -41,7 +43,7 @@ fi listed=0 for IP in $IPSP; do # Performs the actual lookup against blacklists - if host -W 2 -t a $IP$2 >/dev/null 2>&1; then + if host -W 2 -t a $IP$2 $DNS >/dev/null 2>&1; then ((listed++)) fi done