Closed edyesed closed 7 years ago
@edyesed CNAME records are also interesting, can you pull request for that as well?
@evilsocket displaying records optionally will be good idea, like for -txt
, -a
? for now -a
comes with default option.
@madaratech / @evilsocket . I added A as an option, it defaults to true.
FYI: the behavior of net.LookupHost is to follow CNAMEs, so you end up with output like the following
$ grep assets output_with_a_*
output_with_a_false: assets.com.com : CNAME d207bhzu25u4mz.cloudfront.net.
output_with_a_true: assets.com.com : A [13.32.205.120 13.32.205.21 13.32.205.32 13.32.205.51 13.32.205.22 13.32.205.122 13.32.205.56 13.32.205.157 2600:9000:2145:5e00:1a:779f:fec0:93a1 2600:9000:2145:1e00:1a:779f:fec0:93a1 2600:9000:2145:9000:1a:779f:fec0:93a1 2600:9000:2145:9800:1a:779f:fec0:93a1 2600:9000:2145:de00:1a:779f:fec0:93a1 2600:9000:2145:2200:1a:779f:fec0:93a1 2600:9000:2145:ca00:1a:779f:fec0:93a1 2600:9000:2145:5600:1a:779f:fec0:93a1] : CNAME d207bhzu25u4mz.cloudfront.net.
also, moving convo over to #8
nice work @edyesed 👍
I am not a gopher, but I did wish that this tool would look up TXT records in addition to A records, so I added that functionality.
I'm not sure if this is ideomatic go, or not.. but here's a PR that adds the functionality in the subject.
My linter was mildly upset with lacking comments, and a little bit of the indentation, and the source was changed to please my linter.