ogham / dog

A command-line DNS client.
https://dns.lookup.dog/
European Union Public License 1.2
6.05k stars 169 forks source link

Underscores for SRV queries #54

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi, is there a limitation in dog that doesn't allow this:

dog -t SRV _servicename._tcp.example.com

Or am I using it wrong? dog gives the error:

Invalid options: Invalid domain "_servicename"

But underscores are a normal part of SRV queries, from what I gathered by reading https://tools.ietf.org/html/rfc2782. Thank you.

cocoonkid commented 3 years ago

yes, i wonder about the same. are SRV queries TLSA and CNAME possible?

in my example a third TXT entry is missing regarding the DKIM entry. Is there a limit on entries shown?

I'd like to suggest a -F flag which shows all available DNS information ?

dog google.com -t TXT A AAAA MX NS SRV TLSA --colour=always

does this output every available info ?

Thanks :+1:

gbe0 commented 3 years ago

Same problem for me, trying to lookup some TXT record that are included for a SPF record which contain underscores.

nullvariable commented 3 years ago

yeah, dog CNAME _acme-challenge.xxxxx reports the domain as invalid, but the _ is valid for CNAMEs (but only when the CNAME is not being treated as a host name, similar to a TXT record)

I found this answer helpful in understanding the nuance here: https://serverfault.com/a/928204/196152

The TLDR summary is that hostnames are greatly restricted in valid characters, but domain names are not. A CNAME record can be both, so dog should not validate these the same way as A records.