nessus 0.0.1.beta.1 → 0.0.1.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/nessus/client.rb +1 -1
- data/lib/nessus/client/scan.rb +6 -0
- data/lib/nessus/error.rb +4 -0
- data/lib/nessus/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 152073eca0ca8a7293d6d2fccbcadcd18909ca00
|
4
|
+
data.tar.gz: ddf8237ed5e6d9387f84e7ec74a5a8425bab3949
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f83c4eff46bcc2b9199f68ad0b631030dec0ff3dde574099d836b937fac6ee81fcafa455141580c574a2ea9a344b7738438afcda5e290afbf81743d91856f83f
|
7
|
+
data.tar.gz: 699224f98c5e9a3d1876672b6fad84f30f534f4db3df235f55fd46a3ca65c3bb4444f24bf6eb8a03ab9b076069a648e4e23a74885d45ad6cc811167c6ddac95f
|
data/Gemfile.lock
CHANGED
data/lib/nessus/client.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'cgi'
|
2
2
|
require 'faraday'
|
3
3
|
require 'json'
|
4
|
-
require 'pry'
|
5
4
|
require 'nessus/client/file'
|
6
5
|
require 'nessus/client/policy'
|
7
6
|
require 'nessus/client/report'
|
8
7
|
require 'nessus/client/report2'
|
9
8
|
require 'nessus/client/scan'
|
9
|
+
require 'nessus/error'
|
10
10
|
require 'nessus/version'
|
11
11
|
|
12
12
|
module Nessus
|
data/lib/nessus/client/scan.rb
CHANGED
@@ -8,6 +8,8 @@ module Nessus
|
|
8
8
|
# @param [Fixnum] policy_id a numeric ID that references the policy to use
|
9
9
|
# @param [String] scan_name the name to assign to this scan
|
10
10
|
# @param [Fixnum] seq a unique identifer for the specific request
|
11
|
+
#
|
12
|
+
# @return [Hash] the newly created scan object
|
11
13
|
def create_scan(target, policy_id, scan_name, seq = nil)
|
12
14
|
payload = {
|
13
15
|
:target => target,
|
@@ -18,6 +20,10 @@ module Nessus
|
|
18
20
|
payload[:seq] = seq if seq
|
19
21
|
resp = post '/scan/new', payload
|
20
22
|
|
23
|
+
if resp['reply']['status'].eql? 'ERROR'
|
24
|
+
raise Nessus::UnknownError, resp['reply']['contents']
|
25
|
+
end
|
26
|
+
|
21
27
|
resp['reply']['contents']['scan']
|
22
28
|
end
|
23
29
|
|
data/lib/nessus/error.rb
ADDED
data/lib/nessus/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nessus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.beta.
|
4
|
+
version: 0.0.1.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erran Carey
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- lib/nessus/client/timezones.rb
|
111
111
|
- lib/nessus/client/users.rb
|
112
112
|
- lib/nessus/client/uuid.rb
|
113
|
+
- lib/nessus/error.rb
|
113
114
|
- lib/nessus/version.rb
|
114
115
|
- nessus.gemspec
|
115
116
|
homepage: https://github.com/threatagent/nessus.rb
|