Sha256: 41a97cfa23c4fdc704d0fe7fb682c96e6434446582354fea6693cb06a83ebde2

Contents?: true

Size: 1.34 KB

Versions: 6

Compression:

Stored size: 1.34 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::LoginScript < Arachni::Plugin::Formatter
    include TemplateUtilities

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

    def tpl
        <<-HTML
        <% if results['status'] == 'success' %>
                <p class="alert alert-success">
                    <%= results['message'] %>
                </p>

                <h3>Cookies set to:</h3>

                <dl class="dl-horizontal">
                    <% results['cookies'].each do |k, v| %>
                        <dt>
                            <code><%= escapeHTML( k ) %></code>
                        </dt>
                        <dd>
                            <code><%= escapeHTML( v ) %></code>
                        </dd>
                    <% end %>
                </dl>
        <% else %>
            <p class="alert alert-danger">
                <%= results['message'] %>
            </p>
        <% 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/login_script.rb
arachni-1.3.1 components/reporters/plugin_formatters/html/login_script.rb
arachni-1.3 components/reporters/plugin_formatters/html/login_script.rb
arachni-1.2.1 components/reporters/plugin_formatters/html/login_script.rb
arachni-1.2 components/reporters/plugin_formatters/html/login_script.rb
arachni-1.1 components/reporters/plugin_formatters/html/login_script.rb