class Arachni::RPC::Client::Dispatcher

RPC Dispatcher client

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Attributes

node[R]

Public Class Methods

new( opts, url ) click to toggle source
# File lib/arachni/rpc/client/dispatcher.rb, line 23
def initialize( opts, url )
    @client = Base.new( opts, url )
    @node   = Proxy.new( @client, 'node' )

    # map Dispatcher handlers
    Dir.glob( "#{Options.paths.services}*.rb" ).each do |handler|
        name = File.basename( handler, '.rb' )

        self.class.send( :attr_reader, name.to_sym )
        instance_variable_set( "@#{name}".to_sym, Proxy.new( @client, name ) )
    end
end

Public Instance Methods

close() click to toggle source
# File lib/arachni/rpc/client/dispatcher.rb, line 40
def close
    @client.close
end
url() click to toggle source
# File lib/arachni/rpc/client/dispatcher.rb, line 36
def url
    @client.url
end

Private Instance Methods

method_missing( sym, *args, &block ) click to toggle source

Used to provide the illusion of locality for remote methods

# File lib/arachni/rpc/client/dispatcher.rb, line 47
def method_missing( sym, *args, &block )
    @client.call( "dispatcher.#{sym.to_s}", *args, &block )
end