Sha256: 39f07e985552f541c1dc6ff496ab451f86b82105cf7d12c4654bf47127f6c293

Contents?: true

Size: 1.63 KB

Versions: 4

Compression:

Stored size: 1.63 KB

Contents

=begin
                  Arachni
  Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>

  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 AutoLogin plugin
        #
        # @author: Tasos "Zapotek" Laskos
        #                                      <tasos.laskos@gmail.com>
        #                                      <zapotek@segfault.gr>
        # @version: 0.1
        #
        class AutoLogin < 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{
                    <h3>AutoLogin</h3>
                    <blockquote><pre><%=::Arachni::Reports::HTML.prep_description(@description)%></pre></blockquote>

                    <h4>Result</h4>
                    <blockquote><%=@results[:msg]%></blockquote>

                    <% if @results[:cookies].is_a?( Hash )%>
                    <h5>Cookies were set to:</h5>
                    <ul>
                    <% @results[:cookies].each_pair do |name, val|%>
                        <li><%=name%> = <%=val%></li>
                    <%end%>
                    <ul>
                    <%end%>
                }

            end

        end

    end
end

end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
arachni-0.3 reports/plugin_formatters/html/autologin.rb
arachni-0.2.4 reports/plugin_formatters/html/autologin.rb
arachni-0.2.3 reports/plugin_formatters/html/autologin.rb
arachni-0.2.2.2 reports/plugin_formatters/html/autologin.rb