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