ruby-nessus 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +10 -23
- data/Rakefile +1 -6
- data/VERSION +1 -1
- data/examples/example.nessus +1 -1
- data/examples/example.rb +14 -15
- data/examples/pdf_example.rb +2 -2
- data/examples/ruby-nessus-example.pdf +64 -96
- data/init.rb +1 -0
- data/lib/ruby-nessus/host.rb +29 -13
- data/lib/ruby-nessus/nessus.rb +10 -2
- data/lib/ruby-nessus/xml.rb +39 -32
- data/spec/event_spec.rb +59 -0
- data/spec/helpers/example.nessus +1 -0
- data/spec/helpers/xml.rb +3 -0
- data/spec/host_spec.rb +51 -0
- data/spec/ruby-nessus_spec.rb +0 -6
- data/spec/spec_helper.rb +4 -6
- data/spec/xml_spec.rb +71 -0
- data/tasks/spec.rb +7 -11
- data/tasks/yard.rb +18 -0
- metadata +13 -4
- data/spec/spec.opts +0 -1
- data/tasks/rdoc.rb +0 -9
data/README.rdoc
CHANGED
@@ -6,27 +6,21 @@ Ruby-Nessus is a ruby interface for the popular Nessus vulnerability scanner. Ru
|
|
6
6
|
|
7
7
|
More Information:
|
8
8
|
* Documentation: http://rdoc.info/projects/mephux/ruby-nessus
|
9
|
+
* More: http://www.packetport.net
|
9
10
|
|
10
11
|
== Install
|
11
12
|
|
12
|
-
Make sure you have gemcutter installed.
|
13
|
-
|
14
|
-
sudo gem update --system
|
15
|
-
sudo gem install gemcutter
|
16
|
-
gem tumble
|
17
|
-
|
18
|
-
Then install Ruby-Nessus
|
19
|
-
|
20
13
|
sudo gem install ruby-nessus
|
21
14
|
|
22
15
|
== Usage & Examples
|
23
16
|
|
24
17
|
The below example illustrates how easy it really is to iterate of result data.
|
25
|
-
|
18
|
+
|
19
|
+
require 'rubygems'
|
26
20
|
require 'ruby-nessus'
|
27
21
|
|
28
22
|
Nessus::XML.new("example.nessus") do |scan|
|
29
|
-
puts scan.
|
23
|
+
puts scan.title # The Nessus Report Title.
|
30
24
|
puts scan.runtime # The Scan Runtime. #=> 2 hours 23 minutes 12 seconds
|
31
25
|
puts scan.host_count # Host Count.
|
32
26
|
puts scan.unique_ports # All Unique Ports Seen.
|
@@ -64,7 +58,6 @@ You also have the ability to search for particular hostnames. In the near future
|
|
64
58
|
|
65
59
|
end
|
66
60
|
|
67
|
-
|
68
61
|
There are a bunch of convenient methods added to make reporting a bit easier to produce quickly from a raw scan file.
|
69
62
|
|
70
63
|
Nessus::XML.new("example.nessus") do |scan|
|
@@ -79,21 +72,21 @@ There are a bunch of convenient methods added to make reporting a bit easier to
|
|
79
72
|
puts scan.total_event_count #=> 3411 # Total Event Count
|
80
73
|
puts scan.hosts.count #=> 12
|
81
74
|
|
82
|
-
puts scan.
|
83
|
-
puts scan.
|
84
|
-
|
75
|
+
puts scan.policy_title
|
76
|
+
puts scan.policy_notes unless scan.policy_notes.empty?
|
77
|
+
|
85
78
|
scan.hosts do |host|
|
86
79
|
puts host.hostname
|
87
|
-
|
80
|
+
|
88
81
|
# high_severity_events, medium_severity_events and low_severity_events
|
89
82
|
host.high_severity_events do |high|
|
90
83
|
puts high.port
|
91
84
|
puts high.name if high.name
|
92
85
|
puts high.data if high.data
|
93
86
|
end
|
94
|
-
|
95
|
-
end
|
96
87
|
|
88
|
+
end
|
89
|
+
|
97
90
|
end
|
98
91
|
|
99
92
|
== Requirements
|
@@ -104,7 +97,6 @@ There are a bunch of convenient methods added to make reporting a bit easier to
|
|
104
97
|
* Add The Ability to parse the scan configuration and plugin options.
|
105
98
|
* Building XML (.nessus) files configurations
|
106
99
|
* Add Support For NBE File Formats.
|
107
|
-
* Add Complex Searching.
|
108
100
|
|
109
101
|
== Note on Patches & Pull Requests
|
110
102
|
* Fork the project.
|
@@ -115,11 +107,6 @@ There are a bunch of convenient methods added to make reporting a bit easier to
|
|
115
107
|
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
116
108
|
* Send me a pull request. Bonus points for topic branches.
|
117
109
|
|
118
|
-
== Props
|
119
|
-
|
120
|
-
Huge props to postmodern for helping me refactor! Check out his projects:
|
121
|
-
* http://github.com/postmodern
|
122
|
-
|
123
110
|
== Copyright
|
124
111
|
|
125
112
|
Copyright (c) 2009 Dustin Willis Webber. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -2,14 +2,9 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
|
4
4
|
require './tasks/spec.rb'
|
5
|
-
require './tasks/
|
5
|
+
require './tasks/yard.rb'
|
6
6
|
|
7
7
|
begin
|
8
|
-
|
9
|
-
require 'yard'
|
10
|
-
YARD::Rake::YardocTask.new do |t|
|
11
|
-
end
|
12
|
-
|
13
8
|
require 'jeweler'
|
14
9
|
Jeweler::Tasks.new do |gem|
|
15
10
|
gem.name = "ruby-nessus"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|