Remote code execution client - this library uses Guzwrap to construct request and
then send it to
RCE Server.
RCE Server will then perform the actual request and return the response to the
client.
This project is currently receiving massive updates, which may include code refactoring, namespace change, and many
other stuffs that may cause the code to brake or not work entirely.
This project is not ready!!!
composer require remcodex/client
The following request will be encoded to json and send it to RCE Server , the server will then decode the request and execute it and return the response to client.
use Guzwrap\Wrapper\Form;
use Guzwrap\UserAgent;
use Remcodex\Client\Http\Request;
require 'vendor/autoload.php';
$response = Request::create()
->post(function (Form $form){
$form->action('http://localhost:8000');
$form->method('post');
$form->field('name', 'Ahmard');
$form->field('time', date('H:i:s'));
})
->userAgent(UserAgent::OPERA)
->withSharedCookie()
->debug()
->execute();
var_dump($response->getSuccess()->getData());
Start server
php server.php
Set your prepared remote server / router address.
The following code will send request to http://localhost:8000 using router hosted at http://localhost:9000
use Remcodex\Client\Http\Request;
$response = Request::create()
->remoteAddress('http://localhost:9000')
->get('http://localhost:8000')
->exec();
List servers hosted in RCE Router
use Remcodex\Client\Http\Request;
$servers = Request::listServers();