zmap/zdns

Fix LookupAllNameservers to look up all name servers at all levels, not just the top-most level

Opened this issue · 0 comments

The current code performs an NS lookup against a name server for a given domain, d. With this list of name servers, it then sends a single lookup to each one. This works fine if there's only one layer of name servers, but this is not always the case.

Consider trying to query for an A record for google.com to a root server. The root server would provide a list of .com gTLD servers and we'd query each one for google.com's A record. None would have it, and so we'd exit.

IMO, we should change this function to get all name servers at all levels of recursion and query them all. So in the prior example, we'd continue to query all .com gTLD servers for the NS for google.com until we reached the authoritative name servers. We could then query all of these for the A record.

That or we should remove --all-nameservers as a CLI option since it's misleading, IMO.