mr-karan / doggo

:dog: Command-line DNS Client for Humans. Written in Golang
https://doggo.mrkaran.dev/
GNU General Public License v3.0
2.9k stars 100 forks source link

Bug: wrong domain name when querying a non existing record #63

Closed casperklein closed 1 year ago

casperklein commented 1 year ago

When querying a non existing record, "box." is somehow used?

# ./doggo example.com srv
NAME    TYPE    CLASS   TTL     ADDRESS                         NAMESERVER      STATUS
box.    SOA     IN      3600s   ns0.centralnic.net.             127.0.0.1:53    NXDOMAIN
                                hostmaster.centralnic.net.
                                1673271736 900 1800 6048000
                                3600

# ./doggo doesnotexist.example.com
NAME    TYPE    CLASS   TTL     ADDRESS                         NAMESERVER      STATUS
box.    SOA     IN      3600s   ns0.centralnic.net.             127.0.0.1:53    NXDOMAIN
                                hostmaster.centralnic.net.
                                1673274650 900 1800 6048000
                                3600

Edit:

I guess, these records in /etc/resolve.conf are causing this behaviour:

domain fritz.box
search fritz.box

Still weird to me 😉

mr-karan commented 1 year ago

Yeah, doggo has support for search lists. Try the same command with --search=false as an additional param?

casperklein commented 1 year ago

Thanks for the fast reply. Yes, that's the output I've expected in the first place:

# ./doggo doesnotexist.example.com --search=false
NAME            TYPE    CLASS   TTL     ADDRESS                         NAMESERVER      STATUS
example.com.    SOA     IN      3600s   ns.icann.org.                   127.0.0.1:53    NXDOMAIN
                                        noc.dns.icann.org. 2022091184
                                        7200 3600 1209600 3600