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.
Files changed (77) hide show
  1. data/LICENSE.txt +202 -0
  2. data/README.txt +37 -0
  3. data/USAGE.txt +43 -0
  4. data/VERSION.txt +4 -0
  5. data/bin/firescan +4 -0
  6. data/build +7 -0
  7. data/doc/Example.html +224 -0
  8. data/doc/Firebind.html +213 -0
  9. data/doc/Firebind/Client.html +750 -0
  10. data/doc/Firebind/Portspec.html +390 -0
  11. data/doc/Firebind/Scan.html +413 -0
  12. data/doc/Firebind/ScanError.html +277 -0
  13. data/doc/Firebind/ScanState.html +1015 -0
  14. data/doc/Firebind/SimpleProtocol.html +292 -0
  15. data/doc/Firebind/TcpTransport.html +481 -0
  16. data/doc/Firebind/Transport.html +275 -0
  17. data/doc/Firebind/UdpTransport.html +472 -0
  18. data/doc/LICENSE_txt.html +323 -0
  19. data/doc/README_txt.html +171 -0
  20. data/doc/Runner.html +166 -0
  21. data/doc/TestPortspec.html +289 -0
  22. data/doc/Tools.html +321 -0
  23. data/doc/USAGE_txt.html +184 -0
  24. data/doc/VERSION_txt.html +126 -0
  25. data/doc/build.html +125 -0
  26. data/doc/created.rid +22 -0
  27. data/doc/doc/created_rid.html +121 -0
  28. data/doc/firescan_gemspec.html +140 -0
  29. data/doc/images/add.png +0 -0
  30. data/doc/images/arrow_up.png +0 -0
  31. data/doc/images/brick.png +0 -0
  32. data/doc/images/brick_link.png +0 -0
  33. data/doc/images/bug.png +0 -0
  34. data/doc/images/bullet_black.png +0 -0
  35. data/doc/images/bullet_toggle_minus.png +0 -0
  36. data/doc/images/bullet_toggle_plus.png +0 -0
  37. data/doc/images/date.png +0 -0
  38. data/doc/images/delete.png +0 -0
  39. data/doc/images/find.png +0 -0
  40. data/doc/images/loadingAnimation.gif +0 -0
  41. data/doc/images/macFFBgHack.png +0 -0
  42. data/doc/images/package.png +0 -0
  43. data/doc/images/page_green.png +0 -0
  44. data/doc/images/page_white_text.png +0 -0
  45. data/doc/images/page_white_width.png +0 -0
  46. data/doc/images/plugin.png +0 -0
  47. data/doc/images/ruby.png +0 -0
  48. data/doc/images/tag_blue.png +0 -0
  49. data/doc/images/tag_green.png +0 -0
  50. data/doc/images/transparent.png +0 -0
  51. data/doc/images/wrench.png +0 -0
  52. data/doc/images/wrench_orange.png +0 -0
  53. data/doc/images/zoom.png +0 -0
  54. data/doc/index.html +118 -0
  55. data/doc/js/darkfish.js +155 -0
  56. data/doc/js/jquery.js +18 -0
  57. data/doc/js/navigation.js +142 -0
  58. data/doc/js/search.js +94 -0
  59. data/doc/js/search_index.js +1 -0
  60. data/doc/js/searcher.js +228 -0
  61. data/doc/rdoc.css +595 -0
  62. data/doc/table_of_contents.html +230 -0
  63. data/firescan.gemspec +18 -0
  64. data/lib/example.rb +20 -0
  65. data/lib/firebind/client.rb +308 -0
  66. data/lib/firebind/portspec.rb +107 -0
  67. data/lib/firebind/scan.rb +288 -0
  68. data/lib/firebind/scan_error.rb +32 -0
  69. data/lib/firebind/scan_state.rb +140 -0
  70. data/lib/firebind/simple_protocol.rb +59 -0
  71. data/lib/firebind/tcp_transport.rb +184 -0
  72. data/lib/firebind/tools.rb +107 -0
  73. data/lib/firebind/transport.rb +44 -0
  74. data/lib/firebind/udp_transport.rb +174 -0
  75. data/test/portspec_test.rb +53 -0
  76. data/test/runner.rb +7 -0
  77. metadata +136 -0
@@ -0,0 +1,53 @@
1
+ require 'test/unit'
2
+ require 'shoulda'
3
+ require_relative '../lib/firebind/portspec'
4
+
5
+ class TestPortspec < Test::Unit::TestCase
6
+
7
+ # Called before every test method runs. Can be used
8
+ # to set up fixture information.
9
+ def setup
10
+ # Do nothing
11
+ end
12
+
13
+ # Called after every test method runs. Can be used to tear
14
+ # down fixture information.
15
+
16
+ def teardown
17
+ # Do nothing
18
+ end
19
+
20
+ # Fake test
21
+ def test_fail
22
+
23
+
24
+ #fail('Not implemented')
25
+ end
26
+
27
+
28
+ context 'parsing' do
29
+
30
+ should 'properly handle out of order ports and collapse ranges' do
31
+ assert_equal(Firebind::Portspec.new('6,5,4,3,2,50-60').to_s, '2-6,50-60')
32
+ end
33
+
34
+ should 'reject invalid characters' do
35
+ assert_raises(ArgumentError) do
36
+ Firebind::Portspec.new('1-10,abc,20,30')
37
+ end
38
+ end
39
+
40
+ should 'handle out of order ports and contiguous ranges' do
41
+ assert_equal(Firebind::Portspec.new('6,5,4445,4,3,2,50-60,666,69,55,65534,65535').to_s, '2-6,50-60,69,666,4445,65534-65535')
42
+ end
43
+
44
+ should 'reject invalid port numbers' do
45
+ assert_raises(ArgumentError) do
46
+ Firebind::Portspec.new('1-10,65536')
47
+ end
48
+ end
49
+
50
+
51
+ end
52
+
53
+ end
@@ -0,0 +1,7 @@
1
+ require_relative '../lib/firebind/client'
2
+
3
+ class Runner
4
+ client = Firebind::Client.new(ARGV)
5
+ client.run
6
+
7
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: firescan
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.07'
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Jay Houghton
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-12-02 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: ! "firescan-ruby\n=============\n\nRuby reference implementation for
15
+ the Firebind Firescan path scan client This code has been tested to work\nwith Ruby
16
+ 1.9.3 and Firebind Reflector 1.0.\n\nIntegration\n===========\n\nIntegrating the
17
+ Firescan library is straight forward. It uses a single object 'Scan' and a simple
18
+ callback\nmechanism using Ruby's built-in Observer feature. Create a Scan object,
19
+ pass it your handler (something that\nimplements the Observer update method) and
20
+ run the Scan. A handler update method might look like this:\n\n def update(state)\n
21
+ \ case state.current_state\n when :PORT_COMPLETE\n puts \"Port
22
+ #{state.port} #{state.description(state.port_result_code)}\"\n when :PORT_START\n
23
+ \ when :PORT_TICK\n when :SCAN_START\n when :START_FAILURE\n
24
+ \ when :SCAN_COMPLETE\n else\n end\n end\n\n\nThen create and
25
+ run a Scan object like this:\n\n\n scan = Firebind::Scan.new('scanme.firebind.com','1-10',:UDP)\n
26
+ \ scan.add_observer myHandler\n state = scan.scan\n\nSee the lib/example.rb
27
+ script for a simple working example.\n\n\n"
28
+ email: jay@firebind.com
29
+ executables:
30
+ - firescan
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - build
35
+ - LICENSE.txt
36
+ - test/portspec_test.rb
37
+ - test/runner.rb
38
+ - lib/firebind/scan_error.rb
39
+ - lib/firebind/client.rb
40
+ - lib/firebind/udp_transport.rb
41
+ - lib/firebind/tcp_transport.rb
42
+ - lib/firebind/scan_state.rb
43
+ - lib/firebind/transport.rb
44
+ - lib/firebind/simple_protocol.rb
45
+ - lib/firebind/tools.rb
46
+ - lib/firebind/scan.rb
47
+ - lib/firebind/portspec.rb
48
+ - lib/example.rb
49
+ - USAGE.txt
50
+ - bin/firescan
51
+ - doc/index.html
52
+ - doc/rdoc.css
53
+ - doc/images/ruby.png
54
+ - doc/images/macFFBgHack.png
55
+ - doc/images/bullet_toggle_minus.png
56
+ - doc/images/arrow_up.png
57
+ - doc/images/package.png
58
+ - doc/images/bug.png
59
+ - doc/images/loadingAnimation.gif
60
+ - doc/images/page_green.png
61
+ - doc/images/date.png
62
+ - doc/images/page_white_width.png
63
+ - doc/images/page_white_text.png
64
+ - doc/images/plugin.png
65
+ - doc/images/delete.png
66
+ - doc/images/bullet_toggle_plus.png
67
+ - doc/images/brick_link.png
68
+ - doc/images/tag_blue.png
69
+ - doc/images/transparent.png
70
+ - doc/images/tag_green.png
71
+ - doc/images/wrench.png
72
+ - doc/images/wrench_orange.png
73
+ - doc/images/add.png
74
+ - doc/images/brick.png
75
+ - doc/images/bullet_black.png
76
+ - doc/images/find.png
77
+ - doc/images/zoom.png
78
+ - doc/LICENSE_txt.html
79
+ - doc/Example.html
80
+ - doc/Runner.html
81
+ - doc/build.html
82
+ - doc/Firebind/SimpleProtocol.html
83
+ - doc/Firebind/Portspec.html
84
+ - doc/Firebind/Transport.html
85
+ - doc/Firebind/Scan.html
86
+ - doc/Firebind/TcpTransport.html
87
+ - doc/Firebind/ScanState.html
88
+ - doc/Firebind/ScanError.html
89
+ - doc/Firebind/Client.html
90
+ - doc/Firebind/UdpTransport.html
91
+ - doc/Tools.html
92
+ - doc/js/darkfish.js
93
+ - doc/js/searcher.js
94
+ - doc/js/navigation.js
95
+ - doc/js/search_index.js
96
+ - doc/js/search.js
97
+ - doc/js/jquery.js
98
+ - doc/README_txt.html
99
+ - doc/created.rid
100
+ - doc/TestPortspec.html
101
+ - doc/USAGE_txt.html
102
+ - doc/VERSION_txt.html
103
+ - doc/table_of_contents.html
104
+ - doc/firescan_gemspec.html
105
+ - doc/doc/created_rid.html
106
+ - doc/Firebind.html
107
+ - VERSION.txt
108
+ - firescan.gemspec
109
+ - README.txt
110
+ homepage: http://www.firebind.com
111
+ licenses: []
112
+ post_install_message:
113
+ rdoc_options: []
114
+ require_paths:
115
+ - lib
116
+ required_ruby_version: !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ! '>='
120
+ - !ruby/object:Gem::Version
121
+ version: '1.9'
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ requirements:
129
+ - none
130
+ rubyforge_project:
131
+ rubygems_version: 1.8.25
132
+ signing_key:
133
+ specification_version: 3
134
+ summary: Perform network path scanning
135
+ test_files: []
136
+ has_rdoc: false