# frozen_string_literal: true module CMSScanner # Generic Vulnerability class Vulnerability include References attr_reader :title, :type, :fixed_in # @param [ String ] title # @param [ Hash ] references # @option references [ Array, String ] cve # @option references [ Array, String ] secunia # @option references [ Array, String ] osvdb # @option references [ Array, String ] exploitdb # @option references [ Array ] url URL(s) to related advisories etc # @option references [ Array, String ] metasploit The related metasploit module(s) # @param [ String ] type # @param [ String ] fixed_in def initialize(title, references = {}, type = nil, fixed_in = nil) @title = title @type = type @fixed_in = fixed_in 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 end end end