use custom dns

This commit is contained in:
Sándor 2024-02-26 00:31:52 +01:00
parent cd759e469d
commit c6ded92531

View File

@ -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