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 <[email protected]>

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Message

#merge!, #prepare_for_tx

Constructor Details

#initializeRequest

Returns 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

#argsArray

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

#callbackProc

Callback to be invoked on the response.

Returns:

  • (Proc)


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

def callback
  @callback
end

#messageString

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

#tokenString

Optional authentication token.

Returns:

  • (String)


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

def token
  @token
end

Instance Method Details

#defer?Boolean

Returns:

  • (Boolean)


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

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

#do_not_deferObject



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

def do_not_defer
    @defer = false
end