Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update whois.audns.net.au to match new response format #100

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@


require_relative 'base'
require 'whois/scanners/whois.audns.net.au.rb'
require 'whois/scanners/whois.auda.org.au.rb'


module Whois
class Parsers

# Parser for the whois.audns.net.au server.
# Parser for the whois.auda.org.au server.
#
# @see Whois::Parsers::Example
# The Example parser for the list of all available methods.
#
class WhoisAudnsNetAu < Base
class WhoisAudaOrgAu < Base
include Scanners::Scannable

self.scanner = Scanners::WhoisAudnsNetAu
self.scanner = Scanners::WhoisAudaOrgAu


property_not_supported :disclaimer
Expand All @@ -32,8 +32,13 @@ class WhoisAudnsNetAu < Base
node("Domain Name")
end

property_not_supported :domain_id
property_supported :domain_id do
node("Registry Domain ID")
end

property_supported :disclaimer do
node("field:disclaimer")
end

# == Values for Status
#
Expand All @@ -52,7 +57,6 @@ class WhoisAudnsNetAu < Base
!available?
end


property_not_supported :created_on

property_supported :updated_on do
Expand All @@ -61,7 +65,6 @@ class WhoisAudnsNetAu < Base

property_not_supported :expires_on


property_supported :registrar do
node("Registrar Name") do |str|
Parser::Registrar.new({
Expand All @@ -70,7 +73,6 @@ class WhoisAudnsNetAu < Base
end
end


property_supported :registrant_contacts do
contact = build_contact("Registrant Contact", Parser::Contact::TYPE_REGISTRANT)
contact.organization = node("Registrant") if contact
Expand All @@ -83,14 +85,12 @@ class WhoisAudnsNetAu < Base
build_contact("Tech Contact", Parser::Contact::TYPE_TECHNICAL)
end


property_supported :nameservers do
Array.wrap(node("Name Server")).map do |name|
Parser::Nameserver.new(name: name)
end
end


private

def build_contact(element, type)
Expand Down
35 changes: 35 additions & 0 deletions lib/whois/scanners/whois.auda.org.au.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require_relative 'base'

module Whois
module Scanners

# Scanner for the whois.auda.org.au record.
class WhoisAudaOrgAu < Base

self.tokenizers += [
:skip_empty_line,
:scan_available,
:skip_lastupdate,
:scan_disclaimer,
:scan_keyvalue,
]

tokenizer :scan_available do
if @input.skip(/^(No Data Found)|(NOT FOUND)\n/)
@ast["status:available"] = true
end
end

tokenizer :skip_lastupdate do
@input.skip(/>>>(.+?)<<<\n/)
end

tokenizer :scan_disclaimer do
if @input.match?(/^(Afilias Australia Pty Ltd)(.+)\n\n/)
@ast["field:disclaimer"] = _scan_lines_to_array(/(.+)(\n+)/).join("\n")
end
end
end

end
end
25 changes: 0 additions & 25 deletions lib/whois/scanners/whois.audns.net.au.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#status
%s == ["serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited"]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose that spec is outdated. Or it requires another domain.

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Domain Name: PINEWOOD.COM.AU
Registry Domain ID: D407400000001847702-AU
Registrar WHOIS Server: whois.synergywholesale.com
Registrar URL: whois.synergywholesale.com
Last Modified:
Registrar Name: Synergy Wholesale Pty Ltd
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +61.383999483
Reseller Name:
Status: serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited
Registrant Contact ID: NFVKTQY4FP7TA0W
Registrant Contact Name: EMIL ANDONOV
Tech Contact ID: NFSTGFPPDC0HFZ1Q
Tech Contact Name: EMIL ANDONOV
Name Server: DNS1.NETFLEET.COM.AU
Name Server IP: 202.191.63.6
Name Server: DNS2.NETFLEET.COM.AU
Name Server IP: 180.235.131.172
DNSSEC: unsigned
Registrant: Pacific Fund Pty Ltd
Registrant ID: ABN 75143185406
Eligibility Type: Company

>>> Last update of WHOIS database: 2018-08-07T21:25:00Z <<<



Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:

(a) querying the availability of a domain name licence;

(b) identifying the holder of a domain name licence; and/or

(c) contacting the holder of a domain name licence in relation to that domain name and its use.

The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:

(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;

(b) enabling the sending of unsolicited electronic communications; and / or

(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.

The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).
20 changes: 20 additions & 0 deletions spec/fixtures/responses/whois.auda.org.au/au/status_available.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
NOT FOUND
>>> Last update of WHOIS database: 2018-08-07T19:35:44Z <<<

Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:

(a) querying the availability of a domain name licence;

(b) identifying the holder of a domain name licence; and/or

(c) contacting the holder of a domain name licence in relation to that domain name and its use.

The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:

(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;

(b) enabling the sending of unsolicited electronic communications; and / or

(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.

The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@


#domain
%s == "google.com.au"
%s == "GOOGLE.COM.AU"

#domain_id
%s %ERROR{AttributeNotSupported}
%s == "D407400000001774763-AU"


#status
%s == ["clientDeleteProhibited", "clientUpdateProhibited", "serverDeleteProhibited (Protected by .auLOCKDOWN)", "serverUpdateProhibited (Protected by .auLOCKDOWN)"]
%s == [
"clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited",
"clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited",
"serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited",
"serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited",
"serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited"
]

#available?
%s == false
Expand All @@ -32,7 +38,7 @@

#registrar
%s %CLASS{registrar}
%s.name == "MarkMonitor Inc."
%s.name == "MarkMonitor Corporate Services Inc"
%s.organization == nil
%s.url == nil

Expand Down Expand Up @@ -84,10 +90,10 @@
%s %CLASS{array}
%s %SIZE{4}
%s[0] %CLASS{nameserver}
%s[0].name == "ns1.google.com"
%s[0].name == "NS1.GOOGLE.COM"
%s[1] %CLASS{nameserver}
%s[1].name == "ns2.google.com"
%s[1].name == "NS2.GOOGLE.COM"
%s[2] %CLASS{nameserver}
%s[2].name == "ns3.google.com"
%s[2].name == "NS3.GOOGLE.COM"
%s[3] %CLASS{nameserver}
%s[3].name == "ns4.google.com"
%s[3].name == "NS4.GOOGLE.COM"
49 changes: 49 additions & 0 deletions spec/fixtures/responses/whois.auda.org.au/au/status_registered.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Domain Name: GOOGLE.COM.AU
Registry Domain ID: D407400000001774763-AU
Registrar WHOIS Server:
Registrar URL:
Last Modified:
Registrar Name: MarkMonitor Corporate Services Inc
Registrar Abuse Contact Email:
Registrar Abuse Contact Phone:
Reseller Name:
Status: clientDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#clientDeleteProhibited
Status: clientUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#clientUpdateProhibited
Status: serverDeleteProhibited https://afilias.com.au/get-au/whois-status-codes#serverDeleteProhibited
Status: serverRenewProhibited https://afilias.com.au/get-au/whois-status-codes#serverRenewProhibited
Status: serverUpdateProhibited https://afilias.com.au/get-au/whois-status-codes#serverUpdateProhibited
Registrant Contact ID: MMR-122026
Registrant Contact Name: Domain Administrator
Tech Contact ID: MMR-87489
Tech Contact Name: DNS Admin
Name Server: NS1.GOOGLE.COM
Name Server: NS2.GOOGLE.COM
Name Server: NS3.GOOGLE.COM
Name Server: NS4.GOOGLE.COM
DNSSEC: unsigned
Registrant: Google INC
Eligibility Type: Trademark Owner
Eligibility Name: GOOGLE
Eligibility ID: TM 788234

>>> Last update of WHOIS database: 2018-08-07T19:34:09Z <<<



Afilias Australia Pty Ltd (Afilias), for itself and on behalf of .au Domain Administration Limited (auDA), makes the WHOIS registration data directory service (WHOIS Service) available solely for the purposes of:

(a) querying the availability of a domain name licence;

(b) identifying the holder of a domain name licence; and/or

(c) contacting the holder of a domain name licence in relation to that domain name and its use.

The WHOIS Service must not be used for any other purpose (even if that purpose is lawful), including:

(a) aggregating, collecting or compiling information from the WHOIS database, whether for personal or commercial purposes;

(b) enabling the sending of unsolicited electronic communications; and / or

(c) enabling high volume, automated, electronic processes that send queries or data to the systems of Afilias, any registrar, any domain name licence holder, or auDA.

The WHOIS Service is provided for information purposes only. By using the WHOIS Service, you agree to be bound by these terms and conditions. The WHOIS Service is operated in accordance with the auDA WHOIS Policy (available at https://www.auda.org.au/policies/index-of-published-policies/2014/2014-07/ ).

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion spec/tlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ at:
status_available: u34jedzcq.at
status_registered: google.at
au:
_server: whois.audns.net.au
_server: whois.auda.org.au
status_available: u34jedzcq.com.au
status_registered: google.com.au
_status_registered_skipdiff:
Expand Down
Loading