pogzyb / asyncwhois

Python WHOIS and RDAP utility for querying and parsing information about Domains, IPv4s, IPv6s, and AS numbers
MIT License
61 stars 17 forks source link

No response for some domains #57

Closed klimenk0aa closed 1 year ago

klimenk0aa commented 1 year ago

Hi. Your library is great, but I ran into a problem.

import asyncwhois asyncwhois.whois_domain("urbanvibes.com").parser_output {domain_name: None, created: None, updated: None, expires: None, registrar: None, registrar_iana_id: None, registrant_name: None, registrant_organization: None, registrant_address: None, registrant_city: None, registrant_state: None, registrant_zipcode: None, registrant_country: None, registrant_email: None, dnssec: None, status: [], name_servers: [], admin_name: None, admin_id: None, admin_organization: None, admin_city: None, admin_address: None, admin_state: None, admin_zipcode: None, admin_country: None, admin_phone: None, admin_fax: None, admin_email: None, billing_name: None, billing_id: None, billing_organization: None, billing_city: None, billing_address: None, billing_state: None, billing_zipcode: None, billing_country: None, billing_phone: None, billing_fax: None, billing_email: None, tech_name: None, tech_id: None, tech_organization: None, tech_city: None, tech_address: None, tech_state: None, tech_zipcode: None, tech_country: None, tech_phone: None, tech_fax: None, tech_email: None} asyncwhois.whois_domain("urbanvibes.com").query_output ' Domain Name: URBANVIBES.COM\r\n Registry Domain ID: 1569257607_DOMAIN_COM-VRSN\r\n Registrar WHOIS Server: whois.crazydomains.com\r\n Registrar URL: http://www.crazydomains.com.au\r\n Updated Date: 2020-01-13T07:38:10Z\r\n Creation Date: 2009-09-16T18:00:20Z\r\n Registry Expiry Date: 2025-09-16T18:00:20Z\r\n Registrar: Dreamscape Networks International Pte Ltd\r\n Registrar IANA ID: 1291\r\n Registrar Abuse Contact Email: abuse@crazydomains.com\r\n Registrar Abuse Contact Phone: +61 894 220 890\r\n Domain Status: ok https://icann.org/epp#ok\r\n Name Server: NS1.GKSMDNS.COM\r\n Name Server: NS2.GKSMDNS.COM\r\n DNSSEC: unsigned\r\n URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/\r\n>>> Last update of whois database: 2023-06-02T08:41:25Z <<<\r\n\r\nFor more information on Whois status codes, please visit https://icann.org/epp\r\n\r\nNOTICE: The expiration date displayed in this record is the date the\r\nregistrar\'s sponsorship of the domain name registration in the registry is\r\ncurrently set to expire. This date does not necessarily reflect the expiration\r\ndate of the domain name registrant\'s agreement with the sponsoring\r\nregistrar. Users may consult the sponsoring registrar\'s Whois database to\r\nview the registrar\'s reported date of expiration for this registration.\r\n\r\nTERMS OF USE: You are not authorized to access or query our Whois\r\ndatabase through the use of electronic processes that are high-volume and\r\nautomated except as reasonably necessary to register domain names or\r\nmodify existing registrations; the Data in VeriSign Global Registry\r\nServices\' ("VeriSign") Whois database is provided by VeriSign for\r\ninformation purposes only, and to assist persons in obtaining information\r\nabout or related to a domain name registration record. VeriSign does not\r\nguarantee its accuracy. By submitting a Whois query, you agree to abide\r\nby the following terms of use: You agree that you may use this Data only\r\nfor lawful purposes and that under no circumstances will you use this Data\r\nto: (1) allow, enable, or otherwise support the transmission of mass\r\nunsolicited, commercial advertising or solicitations via e-mail, telephone,\r\nor facsimile; or (2) enable high volume, automated, electronic processes\r\nthat apply to VeriSign (or its computer systems). The compilation,\r\nrepackaging, dissemination or other use of this Data is expressly\r\nprohibited without the prior written consent of VeriSign. You agree not to\r\nuse electronic processes that are automated and high-volume to access or\r\nquery the Whois database except as reasonably necessary to register\r\ndomain names or modify existing registrations. VeriSign reserves the right\r\nto restrict your access to the Whois database in its sole discretion to ensure\r\noperational stability. VeriSign may restrict or terminate your access to the\r\nWhois database for failure to abide by these terms of use. VeriSign\r\nreserves the right to modify these terms at any time.\r\n\r\nThe Registry database contains ONLY .COM, .NET, .EDU domains and\r\nRegistrars.\r\n' import platform platform.platform() 'Linux-4.18.0-425.19.2.el8_7.x86_64-x86_64-with-glibc2.31' import sys sys.version '3.11.3 (main, May 23 2023, 13:25:46) [GCC 10.2.1 20210110]'

But the problem does not reproduce on windows.

import asyncwhois asyncwhois.whois_domain("urbanvibes.com").parser_output {domain_name: 'URBANVIBES.COM', created: datetime.datetime(2009, 9, 16, 0, 0), updated: datetime.datetime(2020, 1, 13, 15, 38, 10), expires: datetime.datetime(2025, 9, 16, 0, 0), registrar: 'Dreamscape Networks International Pte Ltd', registrar_iana_id: '1291', registrant_name: 'SPORT & FASHION MANAGEMENT PTE. LTD.', registrant_organization: 'SPORT & FASHION MANAGEMENT PTE. LTD.', registrant_address: '6 SHENTON WAY #18-11 OUE DOWNTOWN 2', registrant_city: 'SINGAPORE', registrant_state: 'SINGAPORE', registrant_zipcode: '068809', registrant_country: 'SG', registrant_email: 'INFOADMIN@SFM.SG', dnssec: 'unsigned', status: ['ok https://icann.org/epp#ok'], name_servers: ['NS1.GKSMDNS.COM', 'NS2.GKSMDNS.COM'], admin_name: 'SPORT & FASHION MANAGEMENT PTE. LTD.', admin_id: 'C-008487039-SN', admin_organization: 'SPORT & FASHION MANAGEMENT PTE. LTD.', admin_city: 'SINGAPORE', admin_address: '6 SHENTON WAY, #18-11, OUE DOWNTOWN 2', admin_state: 'SINGAPORE', admin_zipcode: '068809', admin_country: 'SG', admin_phone: '+65.66104279', admin_fax: '+65.', admin_email: 'INFOADMIN@SFM.SG', billing_name: None, billing_id: None, billing_organization: None, billing_city: None, billing_address: None, billing_state: None, billing_zipcode: None, billing_country: None, billing_phone: None, billing_fax: None, billing_email: None, tech_name: 'SPORT & FASHION MANAGEMENT PTE. LTD.', tech_id: 'C-008487039-SN', tech_organization: 'SPORT & FASHION MANAGEMENT PTE. LTD.', tech_city: 'SINGAPORE', tech_address: '6 SHENTON WAY, #18-11, OUE DOWNTOWN 2', tech_state: 'SINGAPORE', tech_zipcode: '068809', tech_country: 'SG', tech_phone: '+65.66104279', tech_fax: '+65.', tech_email: 'INFOADMIN@SFM.SG'} import sys sys.version '3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)]' import platform platform.platform() 'Windows-10-10.0.19044-SP0'

pogzyb commented 1 year ago

Thank you for opening this issue!

I opened #58 to check for empty query_output and to prevent the parser_output from only containing None values. After implementing this, the parser_output matches what is also found on whois.com:

whois.com: image

with #58 image

As far as explaining the discrepancies in linux vs windows, in this particular case I think this is more of a problem with the domain registrar, crazydomains, and their WHOIS service which seems to be unreliable. I tried running the query on windows as well, but got the same "None" result as linux before implementing #58 :

image

Again, based on this I think it's an issue with certain domain registrars, and not necessarily something the library can control. Hope this fix helps!

pogzyb commented 1 year ago

59 1.0.6 is released