├── htdocs
├── puddy.gif
├── puddy.jpg
├── puddy.css
├── resolvers
└── index.cgi
├── CHANGES
├── Makefile
├── LICENSE
├── conf
└── puddy.resolvers
├── doc
├── puddy.1.txt
└── puddy.1
├── README.md
└── src
└── puddy.pl
/htdocs/puddy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jschauma/puddy/HEAD/htdocs/puddy.gif
--------------------------------------------------------------------------------
/htdocs/puddy.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jschauma/puddy/HEAD/htdocs/puddy.jpg
--------------------------------------------------------------------------------
/CHANGES:
--------------------------------------------------------------------------------
1 | Version 1.6 (2023-02-07)
2 | * add dns0.eu
3 |
4 | Version 1.5 (2022-02-12)
5 | * switch cidr-by-country source
6 |
7 | Version 1.4 (2021-09-30)
8 | * ensure the org/comment is printed
9 |
10 | Version 1.3 (2020-05-01)
11 | * remove doh.netweaver.uk and doh.securedns.eu, which
12 | disappeared
13 | * handle such failures more gracefully
14 |
15 | Version 1.2 (2019-11-19)
16 | * add '-e' to specify ECS explicitly
17 |
18 | Version 1.1 (2019-09-28)
19 | * use Parallel:ForkManager to speed up queries
20 |
21 | Version 1.0 (2019-09-24)
22 | * Hello World!
23 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | NAME=puddy
2 | PREFIX?=/usr/local
3 | PERL!=which perl
4 |
5 | help:
6 | @echo "The following targets are available:"
7 | @echo "clean remove temporary files"
8 | @echo "prep update the perl path in the source script"
9 | @echo "install install all files under ${PREFIX}"
10 |
11 | prep: src/${NAME}
12 |
13 | src/${NAME}: src/${NAME}.pl
14 | sed -e "s|/usr/local/bin/perl|${PERL}|" $? >$@
15 |
16 | install: prep
17 | mkdir -p ${PREFIX}/bin ${PREFIX}/share/man/man1
18 | install -m 755 src/${NAME} ${PREFIX}/bin/${NAME}
19 | install -m 444 doc/${NAME}.1 ${PREFIX}/share/man/man1
20 | install -m 444 conf/${NAME}.resolvers ${PREFIX}/share/${NAME}.resolvers
21 |
22 | clean:
23 | rm -f src/${NAME}
24 |
--------------------------------------------------------------------------------
/htdocs/puddy.css:
--------------------------------------------------------------------------------
1 | html, body, p {
2 | background-color: #FDFDFD;
3 | color: #111;
4 | font-size:16px;
5 | line-height:1.5em;
6 | font-family:"Myriad Pro", "Trebuchet MS", Helvetica, sans-serif;
7 | width: 40em;
8 | margin:4ex 0 12ex 5%;
9 | font-weight: normal;
10 | font-style: normal;
11 | font-variant: normal;
12 | letter-spacing: normal;
13 | }
14 |
15 | p, li {
16 | line-height: 1.555em;
17 | text-align: justify;
18 | margin: 0 0 0.754em 0;
19 | padding: 0 0 0 0;
20 | hyphens: auto;
21 | }
22 |
23 | p.narrow {
24 | width: 36em;
25 | }
26 |
27 | small {
28 | font-size:14px;
29 | }
30 |
31 | img {
32 | margin: 10px 35px;
33 | }
34 |
35 | img.framed {
36 | border:1px solid #000000;
37 | }
38 |
39 | IMG.displayed {
40 | display: block;
41 | margin-left: auto;
42 | margin-right: auto }
43 |
44 | A:link { color: #aa0000; }
45 | A:visited { color: #606060; }
46 | A:active { color: #ffffff; }
47 |
48 | .hidden { display: none; }
49 | .unhidden { display: block; }
50 |
--------------------------------------------------------------------------------
/htdocs/resolvers:
--------------------------------------------------------------------------------
1 | # This file contains a list of public DNS servers
2 | # used by https://www.netmeister.org/puddy/
3 | #
4 | # The format of the file is document in the manual
5 | # page, but in a nutshell, it's
6 | # ip-address [some-organization-identifier]
7 | 1.0.0.1 Cloudflare
8 | 1.1.1.1 Cloudflare
9 | 2606:4700:4700::1001 Cloudflare
10 | 2606:4700:4700::1111 Cloudflare
11 |
12 | 8.20.247.20 Comodo Secure DNS
13 | 8.26.56.26 Comodo Secure DNS
14 |
15 | 2001:1608:10:25::1c04:b12f DNS.Watch
16 | 84.200.69.80 DNS.Watch
17 | 84.200.70.40 DNS.Watch
18 |
19 | 216.146.35.35 Dyn
20 | 216.146.36.36 Dyn
21 |
22 | 2001:4860:4860::8844 Google Public DNS
23 | 2001:4860:4860::8888 Google Public DNS
24 | 8.8.4.4 Google Public DNS
25 | 8.8.8.8 Google Public DNS
26 |
27 | 2001:470:20::2 Hurricane Electric
28 | 74.82.42.42 Hurricane Electric
29 |
30 | 209.244.0.3 Level3
31 | 209.244.0.4 Level3
32 |
33 | 208.67.220.220 OpenDNS
34 | 208.67.222.222 OpenDNS
35 | 2620:0:ccc::2 OpenDNS
36 | 2620:0:ccd::2 OpenDNS
37 |
38 | 2620:fe::fe Quad9
39 | 9.9.9.9 Quad9
40 |
41 | 2a02:6b8:0:1::feed:bad Yandex.DNS
42 | 2a02:6b8::feed:bad Yandex.DNS
43 | 77.88.8.2 Yandex.DNS
44 | 77.88.8.88 Yandex.DNS
45 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2019, Verizon Media
2 |
3 | Redistribution and use in source and binary forms,
4 | with or without modification, are permitted provided
5 | that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the
8 | above copyright notice, this list of conditions and
9 | the following disclaimer.
10 |
11 | 2. Redistributions in binary form must reproduce the
12 | above copyright notice, this list of conditions and
13 | the following disclaimer in the documentation and/or
14 | other materials provided with the distribution.
15 |
16 | 3. Neither the name of the copyright holder nor the
17 | names of its contributors may be used to endorse or
18 | promote products derived from this software without
19 | specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
22 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
23 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
25 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
26 | THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
27 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
30 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
32 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
34 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 | POSSIBILITY OF SUCH DAMAGE.
36 |
--------------------------------------------------------------------------------
/conf/puddy.resolvers:
--------------------------------------------------------------------------------
1 | # This file contains a list of public DNS servers
2 | # suitable for being fed to puddy(1).
3 | #
4 | # The format of the file is document in the manual
5 | # page, but in a nutshell, it's
6 | # ip-address [some-organization-identifier]
7 | 198.101.242.72 Alternate DNS
8 | 23.253.163.53 Alternate DNS
9 |
10 | 178.21.23.150 BlockAid Public DNS (or PeerDNS)
11 | 205.204.88.60 BlockAid Public DNS (or PeerDNS)
12 |
13 | 2001:67c:28a4:: Censurfridns
14 | 2002:d596:2a92:1:71:53:: Censurfridns
15 | 89.233.43.71 Censurfridns
16 | 91.239.100.100 Censurfridns
17 |
18 | 212.82.225.7 ClaraNet
19 | 212.82.226.212 ClaraNet
20 |
21 | 1.0.0.1 Cloudflare
22 | 1.1.1.1 Cloudflare
23 | 2606:4700:4700::1001 Cloudflare
24 | 2606:4700:4700::1111 Cloudflare
25 |
26 | 8.20.247.20 Comodo Secure DNS
27 | 8.26.56.26 Comodo Secure DNS
28 |
29 | 193.110.81.0 dns0.eu
30 | 185.253.5.0 dns0.eu
31 | 2a0f:fc80:: dns0.eu
32 | 2a0f:fc81:: dns0.eu
33 |
34 | 2001:1608:10:25::1c04:b12f DNS.Watch
35 | 2001:1608:10:25::9249:d69b DNS.Watch
36 |
37 | 84.200.69.80 DNS.Watch
38 | 84.200.70.40 DNS.Watch
39 |
40 | 104.236.210.29 DNSReactor
41 | 45.55.155.25 DNSReactor
42 |
43 | 216.146.35.35 Dyn
44 | 216.146.36.36 Dyn
45 |
46 | 2001:910:800::12 FDN
47 | 80.67.169.12 FDN
48 |
49 | 85.214.73.63 FoeBud
50 |
51 | 213.187.11.62 FoolDNS
52 | 87.118.111.215 FoolDNS
53 |
54 | 37.235.1.174 FreeDNS
55 | 37.235.1.177 FreeDNS
56 |
57 | 80.80.80.80 Freenom World
58 | 80.80.81.81 Freenom World
59 |
60 | 62.141.58.13 German Privacy Foundation e.V.
61 | 85.25.251.254 German Privacy Foundation e.V.
62 | 87.118.100.175 German Privacy Foundation e.V.
63 | 94.75.228.29 German Privacy Foundation e.V.
64 |
65 | 2001:4860:4860::8844 Google Public DNS
66 | 2001:4860:4860::8888 Google Public DNS
67 | 8.8.4.4 Google Public DNS
68 | 8.8.8.8 Google Public DNS
69 |
70 | 209.88.198.133 GreenTeamDNS
71 | 81.218.119.11 GreenTeamDNS
72 |
73 | 2001:470:20::2 Hurricane Electric
74 | 74.82.42.42 Hurricane Electric
75 |
76 | 209.244.0.3 Level3
77 | 209.244.0.4 Level3
78 |
79 | 156.154.70.1 Neustar DNS Advantage
80 | 156.154.71.1 Neustar DNS Advantage
81 |
82 | 185.82.22.133 New Nations
83 | 5.45.96.220 New Nations
84 |
85 | 198.153.192.1 Norton DNS
86 | 198.153.194.1 Norton DNS
87 |
88 | 208.67.220.220 OpenDNS
89 | 208.67.222.222 OpenDNS
90 | 2620:0:ccc::2 OpenDNS
91 | 2620:0:ccd::2 OpenDNS
92 |
93 | 119.31.230.42 OpenNIC
94 | 200.252.98.162 OpenNIC
95 | 2001:470:1f07:38b::1 OpenNIC
96 | 2001:470:1f10:c6::2001 OpenNIC
97 | 2001:470:8388:2:20e:2eff:fe63:d4a9 OpenNIC
98 | 203.167.220.153 OpenNIC
99 | 207.192.69.155 OpenNIC
100 | 216.87.84.211 OpenNIC
101 | 217.79.186.148 OpenNIC
102 | 58.6.115.42 OpenNIC
103 | 58.6.115.43 OpenNIC
104 | 66.244.95.20 OpenNIC
105 | 72.14.189.120 OpenNIC
106 | 78.159.101.37 OpenNIC
107 | 81.89.98.6 OpenNIC
108 | 82.229.244.191 OpenNIC
109 |
110 | 194.145.226.26 PowerNS
111 | 77.220.232.44 PowerNS
112 |
113 | 2620:fe::fe Quad9
114 | 9.9.9.9 Quad9
115 |
116 | 195.46.39.39 SafeDNS
117 | 195.46.39.40 SafeDNS
118 |
119 | 193.58.251.251 SkyDNS
120 |
121 | 208.76.50.50 SmartViper Public DNS
122 | 208.76.51.51 SmartViper Public DNS
123 |
124 | 78.46.89.147 ValiDOM
125 | 88.198.75.145 ValiDOM
126 |
127 | 2620:74:1b::1:1 Verisign
128 | 2620:74:1c::2:2 Verisign
129 | 64.6.64.6 Verisign
130 | 64.6.65.6 Verisign
131 |
132 | 2001:1620:2078:136:: Xiala.net
133 | 2001:1620:2078:137:: Xiala.net
134 | 77.109.148.136 Xiala.net
135 | 77.109.148.137 Xiala.net
136 |
137 | 2a02:6b8:0:1::feed:bad Yandex.DNS
138 | 2a02:6b8::feed:bad Yandex.DNS
139 | 77.88.8.2 Yandex.DNS
140 | 77.88.8.88 Yandex.DNS
141 |
142 | 109.69.8.51 puntCAT
143 | 2a00:1508:0:4::9 puntCAT
144 |
145 | 4.2.2.2 CenturyLink/Level3
146 |
--------------------------------------------------------------------------------
/doc/puddy.1.txt:
--------------------------------------------------------------------------------
1 | puddy(1) NetBSD General Commands Manual puddy(1)
2 |
3 | NAME
4 | puddy -- public DNS data yielder
5 |
6 | SYNOPSIS
7 | puddy [-146Vdhjpv] [-c country] [-e cidr] [-f file] [-n num]
8 | [-r resolver] query [type ...]
9 |
10 | DESCRIPTION
11 | The puddy tool allows you to query a number of different resolvers to
12 | compare whether results are uniform across the internet.
13 |
14 | OPTIONS
15 | The following options are supported by puddy:
16 |
17 | -1 Only use a single resolver from one and the same organiza-
18 | tion. This option cannot be combined with the -p flag. See
19 | Section PUBLIC RESOLVERS for details.
20 |
21 | -4 Only query IPv4 resolvers.
22 |
23 | -6 Only query IPv6 resolvers.
24 |
25 | -V Print version number and exit.
26 |
27 | -c country Try to use the EDNS Client Subnet (ECS) extension to elicit
28 | a response from the DNS server as if the client was located
29 | in the given country.
30 |
31 | The argument country can be a country code or the name of a
32 | country.
33 |
34 | See Section COUNTRY IMITATION for details.
35 |
36 | -d Use DNS-over-HTTPS. This option only works with a subset of
37 | the known public resolvers and thus conflicts with e.g., the
38 | -f and -p flags.
39 |
40 | -e cidr Try to use the given CIDR via the EDNS Client Subnet (ECS)
41 | extension.
42 |
43 | -f file Read the list of resolvers to query from this file. This
44 | option conflicts with the -p flag. See Section FILES for
45 | details.
46 |
47 | -h Display help and exit.
48 |
49 | -j Print output in json format.
50 |
51 | -n num Only query at most this many resolvers.
52 |
53 | -p Query all known public DNS resolvers. This option conflicts
54 | with the -f flag. See Section PUBLIC RESOLVERS for details.
55 |
56 | -r resolver Add the given resolver to the list of resolvers to query.
57 | Can be specified multiple times.
58 |
59 | -v Be verbose. Can be specified multiple times.
60 |
61 | DETAILS
62 | Sometimes it can be useful to check whether a given hostname or record
63 | resolves to the same value in different places on the internet, so you go
64 | and ask the magic 8.8.8.8 ball. But perhaps other resolvers elsewhere
65 | have different results? Manually querying multiple resolvers is labor-
66 | some, so instead puddy saves you some typing by performing these lookups
67 | in succession for you.
68 |
69 | By default, puddy will query resolvers for A, AAAA, and CNAME records,
70 | similar to the host(1) command.
71 |
72 | PUBLIC RESOLVERS
73 | If the -p flag is given, puddy will retrieve the list of known public DNS
74 | resolvers from https://public-dns.info/nameservers.txt and query each
75 | one.
76 |
77 | Otherwise, if the -f flag is given, puddy will read the list of resolvers
78 | to query from the specified file.
79 |
80 | Many organizations offer public DNS services on multiple IP addresses; if
81 | the list of resolvers to use contains multiple IP address for the same
82 | organization, and you only want one of those servers, specify the -1
83 | (numeric one) flag. puddy will then pick only one of the IPs for each
84 | organization from the input set. Note: If an organization's resolvers
85 | are reachable via both IPv4 and IPv6 addresses, then puddy will prefer
86 | the IPv6 address.
87 |
88 | If the -d flag is specified, puddy will query a short list of hardcoded
89 | public resolvers known to support DNS-over-HTTPS with results returned in
90 | JSON format:
91 | Cloudflare
92 | DNS.SB
93 | Google
94 | Quad9
95 | doh.li
96 |
97 | If neither the -d, -f, or -p flag is specified, puddy will only query a
98 | short list of hardocded, popular public resolvers, which consists of:
99 | Cloudflare
100 | Google
101 | Hurricane Electric
102 | OpenDNS
103 | Quad9
104 |
105 | In addition, puddy will also query the resolvers found in
106 | /etc/resolv.conf.
107 |
108 | Finally, if the -n flag is specified, then at most this many resolvers
109 | will be queried; the list is randomized before the selection of resolvers
110 | to query is made.
111 |
112 | FILES
113 | puddy may read a list of public resolvers to query from a file provided
114 | via the -f flag. Each line in the file is expected to consist of an IP
115 | address and an optional comment or identifier. Leading and trailing
116 | whitespace as well as empty lines and anything following the '#' charac-
117 | ter are ignored.
118 |
119 | An example puddy.resolvers file might look like so:
120 |
121 | # puddy.resolvers file
122 | 216.146.35.35 Dyn
123 | 2001:470:1f10:c6::2001 OpenNIC
124 | 10.0.0.1 My Private Resolver # not /etc/resolv.conf!
125 |
126 | puddy may have come with a list of public resolvers in
127 | /usr/local/share/puddy.resolvers.
128 |
129 | COUNTRY IMITATION
130 | Sometimes it is useful to be able to see if different resolvers might
131 | give different responses based on where the client is located. puddy
132 | supports the -c country option to attempt to elicit a response from the
133 | DNS server as if the client was in the given location. This is done
134 | through the use of the EDNS Client Subnet extension (ECS, see RFC7871).
135 |
136 | Note: at this time, puddy only supports this option when performing
137 | queries using DNS over HTTPS (i.e., in combination with the -d option).
138 |
139 | When specified, puddy will try to look up a suitable netblock for the
140 | given country via data from the site https://www.nirsoft.net/countryip/,
141 | then set the ECS option.
142 |
143 | If you wish to disable the use of the ECS extension altogether, then you
144 | can pass 'none' as an argument to the -c flag, yielding a netblock of
145 | 0.0.0.0/0.
146 |
147 | Note: not all DoH providers honor this option, but puddy has no way of
148 | telling the difference. In addition, even for those resolvers that do
149 | support it, there is no guarantee that the result returned does in fact
150 | reflect what would be returned to a client query actually originating
151 | from that netblock.
152 |
153 | EXAMPLES
154 | The following examples illustrate common usage of this tool.
155 |
156 | To look up the IP addresses for www.yahoo.com on the short list of public
157 | resolvers, limiting to one query per organization:
158 |
159 | $ puddy -1 www.yahoo.com
160 | 2001:470:20::2 (Hurricane Electric)
161 | A (20): 72.30.35.10
162 | A (20): 72.30.35.9
163 | AAAA (56): 2001:4998:58:1836::11
164 | AAAA (56): 2001:4998:58:1836::10
165 | CNAME (1759): atsv2-fp-shed.wg1.b.yahoo.com.
166 | 2001:4860:4860::8888 (Google)
167 | A (15): 98.138.219.231
168 | A (15): 72.30.35.9
169 | A (15): 72.30.35.10
170 | A (15): 98.138.219.232
171 | AAAA (45): 2001:4998:44:41d::4
172 | AAAA (45): 2001:4998:44:41d::3
173 | AAAA (45): 2001:4998:58:1836::11
174 | AAAA (45): 2001:4998:58:1836::10
175 | CNAME (77): atsv2-fp-shed.wg1.b.yahoo.com.
176 | 2606:4700:4700::1001 (Cloudflare)
177 | A (38): 72.30.35.10
178 | A (38): 72.30.35.9
179 | AAAA (33): 2001:4998:58:1836::10
180 | AAAA (33): 2001:4998:58:1836::11
181 | CNAME (15): atsv2-fp-shed.wg1.b.yahoo.com.
182 | 2620:0:ccc::2 (OpenDNS)
183 | A (18): 72.30.35.9
184 | A (18): 72.30.35.10
185 | AAAA (45): 2001:4998:58:1836::10
186 | AAAA (45): 2001:4998:58:1836::11
187 | CNAME (1531): atsv2-fp-shed.wg1.b.yahoo.com.
188 | 2620:fe::fe (Quad9)
189 | A (15): 72.30.35.9
190 | A (15): 72.30.35.10
191 | AAAA (56): 2001:4998:58:1836::11
192 | AAAA (56): 2001:4998:58:1836::10
193 | CNAME (772): atsv2-fp-shed.wg1.b.yahoo.com.
194 | 172.131.44.74 (/etc/resolv.conf)
195 | A (46): 74.6.143.8
196 | AAAA (51): 2001:4998:58:207::1000
197 | CNAME (1800): atsv2-fp-shed.wg1.b.yahoo.com.
198 |
199 | To only query at most 2 IPv6 resolvers from the public list of public
200 | resolvers for NS records, one of which does not respond in time:
201 |
202 | $ puddy -6 -n 2 -p netmeister.org NS
203 | 2610:a1:1019::31
204 | NS: timed out
205 | 2610:a1:1019::32
206 | NS (10799): ns-143-b.gandi.net.
207 | NS (10799): ns-179-c.gandi.net.
208 | NS (10799): ns-181-a.gandi.net.
209 |
210 | To query 3 DoH providers:
211 |
212 | $ puddy -n 3 -d _443._tcp.mta-sts.netmeister.org TLSA
213 | DNS.SB (https://doh.dns.sb/dns-query?)
214 | TLSA (3600): 3 1 1 905254acd0785b76b76b42da2c419d065b2442427883f133c9305f2010ae6397
215 | Google (https://dns.google/resolve?)
216 | TLSA (3599): 3 1 1 905254acd0785b76b76b42da2c419d065b2442427883f133c9305f2010ae6397
217 | Quad9 (https://9.9.9.9:5053/dns-query?)
218 | TLSA (3600): 3 1 1 905254acd0785b76b76b42da2c419d065b2442427883f133c9305f2010ae6397
219 |
220 | To get DoH results with an EDNS Client Subnet set to a netblock from
221 | China:
222 |
223 | $ puddy -d -c cn www.google.cn
224 | Cloudflare (https://cloudflare-dns.com/dns-query?)
225 | A (105): 172.217.11.3
226 | AAAA (55): 2607:f8b0:4006:812::2003
227 | DNS.SB (https://doh.dns.sb/dns-query?) (ECS 45.126.116.0/22)
228 | A (300): 203.208.39.207
229 | A (300): 203.208.39.216
230 | A (300): 203.208.39.223
231 | A (300): 203.208.39.215
232 | Google (https://dns.google/resolve?) (ECS 45.126.116.0/22)
233 | A (299): 203.208.39.223
234 | A (299): 203.208.39.207
235 | A (299): 203.208.39.215
236 | A (299): 203.208.39.216
237 | Quad9 (https://9.9.9.9:5053/dns-query?)
238 | A (300): 172.217.7.3
239 | AAAA (300): 2607:f8b0:4006:801::2003
240 | doh.li (https://doh.li/dns-query?) (ECS 45.126.116.0/22)
241 | A (300): 203.208.39.216
242 | A (300): 203.208.39.215
243 | A (300): 203.208.39.207
244 | A (300): 203.208.39.223
245 |
246 | To get the results from the resolvers specified in the file
247 | /usr/local/share/puddy.resolvers and generate output in json format:
248 |
249 | $ puddy -j -f /usr/local/share/puddy.resolvers whocybered.me txt
250 | {
251 | "results" : {
252 | "209.244.0.3" : {
253 | "TXT" : {
254 | "status" : "NOERROR",
255 | "rrs" : [
256 | {
257 | "value" : "\"Attribution is hard. Cyber doubly so. When in doubt, APT.\"",
258 | "ttl" : 10795
259 | }
260 | ]
261 | },
262 | "comment" : "/tmp/f"
263 | },
264 | "2620:74:1b::1:1" : {
265 | "TXT" : {
266 | "status" : "NOERROR",
267 | "rrs" : [
268 | {
269 | "ttl" : 10794,
270 | "value" : "\"Attribution is hard. Cyber doubly so. When in doubt, APT.\""
271 | }
272 | ]
273 | },
274 | "comment" : "/tmp/f"
275 | }
276 | },
277 | "query" : "whocybered.me"
278 | }
279 |
280 | EXIT STATUS
281 | The puddy utility exits 0 on success, and >0 if an error occurs.
282 |
283 | NOTES
284 | Feels like an Arby's night.
285 |
286 | SEE ALSO
287 | dig(1), host(1), nslookup(1)
288 |
289 | RFC7871
290 |
291 | HISTORY
292 | puddy was originally written by Jan Schaumann
\n";
337 | print "Type: " . join(", ", @types) . "
\n";
338 | print "Lookup type: " . $CGI->param('lookup') . "
\n";
339 | if ($CGI->param('country') && $CGI->param('country') ne "default") {
340 | print "ECS Country Netblock: " . $CGI->param('country') ."
\n";
341 | }
342 | print "
\n";
343 | print "
\n";
349 | }
350 | }
351 | }
352 |
353 | sub printHead() {
354 | print <\n";
345 | }
346 | system(@CMD);
347 | if ($format ne "json") {
348 | print "Compare public DNS resolver results
367 |
368 | EOD
369 | ;
370 | }
371 |
372 | sub printInstructions() {
373 | print <
376 | Sometimes it can be useful to check whether a given
377 | hostname or record resolves to the same value in
378 | different places on the internet, so you go and ask
379 | the magic 8.8.8.8 ball. But perhaps other resolvers
380 | elsewhere have different results? Manually querying
381 | multiple resolvers is bogus, man, so this service
382 | does the work for you.
383 |
385 | Enter a name and record type to look up and puddy 387 | will take care of the rest. 388 |
389 |390 | By default, this service will query a bunch of public 391 | DNS resolvers via regular UDP port 53 DNS queries; 392 | if you choose DNS-over-HTTPS, 394 | several public DoH providers will be asked instead. 395 |
396 |397 | If you select an ECS Country Subnet, we'll try to set 398 | the EDNS 400 | Client Subnet parameter to a subnet allocated to 401 | that country in the hopes that the DoH providers will 402 | honor it and return results for that given ECS. 403 |
404 |405 | Finally, if HTML isn't your thing, you can also 406 | request JSON output, which then lends itself to 407 | querying this service from the command-line via e.g., 408 |
curl "https://www.netmeister.org/puddy/?name=wikipedia.org&type=A&format=json&lookup=doh&country=CHINA" | python -m json.tool409 | 410 |