whois 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/CHANGELOG.rdoc +34 -0
  2. data/{License.txt → LICENSE.rdoc} +6 -1
  3. data/Manifest +53 -0
  4. data/README.rdoc +142 -0
  5. data/Rakefile +67 -0
  6. data/data/ip6_del_list +47 -0
  7. data/data/ip_del_list +226 -0
  8. data/data/make_ip6_del.pl +38 -0
  9. data/data/make_ip_del.pl +25 -0
  10. data/data/make_tld_serv.pl +22 -0
  11. data/data/tld_serv_list +366 -0
  12. data/lib/whois.rb +29 -155
  13. data/lib/whois/client.rb +57 -0
  14. data/lib/whois/definitions/ipv4.rb +210 -0
  15. data/lib/whois/definitions/ipv4.txt +209 -0
  16. data/lib/whois/definitions/ipv6.rb +32 -0
  17. data/lib/whois/definitions/ipv6.txt +32 -0
  18. data/lib/whois/definitions/tlds.rb +354 -0
  19. data/lib/whois/definitions/tlds.txt +354 -0
  20. data/lib/whois/errors.rb +70 -0
  21. data/lib/whois/server.rb +206 -0
  22. data/lib/whois/server/adapters/afilias.rb +36 -0
  23. data/lib/whois/server/adapters/arpa.rb +53 -0
  24. data/lib/whois/server/adapters/base.rb +67 -0
  25. data/lib/whois/server/adapters/formatted.rb +31 -0
  26. data/lib/whois/server/adapters/none.rb +31 -0
  27. data/lib/whois/server/adapters/not_implemented.rb +31 -0
  28. data/lib/whois/server/adapters/pir.rb +37 -0
  29. data/lib/whois/server/adapters/standard.rb +31 -0
  30. data/lib/whois/server/adapters/verisign.rb +36 -0
  31. data/lib/whois/server/adapters/web.rb +32 -0
  32. data/lib/whois/version.rb +27 -5
  33. data/lib/whois/whois.rb +191 -0
  34. data/tasks/server.rake +108 -0
  35. data/test/adapters/afilias_test.rb +26 -0
  36. data/test/adapters/none_test.rb +22 -0
  37. data/test/adapters/not_implemented_test.rb +16 -0
  38. data/test/adapters/pir_test.rb +26 -0
  39. data/test/adapters/standard_test.rb +23 -0
  40. data/test/adapters/verisign_test.rb +26 -0
  41. data/test/adapters/web_test.rb +17 -0
  42. data/test/client_test.rb +69 -0
  43. data/test/deprecated_test.rb +52 -0
  44. data/test/server_test.rb +59 -0
  45. data/test/test_helper.rb +32 -0
  46. data/test/testcases/referrals/afilias.bz.txt +40 -0
  47. data/test/testcases/referrals/crsnic.com.txt +210 -0
  48. data/test/testcases/referrals/niccc.cc.txt +59 -0
  49. data/test/testcases/referrals/pir.org.txt +84 -0
  50. data/test/testcases/responses/it.txt +52 -0
  51. data/test/whois_test.rb +10 -0
  52. data/utils/bm_shell_vs_pure.rb +14 -0
  53. data/utils/tlds.txt +318 -0
  54. data/whois.gemspec +41 -0
  55. metadata +137 -36
  56. data/CHANGELOG +0 -45
  57. data/EXAMPLES +0 -122
  58. data/NOTES +0 -47
  59. data/README +0 -36
  60. data/lib/whois/data/ipv4.yaml +0 -201
  61. data/lib/whois/data/ipv6.yaml +0 -33
  62. data/lib/whois/server/server.rb +0 -125
  63. data/test/example.rb +0 -110
  64. data/test/example.rbc +0 -0
  65. data/test/test_whois.rb +0 -176
data/CHANGELOG DELETED
@@ -1,45 +0,0 @@
1
- = Whois CHANGELOG
2
-
3
- == 0.4.2
4
-
5
- * Fixed bug #15959 (exception description fix needed)
6
- * Fixed bug #17655 (ipv4 yaml has blanks that can crush into a compile error)
7
- * Change Licence to GPL to MIT
8
-
9
- == 0.4.1
10
-
11
- * Update data of server whois
12
-
13
- == 0.4.0
14
-
15
- * Add new list of IPv4 by whois programm of Marco d'Itri
16
- * Fixed a bug of generate list of Ipv4-6. Now the search of good server is
17
- made by higher mask before smaller.
18
- * Add support of Ipv6, by IPAddr or String
19
- * Add several unittest of Whois class
20
- * Add Coverage of Code (89%)
21
- * No support of ToRedo (RFC 4773) and 6To4 (RFC 3056)
22
-
23
- == 0.3.0
24
-
25
- * Add possibility construct the Whois Object with a IPAddr object
26
-
27
- * Add the host information when you search a whois with an Ipv4.
28
- This information is optionnal. By default it's false.
29
- For that the host is resolv, the second arg to Whois.new must be true
30
-
31
- * Add request whois with a host String.
32
-
33
- == 0.2.1
34
-
35
- * Fix bug in gem where the data/ipv4.yaml is not load
36
- * Fix bug in gem where the link to require server was bad
37
- * Fix bad Name to server class
38
-
39
- == 0.2.0
40
-
41
- * Recode all class for check all IPv4 and search good Server
42
-
43
- == 0.1.0
44
-
45
- It's the Old version by Michael Neumann
data/EXAMPLES DELETED
@@ -1,122 +0,0 @@
1
- = Whois examples
2
-
3
- == Whois request for IP 72.14.207.99, with IP like a string
4
-
5
- require 'rubygems'
6
- require 'whois'
7
-
8
- w = Whois::Whois.new '72.14.207.99'
9
- w.search_whois
10
-
11
- # All return of request
12
- w.all
13
-
14
- # The ip return with object IPAddr
15
- w.ip
16
-
17
- # The server where the request has send
18
- w.server
19
-
20
- # The host of this IPv4
21
- w.host
22
-
23
- == Whois request for IP 72.14.207.99, with IP like a IPAddr instance
24
-
25
- require 'rubygems'
26
- require 'whois'
27
- require 'ipaddr'
28
-
29
- ip = IPAddr.new '72.17.207.99'
30
- w = Whois::Whois.new ip
31
- w.search_whois
32
-
33
- # All return of request
34
- w.all
35
-
36
- # The ip return with object IPAddr
37
- w.ip
38
-
39
- # The server where the request has send
40
- w.server
41
-
42
- # The host of this IPv4
43
- w.host
44
-
45
- == Whois request for IP 72.14.207.99 with resolv host
46
-
47
- require 'rubygems'
48
- require 'whois'
49
-
50
- w = Whois::Whois.new '72.14.221.147', true
51
- w.search_whois
52
-
53
- # All return of request
54
- w.all
55
-
56
- # The ip return with object IPAddr
57
- w.ip
58
-
59
- # The server where the request has send
60
- w.server
61
-
62
- # The host of this IPv4
63
- w.host #=> fg-in-f147.google.com
64
-
65
- == Whois request for a Host
66
-
67
- require 'rubygems'
68
- require 'whois'
69
-
70
- w = Whois::Whois.new 'fg-in-f147.google.com'
71
-
72
- # All return of request
73
- w.all
74
-
75
- # The ip return with object IPAddr
76
- w.ip
77
-
78
- # The server where the request has send
79
- w.server
80
-
81
- # The host of this host
82
- w.host #=> fg-in-f147.google.com
83
-
84
- == Whois request for a Ipv6 2001:0660:: like a String
85
-
86
- require 'rubygems'
87
- require 'whois'
88
-
89
- w = Whois::Whois.new '2001:0660::'
90
- w.search_whois
91
-
92
- # All return of request
93
- w.all
94
-
95
- # The ip return with object IPAddr
96
- w.ip
97
-
98
- # The server where the request has send
99
- w.server
100
-
101
- # The host of this host
102
- w.host #=> nil
103
-
104
- == Whois request for a Ipv6 2001:0660:: like an IPAddr Object
105
-
106
- require 'rubygems'
107
- require 'whois'
108
-
109
- w = Whois::Whois.new(IPAddr.new('2001:0660::'))
110
- w.search_whois
111
-
112
- # All return of request
113
- w.all
114
-
115
- # The ip return with object IPAddr
116
- w.ip
117
-
118
- # The server where the request has send
119
- w.server
120
-
121
- # The host of this host
122
- w.host #=> nil
data/NOTES DELETED
@@ -1,47 +0,0 @@
1
- = Whois Release Notes
2
-
3
- == 0.4.1
4
-
5
- It's just an update of data from Whois-4.7.24 [http://ftp.debian.org/debian/pool/main/w/whois/]
6
- of Marco D'ItrI
7
-
8
- == 0.4.0
9
-
10
- Now you can create a Whois Object with an object IPAddr (require 'ipaddr')
11
- for a Ipv6. You can create too with a String represent an IPV6.
12
-
13
- All system of Ipv6 is not supported now with 6to4 (RFC 3056) and TeRedo (RFC 4773)
14
-
15
- For the Ipv6 a bug must be made with creation of IPAddr like an Ipv6. If you have
16
- compile ruby with enable the Ipv6 Support like with several OS. If This Ipv6 hasn't
17
- a host, the IPAddr is not construct. I ask the
18
- question[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/11049]
19
- to Core Ruby.
20
-
21
- == 0.3.0
22
-
23
- Now you can create a Whois class with an object IPAddr (require 'ipaddr')
24
-
25
- You can obtains the host name for your IP when you made a request Ipv4. This
26
- resolv must be made if you put a true in second arguments for the initialize
27
-
28
- You can too made a request Whois with a host, now
29
-
30
- == 0.2.1
31
-
32
- Release for fix bugs
33
-
34
- == 0.2.0
35
-
36
- It's my first version. This version is base to code of Whois unix program in C of Marco d'Itri.
37
-
38
- In this programme a list of whois server is write and I create a parser for create a Yaml file
39
- with this list. The parser is parse_list.rb[link://util/parse_list.rb].
40
-
41
- The list of Whois Server, for each Ipv4 is in ipv4.yaml[link://lib/data/ipv4.yaml]. A Ruby Class
42
- exist for all Whois Server check in this Yaml file. All Server are in server.rb[link://lib/server/server.rb]
43
-
44
- == 0.1.O
45
-
46
- It's the old version by Michael Neumann. Thank to him.
47
- If you see his work, check out his class[link://old/whois.rb]
data/README DELETED
@@ -1,36 +0,0 @@
1
- = Whois
2
-
3
- Whois is a class for obtains information on whois with an Ipv4, Ipv6 and host.
4
- This class send a whois-query to whois suitable server.
5
- After parse information must be return
6
-
7
- This library is start with work to Michael Neumann. Thank to him.
8
-
9
- == Dependencies
10
-
11
- * ruby 1.8.2
12
-
13
- == Examples
14
-
15
- If you are just starting, check out the EXAMPLES[link://files/EXAMPLES.html] file.
16
-
17
- == Test
18
-
19
- This Class is test by Unit test with 8 tests and 53 assertions. You can see
20
- the Coverage[link://../coverage/index.html] of this class.
21
-
22
- == Authors
23
-
24
- Copyright (c) 2007 by Cyril Mougel (cyril.mougel@gmail.com)
25
-
26
- If you want more information on me see my blog[http://blog.shingara.fr/],
27
- it's in french, because my english is not really good.
28
-
29
- == License
30
-
31
- This code is free to use under the terms of the MIT license.
32
-
33
- == Thanks
34
-
35
- This project is host by RubyForge[http://rubyforge.org], the {project
36
- page}[http://rubyforge.org/projects/whois] is on.
@@ -1,201 +0,0 @@
1
- ---
2
- 222.96.0.0/12: Nicor
3
- 218.160.0.0/12: Twnic
4
- 209.94.192.0/19: Lacnic
5
- 155.232.0.0/13: Afrinic
6
- 164.146.0.0/15: Afrinic
7
- 202.16.0.0/14: Nicad
8
- 218.216.0.0/13: Nicad
9
- 202.0.0.0/7: Apnic
10
- 192.71.0.0/16: Ripe
11
- 61.112.0.0/12: Nicad
12
- 141.64.0.0/12: Ripe
13
- 43.0.0.0/8: V6nic
14
- 211.112.0.0/13: Nicor
15
- 211.20.0.0/15: Twnic
16
- 202.224.0.0/11: Nicad
17
- 151.100.0.0/16: Ripe
18
- 160.124.0.0/16: Afrinic
19
- 214.0.0.0/7: Arin
20
- 210.242.0.0/15: Twnic
21
- 186.0.0.0/7: Lacnic
22
- 61.192.0.0/12: Nicad
23
- 163.156.0.0/14: Ripe
24
- 171.16.0.0/12: Ripe
25
- 200.128.0.0/9: Nicbr
26
- 219.96.0.0/11: Nicad
27
- 149.240.0.0/13: Ripe
28
- 164.0.0.0/11: Ripe
29
- 151.0.0.0/10: Ripe
30
- 192.72.253.0/24: Arin
31
- 221.144.0.0/12: Nicor
32
- 203.66.0.0/16: Twnic
33
- 202.11.0.0/16: Nicad
34
- 0.0.0.0/1: Arin
35
- 149.248.0.0/14: Ripe
36
- 59.0.0.0/11: Nicor
37
- 41.0.0.0/8: Afrinic
38
- 149.204.0.0/16: Ripe
39
- 218.232.0.0/13: Nicor
40
- 218.224.0.0/13: Nicad
41
- 210.248.0.0/13: Nicad
42
- 210.204.0.0/14: Nicor
43
- 116.0.0.0/6: Apnic
44
- 202.24.0.0/15: Nicad
45
- 200.0.0.0/7: Lacnic
46
- 200.17.0.0/16: Nicbr
47
- 125.128.0.0/11: Nicor
48
- 150.254.0.0/16: Ripe
49
- 164.32.0.0/13: Ripe
50
- 211.192.0.0/10: Nicor
51
- 203.69.0.0/16: Twnic
52
- 192.118.0.0/16: Ripe
53
- 202.39.128.0/17: Twnic
54
- 220.149.0.0/16: Nicor
55
- 212.0.0.0/7: Ripe
56
- 211.128.0.0/13: Nicad
57
- 211.120.0.0/13: Nicad
58
- 210.71.128.0/16: Twnic
59
- 203.140.0.0/15: Nicad
60
- 96.0.0.0/3:
61
- 196.0.0.0/6: Arin
62
- 192.164.0.0/14: Ripe
63
- 165.144.0.0/14: Afrinic
64
- 155.240.0.0/16: Afrinic
65
- 218.36.0.0/14: Nicor
66
- 213.154.64.0/19: Afrinic
67
- 210.240.0.0/16: Twnic
68
- 210.128.0.0/11: Nicad
69
- 210.59.128.0/17: Twnic
70
- 223.0.0.0/8:
71
- 219.248.0.0/13: Nicor
72
- 211.72.0.0/16: Twnic
73
- 203.74.0.0/15: Twnic
74
- 203.0.0.0/10: Apnic
75
- 196.0.0.0/8: Afrinic
76
- 149.202.0.0/15: Ripe
77
- 210.241.224.0/19: Twnic
78
- 96.0.0.0/6: Arin
79
- 171.32.0.0/15: Ripe
80
- 220.64.0.0/11: Nicor
81
- 219.240.0.0/15: Nicor
82
- 210.0.0.0/7: Apnic
83
- 211.16.0.0/14: Nicad
84
- 210.92.0.0/14: Nicor
85
- 202.32.0.0/14: Nicad
86
- 114.0.0.0/7: Apnic
87
- 220.103.0.0/16: Nicor
88
- 211.75.0.0/16: Twnic
89
- 202.20.128.0/17: Nicor
90
- 208.0.0.0/7: Arin
91
- 202.48.0.0/16: Nicad
92
- 163.200.0.0/14: Afrinic
93
- 61.208.0.0/13: Nicad
94
- 139.24.0.0/14: Ripe
95
- 62.0.0.0/8: Ripe
96
- 222.232.0.0/13: Nicor
97
- 61.84.0.0/15: Nicor
98
- 194.0.0.0/7: Ripe
99
- 126.0.0.0/8: Apnic
100
- 150.183.0.0/16: Nicor
101
- 141.80.0.0/14: Ripe
102
- 163.195.0.0/16: Afrinic
103
- 160.115.0.0/16: Afrinic
104
- 211.32.0.0/11: Nicor
105
- 192.72.0.0/16: Apnic
106
- 164.40.0.0/16: Ripe
107
- 210.61.0.0/16: Twnic
108
- 160.120.0.0/14: Afrinic
109
- 221.160.0.0/13: Nicor
110
- 160.44.0.0/14: Ripe
111
- 151.96.0.0/14: Ripe
112
- 220.0.0.0/6: Apnic
113
- 222.112.0.0/13: Nicor
114
- 220.104.0.0/13: Nicad
115
- 203.136.0.0/14: Nicad
116
- 149.208.0.0/12: Ripe
117
- 141.0.0.0/10: Ripe
118
- 192.116.0.0/15: Ripe
119
- 192.106.0.0/16: Ripe
120
- 202.30.0.0/15: Nicor
121
- 60.0.0.0/7: Apnic
122
- 200.18.0.0/15: Nicbr
123
- 160.220.0.0/16: Ripe
124
- 124.0.0.0/7: Apnic
125
- 58.0.0.0/7: Apnic
126
- 218.0.0.0/7: Apnic
127
- 204.0.0.0/14: Ginntt
128
- 193.0.0.0/8: Ripe
129
- 200.20.0.0/16: Nicbr
130
- 192.162.0.0/16: Ripe
131
- 202.15.0.0/16: Nicad
132
- 163.196.0.0/14: Afrinic
133
- 222.122.0.0/16: Nicor
134
- 221.138.0.0/13: Nicor
135
- 121.128.0.0/10: Nicor
136
- 211.0.0.0/12: Nicad
137
- 210.241.0.0/15: Twnic
138
- 210.216.0.0/13: Nicor
139
- 61.72.0.0/13: Nicor
140
- 80.0.0.0/4: Ripe
141
- 192.114.0.0/15: Ripe
142
- 210.188.0.0/14: Nicad
143
- 210.178.0.0/15: Nicor
144
- 210.90.0.0/15: Nicor
145
- 203.180.0.0/14: Nicad
146
- 202.208.0.0/12: Nicad
147
- 146.48.0.0/16: Ripe
148
- 163.160.0.0/12: Ripe
149
- 192.72.254.0/24: Arin
150
- 213.154.32.0/19: Afrinic
151
- 211.168.0.0/13: Nicor
152
- 211.22.0.0/16: Twnic
153
- 210.180.0.0/14: Nicor
154
- 139.28.0.0/15: Ripe
155
- 165.148.0.0/15: Afrinic
156
- 222.120.0.0/15: Nicor
157
- 220.96.0.0/14: Nicad
158
- 216.0.0.0/8: Arin
159
- 210.96.0.0/11: Nicor
160
- 192.0.0.0/8: Arin
161
- 133.0.0.0/8: Nicad
162
- 149.206.0.0/15: Ripe
163
- 160.116.0.0/14: Afrinic
164
- 218.144.0.0/12: Nicor
165
- 217.0.0.0/8: Ripe
166
- 210.224.0.0/12: Nicad
167
- 210.160.0.0/12: Nicad
168
- 210.65.0.0/16: Twnic
169
- 160.216.0.0/14: Ripe
170
- 164.148.0.0/14: Afrinic
171
- 189.0.0.0/8: Lacnic
172
- 202.23.0.0/16: Nicad
173
- 145.0.0.0/8: Ripe
174
- 204.0.0.0/6: Arin
175
- 165.143.0.0/16: Afrinic
176
- 169.208.0.0/12: Apnic
177
- 211.104.0.0/13: Nicor
178
- 210.196.0.0/14: Nicad
179
- 24.132.0.0/14: Ripe
180
- 149.224.0.0/12: Ripe
181
- 202.26.0.0/16: Nicad
182
- 218.48.0.0/13: Nicor
183
- 218.40.0.0/13: Nicad
184
- 211.176.0.0/12: Nicor
185
- 203.178.0.0/15: Nicad
186
- 139.20.0.0/14: Ripe
187
- 151.64.0.0/11: Ripe
188
- 190.0.0.0/8: Lacnic
189
- 200.96.0.0/13: Nicbr
190
- 61.80.0.0/14: Nicor
191
- 164.128.0.0/12: Ripe
192
- 160.48.0.0/12: Ripe
193
- 128.0.0.0/2: Arin
194
- 141.84.0.0/15: Ripe
195
- 210.62.252.0/22: Twnic
196
- 203.224.0.0/11: Nicor
197
- 77.0.0.0/8: Ripe
198
- 120.0.0.0/6: Apnic
199
- 188.0.0.0/8: Ripe
200
- 202.13.0.0/16: Nicad
201
- 78.0.0.0/7: Ripe