Vulnerability::Output specs
This commit is contained in:
@@ -15,6 +15,7 @@ class Vulnerability
|
||||
end
|
||||
end
|
||||
|
||||
# @return [ String ] The url to the metasploit module page
|
||||
def self.metasploit_module_url(module_path)
|
||||
# remove leading slash
|
||||
module_path = module_path.sub(/^\//, '')
|
||||
|
||||
@@ -19,6 +19,8 @@ class WpItem
|
||||
attr_reader :path
|
||||
attr_accessor :name, :wp_content_dir, :wp_plugins_dir
|
||||
|
||||
# @return [ Array ]
|
||||
# Make it private ?
|
||||
def allowed_options
|
||||
[:name, :wp_content_dir, :wp_plugins_dir, :path, :version, :vulns_file]
|
||||
end
|
||||
|
||||
@@ -9,6 +9,7 @@ class WpUser < WpItem
|
||||
|
||||
def allowed_options; [:id, :login, :display_name, :password] end
|
||||
|
||||
# @return [ URI ] The uri to the auhor page
|
||||
def uri
|
||||
if id
|
||||
return @uri.merge("?author=#{id}")
|
||||
@@ -17,14 +18,17 @@ class WpUser < WpItem
|
||||
end
|
||||
end
|
||||
|
||||
# @param [ Wpuser ] other
|
||||
def <=>(other)
|
||||
id <=> other.id
|
||||
end
|
||||
|
||||
# @param [ WpUser ] other
|
||||
def ==(other)
|
||||
self === other
|
||||
end
|
||||
|
||||
# @param [ WpUser ] other
|
||||
def ===(other)
|
||||
id === other.id && login === other.login
|
||||
end
|
||||
|
||||
@@ -13,6 +13,7 @@ class WpVersion < WpItem
|
||||
# The version number
|
||||
attr_accessor :number
|
||||
|
||||
# @return [ Array ]
|
||||
def allowed_options; super << :number << :found_from end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user