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:

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

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

Author:

Instance Attribute Summary collapse

Method Summary

Methods inherited from Message

#initialize, #merge!, #prepare_for_tx

Constructor Details

This class inherits a constructor from Arachni::RPC::Message

Instance Attribute Details

#argsArray

Returns Optional arguments for the remote method.

Returns:

  • (Array)

    Optional arguments for the remote method.



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

def args
  @args
end

#callbackProc

Returns Callback to be invoked on the response.

Returns:

  • (Proc)

    Callback to be invoked on the response.



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

def callback
  @callback
end

#messageString

Returns RPC message in the form of ‘handler.method’.

Returns:

  • (String)

    RPC message in the form of ‘handler.method’.



38
39
40
# File 'lib/arachni/rpc/request.rb', line 38

def message
  @message
end

#tokenString

Returns Optional authentication token.

Returns:

  • (String)

    Optional authentication token.



46
47
48
# File 'lib/arachni/rpc/request.rb', line 46

def token
  @token
end