Skip to content

Commit

Permalink
Update whois.na-nic.com.na parser to the new response
Browse files Browse the repository at this point in the history
  • Loading branch information
weppos committed Oct 25, 2012
1 parent 67c6cff commit 4a6218c
Show file tree
Hide file tree
Showing 16 changed files with 180 additions and 344 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

- CHANGED: Updated whois.cmc.iq parser to the new response format.

- CHANGED: Updated whois.na-nic.com.na parser to the new response format.

- FIXED: whois.domainregistry.ie should support status `Active - LOCKED`.

- FIXED: whois.nic.uk fails to parse registrars without URL (GH-188).
Expand Down
24 changes: 2 additions & 22 deletions lib/whois/record/parser/whois.na-nic.com.na.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,15 @@
#++


require 'whois/record/parser/base_cocca'
require 'whois/record/parser/base_cocca2'


module Whois
class Record
class Parser

# Parser for the whois.na-nic.com.na server.
class WhoisNaNicComNa < BaseCocca

property_supported :status do
if content_for_scanner =~ /Status:\s+(.+?)\n/
case $1.downcase
when "active"
:registered
when "delegated"
:registered
when "not registered"
:available
when "suspended"
:inactive
else
Whois.bug!(ParserError, "Unknown status `#{$1}'.")
end
else
Whois.bug!(ParserError, "Unable to parse status.")
end
end

class WhoisNaNicComNa < BaseCocca2
end

end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#status
should: %s == :inactive
should: %s == :available

#available?
should: %s == false
should: %s == true

#registered?
should: %s == true
should: %s == false
Original file line number Diff line number Diff line change
@@ -1,54 +1,14 @@
Domain Name: u34jedzcq.na
Domain Status: Available

TERMS OF USE: You are not authorized to access or query our whois database through the use of electronic processes that are high-volume and/or automated.

The contents of the WHOIS is Dr Lisse's intellectual property and is provided by NA-NiC under exclusive license as a service to the Internet community. The data is for information purposes only. NA-NiC does not guarantee its accuracy. By submitting a Whois query, you agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to CoCCA, its members (or CoCCA or member computer systems).

The compilation, repackaging, dissemination or other use of this Data is expressly prohibited. We reserve the right to enter IP addresses and/or corresponding networks of offenders into our IPTables.

.NA(R), Copyright(C) 1991, 1995, 2007, 2010 Dr Lisse
.NA(R), Copyright(C) 1991, 1995, 2008, 2012 Dr Lisse


Domain Name Information
Query: google.na
Status: Active
Created: 28 Mar 2007
Modified: 12 Oct 2010
Expires: 20 Aug 2011
Name Servers:
ns2.google.com
ns1.google.com

Registrar Information
Registrar Name: MarkMonitor
Address: PMB 155
10400 Overland Road
Boise, ID
Country: US




Registrant:
Name: Google Inc
Address:
1600 Amphitheatre Parkway
Mountain View, CA 94043 US
Email Address: info AT google DOT na


Admin Contact:
Name: DNS Admin
Organisation: Google Inc
Address:
1600 Amphitheatre Parkway
Mountain View, CA 94043 US
Email Address: dns-admin AT google DOT com


Technical Contact:
Name: CCOPS Provisioning
Organisation: MarkMonitor
Address:
10400 Overland Road, PMB 155
Boise, ID 83709 US
Email Address: ccops AT markmonitor DOT com

>>> Last update of WHOIS database: 2012-10-25T09:44:19.640Z <<<

This file was deleted.

This file was deleted.

80 changes: 80 additions & 0 deletions spec/fixtures/responses/whois.na-nic.com.na/property_status_ok.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Domain Name: google.na
Domain ID: 4100-CoCCA
WHOIS Server: .NA?
Referral URL:
Updated Date: 2012-07-19T18:48:27.776Z
Creation Date: 2007-03-27T22:00:00.000Z
Registry Expiry Date: 2013-08-19T23:00:00.000Z
Sponsoring Registrar: MarkMonitor
Sponsoring Registrar IANA ID:
Domain Status: clientDeleteProhibited
Domain Status: ok
Domain Status: clientRenewProhibited
Domain Status: clientUpdateProhibited
Domain Status: clientTransferProhibited

Registrant ID: 11969-CoCCA
Registrant Name: Google Inc
Registrant Organization:
Registrant Street: 1600 Amphitheatre Parkway
Registrant City: Mountain View, CA 94043
Registrant State/Province:
Registrant Postal Code:
Registrant Country: US
Registrant Email: info@google.na

Admin ID: 11898-CoCCA
Admin Name: Christina Chiou
Admin Organization: Google Inc
Admin Street: 1600 Amphitheatre Parkway
Admin City: Mountain View
Admin State/Province: CA
Admin Postal Code: 94043
Admin Country: US
Admin Phone: +1.6503300100
Admin Phone Ext:
Admin Fax: +1.6506188571
Admin Fax Ext:
Admin Email: dns-admin@google.com

Tech ID: 11871-CoCCA
Tech Name: CCOPS Provisioning
Tech Organization: MarkMonitor
Tech Street: 10400 Overland Road, PMB 155
Tech City: Boise, ID 83709
Tech State/Province:
Tech Postal Code:
Tech Country: US
Tech Email: ccops@markmonitor.com

Name Server: ns2.google.com
Name Server: ns1.google.com

DNSSEC: unsigned


Additional Section


Sponsoring Registrar URL: http://www.markmonitor.com
Sponsoring Registrar Address: PMB 155 10400 Overland Road Boise, ID
Sponsoring Registrar Country: US
Sponsoring Registrar Phone: +1 208 389 5740
Sponsoring Registrar Fax: +1 208 389 5771
Sponsoring Registrar Customer Service Contact: Kevin Pearl
Sponsoring Registrar Customer Service Email: ccops@markmonitor.com
Sponsoring Registrar Admin Contact: Kevin Pearl
Sponsoring Registrar Admin Email: ccops@markmonitor.com


TERMS OF USE: You are not authorized to access or query our whois database through the use of electronic processes that are high-volume and/or automated.

The contents of the WHOIS is Dr Lisse's intellectual property and is provided by NA-NiC under exclusive license as a service to the Internet community. The data is for information purposes only. NA-NiC does not guarantee its accuracy. By submitting a Whois query, you agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to CoCCA, its members (or CoCCA or member computer systems).

The compilation, repackaging, dissemination or other use of this Data is expressly prohibited. We reserve the right to enter IP addresses and/or corresponding networks of offenders into our IPTables.

.NA(R), Copyright(C) 1991, 1995, 2008, 2012 Dr Lisse



>>> Last update of WHOIS database: 2012-10-25T09:44:19.640Z <<<

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Domain Name: u34jedzcq.na
Domain Status: Available

TERMS OF USE: You are not authorized to access or query our whois database through the use of electronic processes that are high-volume and/or automated.

The contents of the WHOIS is Dr Lisse's intellectual property and is provided by NA-NiC under exclusive license as a service to the Internet community. The data is for information purposes only. NA-NiC does not guarantee its accuracy. By submitting a Whois query, you agree that you may use this Data only for lawful purposes and that under no circumstances will you use this Data to: (1) allow, enable, or otherwise support the transmission of mass unsolicited, commercial advertising or solicitations via e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to CoCCA, its members (or CoCCA or member computer systems).
Expand All @@ -7,9 +10,5 @@ The compilation, repackaging, dissemination or other use of this Data is express
.NA(R), Copyright(C) 1991, 1995, 2008, 2012 Dr Lisse


Domain Information
Query: u34jedzcq.na
Status: Not Registered



>>> Last update of WHOIS database: 2012-10-25T09:44:19.640Z <<<
Loading

0 comments on commit 4a6218c

Please sign in to comment.