gui-host-lookup/generic/ip_lookup.py

6 lines
97 B
Python
Raw Normal View History

import socket
def get_hostname(IP):
hostname = socket.gethostbyaddr(IP)
return hostname