nessus 0.1.0.beta.16 → 0.1.0.beta.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,24 @@ module Nessus
10
10
  # @param [Fixnum] seq a unique identifier for the specific request
11
11
  #
12
12
  # @return [Hash] the newly created scan object
13
+
14
+ def template_new(template_name, policy_id, target, seq = nil, start_time = nil, rrules = nil)
15
+ payload = {
16
+ :template_name => template_name,
17
+ :policy_id => policy_id,
18
+ :target => target,
19
+ :json => 1
20
+ }
21
+ payload[:seq] = seq if seq
22
+ response = post '/scan/new', payload
23
+
24
+ if response['reply']['status'].eql? 'ERROR'
25
+ raise Nessus::UnknownError, response['reply']['contents']
26
+ end
27
+
28
+ response['reply']['contents'] # ['scan']
29
+ end
30
+
13
31
  def scan_new(target, policy_id, scan_name, seq = nil)
14
32
  payload = {
15
33
  :target => target,
@@ -1,4 +1,4 @@
1
1
  module Nessus
2
2
  # The version of the Nessus.rb library
3
- VERSION = '0.1.0.beta.16'
3
+ VERSION = '0.1.0.beta.17'
4
4
  end
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.1.0.beta.16
4
+ version: 0.1.0.beta.17
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-12-27 00:00:00.000000000 Z
13
+ date: 2014-01-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler