joepie91 / python-whois

A python module for retrieving and parsing WHOIS data
Do What The F*ck You Want To Public License
399 stars 187 forks source link

Directly Query mandatory whois services ICANN requires new gTLDs to run #54

Open techdragon opened 10 years ago

techdragon commented 10 years ago

If you look up the content of the ICANN agreements for all the new TLD operators. Whois tool writers get a giant big helping hand. They mandate some whois standards!

The easiest way to do it would be to query whois.nic.tld first, then fall back to the current mechanism.

The current mechanism is widely inconsistent with the new gTLDs. A quick run of the 'status' field results looking for 'nic.tld' shows a lot of empty values where they return valid ICANN required whois data for instance:

A significant portion of the domains in ICANNs new gTLD batches, return results like this pythonwhois.shared.WhoisException: No root WHOIS server found for domain.


SPECIFICATION 4

REGISTRATION DATA PUBLICATION SERVICES

  1. Registration Data Directory Services. Until ICANN requires a different protocol, Registry Operator will operate a WHOIS service available via port 43 in accordance with RFC 3912, and a web-based Directory Service at providing free public query-based access to at least the following elements in the following format. ICANN reserves the right to specify alternative formats and protocols, and upon such specification, the Registry Operator will implement such alternative specification as soon as reasonably practicable.

Registry Operator shall implement a new standard supporting access to domain name registration data (SAC 051) no later than one hundred thirty-five (135) days after it is requested by ICANN if: 1) the IETF produces a standard (i.e., it is published, at least, as a Proposed Standard RFC as specified in RFC 2026); and 2) its implementation is commercially reasonable in the context of the overall operation of the registry.

1.1. The format of responses shall follow a semi-free text format outline below, followed by a blank line and a legal disclaimer specifying the rights of Registry Operator, and of the user querying the database.

1.2. Each data object shall be represented as a set of key/value pairs, with lines beginning with keys, followed by a colon and a space as delimiters, followed by the value.

1.3. For fields where more than one value exists, multiple key/value pairs with the same key shall be allowed (for example to list multiple name servers). The first key/value pair after a blank line should be considered the start of a new record, and should be considered as identifying that record, and is used to group data, such as hostnames and IP addresses, or a domain name and registrant information, together.

1.4. The fields specified below set forth the minimum output requirements. Registry Operator may output data fields in addition to those specified below, subject to approval by ICANN, which approval shall not be unreasonably withheld.

1.5. Domain Name Data:

1.5.1 Query format: whois EXAMPLE.TLD

1.5.2 Response format:

Domain Name: EXAMPLE.TLD Domain ID: D1234567-TLD WHOIS Server: whois.example.tld Referral URL: http://www.example.tld Updated Date: 2009-05-29T20:13:00Z Creation Date: 2000-10-08T00:45:00Z Registry Expiry Date: 2010-10-08T00:44:59Z Sponsoring Registrar: EXAMPLE REGISTRAR LLC Sponsoring Registrar IANA ID: 5555555 Domain Status: clientDeleteProhibited Domain Status: clientRenewProhibited Domain Status: clientTransferProhibited Domain Status: serverUpdateProhibited Registrant ID: 5372808-ERL Registrant Name: EXAMPLE REGISTRANT Registrant Organization: EXAMPLE ORGANIZATION Registrant Street: 123 EXAMPLE STREET Registrant City: ANYTOWN Registrant State/Province: AP Registrant Postal Code: A1A1A1 Registrant Country: EX Registrant Phone: +1.5555551212 Registrant Phone Ext: 1234 Registrant Fax: +1.5555551213 Registrant Fax Ext: 4321 Registrant Email: EMAIL@EXAMPLE.TLD Admin ID: 5372809-ERL Admin Name: EXAMPLE REGISTRANT ADMINISTRATIVE Admin Organization: EXAMPLE REGISTRANT ORGANIZATION Admin Street: 123 EXAMPLE STREET Admin City: ANYTOWN Admin State/Province: AP Admin Postal Code: A1A1A1 Admin Country: EX Admin Phone: +1.5555551212 Admin Phone Ext: 1234 Admin Fax: +1.5555551213 Admin Fax Ext: Admin Email: EMAIL@EXAMPLE.TLD Tech ID: 5372811-ERL Tech Name: EXAMPLE REGISTRAR TECHNICAL Tech Organization: EXAMPLE REGISTRAR LLC Tech Street: 123 EXAMPLE STREET Tech City: ANYTOWN Tech State/Province: AP Tech Postal Code: A1A1A1 Tech Country: EX Tech Phone: +1.1235551234 Tech Phone Ext: 1234 Tech Fax: +1.5555551213 Tech Fax Ext: 93 Tech Email: EMAIL@EXAMPLE.TLD Name Server: NS01.EXAMPLEREGISTRAR.TLD Name Server: NS02.EXAMPLEREGISTRAR.TLD DNSSEC: signedDelegation DNSSEC: unsigned

Last update of WHOIS database: 2009-05-29T20:15:00Z <<<

1.6. Registrar Data:

1.6.1 Query format: whois “registrar Example Registrar, Inc.”

1.6.2 Response format:

Registrar Name: Example Registrar, Inc. Street: 1234 Admiralty Way City: Marina del Rey State/Province: CA Postal Code: 90292 Country: US Phone Number: +1.3105551212 Fax Number: +1.3105551213 Email: registrar@example.tld WHOIS Server: whois.example-registrar.tld Referral URL: http://www.example-registrar.tld Admin Contact: Joe Registrar Phone Number: +1.3105551213 Fax Number: +1.3105551213 Email: joeregistrar@example-registrar.tld Admin Contact: Jane Registrar Phone Number: +1.3105551214 Fax Number: +1.3105551213 Email: janeregistrar@example-registrar.tld Technical Contact: John Geek Phone Number: +1.3105551215 Fax Number: +1.3105551216 Email: johngeek@example-registrar.tld

Last update of WHOIS database: 2009-05-29T20:15:00Z <<<

1.7. Nameserver Data:

1.7.1 Query format: whois “NS1.EXAMPLE.TLD”, whois “nameserver (nameserver name)”, or whois “nameserver (IP Address)”

1.7.2 Response format:

Server Name: NS1.EXAMPLE.TLD IP Address: 192.0.2.123 IP Address: 2001:0DB8::1 Registrar: Example Registrar, Inc. WHOIS Server: whois.example-registrar.tld Referral URL: http://www.example-registrar.tld

Last update of WHOIS database: 2009-05-29T20:15:00Z <<<

1.8. The format of the following data fields: domain status, individual and organizational names, address, street, city, state/province, postal code, country, telephone and fax numbers (the extension will be provided as a separate field as shown above), email addresses, date and times should conform to the mappings specified in EPP RFCs 5730-5734 so that the display of this information (or values return in WHOIS responses) can be uniformly processed and understood.

1.9. In order to be compatible with ICANN’s common interface for WHOIS (InterNIC), WHOIS output shall be in the format outline above.

mayurbudukale commented 7 years ago

Does anyone have any idea about their DB management