Sha256: 4a2dcc119fbc88fa99a2101146cee5526d94cd8aad2db24c1ad24a7a82b0422c
Contents?: true
Size: 1.49 KB
Versions: 5
Compression:
Stored size: 1.49 KB
Contents
=begin Copyright 2010-2022 Ecsypno <http://www.ecsypno.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 # HTML formatter for the results of the WAF Detector plugin. # # @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com> class PluginFormatters::WAFDetector < Arachni::Plugin::Formatter include TemplateUtilities def run ERB.new( tpl ).result( binding ) end def tpl <<-HTML <h3>Result</h3> <p class="alert alert-<%= message_type %>"> <b class="fa fa-<%= icon %>"></b> <strong><%= status %></strong>: <%= message %> </p> HTML end def status escapeHTML results['status'].capitalize end def message escapeHTML results['message'].capitalize.gsub( '_', ' ' ) end def icon case results['status'] when 'found' 'check' when 'not_found' 'times' when 'inconclusive' 'question' end end def message_type case results['status'] when 'found' 'success' when 'not_found' 'danger' when 'inconclusive' 'warning' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems