firescan 0.07
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.
- data/LICENSE.txt +202 -0
- data/README.txt +37 -0
- data/USAGE.txt +43 -0
- data/VERSION.txt +4 -0
- data/bin/firescan +4 -0
- data/build +7 -0
- data/doc/Example.html +224 -0
- data/doc/Firebind.html +213 -0
- data/doc/Firebind/Client.html +750 -0
- data/doc/Firebind/Portspec.html +390 -0
- data/doc/Firebind/Scan.html +413 -0
- data/doc/Firebind/ScanError.html +277 -0
- data/doc/Firebind/ScanState.html +1015 -0
- data/doc/Firebind/SimpleProtocol.html +292 -0
- data/doc/Firebind/TcpTransport.html +481 -0
- data/doc/Firebind/Transport.html +275 -0
- data/doc/Firebind/UdpTransport.html +472 -0
- data/doc/LICENSE_txt.html +323 -0
- data/doc/README_txt.html +171 -0
- data/doc/Runner.html +166 -0
- data/doc/TestPortspec.html +289 -0
- data/doc/Tools.html +321 -0
- data/doc/USAGE_txt.html +184 -0
- data/doc/VERSION_txt.html +126 -0
- data/doc/build.html +125 -0
- data/doc/created.rid +22 -0
- data/doc/doc/created_rid.html +121 -0
- data/doc/firescan_gemspec.html +140 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +118 -0
- data/doc/js/darkfish.js +155 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +595 -0
- data/doc/table_of_contents.html +230 -0
- data/firescan.gemspec +18 -0
- data/lib/example.rb +20 -0
- data/lib/firebind/client.rb +308 -0
- data/lib/firebind/portspec.rb +107 -0
- data/lib/firebind/scan.rb +288 -0
- data/lib/firebind/scan_error.rb +32 -0
- data/lib/firebind/scan_state.rb +140 -0
- data/lib/firebind/simple_protocol.rb +59 -0
- data/lib/firebind/tcp_transport.rb +184 -0
- data/lib/firebind/tools.rb +107 -0
- data/lib/firebind/transport.rb +44 -0
- data/lib/firebind/udp_transport.rb +174 -0
- data/test/portspec_test.rb +53 -0
- data/test/runner.rb +7 -0
- metadata +136 -0
@@ -0,0 +1,277 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Firebind::ScanError - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/firebind/scan_error.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">IOError
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<nav id="method-list-section" class="section">
|
72
|
+
<h3 class="section-header">Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list">
|
75
|
+
|
76
|
+
<li ><a href="#method-c-new">::new</a>
|
77
|
+
|
78
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="project-metadata">
|
86
|
+
<nav id="fileindex-section" class="section project-section">
|
87
|
+
<h3 class="section-header">Pages</h3>
|
88
|
+
|
89
|
+
<ul>
|
90
|
+
|
91
|
+
<li class="file"><a href="../LICENSE_txt.html">LICENSE</a>
|
92
|
+
|
93
|
+
<li class="file"><a href="../README_txt.html">README</a>
|
94
|
+
|
95
|
+
<li class="file"><a href="../USAGE_txt.html">USAGE</a>
|
96
|
+
|
97
|
+
<li class="file"><a href="../VERSION_txt.html">VERSION</a>
|
98
|
+
|
99
|
+
<li class="file"><a href="../build.html">build</a>
|
100
|
+
|
101
|
+
<li class="file"><a href="../doc/created_rid.html">created.rid</a>
|
102
|
+
|
103
|
+
<li class="file"><a href="../firescan_gemspec.html">firescan.gemspec</a>
|
104
|
+
|
105
|
+
</ul>
|
106
|
+
</nav>
|
107
|
+
|
108
|
+
<nav id="classindex-section" class="section project-section">
|
109
|
+
<h3 class="section-header">Class and Module Index</h3>
|
110
|
+
|
111
|
+
<ul class="link-list">
|
112
|
+
|
113
|
+
<li><a href="../Example.html">Example</a>
|
114
|
+
|
115
|
+
<li><a href="../Firebind.html">Firebind</a>
|
116
|
+
|
117
|
+
<li><a href="../Firebind/Client.html">Firebind::Client</a>
|
118
|
+
|
119
|
+
<li><a href="../Firebind/Portspec.html">Firebind::Portspec</a>
|
120
|
+
|
121
|
+
<li><a href="../Firebind/Scan.html">Firebind::Scan</a>
|
122
|
+
|
123
|
+
<li><a href="../Firebind/ScanError.html">Firebind::ScanError</a>
|
124
|
+
|
125
|
+
<li><a href="../Firebind/ScanState.html">Firebind::ScanState</a>
|
126
|
+
|
127
|
+
<li><a href="../Firebind/SimpleProtocol.html">Firebind::SimpleProtocol</a>
|
128
|
+
|
129
|
+
<li><a href="../Firebind/TcpTransport.html">Firebind::TcpTransport</a>
|
130
|
+
|
131
|
+
<li><a href="../Firebind/Transport.html">Firebind::Transport</a>
|
132
|
+
|
133
|
+
<li><a href="../Firebind/UdpTransport.html">Firebind::UdpTransport</a>
|
134
|
+
|
135
|
+
<li><a href="../Runner.html">Runner</a>
|
136
|
+
|
137
|
+
<li><a href="../TestPortspec.html">TestPortspec</a>
|
138
|
+
|
139
|
+
<li><a href="../Tools.html">Tools</a>
|
140
|
+
|
141
|
+
</ul>
|
142
|
+
</nav>
|
143
|
+
|
144
|
+
</div>
|
145
|
+
</nav>
|
146
|
+
|
147
|
+
<div id="documentation">
|
148
|
+
<h1 class="class">class Firebind::ScanError</h1>
|
149
|
+
|
150
|
+
<div id="description" class="description">
|
151
|
+
|
152
|
+
</div><!-- description -->
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<!-- Attributes -->
|
166
|
+
<section id="attribute-method-details" class="method-section section">
|
167
|
+
<h3 class="section-header">Attributes</h3>
|
168
|
+
|
169
|
+
|
170
|
+
<div id="attribute-i-status_code" class="method-detail">
|
171
|
+
<div class="method-heading attribute-method-heading">
|
172
|
+
<span class="method-name">status_code</span><span
|
173
|
+
class="attribute-access-type">[R]</span>
|
174
|
+
</div>
|
175
|
+
|
176
|
+
<div class="method-description">
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
</section><!-- attribute-method-details -->
|
184
|
+
|
185
|
+
|
186
|
+
<!-- Methods -->
|
187
|
+
|
188
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
189
|
+
<h3 class="section-header">Public Class Methods</h3>
|
190
|
+
|
191
|
+
|
192
|
+
<div id="method-c-new" class="method-detail ">
|
193
|
+
|
194
|
+
<div class="method-heading">
|
195
|
+
<span class="method-name">new</span><span
|
196
|
+
class="method-args">(status_code, error=nil)</span>
|
197
|
+
|
198
|
+
<span class="method-click-advice">click to toggle source</span>
|
199
|
+
|
200
|
+
</div>
|
201
|
+
|
202
|
+
|
203
|
+
<div class="method-description">
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<div class="method-source-code" id="new-source">
|
211
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_error.rb, line 22</span>
|
212
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">status_code</span>, <span class="ruby-identifier">error</span>=<span class="ruby-keyword">nil</span>)
|
213
|
+
<span class="ruby-ivar">@status_code</span> = <span class="ruby-identifier">status_code</span>
|
214
|
+
<span class="ruby-ivar">@error</span> = <span class="ruby-identifier">error</span>
|
215
|
+
<span class="ruby-keyword">end</span></pre>
|
216
|
+
</div><!-- new-source -->
|
217
|
+
|
218
|
+
</div>
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</div><!-- new-method -->
|
224
|
+
|
225
|
+
|
226
|
+
</section><!-- public-class-method-details -->
|
227
|
+
|
228
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
229
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
230
|
+
|
231
|
+
|
232
|
+
<div id="method-i-to_s" class="method-detail ">
|
233
|
+
|
234
|
+
<div class="method-heading">
|
235
|
+
<span class="method-name">to_s</span><span
|
236
|
+
class="method-args">()</span>
|
237
|
+
|
238
|
+
<span class="method-click-advice">click to toggle source</span>
|
239
|
+
|
240
|
+
</div>
|
241
|
+
|
242
|
+
|
243
|
+
<div class="method-description">
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
<div class="method-source-code" id="to_s-source">
|
251
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_error.rb, line 27</span>
|
252
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
253
|
+
<span class="ruby-node">"ScanError status_code:#{@status_code} cause:#{@error.to_s}"</span>
|
254
|
+
<span class="ruby-keyword">end</span></pre>
|
255
|
+
</div><!-- to_s-source -->
|
256
|
+
|
257
|
+
</div>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
</div><!-- to_s-method -->
|
263
|
+
|
264
|
+
|
265
|
+
</section><!-- public-instance-method-details -->
|
266
|
+
|
267
|
+
</section><!-- 5Buntitled-5D -->
|
268
|
+
|
269
|
+
</div><!-- documentation -->
|
270
|
+
|
271
|
+
|
272
|
+
<footer id="validator-badges">
|
273
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
274
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
275
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
276
|
+
</footer>
|
277
|
+
|
@@ -0,0 +1,1015 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Firebind::ScanState - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../index.html">Home</a>
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
<div id="file-metadata">
|
49
|
+
<nav id="file-list-section" class="section">
|
50
|
+
<h3 class="section-header">Defined In</h3>
|
51
|
+
<ul>
|
52
|
+
<li>lib/firebind/scan_state.rb
|
53
|
+
</ul>
|
54
|
+
</nav>
|
55
|
+
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="class-metadata">
|
60
|
+
|
61
|
+
<nav id="parent-class-section" class="section">
|
62
|
+
<h3 class="section-header">Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
|
66
|
+
</nav>
|
67
|
+
|
68
|
+
<!-- Included Modules -->
|
69
|
+
<nav id="includes-section" class="section">
|
70
|
+
<h3 class="section-header">Included Modules</h3>
|
71
|
+
|
72
|
+
<ul class="link-list">
|
73
|
+
|
74
|
+
|
75
|
+
<li><a class="include" href="../Tools.html">Tools</a>
|
76
|
+
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</nav>
|
80
|
+
|
81
|
+
|
82
|
+
<!-- Method Quickref -->
|
83
|
+
<nav id="method-list-section" class="section">
|
84
|
+
<h3 class="section-header">Methods</h3>
|
85
|
+
|
86
|
+
<ul class="link-list">
|
87
|
+
|
88
|
+
<li ><a href="#method-c-new">::new</a>
|
89
|
+
|
90
|
+
<li ><a href="#method-i-closed_ports">#closed_ports</a>
|
91
|
+
|
92
|
+
<li ><a href="#method-i-description">#description</a>
|
93
|
+
|
94
|
+
<li ><a href="#method-i-on_error">#on_error</a>
|
95
|
+
|
96
|
+
<li ><a href="#method-i-on_port_complete">#on_port_complete</a>
|
97
|
+
|
98
|
+
<li ><a href="#method-i-on_port_start">#on_port_start</a>
|
99
|
+
|
100
|
+
<li ><a href="#method-i-on_port_tick">#on_port_tick</a>
|
101
|
+
|
102
|
+
<li ><a href="#method-i-on_scan_complete">#on_scan_complete</a>
|
103
|
+
|
104
|
+
<li ><a href="#method-i-on_scan_start">#on_scan_start</a>
|
105
|
+
|
106
|
+
<li ><a href="#method-i-on_scan_stop">#on_scan_stop</a>
|
107
|
+
|
108
|
+
<li ><a href="#method-i-on_start_failure">#on_start_failure</a>
|
109
|
+
|
110
|
+
<li ><a href="#method-i-open_ports">#open_ports</a>
|
111
|
+
|
112
|
+
<li ><a href="#method-i-percent_complete">#percent_complete</a>
|
113
|
+
|
114
|
+
<li ><a href="#method-i-port_delay_seconds">#port_delay_seconds</a>
|
115
|
+
|
116
|
+
<li ><a href="#method-i-port_duration">#port_duration</a>
|
117
|
+
|
118
|
+
<li ><a href="#method-i-to_s">#to_s</a>
|
119
|
+
|
120
|
+
</ul>
|
121
|
+
</nav>
|
122
|
+
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div id="project-metadata">
|
126
|
+
<nav id="fileindex-section" class="section project-section">
|
127
|
+
<h3 class="section-header">Pages</h3>
|
128
|
+
|
129
|
+
<ul>
|
130
|
+
|
131
|
+
<li class="file"><a href="../LICENSE_txt.html">LICENSE</a>
|
132
|
+
|
133
|
+
<li class="file"><a href="../README_txt.html">README</a>
|
134
|
+
|
135
|
+
<li class="file"><a href="../USAGE_txt.html">USAGE</a>
|
136
|
+
|
137
|
+
<li class="file"><a href="../VERSION_txt.html">VERSION</a>
|
138
|
+
|
139
|
+
<li class="file"><a href="../build.html">build</a>
|
140
|
+
|
141
|
+
<li class="file"><a href="../doc/created_rid.html">created.rid</a>
|
142
|
+
|
143
|
+
<li class="file"><a href="../firescan_gemspec.html">firescan.gemspec</a>
|
144
|
+
|
145
|
+
</ul>
|
146
|
+
</nav>
|
147
|
+
|
148
|
+
<nav id="classindex-section" class="section project-section">
|
149
|
+
<h3 class="section-header">Class and Module Index</h3>
|
150
|
+
|
151
|
+
<ul class="link-list">
|
152
|
+
|
153
|
+
<li><a href="../Example.html">Example</a>
|
154
|
+
|
155
|
+
<li><a href="../Firebind.html">Firebind</a>
|
156
|
+
|
157
|
+
<li><a href="../Firebind/Client.html">Firebind::Client</a>
|
158
|
+
|
159
|
+
<li><a href="../Firebind/Portspec.html">Firebind::Portspec</a>
|
160
|
+
|
161
|
+
<li><a href="../Firebind/Scan.html">Firebind::Scan</a>
|
162
|
+
|
163
|
+
<li><a href="../Firebind/ScanError.html">Firebind::ScanError</a>
|
164
|
+
|
165
|
+
<li><a href="../Firebind/ScanState.html">Firebind::ScanState</a>
|
166
|
+
|
167
|
+
<li><a href="../Firebind/SimpleProtocol.html">Firebind::SimpleProtocol</a>
|
168
|
+
|
169
|
+
<li><a href="../Firebind/TcpTransport.html">Firebind::TcpTransport</a>
|
170
|
+
|
171
|
+
<li><a href="../Firebind/Transport.html">Firebind::Transport</a>
|
172
|
+
|
173
|
+
<li><a href="../Firebind/UdpTransport.html">Firebind::UdpTransport</a>
|
174
|
+
|
175
|
+
<li><a href="../Runner.html">Runner</a>
|
176
|
+
|
177
|
+
<li><a href="../TestPortspec.html">TestPortspec</a>
|
178
|
+
|
179
|
+
<li><a href="../Tools.html">Tools</a>
|
180
|
+
|
181
|
+
</ul>
|
182
|
+
</nav>
|
183
|
+
|
184
|
+
</div>
|
185
|
+
</nav>
|
186
|
+
|
187
|
+
<div id="documentation">
|
188
|
+
<h1 class="class">class Firebind::ScanState</h1>
|
189
|
+
|
190
|
+
<div id="description" class="description">
|
191
|
+
|
192
|
+
<pre>Scan lifecycle states
|
193
|
+
SCAN_SETUP
|
194
|
+
SCAN_START
|
195
|
+
PORT_START
|
196
|
+
PORT_TICK
|
197
|
+
PORT_COMPLETE
|
198
|
+
...
|
199
|
+
SCAN_STOP or SCAN_COMPLETE or START_FAILURE or ERROR</pre>
|
200
|
+
|
201
|
+
<p>noinspection RubyTooManyInstanceVariablesInspection</p>
|
202
|
+
|
203
|
+
</div><!-- description -->
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
<!-- Attributes -->
|
217
|
+
<section id="attribute-method-details" class="method-section section">
|
218
|
+
<h3 class="section-header">Attributes</h3>
|
219
|
+
|
220
|
+
|
221
|
+
<div id="attribute-i-command_server" class="method-detail">
|
222
|
+
<div class="method-heading attribute-method-heading">
|
223
|
+
<span class="method-name">command_server</span><span
|
224
|
+
class="attribute-access-type">[R]</span>
|
225
|
+
</div>
|
226
|
+
|
227
|
+
<div class="method-description">
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
</div>
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div id="attribute-i-current_state" class="method-detail">
|
235
|
+
<div class="method-heading attribute-method-heading">
|
236
|
+
<span class="method-name">current_state</span><span
|
237
|
+
class="attribute-access-type">[R]</span>
|
238
|
+
</div>
|
239
|
+
|
240
|
+
<div class="method-description">
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="attribute-i-echo_server" class="method-detail">
|
248
|
+
<div class="method-heading attribute-method-heading">
|
249
|
+
<span class="method-name">echo_server</span><span
|
250
|
+
class="attribute-access-type">[R]</span>
|
251
|
+
</div>
|
252
|
+
|
253
|
+
<div class="method-description">
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
</div>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div id="attribute-i-guid" class="method-detail">
|
261
|
+
<div class="method-heading attribute-method-heading">
|
262
|
+
<span class="method-name">guid</span><span
|
263
|
+
class="attribute-access-type">[R]</span>
|
264
|
+
</div>
|
265
|
+
|
266
|
+
<div class="method-description">
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
<div id="attribute-i-last_duration" class="method-detail">
|
274
|
+
<div class="method-heading attribute-method-heading">
|
275
|
+
<span class="method-name">last_duration</span><span
|
276
|
+
class="attribute-access-type">[R]</span>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
</div>
|
284
|
+
</div>
|
285
|
+
|
286
|
+
<div id="attribute-i-message" class="method-detail">
|
287
|
+
<div class="method-heading attribute-method-heading">
|
288
|
+
<span class="method-name">message</span><span
|
289
|
+
class="attribute-access-type">[RW]</span>
|
290
|
+
</div>
|
291
|
+
|
292
|
+
<div class="method-description">
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
</div>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div id="attribute-i-port" class="method-detail">
|
300
|
+
<div class="method-heading attribute-method-heading">
|
301
|
+
<span class="method-name">port</span><span
|
302
|
+
class="attribute-access-type">[R]</span>
|
303
|
+
</div>
|
304
|
+
|
305
|
+
<div class="method-description">
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
</div>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div id="attribute-i-port_delay" class="method-detail">
|
313
|
+
<div class="method-heading attribute-method-heading">
|
314
|
+
<span class="method-name">port_delay</span><span
|
315
|
+
class="attribute-access-type">[R]</span>
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div class="method-description">
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</div>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<div id="attribute-i-port_result_code" class="method-detail">
|
326
|
+
<div class="method-heading attribute-method-heading">
|
327
|
+
<span class="method-name">port_result_code</span><span
|
328
|
+
class="attribute-access-type">[R]</span>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
<div class="method-description">
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</div>
|
336
|
+
</div>
|
337
|
+
|
338
|
+
<div id="attribute-i-ports_scanned" class="method-detail">
|
339
|
+
<div class="method-heading attribute-method-heading">
|
340
|
+
<span class="method-name">ports_scanned</span><span
|
341
|
+
class="attribute-access-type">[R]</span>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
<div class="method-description">
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
</div>
|
349
|
+
</div>
|
350
|
+
|
351
|
+
<div id="attribute-i-portspec" class="method-detail">
|
352
|
+
<div class="method-heading attribute-method-heading">
|
353
|
+
<span class="method-name">portspec</span><span
|
354
|
+
class="attribute-access-type">[R]</span>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div class="method-description">
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
</div>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div id="attribute-i-protocol" class="method-detail">
|
365
|
+
<div class="method-heading attribute-method-heading">
|
366
|
+
<span class="method-name">protocol</span><span
|
367
|
+
class="attribute-access-type">[R]</span>
|
368
|
+
</div>
|
369
|
+
|
370
|
+
<div class="method-description">
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
</div>
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div id="attribute-i-result_map" class="method-detail">
|
378
|
+
<div class="method-heading attribute-method-heading">
|
379
|
+
<span class="method-name">result_map</span><span
|
380
|
+
class="attribute-access-type">[R]</span>
|
381
|
+
</div>
|
382
|
+
|
383
|
+
<div class="method-description">
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
</div>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
<div id="attribute-i-status_code" class="method-detail">
|
391
|
+
<div class="method-heading attribute-method-heading">
|
392
|
+
<span class="method-name">status_code</span><span
|
393
|
+
class="attribute-access-type">[R]</span>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
<div class="method-description">
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
</div>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
<div id="attribute-i-timeout" class="method-detail">
|
404
|
+
<div class="method-heading attribute-method-heading">
|
405
|
+
<span class="method-name">timeout</span><span
|
406
|
+
class="attribute-access-type">[R]</span>
|
407
|
+
</div>
|
408
|
+
|
409
|
+
<div class="method-description">
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
</div>
|
414
|
+
</div>
|
415
|
+
|
416
|
+
<div id="attribute-i-transport" class="method-detail">
|
417
|
+
<div class="method-heading attribute-method-heading">
|
418
|
+
<span class="method-name">transport</span><span
|
419
|
+
class="attribute-access-type">[R]</span>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
<div class="method-description">
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</div>
|
427
|
+
</div>
|
428
|
+
|
429
|
+
</section><!-- attribute-method-details -->
|
430
|
+
|
431
|
+
|
432
|
+
<!-- Methods -->
|
433
|
+
|
434
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
435
|
+
<h3 class="section-header">Public Class Methods</h3>
|
436
|
+
|
437
|
+
|
438
|
+
<div id="method-c-new" class="method-detail ">
|
439
|
+
|
440
|
+
<div class="method-heading">
|
441
|
+
<span class="method-name">new</span><span
|
442
|
+
class="method-args">(command_server,protocol,transport,portspec,timeout)</span>
|
443
|
+
|
444
|
+
<span class="method-click-advice">click to toggle source</span>
|
445
|
+
|
446
|
+
</div>
|
447
|
+
|
448
|
+
|
449
|
+
<div class="method-description">
|
450
|
+
|
451
|
+
<p>@param [Firebind::Portspec] portspec</p>
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
<div class="method-source-code" id="new-source">
|
457
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 39</span>
|
458
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">command_server</span>,<span class="ruby-identifier">protocol</span>,<span class="ruby-identifier">transport</span>,<span class="ruby-identifier">portspec</span>,<span class="ruby-identifier">timeout</span>)
|
459
|
+
<span class="ruby-ivar">@command_server</span> = <span class="ruby-identifier">command_server</span>
|
460
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:SCAN_SETUP</span>
|
461
|
+
<span class="ruby-ivar">@protocol</span> = <span class="ruby-identifier">protocol</span>
|
462
|
+
<span class="ruby-ivar">@transport</span> = <span class="ruby-identifier">transport</span>
|
463
|
+
<span class="ruby-ivar">@portspec</span> = <span class="ruby-identifier">portspec</span>
|
464
|
+
<span class="ruby-ivar">@timeout</span> = <span class="ruby-identifier">timeout</span>
|
465
|
+
<span class="ruby-ivar">@guid</span> = <span class="ruby-constant">NIL</span>
|
466
|
+
<span class="ruby-ivar">@echo_server</span> = <span class="ruby-constant">NIL</span>
|
467
|
+
<span class="ruby-ivar">@port</span> = <span class="ruby-value">0</span>
|
468
|
+
<span class="ruby-ivar">@last_duration</span> = <span class="ruby-value">0</span>
|
469
|
+
<span class="ruby-ivar">@ports_scanned</span> = <span class="ruby-value">0</span>
|
470
|
+
<span class="ruby-ivar">@result_map</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>,<span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>]=[]} <span class="ruby-comment"># block form</span>
|
471
|
+
<span class="ruby-ivar">@message</span> = <span class="ruby-constant">NIL</span>
|
472
|
+
<span class="ruby-keyword">end</span></pre>
|
473
|
+
</div><!-- new-source -->
|
474
|
+
|
475
|
+
</div>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
</div><!-- new-method -->
|
481
|
+
|
482
|
+
|
483
|
+
</section><!-- public-class-method-details -->
|
484
|
+
|
485
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
486
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
487
|
+
|
488
|
+
|
489
|
+
<div id="method-i-closed_ports" class="method-detail ">
|
490
|
+
|
491
|
+
<div class="method-heading">
|
492
|
+
<span class="method-name">closed_ports</span><span
|
493
|
+
class="method-args">()</span>
|
494
|
+
|
495
|
+
<span class="method-click-advice">click to toggle source</span>
|
496
|
+
|
497
|
+
</div>
|
498
|
+
|
499
|
+
|
500
|
+
<div class="method-description">
|
501
|
+
|
502
|
+
<p>return a <a href="Portspec.html">Portspec</a> of the closed ports for this
|
503
|
+
scan</p>
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
<div class="method-source-code" id="closed_ports-source">
|
509
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 121</span>
|
510
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">closed_ports</span>
|
511
|
+
<span class="ruby-identifier">closed</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
|
512
|
+
<span class="ruby-ivar">@result_map</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">code</span>,<span class="ruby-identifier">ports</span><span class="ruby-operator">|</span>
|
513
|
+
<span class="ruby-identifier">closed</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">ports</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">code</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">$success</span>
|
514
|
+
<span class="ruby-keyword">end</span>
|
515
|
+
<span class="ruby-constant">Portspec</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">closed</span>)
|
516
|
+
<span class="ruby-keyword">end</span></pre>
|
517
|
+
</div><!-- closed_ports-source -->
|
518
|
+
|
519
|
+
</div>
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
</div><!-- closed_ports-method -->
|
525
|
+
|
526
|
+
|
527
|
+
<div id="method-i-description" class="method-detail ">
|
528
|
+
|
529
|
+
<div class="method-heading">
|
530
|
+
<span class="method-name">description</span><span
|
531
|
+
class="method-args">(port_result_code)</span>
|
532
|
+
|
533
|
+
<span class="method-click-advice">click to toggle source</span>
|
534
|
+
|
535
|
+
</div>
|
536
|
+
|
537
|
+
|
538
|
+
<div class="method-description">
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
<div class="method-source-code" id="description-source">
|
546
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 133</span>
|
547
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">description</span>(<span class="ruby-identifier">port_result_code</span>)
|
548
|
+
<span class="ruby-identifier">$result_code_messages</span>[<span class="ruby-identifier">port_result_code</span>]
|
549
|
+
<span class="ruby-keyword">end</span></pre>
|
550
|
+
</div><!-- description-source -->
|
551
|
+
|
552
|
+
</div>
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
</div><!-- description-method -->
|
558
|
+
|
559
|
+
|
560
|
+
<div id="method-i-on_error" class="method-detail ">
|
561
|
+
|
562
|
+
<div class="method-heading">
|
563
|
+
<span class="method-name">on_error</span><span
|
564
|
+
class="method-args">(status_code)</span>
|
565
|
+
|
566
|
+
<span class="method-click-advice">click to toggle source</span>
|
567
|
+
|
568
|
+
</div>
|
569
|
+
|
570
|
+
|
571
|
+
<div class="method-description">
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
<div class="method-source-code" id="on_error-source">
|
579
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 101</span>
|
580
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_error</span>(<span class="ruby-identifier">status_code</span>)
|
581
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:ERROR</span>
|
582
|
+
<span class="ruby-ivar">@status_code</span> = <span class="ruby-identifier">status_code</span>
|
583
|
+
<span class="ruby-keyword">end</span></pre>
|
584
|
+
</div><!-- on_error-source -->
|
585
|
+
|
586
|
+
</div>
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
</div><!-- on_error-method -->
|
592
|
+
|
593
|
+
|
594
|
+
<div id="method-i-on_port_complete" class="method-detail ">
|
595
|
+
|
596
|
+
<div class="method-heading">
|
597
|
+
<span class="method-name">on_port_complete</span><span
|
598
|
+
class="method-args">(port,port_result_code)</span>
|
599
|
+
|
600
|
+
<span class="method-click-advice">click to toggle source</span>
|
601
|
+
|
602
|
+
</div>
|
603
|
+
|
604
|
+
|
605
|
+
<div class="method-description">
|
606
|
+
|
607
|
+
<p>@param [Object] port</p>
|
608
|
+
|
609
|
+
|
610
|
+
|
611
|
+
|
612
|
+
<div class="method-source-code" id="on_port_complete-source">
|
613
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 83</span>
|
614
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_port_complete</span>(<span class="ruby-identifier">port</span>,<span class="ruby-identifier">port_result_code</span>)
|
615
|
+
<span class="ruby-ivar">@port_end_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
616
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:PORT_COMPLETE</span>
|
617
|
+
<span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
|
618
|
+
<span class="ruby-ivar">@port_result_code</span> = <span class="ruby-identifier">port_result_code</span>
|
619
|
+
<span class="ruby-ivar">@ports_scanned</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
|
620
|
+
<span class="ruby-ivar">@result_map</span>[<span class="ruby-identifier">port_result_code</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">port</span>
|
621
|
+
<span class="ruby-keyword">end</span></pre>
|
622
|
+
</div><!-- on_port_complete-source -->
|
623
|
+
|
624
|
+
</div>
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
</div><!-- on_port_complete-method -->
|
630
|
+
|
631
|
+
|
632
|
+
<div id="method-i-on_port_start" class="method-detail ">
|
633
|
+
|
634
|
+
<div class="method-heading">
|
635
|
+
<span class="method-name">on_port_start</span><span
|
636
|
+
class="method-args">(port)</span>
|
637
|
+
|
638
|
+
<span class="method-click-advice">click to toggle source</span>
|
639
|
+
|
640
|
+
</div>
|
641
|
+
|
642
|
+
|
643
|
+
<div class="method-description">
|
644
|
+
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
<div class="method-source-code" id="on_port_start-source">
|
651
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 72</span>
|
652
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_port_start</span>(<span class="ruby-identifier">port</span>)
|
653
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:PORT_START</span>
|
654
|
+
<span class="ruby-ivar">@port</span> = <span class="ruby-identifier">port</span>
|
655
|
+
<span class="ruby-ivar">@port_start_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
656
|
+
<span class="ruby-keyword">end</span></pre>
|
657
|
+
</div><!-- on_port_start-source -->
|
658
|
+
|
659
|
+
</div>
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
</div><!-- on_port_start-method -->
|
665
|
+
|
666
|
+
|
667
|
+
<div id="method-i-on_port_tick" class="method-detail ">
|
668
|
+
|
669
|
+
<div class="method-heading">
|
670
|
+
<span class="method-name">on_port_tick</span><span
|
671
|
+
class="method-args">()</span>
|
672
|
+
|
673
|
+
<span class="method-click-advice">click to toggle source</span>
|
674
|
+
|
675
|
+
</div>
|
676
|
+
|
677
|
+
|
678
|
+
<div class="method-description">
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
<div class="method-source-code" id="on_port_tick-source">
|
686
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 78</span>
|
687
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_port_tick</span>
|
688
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:PORT_TICK</span>
|
689
|
+
<span class="ruby-keyword">end</span></pre>
|
690
|
+
</div><!-- on_port_tick-source -->
|
691
|
+
|
692
|
+
</div>
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
</div><!-- on_port_tick-method -->
|
698
|
+
|
699
|
+
|
700
|
+
<div id="method-i-on_scan_complete" class="method-detail ">
|
701
|
+
|
702
|
+
<div class="method-heading">
|
703
|
+
<span class="method-name">on_scan_complete</span><span
|
704
|
+
class="method-args">(status_code)</span>
|
705
|
+
|
706
|
+
<span class="method-click-advice">click to toggle source</span>
|
707
|
+
|
708
|
+
</div>
|
709
|
+
|
710
|
+
|
711
|
+
<div class="method-description">
|
712
|
+
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
|
718
|
+
<div class="method-source-code" id="on_scan_complete-source">
|
719
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 92</span>
|
720
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_scan_complete</span>(<span class="ruby-identifier">status_code</span>)
|
721
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:SCAN_COMPLETE</span>
|
722
|
+
<span class="ruby-ivar">@status_code</span> = <span class="ruby-identifier">status_code</span>
|
723
|
+
<span class="ruby-keyword">end</span></pre>
|
724
|
+
</div><!-- on_scan_complete-source -->
|
725
|
+
|
726
|
+
</div>
|
727
|
+
|
728
|
+
|
729
|
+
|
730
|
+
|
731
|
+
</div><!-- on_scan_complete-method -->
|
732
|
+
|
733
|
+
|
734
|
+
<div id="method-i-on_scan_start" class="method-detail ">
|
735
|
+
|
736
|
+
<div class="method-heading">
|
737
|
+
<span class="method-name">on_scan_start</span><span
|
738
|
+
class="method-args">(guid,echo_server,port_delay)</span>
|
739
|
+
|
740
|
+
<span class="method-click-advice">click to toggle source</span>
|
741
|
+
|
742
|
+
</div>
|
743
|
+
|
744
|
+
|
745
|
+
<div class="method-description">
|
746
|
+
|
747
|
+
<p>lifecycle methods</p>
|
748
|
+
|
749
|
+
|
750
|
+
|
751
|
+
|
752
|
+
<div class="method-source-code" id="on_scan_start-source">
|
753
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 60</span>
|
754
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_scan_start</span>(<span class="ruby-identifier">guid</span>,<span class="ruby-identifier">echo_server</span>,<span class="ruby-identifier">port_delay</span>)
|
755
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:SCAN_START</span>
|
756
|
+
<span class="ruby-ivar">@guid</span> = <span class="ruby-identifier">guid</span>
|
757
|
+
<span class="ruby-ivar">@echo_server</span> = <span class="ruby-identifier">echo_server</span>
|
758
|
+
<span class="ruby-ivar">@port_delay</span> = <span class="ruby-identifier">port_delay</span>
|
759
|
+
<span class="ruby-keyword">end</span></pre>
|
760
|
+
</div><!-- on_scan_start-source -->
|
761
|
+
|
762
|
+
</div>
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
|
767
|
+
</div><!-- on_scan_start-method -->
|
768
|
+
|
769
|
+
|
770
|
+
<div id="method-i-on_scan_stop" class="method-detail ">
|
771
|
+
|
772
|
+
<div class="method-heading">
|
773
|
+
<span class="method-name">on_scan_stop</span><span
|
774
|
+
class="method-args">()</span>
|
775
|
+
|
776
|
+
<span class="method-click-advice">click to toggle source</span>
|
777
|
+
|
778
|
+
</div>
|
779
|
+
|
780
|
+
|
781
|
+
<div class="method-description">
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
<div class="method-source-code" id="on_scan_stop-source">
|
789
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 97</span>
|
790
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_scan_stop</span>
|
791
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:SCAN_STOPPED</span>
|
792
|
+
<span class="ruby-keyword">end</span></pre>
|
793
|
+
</div><!-- on_scan_stop-source -->
|
794
|
+
|
795
|
+
</div>
|
796
|
+
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
</div><!-- on_scan_stop-method -->
|
801
|
+
|
802
|
+
|
803
|
+
<div id="method-i-on_start_failure" class="method-detail ">
|
804
|
+
|
805
|
+
<div class="method-heading">
|
806
|
+
<span class="method-name">on_start_failure</span><span
|
807
|
+
class="method-args">(status_code)</span>
|
808
|
+
|
809
|
+
<span class="method-click-advice">click to toggle source</span>
|
810
|
+
|
811
|
+
</div>
|
812
|
+
|
813
|
+
|
814
|
+
<div class="method-description">
|
815
|
+
|
816
|
+
|
817
|
+
|
818
|
+
|
819
|
+
|
820
|
+
|
821
|
+
<div class="method-source-code" id="on_start_failure-source">
|
822
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 67</span>
|
823
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">on_start_failure</span>(<span class="ruby-identifier">status_code</span>)
|
824
|
+
<span class="ruby-ivar">@current_state</span> = <span class="ruby-value">:START_FAILURE</span>
|
825
|
+
<span class="ruby-ivar">@status_code</span> = <span class="ruby-identifier">status_code</span>
|
826
|
+
<span class="ruby-keyword">end</span></pre>
|
827
|
+
</div><!-- on_start_failure-source -->
|
828
|
+
|
829
|
+
</div>
|
830
|
+
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
</div><!-- on_start_failure-method -->
|
835
|
+
|
836
|
+
|
837
|
+
<div id="method-i-open_ports" class="method-detail ">
|
838
|
+
|
839
|
+
<div class="method-heading">
|
840
|
+
<span class="method-name">open_ports</span><span
|
841
|
+
class="method-args">()</span>
|
842
|
+
|
843
|
+
<span class="method-click-advice">click to toggle source</span>
|
844
|
+
|
845
|
+
</div>
|
846
|
+
|
847
|
+
|
848
|
+
<div class="method-description">
|
849
|
+
|
850
|
+
<p>return a <a href="Portspec.html">Portspec</a> of the open ports for this
|
851
|
+
scan</p>
|
852
|
+
|
853
|
+
|
854
|
+
|
855
|
+
|
856
|
+
<div class="method-source-code" id="open_ports-source">
|
857
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 116</span>
|
858
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">open_ports</span>
|
859
|
+
<span class="ruby-constant">Portspec</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@result_map</span>[<span class="ruby-identifier">$success</span>])
|
860
|
+
<span class="ruby-keyword">end</span></pre>
|
861
|
+
</div><!-- open_ports-source -->
|
862
|
+
|
863
|
+
</div>
|
864
|
+
|
865
|
+
|
866
|
+
|
867
|
+
|
868
|
+
</div><!-- open_ports-method -->
|
869
|
+
|
870
|
+
|
871
|
+
<div id="method-i-percent_complete" class="method-detail ">
|
872
|
+
|
873
|
+
<div class="method-heading">
|
874
|
+
<span class="method-name">percent_complete</span><span
|
875
|
+
class="method-args">()</span>
|
876
|
+
|
877
|
+
<span class="method-click-advice">click to toggle source</span>
|
878
|
+
|
879
|
+
</div>
|
880
|
+
|
881
|
+
|
882
|
+
<div class="method-description">
|
883
|
+
|
884
|
+
|
885
|
+
|
886
|
+
|
887
|
+
|
888
|
+
|
889
|
+
<div class="method-source-code" id="percent_complete-source">
|
890
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 111</span>
|
891
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">percent_complete</span>
|
892
|
+
((<span class="ruby-ivar">@ports_scanned</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-ivar">@portspec</span>.<span class="ruby-identifier">size</span>.<span class="ruby-identifier">to_f</span>) <span class="ruby-operator">*</span> <span class="ruby-value">100</span>).<span class="ruby-identifier">to_i</span>
|
893
|
+
<span class="ruby-keyword">end</span></pre>
|
894
|
+
</div><!-- percent_complete-source -->
|
895
|
+
|
896
|
+
</div>
|
897
|
+
|
898
|
+
|
899
|
+
|
900
|
+
|
901
|
+
</div><!-- percent_complete-method -->
|
902
|
+
|
903
|
+
|
904
|
+
<div id="method-i-port_delay_seconds" class="method-detail ">
|
905
|
+
|
906
|
+
<div class="method-heading">
|
907
|
+
<span class="method-name">port_delay_seconds</span><span
|
908
|
+
class="method-args">()</span>
|
909
|
+
|
910
|
+
<span class="method-click-advice">click to toggle source</span>
|
911
|
+
|
912
|
+
</div>
|
913
|
+
|
914
|
+
|
915
|
+
<div class="method-description">
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
|
922
|
+
<div class="method-source-code" id="port_delay_seconds-source">
|
923
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 129</span>
|
924
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">port_delay_seconds</span>
|
925
|
+
<span class="ruby-ivar">@port_delay</span>.<span class="ruby-identifier">to_f</span> <span class="ruby-operator">/</span> <span class="ruby-value">1000</span>
|
926
|
+
<span class="ruby-keyword">end</span></pre>
|
927
|
+
</div><!-- port_delay_seconds-source -->
|
928
|
+
|
929
|
+
</div>
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
</div><!-- port_delay_seconds-method -->
|
935
|
+
|
936
|
+
|
937
|
+
<div id="method-i-port_duration" class="method-detail ">
|
938
|
+
|
939
|
+
<div class="method-heading">
|
940
|
+
<span class="method-name">port_duration</span><span
|
941
|
+
class="method-args">()</span>
|
942
|
+
|
943
|
+
<span class="method-click-advice">click to toggle source</span>
|
944
|
+
|
945
|
+
</div>
|
946
|
+
|
947
|
+
|
948
|
+
<div class="method-description">
|
949
|
+
|
950
|
+
<p>data methods</p>
|
951
|
+
|
952
|
+
|
953
|
+
|
954
|
+
|
955
|
+
<div class="method-source-code" id="port_duration-source">
|
956
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 107</span>
|
957
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">port_duration</span>
|
958
|
+
(((<span class="ruby-ivar">@port_end_time</span> <span class="ruby-operator">-</span> <span class="ruby-ivar">@port_start_time</span>) <span class="ruby-operator">*</span> <span class="ruby-value">1000</span>)<span class="ruby-operator">+</span><span class="ruby-value">0.5</span>).<span class="ruby-identifier">to_i</span>
|
959
|
+
<span class="ruby-keyword">end</span></pre>
|
960
|
+
</div><!-- port_duration-source -->
|
961
|
+
|
962
|
+
</div>
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
</div><!-- port_duration-method -->
|
968
|
+
|
969
|
+
|
970
|
+
<div id="method-i-to_s" class="method-detail ">
|
971
|
+
|
972
|
+
<div class="method-heading">
|
973
|
+
<span class="method-name">to_s</span><span
|
974
|
+
class="method-args">()</span>
|
975
|
+
|
976
|
+
<span class="method-click-advice">click to toggle source</span>
|
977
|
+
|
978
|
+
</div>
|
979
|
+
|
980
|
+
|
981
|
+
<div class="method-description">
|
982
|
+
|
983
|
+
|
984
|
+
|
985
|
+
|
986
|
+
|
987
|
+
|
988
|
+
<div class="method-source-code" id="to_s-source">
|
989
|
+
<pre><span class="ruby-comment"># File lib/firebind/scan_state.rb, line 55</span>
|
990
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
991
|
+
<span class="ruby-node">"#{@current_state.to_s} port #{@port} results #{@result_map}"</span>
|
992
|
+
<span class="ruby-keyword">end</span></pre>
|
993
|
+
</div><!-- to_s-source -->
|
994
|
+
|
995
|
+
</div>
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
</div><!-- to_s-method -->
|
1001
|
+
|
1002
|
+
|
1003
|
+
</section><!-- public-instance-method-details -->
|
1004
|
+
|
1005
|
+
</section><!-- 5Buntitled-5D -->
|
1006
|
+
|
1007
|
+
</div><!-- documentation -->
|
1008
|
+
|
1009
|
+
|
1010
|
+
<footer id="validator-badges">
|
1011
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
1012
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.1.
|
1013
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
1014
|
+
</footer>
|
1015
|
+
|