-
Notifications
You must be signed in to change notification settings - Fork 6
/
dnsprop
executable file
·50 lines (44 loc) · 1.04 KB
/
dnsprop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# simple nameserv propogation check util
if [ $# -ne 2 ]; then
echo "usage: dnsprop <record type> <domain>"
exit 1
fi
record_type=$1
dns_name=$2
declare -a resolver_ips=(
"1.1.1.1"
"8.8.8.8"
"8.8.4.4"
"9.9.9.9"
"208.67.222.222"
"208.67.220.220"
"77.88.8.8"
"64.6.64.6"
"64.6.65.6"
"74.82.42.42"
)
declare -a resolver_names=(
"Cloudflare"
"Google"
"Google Secondary"
"Quad9"
"OpenDNS"
"OpenDNS Secondary"
"Yandex.DNS"
"Verisign"
"Verisign Secondary"
"Hurricane Electric"
)
echo "checking DNS propagation for '$record_type' record of '$dns_name' against top 10 resolvers:"
for i in "${!resolver_ips[@]}"; do
resolver="${resolver_ips[$i]}"
resolver_name="${resolver_names[$i]}"
echo -n "checking resolver $resolver ($resolver_name): "
results=$(timeout 1 dig +short @$resolver $dns_name $record_type | tr '\n' ', ' | sed 's/, $//')
if [ -z "$results" ]; then
echo "no reply"
else
echo "reply received ($results)"
fi
done