Sha256: 0e92eb6fe94ca5c01502e05d202351286537c0739b4cae7ec7c903663ee25027

Contents?: true

Size: 1.65 KB

Versions: 6

Compression:

Stored size: 1.65 KB

Contents

=begin
    Copyright 2010-2015 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

# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class PluginFormatters::VectorCollector < Arachni::Plugin::Formatter
    include TemplateUtilities

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

    def tpl
        <<-HTML

        <% results.each do |url, vectors| %>
            <h3>
                <a href="<%= escapeHTML url %>">
                    <%= escapeHTML url %>
                </a>
            </h3>

            <% vectors.each do |vector| %>
                <h4>
                    <%= vector['type'] %> pointing to

                    <a href="<%= escapeHTML vector['action'] %>">
                        <%= escapeHTML vector['action'] %>
                    </a>
                </h4>

                <% if vector['inputs'] %>
                    <ul>
                    <% vector['inputs'].each do |name, value| %>
                        <li>
                            <strong><%= escapeHTML name %>:</strong>
                            <%= escapeHTML value.inspect %>
                        </li>
                    <% end %>
                    </ul>
                <% end %>

                <% if vector['source'] %>
                    <pre><%= escapeHTML vector['source'] %></pre>
                <% end %>

            <% end %>
        <% end %>
        HTML
    end

end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arachni-1.3.2 components/reporters/plugin_formatters/html/vector_collector.rb
arachni-1.3.1 components/reporters/plugin_formatters/html/vector_collector.rb
arachni-1.3 components/reporters/plugin_formatters/html/vector_collector.rb
arachni-1.2.1 components/reporters/plugin_formatters/html/vector_collector.rb
arachni-1.2 components/reporters/plugin_formatters/html/vector_collector.rb
arachni-1.1 components/reporters/plugin_formatters/html/vector_collector.rb