We use a security rating service which among other things, searches the world for imposter domains that resemble our domains. So it does find some of those but also finds ones that don't exist. It finds a lot of them.
In the 5th line of a
digresponse, there is the termAnswer:then a number.I would like to run
digwith a text file of hostnames, and for the results to be two columns only:Column 1: the hostname for that row
Column 2: either
Answer: xor justx, the value ofAnswer.
So far I can run dig with a bulk input file, but can't figure out how to filter the results and get them to display like that.
If anyone could point me in the right direction I'd be grateful.
dig [some typo domain]is a request for theArecord of the apex of that domain. And for example that will not result in an answer from a domain that is genuinely registered, but for which the owner has not has simply not set up that apex A record or no DNS at all. -|- stackoverflow.com/q/1780598/2952385