Skip to content
Tasos Laskos edited this page Sep 17, 2013 · 24 revisions

Home

This page will go through the protocol data units and their trasnmission.

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, Arachni responds to both Marshal and YAML.

Request messages contain the following key-value pairs:

  • message -- RPC message in the form of handler.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.

Flow

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. The Client is also free to maintain multiple connections open in order to improve performance under heavy loads.

Implementation

You can find a simple client implementation using SSL Sockets over here.
Arachni-RPC Pure should give you a nice idea of how to implement a client in your language of choice.

Clone this wiki locally