Sha256: e85e51be9128116ea17b6e01675150f799861260841f344735548dcd73e6570f

Contents?: true

Size: 1.36 KB

Versions: 7

Compression:

Stored size: 1.36 KB

Contents

=begin
    Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

class Arachni::Reporters::HTML

# HTML formatter for the results of the CookieCollector plugin.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class PluginFormatters::CookieCollector < Arachni::Plugin::Formatter
    include TemplateUtilities

    def run
        ERB.new( tpl ).result( binding )
    end

    def tpl
        <<-HTML
            <ul>
            <% results.each do |entry| %>
                <li>
                    On <strong><%= entry['time'] %></strong> by

                    <a href="<%= escapeHTML entry['response']['url'] %>">
                        <%= escapeHTML entry['response']['url'] %>
                    </a>

                    <ul>
                        <% (entry['response']['headers']['Set-Cookie'] || []).each do |set_cookie| %>
                            <li>
                                <code><%= escapeHTML set_cookie %></code>
                            </li>
                        <% end %>
                    </ul>
                </li>
            <% end %>
            </ul>
        HTML
    end

end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arachni-1.0.6 components/reporters/plugin_formatters/html/cookie_collector.rb
arachni-1.0.5 components/reporters/plugin_formatters/html/cookie_collector.rb
arachni-1.0.4 components/reporters/plugin_formatters/html/cookie_collector.rb
arachni-1.0.3 components/reporters/plugin_formatters/html/cookie_collector.rb
arachni-1.0.2 components/reporters/plugin_formatters/html/cookie_collector.rb
arachni-1.0.1 components/reporters/plugin_formatters/html/cookie_collector.rb
arachni-1.0 components/reporters/plugin_formatters/html/cookie_collector.rb