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

Add support for whois.ilait.com #79

Open
wants to merge 4 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
56 changes: 56 additions & 0 deletions lib/whois/parsers/whois.ilait.com.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
# Copyright (c) 2009-2018 Simone Carletti <[email protected]>
#++


require_relative 'base_icann_compliant'


module Whois
class Parsers

class WhoisIlaitCom < BaseIcannCompliant
self.scanner = Scanners::BaseIcannCompliant, {
pattern_available: /^NOT FOUND\n/
}

property_supported :registrant_contacts do
build_contact("Registrant", Parser::Contact::TYPE_REGISTRANT)
end

property_supported :admin_contacts do
build_contact("Admin", Parser::Contact::TYPE_ADMINISTRATIVE)
end

property_supported :technical_contacts do
build_contact("Tech", Parser::Contact::TYPE_TECHNICAL)
end

private

def build_contact(element, type)
node("#{element} Name") do
Parser::Contact.new(
type: type,
id: node("#{element} ID").presence,
name: value_for_property(element, 'Name'),
organization: value_for_property(element, 'Organization'),
address: value_for_property(element, 'Street'),
city: value_for_property(element, 'City'),
zip: value_for_property(element, 'Postal Code'),
state: value_for_property(element, 'State/Province'),
country_code: value_for_property(element, 'Country'),
phone: value_for_phone_property(element, 'Phone'),
fax: value_for_phone_property(element, 'Fax'),
email: value_for_property(element, 'Email')
)
end
end

end
end
end
42 changes: 42 additions & 0 deletions spec/fixtures/responses/whois.ilait.com/status_available.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#domain
%s == nil

#domain_id
%s == nil

#status
%s == :available

#available?
%s == true

#registered?
%s == false

#created_on
%s == nil

#updated_on
%s == nil

#expires_on
%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 == []
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NOT FOUND
98 changes: 98 additions & 0 deletions spec/fixtures/responses/whois.ilait.com/status_registered.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
#domain
%s == "ilait.com"

#domain_id
%s == "564826693_DOMAIN_COM-VRSN"


#status
%s == :registered

#available?
%s == false

#registered?
%s == true


#created_on
%s %CLASS{time}
%s %TIME{2006-08-22 15:43:04 UTC}

#updated_on
%s %CLASS{time}
%s %TIME{2014-09-17 14:09:03 UTC}

#expires_on
%s %CLASS{time}
%s %TIME{2019-08-22 15:43:04 UTC}


#registrar
%s %CLASS{registrar}
%s.id == "1493"
%s.name == "ilait AB"
%s.organization == "ilait AB"
%s.url == "http://www.ilait.se"


#registrant_contacts
%s %CLASS{array}
%s %SIZE{1}
%s[0] %CLASS{contact}
%s[0].type == Whois::Parser::Contact::TYPE_REGISTRANT
%s[0].name == "ilait Registry"
%s[0].organization == "ilait AB"
%s[0].address == "Truckgatan 13"
%s[0].city == "Kungälv"
%s[0].zip == "44240"
%s[0].state == ""
%s[0].country_code == "SE"
%s[0].phone == "+46.313522300"
%s[0].fax == "+46.313522301"
%s[0].email == "[email protected]"

#admin_contacts
%s %CLASS{array}
%s %SIZE{1}
%s[0] %CLASS{contact}
%s[0].type == Whois::Parser::Contact::TYPE_ADMINISTRATIVE
%s[0].name == "ilait Registry"
%s[0].organization == "ilait AB"
%s[0].address == "Truckgatan 13"
%s[0].city == "Kungälv"
%s[0].zip == "44240"
%s[0].state == ""
%s[0].country_code == "SE"
%s[0].phone == "+46.313522300"
%s[0].fax == "+46.313522301"
%s[0].email == "[email protected]"

#technical_contacts
%s %CLASS{array}
%s %SIZE{1}
%s[0] %CLASS{contact}
%s[0].type == Whois::Parser::Contact::TYPE_TECHNICAL
%s[0].name == "ilait Registry"
%s[0].organization == "ilait AB"
%s[0].address == "Truckgatan 13"
%s[0].city == "Kungälv"
%s[0].zip == "44240"
%s[0].state == ""
%s[0].country_code == "SE"
%s[0].phone == "+46.313522300"
%s[0].fax == "+46.313522301"
%s[0].email == "[email protected]"


#nameservers
%s %CLASS{array}
%s %SIZE{4}
%s[0] %CLASS{nameserver}
%s[0].name == "ns1.ilait.se"
%s[1] %CLASS{nameserver}
%s[1].name == "ns2.ilait.se"
%s[2] %CLASS{nameserver}
%s[2].name == "ns3.ilait.se"
%s[3] %CLASS{nameserver}
%s[3].name == "ns4.ilait.se"
127 changes: 127 additions & 0 deletions spec/fixtures/responses/whois.ilait.com/status_registered.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
Domain Name: ILAIT.COM
Registry Domain ID: 564826693_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.ilait.com
Registrar URL: http://www.ilait.se
Updated Date: 2012-09-05T06:43:44Z
Creation Date: 2006-08-22T15:43:04Z
Registry Expiry Date: 2019-08-22T15:43:04Z
Registrar: ilait AB
Registrar IANA ID: 1493
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +46.313522300
Domain Status: ok https://icann.org/epp#ok
Name Server: NS1.ILAIT.SE
Name Server: NS2.ILAIT.SE
Name Server: NS3.ILAIT.SE
Name Server: NS4.ILAIT.SE
DNSSEC: unsigned
URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
>>> Last update of whois database: 2018-04-27T09:37:35Z <<<

For more information on Whois status codes, please visit https://icann.org/epp

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar. Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

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
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: 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 VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability. VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.
Domain Name: ilait.com
Registry Domain ID: 564826693_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.ilait.com
Registrar URL: http://www.ilait.se
Updated Date: 2014-09-17T14:09:03Z
Creation Date: 2006-08-22T15:43:04Z
Registrar Registration Expiration Date: 2019-08-22T15:43:04Z
Registrar: ilait AB
Registrar IANA ID: 1493
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +46.313522300
Reseller:
Domain Status: ok https://icann.org/epp#ok
Registry Registrant ID:
Registrant Name: ilait Registry
Registrant Organization: ilait AB
Registrant Street: Truckgatan 13
Registrant City: Kungälv
Registrant State/Province:
Registrant Postal Code: 44240
Registrant Country: SE
Registrant Phone: +46.313522300
Registrant Phone Ext:
Registrant Fax: +46.313522301
Registrant Fax Ext:
Registrant Email: [email protected]
Registry Admin ID:
Admin Name: ilait Registry
Admin Organization: ilait AB
Admin Street: Truckgatan 13
Admin City: Kungälv
Admin State/Province:
Admin Postal Code: 44240
Admin Country: SE
Admin Phone: +46.313522300
Admin Phone Ext:
Admin Fax: +46.313522301
Admin Fax Ext:
Admin Email: [email protected]
Registry Tech ID:
Tech Name: ilait Registry
Tech Organization: ilait AB
Tech Street: Truckgatan 13
Tech City: Kungälv
Tech State/Province:
Tech Postal Code: 44240
Tech Country: SE
Tech Phone: +46.313522300
Tech Phone Ext:
Tech Fax: +46.313522301
Tech Fax Ext:
Tech Email: [email protected]
Name Server: ns1.ilait.se
Name Server: ns2.ilait.se
Name Server: ns3.ilait.se
Name Server: ns4.ilait.se
DNSSEC: unsigned
URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/
>>> Last update of WHOIS database: 2018-04-27T09:37:54Z <<<

For more information on Whois status codes, please visit https://icann.org/epp

NOTE: By submitting a WHOIS query, you agree to abide by the following
NOTE: terms of use: You agree that you may use this data only for lawful
NOTE: purposes and that under no circumstances will you use this data to:
NOTE: (1) allow, enable, or otherwise support the transmission of mass
NOTE: unsolicited, commercial advertising or solicitations via direct mail,
NOTE: e-mail, telephone, or facsimile; or (2) enable high volume, automated,
NOTE: electronic processes that apply to ilait (or its computer systems).
NOTE: The compilation, repackaging, dissemination or other use of this data
NOTE: is expressly prohibited without the prior written consent of ilait.
NOTE: All information is provided "as is" without accuracy guarantees.
Loading