python module for nslookup

I’m using the following code: import socket ip_list = [] ais = socket.getaddrinfo(“www.yahoo.com”,0,0,0,0) for result in ais: ip_list.append(result[-1][0]) ip_list = list(set(ip_list)) Or using a comprehension as: ip_list = list({addr[-1][0] for addr in socket.getaddrinfo(name, 0, 0, 0, 0)})

What does “Default Server: Unknown” mean for Windows nslookup

Nslookup will try to resolve the name for the ip address of the DNS server configured as the primary DNS server on the client by performing a reverse lookup of the ip address. If you don’t have a rDNS zone set up for your network/subnet you’ll get the “server unknown” message as nslookup will be … Read more

Find out which DNS server answered your query

I want to know what exact server in the end had the answer. Is that possible? This is not achievable. You will not find the specific authoritative server that was consulted named anywhere in the payload of a DNS reply. There are CHAOS queries that exist for the purpose of identifying the specific recursive server … Read more

How to find all hostnames in DNS attached to one IP?

Not really, no. This is all about the difference between forward and reverse DNS lookups. A forward lookup is the standard name->IP lookup. So, you would have to know all the names in advance. What you want is to do an IP->name lookup, but somehow get all the names you’ve applied in your Apache config … Read more