dig-any.sh has now learned the ability to load a config file, read below.
A bit of context first: DNS "ANY" queries are since long deprecated, so if you want to query all DNS records (A, AAAA, CNAME, MX, ...) for a domain you have to manually run a sequence of DNS queries.
The tools that excel at this task are host, nslookup and dig. I usually use the latter because it's complete and I have to learn only one syntax.
When sixty lines of bash leveraging dig did the job.
Plus 3 additional features:
- set a list of CNAME and SRV records you want to query (this has to be manual, no way to autodiscover them)
- choose the DNS server you want to query
- NEW load a config file
dig-any.sh can load an arbitrary list of CNAME and SRV records to check. Instead of hardcoding them into the script1, they are in an external config file to be stored elsewhere. Syntax of the config file is INI, example:
[domain.org] cname="www mail guest" srv="srv1 srv2 srv3"
This will configure these CNAME: www.domain.org, mail.domain.org, guest.domain.org and these SRV: domain.org.srv1, domain.org.srv2, domain.org.srv3
Multiple domains can be configured.
and possibly give hints to the occasionally bored and nosy NSA employee (ha-ha).