Class: Nexpose::VulnerabilityListing
- Inherits:
 - 
      Object
      
        
- Object
 - Nexpose::VulnerabilityListing
 
 
- Defined in:
 - lib/nexpose.rb
 
Overview
Description
Object that represents a listing of all of the vulnerabilities in the vulnerability database
Instance Attribute Summary collapse
- 
  
    
      #connection  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The NSC Connection associated with this object.
 - 
  
    
      #error  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
true if an error condition exists; false otherwise.
 - 
  
    
      #error_msg  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Error message string.
 - 
  
    
      #request_xml  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The last XML request sent by this object.
 - 
  
    
      #response_xml  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The last XML response received by this object.
 - 
  
    
      #vulnerability_count  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The number of vulnerability definitions.
 - 
  
    
      #vulnerability_summaries  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Array containing (VulnerabilitySummary*).
 
Instance Method Summary collapse
- 
  
    
      #initialize(connection)  ⇒ VulnerabilityListing 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
Constructor VulnerabilityListing(connection).
 
Constructor Details
#initialize(connection) ⇒ VulnerabilityListing
Constructor VulnerabilityListing(connection)
      2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211  | 
    
      # File 'lib/nexpose.rb', line 2195 def initialize(connection) @error = false @vulnerability_summaries = [] @connection = connection r = @connection.execute('<VulnerabilityListingRequest session-id="' + @connection.session_id + '"/>') if (r.success) r.res.elements.each('VulnerabilityListingResponse/VulnerabilitySummary') do |v| @vulnerability_summaries.push(VulnerabilitySummary.new(v.attributes['id'],v.attributes["title"],v.attributes["severity"])) end else @error = true @error_msg = 'VulnerabilitySummaryRequest Parse Error' end @vulnerability_count = @vulnerability_summaries.length end  | 
  
Instance Attribute Details
#connection ⇒ Object (readonly)
The NSC Connection associated with this object
      2187 2188 2189  | 
    
      # File 'lib/nexpose.rb', line 2187 def connection @connection end  | 
  
#error ⇒ Object (readonly)
true if an error condition exists; false otherwise
      2179 2180 2181  | 
    
      # File 'lib/nexpose.rb', line 2179 def error @error end  | 
  
#error_msg ⇒ Object (readonly)
Error message string
      2181 2182 2183  | 
    
      # File 'lib/nexpose.rb', line 2181 def error_msg @error_msg end  | 
  
#request_xml ⇒ Object (readonly)
The last XML request sent by this object
      2183 2184 2185  | 
    
      # File 'lib/nexpose.rb', line 2183 def request_xml @request_xml end  | 
  
#response_xml ⇒ Object (readonly)
The last XML response received by this object
      2185 2186 2187  | 
    
      # File 'lib/nexpose.rb', line 2185 def response_xml @response_xml end  | 
  
#vulnerability_count ⇒ Object (readonly)
The number of vulnerability definitions
      2191 2192 2193  | 
    
      # File 'lib/nexpose.rb', line 2191 def vulnerability_count @vulnerability_count end  | 
  
#vulnerability_summaries ⇒ Object (readonly)
Array containing (VulnerabilitySummary*)
      2189 2190 2191  | 
    
      # File 'lib/nexpose.rb', line 2189 def vulnerability_summaries @vulnerability_summaries end  |