dnsruby 1.36 → 1.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/demo/axfr.rb +16 -0
  2. data/demo/check_soa.rb +17 -0
  3. data/demo/check_zone.rb +16 -0
  4. data/demo/digdlv.rb +16 -0
  5. data/demo/digitar.rb +16 -0
  6. data/demo/digroot.rb +92 -0
  7. data/demo/example_recurse.rb +16 -0
  8. data/demo/mresolv.rb +17 -0
  9. data/demo/mx.rb +16 -0
  10. data/demo/rubydig.rb +16 -0
  11. data/demo/trace_dns.rb +16 -0
  12. data/html/created.rid +1 -1
  13. data/html/fr_class_index.html +0 -6
  14. data/html/fr_method_index.html +332 -348
  15. data/lib/Dnsruby/Cache.rb +18 -1
  16. data/lib/Dnsruby/iana_ports.rb +17 -1
  17. data/lib/Dnsruby/key_cache.rb +16 -0
  18. data/lib/Dnsruby/resource/delete_me.rhtml +6 -0
  19. data/lib/Dnsruby/select_thread.rb.michael.rb +602 -0
  20. data/lib/Dnsruby/single_verifier.rb +17 -0
  21. data/lib/Dnsruby/validator_thread.rb +16 -0
  22. data/lib/Dnsruby/zone_transfer.rb +16 -0
  23. data/test/resolv.conf +16 -1
  24. data/test/tc_auth.rb +49 -0
  25. data/test/tc_cache.rb +16 -0
  26. data/test/tc_dlv.rb +16 -0
  27. data/test/tc_dnskey.rb +16 -0
  28. data/test/tc_ds.rb +16 -0
  29. data/test/tc_itar.rb +16 -0
  30. data/test/tc_nsec.rb +16 -0
  31. data/test/tc_nsec3.rb +16 -0
  32. data/test/tc_nsec3param.rb +16 -0
  33. data/test/tc_queue.rb +16 -0
  34. data/test/tc_recur.rb +16 -0
  35. data/test/tc_rrset.rb +16 -0
  36. data/test/tc_rrsig.rb +16 -0
  37. data/test/tc_soak_base.rb +16 -0
  38. data/test/tc_validator.rb +16 -0
  39. data/test/tc_verifier.rb +16 -0
  40. data/test/ts_queue.rb +3 -0
  41. metadata +7 -7
  42. data/lib/Dnsruby/event_machine_interface.rb +0 -266
  43. data/test/tc_event_machine_deferrable.rb +0 -85
  44. data/test/tc_event_machine_res.rb +0 -174
  45. data/test/tc_event_machine_single_res.rb +0 -101
  46. data/test/tc_event_machine_soak.rb +0 -98
data/demo/axfr.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  #= NAME
2
18
  #
3
19
  #axfr - Perform a DNS zone transfer
data/demo/check_soa.rb CHANGED
@@ -1,3 +1,20 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
17
+
1
18
  #= NAME
2
19
  #
3
20
  #check_soa - Check a domain's nameservers
data/demo/check_zone.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  #= NAME
2
18
  #
3
19
  #check_zone - Check a DNS zone for errors
data/demo/digdlv.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  #= NAME
2
18
  #
3
19
  #digdlv - Ruby script to perform DNS queries, validated against the ISC DLV
data/demo/digitar.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  #= NAME
2
18
  #
3
19
  #digitar - Ruby script to perform DNS queries, validated against the IANA TAR
data/demo/digroot.rb ADDED
@@ -0,0 +1,92 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
17
+ #= NAME
18
+ #
19
+ #digitar - Ruby script to perform DNS queries, validated against the IANA TAR
20
+ #(trust anchor repository).
21
+ #
22
+ #= SYNOPSIS
23
+ #
24
+ #digitar name [ type [ class ] ]
25
+ #
26
+ #= DESCRIPTION
27
+ #
28
+ #Performs a DNS query on the given name. The record type
29
+ #and class can also be specified; if left blank they default
30
+ #to A and IN. The program firstly performs the requested DNS
31
+ # query. The response is then validated
32
+ #- the ITAR is searched for the keys of the closest ancestor
33
+ #of the query name, and the chain of trust is followed to prove
34
+ #that the DNSSEC records are correct, or that we do not expect the
35
+ #response to be signed.
36
+ #
37
+ #= AUTHOR
38
+ #
39
+ #Michael Fuhr <mike@fuhr.org>
40
+ #Alex D <alexd@nominet.org.uk>
41
+
42
+ require 'rubygems'
43
+ require 'dnsruby'
44
+ include Dnsruby
45
+
46
+ raise RuntimeError, "Usage: #{$0} name [ type [ class ] ]\n" unless (ARGV.length >= 1) && (ARGV.length <= 3)
47
+
48
+ #hints = ["208.77.188.32", "204.61.216.37", "208.78.70.92", "204.13.250.92", " 208.78.71.92", "204.13.251.92"]
49
+ hints = ["root.iana.org"]
50
+ r = Resolver.new({:nameserver => hints})
51
+ res = Dnsruby::Recursor.new(r)
52
+ res.hints = hints
53
+
54
+ key = RR.create(". 86400 IN DNSKEY 257 3 5 AwEAAff8EiNa/S3wovNzPUmuBqe1pSjnNoen
55
+ cXDNMpmjTgngGMPct+8KDKxM6FwvPSRx15gN
56
+ RyRQfzSPU0WshDNkBV2TMtVpzqn/dsurbmTo
57
+ ixRzLyLK2Kd2adg5o5yS/gaTgCo0HVBmIruS
58
+ N3FVI2ugCWJBFLkFGHLvMJ0BTSYVqWGwQIzp
59
+ EPKCbKN+L9nrLcvJRCWG59Yq6BUsSEKlzSK3
60
+ jMhYQs6y5IiCGAVol+3VyjN93/lXkeUG6u7d
61
+ lQsyiY9fxfeUvmn004y0TjAgjZqdwKZB0K9M
62
+ A7qcALG3Tw2TXEdQsn9aY3DzNii3YEBidzER
63
+ mY7n4hIUri1r59MnuNJq2x0=")
64
+
65
+ print " Key = #{key}, type = #{key.type}, name = #{key.name}\n"
66
+
67
+ Dnssec.add_trust_anchor(key)
68
+ Dnssec.add_trust_anchor(RR.create(". 86400 IN DNSKEY 257 3 5 AwEAAb+qUOkdZKCP0Qn/4TxJy2XD07xOckKj
69
+ wwAHOE/Hn3rLGy0RpmVYCOrmJbVtfyC6i8SQ
70
+ sRRKj6YUVlNg7EJ9gjK6rTiDlYMxSc0hFsoG
71
+ I8qfAfmsjwClVh86rSIJvruvbcRsQURp/gvJ
72
+ EdOaEHlA3JEIHS3cRR5AjKeF1IQdsGYtJMBM
73
+ 2VMtrgHKgOPZjzfM6bPyg+H9uMBwOm2HkSiE
74
+ geAw2vXEHp0eNM2sOxUQMYYPkoywa28oxP4v
75
+ dUI7ht4I8etlq3gNCEuBJjV4347ZQ0VHIwDw
76
+ JSVmYBzc4f3REfEZS7h6fR33wPVQIw9NNi9p
77
+ Cy7JRqzEGwHVft/re6SRqE0="))
78
+ #res.hints = hints
79
+ print "Trust anchors : #{Dnssec.trust_anchors}\n"
80
+ Dnsruby::TheLog.level=Logger::DEBUG
81
+
82
+ name, type, klass = ARGV
83
+ type ||= "A"
84
+ klass ||= "IN"
85
+
86
+ begin
87
+ answer = nil
88
+ answer = res.query(name, type, klass)
89
+ print answer
90
+ rescue Exception => e
91
+ print "query failed: #{e}\n"
92
+ end
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  # Example usage for Net::DNS::Resolver::Recurse
2
18
  # Performs recursion for a query.
3
19
 
data/demo/mresolv.rb CHANGED
@@ -1,3 +1,20 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
17
+
1
18
  #mresolv [ -d ] [ -n number ] [ -t timeout ] [ filename... ]
2
19
  #
3
20
  #mresolv performs multiple DNS lookups in parallel. Names to query
data/demo/mx.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  require 'dnsruby'
2
18
 
3
19
  #= NAME
data/demo/rubydig.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  #= NAME
2
18
  #
3
19
  #rubydig - Ruby script to perform DNS queries
data/demo/trace_dns.rb CHANGED
@@ -1,3 +1,19 @@
1
+ #--
2
+ #Copyright 2007 Nominet UK
3
+ #
4
+ #Licensed under the Apache License, Version 2.0 (the "License");
5
+ #you may not use this file except in compliance with the License.
6
+ #You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ #Unless required by applicable law or agreed to in writing, software
11
+ #distributed under the License is distributed on an "AS IS" BASIS,
12
+ #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ #See the License for the specific language governing permissions and
14
+ #limitations under the License.
15
+ #++
16
+
1
17
  require 'dnsruby'
2
18
  include Dnsruby
3
19
 
data/html/created.rid CHANGED
@@ -1 +1 @@
1
- Thu, 03 Sep 2009 15:41:31 +0100
1
+ Tue, 19 May 2009 10:26:16 +0100
@@ -42,13 +42,9 @@
42
42
  <a href="classes/Dnsruby/MetaTypes.html">Dnsruby::MetaTypes</a><br />
43
43
  <a href="classes/Dnsruby/Modes.html">Dnsruby::Modes</a><br />
44
44
  <a href="classes/Dnsruby/NXDomain.html">Dnsruby::NXDomain</a><br />
45
- <a href="classes/Dnsruby/NXRRSet.html">Dnsruby::NXRRSet</a><br />
46
45
  <a href="classes/Dnsruby/Name.html">Dnsruby::Name</a><br />
47
46
  <a href="classes/Dnsruby/Name/Label.html">Dnsruby::Name::Label</a><br />
48
- <a href="classes/Dnsruby/NotAuth.html">Dnsruby::NotAuth</a><br />
49
47
  <a href="classes/Dnsruby/NotImp.html">Dnsruby::NotImp</a><br />
50
- <a href="classes/Dnsruby/NotZone.html">Dnsruby::NotZone</a><br />
51
- <a href="classes/Dnsruby/Nsec3HashAlgorithms.html">Dnsruby::Nsec3HashAlgorithms</a><br />
52
48
  <a href="classes/Dnsruby/OpCode.html">Dnsruby::OpCode</a><br />
53
49
  <a href="classes/Dnsruby/OtherResolvError.html">Dnsruby::OtherResolvError</a><br />
54
50
  <a href="classes/Dnsruby/QTypes.html">Dnsruby::QTypes</a><br />
@@ -113,8 +109,6 @@
113
109
  <a href="classes/Dnsruby/Types.html">Dnsruby::Types</a><br />
114
110
  <a href="classes/Dnsruby/Update.html">Dnsruby::Update</a><br />
115
111
  <a href="classes/Dnsruby/VerifyError.html">Dnsruby::VerifyError</a><br />
116
- <a href="classes/Dnsruby/YXDomain.html">Dnsruby::YXDomain</a><br />
117
- <a href="classes/Dnsruby/YXRRSet.html">Dnsruby::YXRRSet</a><br />
118
112
  <a href="classes/Dnsruby/ZoneTransfer.html">Dnsruby::ZoneTransfer</a><br />
119
113
  <a href="classes/Dnsruby/ZoneTransfer/Delta.html">Dnsruby::ZoneTransfer::Delta</a><br />
120
114
  </div>