Use socket.gethostbyname.
This commit is contained in:
parent
a9acab1764
commit
d8d7807280
1 changed files with 1 additions and 1 deletions
2
dns.py
2
dns.py
|
@ -2,4 +2,4 @@ import socket
|
||||||
import sys
|
import sys
|
||||||
domain = sys.argv[1]
|
domain = sys.argv[1]
|
||||||
|
|
||||||
print(socket.getaddrinfo(domain, 53)[0][4][0])
|
print(socket.gethostbyname(domain))
|
||||||
|
|
Loading…
Reference in a new issue