diff --git a/lib/common/models/vulnerability/output.rb b/lib/common/models/vulnerability/output.rb index 94ff5503..6c0a7f35 100644 --- a/lib/common/models/vulnerability/output.rb +++ b/lib/common/models/vulnerability/output.rb @@ -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 diff --git a/lib/common/models/wp_item/output.rb b/lib/common/models/wp_item/output.rb index c53ba09e..6cc888d7 100644 --- a/lib/common/models/wp_item/output.rb +++ b/lib/common/models/wp_item/output.rb @@ -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 " | Location: #{url}" + 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 " | 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? additional_output(verbose) if respond_to?(:additional_output) diff --git a/lib/common/models/wp_theme/output.rb b/lib/common/models/wp_theme/output.rb index fd3c6f25..eb1d7b9b 100644 --- a/lib/common/models/wp_theme/output.rb +++ b/lib/common/models/wp_theme/output.rb @@ -5,18 +5,18 @@ class WpTheme # @return [ Void ] 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) - puts " | Description: #{theme_desc}" - puts " | Author: #@theme_author" if @theme_author - puts " | Author URI: #@theme_author_uri" if @theme_author_uri - puts " | Template: #@theme_template" if @theme_template 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 + puts " | Style URL: #{style_url}" + puts " | Theme Name: #@theme_name" if @theme_name + puts " | Theme URI: #@theme_uri" if @theme_uri + puts " | Description: #{theme_desc}" + puts " | Author: #@theme_author" if @theme_author + puts " | Author URI: #@theme_author_uri" if @theme_author_uri + puts " | Template: #@theme_template" if @theme_template 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 diff --git a/lib/common/models/wp_version/output.rb b/lib/common/models/wp_version/output.rb index 1fdb8625..5fa7f0d3 100644 --- a/lib/common/models/wp_version/output.rb +++ b/lib/common/models/wp_version/output.rb @@ -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