Thanks for new response Denis. I still can make extendRemoteControl works. So I decided put a bit of code on this discussion.
I'm going step by step.
First of all I'm using python
jsonrpc_requests package, to execute transactions with RemoteControl.
What I do is initialize a connection with the server with
Code:
s = Server('limesurvey_installation/index.php/admin/remotecontrol')
and then, define
session_key variable with
Code:
session_key = s.get_session_key(<user>, <password>)
After that I already can call RemoteControl functions. Ok.
Now, following your tips, I'm trying to redefine the url to
Code:
limesurvey_installation/index.php/plugins/unsecure?plugin=extendRemoteControl&function=action
in order to access RemoteControlHandler functions.
Hacking
Server class the line that defines s.request attribute is
Code:
self.request = functools.partial(self.session.post, url, **requests_kwargs)
so I'm trying to define a new
url with
Code:
s.request = functools.partial(s.session.post, url='limesurvey_installation/index.php/plugins/unsecure?plugin=extendRemoteControl&function=action')
and then calling the function
get_me of RemoteControlHandler, with
Code:
s.get_me(s.session_key)
Now I receive this error:
Code:
File "python3.5/site-packages/jsonrpc_requests/jsonrpc.py", line 104, in __call__
return self.__request_method(self.__method_name, args, kwargs)
File "python3.5/site-packages/jsonrpc_requests/jsonrpc.py", line 88, in __request
return self.send_request(method_name, is_notification, args or kwargs)
File "python3.5/site-packages/jsonrpc_requests/jsonrpc.py", line 47, in send_request
raise TransportError('Cannot deserialize response body', value_error)
jsonrpc_requests.jsonrpc.TransportError: ('Cannot deserialize response body', JSONDecodeError('Expecting value: line 1 column 1 (char 0)',))
---
Below is the Server class constructor:
Code:
class Server(object):
"""A connection to a HTTP JSON-RPC server, backed by requests"""
def __init__(self, url, session=None, **requests_kwargs):
self.session = session or requests.Session()
self.session.headers.update({
'Content-Type': 'application/json',
'Accept': 'application/json-rpc',
})
self.request = functools.partial(self.session.post, url, **requests_kwargs)