reports/plugin_formatters/stdout/healthmap.rb in arachni-0.4.5.2 vs reports/plugin_formatters/stdout/healthmap.rb in arachni-0.4.6

- old
+ new

@@ -1,7 +1,7 @@ =begin - Copyright 2010-2013 Tasos Laskos <tasos.laskos@gmail.com> + Copyright 2010-2014 Tasos Laskos <tasos.laskos@gmail.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -14,23 +14,21 @@ limitations under the License. =end class Arachni::Reports::Stdout -# # Stdout formatter for the results of the HealthMap plugin # # @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com> -# class PluginFormatters::HealthMap < Arachni::Plugin::Formatter def run print_info 'Legend:' print_ok 'No issues' print_bad 'Has issues' print_line - results[:map].each do |i| + results[:map].sort_by { |_, v| v }.each do |i| state = i.keys[0] url = i.values[0] if state == :unsafe print_bad( url )