ATOTCLIC Linux Resolve IP with Python

Resolve IP with Python

>>> def getIP(d):
...     try:
...         data = socket.gethostbyname(d)
...         ip = repr(data)
...         return ip
...     except Exception:
...         return False
...
>>> getIP('atotclic.es')
"'151.106.100.50'"


Related Post