=begin Arachni Copyright (c) 2010-2011 Tasos "Zapotek" Laskos This is free software; you can copy and distribute and modify this program under the term of the GPL v2.0 License (See LICENSE file for details) =end module Arachni module Reports class HTML module PluginFormatters # # HTML formatter for the results of the HealthMap plugin # # @author: Tasos "Zapotek" Laskos # # # @version: 0.1 # class HealthMap < Arachni::Plugin::Formatter def initialize( plugin_data ) @results = plugin_data[:results] @description = plugin_data[:description] end def run return ERB.new( tpl ).result( binding ) end def tpl %q{

Healthmap

<%=@description%>

Results

<% @results[:map].each do |entry| %> <% state = entry.keys[0]%> <% url = entry.values[0]%> <%=CGI.escapeHTML(url)%>
<%end%>
Stats
Total: <%=@results[:total]%>
Safe: <%=@results[:safe]%>
Unsafe: <%=@results[:unsafe]%>
Issue percentage: <%=@results[:issue_percentage]%>% } end end end end end end