def foward_lookup(domain): try: return socket.gethostbyname(domain) except: return False
def reverse_lookup(ip): try: return socket.gethostbyaddr(ip)[0] except: return False
main(): foward_lookup("yahoo.co.jp")
Recommended Posts