You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
214 B
9 lines
214 B
11 months ago
|
import ipaddress
|
||
|
import socket
|
||
|
|
||
|
direcciones = socket.getaddrinfo(socket.gethostname(), None)
|
||
|
for ip in direcciones:
|
||
|
# ip_ver = ipaddress.ip_address(str(ip[4][0]))
|
||
|
# if ip_ver.version == 4:
|
||
|
print (ip[4][0])
|