added metasploit references

This commit is contained in:
Christian Mehlmauer
2013-01-13 21:08:07 +01:00
parent 7522a44b0a
commit 1377ee2653
5 changed files with 37 additions and 60 deletions

View File

@@ -139,3 +139,9 @@ end
def green(text)
colorize(text, 32)
end
def get_metasploit_url(module_path)
# remove leading slash
module_path = module_path.sub(/^\//, "")
"http://www.metasploit.com/modules/#{module_path}"
end

View File

@@ -32,7 +32,8 @@ class Vulnerable
vulnerabilities << WpVulnerability.new(
node.search("title").text,
node.search("reference").map(&:text),
node.search("type").text
node.search("type").text,
node.search("metasploit").map(&:text)
)
end
vulnerabilities

View File

@@ -17,11 +17,12 @@
#++
class WpVulnerability
attr_accessor :title, :references, :type
attr_accessor :title, :references, :type, :metasploit_modules
def initialize(title, references, type)
@title = title
@references = references
@type = type
def initialize(title, references, type, metasploit_modules)
@title = title
@references = references
@type = type
@metasploit_modules = metasploit_modules
end
end