Sha256: 06bcfb4f85b79ab7c785ea9a5c79f8f543adf53679c29142323b52a1454137ba

Contents?: true

Size: 1.33 KB

Versions: 6

Compression:

Stored size: 1.33 KB

Contents

=begin
    Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.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::XML

# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class PluginFormatters::VectorCollector < Arachni::Plugin::Formatter

    def run( xml )
        results.each do |url, vectors|
            vectors.each do |vector|
                xml.vector {
                    xml.class_ vector['class']
                    xml.type vector['type']
                    xml.url vector['url']
                    xml.action vector['action']

                    if vector['source']
                        xml.source vector['source']
                    end

                    if vector['method']
                        xml.method_ vector['method']
                    end

                    if vector['inputs']
                        xml.inputs {
                            vector['inputs'].each do |k, v|
                                xml.input( name: k, value: v )
                            end
                        }
                    end
                }
            end
        end
    end

end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arachni-1.3.2 components/reporters/plugin_formatters/xml/vector_collector.rb
arachni-1.3.1 components/reporters/plugin_formatters/xml/vector_collector.rb
arachni-1.3 components/reporters/plugin_formatters/xml/vector_collector.rb
arachni-1.2.1 components/reporters/plugin_formatters/xml/vector_collector.rb
arachni-1.2 components/reporters/plugin_formatters/xml/vector_collector.rb
arachni-1.1 components/reporters/plugin_formatters/xml/vector_collector.rb