Class: Nexpose::VulnerabilityDetail
- Inherits:
-
Object
- Object
- Nexpose::VulnerabilityDetail
- Defined in:
- lib/nexpose.rb
Overview
Description
Object that represents the details for an entry in the vulnerability database
Instance Attribute Summary collapse
-
#added ⇒ Object
readonly
The date this vulnerability was added to NeXpose.
-
#connection ⇒ Object
readonly
The NSC Connection associated with this object.
-
#cvssScore ⇒ Object
readonly
The CVSS score of this vulnerability.
-
#cvssVector ⇒ Object
readonly
The CVSS vector of this vulnerability.
-
#description ⇒ Object
readonly
The HTML Description of this vulnerability.
-
#error ⇒ Object
readonly
true if an error condition exists; false otherwise.
-
#error_msg ⇒ Object
readonly
Error message string.
-
#id ⇒ Object
readonly
The unique ID string for this vulnerability.
-
#modified ⇒ Object
readonly
The last date this vulnerability was modified.
-
#pciSeverity ⇒ Object
readonly
The pciSeverity of this vulnerability.
-
#published ⇒ Object
readonly
The date this vulnerability was published.
-
#references ⇒ Object
readonly
Array containing (Reference).
-
#request_xml ⇒ Object
readonly
The last XML request sent by this object.
-
#response_xml ⇒ Object
readonly
The last XML response received by this object.
-
#severity ⇒ Object
readonly
The severity of this vulnerability (1 – 10).
-
#solution ⇒ Object
readonly
The HTML Solution for this vulnerability.
-
#title ⇒ Object
readonly
The title of this vulnerability.
Instance Method Summary collapse
-
#initialize(connection, id) ⇒ VulnerabilityDetail
constructor
Constructor VulnerabilityListing(connection,id).
Constructor Details
#initialize(connection, id) ⇒ VulnerabilityDetail
Constructor VulnerabilityListing(connection,id)
2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 |
# File 'lib/nexpose.rb', line 2292 def initialize(connection, id) @error = false @connection = connection @id = id @references = [] r = @connection.execute('<VulnerabilityDetailsRequest session-id="' + @connection.session_id + '" vuln-id="' + @id + '"/>') if (r.success) r.res.elements.each('VulnerabilityDetailsResponse/Vulnerability') do |v| @id = v.attributes['id'] @title = v.attributes["title"] @severity = v.attributes["severity"] @pciSeverity = v.attributes['pciSeverity'] @cvssScore = v.attributes['cvssScore'] @cvssVector = v.attributes['cvssVector'] @published = v.attributes['published'] @added = v.attributes['added'] @modified = v.attributes['modified'] v.elements.each('description') do |d| @description = d.to_s.gsub(/\<\/?description\>/i, '') end v.elements.each('solution') do |s| @solution = s.to_s.gsub(/\<\/?solution\>/i, '') end v.elements.each('references/reference') do |r| @references.push(Reference.new(r.attributes['source'],r.text)) end end else @error = true @error_msg = 'VulnerabilitySummaryRequest Parse Error' end end |
Instance Attribute Details
#added ⇒ Object (readonly)
The date this vulnerability was added to NeXpose
2279 2280 2281 |
# File 'lib/nexpose.rb', line 2279 def added @added end |
#connection ⇒ Object (readonly)
The NSC Connection associated with this object
2263 2264 2265 |
# File 'lib/nexpose.rb', line 2263 def connection @connection end |
#cvssScore ⇒ Object (readonly)
The CVSS score of this vulnerability
2273 2274 2275 |
# File 'lib/nexpose.rb', line 2273 def cvssScore @cvssScore end |
#cvssVector ⇒ Object (readonly)
The CVSS vector of this vulnerability
2275 2276 2277 |
# File 'lib/nexpose.rb', line 2275 def cvssVector @cvssVector end |
#description ⇒ Object (readonly)
The HTML Description of this vulnerability
2283 2284 2285 |
# File 'lib/nexpose.rb', line 2283 def description @description end |
#error ⇒ Object (readonly)
true if an error condition exists; false otherwise
2255 2256 2257 |
# File 'lib/nexpose.rb', line 2255 def error @error end |
#error_msg ⇒ Object (readonly)
Error message string
2257 2258 2259 |
# File 'lib/nexpose.rb', line 2257 def error_msg @error_msg end |
#id ⇒ Object (readonly)
The unique ID string for this vulnerability
2265 2266 2267 |
# File 'lib/nexpose.rb', line 2265 def id @id end |
#modified ⇒ Object (readonly)
The last date this vulnerability was modified
2281 2282 2283 |
# File 'lib/nexpose.rb', line 2281 def modified @modified end |
#pciSeverity ⇒ Object (readonly)
The pciSeverity of this vulnerability
2271 2272 2273 |
# File 'lib/nexpose.rb', line 2271 def pciSeverity @pciSeverity end |
#published ⇒ Object (readonly)
The date this vulnerability was published
2277 2278 2279 |
# File 'lib/nexpose.rb', line 2277 def published @published end |
#references ⇒ Object (readonly)
Array containing (Reference)
2286 2287 2288 |
# File 'lib/nexpose.rb', line 2286 def references @references end |
#request_xml ⇒ Object (readonly)
The last XML request sent by this object
2259 2260 2261 |
# File 'lib/nexpose.rb', line 2259 def request_xml @request_xml end |
#response_xml ⇒ Object (readonly)
The last XML response received by this object
2261 2262 2263 |
# File 'lib/nexpose.rb', line 2261 def response_xml @response_xml end |
#severity ⇒ Object (readonly)
The severity of this vulnerability (1 – 10)
2269 2270 2271 |
# File 'lib/nexpose.rb', line 2269 def severity @severity end |
#solution ⇒ Object (readonly)
The HTML Solution for this vulnerability
2288 2289 2290 |
# File 'lib/nexpose.rb', line 2288 def solution @solution end |
#title ⇒ Object (readonly)
The title of this vulnerability
2267 2268 2269 |
# File 'lib/nexpose.rb', line 2267 def title @title end |