use custom dns

This commit is contained in:
Sándor 2024-02-26 00:31:52 +01:00
parent cd759e469d
commit c6ded92531
1 changed files with 5 additions and 3 deletions

View File

@ -10,9 +10,11 @@ if [[ $# -ne 2 ]]; then
exit 1 exit 1
fi fi
DNS="84.2.44.1"
# Get IPs # Get IPs
IPS=$(dig +short $1 A | sort -u) IPS=$(dig +short $1 A @$DNS | sort -u)
IP6S=$(dig +short $1 AAAA | sort -u) IP6S=$(dig +short $1 AAAA @$DNS | sort -u)
IPSP="" IPSP=""
@ -41,7 +43,7 @@ fi
listed=0 listed=0
for IP in $IPSP; do for IP in $IPSP; do
# Performs the actual lookup against blacklists # 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++)) ((listed++))
fi fi
done done