=begin Arachni Copyright (c) 2010-2011 Tasos "Zapotek" Laskos 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 class MetaModules module MetaFormatters # # XML formatter for the results of the Uniformity metamodule # # @author: Tasos "Zapotek" Laskos # # # @version: 0.1 # class Uniformity < Arachni::Plugin::Formatter include Arachni::Reports::Buffer def initialize( metadata ) @results = metadata[:results] @description = metadata[:description] end def run start_tag( 'uniformity' ) simple_tag( 'description', @description ) start_tag( 'results' ) uniformals = @results['uniformals'] pages = @results['pages'] uniformals.each_pair { |id, uniformal| start_uniformals( id ) uniformal['hashes'].each_with_index { |hash, i| add_uniformal( i, uniformal ) } end_tag( 'uniformals' ) } end_tag( 'results' ) end_tag( 'uniformity' ) end def add_uniformal( idx, uniformal ) __buffer( "" ) end def start_uniformals( id ) __buffer( "" ) end end end end end end end end