silo_manager 0.0.5 → 0.0.6

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 (5) hide show
  1. data/bin/silo_manager +614 -464
  2. data/lib/nexpose.rb +2809 -2738
  3. data/lib/options.rb +33 -33
  4. data/lib/test.rb +7 -7
  5. metadata +34 -55
data/lib/options.rb CHANGED
@@ -1,34 +1,34 @@
1
- require 'ostruct'
2
- require 'optparse'
3
-
4
- #------------------------------------------------------------------------------------------------------
5
- # Defines options to be executed against the NeXpose API
6
- #------------------------------------------------------------------------------------------------------
7
- class Options
8
- def self.parse(args)
9
- options = OpenStruct.new
10
- options.port = 3780
11
- options.host = 'localhost'
12
-
13
-
14
- option_parser = OptionParser.new do |option_parser|
15
- option_parser.on("-h host", "The network address of the NeXpose instance - Defaults to 'localhost'") { |arg| options.host=arg.chomp }
16
- option_parser.on("-u user_name", "The NeXpose user name - Required") { |arg| options.user=arg.chomp }
17
- option_parser.on("-p password", "The NeXpose password - Required") { |arg| options.password=arg.chomp }
18
- option_parser.on("--port port", "The NSC port - Defaults to 3780") { |arg| options.port=arg.chomp }
19
- option_parser.on_tail("--help", "Help") do
20
- puts option_parser
21
- exit 0
22
- end
23
- end
24
-
25
- begin
26
- option_parser.parse!(args)
27
- rescue OptionParser::ParseError => e
28
- puts "#{e}\n\n#{option_parser}"
29
- exit 1
30
- end
31
-
32
- options
33
- end
1
+ require 'ostruct'
2
+ require 'optparse'
3
+
4
+ #------------------------------------------------------------------------------------------------------
5
+ # Defines options to be executed against the NeXpose API
6
+ #------------------------------------------------------------------------------------------------------
7
+ class Options
8
+ def self.parse(args)
9
+ options = OpenStruct.new
10
+ options.port = 3780
11
+ options.host = 'localhost'
12
+
13
+
14
+ option_parser = OptionParser.new do |option_parser|
15
+ option_parser.on("-h host", "The network address of the NeXpose instance - Defaults to 'localhost'") { |arg| options.host=arg.chomp }
16
+ option_parser.on("-u user_name", "The NeXpose user name - Required") { |arg| options.user=arg.chomp }
17
+ option_parser.on("-p password", "The NeXpose password - Required") { |arg| options.password=arg.chomp }
18
+ option_parser.on("--port port", "The NSC port - Defaults to 3780") { |arg| options.port=arg.chomp }
19
+ option_parser.on_tail("--help", "Help") do
20
+ puts option_parser
21
+ exit 0
22
+ end
23
+ end
24
+
25
+ begin
26
+ option_parser.parse!(args)
27
+ rescue OptionParser::ParseError => e
28
+ puts "#{e}\n\n#{option_parser}"
29
+ exit 1
30
+ end
31
+
32
+ options
33
+ end
34
34
  end
data/lib/test.rb CHANGED
@@ -1,8 +1,8 @@
1
- # encoding: utf-8
2
- begin
3
- test = {}
4
- test['hi-hi'] = true
5
- unless test['hi-hi']
6
- puts "Hi"
7
- end
1
+ # encoding: utf-8
2
+ begin
3
+ test = {}
4
+ test['hi-hi'] = true
5
+ unless test['hi-hi']
6
+ puts "Hi"
7
+ end
8
8
  end
metadata CHANGED
@@ -1,85 +1,64 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: silo_manager
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 5
10
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
5
+ prerelease:
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Christopher Lee
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-10-13 00:00:00 -05:00
12
+ date: 2011-10-13 00:00:00.000000000 -05:00
19
13
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
22
16
  name: librex
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &23566284 !ruby/object:Gem::Requirement
25
18
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 95
30
- segments:
31
- - 0
32
- - 0
33
- - 32
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
34
22
  version: 0.0.32
35
23
  type: :runtime
36
- version_requirements: *id001
37
- description: " This is a tool is used to provide CRUD silo operations.\n"
24
+ prerelease: false
25
+ version_requirements: *23566284
26
+ description: ! ' This is a tool is used to provide CRUD silo operations for Nexpose.
27
+
28
+ '
38
29
  email: christopher_lee@rapid7.com
39
- executables:
30
+ executables:
40
31
  - silo_manager
41
32
  extensions: []
42
-
43
33
  extra_rdoc_files: []
44
-
45
- files:
34
+ files:
46
35
  - lib/nexpose.rb
47
- - lib/test.rb
48
36
  - lib/options.rb
37
+ - lib/test.rb
49
38
  - bin/silo_manager
50
39
  has_rdoc: true
51
- homepage: https://github.com/chrlee/Nexpose_silo_manager
40
+ homepage: https://github.com/chrlee/silo_manager
52
41
  licenses: []
53
-
54
42
  post_install_message:
55
43
  rdoc_options: []
56
-
57
- require_paths:
44
+ require_paths:
58
45
  - lib
59
- required_ruby_version: !ruby/object:Gem::Requirement
46
+ required_ruby_version: !ruby/object:Gem::Requirement
60
47
  none: false
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- hash: 3
65
- segments:
66
- - 0
67
- version: "0"
68
- required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
53
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
77
58
  requirements: []
78
-
79
59
  rubyforge_project:
80
- rubygems_version: 1.3.7
60
+ rubygems_version: 1.5.2
81
61
  signing_key:
82
62
  specification_version: 3
83
- summary: This is a tool is used to provide CRUD silo operations.
63
+ summary: This is a tool is used to provide CRUD silo operations for Nexpose.
84
64
  test_files: []
85
-