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