Class: Arachni::RPC::Request

Inherits:
Message show all
Defined in:
lib/arachni/rpc/request.rb

Overview

Represents an RPC request.

It's here only for formalization purposes, it's not actually sent over the wire.

What is sent is a hash generated by Message#prepare_for_tx. which is in the form of:

{
    'message'     => msg, # RPC message in the form of 'handler.method'
    'args'        => args, # optional array of arguments for the remote method
    'token'       => token, # optional authentication token
}

Any client that has SSL support and can serialize a Hash just like the one above can communicate with the RPC server.

@author: Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Message

#merge!, #prepare_for_tx

Constructor Details

- (Request) initialize

A new instance of Request

See Also:



66
67
68
# File 'lib/arachni/rpc/request.rb', line 66

def initialize( * )
    super
end

Instance Attribute Details

- (Array) args

Optional array of arguments for the remote method.

Returns:

  • (Array)


49
50
51
# File 'lib/arachni/rpc/request.rb', line 49

def args
  @args
end

- (Proc) callback

Callback to be invoked on the response.

Returns:

  • (Proc)


63
64
65
# File 'lib/arachni/rpc/request.rb', line 63

def callback
  @callback
end

- (String) message

RPC message in the form of 'handler.method'.

Returns:

  • (String)


42
43
44
# File 'lib/arachni/rpc/request.rb', line 42

def message
  @message
end

- (String) token

Optional authentication token.

Returns:

  • (String)


56
57
58
# File 'lib/arachni/rpc/request.rb', line 56

def token
  @token
end

Instance Method Details

- (Boolean) defer?

Returns:

  • (Boolean)


74
75
76
# File 'lib/arachni/rpc/request.rb', line 74

def defer?
    @defer.nil? ? true : @defer
end

- (Object) do_not_defer



70
71
72
# File 'lib/arachni/rpc/request.rb', line 70

def do_not_defer
    @defer = false
end