-
Notifications
You must be signed in to change notification settings - Fork 6
Home
This page will go through the protocol data units and their trasnmission.
(If you are looking for how to communicate with Arachni please see the RPC API page on Arachni's wiki, this document only focuses on the RPC protocol.)
The basic PDU is an RPC Message
which can either be a Request or
a Response.
Each message is formatted as a Hash
data structure and transmitted in serialized form -- the serialization type is up to the implementation.
Request messages contain the following key-value pairs:
-
message
-- RPC message in the form ofhandler.method
. -
args
-- Array of arguments for the remote method or empty array if the method expects no arguments. -
token
-- Optional authentication token to be verified by the server implementation.
Response messages contain the following key-value pairs:
-
obj
-- The return value of the Request. -
exception
-- Used to denote a server-side error and is aHash
containing:-
type
-- Exception type, basically a Ruby class name as a string. -
message
-- Assotiated message. -
backtrace
--Array
ofString
objects.
-
The flow is very simple:
- Client -- Initiates connection to server.
- Server -- Accepts connection.
- Client -- Sends RPC request.
- Server -- Recieves RPC request, sends RPC response.
- Client -- Receives RPC response.
The Server will keep the connection alive so that it can be re-used, however the Client is free to close it if it so chooses.
For a reference implementation of a client, please see the Arachni-RPC Pure repository.