Class: PluginFormatters::AutoLogin
- Inherits:
-
Arachni::Plugin::Formatter
- Object
- Arachni::Plugin::Formatter
- PluginFormatters::AutoLogin
- 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
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 |
#tpl ⇒ Object
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 <<-HTML <% if results['status'] == 'ok' %> <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 |