Sha256: e8410ee06574b9f02addfbcd61e9c5652f34585efd033d8b48fc543366cf3b99

Contents?: true

Size: 1.35 KB

Versions: 7

Compression:

Stored size: 1.35 KB

Contents

=begin
    Copyright 2010-2014 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

module Arachni

require Options.paths.lib + 'plugin/manager'

module RPC
class Server

# @private
module Plugin

# We need to extend the original Manager and redeclare its inherited methods
# which are required over RPC.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class Manager < ::Arachni::Plugin::Manager

    # make these inherited methods visible again
    private :available, :loaded, :results
    public  :available, :loaded, :results

    def load( plugins )
        if plugins.is_a?( Array )
            h = {}
            plugins.each { |p| h[p] = @framework.options.plugins[p] || {} }
            plugins = h
        end

        plugins.each do |plugin, opts|
            prepare_options( plugin, self[plugin], opts )
        end

        @framework.options.plugins.merge!( plugins )
        super( plugins.keys )
    end

    # Merges the plug-in results of multiple instances by delegating to
    # {Data::Plugins#merge_results}.
    def merge_results( results )
        Data.plugins.merge_results self, results
    end

end

end
end
end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arachni-1.0.6 lib/arachni/rpc/server/plugin/manager.rb
arachni-1.0.5 lib/arachni/rpc/server/plugin/manager.rb
arachni-1.0.4 lib/arachni/rpc/server/plugin/manager.rb
arachni-1.0.3 lib/arachni/rpc/server/plugin/manager.rb
arachni-1.0.2 lib/arachni/rpc/server/plugin/manager.rb
arachni-1.0.1 lib/arachni/rpc/server/plugin/manager.rb
arachni-1.0 lib/arachni/rpc/server/plugin/manager.rb