mirror of
https://github.com/cliffe/SecGen.git
synced 2026-02-21 11:18:06 +00:00
Initial changes to directory structure
This commit is contained in:
25
lib/objects/vulnerability.rb
Normal file
25
lib/objects/vulnerability.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user