Hi all,
I tried to make the example *PrivEscExample.tar.gz* to work but I cannot find how to call the Namespace/module/function from PHP.
For short, how to translate this call in PHP :
Before cPanel 11.38, something like the following code would have worked :
But now it didn't work anymore as it try to load a module which is not present anymore.
I tried the following which seems to me a good candidate :
But it seems that the "Wrap" module lacks the function "send_cpwrapd_request".
As I didn't find any documentation explaining how to access the wrapper function from PHP, could someone from cPanel staff give me some hints or point me to the explanations that I missed.
Thanks in advance.
Cheers,
Philipppe
I tried to make the example *PrivEscExample.tar.gz* to work but I cannot find how to call the Namespace/module/function from PHP.
For short, how to translate this call in PHP :
Code:
my $result = Cpanel::Wrap::send_cpwrapd_request(
'namespace' => 'MyNamespace',
'module' => 'MyExample',
'function' => 'ECHO',
'data' => 'Hello World !'
);
Code:
$this->cpanel = new CPANEL();
$param['data'] = 'Hello World!';
$res = $this->cpanel->api2('MyExample', 'ECHO', $param);
I tried the following which seems to me a good candidate :
Code:
$param['namespace'] = 'MyNamespace';
$param['module'] = 'MyExample';
$param['function'] = 'ECHO';
$param['data'] = 'Hello World!';
$res = $this->cpanel->api2('Wrap', 'send_cpwrapd_request', $param);
As I didn't find any documentation explaining how to access the wrapper function from PHP, could someone from cPanel staff give me some hints or point me to the explanations that I missed.
Thanks in advance.
Cheers,
Philipppe