class Nessus6::Scanner
The Scanner
class provides details about the available scanners localhost:8834/api#/resources/server
Public Class Methods
new(client)
click to toggle source
# File lib/Nessus6/scanner.rb, line 10 def initialize(client) @client = client end
Public Instance Methods
list()
click to toggle source
Returns the scanner list. This request requires administrator user permissions.
@return [Hash]
# File lib/Nessus6/scanner.rb, line 18 def list response = @client.get('scanners') verify response, forbidden: 'You do not have permission to view the list', internal_server_error: 'Server failed to retrieve properties' end
list_agents(scanner_id)
click to toggle source
Returns the agent list for the given scanner. This request requires administrator user permissions.
@param scanner_id [String, Fixnum] The id of the scanner to query for
agents.
@return [Hash]
# File lib/Nessus6/scanner.rb, line 31 def list_agents(scanner_id) response = @client.get("scanners/#{scanner_id}/agents") verify response, forbidden: 'You do not have permission to view the list of agents', internal_server_error: 'Server failed to retrieve agent list' end