Changed layout and coloring
This commit is contained in:
@@ -5,17 +5,17 @@ class Vulnerability
|
||||
|
||||
# output the vulnerability
|
||||
def output(verbose = false)
|
||||
puts ' |'
|
||||
puts ' | ' + red("* Title: #{title}")
|
||||
puts " |"
|
||||
puts "#{red('[!]')} Title: #{title}"
|
||||
references.each do |key, urls|
|
||||
methodname = "url_#{key}"
|
||||
urls.each do |u|
|
||||
url = send(methodname, u)
|
||||
puts ' | ' + red("* Reference: #{url}") if url
|
||||
puts " | Reference: #{url}" if url
|
||||
end
|
||||
end
|
||||
if !fixed_in.empty?
|
||||
puts " | * Fixed in: #{fixed_in}"
|
||||
puts " | Fixed in: #{fixed_in}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,13 +6,13 @@ class WpItem
|
||||
# @return [ Void ]
|
||||
def output(verbose = false)
|
||||
puts
|
||||
puts " | Name: #{self}" #this will also output the version number if detected
|
||||
puts "#{green('[+]')} Name: #{self}" #this will also output the version number if detected
|
||||
puts " | Location: #{url}"
|
||||
#puts " | WordPress: #{wordpress_url}" if wordpress_org_item?
|
||||
puts " | Readme: #{readme_url}" if has_readme?
|
||||
puts " | Changelog: #{changelog_url}" if has_changelog?
|
||||
puts " | " + red('[!]') + " Directory listing is enabled: #{url}" if has_directory_listing?
|
||||
puts " | " + red('[!]') + " An error_log file has been found: #{error_log_url}" if has_error_log?
|
||||
puts "#{red('[!]')} Directory listing is enabled: #{url}" if has_directory_listing?
|
||||
puts "#{red('[!]')} An error_log file has been found: #{error_log_url}" if has_error_log?
|
||||
|
||||
additional_output(verbose) if respond_to?(:additional_output)
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ class WpTheme
|
||||
|
||||
# @return [ Void ]
|
||||
def additional_output(verbose = false)
|
||||
theme_desc = verbose ? @theme_description : truncate(@theme_description, 100)
|
||||
puts " | Style URL: #{style_url}"
|
||||
puts " | Theme Name: #@theme_name" if @theme_name
|
||||
puts " | Theme URI: #@theme_uri" if @theme_uri
|
||||
theme_desc = verbose ? @theme_description : truncate(@theme_description, 100)
|
||||
puts " | Description: #{theme_desc}"
|
||||
puts " | Author: #@theme_author" if @theme_author
|
||||
puts " | Author URI: #@theme_author_uri" if @theme_author_uri
|
||||
|
||||
@@ -5,12 +5,12 @@ class WpVersion < WpItem
|
||||
|
||||
def output(verbose = false)
|
||||
puts
|
||||
puts green('[+]') + " WordPress version #{self.number} identified from #{self.found_from}"
|
||||
puts "#{green('[+]')} WordPress version #{self.number} identified from #{self.found_from}"
|
||||
|
||||
vulnerabilities = self.vulnerabilities
|
||||
|
||||
unless vulnerabilities.empty?
|
||||
puts red('[!]') + " #{vulnerabilities.size} vulnerabilities identified from the version number"
|
||||
puts "#{red('[!]')} #{vulnerabilities.size} vulnerabilities identified from the version number"
|
||||
|
||||
vulnerabilities.output
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user