Class: PluginFormatters::AutoLogin

Inherits:
Arachni::Plugin::Formatter
  • Object
show all
Includes:
TemplateUtilities
Defined in:
components/reporters/plugin_formatters/stdout/autologin.rb,
components/reporters/plugin_formatters/html/autologin.rb,
components/reporters/plugin_formatters/xml/autologin.rb

Overview

XML formatter for the results of the AutoLogin plugin

Author:

Instance Method Summary collapse

Instance Method Details

#run(xml) ⇒ Object



16
17
18
19
20
21
22
# File 'components/reporters/plugin_formatters/stdout/autologin.rb', line 16

def run
    print_ok results['message']

    return if !results['cookies']
    print_info 'Cookies set to:'
    results['cookies'].each_pair { |name, val| print_info "    * #{name} = #{val}" }
end

#tplObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'components/reporters/plugin_formatters/html/autologin.rb', line 21

def tpl
    "        <% if results['status'] == 'ok' %>\n                <p class=\"alert alert-success\">\n                    <%= results['message'] %>\n                </p>\n\n                <h3>Cookies set to:</h3>\n\n                <dl class=\"dl-horizontal\">\n                    <% results['cookies'].each do |k, v| %>\n                        <dt>\n                            <code><%= escapeHTML( k ) %></code>\n                        </dt>\n                        <dd>\n                            <code><%= escapeHTML( v ) %></code>\n                        </dd>\n                    <% end %>\n                </dl>\n        <% else %>\n            <p class=\"alert alert-danger\">\n                <%= results['message'] %>\n            </p>\n        <% end %>\n    HTML\nend\n"