whois 3.5.7 → 3.5.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ca7b0f2d8ec9478c35b771b92c391d502d3fdad
4
- data.tar.gz: 8b30418c6f10a88bb85af114dfacf25cf6b453db
3
+ metadata.gz: 341a7f023044c61c123a8da6620da15cc4c3111f
4
+ data.tar.gz: e3b305a477a62108a8b2139d02fb94515e309b1b
5
5
  SHA512:
6
- metadata.gz: b0073cde2f240c73f2d772b1424f684d2576754b7497c12ac1a353166e0331baf0a28ffcff7c06f626c70d9201cc7377f0ae83f6473c444480ae7da375279414
7
- data.tar.gz: 8c7ab0c12cff3d82550ea9841009f7947ba6ae9343c2c959d884082c9f467fdd34c19a6382eb8eb13b0336a275d8887cc0cce310222a9bee59031d9938d5e927
6
+ metadata.gz: 92c5a8701fe1ba781449e445810cf567cec8a2f84cd5049e2c888978689d290db7910c97bd5c37c0c8ec6af81d4f86a1af76d0f679a82fa9d7f2bea3410b9748
7
+ data.tar.gz: a1093adff3a70dd5458223329dca8230b90ae99d26e3c8c857e02f88c0e7c8f139db5be361d892f5fa4870665ff0b80b3624b653af01a42d661696d5d9c2ef13
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+
4
+ #### Release 3.5.8
5
+
6
+ - SERVER: Create .FIRMDALE, .MADRID, .XN--FLW351E, .XN--QCKA1PMC, .LDS, .MORMON
7
+
8
+ - SERVER: Update .TC
9
+
10
+ - NEW: whois.registry.om now recognizes reserved domains (GH-332). [Thanks @case]
11
+
12
+ - FIXED: Fixed invalid JSON definition file (GH-349).
13
+
14
+ - FIXED: Fixed the ARIN referral regex to correctly consider ports optional (GH-350). [Thanks @jrideout]
15
+
16
+
3
17
  #### Release 3.5.7
4
18
 
5
19
  - SERVER: Updated .AW, .BW, .GQ, .MK, .ML, .MZ, .PF, .VU, .ZM, .KIWI, .CAREER, .REISE, .VERSICHERUNG, .HOST, .PRESS, .HAMBURG, .BRUSSELS, .VLAANDEREN
File without changes
@@ -1,64 +1,3 @@
1
1
  #!/usr/bin/env ruby -w
2
2
 
3
- $:.unshift(File.expand_path("../../lib", __FILE__))
4
-
5
- require 'optparse'
6
- require 'whois'
7
-
8
-
9
- options = {}
10
- OptionParser.new do |opts|
11
- opts.banner = "Whois: an intelligent pure Ruby Whois client"
12
- opts.define_head "Usage: ruby-whois [options] object"
13
- opts.separator ""
14
- opts.separator "Examples:"
15
- opts.separator " ruby-whois ruby-lang.com"
16
- opts.separator " ruby-whois 213.149.247.64"
17
- opts.separator ""
18
- opts.separator "Options:"
19
-
20
- opts.on("-t", "--timeout [SECONDS]", Integer, "set the timeout") do |seconds|
21
- options[:timeout] = seconds
22
- end
23
-
24
- opts.on("-h", "--host [HOST]", String, "connect to server HOST") do |host|
25
- options[:host] = host
26
- end
27
-
28
- opts.on("--[no-]referral", "skip referral queries") do |boolean|
29
- options[:referral] = boolean
30
- end
31
-
32
- opts.on_tail("--help", "show this help and exit") do
33
- puts opts
34
- exit
35
- end
36
-
37
- opts.on_tail("--version", "output version information and exit") do
38
- puts "ruby-whois #{Whois::VERSION}"
39
- exit
40
- end
41
-
42
- begin
43
- opts.parse!
44
- rescue OptionParser::ParseError
45
- puts opts
46
- exit 1
47
- end
48
-
49
- if ARGV.size.zero?
50
- puts opts
51
- exit 1
52
- end
53
- end
54
-
55
- object = ARGV.shift
56
-
57
- begin
58
- @client = Whois::Client.new(options)
59
- puts @client.lookup(object)
60
- rescue Whois::Error => e
61
- abort(e.message)
62
- rescue Timeout::Error
63
- abort("Request Timeout")
64
- end
3
+ load File.join(File.expand_path("../", __FILE__), "whoisrb")
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env ruby -w
2
+
3
+ $:.unshift(File.expand_path("../../lib", __FILE__))
4
+
5
+ require 'optparse'
6
+ require 'whois'
7
+
8
+
9
+ options = {}
10
+ OptionParser.new do |opts|
11
+ opts.banner = "Whois: an intelligent pure Ruby Whois client"
12
+ opts.define_head "Usage: ruby-whois [options] object"
13
+ opts.separator ""
14
+ opts.separator "Examples:"
15
+ opts.separator " ruby-whois ruby-lang.com"
16
+ opts.separator " ruby-whois 213.149.247.64"
17
+ opts.separator ""
18
+ opts.separator "Options:"
19
+
20
+ opts.on("-t", "--timeout [SECONDS]", Integer, "set the timeout") do |seconds|
21
+ options[:timeout] = seconds
22
+ end
23
+
24
+ opts.on("-h", "--host [HOST]", String, "connect to server HOST") do |host|
25
+ options[:host] = host
26
+ end
27
+
28
+ opts.on("--[no-]referral", "skip referral queries") do |boolean|
29
+ options[:referral] = boolean
30
+ end
31
+
32
+ opts.on_tail("--help", "show this help and exit") do
33
+ puts opts
34
+ exit
35
+ end
36
+
37
+ opts.on_tail("--version", "output version information and exit") do
38
+ puts "ruby-whois #{Whois::VERSION}"
39
+ exit
40
+ end
41
+
42
+ begin
43
+ opts.parse!
44
+ rescue OptionParser::ParseError
45
+ puts opts
46
+ exit 1
47
+ end
48
+
49
+ if ARGV.size.zero?
50
+ puts opts
51
+ exit 1
52
+ end
53
+ end
54
+
55
+ object = ARGV.shift
56
+
57
+ begin
58
+ @client = Whois::Client.new(options)
59
+ puts @client.lookup(object)
60
+ rescue Whois::Error => e
61
+ abort(e.message)
62
+ rescue Timeout::Error
63
+ abort("Request Timeout")
64
+ end
@@ -981,7 +981,7 @@
981
981
  "adapter": "none"
982
982
  },
983
983
  ".tc": {
984
- "host": "whois.meridiantld.net"
984
+ "host": "whois.nic.tc"
985
985
  },
986
986
  ".td": {
987
987
  "host": null,
@@ -1186,7 +1186,7 @@
1186
1186
  ".agency": {
1187
1187
  "host": "whois.donuts.co"
1188
1188
  },
1189
- ".bar": { // centralnic
1189
+ ".bar": {
1190
1190
  "host": "whois.nic.bar"
1191
1191
  },
1192
1192
  ".bargains": {
@@ -1618,7 +1618,7 @@
1618
1618
  ".wien": {
1619
1619
  "host": "whois.nic.wien"
1620
1620
  },
1621
- ".wiki": { // centralnic
1621
+ ".wiki": {
1622
1622
  "host": "whois.nic.wiki"
1623
1623
  },
1624
1624
  ".works": {
@@ -1684,7 +1684,7 @@
1684
1684
  ".xn--zfr164b": {
1685
1685
  "host": "whois.conac.cn"
1686
1686
  },
1687
- ".xyz": { // centralnic
1687
+ ".xyz": {
1688
1688
  "host": "whois.nic.xyz"
1689
1689
  },
1690
1690
  ".zone": {
@@ -2002,10 +2002,10 @@
2002
2002
  ".mortgage": {
2003
2003
  "host": "whois.rightside.co"
2004
2004
  },
2005
- ".space": { // centralnic
2005
+ ".space": {
2006
2006
  "host": "whois.nic.space"
2007
2007
  },
2008
- ".website": { // centralnic
2008
+ ".website": {
2009
2009
  "host": "whois.nic.website"
2010
2010
  },
2011
2011
  ".attorney": {
@@ -2110,7 +2110,7 @@
2110
2110
  ".ovh": {
2111
2111
  "host": "whois-ovh.nic.fr"
2112
2112
  },
2113
- ".physio": { // aridnrs
2113
+ ".physio": {
2114
2114
  "host": "whois.nic.physio"
2115
2115
  },
2116
2116
  ".bmw": {
@@ -2467,6 +2467,24 @@
2467
2467
  ".work": {
2468
2468
  "host": "whois-dub.mm-registry.com"
2469
2469
  },
2470
+ ".firmdale": {
2471
+ "host": "whois.nic.firmdale"
2472
+ },
2473
+ ".madrid": {
2474
+ "host": "whois.madrid.rs.corenic.net"
2475
+ },
2476
+ ".xn--flw351e": {
2477
+ "host": "domain-registry-whois.l.google.com"
2478
+ },
2479
+ ".xn--qcka1pmc": {
2480
+ "host": "domain-registry-whois.l.google.com"
2481
+ },
2482
+ ".lds": {
2483
+ "host": "whois.afilias-srs.net"
2484
+ },
2485
+ ".mormon": {
2486
+ "host": "whois.afilias-srs.net"
2487
+ },
2470
2488
 
2471
2489
  ".xn--3e0b707e": {
2472
2490
  "host": "whois.kr"
@@ -35,15 +35,19 @@ module Whois
35
35
 
36
36
 
37
37
  property_supported :status do
38
- Array.wrap(node("Status"))
38
+ if respond_to?(:reserved?) && reserved?
39
+ :reserved
40
+ else
41
+ Array.wrap(node("Status"))
42
+ end
39
43
  end
40
44
 
41
45
  property_supported :available? do
42
- !!node('status:available')
46
+ !(respond_to?(:reserved?) && reserved?) && !!node('status:available')
43
47
  end
44
48
 
45
49
  property_supported :registered? do
46
- !available?
50
+ !(respond_to?(:reserved?) && reserved?) && !available?
47
51
  end
48
52
 
49
53
 
@@ -51,7 +51,7 @@ module Whois
51
51
  end
52
52
 
53
53
  property_supported :registered? do
54
- !available?
54
+ !(respond_to?(:reserved?) && reserved?) && !available?
55
55
  end
56
56
 
57
57
 
@@ -14,12 +14,12 @@ module Whois
14
14
  class Record
15
15
  class Parser
16
16
 
17
- # Parser for the whois.meridiantld.net server.
17
+ # Parser for the whois.nic.tc server.
18
18
  #
19
19
  # @see Whois::Record::Parser::Example
20
20
  # The Example parser for the list of all available methods.
21
21
  #
22
- class WhoisMeridiantldNet < BaseCocca2
22
+ class WhoisNicTc < BaseCocca2
23
23
  end
24
24
 
25
25
  end
@@ -20,9 +20,21 @@ module Whois
20
20
  # The Example parser for the list of all available methods.
21
21
  #
22
22
  class WhoisRegistryOm < BaseShared1
23
+
24
+ self.scanner = Scanners::BaseShared1, {
25
+ pattern_reserved: /^Restricted\n/
26
+ }
27
+
28
+
23
29
  property_supported :updated_on do
24
30
  node("Last Modified") { |value| Time.parse(value) }
25
31
  end
32
+
33
+
34
+ def reserved?
35
+ !!node('status:reserved')
36
+ end
37
+
26
38
  end
27
39
 
28
40
  end
@@ -19,6 +19,7 @@ module Whois
19
19
  self.tokenizers += [
20
20
  :skip_empty_line,
21
21
  :scan_available,
22
+ :scan_reserved,
22
23
  :scan_keyvalue,
23
24
  ]
24
25
 
@@ -29,6 +30,12 @@ module Whois
29
30
  end
30
31
  end
31
32
 
33
+ tokenizer :scan_reserved do
34
+ if settings[:pattern_reserved] && @input.scan(settings[:pattern_reserved])
35
+ @ast["status:reserved"] = true
36
+ end
37
+ end
38
+
32
39
  end
33
40
 
34
41
  end
@@ -38,7 +38,7 @@ module Whois
38
38
  private
39
39
 
40
40
  def extract_referral(response)
41
- return unless response =~ /ReferralServer:\s*r?whois:\/\/([\w\.]+):?(\d+)/
41
+ return unless response =~ /ReferralServer:\s*r?whois:\/\/([\w.-]+)(?::(\d+))?/
42
42
  {
43
43
  host: $1,
44
44
  port: $2 ? $2.to_i : nil
@@ -13,7 +13,7 @@ module Whois
13
13
  module Version
14
14
  MAJOR = 3
15
15
  MINOR = 5
16
- PATCH = 7
16
+ PATCH = 8
17
17
  BUILD = nil
18
18
 
19
19
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join(".")
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: whois 3.5.6 ruby lib
2
+ # stub: whois 3.5.7 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "whois"
6
- s.version = "3.5.6"
6
+ s.version = "3.5.7"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Simone Carletti"]
11
- s.date = "2014-11-10"
11
+ s.date = "2014-11-16"
12
12
  s.description = "Whois is an intelligent WHOIS client and parser written in pure Ruby. It can query registry data for IPv4, IPv6 and top level domains, parse and convert responses into easy-to-use Ruby objects."
13
13
  s.email = ["weppos@weppos.net"]
14
14
  s.executables = ["ruby-whois"]
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.post_install_message = "********************************************************************************\n\n Thank you for installing the whois gem!\n\n If you like this gem, please support the project.\n http://pledgie.com/campaigns/11383\n\n Does your project or organization use this gem? Add it to the apps wiki.\n https://github.com/weppos/whois/wiki/apps\n\n Are you looking for a quick and convenient way to perform WHOIS queries?\n Check out RoboWhois WHOIS API.\n https://www.robowhois.com/\n\n********************************************************************************\n"
19
19
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
20
20
  s.rubyforge_project = "whois"
21
- s.rubygems_version = "2.2.2"
21
+ s.rubygems_version = "2.4.4"
22
22
  s.summary = "An intelligent pure Ruby WHOIS client and parser."
23
23
 
24
24
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whois
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.7
4
+ version: 3.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simone Carletti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-16 00:00:00.000000000 Z
11
+ date: 2014-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -86,15 +86,17 @@ description: Whois is an intelligent WHOIS client and parser written in pure Rub
86
86
  email:
87
87
  - weppos@weppos.net
88
88
  executables:
89
+ - whoisrb
89
90
  - ruby-whois
90
91
  extensions: []
91
92
  extra_rdoc_files: []
92
93
  files:
93
94
  - ".yardopts"
94
- - CHANGELOG.md
95
+ - CHANGELOG.markdown
95
96
  - LICENSE.txt
96
- - README.md
97
+ - README.markdown
97
98
  - bin/ruby-whois
99
+ - bin/whoisrb
98
100
  - data/asn16.json
99
101
  - data/asn32.json
100
102
  - data/ipv4.json
@@ -193,7 +195,6 @@ files:
193
195
  - lib/whois/record/parser/whois.kenic.or.ke.rb
194
196
  - lib/whois/record/parser/whois.kr.rb
195
197
  - lib/whois/record/parser/whois.markmonitor.com.rb
196
- - lib/whois/record/parser/whois.meridiantld.net.rb
197
198
  - lib/whois/record/parser/whois.monic.mo.rb
198
199
  - lib/whois/record/parser/whois.museum.rb
199
200
  - lib/whois/record/parser/whois.na-nic.com.na.rb
@@ -263,6 +264,7 @@ files:
263
264
  - lib/whois/record/parser/whois.nic.sn.rb
264
265
  - lib/whois/record/parser/whois.nic.so.rb
265
266
  - lib/whois/record/parser/whois.nic.st.rb
267
+ - lib/whois/record/parser/whois.nic.tc.rb
266
268
  - lib/whois/record/parser/whois.nic.tel.rb
267
269
  - lib/whois/record/parser/whois.nic.tl.rb
268
270
  - lib/whois/record/parser/whois.nic.tm.rb