Class: Nexpose::ScanStatistics
- Inherits:
-
Object
- Object
- Nexpose::ScanStatistics
- Defined in:
- lib/nexpose.rb
Overview
TODO
Description
Object that represents the overview statistics for a particular scan.
Examples
# Create a new Nexpose Connection on the default port and Login
nsc = Connection.new("10.1.40.10","nxadmin","password")
nsc.login()
# Get a Site (Site ID = 12) from the NSC
site = new Site(nsc,12)
# Start a Scan of this site and pause for 1 minute
scan1 = site.scanSite()
sleep(60)
# Get the Scan Statistics for this scan
scanStatistics = new ScanStatistics(nsc,scan1["scan_id"])
# Print out number of confirmed vulnerabilities with a 10 severity
puts scanStatistics.scansummary.vuln_exploit[10]
# Print out the number of pending tasks left in the scan
puts scanStatistics.scan_summary.tasks_pending
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.
-
#reseponse_xml ⇒ Object
readonly
The last XML response received by this object.
-
#scan_id ⇒ Object
readonly
The Scan ID.
-
#scan_summary ⇒ Object
readonly
The ScanSummary of the scan.
-
#vuln_other ⇒ Object
readonly
Vulnerability checks other.
Instance Method Summary collapse
-
#initialize(connection, scan_id) ⇒ ScanStatistics
constructor
A new instance of ScanStatistics.
Constructor Details
#initialize(connection, scan_id) ⇒ ScanStatistics
Returns a new instance of ScanStatistics.
2080 2081 2082 2083 2084 |
# File 'lib/nexpose.rb', line 2080 def initialize(connection, scan_id) @error = false @connection = connection @scan_id = scan_id end |
Instance Attribute Details
#connection ⇒ Object (readonly)
The NSC Connection associated with this object
2076 2077 2078 |
# File 'lib/nexpose.rb', line 2076 def connection @connection end |
#error ⇒ Object (readonly)
true if an error condition exists; false otherwise
2064 2065 2066 |
# File 'lib/nexpose.rb', line 2064 def error @error end |
#error_msg ⇒ Object (readonly)
Error message string
2066 2067 2068 |
# File 'lib/nexpose.rb', line 2066 def error_msg @error_msg end |
#request_xml ⇒ Object (readonly)
The last XML request sent by this object
2068 2069 2070 |
# File 'lib/nexpose.rb', line 2068 def request_xml @request_xml end |
#reseponse_xml ⇒ Object (readonly)
The last XML response received by this object
2070 2071 2072 |
# File 'lib/nexpose.rb', line 2070 def reseponse_xml @reseponse_xml end |
#scan_id ⇒ Object (readonly)
The Scan ID
2072 2073 2074 |
# File 'lib/nexpose.rb', line 2072 def scan_id @scan_id end |
#scan_summary ⇒ Object (readonly)
The ScanSummary of the scan
2074 2075 2076 |
# File 'lib/nexpose.rb', line 2074 def scan_summary @scan_summary end |
#vuln_other ⇒ Object (readonly)
Vulnerability checks other
2079 2080 2081 |
# File 'lib/nexpose.rb', line 2079 def vuln_other @vuln_other end |