RosettaCodeData/Task/DNS-query/PowerShell/dns-query-2.psh

7 lines
174 B
Text
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
>>> import socket
>>> ips = set(i[4][0] for i in socket.getaddrinfo('www.kame.net', 80))
>>> for ip in ips: print ip
...
2001:200:dff:fff1:216:3eff:feb1:44d7
203.178.141.194