Class: PluginFormatters::CookieCollector
- Inherits:
-
Arachni::Plugin::Formatter
- Object
- Arachni::Plugin::Formatter
- PluginFormatters::CookieCollector
- Includes:
- TemplateUtilities
- Defined in:
- components/reporters/plugin_formatters/stdout/cookie_collector.rb,
components/reporters/plugin_formatters/html/cookie_collector.rb,
components/reporters/plugin_formatters/xml/cookie_collector.rb
Overview
XML formatter for the results of the CookieCollector plugin
Instance Method Summary collapse
Instance Method Details
#run(xml) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'components/reporters/plugin_formatters/stdout/cookie_collector.rb', line 16 def run results.each_with_index do |result, i| print_info "[#{(i + 1).to_s}] On #{result['time']}" print_info "URL: #{result['response']['url']}" print_info 'Cookies forced to: ' result['cookies'].each_pair do |name, value| print_info " #{name} => #{value}" end print_line end 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 |
# File 'components/reporters/plugin_formatters/html/cookie_collector.rb', line 21 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 |