mboot-github / WhoisDomain

lookup whois data and format the response in a standarized way
https://mboot-github.github.io/WhoisDomain/
MIT License
46 stars 8 forks source link

Can't fetch domain info in .ag zone. #25

Closed Jony321 closed 11 months ago

Jony321 commented 11 months ago

Describe the bug

Hello! Today I encountered a problem with obtaining information about a domain in the .ag zone. I can't get domain information any way other than requesting it on whois.iana.com. I will create tickets in both repositories (python-whois and WhoisDomain), because... it seems like one is a continuation of the other, based on the ticket https://github.com/DannyCork/python-whois/issues/322

To Reproduce

Steps to reproduce the behavior:

Trying to use DannyCork/python-whois:

(whois) jony@jony-ThinkPad-L13:~/personal/repos/github$ git clone git@github.com:DannyCork/python-whois.git
Cloning into 'python-whois'...
remote: Enumerating objects: 2728, done.
remote: Counting objects: 100% (785/785), done.
remote: Compressing objects: 100% (299/299), done.
remote: Total 2728 (delta 525), reused 682 (delta 478), pack-reused 1943
Receiving objects: 100% (2728/2728), 790.12 KiB | 698.00 KiB/s, done.
Resolving deltas: 100% (1753/1753), done.
(whois) jony@jony-ThinkPad-L13:~/personal/repos/github$ cd python-whois/
(whois) jony@jony-ThinkPad-L13:~/personal/repos/github/python-whois$ ./test2.py -d google.com.ag

test domain: <<<<<<<<<< google.com.ag >>>>>>>>>>>>>>>>>>>>
Domain: google.com.ag; Exception: WhoisCommandFailed; Error: getaddrinfo(whois.nic.ag): Name or service not known

# ========================
WhoisCommandFailed google.com.ag getaddrinfo(whois.nic.ag): Name or service not known

Trying to use mboot-github/WhoisDomain (the same error):

(WhoisDomain) jony@jony-ThinkPad-L13:~/personal/repos/github$ git clone  git@github.com:mboot-github/WhoisDomain.git
Cloning into 'WhoisDomain'...
remote: Enumerating objects: 6814, done.
remote: Counting objects: 100% (322/322), done.
remote: Compressing objects: 100% (213/213), done.
remote: Total 6814 (delta 185), reused 200 (delta 94), pack-reused 6492
Receiving objects: 100% (6814/6814), 5.78 MiB | 817.00 KiB/s, done.
Resolving deltas: 100% (3814/3814), done.
(WhoisDomain) jony@jony-ThinkPad-L13:~/personal/repos/github$ cd WhoisDomain/
(WhoisDomain) jony@jony-ThinkPad-L13:~/personal/repos/github/WhoisDomain$ ./test2.py -d google.com.ag

test domain: <<<<<<<<<< google.com.ag >>>>>>>>>>>>>>>>>>>>
Domain: google.com.ag; Exception: WhoisCommandFailed; Error: getaddrinfo(whois.nic.ag): Name or service not known

# ========================
WhoisCommandFailed google.com.ag getaddrinfo(whois.nic.ag): Name or service not known

Expected behavior

Get domain information like below:

(whois) jony@jony-ThinkPad-L13:~/personal/repos/github/python-whois$ ./test2.py -v -d google.com

test domain: <<<<<<<<<< google.com >>>>>>>>>>>>>>>>>>>>
name               str               'google.com'
tld                str               'com'
registrar          str               'MarkMonitor Inc.'
registrant_country str               'US'
creation_date      datetime.datetime 1997-09-15 04:00:00
expiration_date    datetime.datetime 2028-09-14 04:00:00
last_updated       datetime.datetime 2019-09-09 15:39:04
dnssec             bool              False
status             str               'clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited'
statuses           list              ['clientDeleteProhibited (https://www.icann.org/epp#clientDeleteProhibited)', 'clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited', 'clientTransferProhibited (https://www.icann.org/epp#clientTransferProhibited)', 'clientTransferProhibited https://icann.org/epp#clientTransferProhibited', 'clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited)', 'clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited', 'serverDeleteProhibited (https://www.icann.org/epp#serverDeleteProhibited)', 'serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited', 'serverTransferProhibited (https://www.icann.org/epp#serverTransferProhibited)', 'serverTransferProhibited https://icann.org/epp#serverTransferProhibited', 'serverUpdateProhibited (https://www.icann.org/epp#serverUpdateProhibited)', 'serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited']
name_servers       list              ['ns1.google.com', 'ns2.google.com', 'ns3.google.com', 'ns4.google.com']
registrant         str               'Google LLC'
emails             list              ['abusecomplaints@markmonitor.com', 'whoisrequest@markmonitor.com']

Screenshots

No need.

Desktop (please complete the following information):

Smartphone (please complete the following information):

No need.

Additional context

OS whois:

jony@jony-ThinkPad-L13:~$ whois google.com.ag
getaddrinfo(whois.nic.ag): Name or service not known

Try to use iana whois (for demo, I used web for get full result):

jony@jony-ThinkPad-L13:~$ curl https://www.iana.org/whois?q=google.com.ag 2>/dev/null | egrep "refer|nserver"
refer:        whois.nic.ag
nserver:      A0.CCTLD.AFILIAS-NST.INFO 199.254.59.1 2001:500:25:0:0:0:0:1
nserver:      A2.CCTLD.AFILIAS-NST.INFO 199.249.116.1 2001:500:44:0:0:0:0:1
nserver:      B0.CCTLD.AFILIAS-NST.ORG 199.254.60.1 2001:500:26:0:0:0:0:1
nserver:      B2.CCTLD.AFILIAS-NST.ORG 199.249.124.1 2001:500:4c:0:0:0:0:1
nserver:      C0.CCTLD.AFILIAS-NST.INFO 199.254.61.1 2001:500:27:0:0:0:0:1
nserver:      D0.CCTLD.AFILIAS-NST.ORG 199.254.62.1 2001:500:28:0:0:0:0:1

This looks like a registrar issue. I didn't find any information about problems with the whois.nic.ag on the https://www.nic.ag, but now this address is not in the DNS:

jony@jony-ThinkPad-L13:~$ nslookup whois.nic.ag 8.8.8.8
Server:         8.8.8.8
Address:        8.8.8.8#53

** server can't find whois.nic.ag: NXDOMAIN

Can you help me in explaining the reasons, if possible, and solving the problem using python-whois or WhoisDomain?

I assume that it is possible to retrieve domain information from iana.org, but I did not see this option in the repository documentation, and I also suspect that this may be the wrong way to obtain information.

Jony321 commented 11 months ago

I am closing the ticket based on the response to the ticket in https://github.com/DannyCork/python-whois/issues/337.