Method: Nessus::Client::Scan#scan_new
- Defined in:
- lib/nessus/client/scan.rb
#scan_new(target, policy_id, scan_name, seq = nil, description = nil) ⇒ Hash
POST /scan/new
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/nessus/client/scan.rb', line 13 def scan_new(target, policy_id, scan_name, seq = nil, description = nil) payload = { :custom_targets => target, :policy_id => policy_id, :name => scan_name } payload[:seq] = seq if seq payload[:description] = description if description response = post '/scan/new', payload if response['error'] raise Nessus::UnknownError, response['error'] end response['reply']['contents'] # ['scan'] end |