class CMSScanner::Vulnerability

Generic Vulnerability

Attributes

cvss[R]
fixed_in[R]
introduced_in[R]
title[R]
type[R]

Public Class Methods

new(title, references: {}, type: nil, fixed_in: nil, introduced_in: nil, cvss: nil) click to toggle source

@param [ String ] title @param [ Hash ] references @option references [ Array<String>, String ] :cve @option references [ Array<String>, String ] :secunia @option references [ Array<String>, String ] :osvdb @option references [ Array<String>, String ] :exploitdb @option references [ Array<String> ] :url URL(s) to related advisories etc @option references [ Array<String>, String ] :metasploit The related metasploit module(s) @option references [ Array<String> ] :youtube @param [ String ] type @param [ String ] fixed_in @param [ String ] introduced_in @param [ HashSymbol ] cvss @option cvss [ String ] :score @option cvss [ String ] :vector

# File lib/cms_scanner/vulnerability.rb, line 25
def initialize(title, references: {}, type: nil, fixed_in: nil, introduced_in: nil, cvss: nil)
  @title         = title
  @type          = type
  @fixed_in      = fixed_in
  @introduced_in = introduced_in
  @cvss          = { score: cvss[:score], vector: cvss[:vector] } if cvss

  self.references = references
end

Public Instance Methods

==(other) click to toggle source

param [ Vulnerability ] other

@return [ Boolean ]

# File lib/cms_scanner/vulnerability.rb, line 38
def ==(other)
  title == other.title &&
    type == other.type &&
    references == other.references &&
    fixed_in == other.fixed_in &&
    cvss == other.cvss
end