A reverse DNS lookup translates an IP address back into a domain name. This can reveal useful information about a target’s infrastructure.
Here’s how to do it in Python:

- socket.gethostbyaddr(ip) performs the reverse DNS lookup. It returns the hostname associated with the IP address.
- In this case, 8.8.8.8 (Google's public DNS) will return dns.google.
This can be useful in network reconnaissance to see what domains are mapped to certain IP addresses.