From d8d7807280867cf856a532c22155683f967202cb Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 14 Nov 2021 15:42:30 -0800 Subject: [PATCH] Use socket.gethostbyname. --- dns.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns.py b/dns.py index 14bebd5..9dfe25b 100644 --- a/dns.py +++ b/dns.py @@ -2,4 +2,4 @@ import socket import sys domain = sys.argv[1] -print(socket.getaddrinfo(domain, 53)[0][4][0]) +print(socket.gethostbyname(domain))