Permalink
Browse files

Updated whois.pandi.or.id parser to the new response format

  • Loading branch information...
weppos committed Feb 24, 2014
1 parent 713bc39 commit 68eae655e3fae990c10280e199c0c83b75347076
View
@@ -13,6 +13,8 @@
- CHANGED: Updated whois.nic.ec parser to the new response format.
+- CHANGED: Updated whois.pandi.or.id parser to the new response format.
+
## Release 3.4.4
@@ -8,72 +8,18 @@
require 'whois/record/parser/base'
+require 'whois/record/parser/whois.centralnic.com.rb'
module Whois
class Record
class Parser
- #
- # = whois.pandi.or.id parser
- #
# Parser for the whois.pandi.or.id server.
#
- # NOTE: This parser is just a stub and provides only a few basic methods
- # to check for domain availability and get domain status.
- # Please consider to contribute implementing missing methods.
- # See WhoisNicIt parser for an explanation of all available methods
- # and examples.
- #
- class WhoisPandiOrId < Base
-
- property_supported :status do
- if content_for_scanner =~ /domain-status:\s+(.+)\n/
- case $1.downcase
- when "object is active"
- :registered
- else
- Whois.bug!(ParserError, "Unknown status `#{$1}'.")
- end
- else
- :available
- end
- end
-
- property_supported :available? do
- !!(content_for_scanner =~ /%ERROR:101: no entries found/)
- end
-
- property_supported :registered? do
- !available?
- end
-
-
- property_supported :created_on do
- if content_for_scanner =~ /created:\s+(.*)\n/
- Time.parse($1)
- end
- end
-
- property_supported :updated_on do
- if content_for_scanner =~ /last-update:\s+(.*)\n/
- Time.parse($1)
- end
- end
-
- property_supported :expires_on do
- if content_for_scanner =~ /expires:\s+(.*)\n/
- Time.parse($1)
- end
- end
-
-
- property_supported :nameservers do
- content_for_scanner.scan(/nserver:\s+(.+)\n/).flatten.map do |name|
- Record::Nameserver.new(:name => name)
- end
- end
-
+ # It aliases the whois.centralnic.com parser because
+ # it looks like the response is the same of Centralnic.
+ class WhoisPandiOrId < WhoisCentralnicCom
end
end
@@ -1,5 +1,16 @@
+#disclaimer
+ %s == nil
+
+
+#domain
+ %s == nil
+
+#domain_id
+ %s == nil
+
+
#status
- %s == :available
+ %s == []
#available?
%s == true
@@ -18,6 +29,22 @@
%s == nil
+#registrar
+ %s == nil
+
+#registrant_contacts
+ %s %CLASS{array}
+ %s == []
+
+#admin_contacts
+ %s %CLASS{array}
+ %s == []
+
+#technical_contacts
+ %s %CLASS{array}
+ %s == []
+
+
#nameservers
%s %CLASS{array}
%s == []
@@ -1,9 +1 @@
-% This is the register.net.id Whois server.
-% For more detailed information, please check the website
-% https://register.net.id
-
-%ERROR:101: no entries found
-%
-% No entries found in the selected source(s).
-
-
+DOMAIN NOT FOUND
@@ -1,5 +1,16 @@
+#disclaimer
+ %s == nil
+
+
+#domain
+ %s == "google.co.id"
+
+#domain_id
+ %s == "PANDI-DO246796"
+
+
#status
- %s == :registered
+ %s == ["clientTransferProhibited", "serverTransferProhibited"]
#available?
%s == false
@@ -10,25 +21,95 @@
#created_on
%s %CLASS{time}
- %s %TIME{2004-12-18}
+ %s %TIME{2004-12-18 13:33:21 UTC}
#updated_on
%s %CLASS{time}
- %s %TIME{2006-07-24}
+ %s %TIME{2013-09-20 23:24:51 UTC}
#expires_on
%s %CLASS{time}
- %s %TIME{2010-08-31}
+ %s %TIME{2014-09-01 23:59:59 UTC}
+
+
+#registrar
+ %s %CLASS{registrar}
+ %s.id == "digitalreg"
+ %s.name == nil
+ %s.organization == "Digital Registra"
+ %s.url == nil
+
+#registrant_contacts
+ %s %CLASS{array}
+ %s %SIZE{1}
+ %s[0] %CLASS{contact}
+ %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
+ %s[0].id == "0123459P2ZC"
+ %s[0].name == "Domain Administrator"
+ %s[0].organization == "PT Google Indonesia"
+ %s[0].address == "Menara BCA Grand Indonesia\nRegus Grand Indonesia"
+ %s[0].city == "Jakarta"
+ %s[0].zip == "10310"
+ %s[0].state == "Jakarta"
+ %s[0].country == nil
+ %s[0].country_code == "ID"
+ %s[0].phone == "+62.2123584400"
+ %s[0].fax == "+62.2123584400"
+ %s[0].email == "dns-admin@google.com"
+
+#admin_contacts
+ %s %CLASS{array}
+ %s %SIZE{1}
+ %s[0] %CLASS{contact}
+ %s[0].type == Whois::Record::Contact::TYPE_ADMINISTRATIVE
+ %s[0].id == "0123459P2ZC"
+ %s[0].name == "Domain Administrator"
+ %s[0].organization == "PT Google Indonesia"
+ %s[0].address == "Menara BCA Grand Indonesia\nRegus Grand Indonesia"
+ %s[0].city == "Jakarta"
+ %s[0].zip == "10310"
+ %s[0].state == "Jakarta"
+ %s[0].country == nil
+ %s[0].country_code == "ID"
+ %s[0].phone == "+62.2123584400"
+ %s[0].fax == "+62.2123584400"
+ %s[0].email == "dns-admin@google.com"
+
+#technical_contacts
+ %s %CLASS{array}
+ %s %SIZE{1}
+ %s[0] %CLASS{contact}
+ %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
+ %s[0].id == "01234616RFG"
+ %s[0].name == "DNS Admin"
+ %s[0].organization == "Google Inc."
+ %s[0].address == "1600 Amphitheatre Parkway"
+ %s[0].city == "Mountain View"
+ %s[0].zip == "94043"
+ %s[0].state == "CA"
+ %s[0].country == nil
+ %s[0].country_code == "US"
+ %s[0].phone == "+1.65030000"
+ %s[0].fax == "+1.65030001"
+ %s[0].email == "dns-admin@google.com"
#nameservers
%s %CLASS{array}
%s %SIZE{4}
%s[0] %CLASS{nameserver}
%s[0].name == "ns1.google.com"
+ %s[0].ipv4 == nil
+ %s[0].ipv6 == nil
%s[1] %CLASS{nameserver}
%s[1].name == "ns2.google.com"
+ %s[1].ipv4 == nil
+ %s[1].ipv6 == nil
%s[2] %CLASS{nameserver}
%s[2].name == "ns3.google.com"
+ %s[2].ipv4 == nil
+ %s[2].ipv6 == nil
%s[3] %CLASS{nameserver}
%s[3].name == "ns4.google.com"
+ %s[3].ipv4 == nil
+ %s[3].ipv6 == nil
@@ -1,33 +1,66 @@
-% This is the register.net.id Whois server.
-% For more detailed information, please check the website
-% https://register.net.id
+Domain ID:PANDI-DO246796
+Domain Name:GOOGLE.CO.ID
+Created On:18-Dec-2004 13:33:21 UTC
+Last Updated On:20-Sep-2013 23:24:51 UTC
+Expiration Date:01-Sep-2014 23:59:59 UTC
+Status:clientTransferProhibited
+Status:serverTransferProhibited
+Registrant ID:0123459P2ZC
+Registrant Name:Domain Administrator
+Registrant Organization:PT Google Indonesia
+Registrant Street1:Menara BCA Grand Indonesia
+Registrant Street2:Regus Grand Indonesia
+Registrant City:Jakarta
+Registrant State/Province:Jakarta
+Registrant Postal Code:10310
+Registrant Country:ID
+Registrant Phone:+62.2123584400
+Registrant FAX:+62.2123584400
+Registrant Email:dns-admin@google.com
+Admin ID:0123459P2ZC
+Admin Name:Domain Administrator
+Admin Organization:PT Google Indonesia
+Admin Street1:Menara BCA Grand Indonesia
+Admin Street2:Regus Grand Indonesia
+Admin City:Jakarta
+Admin State/Province:Jakarta
+Admin Postal Code:10310
+Admin Country:ID
+Admin Phone:+62.2123584400
+Admin FAX:+62.2123584400
+Admin Email:dns-admin@google.com
+Tech ID:01234616RFG
+Tech Name:DNS Admin
+Tech Organization:Google Inc.
+Tech Street1:1600 Amphitheatre Parkway
+Tech City:Mountain View
+Tech State/Province:CA
+Tech Postal Code:94043
+Tech Country:US
+Tech Phone:+1.65030000
+Tech FAX:+1.65030001
+Tech Email:dns-admin@google.com
+Billing ID:0120505a1pl
+Billing Name:CCOPS Billing
+Billing Organization:MarkMonitor Inc.
+Billing Street1:JL.Hang Kesturi KM 4 Kabil Indus
+Billing City:Boise
+Billing State/Province:ID
+Billing Postal Code:83704
+Billing Country:US
+Billing Phone:+1.2083895741
+Billing FAX:+1.2083895771
+Billing Email:ccopsbilling@markmonitor.com
+Sponsoring Registrar ID:digitalreg
+Sponsoring Registrar Organization:Digital Registra
+Sponsoring Registrar Postal Code:55281
+Sponsoring Registrar Country:ID
+Sponsoring Registrar Phone:0274882257
+Name Server:NS1.GOOGLE.COM
+Name Server:NS2.GOOGLE.COM
+Name Server:NS3.GOOGLE.COM
+Name Server:NS4.GOOGLE.COM
+DNSSEC:Unsigned
-% Note: this output has been filtered.
-
-% Information related to 'google.co.id'
-
-domain: google.co.id
-org: PT IP Mirror Indonesia
-desc: Firma Hukum KINANTAN on behalf of GOOGLE, Inc
-admin-c: janna1
-tech-c: janna1
-bill-c: janna1
-nserver: ns1.google.com
-nserver: ns2.google.com
-nserver: ns3.google.com
-nserver: ns4.google.com
-created: 2004-12-18
-expires: 2010-08-31
-last-update: 2006-07-24
-domain-status: Object is active
-source: register.net.id # Filtered
-
-nic-hdl: janna1
-person: Janna Lam
-address: JL.Hang Kesturi KM 4 Kabil Industrial Estate Kabil
-phone: +62.0778711099
-e-mail: idreg01@ipmirror.com
-org: PT. IP Mirror Indonesia
-source: SAMPLE # Filtered
Oops, something went wrong.

0 comments on commit 68eae65

Please sign in to comment.