Sha256: 333246e0c03c083452d936555a6dfd71dac46bcfbc8d8abf458e150fff558b9d

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 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::XML

# XML formatter for the results of the CookieCollector plugin
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class PluginFormatters::CookieCollector < Arachni::Plugin::Formatter

    def run( xml )
        results.each_with_index do |result, i|
            xml.entry {
                xml.time Time.parse( result['time'] ).xmlschema
                xml.url XML.replace_nulls( result['response']['url'] )

                xml.cookies {
                    result['cookies'].each do |name, value|
                        xml.cookie(
                            name:  Arachni::Reporters::XML.replace_nulls( name ),
                            value: Arachni::Reporters::XML.replace_nulls( value )
                        )
                    end
                }
            }
        end
    end

end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-1.6.1.3 components/reporters/plugin_formatters/xml/cookie_collector.rb
arachni-1.6.1.2 components/reporters/plugin_formatters/xml/cookie_collector.rb
arachni-1.6.1.1 components/reporters/plugin_formatters/xml/cookie_collector.rb
arachni-1.6.1 components/reporters/plugin_formatters/xml/cookie_collector.rb
arachni-1.6.0 components/reporters/plugin_formatters/xml/cookie_collector.rb