nameservers
Python lookup hostname from IP with 1 second timeout
>>> import socket >>> socket.gethostbyaddr(“69.59.196.211”) (‘stackoverflow.com’, [‘211.196.59.69.in-addr.arpa’], [‘69.59.196.211’]) For implementing the timeout on the function, this stackoverflow thread has answers on that.
How do I get a list of all subdomains of a domain? [closed]
The hint (using axfr) only works if the NS you’re querying (ns1.foo.example in your example) is configured to allow AXFR requests from the IP you’re using; this is unlikely, unless your IP is configured as a secondary for the domain in question. Basically, there’s no easy way to do it if you’re not allowed to … Read more