mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-22 03:38:01 +00:00
26 lines
660 B
Ruby
26 lines
660 B
Ruby
class Vulnerability
|
|
attr_accessor :type, :privilege, :access ,:puppets, :details, :ports, :cve, :files, :scripts
|
|
|
|
def eql? other
|
|
# checks if type matches vulns.xml from scenario.xml
|
|
other.kind_of?(self.class) && @type == other.type
|
|
end
|
|
|
|
def initialize(type="", privilege="", access="", puppets=[], details="", ports=[], cve="", files=[], scripts=[])
|
|
@type = type
|
|
@privilege = privilege
|
|
@access = access
|
|
@puppets = puppets
|
|
@details = details
|
|
@ports = ports
|
|
@cve = cve
|
|
@files = files
|
|
@scripts = scripts
|
|
end
|
|
|
|
def id
|
|
return @type + @privilege + @access
|
|
end
|
|
|
|
end
|