Sha256: 5d83afa34a486497ceb3391e951bccf0e807e66a44c411b320f237443019ee2d
Contents?: true
Size: 1.38 KB
Versions: 8
Compression:
Stored size: 1.38 KB
Contents
# frozen_string_literal: true module CMSScanner # Generic Vulnerability class Vulnerability include References attr_reader :title, :type, :fixed_in, :cvss # @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 [ HashSymbol ] cvss # @option cvss [ String ] :score # @option cvss [ String ] :vector def initialize(title, references: {}, type: nil, fixed_in: nil, cvss: nil) @title = title @type = type @fixed_in = fixed_in @cvss = { score: cvss[:score], vector: cvss[:vector] } if cvss self.references = references end # param [ Vulnerability ] other # # @return [ Boolean ] def ==(other) title == other.title && type == other.type && references == other.references && fixed_in == other.fixed_in && cvss == other.cvss end end end
Version data entries
8 entries across 8 versions & 1 rubygems