=begin Arachni Copyright (c) 2010-2012 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 ContentTypes plugin # # @author: Tasos "Zapotek" Laskos # # # @version: 0.1 # class ContentTypes < Arachni::Plugin::Formatter def run return ERB.new( tpl ).result( binding ) end def tpl %q{ <% @results.each_pair do |type, responses| %>
  • <%=type%>
      <% responses.each do |res| %>
    • URL: <%=CGI.escapeHTML(res[:url])%>
      Method: <%=res[:method]%> <% if res[:params] && res[:method].downcase == 'post' %>
      • Parameters:
      • <%res[:params].each_pair do |name, val|%>
      • <%=name%> = <%=val%>
      • <%end%>
          <%end%> <%end%>
      <%end%> } end end end end end end