whois 4.0.6 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +12 -0
  3. data/.github/dependabot.yml +17 -0
  4. data/.github/workflows/release.yml +19 -0
  5. data/.github/workflows/tests.yml +29 -0
  6. data/.gitignore +11 -0
  7. data/.rspec +1 -0
  8. data/.rubocop.yml +27 -0
  9. data/.rubocop_opinionated.yml +115 -0
  10. data/.rubocop_todo.yml +89 -0
  11. data/.simplecov +6 -0
  12. data/.tool-versions +1 -0
  13. data/CHANGELOG.md +147 -44
  14. data/CONTRIBUTING.md +18 -6
  15. data/Gemfile +8 -0
  16. data/LICENSE.txt +1 -1
  17. data/README.md +4 -4
  18. data/Rakefile +28 -0
  19. data/SECURITY.md +24 -0
  20. data/bin/console +1 -0
  21. data/bin/whoisrb +6 -5
  22. data/data/ipv4.json +1 -3
  23. data/data/tld.json +125 -1049
  24. data/lib/whois/client.rb +5 -7
  25. data/lib/whois/errors.rb +4 -6
  26. data/lib/whois/record/part.rb +5 -6
  27. data/lib/whois/record.rb +5 -8
  28. data/lib/whois/server/adapters/afilias.rb +4 -5
  29. data/lib/whois/server/adapters/arin.rb +7 -8
  30. data/lib/whois/server/adapters/arpa.rb +19 -24
  31. data/lib/whois/server/adapters/base.rb +29 -46
  32. data/lib/whois/server/adapters/formatted.rb +4 -6
  33. data/lib/whois/server/adapters/none.rb +4 -6
  34. data/lib/whois/server/adapters/not_implemented.rb +4 -6
  35. data/lib/whois/server/adapters/standard.rb +4 -6
  36. data/lib/whois/server/adapters/verisign.rb +4 -5
  37. data/lib/whois/server/adapters/web.rb +4 -6
  38. data/lib/whois/server/socket_handler.rb +11 -12
  39. data/lib/whois/server.rb +73 -64
  40. data/lib/whois/version.rb +4 -2
  41. data/lib/whois.rb +32 -33
  42. data/spec/fixtures/referrals/afilias.bz.txt +23 -0
  43. data/spec/fixtures/referrals/arin_referral_apnic.txt +78 -0
  44. data/spec/fixtures/referrals/arin_referral_missing.txt +52 -0
  45. data/spec/fixtures/referrals/arin_referral_ripe.txt +50 -0
  46. data/spec/fixtures/referrals/arin_referral_rwhois.txt +63 -0
  47. data/spec/fixtures/referrals/arin_referral_servernap.txt +63 -0
  48. data/spec/fixtures/referrals/arin_referral_whois.txt +56 -0
  49. data/spec/fixtures/referrals/crsnic.com.txt +60 -0
  50. data/spec/fixtures/referrals/crsnic.com_referral.txt +56 -0
  51. data/spec/fixtures/referrals/crsnic.com_referral_missing.txt +50 -0
  52. data/spec/integration/whois_spec.rb +73 -0
  53. data/spec/spec_helper.rb +19 -0
  54. data/spec/support/helpers/connectivity_helper.rb +15 -0
  55. data/spec/support/helpers/spec_helper.rb +31 -0
  56. data/spec/whois/client_spec.rb +143 -0
  57. data/spec/whois/record/part_spec.rb +38 -0
  58. data/spec/whois/record_spec.rb +168 -0
  59. data/spec/whois/server/adapters/afilias_spec.rb +49 -0
  60. data/spec/whois/server/adapters/arin_spec.rb +83 -0
  61. data/spec/whois/server/adapters/arpa_spec.rb +29 -0
  62. data/spec/whois/server/adapters/base_spec.rb +155 -0
  63. data/spec/whois/server/adapters/formatted_spec.rb +53 -0
  64. data/spec/whois/server/adapters/none_spec.rb +23 -0
  65. data/spec/whois/server/adapters/not_implemented_spec.rb +24 -0
  66. data/spec/whois/server/adapters/standard_spec.rb +42 -0
  67. data/spec/whois/server/adapters/verisign_spec.rb +60 -0
  68. data/spec/whois/server/adapters/web_spec.rb +24 -0
  69. data/spec/whois/server/socket_handler_spec.rb +33 -0
  70. data/spec/whois/server_spec.rb +302 -0
  71. data/spec/whois/web_interface_error_spec.rb +23 -0
  72. data/spec/whois/whois_spec.rb +15 -0
  73. data/utils/compare-whois.rb +30 -0
  74. data/utils/deftld.rb +230 -0
  75. data/utils/defutils.rb +26 -0
  76. data/utils/fixupd.rb +60 -0
  77. data/utils/matrix.rb +68 -0
  78. data/utils/mkwhois.rb +31 -0
  79. data/whois.gemspec +19 -32
  80. metadata +58 -11
  81. data/4.0-Upgrade.md +0 -143
  82. data/bin/setup +0 -8
@@ -0,0 +1,52 @@
1
+ #
2
+ # The following results may also be obtained via:
3
+ # http://whois.arin.net/rest/nets;q=4.2.2.1?showDetails=true&showARIN=false&ext=netref2
4
+ #
5
+
6
+ NetRange: 4.0.0.0 - 4.255.255.255
7
+ CIDR: 4.0.0.0/8
8
+ OriginAS:
9
+ NetName: LVLT-ORG-4-8
10
+ NetHandle: NET-4-0-0-0-1
11
+ Parent:
12
+ NetType: Direct Allocation
13
+ RegDate: 1992-12-01
14
+ Updated: 2012-02-24
15
+ Ref: http://whois.arin.net/rest/net/NET-4-0-0-0-1
16
+
17
+
18
+ OrgName: Level 3 Communications, Inc.
19
+ OrgId: LVLT
20
+ Address: 1025 Eldorado Blvd.
21
+ City: Broomfield
22
+ StateProv: CO
23
+ PostalCode: 80021
24
+ Country: US
25
+ RegDate: 1998-05-22
26
+ Updated: 2012-01-30
27
+ Comment: ADDRESSES WITHIN THIS BLOCK ARE NON-PORTABLE
28
+ Ref: http://whois.arin.net/rest/org/LVLT
29
+
30
+ OrgTechHandle: IPADD5-ARIN
31
+ OrgTechName: ipaddressing
32
+ OrgTechPhone: +1-877-453-8353
33
+ OrgTechEmail: ipaddressing@level3.com
34
+ OrgTechRef: http://whois.arin.net/rest/poc/IPADD5-ARIN
35
+
36
+ OrgNOCHandle: NOCSU27-ARIN
37
+ OrgNOCName: NOC Support
38
+ OrgNOCPhone: +1-877-453-8353
39
+ OrgNOCEmail: noc.coreip@level3.com
40
+ OrgNOCRef: http://whois.arin.net/rest/poc/NOCSU27-ARIN
41
+
42
+ OrgAbuseHandle: APL8-ARIN
43
+ OrgAbuseName: Abuse POC LVLT
44
+ OrgAbusePhone: +1-877-453-8353
45
+ OrgAbuseEmail: security@level3.com
46
+ OrgAbuseRef: http://whois.arin.net/rest/poc/APL8-ARIN
47
+
48
+ #
49
+ # ARIN WHOIS data and services are subject to the Terms of Use
50
+ # available at: https://www.arin.net/whois_tou.html
51
+ #
52
+
@@ -0,0 +1,50 @@
1
+ % This is the RIPE Database query service.
2
+ % The objects are in RPSL format.
3
+ %
4
+ % The RIPE Database is subject to Terms and Conditions.
5
+ % See http://www.ripe.net/db/support/db-terms-conditions.pdf
6
+
7
+ % Note: this output has been filtered.
8
+ % To receive output for a database update, use the "-B" flag.
9
+
10
+ % Information related to '128.79.0.0 - 128.79.63.0'
11
+
12
+ inetnum: 128.79.0.0 - 128.79.63.0
13
+ netname: BOUYGTEL-ISP-CABLE
14
+ descr: Pool for Broadband CABLE customers
15
+ remarks: INFRA-AW
16
+ country: FR
17
+ admin-c: NOCB1-RIPE
18
+ tech-c: NOCB1-RIPE
19
+ status: ASSIGNED PA
20
+ mnt-by: BYTEL-MNT
21
+ mnt-lower: BYTEL-MNT
22
+ mnt-routes: BYTEL-MNT
23
+ source: RIPE # Filtered
24
+
25
+ role: Network Operation Centre Bouygues Telecom FAI
26
+ remarks: Bouygues Telecom ISP
27
+ address: Bouygues Telecom
28
+ address: 13-15 avenue du Marechal Juin
29
+ address: 92366 Meudon-la-Foret cedex
30
+ address: France
31
+ abuse-mailbox: abuse_box@bouyguestelecom.fr
32
+ admin-c: LH761-RIPE
33
+ admin-c: FT4354-RIPE
34
+ tech-c: LH761-RIPE
35
+ tech-c: FT4354-RIPE
36
+ nic-hdl: NOCB1-RIPE
37
+ mnt-by: BYTEL-MNT
38
+ source: RIPE # Filtered
39
+
40
+ % Information related to '128.78.0.0/15AS5410'
41
+
42
+ route: 128.78.0.0/15
43
+ descr: BOUYGUES Telecom ISP Wireline
44
+ origin: AS5410
45
+ mnt-by: BYTEL-MNT
46
+ source: RIPE # Filtered
47
+
48
+ % This query was served by the RIPE Database Query Service version 1.66.3 (WHOIS2)
49
+
50
+
@@ -0,0 +1,63 @@
1
+
2
+ #
3
+ # ARIN WHOIS data and services are subject to the Terms of Use
4
+ # available at: https://www.arin.net/whois_tou.html
5
+ #
6
+
7
+
8
+ #
9
+ # The following results may also be obtained via:
10
+ # http://whois.arin.net/rest/nets;q=69.65.39.166?showDetails=true&showARIN=false&ext=netref2
11
+ #
12
+
13
+ NetRange: 69.65.0.0 - 69.65.63.255
14
+ CIDR: 69.65.0.0/18
15
+ OriginAS: AS32181
16
+ NetName: IPNAP
17
+ NetHandle: NET-69-65-0-0-1
18
+ Parent: NET-69-0-0-0-0
19
+ NetType: Direct Allocation
20
+ Comment: www.gigenet.com
21
+ RegDate: 2003-07-30
22
+ Updated: 2013-05-09
23
+ Ref: http://whois.arin.net/rest/net/NET-69-65-0-0-1
24
+
25
+ OrgName: GigeNET
26
+ OrgId: DMPL
27
+ Address: 545 E Algonquin Rd
28
+ Address: Suite D
29
+ City: Arlington Heights
30
+ StateProv: IL
31
+ PostalCode: 60005
32
+ Country: US
33
+ RegDate: 2011-03-04
34
+ Updated: 2011-06-23
35
+ Comment: http://www.gigenet.com
36
+ Ref: http://whois.arin.net/rest/org/DMPL
37
+
38
+ ReferralServer: rwhois://rwhois.servernap.net:4321
39
+
40
+ OrgAbuseHandle: ABUSE2935-ARIN
41
+ OrgAbuseName: Abuse Department
42
+ OrgAbusePhone: +1-800-561-2656
43
+ OrgAbuseEmail: abuse@gigenet.com
44
+ OrgAbuseRef: http://whois.arin.net/rest/poc/ABUSE2935-ARIN
45
+
46
+ OrgNOCHandle: IPADM152-ARIN
47
+ OrgNOCName: IP Administrator
48
+ OrgNOCPhone: +1-800-561-2656
49
+ OrgNOCEmail: ip-admin@coloquest.com
50
+ OrgNOCRef: http://whois.arin.net/rest/poc/IPADM152-ARIN
51
+
52
+ OrgTechHandle: IPADM152-ARIN
53
+ OrgTechName: IP Administrator
54
+ OrgTechPhone: +1-800-561-2656
55
+ OrgTechEmail: ip-admin@coloquest.com
56
+ OrgTechRef: http://whois.arin.net/rest/poc/IPADM152-ARIN
57
+
58
+
59
+ #
60
+ # ARIN WHOIS data and services are subject to the Terms of Use
61
+ # available at: https://www.arin.net/whois_tou.html
62
+ #
63
+
@@ -0,0 +1,63 @@
1
+
2
+ #
3
+ # ARIN WHOIS data and services are subject to the Terms of Use
4
+ # available at: https://www.arin.net/whois_tou.html
5
+ #
6
+
7
+
8
+ #
9
+ # The following results may also be obtained via:
10
+ # http://whois.arin.net/rest/nets;q=69.65.39.166?showDetails=true&showARIN=false&ext=netref2
11
+ #
12
+
13
+ NetRange: 69.65.0.0 - 69.65.63.255
14
+ CIDR: 69.65.0.0/18
15
+ OriginAS: AS32181
16
+ NetName: IPNAP
17
+ NetHandle: NET-69-65-0-0-1
18
+ Parent: NET-69-0-0-0-0
19
+ NetType: Direct Allocation
20
+ Comment: www.gigenet.com
21
+ RegDate: 2003-07-30
22
+ Updated: 2013-05-09
23
+ Ref: http://whois.arin.net/rest/net/NET-69-65-0-0-1
24
+
25
+ OrgName: GigeNET
26
+ OrgId: DMPL
27
+ Address: 545 E Algonquin Rd
28
+ Address: Suite D
29
+ City: Arlington Heights
30
+ StateProv: IL
31
+ PostalCode: 60005
32
+ Country: US
33
+ RegDate: 2011-03-04
34
+ Updated: 2011-06-23
35
+ Comment: http://www.gigenet.com
36
+ Ref: http://whois.arin.net/rest/org/DMPL
37
+
38
+ ReferralServer: rwhois://rwhois.servernap.net:4321
39
+
40
+ OrgAbuseHandle: ABUSE2935-ARIN
41
+ OrgAbuseName: Abuse Department
42
+ OrgAbusePhone: +1-800-561-2656
43
+ OrgAbuseEmail: abuse@gigenet.com
44
+ OrgAbuseRef: http://whois.arin.net/rest/poc/ABUSE2935-ARIN
45
+
46
+ OrgNOCHandle: IPADM152-ARIN
47
+ OrgNOCName: IP Administrator
48
+ OrgNOCPhone: +1-800-561-2656
49
+ OrgNOCEmail: ip-admin@coloquest.com
50
+ OrgNOCRef: http://whois.arin.net/rest/poc/IPADM152-ARIN
51
+
52
+ OrgTechHandle: IPADM152-ARIN
53
+ OrgTechName: IP Administrator
54
+ OrgTechPhone: +1-800-561-2656
55
+ OrgTechEmail: ip-admin@coloquest.com
56
+ OrgTechRef: http://whois.arin.net/rest/poc/IPADM152-ARIN
57
+
58
+
59
+ #
60
+ # ARIN WHOIS data and services are subject to the Terms of Use
61
+ # available at: https://www.arin.net/whois_tou.html
62
+ #
63
+
@@ -0,0 +1,56 @@
1
+ #
2
+ # Query terms are ambiguous. The query is assumed to be:
3
+ # "n 130.66.76.222"
4
+ #
5
+ # Use "?" to get help.
6
+ #
7
+
8
+ #
9
+ # The following results may also be obtained via:
10
+ # http://whois.arin.net/rest/nets;q=130.66.76.222?showDetails=true&showARIN=false&ext=netref2
11
+ #
12
+
13
+ NetRange: 130.66.0.0 - 130.67.255.255
14
+ CIDR: 130.66.0.0/15
15
+ OriginAS:
16
+ NetName: RIPE-ERX-130-66-0-0
17
+ NetHandle: NET-130-66-0-0-1
18
+ Parent: NET-130-0-0-0-0
19
+ NetType: Early Registrations, Transferred to RIPE NCC
20
+ Comment: These addresses have been further assigned to users in
21
+ Comment: the RIPE NCC region. Contact information can be found in
22
+ Comment: the RIPE database at http://www.ripe.net/whois
23
+ RegDate: 2003-11-12
24
+ Updated: 2003-11-12
25
+ Ref: http://whois.arin.net/rest/net/NET-130-66-0-0-1
26
+
27
+ OrgName: RIPE Network Coordination Centre
28
+ OrgId: RIPE
29
+ Address: P.O. Box 10096
30
+ City: Amsterdam
31
+ StateProv:
32
+ PostalCode: 1001EB
33
+ Country: NL
34
+ RegDate:
35
+ Updated: 2011-09-24
36
+ Ref: http://whois.arin.net/rest/org/RIPE
37
+
38
+ ReferralServer: whois://whois.ripe.net:43
39
+
40
+ OrgAbuseHandle: RNO29-ARIN
41
+ OrgAbuseName: RIPE NCC Operations
42
+ OrgAbusePhone: +31 20 535 4444
43
+ OrgAbuseEmail: hostmaster@ripe.net
44
+ OrgAbuseRef: http://whois.arin.net/rest/poc/RNO29-ARIN
45
+
46
+ OrgTechHandle: RNO29-ARIN
47
+ OrgTechName: RIPE NCC Operations
48
+ OrgTechPhone: +31 20 535 4444
49
+ OrgTechEmail: hostmaster@ripe.net
50
+ OrgTechRef: http://whois.arin.net/rest/poc/RNO29-ARIN
51
+
52
+ #
53
+ # ARIN WHOIS data and services are subject to the Terms of Use
54
+ # available at: https://www.arin.net/whois_tou.html
55
+ #
56
+
@@ -0,0 +1,60 @@
1
+ Domain Name: GOOGLE.COM
2
+ Registry Domain ID: 2138514_DOMAIN_COM-VRSN
3
+ Registrar WHOIS Server: whois.markmonitor.com
4
+ Registrar URL: http://www.markmonitor.com
5
+ Updated Date: 2011-07-20T16:55:31Z
6
+ Creation Date: 1997-09-15T04:00:00Z
7
+ Registry Expiry Date: 2020-09-14T04:00:00Z
8
+ Registrar: MarkMonitor Inc.
9
+ Registrar IANA ID: 292
10
+ Registrar Abuse Contact Email: abusecomplaints@markmonitor.com
11
+ Registrar Abuse Contact Phone: +1.2083895740
12
+ Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
13
+ Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
14
+ Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
15
+ Domain Status: serverDeleteProhibited https://icann.org/epp#serverDeleteProhibited
16
+ Domain Status: serverTransferProhibited https://icann.org/epp#serverTransferProhibited
17
+ Domain Status: serverUpdateProhibited https://icann.org/epp#serverUpdateProhibited
18
+ Name Server: NS1.GOOGLE.COM
19
+ Name Server: NS2.GOOGLE.COM
20
+ Name Server: NS3.GOOGLE.COM
21
+ Name Server: NS4.GOOGLE.COM
22
+ DNSSEC: unsigned
23
+ URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
24
+ >>> Last update of whois database: 2017-07-27T09:05:12Z <<<
25
+
26
+ For more information on Whois status codes, please visit https://icann.org/epp
27
+
28
+ NOTICE: The expiration date displayed in this record is the date the
29
+ registrar's sponsorship of the domain name registration in the registry is
30
+ currently set to expire. This date does not necessarily reflect the expiration
31
+ date of the domain name registrant's agreement with the sponsoring
32
+ registrar. Users may consult the sponsoring registrar's Whois database to
33
+ view the registrar's reported date of expiration for this registration.
34
+
35
+ TERMS OF USE: You are not authorized to access or query our Whois
36
+ database through the use of electronic processes that are high-volume and
37
+ automated except as reasonably necessary to register domain names or
38
+ modify existing registrations; the Data in VeriSign Global Registry
39
+ Services' ("VeriSign") Whois database is provided by VeriSign for
40
+ information purposes only, and to assist persons in obtaining information
41
+ about or related to a domain name registration record. VeriSign does not
42
+ guarantee its accuracy. By submitting a Whois query, you agree to abide
43
+ by the following terms of use: You agree that you may use this Data only
44
+ for lawful purposes and that under no circumstances will you use this Data
45
+ to: (1) allow, enable, or otherwise support the transmission of mass
46
+ unsolicited, commercial advertising or solicitations via e-mail, telephone,
47
+ or facsimile; or (2) enable high volume, automated, electronic processes
48
+ that apply to VeriSign (or its computer systems). The compilation,
49
+ repackaging, dissemination or other use of this Data is expressly
50
+ prohibited without the prior written consent of VeriSign. You agree not to
51
+ use electronic processes that are automated and high-volume to access or
52
+ query the Whois database except as reasonably necessary to register
53
+ domain names or modify existing registrations. VeriSign reserves the right
54
+ to restrict your access to the Whois database in its sole discretion to ensure
55
+ operational stability. VeriSign may restrict or terminate your access to the
56
+ Whois database for failure to abide by these terms of use. VeriSign
57
+ reserves the right to modify these terms at any time.
58
+
59
+ The Registry database contains ONLY .COM, .NET, .EDU domains and
60
+ Registrars.
@@ -0,0 +1,56 @@
1
+ Domain Name: SIMONECARLETTI.COM
2
+ Registry Domain ID: 190944418_DOMAIN_COM-VRSN
3
+ Registrar WHOIS Server: whois.enom.com
4
+ Registrar URL: http://www.enom.com
5
+ Updated Date: 2017-06-30T07:40:47Z
6
+ Creation Date: 2005-07-29T18:06:26Z
7
+ Registry Expiry Date: 2018-07-29T18:06:26Z
8
+ Registrar: eNom, Inc.
9
+ Registrar IANA ID: 48
10
+ Registrar Abuse Contact Email:
11
+ Registrar Abuse Contact Phone:
12
+ Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
13
+ Name Server: NS1.DNSIMPLE.COM
14
+ Name Server: NS2.DNSIMPLE.COM
15
+ Name Server: NS3.DNSIMPLE.COM
16
+ Name Server: NS4.DNSIMPLE.COM
17
+ DNSSEC: signedDelegation
18
+ DNSSEC DS Data: 49279 8 2 2CA00478371FEA679FD902ECF47D4B2941383E460BA14FFCABBB160C14FEF369
19
+ URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf/
20
+ >>> Last update of whois database: 2017-07-27T09:06:28Z <<<
21
+
22
+ For more information on Whois status codes, please visit https://icann.org/epp
23
+
24
+ NOTICE: The expiration date displayed in this record is the date the
25
+ registrar's sponsorship of the domain name registration in the registry is
26
+ currently set to expire. This date does not necessarily reflect the expiration
27
+ date of the domain name registrant's agreement with the sponsoring
28
+ registrar. Users may consult the sponsoring registrar's Whois database to
29
+ view the registrar's reported date of expiration for this registration.
30
+
31
+ TERMS OF USE: You are not authorized to access or query our Whois
32
+ database through the use of electronic processes that are high-volume and
33
+ automated except as reasonably necessary to register domain names or
34
+ modify existing registrations; the Data in VeriSign Global Registry
35
+ Services' ("VeriSign") Whois database is provided by VeriSign for
36
+ information purposes only, and to assist persons in obtaining information
37
+ about or related to a domain name registration record. VeriSign does not
38
+ guarantee its accuracy. By submitting a Whois query, you agree to abide
39
+ by the following terms of use: You agree that you may use this Data only
40
+ for lawful purposes and that under no circumstances will you use this Data
41
+ to: (1) allow, enable, or otherwise support the transmission of mass
42
+ unsolicited, commercial advertising or solicitations via e-mail, telephone,
43
+ or facsimile; or (2) enable high volume, automated, electronic processes
44
+ that apply to VeriSign (or its computer systems). The compilation,
45
+ repackaging, dissemination or other use of this Data is expressly
46
+ prohibited without the prior written consent of VeriSign. You agree not to
47
+ use electronic processes that are automated and high-volume to access or
48
+ query the Whois database except as reasonably necessary to register
49
+ domain names or modify existing registrations. VeriSign reserves the right
50
+ to restrict your access to the Whois database in its sole discretion to ensure
51
+ operational stability. VeriSign may restrict or terminate your access to the
52
+ Whois database for failure to abide by these terms of use. VeriSign
53
+ reserves the right to modify these terms at any time.
54
+
55
+ The Registry database contains ONLY .COM, .NET, .EDU domains and
56
+ Registrars.
@@ -0,0 +1,50 @@
1
+
2
+ Whois Server Version 2.0
3
+
4
+ Domain names in the .com and .net domains can now be registered
5
+ with many different competing registrars. Go to http://www.internic.net
6
+ for detailed information.
7
+
8
+ Domain Name: VRSN-20100925-DNSSECMONITOR86.NET
9
+ Registrar: VERISIGN GLOBAL REGISTRY SERVICES TEST
10
+ Name Server: NS1.DNSSECTESTHOST.CC
11
+ Status: ok
12
+ Updated Date: 25-sep-2010
13
+ Creation Date: 25-sep-2010
14
+ Expiration Date: 25-sep-2011
15
+
16
+ >>> Last update of whois database: Thu, 04 Aug 2011 14:27:39 UTC <<<
17
+
18
+ NOTICE: The expiration date displayed in this record is the date the
19
+ registrar's sponsorship of the domain name registration in the registry is
20
+ currently set to expire. This date does not necessarily reflect the expiration
21
+ date of the domain name registrant's agreement with the sponsoring
22
+ registrar. Users may consult the sponsoring registrar's Whois database to
23
+ view the registrar's reported date of expiration for this registration.
24
+
25
+ TERMS OF USE: You are not authorized to access or query our Whois
26
+ database through the use of electronic processes that are high-volume and
27
+ automated except as reasonably necessary to register domain names or
28
+ modify existing registrations; the Data in VeriSign Global Registry
29
+ Services' ("VeriSign") Whois database is provided by VeriSign for
30
+ information purposes only, and to assist persons in obtaining information
31
+ about or related to a domain name registration record. VeriSign does not
32
+ guarantee its accuracy. By submitting a Whois query, you agree to abide
33
+ by the following terms of use: You agree that you may use this Data only
34
+ for lawful purposes and that under no circumstances will you use this Data
35
+ to: (1) allow, enable, or otherwise support the transmission of mass
36
+ unsolicited, commercial advertising or solicitations via e-mail, telephone,
37
+ or facsimile; or (2) enable high volume, automated, electronic processes
38
+ that apply to VeriSign (or its computer systems). The compilation,
39
+ repackaging, dissemination or other use of this Data is expressly
40
+ prohibited without the prior written consent of VeriSign. You agree not to
41
+ use electronic processes that are automated and high-volume to access or
42
+ query the Whois database except as reasonably necessary to register
43
+ domain names or modify existing registrations. VeriSign reserves the right
44
+ to restrict your access to the Whois database in its sole discretion to ensure
45
+ operational stability. VeriSign may restrict or terminate your access to the
46
+ Whois database for failure to abide by these terms of use. VeriSign
47
+ reserves the right to modify these terms at any time.
48
+
49
+ The Registry database contains ONLY .COM, .NET, .EDU domains and
50
+ Registrars.
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+
5
+ describe Whois do
6
+ let(:response) { "Domain: example.it\nStatus: AVAILABLE\n" }
7
+
8
+ describe "Basic WHOIS querying and parsing" do
9
+ it "queries and returns a record" do
10
+ with_definitions do
11
+ Whois::Server.define(:tld, "it", "whois.nic.it")
12
+ expect(Whois::Server::Adapters::Standard.query_handler).to receive(:call)
13
+ .with("example.it", "whois.nic.it", 43)
14
+ .and_return(response)
15
+
16
+ record = described_class.lookup("example.it")
17
+
18
+ expect(record).to be_a(Whois::Record)
19
+ # expect(record.available?).to be_truthy
20
+ # expect(record.registered?).to be_falsey
21
+
22
+ # expect(record.parser).to be_a(Whois::Record::Parser)
23
+ # expect(record.parser.parsers.first).to be_a(Whois::Record::Parser::WhoisNicIt)
24
+ end
25
+ end
26
+ end
27
+
28
+ describe "Passing :bind_host and :bind_port options" do
29
+ it "binds the WHOIS query to given host and port" do
30
+ with_definitions do
31
+ Whois::Server.define(:tld, "it", "whois.nic.it")
32
+ expect(Whois::Server::Adapters::Standard.query_handler).to receive(:call)
33
+ .with("example.it", "whois.nic.it", 43, "192.168.1.1", 3000)
34
+ .and_return(response)
35
+
36
+ client = Whois::Client.new(bind_host: "192.168.1.1", bind_port: 3000)
37
+ client.lookup("example.it")
38
+ end
39
+ end
40
+ end
41
+
42
+ describe "Passing :bind_port options" do
43
+ it "binds the WHOIS query to given port and defaults host" do
44
+ with_definitions do
45
+ Whois::Server.define(:tld, "it", "whois.nic.it")
46
+ expect(Whois::Server::Adapters::Standard.query_handler).to receive(:call)
47
+ .with("example.it", "whois.nic.it", 43, Whois::Server::Adapters::Base::DEFAULT_BIND_HOST, 3000)
48
+ .and_return(response)
49
+
50
+ client = Whois::Client.new(bind_port: 3000)
51
+ client.lookup("example.it")
52
+ end
53
+ end
54
+ end
55
+
56
+ describe "Passing :host options" do
57
+ it "forces the WHOIS query to given host" do
58
+ with_definitions do
59
+ Whois::Server.define(:tld, "it", "whois.nic.it")
60
+ expect(Whois::Server::Adapters::Standard.query_handler).to receive(:call)
61
+ .with("example.it", "whois.example.com", 43)
62
+ .and_return(response)
63
+
64
+ client = Whois::Client.new(host: "whois.example.com")
65
+ record = client.lookup("example.it")
66
+
67
+ expect(record.parts.size).to eq(1)
68
+ expect(record.parts.first.body).to eq(response)
69
+ expect(record.parts.first.host).to eq("whois.example.com")
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rspec"
4
+ require "whois"
5
+
6
+ SPEC_ROOT = File.expand_path(__dir__) unless defined?(SPEC_ROOT)
7
+
8
+ # The fixtures are UTF-8 encoded.
9
+ # Make sure Ruby uses the proper encoding.
10
+ Encoding.default_external = Encoding::UTF_8
11
+ Encoding.default_internal = Encoding::UTF_8
12
+
13
+ # Requires supporting ruby files with custom matchers and macros, etc,
14
+ # in spec/support/ and its subdirectories.
15
+ Dir[File.join(SPEC_ROOT, "support/**/*.rb")].each { |f| require f }
16
+
17
+ RSpec.configure do |config|
18
+ config.mock_with :rspec
19
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RSpecSupportConnectivityHelpers
4
+ def need_connectivity
5
+ yield if connectivity_available?
6
+ end
7
+
8
+ def connectivity_available?
9
+ ENV["ONLINE"].to_i == 1
10
+ end
11
+ end
12
+
13
+ RSpec.configure do |config|
14
+ config.extend RSpecSupportConnectivityHelpers
15
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RSpecSupportSpecHelpers
4
+ def fixture(*names)
5
+ File.join(SPEC_ROOT, "fixtures", *names)
6
+ end
7
+
8
+ private
9
+
10
+ # Temporary resets Server @@definitions
11
+ # to let the test setup a custom definition list.
12
+ def with_definitions
13
+ definitions_setup
14
+ yield
15
+ ensure
16
+ definitions_teardown
17
+ end
18
+
19
+ def definitions_setup
20
+ @_definitions = Whois::Server.send :instance_variable_get, :@definitions
21
+ Whois::Server.clear_definitions
22
+ end
23
+
24
+ def definitions_teardown
25
+ Whois::Server.send :instance_variable_set, :@definitions, @_definitions
26
+ end
27
+ end
28
+
29
+ RSpec.configure do |config|
30
+ config.include RSpecSupportSpecHelpers
31
+ end