dnstraverse 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. data/LICENSE +674 -0
  2. data/README +4 -0
  3. data/Rakefile +19 -0
  4. data/a +44 -0
  5. data/bin/dnstraverse +300 -0
  6. data/doc.tar +0 -0
  7. data/doc/classes/DNSTraverse.html +198 -0
  8. data/doc/classes/DNSTraverse/CachingResolver.html +172 -0
  9. data/doc/classes/DNSTraverse/CachingResolver.src/M000055.html +21 -0
  10. data/doc/classes/DNSTraverse/CachingResolver.src/M000056.html +42 -0
  11. data/doc/classes/DNSTraverse/DecodedQuery.html +475 -0
  12. data/doc/classes/DNSTraverse/DecodedQuery.src/M000020.html +34 -0
  13. data/doc/classes/DNSTraverse/DecodedQuery.src/M000021.html +23 -0
  14. data/doc/classes/DNSTraverse/DecodedQuery.src/M000022.html +19 -0
  15. data/doc/classes/DNSTraverse/DecodedQuery.src/M000023.html +33 -0
  16. data/doc/classes/DNSTraverse/DecodedQuery.src/M000024.html +26 -0
  17. data/doc/classes/DNSTraverse/DecodedQuery.src/M000025.html +24 -0
  18. data/doc/classes/DNSTraverse/DecodedQuery.src/M000026.html +29 -0
  19. data/doc/classes/DNSTraverse/DecodedQuery.src/M000027.html +19 -0
  20. data/doc/classes/DNSTraverse/DecodedQuery.src/M000028.html +18 -0
  21. data/doc/classes/DNSTraverse/DecodedQuery.src/M000029.html +32 -0
  22. data/doc/classes/DNSTraverse/DecodedQuery.src/M000030.html +19 -0
  23. data/doc/classes/DNSTraverse/DecodedQuery.src/M000031.html +19 -0
  24. data/doc/classes/DNSTraverse/DecodedQuery.src/M000032.html +20 -0
  25. data/doc/classes/DNSTraverse/DecodedQuery.src/M000033.html +31 -0
  26. data/doc/classes/DNSTraverse/DecodedQueryCache.html +182 -0
  27. data/doc/classes/DNSTraverse/DecodedQueryCache.src/M000063.html +21 -0
  28. data/doc/classes/DNSTraverse/DecodedQueryCache.src/M000064.html +33 -0
  29. data/doc/classes/DNSTraverse/Fingerprint.html +277 -0
  30. data/doc/classes/DNSTraverse/Fingerprint.src/M000047.html +29 -0
  31. data/doc/classes/DNSTraverse/Fingerprint.src/M000048.html +18 -0
  32. data/doc/classes/DNSTraverse/Fingerprint.src/M000049.html +57 -0
  33. data/doc/classes/DNSTraverse/Fingerprint.src/M000050.html +28 -0
  34. data/doc/classes/DNSTraverse/Fingerprint.src/M000051.html +27 -0
  35. data/doc/classes/DNSTraverse/Fingerprint.src/M000052.html +35 -0
  36. data/doc/classes/DNSTraverse/Fingerprint.src/M000053.html +24 -0
  37. data/doc/classes/DNSTraverse/Fingerprint.src/M000054.html +29 -0
  38. data/doc/classes/DNSTraverse/InfoCache.html +235 -0
  39. data/doc/classes/DNSTraverse/InfoCache.src/M000034.html +20 -0
  40. data/doc/classes/DNSTraverse/InfoCache.src/M000035.html +23 -0
  41. data/doc/classes/DNSTraverse/InfoCache.src/M000036.html +28 -0
  42. data/doc/classes/DNSTraverse/InfoCache.src/M000037.html +25 -0
  43. data/doc/classes/DNSTraverse/InfoCache.src/M000038.html +27 -0
  44. data/doc/classes/DNSTraverse/InfoCache.src/M000039.html +33 -0
  45. data/doc/classes/DNSTraverse/MessageUtility.html +275 -0
  46. data/doc/classes/DNSTraverse/MessageUtility.src/M000011.html +35 -0
  47. data/doc/classes/DNSTraverse/MessageUtility.src/M000012.html +37 -0
  48. data/doc/classes/DNSTraverse/MessageUtility.src/M000013.html +28 -0
  49. data/doc/classes/DNSTraverse/MessageUtility.src/M000014.html +27 -0
  50. data/doc/classes/DNSTraverse/MessageUtility.src/M000015.html +30 -0
  51. data/doc/classes/DNSTraverse/MessageUtility.src/M000016.html +32 -0
  52. data/doc/classes/DNSTraverse/MessageUtility.src/M000017.html +34 -0
  53. data/doc/classes/DNSTraverse/MessageUtility.src/M000018.html +23 -0
  54. data/doc/classes/DNSTraverse/MessageUtility.src/M000019.html +36 -0
  55. data/doc/classes/DNSTraverse/Referral.html +641 -0
  56. data/doc/classes/DNSTraverse/Referral.src/M000065.html +22 -0
  57. data/doc/classes/DNSTraverse/Referral.src/M000066.html +21 -0
  58. data/doc/classes/DNSTraverse/Referral.src/M000067.html +23 -0
  59. data/doc/classes/DNSTraverse/Referral.src/M000068.html +19 -0
  60. data/doc/classes/DNSTraverse/Referral.src/M000069.html +18 -0
  61. data/doc/classes/DNSTraverse/Referral.src/M000070.html +54 -0
  62. data/doc/classes/DNSTraverse/Referral.src/M000071.html +25 -0
  63. data/doc/classes/DNSTraverse/Referral.src/M000072.html +27 -0
  64. data/doc/classes/DNSTraverse/Referral.src/M000073.html +23 -0
  65. data/doc/classes/DNSTraverse/Referral.src/M000074.html +20 -0
  66. data/doc/classes/DNSTraverse/Referral.src/M000075.html +40 -0
  67. data/doc/classes/DNSTraverse/Referral.src/M000076.html +52 -0
  68. data/doc/classes/DNSTraverse/Referral.src/M000077.html +29 -0
  69. data/doc/classes/DNSTraverse/Referral.src/M000078.html +54 -0
  70. data/doc/classes/DNSTraverse/Referral.src/M000079.html +18 -0
  71. data/doc/classes/DNSTraverse/Referral.src/M000080.html +22 -0
  72. data/doc/classes/DNSTraverse/Referral.src/M000081.html +20 -0
  73. data/doc/classes/DNSTraverse/Referral.src/M000082.html +29 -0
  74. data/doc/classes/DNSTraverse/Referral.src/M000083.html +28 -0
  75. data/doc/classes/DNSTraverse/Referral.src/M000084.html +29 -0
  76. data/doc/classes/DNSTraverse/Referral.src/M000085.html +55 -0
  77. data/doc/classes/DNSTraverse/Referral.src/M000086.html +30 -0
  78. data/doc/classes/DNSTraverse/Referral.src/M000087.html +24 -0
  79. data/doc/classes/DNSTraverse/Referral.src/M000088.html +20 -0
  80. data/doc/classes/DNSTraverse/Referral.src/M000089.html +58 -0
  81. data/doc/classes/DNSTraverse/ResolveError.html +111 -0
  82. data/doc/classes/DNSTraverse/Response.html +271 -0
  83. data/doc/classes/DNSTraverse/Response.src/M000057.html +27 -0
  84. data/doc/classes/DNSTraverse/Response.src/M000058.html +21 -0
  85. data/doc/classes/DNSTraverse/Response.src/M000059.html +19 -0
  86. data/doc/classes/DNSTraverse/Response.src/M000060.html +21 -0
  87. data/doc/classes/DNSTraverse/Response.src/M000061.html +31 -0
  88. data/doc/classes/DNSTraverse/Response.src/M000062.html +23 -0
  89. data/doc/classes/DNSTraverse/Response/NoGlue.html +222 -0
  90. data/doc/classes/DNSTraverse/Response/NoGlue.src/M000007.html +32 -0
  91. data/doc/classes/DNSTraverse/Response/NoGlue.src/M000008.html +18 -0
  92. data/doc/classes/DNSTraverse/Response/NoGlue.src/M000009.html +18 -0
  93. data/doc/classes/DNSTraverse/Response/NoGlue.src/M000010.html +18 -0
  94. data/doc/classes/DNSTraverse/Traverser.html +247 -0
  95. data/doc/classes/DNSTraverse/Traverser.src/M000040.html +17 -0
  96. data/doc/classes/DNSTraverse/Traverser.src/M000041.html +52 -0
  97. data/doc/classes/DNSTraverse/Traverser.src/M000042.html +61 -0
  98. data/doc/classes/DNSTraverse/Traverser.src/M000043.html +110 -0
  99. data/doc/classes/DNSTraverse/Traverser.src/M000044.html +63 -0
  100. data/doc/classes/DNSTraverse/Traverser.src/M000045.html +28 -0
  101. data/doc/classes/DNSTraverse/Traverser.src/M000046.html +18 -0
  102. data/doc/classes/FingerprintRules.html +175 -0
  103. data/doc/classes/Log.html +174 -0
  104. data/doc/classes/Log.src/M000002.html +18 -0
  105. data/doc/classes/Log.src/M000003.html +18 -0
  106. data/doc/classes/Log.src/M000004.html +18 -0
  107. data/doc/classes/Log/Formatter.html +165 -0
  108. data/doc/classes/Log/Formatter.src/M000005.html +22 -0
  109. data/doc/classes/Log/Formatter.src/M000006.html +24 -0
  110. data/doc/classes/TestFingerprint.html +137 -0
  111. data/doc/classes/TestFingerprint.src/M000001.html +22 -0
  112. data/doc/created.rid +1 -0
  113. data/doc/files/lib/dnstraverse/caching_resolver_rb.html +132 -0
  114. data/doc/files/lib/dnstraverse/decoded_query_cache_rb.html +132 -0
  115. data/doc/files/lib/dnstraverse/decoded_query_rb.html +132 -0
  116. data/doc/files/lib/dnstraverse/fingerprint_rb.html +134 -0
  117. data/doc/files/lib/dnstraverse/fingerprint_rules_rb.html +143 -0
  118. data/doc/files/lib/dnstraverse/info_cache_rb.html +131 -0
  119. data/doc/files/lib/dnstraverse/log_rb.html +131 -0
  120. data/doc/files/lib/dnstraverse/message_utility_rb.html +124 -0
  121. data/doc/files/lib/dnstraverse/referral_rb.html +134 -0
  122. data/doc/files/lib/dnstraverse/response_noglue_rb.html +124 -0
  123. data/doc/files/lib/dnstraverse/response_rb.html +132 -0
  124. data/doc/files/lib/dnstraverse/traverser_rb.html +137 -0
  125. data/doc/files/test/test_fingerprint_rb.html +133 -0
  126. data/doc/fr_class_index.html +43 -0
  127. data/doc/fr_file_index.html +39 -0
  128. data/doc/fr_method_index.html +115 -0
  129. data/doc/index.html +24 -0
  130. data/doc/rdoc-style.css +208 -0
  131. data/lib/dnstraverse/caching_resolver.rb +63 -0
  132. data/lib/dnstraverse/decoded_query.rb +199 -0
  133. data/lib/dnstraverse/decoded_query_cache.rb +53 -0
  134. data/lib/dnstraverse/fingerprint.rb +166 -0
  135. data/lib/dnstraverse/fingerprint_rules.rb +389 -0
  136. data/lib/dnstraverse/info_cache.rb +108 -0
  137. data/lib/dnstraverse/log.rb +55 -0
  138. data/lib/dnstraverse/message_utility.rb +199 -0
  139. data/lib/dnstraverse/referral.rb +463 -0
  140. data/lib/dnstraverse/response.rb +92 -0
  141. data/lib/dnstraverse/response_noglue.rb +54 -0
  142. data/lib/dnstraverse/traverser.rb +291 -0
  143. data/test/test_fingerprint.rb +29 -0
  144. metadata +231 -0
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (DNSTraverse::Response::NoGlue)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/response_noglue.rb, line 22</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-comment cmt"># we queried @ip about @qname/@qclass/@qtype and received @server as a</span>
16
+ <span class="ruby-comment cmt"># referral in bailiwick @bailiwick but without any glue</span>
17
+ <span class="ruby-ivar">@qname</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qname</span>]
18
+ <span class="ruby-ivar">@qclass</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qclass</span>]
19
+ <span class="ruby-ivar">@qtype</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:qtype</span>]
20
+ <span class="ruby-ivar">@bailiwick</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:bailiwick</span>]
21
+ <span class="ruby-ivar">@ip</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:ip</span>]
22
+ <span class="ruby-ivar">@server</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:server</span>]
23
+ <span class="ruby-ivar">@decoded_query</span> = <span class="ruby-keyword kw">nil</span>
24
+ <span class="ruby-ivar">@infocache</span> = <span class="ruby-keyword kw">nil</span>
25
+ <span class="ruby-ivar">@starters</span> = <span class="ruby-keyword kw">nil</span>
26
+ <span class="ruby-ivar">@starters_bailiwick</span> = <span class="ruby-keyword kw">nil</span>
27
+ <span class="ruby-ivar">@status</span> = <span class="ruby-identifier">:noglue</span>
28
+ <span class="ruby-identifier">update_stats_key</span>
29
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>
30
+ <span class="ruby-keyword kw">end</span></pre>
31
+ </body>
32
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>method_missing (DNSTraverse::Response::NoGlue)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/response_noglue.rb, line 40</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">key</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
15
+ <span class="ruby-keyword kw">super</span> <span class="ruby-comment cmt"># there are no missing methods, we answer directly</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>update_stats_key (DNSTraverse::Response::NoGlue)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/response_noglue.rb, line 44</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_stats_key</span>
15
+ <span class="ruby-ivar">@stats_key</span> = <span class="ruby-node">&quot;key:#{@ip}:#{@status}:#{@qname}:#{@qclass}:#{@qtype}:#{@server}:#{@bailiwick}&quot;</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>to_s (DNSTraverse::Response::NoGlue)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/response_noglue.rb, line 48</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
15
+ <span class="ruby-keyword kw">return</span> <span class="ruby-node">&quot;No glue for #{@server}&quot;</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,247 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: DNSTraverse::Traverser</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">DNSTraverse::Traverser</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/dnstraverse/traverser_rb.html">
59
+ lib/dnstraverse/traverser.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000044">find_all_roots</a>&nbsp;&nbsp;
90
+ <a href="#M000042">get_a_root</a>&nbsp;&nbsp;
91
+ <a href="#M000041">new</a>&nbsp;&nbsp;
92
+ <a href="#M000040">progress_null</a>&nbsp;&nbsp;
93
+ <a href="#M000043">run</a>&nbsp;&nbsp;
94
+ <a href="#M000045">run_query</a>&nbsp;&nbsp;
95
+ <a href="#M000046">servers_encountered</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+ <div id="includes">
104
+ <h3 class="section-bar">Included Modules</h3>
105
+
106
+ <div id="includes-list">
107
+ <span class="include-name"><a href="MessageUtility.html">MessageUtility</a></span>
108
+ </div>
109
+ </div>
110
+
111
+ <div id="section">
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <!-- if method_list -->
121
+ <div id="methods">
122
+ <h3 class="section-bar">Public Class methods</h3>
123
+
124
+ <div id="method-M000041" class="method-detail">
125
+ <a name="M000041"></a>
126
+
127
+ <div class="method-heading">
128
+ <a href="Traverser.src/M000041.html" target="Code" class="method-signature"
129
+ onclick="popupCode('Traverser.src/M000041.html');return false;">
130
+ <span class="method-name">new</span><span class="method-args">(args)</span>
131
+ </a>
132
+ </div>
133
+
134
+ <div class="method-description">
135
+ </div>
136
+ </div>
137
+
138
+ <h3 class="section-bar">Public Instance methods</h3>
139
+
140
+ <div id="method-M000044" class="method-detail">
141
+ <a name="M000044"></a>
142
+
143
+ <div class="method-heading">
144
+ <a href="Traverser.src/M000044.html" target="Code" class="method-signature"
145
+ onclick="popupCode('Traverser.src/M000044.html');return false;">
146
+ <span class="method-name">find_all_roots</span><span class="method-args">(args)</span>
147
+ </a>
148
+ </div>
149
+
150
+ <div class="method-description">
151
+ <p>
152
+ asks the :root/:rootip server for all the roots, fills in any missing IP
153
+ addresses from local resolver
154
+ </p>
155
+ </div>
156
+ </div>
157
+
158
+ <div id="method-M000042" class="method-detail">
159
+ <a name="M000042"></a>
160
+
161
+ <div class="method-heading">
162
+ <a href="Traverser.src/M000042.html" target="Code" class="method-signature"
163
+ onclick="popupCode('Traverser.src/M000042.html');return false;">
164
+ <span class="method-name">get_a_root</span><span class="method-args">(args)</span>
165
+ </a>
166
+ </div>
167
+
168
+ <div class="method-description">
169
+ <p>
170
+ change to get_all or something?
171
+ </p>
172
+ </div>
173
+ </div>
174
+
175
+ <div id="method-M000040" class="method-detail">
176
+ <a name="M000040"></a>
177
+
178
+ <div class="method-heading">
179
+ <a href="Traverser.src/M000040.html" target="Code" class="method-signature"
180
+ onclick="popupCode('Traverser.src/M000040.html');return false;">
181
+ <span class="method-name">progress_null</span><span class="method-args">(args)</span>
182
+ </a>
183
+ </div>
184
+
185
+ <div class="method-description">
186
+ </div>
187
+ </div>
188
+
189
+ <div id="method-M000043" class="method-detail">
190
+ <a name="M000043"></a>
191
+
192
+ <div class="method-heading">
193
+ <a href="Traverser.src/M000043.html" target="Code" class="method-signature"
194
+ onclick="popupCode('Traverser.src/M000043.html');return false;">
195
+ <span class="method-name">run</span><span class="method-args">(r, args = {})</span>
196
+ </a>
197
+ </div>
198
+
199
+ <div class="method-description">
200
+ </div>
201
+ </div>
202
+
203
+ <div id="method-M000045" class="method-detail">
204
+ <a name="M000045"></a>
205
+
206
+ <div class="method-heading">
207
+ <a href="Traverser.src/M000045.html" target="Code" class="method-signature"
208
+ onclick="popupCode('Traverser.src/M000045.html');return false;">
209
+ <span class="method-name">run_query</span><span class="method-args">(args)</span>
210
+ </a>
211
+ </div>
212
+
213
+ <div class="method-description">
214
+ </div>
215
+ </div>
216
+
217
+ <div id="method-M000046" class="method-detail">
218
+ <a name="M000046"></a>
219
+
220
+ <div class="method-heading">
221
+ <a href="Traverser.src/M000046.html" target="Code" class="method-signature"
222
+ onclick="popupCode('Traverser.src/M000046.html');return false;">
223
+ <span class="method-name">servers_encountered</span><span class="method-args">()</span>
224
+ </a>
225
+ </div>
226
+
227
+ <div class="method-description">
228
+ <p>
229
+ returns a Hash of all the servernames we&#8216;ve seen so far servername is
230
+ the key, the value is an Array of IP addresses (strings)
231
+ </p>
232
+ </div>
233
+ </div>
234
+
235
+
236
+ </div>
237
+
238
+
239
+ </div>
240
+
241
+
242
+ <div id="validator-badges">
243
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
244
+ </div>
245
+
246
+ </body>
247
+ </html>
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>progress_null (DNSTraverse::Traverser)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 33</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">progress_null</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-keyword kw">end</span></pre>
16
+ </body>
17
+ </html>
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (DNSTraverse::Traverser)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 36</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-constant">Socket</span>.<span class="ruby-identifier">do_not_reverse_lookup</span> = <span class="ruby-keyword kw">true</span>
16
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:loglevel</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:loglevel</span>]
17
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">&quot;Initialize with args: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">inspect</span> }
18
+ <span class="ruby-constant">Dnsruby</span>.<span class="ruby-identifier">log</span>.<span class="ruby-identifier">level</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:libloglevel</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:libloglevel</span>]
19
+ <span class="ruby-ivar">@state</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:state</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">nil</span>
20
+ <span class="ruby-ivar">@maxdepth</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:maxdepth</span>] <span class="ruby-operator">||</span> <span class="ruby-value">10</span>
21
+ <span class="ruby-ivar">@progress_main</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:progress_main</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">method</span>(<span class="ruby-identifier">:progress_null</span>)
22
+ <span class="ruby-ivar">@progress_resolve</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:progress_resolve</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">method</span>(<span class="ruby-identifier">:progress_null</span>)
23
+ <span class="ruby-ivar">@fast</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:fast</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span> <span class="ruby-comment cmt"># use fast algorithm, less accurate</span>
24
+ <span class="ruby-ivar">@answered</span> = <span class="ruby-ivar">@fast</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt"># for fast algorithm</span>
25
+ <span class="ruby-ivar">@seen</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> <span class="ruby-comment cmt"># servernames to IP addresses of anything we see</span>
26
+ <span class="ruby-identifier">retries</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:retries</span>] <span class="ruby-operator">||</span> <span class="ruby-value">2</span>
27
+ <span class="ruby-identifier">retry_delay</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:retry_delay</span>] <span class="ruby-operator">||</span> <span class="ruby-value">2</span>
28
+ <span class="ruby-identifier">packet_timeout</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:packet_timeout</span>] <span class="ruby-operator">||</span> <span class="ruby-value">2</span>
29
+ <span class="ruby-identifier">dnssec</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:dnssec</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
30
+ <span class="ruby-identifier">srcaddr</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:srcaddr</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">'0.0.0.0'</span>
31
+ <span class="ruby-identifier">use_tcp</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:always_tcp</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
32
+ <span class="ruby-identifier">ignore_truncation</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:allow_tcp</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword kw">false</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">true</span>
33
+ <span class="ruby-identifier">udpsize</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:udpsize</span>] <span class="ruby-operator">||</span> <span class="ruby-value">512</span>
34
+ <span class="ruby-identifier">cfg</span> = <span class="ruby-constant">Dnsruby</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
35
+ <span class="ruby-identifier">rescfg</span> = { <span class="ruby-identifier">:nameserver</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">cfg</span>.<span class="ruby-identifier">nameserver</span>, <span class="ruby-identifier">:ndots</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">cfg</span>.<span class="ruby-identifier">ndots</span>,
36
+ <span class="ruby-identifier">:apply_domain</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">:apply_search_list</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>}
37
+ <span class="ruby-identifier">resargs</span> = { <span class="ruby-identifier">:config_info</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">rescfg</span>, <span class="ruby-identifier">:use_tcp</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">use_tcp</span>, <span class="ruby-identifier">:recurse</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">false</span>,
38
+ <span class="ruby-identifier">:retry_times</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">retries</span>, <span class="ruby-identifier">:retry_delay</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">retry_delay</span>, <span class="ruby-identifier">:dnssec</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">dnssec</span>,
39
+ <span class="ruby-identifier">:ignore_truncation</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ignore_truncation</span>, <span class="ruby-identifier">:src_address</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">srcaddr</span>,
40
+ <span class="ruby-identifier">:udp_size</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">udpsize</span>.<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">:packet_timeout</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">packet_timeout</span> }
41
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">&quot;Creating remote resolver object&quot;</span>}
42
+ <span class="ruby-constant">CachingResolver</span>.<span class="ruby-identifier">use_eventmachine</span>(<span class="ruby-keyword kw">false</span>)
43
+ <span class="ruby-ivar">@resolver</span> = <span class="ruby-constant">CachingResolver</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">resargs</span>) <span class="ruby-comment cmt"># used for set nameservers</span>
44
+ <span class="ruby-ivar">@resolver</span>.<span class="ruby-identifier">udp_size</span> = <span class="ruby-identifier">udpsize</span>.<span class="ruby-identifier">to_i</span>
45
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">&quot;Creating local resolver object&quot;</span>}
46
+ <span class="ruby-identifier">resargs</span>[<span class="ruby-identifier">:recurse</span>] = <span class="ruby-keyword kw">true</span>
47
+ <span class="ruby-ivar">@lresolver</span> = <span class="ruby-constant">Dnsruby</span><span class="ruby-operator">::</span><span class="ruby-constant">Resolver</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">resargs</span>) <span class="ruby-comment cmt"># left on local default</span>
48
+ <span class="ruby-ivar">@lresolver</span>.<span class="ruby-identifier">udp_size</span> = <span class="ruby-identifier">udpsize</span>.<span class="ruby-identifier">to_i</span>
49
+ <span class="ruby-keyword kw">self</span>
50
+ <span class="ruby-keyword kw">end</span></pre>
51
+ </body>
52
+ </html>
@@ -0,0 +1,61 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>get_a_root (DNSTraverse::Traverser)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/dnstraverse/traverser.rb, line 75</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_a_root</span>(<span class="ruby-identifier">args</span>)
15
+ <span class="ruby-identifier">aaaa</span> = <span class="ruby-identifier">args</span>[<span class="ruby-identifier">:aaaa</span>] <span class="ruby-operator">||</span> <span class="ruby-keyword kw">false</span>
16
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">&quot;get_a_root entry&quot;</span> }
17
+ <span class="ruby-comment cmt"># get nameservers for root</span>
18
+ <span class="ruby-keyword kw">begin</span>
19
+ <span class="ruby-identifier">msg</span> = <span class="ruby-ivar">@lresolver</span>.<span class="ruby-identifier">query</span>(<span class="ruby-value str">''</span>, <span class="ruby-value str">'NS'</span>)
20
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
21
+ <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Failed to get roots, local resolver returned exception: #{e}&quot;</span>
22
+ <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-identifier">msg_validate</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'NS'</span>)
25
+ <span class="ruby-identifier">msg_comment</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:want_recursion</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>)
26
+ <span class="ruby-identifier">ans1</span> = <span class="ruby-identifier">msg_answers?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">''</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">'NS'</span>)
27
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ans1</span> <span class="ruby-keyword kw">then</span>
28
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ResolveError</span>, <span class="ruby-value str">&quot;No root nameservers found&quot;</span>
29
+ <span class="ruby-keyword kw">end</span>
30
+ <span class="ruby-identifier">roots</span> = <span class="ruby-identifier">ans1</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span> <span class="ruby-identifier">x</span>.<span class="ruby-identifier">domainname</span>.<span class="ruby-identifier">to_s</span> }
31
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">&quot;Local resolver lists: &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">roots</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">', '</span>) }
32
+ <span class="ruby-identifier">types</span> = <span class="ruby-identifier">aaaa</span> <span class="ruby-value">? </span><span class="ruby-constant">TYPE_ARRAY_AAAA</span> <span class="ruby-operator">:</span> <span class="ruby-constant">TYPE_ARRAY_A</span>
33
+ <span class="ruby-comment cmt"># loop through all root nameservers to get an appropriate address</span>
34
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">type</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">types</span> <span class="ruby-keyword kw">do</span>
35
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">root</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">roots</span> <span class="ruby-keyword kw">do</span>
36
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">add</span> = <span class="ruby-identifier">msg_additional?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">root</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">type</span>)) <span class="ruby-keyword kw">then</span>
37
+ <span class="ruby-identifier">rootip</span> = <span class="ruby-identifier">add</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">rdata</span>.<span class="ruby-identifier">to_s</span>
38
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">root</span>, <span class="ruby-identifier">rootip</span>
39
+ <span class="ruby-keyword kw">end</span>
40
+ <span class="ruby-keyword kw">end</span>
41
+ <span class="ruby-keyword kw">end</span>
42
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-value str">&quot;Nothing in additional section of help&quot;</span> }
43
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">type</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">types</span> <span class="ruby-keyword kw">do</span>
44
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">root</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">roots</span> <span class="ruby-keyword kw">do</span>
45
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">&quot;Resolving root #{root} type #{type}&quot;</span> }
46
+ <span class="ruby-identifier">msg</span> = <span class="ruby-ivar">@lresolver</span>.<span class="ruby-identifier">query</span>(<span class="ruby-identifier">root</span>, <span class="ruby-identifier">type</span>)
47
+ <span class="ruby-identifier">msg_validate</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">root</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">type</span>)
48
+ <span class="ruby-identifier">msg_comment</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:want_recursion</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-keyword kw">true</span>)
49
+ <span class="ruby-identifier">ans2</span> = <span class="ruby-identifier">msg_answers?</span>(<span class="ruby-identifier">msg</span>, <span class="ruby-identifier">:qname</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">root</span>, <span class="ruby-identifier">:qtype</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">type</span>)
50
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ans2</span> <span class="ruby-keyword kw">then</span>
51
+ <span class="ruby-identifier">rootip</span> = <span class="ruby-identifier">ans2</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">rdata</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-comment cmt"># use first one</span>
52
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">&quot;get_a_root exit: #{root} #{rootip}&quot;</span> }
53
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">root</span>, <span class="ruby-identifier">rootip</span>
54
+ <span class="ruby-keyword kw">end</span>
55
+ <span class="ruby-constant">Log</span>.<span class="ruby-identifier">debug</span> { <span class="ruby-node">&quot;#{root}/#{type}: No suitable answers found&quot;</span> }
56
+ <span class="ruby-keyword kw">end</span>
57
+ <span class="ruby-keyword kw">end</span>
58
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ResolveError</span>, <span class="ruby-value str">&quot;No address could be found for any root server&quot;</span>
59
+ <span class="ruby-keyword kw">end</span></pre>
60
+ </body>
61
+ </html>