开发者

Whois list of Top Level Domain against their corresponding registrar

开发者 https://www.devze.com 2022-12-25 14:02 出处:网络
I\'m trying to find a list of TLD\'s to their corresponding whois server, for example .com americanWhoisServer

I'm trying to find a list of TLD's to their corresponding whois server, for example

.com americanWhoisServer .net someOtherWhoisServer .au australianWhoisServer

I开发者_开发问答n the end i'm aiming for something like a Dictionary where the key is the TLD and the value is the whois server address (eg whois.apnic.net).

Ah snap, i just realised that i am given the IP addresses and not domain names but a list could still come in handy.

How can i determine which whois server to use given a IP address? Guess and check?


You can get the official (?) tld list from http://data.iana.org/TLD/tlds-alpha-by-domain.txt and then query the IANA whois server (whois.iana.org at port 43) for each tld to get information about it. Slightly more export-friendly and official than the HTML tld list at http://www.iana.org/domains/root/db/.


Do not use a static, local list; whois servers may change in time (ok, not everyday, but it may happen); to find the server for a given domain or ip, start by querying the IANA whois server, basically, connect to whois.iana.org:43 and send the query string followed by "\r\n"; for example "ibm.com\r\n" or "72.163.5.201\r\n", the IANA whois server will then return an answer containing a "hint", for example, the query for 72.163.5.201 would return

% IANA WHOIS server 
% for more information on IANA, visit http://www.iana.org 
% This query returned 1 object

refer: whois.arin.net

inetnum: 72.0.0.0 - 72.255.255.255 organisation: ARIN status: ALLOCATED

whois: whois.arin.net

changed: 2004-08 source: IANA

now, parse the response searching for the "whois:" entry, extract the name of the whois server responsible for the IP or domain (whois.arin.net in this case) and repeat the query using that server; notice though, that in some cases (e.g. "com" domains and the verisign whois server) the second answer you'll get may return a referral to another whois server for example, here's the result of a query against the verisign whois for the verisign.com domain will return

Domain Name: VERISIGN-GRS.COM
Registrar: CSC CORPORATE DOMAINS, INC.
Sponsoring Registrar IANA ID: 299
Whois Server: whois.corporatedomains.com
Referral URL: http://www.cscglobal.com/global/web/csc/digital-brand-services.html
Name Server: AV1.NSTLD.COM
Name Server: AV2.NSTLD.COM
Name Server: AV3.NSTLD.COM
Name Server: AV4.NSTLD.COM
Status: clientTransferProhibited https://www.icann.org/epp#clientTransferProhibited
Status: serverDeleteProhibited https://www.icann.org/epp#serverDeleteProhibited
Status: serverTransferProhibited https://www.icann.org/epp#serverTransferProhibited
Status: serverUpdateProhibited https://www.icann.org/epp#serverUpdateProhibited
Updated Date: 12-jan-2016
Creation Date: 08-sep-2000
Expiration Date: 08-sep-2016

in such a case you'll need to locate the "Whois Server:" line, extract the whois server name (whois.corporatedomains.com in this case) and repeat the query; a last caveat, in some cases the "referral" may be returned even if the server is the one you just queried, so you should check such a condition to avoid an infinite loop


Each whois client has its own way of getting this information, since no standard was ever adopted.

GNU whois (as used on Debian) has a hardwired list (not a configuration file, a file included at compile-time, named tld_serv_list).

The whois client on FreeBSD uses an online (unofficial) list, maintained in the DNS, at whois-servers.net:

% dig +short CNAME fr.whois-servers.net 
whois.nic.fr.
% dig +short CNAME in.whois-servers.net 
whois.inregistry.net.


You might find the official IANA (Internet Assigned Numbers Authority) list at http://www.iana.org/domains/root/db/ a good starting/jumping off point. It lists the WHOIS (and nameservers) for all allocated TLDs and it's the official list, but not available in an "easy to export format"


I regularly compile such a list from IANA and PSL in XML: https://github.com/whois-server-list/whois-server-list

This list contains more than 900 top level domains and its respective whois servers. Additionally it includes more than 300 second level domains. The list gets updated frequently.


a list of servers for TLD and SLD can be found at the web address https://whois.sld.ro/servers-list.html and at the only root domains https://www.iana.org/domains/root/db

SLD / TLD Whois Server Last modified
.aaa whois.nic.aaa 2020-10-28
.gov.af whois.nic.af 2020-10-28
.com.af whois.nic.af 2020-10-28
.org.af whois.nic.af 2020-10-28
.edu.af whois.nic.af 2020-10-28
.ai whois.nic.ai 2020-10-28
.off.ai whois.nic.ai 2020-10-28
.com.ai whois.nic.ai 2020-10-28
....
0

精彩评论

暂无评论...
验证码 换一张
取 消