Skip to content

Instantly share code, notes, and snippets.

@miah
Created October 5, 2018 20:26
Show Gist options
  • Save miah/a81758cde8d4a6809ebd0e31a686e6b3 to your computer and use it in GitHub Desktop.
Save miah/a81758cde8d4a6809ebd0e31a686e6b3 to your computer and use it in GitHub Desktop.
[23] pry(main)> record = Whois.whois('chia-pet.org')
=> "Domain Name: CHIA-PET.ORG\r\nRegistry Domain ID: D106676762-LROR\r\nRegistrar WHOIS Server: whois.gandi.net\r\nRegistrar URL: http://www.gandi.net\r\nUpdated Date: 2018-06-22T17:45:45Z\r\nCreation Date: 2005-06-20T19:43:01Z\r\nRegistry Expiry Date: 2020-06-20T19:43:01Z\r\nRegistrar Registration Expiration Date:\r\nRegistrar: Gandi SAS\r\nRegistrar IANA ID: 81\r\nRegistrar Abuse Contact Email: abuse@support.gandi.net\r\nRegistrar Abuse Contact Phone: +33.170377661\r\nReseller:\r\nDomain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited\r\nRegistrant Organization:\r\nRegistrant State/Province:\r\nRegistrant Country: FR\r\nName Server: ED.NS.CLOUDFLARE.COM\r\nName Server: JILL.NS.CLOUDFLARE.COM\r\nDNSSEC: unsigned\r\nURL of the ICANN Whois Inaccuracy Complaint Form https://www.icann.org/wicf/)\r\n>>> Last update of WHOIS database: 2018-10-05T20:24:23Z <<<\r\n\r\nFor more information on Whois status codes, please visit https://icann.org/epp\r\n\r\nAccess to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.\n\nThe Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.\r\n"
[24] pry(main)> parser = record.parser
parser.nameservers=> #<Whois::Parser:0x00007ff58cadb2e8
@record=
"Domain Name: CHIA-PET.ORG\r\nRegistry Domain ID: D106676762-LROR\r\nRegistrar WHOIS Server: whois.gandi.net\r\nRegistrar URL: http://www.gandi.net\r\nUpdated Date: 2018-06-22T17:45:45Z\r\nCreation Date: 2005-06-20T19:43:01Z\r\nRegistry Expiry Date: 2020-06-20T19:43:01Z\r\nRegistrar Registration Expiration Date:\r\nRegistrar: Gandi SAS\r\nRegistrar IANA ID: 81\r\nRegistrar Abuse Contact Email: abuse@support.gandi.net\r\nRegistrar Abuse Contact Phone: +33.170377661\r\nReseller:\r\nDomain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited\r\nRegistrant Organization:\r\nRegistrant State/Province:\r\nRegistrant Country: FR\r\nName Server: ED.NS.CLOUDFLARE.COM\r\nName Server: JILL.NS.CLOUDFLARE.COM\r\nDNSSEC: unsigned\r\nURL of the ICANN Whois Inaccuracy Complaint Form https://www.icann.org/wicf/)\r\n>>> Last update of WHOIS database: 2018-10-05T20:24:23Z <<<\r\n\r\nFor more information on Whois status codes, please visit https://icann.org/epp\r\n\r\nAccess to Public Interest Registry WHOIS information is provided to assist persons in determining the contents of a domain name registration record in the Public Interest Registry registry database. The data in this record is provided by Public Interest Registry for informational purposes only, and Public Interest Registry does not guarantee its accuracy. This service is intended only for query-based access. You agree that you will use this data only for lawful purposes and that, under no circumstances will you use this data to (a) allow, enable, or otherwise support the transmission by e-mail, telephone, or facsimile of mass unsolicited, commercial advertising or solicitations to entities other than the data recipient's own existing customers; or (b) enable high volume, automated, electronic processes that send queries or data to the systems of Registry Operator, a Registrar, or Afilias except as reasonably necessary to register domain names or modify existing registrations. All rights reserved. Public Interest Registry reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.\n\nThe Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.\r\n">
[25] pry(main)> parser.nameservers
Whois::ParserError: Unexpected token: The Registrar of Record identified in this output may have an RDDS service that can be queried for additional information on how to contact the Registrant, Admin, or Tech contact of the queried domain name.
from /Users/miah/projects/github/.gems/inspec-whois/ruby/2.5.0/gems/whois-parser-1.1.0/lib/whois/scanners/base.rb:110:in `error!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment