Simple tool to extract and print ESNI (TXT) records for hostname.
$ ./esni_tool tls13.1d.pw.
ESNI tool
v.0.1.beta
Resolves ESNI TXT records, prints parsed result.
(Resolvers are from /etc/resolv.conf file.)
Resolver (system): 192.168.1.1:53
Input name: tls13.1d.pw.
Constructed name: _esni.tls13.1d.pw.
Using resolver 192.168.1.1:53
Performing DNS lookup...OK
Source value:
/wGFoqIpAIkAHQAgLukkHH6AiIAPYODmYK/6Nz3H7N58nYZyb/WG62h4TTgAGABhBLcBj0CfRsxcPdVclZGGzWPYJgryAYMY/4GILwCOTXACC6vven68udWahNDa1r6/2hRDaFATiREEqwgv1TLxwG1DRlTLaEybIljuYzacpw3mrRdUMg/NfRQHRLVaAJdqOgACEwEAgAAAAABckYKDAAAAAF/0/YEAAA==
ESNI for tls13.1d.pw.:
DH: 0x001D/0x2EE9241C7E8088800F60E0E660AFFA373DC7ECDE7C9D86726FF586EB68784D38
DH: 0x0018/0x04B7018F409F46CC5C3DD55C959186CD63D8260AF2018318FF81882F008E4D70020BABEF7A7EBCB9D59A84D0DAD6BEBFDA1443685013891104AB082FD532F1C06D434654CB684C9B2258EE63369CA70DE6AD1754320FCD7D140744B55A00976A3A
Cipher: 0x1301
Not-Before: 2019-03-20 00:00:03 +0000 UTC
Not-After: 2021-01-06 00:00:01 +0000 UTC
Uses github.com/miekg/dns for DNS.