Vulnerability specs
This commit is contained in:
@@ -7,6 +7,13 @@ class Vulnerability
|
||||
|
||||
attr_accessor :title, :references, :type, :metasploit_modules
|
||||
|
||||
#
|
||||
# @param [ String ] title The title of the vulnerability
|
||||
# @param [ String ] type The type of the vulnerability
|
||||
# @param [ Array ] references References urls
|
||||
# @param [ Array ] metasploit_modules Metasploit modules for the vulnerability
|
||||
#
|
||||
# @return [ Vulnerability ]
|
||||
def initialize(title, type, references, metasploit_modules = [])
|
||||
@title = title
|
||||
@type = type
|
||||
@@ -14,6 +21,11 @@ class Vulnerability
|
||||
@metasploit_modules = metasploit_modules
|
||||
end
|
||||
|
||||
# Create the Vulnerability from the xml_node
|
||||
#
|
||||
# @param [ Nokogiri::XML::Node ] xml_node
|
||||
#
|
||||
# @return [ Vulnerability ]
|
||||
def self.load_from_xml_node(xml_node)
|
||||
new(
|
||||
xml_node.search('title').text,
|
||||
|
||||
Reference in New Issue
Block a user