Class: Arachni::RPC::Response

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

Overview

Represents an RPC response.

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:

{
    # result of the RPC call
    'obj' => object
}

Author:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Message

#initialize, #merge!, #prepare_for_tx

Constructor Details

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

Instance Attribute Details

#exceptionHash

For all available exception types look at Exceptions.

Returns:

  • (Hash)

    "name" => "Trying to access non-existent object 'blah'.",
    "backtrace" => [
        [0] "/home/zapotek/workspace/arachni-rpc/lib/arachni/rpc/server.rb:285:in `call'",
        [1] "/home/zapotek/workspace/arachni-rpc/lib/arachni/rpc/server.rb:85:in `block in receive_object'",
    ],
    "type" => "InvalidObject"
    



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

def exception
  @exception
end

#objObject

Return object of the Arachni::RPC::Request#message.

Returns:



28
29
30
# File 'lib/arachni/rpc/response.rb', line 28

def obj
  @obj
end

Instance Method Details

#async!Object



52
53
54
# File 'lib/arachni/rpc/response.rb', line 52

def async!
    @async = true
end

#async?Boolean

Returns:

  • (Boolean)


48
49
50
# File 'lib/arachni/rpc/response.rb', line 48

def async?
    !!@async
end

#exception?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/arachni/rpc/response.rb', line 44

def exception?
    !!exception
end