Sha256: 0c49b260e3821a5ecd0936650403b99f0b87989ed6ed6aa21c9c2116be5e9c09

Contents?: true

Size: 1.37 KB

Versions: 5

Compression:

Stored size: 1.37 KB

Contents

=begin
                  Arachni
  Copyright (c) 2010-2011 Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>

  This is free software; you can copy and distribute and modify
  this program under the term of the GPL v2.0 License
  (See LICENSE file for details)

=end

module Arachni

require Arachni::Options.instance.dir['reports'] + '/xml/buffer.rb'

module Reports

class XML
    module PluginFormatters

        #
        # XML formatter for the results of the WAF Detector plugin
        #
        # @author: Tasos "Zapotek" Laskos
        #                                      <tasos.laskos@gmail.com>
        #                                      <zapotek@segfault.gr>
        # @version: 0.1
        #
        class WAFDetector < Arachni::Plugin::Formatter

            include Buffer

            def initialize( plugin_data )
                @results     = plugin_data[:results]
                @description = plugin_data[:description]
            end

            def run
                start_tag( 'waf_detector' )
                simple_tag( 'description', @description )

                start_tag( 'results' )

                simple_tag( 'message', @results[:msg] )
                simple_tag( 'code', @results[:code].to_s )

                end_tag( 'results' )
                end_tag( 'waf_detector' )

                return buffer( )
            end

        end

    end
end

end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-0.3 reports/plugin_formatters/xml/waf_detector.rb
arachni-0.2.4 reports/plugin_formatters/xml/waf_detector.rb
arachni-0.2.3 reports/plugin_formatters/xml/waf_detector.rb
arachni-0.2.2.2 reports/plugin_formatters/xml/waf_detector.rb
arachni-0.2.2.1 reports/plugin_formatters/xml/waf_detector.rb