=begin Copyright 2010-2017 Sarosys LLC 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 class PluginFormatters::Metrics < Arachni::Plugin::Formatter include TemplateUtilities def run ERB.new( tpl ).result( binding ) end def tpl <<-HTML

General

Egress traffic
<%= Arachni::Utilities.bytes_to_megabytes results['general']['egress_traffic'] %>MB
Ingress traffic
<%= Arachni::Utilities.bytes_to_megabytes results['general']['ingress_traffic'] %>MB
Uses HTTP
<%= boolean results['general']['uses_http'] %>
Uses HTTPS
<%= boolean results['general']['uses_https'] %>

Scan

Duration
<%= Arachni::Utilities.seconds_to_hms results['scan']['duration'] %>
Authenticated
<%= boolean results['scan']['authenticated'] %>

HTTP

Requests
<%= results['http']['requests'] %>
Requests time outs
<%= results['http']['request_time_outs'] %>
Responses per second
<%= results['http']['responses_per_second'].round(4) %>
Minimum response time
<%= results['http']['response_time_min'].round( 4 ) %>s
Maximum response time
<%= results['http']['response_time_max'].round( 4 ) %>s
Average response time
<%= results['http']['response_time_average'].round( 4 ) %>s
Minimum response size
<%= Arachni::Utilities.bytes_to_kilobytes results['http']['response_size_min'] %> KB
Maximum response size
<%= Arachni::Utilities.bytes_to_kilobytes results['http']['response_size_max'] %> KB
Average response size
<%= Arachni::Utilities.bytes_to_kilobytes results['http']['response_size_average'] %> KB
Minimum request size
<%= Arachni::Utilities.bytes_to_kilobytes results['http']['request_size_min'] %> KB
Maximum request size
<%= Arachni::Utilities.bytes_to_kilobytes results['http']['request_size_max'] %> KB
Average request size
<%= Arachni::Utilities.bytes_to_kilobytes results['http']['request_size_average'] %> KB

Resources

Binary
<%= results['resource']['binary'] %>
Without parameters
<%= results['resource']['without_parameters'] %>
With parameters
<%= results['resource']['with_parameters'] %>

Browser cluster

Job count
<%= results['browser_cluster']['job_count'] %>
Timed-out jobs
<%= results['browser_cluster']['job_time_outs'] %>
Seconds per job
<%= results['browser_cluster']['seconds_per_job'].round(4) %>
Total job time
<%= results['browser_cluster']['total_job_time'] %>s

Elements

Links
<%= results['element']['links'] %>
Forms
<%= results['element']['forms'] %>
— with nonces
<%= boolean results['element']['has_forms_with_nonces'] %>
— with passwords
<%= boolean results['element']['has_forms_with_passwords'] %>
Cookies
<%= results['element']['cookies'] %>
Headers
<%= results['element']['headers'] %>
XMLs
<%= results['element']['xmls'] %>
JSONs
<%= results['element']['jsons'] %>
Total input names
<%= results['element']['input_names_total'] %>
Unique input names
<%= results['element']['input_names_unique'] %>

DOM

Event listeners
<%= results['dom']['event_listeners'] %>
SWF objects
<%= results['dom']['swf_objects'] %>

Platforms

<% results['platforms'].each do |type, platforms| next if platforms.empty? %>
<%= Arachni::Platform::Manager::TYPES[type.to_sym] %>
<%= platforms.map { |platform| Arachni::Platform::Manager::PLATFORM_NAMES[platform.to_sym] }.join( ', ' ) %>
<% end %>
HTML end def boolean( b ) <<-EOHTML EOHTML end end end