[ 'name' => 'Administration & Monitoring', 'icon' => 'fa-tachometer-alt', 'color' => '#22d3ee', 'patterns' => ['system-', 'monitoring', 'security', 'session', 'console', 'whitelist', 'api-security', 'quick-access', 'audit'] ], 'huawei' => [ 'name' => 'Huawei Cloud', 'icon' => 'fa-cloud', 'color' => '#ef4444', 'patterns' => ['huawei-'] ], 'office' => [ 'name' => 'Office 365 / Microsoft', 'icon' => 'fa-microsoft', 'color' => '#0078d4', 'patterns' => ['office-', 'microsoft-', 'azure-'] ], 'cloudflare' => [ 'name' => 'Cloudflare & DNS', 'icon' => 'fa-shield-alt', 'color' => '#f59e0b', 'patterns' => ['cloudflare-', 'domain', 'freedns', 'dkim', 'ptr', 'dns-'] ], 'tracking' => [ 'name' => 'Tracking & Analytics', 'icon' => 'fa-chart-line', 'color' => '#10b981', 'patterns' => ['tracking-', 'stats-', 'analytics-'] ], 'email' => [ 'name' => 'Email & Delivery', 'icon' => 'fa-envelope', 'color' => '#8b5cf6', 'patterns' => ['email-', 'smtp-', 'deliverability', 'bounce-', 'warmup-', 'pmta-'] ], 'database' => [ 'name' => 'Base de Données', 'icon' => 'fa-database', 'color' => '#06b6d4', 'patterns' => ['adminer', 'database-', 'db-', 'test-bd', 'sql-', 'postgres-'] ], 'chatbot' => [ 'name' => 'Chatbot & AI', 'icon' => 'fa-robot', 'color' => '#ec4899', 'patterns' => ['chatbot-', 'ai-', 'ollama-', 'gpt-'] ], 'tools' => [ 'name' => 'Outils & Utilitaires', 'icon' => 'fa-tools', 'color' => '#64748b', 'patterns' => ['tool-', 'util-', 'helper-', 'check', 's3_', 'upload', 'import', 'export'] ], 'docs' => [ 'name' => 'Documentation', 'icon' => 'fa-book', 'color' => '#a855f7', 'patterns' => ['doc', 'architecture', 'help-', 'guide-', 'readme'] ], 'auth' => [ 'name' => 'Authentification', 'icon' => 'fa-lock', 'color' => '#eab308', 'patterns' => ['login', 'auth-', 'logout', 'password', 'register'] ], 'test' => [ 'name' => 'Tests & Debug', 'icon' => 'fa-flask', 'color' => '#f97316', 'patterns' => ['test', 'debug', 'phpinfo', 'error_', 'check-'] ], ]; // Fichiers à exclure $excludeFiles = [ 'index.php', 'standalone-index.php', '.htaccess', 'click.php', // 404 'lead.php', // 404 'open.php', // endpoint tracking 'unsub.php', // endpoint tracking ]; // Fichiers endpoints (tracking) - à afficher séparément $endpointFiles = ['open.php', 'unsub.php', 'click.php', 'lead.php', 'pixel.php', 'redirect.php']; // Scanner le répertoire function scanPublicFiles($dir, $excludeFiles) { $files = []; $items = scandir($dir); foreach ($items as $item) { if ($item[0] === '.') continue; $path = $dir . '/' . $item; if (is_file($path)) { $ext = pathinfo($item, PATHINFO_EXTENSION); if (in_array($ext, ['php', 'html']) && !in_array($item, $excludeFiles)) { $files[] = [ 'name' => $item, 'path' => $path, 'ext' => $ext, 'size' => filesize($path), 'modified' => filemtime($path), ]; } } } return $files; } // Catégoriser un fichier function categorizeFile($filename, $categories) { $filename_lower = strtolower($filename); foreach ($categories as $key => $cat) { foreach ($cat['patterns'] as $pattern) { if (strpos($filename_lower, strtolower($pattern)) !== false) { return $key; } } } return 'other'; } // Vérifier l'accessibilité function checkFileAccessibility($filename) { $url = "http://127.0.0.1:5821/" . $filename; $ch = curl_init($url); curl_setopt_array($ch, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_NOBODY => true, CURLOPT_TIMEOUT => 2, CURLOPT_FOLLOWLOCATION => false, ]); curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return $code; } // Générer une description basée sur le nom function generateDescription($filename) { $name = pathinfo($filename, PATHINFO_FILENAME); $name = str_replace(['-', '_'], ' ', $name); $name = ucwords($name); return $name; } // Scanner les fichiers $publicDir = __DIR__; $allFiles = scanPublicFiles($publicDir, $excludeFiles); // Organiser par catégorie $categorizedFiles = []; foreach ($categories as $key => $cat) { $categorizedFiles[$key] = []; } $categorizedFiles['other'] = []; foreach ($allFiles as $file) { $category = categorizeFile($file['name'], $categories); $file['description'] = generateDescription($file['name']); $categorizedFiles[$category][] = $file; } // Trier chaque catégorie foreach ($categorizedFiles as &$files) { usort($files, function($a, $b) { return strcmp($a['name'], $b['name']); }); } // Statistiques $totalFiles = count($allFiles); $lastUpdate = date('d/m/Y H:i:s'); $serverIp = '89.167.40.150'; $port = '5821'; // AJAX pour vérification status if (isset($_GET['check']) && isset($_GET['file'])) { header('Content-Type: application/json'); $code = checkFileAccessibility($_GET['file']); echo json_encode(['code' => $code, 'status' => ($code == 200 || $code == 302) ? 'ok' : 'error']); exit; } // Recherche $searchQuery = $_GET['q'] ?? ''; ?> WEVAL - Index des Pages

WEVAL - Index des Pages

fichiers
$catInfo): ?>
fichiers
NEW
KB
Autres
fichiers
NEW
KB
URL copiée!