openvas-cli 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ gem "activesupport", ">= 3.0.5"
5
+ gem 'activerecord', '>= 3.0.5'
6
+ gem 'nokogiri', '>= 1.4.4'
7
+
8
+ # Add dependencies to develop your gem here.
9
+ # Include everything needed to run rake, tests, features, etc.
10
+ group :development do
11
+ gem "rspec", "~> 2.3.0"
12
+ # gem "cucumber", ">= 0"
13
+ gem "bundler", "~> 1.0.0"
14
+ gem "jeweler", "~> 1.5.2"
15
+ gem "rcov", ">= 0"
16
+ gem "ZenTest"
17
+ gem 'log4r'
18
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,50 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ ZenTest (4.5.0)
5
+ activemodel (3.0.5)
6
+ activesupport (= 3.0.5)
7
+ builder (~> 2.1.2)
8
+ i18n (~> 0.4)
9
+ activerecord (3.0.5)
10
+ activemodel (= 3.0.5)
11
+ activesupport (= 3.0.5)
12
+ arel (~> 2.0.2)
13
+ tzinfo (~> 0.3.23)
14
+ activesupport (3.0.5)
15
+ arel (2.0.9)
16
+ builder (2.1.2)
17
+ diff-lcs (1.1.2)
18
+ git (1.2.5)
19
+ i18n (0.5.0)
20
+ jeweler (1.5.2)
21
+ bundler (~> 1.0.0)
22
+ git (>= 1.2.5)
23
+ rake
24
+ log4r (1.1.9)
25
+ nokogiri (1.4.4)
26
+ rake (0.8.7)
27
+ rcov (0.9.9)
28
+ rspec (2.3.0)
29
+ rspec-core (~> 2.3.0)
30
+ rspec-expectations (~> 2.3.0)
31
+ rspec-mocks (~> 2.3.0)
32
+ rspec-core (2.3.1)
33
+ rspec-expectations (2.3.0)
34
+ diff-lcs (~> 1.1.2)
35
+ rspec-mocks (2.3.0)
36
+ tzinfo (0.3.24)
37
+
38
+ PLATFORMS
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ ZenTest
43
+ activerecord (>= 3.0.5)
44
+ activesupport (>= 3.0.5)
45
+ bundler (~> 1.0.0)
46
+ jeweler (~> 1.5.2)
47
+ log4r
48
+ nokogiri (>= 1.4.4)
49
+ rcov
50
+ rspec (~> 2.3.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,250 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+
3
+ Version 2, June 1991
4
+
5
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
6
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
7
+
8
+ Everyone is permitted to copy and distribute verbatim copies
9
+ of this license document, but changing it is not allowed.
10
+
11
+ Preamble
12
+
13
+ The licenses for most software are designed to take away your freedom to share
14
+ and change it. By contrast, the GNU General Public License is intended to guarantee
15
+ your freedom to share and change free software--to make sure the software is
16
+ free for all its users. This General Public License applies to most of the Free
17
+ Software Foundation's software and to any other program whose authors commit to
18
+ using it. (Some other Free Software Foundation software is covered by the GNU
19
+ Lesser General Public License instead.) You can apply it to your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not price. Our
22
+ General Public Licenses are designed to make sure that you have the freedom to
23
+ distribute copies of free software (and charge for this service if you wish),
24
+ that you receive source code or can get it if you want it, that you can change
25
+ the software or use pieces of it in new free programs; and that you know you can
26
+ do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid anyone to deny
29
+ you these rights or to ask you to surrender the rights. These restrictions
30
+ translate to certain responsibilities for you if you distribute copies of the
31
+ software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether gratis or for a
34
+ fee, you must give the recipients all the rights that you have. You must make
35
+ sure that they, too, receive or can get the source code. And you must show them
36
+ these terms so they know their rights.
37
+
38
+ We protect your rights with two steps: (1) copyright the software, and (2) offer
39
+ you this license which gives you legal permission to copy, distribute and/or
40
+ modify the software.
41
+
42
+ Also, for each author's protection and ours, we want to make certain that
43
+ everyone understands that there is no warranty for this free software. If the
44
+ software is modified by someone else and passed on, we want its recipients to
45
+ know that what they have is not the original, so that any problems introduced by
46
+ others will not reflect on the original authors' reputations.
47
+
48
+ Finally, any free program is threatened constantly by software patents. We wish
49
+ to avoid the danger that redistributors of a free program will individually
50
+ obtain patent licenses, in effect making the program proprietary. To prevent
51
+ this, we have made it clear that any patent must be licensed for everyone's free
52
+ use or not licensed at all.
53
+
54
+ The precise terms and conditions for copying, distribution and modification follow.
55
+
56
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
57
+
58
+ 0. This License applies to any program or other work which contains a notice
59
+ placed by the copyright holder saying it may be distributed under the terms of
60
+ this General Public License. The "Program", below, refers to any such program or
61
+ work, and a "work based on the Program" means either the Program or any
62
+ derivative work under copyright law: that is to say, a work containing the
63
+ Program or a portion of it, either verbatim or with modifications and/or
64
+ translated into another language. (Hereinafter, translation is included without
65
+ limitation in the term "modification".) Each licensee is addressed as "you".
66
+
67
+ Activities other than copying, distribution and modification are not covered by
68
+ this License; they are outside its scope. The act of running the Program is not
69
+ restricted, and the output from the Program is covered only if its contents
70
+ constitute a work based on the Program (independent of having been made by
71
+ running the Program). Whether that is true depends on what the Program does.
72
+
73
+ 1. You may copy and distribute verbatim copies of the Program's source code as
74
+ you receive it, in any medium, provided that you conspicuously and appropriately
75
+ publish on each copy an appropriate copyright notice and disclaimer of warranty;
76
+ keep intact all the notices that refer to this License and to the absence of any
77
+ warranty; and give any other recipients of the Program a copy of this License
78
+ along with the Program.
79
+
80
+ You may charge a fee for the physical act of transferring a copy, and you may at
81
+ your option offer warranty protection in exchange for a fee.
82
+
83
+ 2. You may modify your copy or copies of the Program or any portion of it, thus
84
+ forming a work based on the Program, and copy and distribute such modifications
85
+ or work under the terms of Section 1 above, provided that you also meet all of
86
+ these conditions:
87
+
88
+ a) You must cause the modified files to carry prominent notices stating that you
89
+ changed the files and the date of any change.
90
+
91
+ b) You must cause any work that you distribute or publish, that in whole or in
92
+ part contains or is derived from the Program or any part thereof, to be licensed
93
+ as a whole at no charge to all third parties under the terms of this License.
94
+
95
+ c) If the modified program normally reads commands interactively when run, you
96
+ must cause it, when started running for such interactive use in the most ordinary
97
+ way, to print or display an announcement including an appropriate copyright
98
+ notice and a notice that there is no warranty (or else, saying that you provide
99
+ a warranty) and that users may redistribute the program under these conditions,
100
+ and telling the user how to view a copy of this License. (Exception: if the
101
+ Program itself is interactive but does not normally print such an announcement,
102
+ your work based on the Program is not required to print an announcement.)
103
+
104
+ These requirements apply to the modified work as a whole. If identifiable
105
+ sections of that work are not derived from the Program, and can be reasonably
106
+ considered independent and separate works in themselves, then this License, and
107
+ its terms, do not apply to those sections when you distribute them as separate
108
+ works. But when you distribute the same sections as part of a whole which is a
109
+ work based on the Program, the distribution of the whole must be on the terms
110
+ of this License, whose permissions for other licensees extend to the entire
111
+ whole, and thus to each and every part regardless of who wrote it.
112
+
113
+ Thus, it is not the intent of this section to claim rights or contest your
114
+ rights to work written entirely by you; rather, the intent is to exercise the
115
+ right to control the distribution of derivative or collective works based on the
116
+ Program.
117
+
118
+ In addition, mere aggregation of another work not based on the Program with the
119
+ Program (or with a work based on the Program) on a volume of a storage or
120
+ distribution medium does not bring the other work under the scope of this License.
121
+
122
+ 3. You may copy and distribute the Program (or a work based on it, under
123
+ Section 2) in object code or executable form under the terms of Sections 1 and 2
124
+ above provided that you also do one of the following:
125
+
126
+ a) Accompany it with the complete corresponding machine-readable source code,
127
+ which must be distributed under the terms of Sections 1 and 2 above on a medium
128
+ customarily used for software interchange; or,
129
+
130
+ b) Accompany it with a written offer, valid for at least three years, to give
131
+ any third party, for a charge no more than your cost of physically performing
132
+ source distribution, a complete machine-readable copy of the corresponding
133
+ source code, to be distributed under the terms of Sections 1 and 2 above on a
134
+ medium customarily used for software interchange; or,
135
+
136
+ c) Accompany it with the information you received as to the offer to distribute
137
+ corresponding source code. (This alternative is allowed only for noncommercial
138
+ distribution and only if you received the program in object code or executable
139
+ form with such an offer, in accord with Subsection b above.)
140
+ The source code for a work means the preferred form of the work for making
141
+ modifications to it. For an executable work, complete source code means all the
142
+ source code for all modules it contains, plus any associated interface
143
+ definition files, plus the scripts used to control compilation and installation
144
+ of the executable. However, as a special exception, the source code distributed
145
+ need not include anything that is normally distributed (in either source or
146
+ binary form) with the major components (compiler, kernel, and so on) of the
147
+ operating system on which the executable runs, unless that component itself
148
+ accompanies the executable.
149
+
150
+ If distribution of executable or object code is made by offering access to copy
151
+ from a designated place, then offering equivalent access to copy the source code
152
+ from the same place counts as distribution of the source code, even though third
153
+ parties are not compelled to copy the source along with the object code.
154
+
155
+ 4. You may not copy, modify, sublicense, or distribute the Program except as
156
+ expressly provided under this License. Any attempt otherwise to copy, modify,
157
+ sublicense or distribute the Program is void, and will automatically terminate
158
+ your rights under this License. However, parties who have received copies, or
159
+ rights, from you under this License will not have their licenses terminated so
160
+ long as such parties remain in full compliance.
161
+
162
+ 5. You are not required to accept this License, since you have not signed it.
163
+ However, nothing else grants you permission to modify or distribute the Program
164
+ or its derivative works. These actions are prohibited by law if you do not
165
+ accept this License. Therefore, by modifying or distributing the Program (or any
166
+ work based on the Program), you indicate your acceptance of this License to do
167
+ so, and all its terms and conditions for copying, distributing or modifying the
168
+ Program or works based on it.
169
+
170
+ 6. Each time you redistribute the Program (or any work based on the Program),
171
+ the recipient automatically receives a license from the original licensor to
172
+ copy, distribute or modify the Program subject to these terms and conditions.
173
+ You may not impose any further restrictions on the recipients' exercise of the
174
+ rights granted herein. You are not responsible for enforcing compliance by third
175
+ parties to this License.
176
+
177
+ 7. If, as a consequence of a court judgment or allegation of patent infringement
178
+ or for any other reason (not limited to patent issues), conditions are imposed
179
+ on you (whether by court order, agreement or otherwise) that contradict the
180
+ conditions of this License, they do not excuse you from the conditions of this
181
+ License. If you cannot distribute so as to satisfy simultaneously your
182
+ obligations under this License and any other pertinent obligations, then as a
183
+ consequence you may not distribute the Program at all. For example, if a patent
184
+ license would not permit royalty-free redistribution of the Program by all those
185
+ who receive copies directly or indirectly through you, then the only way you
186
+ could satisfy both it and this License would be to refrain entirely from
187
+ distribution of the Program.
188
+
189
+ If any portion of this section is held invalid or unenforceable under any
190
+ particular circumstance, the balance of the section is intended to apply and the
191
+ section as a whole is intended to apply in other circumstances.
192
+
193
+ It is not the purpose of this section to induce you to infringe any patents or
194
+ other property right claims or to contest validity of any such claims; this
195
+ section has the sole purpose of protecting the integrity of the free software
196
+ distribution system, which is implemented by public license practices. Many
197
+ people have made generous contributions to the wide range of software distributed
198
+ through that system in reliance on consistent application of that system; it is
199
+ up to the author/donor to decide if he or she is willing to distribute software
200
+ through any other system and a licensee cannot impose that choice.
201
+
202
+ This section is intended to make thoroughly clear what is believed to be a
203
+ consequence of the rest of this License.
204
+
205
+ 8. If the distribution and/or use of the Program is restricted in certain
206
+ countries either by patents or by copyrighted interfaces, the original copyright
207
+ holder who places the Program under this License may add an explicit geographical
208
+ distribution limitation excluding those countries, so that distribution is
209
+ permitted only in or among countries not thus excluded. In such case, this
210
+ License incorporates the limitation as if written in the body of this License.
211
+
212
+ 9. The Free Software Foundation may publish revised and/or new versions of the
213
+ General Public License from time to time. Such new versions will be similar in
214
+ spirit to the present version, but may differ in detail to address new problems
215
+ or concerns.
216
+
217
+ Each version is given a distinguishing version number. If the Program specifies
218
+ a version number of this License which applies to it and "any later version",
219
+ you have the option of following the terms and conditions either of that version
220
+ or of any later version published by the Free Software Foundation. If the
221
+ Program does not specify a version number of this License, you may choose any
222
+ version ever published by the Free Software Foundation.
223
+
224
+ 10. If you wish to incorporate parts of the Program into other free programs
225
+ whose distribution conditions are different, write to the author to ask for
226
+ permission. For software which is copyrighted by the Free Software Foundation,
227
+ write to the Free Software Foundation; we sometimes make exceptions for this.
228
+ Our decision will be guided by the two goals of preserving the free status of
229
+ all derivatives of our free software and of promoting the sharing and reuse of
230
+ software generally.
231
+
232
+ NO WARRANTY
233
+
234
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
235
+ PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED
236
+ IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS
237
+ IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
238
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
239
+ PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
240
+ PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
241
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
242
+
243
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
244
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
245
+ PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
246
+ SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY
247
+ TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
248
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
249
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
250
+ PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
data/README.rdoc ADDED
@@ -0,0 +1,26 @@
1
+ = openvas-cli
2
+
3
+ Provides an interface for OpenVAS using OMP v2.0 and OAP v1.0.
4
+
5
+ These protocols are documented at http://www.openvas.org/omp-2-0.html and
6
+ http://www.openvas.org/oap-1-0.html.
7
+
8
+ Authors:: Reed Swenson (mailto:fleureed@gmail.com)
9
+ Ben Bressler (mailto:
10
+ License:: GPL v2.0
11
+
12
+ == Contributing to openvas-cli
13
+
14
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
15
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
16
+ * Fork the project
17
+ * Start a feature/bugfix branch
18
+ * Commit and push until you are happy with your contribution
19
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
20
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
21
+
22
+ == Copyright
23
+
24
+ Copyright (c) 2011 eBankSystems, Inc. See LICENSE.txt for
25
+ further details.
26
+
data/Rakefile ADDED
@@ -0,0 +1,65 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "openvas-cli"
16
+ gem.homepage = "http://reedswenson.github.com/openvas-cli/"
17
+ gem.license = "MIT"
18
+ gem.summary = "A full ruby implementation of the OpenVAS OMP (version 2.0) protocol."
19
+ gem.description = "A full ruby implementation of the OpenVAS OMP (version 2.0) protocol."
20
+ gem.email = "fleureed@gmail.com"
21
+ gem.authors = ["Reed Swenson"]
22
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
23
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
24
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
25
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
26
+ gem.add_runtime_dependency "activesupport", ">= 3.0.5"
27
+ gem.add_runtime_dependency 'activerecord', '>= 3.0.5'
28
+ gem.add_runtime_dependency 'nokogiri', '>= 1.4.4'
29
+
30
+ gem.add_development_dependency "rspec", "~> 2.3.0"
31
+ gem.add_development_dependency "bundler", "~> 1.0.0"
32
+ gem.add_development_dependency "jeweler", "~> 1.5.2"
33
+ gem.add_development_dependency "rcov", ">= 0"
34
+ gem.add_development_dependency "ZenTest"
35
+ gem.add_development_dependency 'log4r'
36
+ end
37
+ Jeweler::RubygemsDotOrgTasks.new
38
+
39
+ require 'rspec/core'
40
+ require 'rspec/core/rake_task'
41
+ RSpec::Core::RakeTask.new(:spec) do |spec|
42
+ spec.pattern = FileList['spec/**/*_spec.rb']
43
+ end
44
+
45
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
46
+ spec.pattern = 'spec/**/*_spec.rb'
47
+ spec.rcov = true
48
+ end
49
+
50
+ task :default => :spec
51
+
52
+ desc 'Remove log files'
53
+ task :clobber_logs do
54
+ rm Dir.glob('log/*.log')
55
+ end
56
+
57
+ require 'rake/rdoctask'
58
+ Rake::RDocTask.new do |rdoc|
59
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
60
+
61
+ rdoc.rdoc_dir = 'rdoc'
62
+ rdoc.title = "openvas-cli #{version}"
63
+ rdoc.rdoc_files.include('README*')
64
+ rdoc.rdoc_files.include('lib/**/*.rb')
65
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,9 @@
1
+ Feature: something something
2
+ In order to something something
3
+ A user something something
4
+ something something something
5
+
6
+ Scenario: something something
7
+ Given inspiration
8
+ When I create a sweet new gem
9
+ Then everyone should see how awesome I am
File without changes
@@ -0,0 +1,13 @@
1
+ require 'bundler'
2
+ begin
3
+ Bundler.setup(:default, :development)
4
+ rescue Bundler::BundlerError => e
5
+ $stderr.puts e.message
6
+ $stderr.puts "Run `bundle install` to install missing gems"
7
+ exit e.status_code
8
+ end
9
+
10
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
11
+ require 'openvas-cli'
12
+
13
+ require 'rspec/expectations'