... | ... | @@ -93,6 +93,10 @@ instance = Arachni::RPC::Pure::Client.new( |
|
|
port: port,
|
|
|
token: instance_info['token']
|
|
|
)
|
|
|
|
|
|
# Makes it easier to perform RPC calls, allows calling `service.method_name`
|
|
|
# instead of `instance.call( 'service.method_name' )`.
|
|
|
service = Arachni::RPC::RemoteObjectMapper.new( instance, 'service' )
|
|
|
```
|
|
|
|
|
|
**In order to successfully authenticate yourself to the instance don't forget
|
... | ... | @@ -110,14 +114,12 @@ manager, etc.). |
|
|
Let's see how one would go about performing a few calls.
|
|
|
|
|
|
```ruby
|
|
|
# Calls #list_modules on the 'service' handler.
|
|
|
instance.call( 'service.list_modules' )
|
|
|
service.list_modules
|
|
|
```
|
|
|
|
|
|
To call a server-side method with parameters you simply pass those parameters to
|
|
|
the `#call` method of the RPC client, like so:
|
|
|
|
|
|
```ruby
|
|
|
# Calls #progress on the 'service' handler with a parameter.
|
|
|
instance.call( 'service.progress', without: :stats )
|
|
|
service.progress without: :stats
|
|
|
``` |