<?php
// --- Vérification du fichier .htaccess ---
$htaccess_file = '.htaccess';
if (file_exists($htaccess_file)) {
$htaccess_content = file_get_contents($htaccess_file);
echo "<h3>Contenu du fichier .htaccess :</h3>";
echo "<pre>" . htmlspecialchars($htaccess_content) . "</pre>";
// Recherche de mots-clés suspects dans .htaccess
$suspicious_keywords = ['Redirect', 'RewriteRule', 'Header', 'Location'];
foreach ($suspicious_keywords as $keyword) {
if (strpos($htaccess_content, $keyword) !== false) {
echo "<p><strong>Attention :</strong> Le mot-clé '$keyword' a été trouvé dans .htaccess. Cela peut indiquer une redirection.</p>";
}
}
} else {
echo "<p>Le fichier .htaccess n'existe pas.</p>";
}
// --- Vérification du fichier index.php ---
$index_file = 'index.php';
if (file_exists($index_file)) {
$index_content = file_get_contents($index_file);
echo "<h3>Contenu du fichier index.php :</h3>";
echo "<pre>" . htmlspecialchars($index_content) . "</pre>";
// Recherche de mots-clés suspects dans index.php
$suspicious_php_keywords = ['header(', 'Location:', 'eval(', 'base64_decode(', 'str_rot13('];
foreach ($suspicious_php_keywords as $keyword) {
if (strpos($index_content, $keyword) !== false) {
echo "<p><strong>Attention :</strong> Le mot-clé '$keyword' a été trouvé dans index.php. Cela peut indiquer un code malveillant.</p>";
}
}
} else {
echo "<p>Le fichier index.php n'existe pas.</p>";
}
?>Attention : Le mot-clé 'header(' a été trouvé dans index.php. Cela peut indiquer un code malveillant.
Attention : Le mot-clé 'Location:' a été trouvé dans index.php. Cela peut indiquer un code malveillant.
Attention : Le mot-clé 'eval(' a été trouvé dans index.php. Cela peut indiquer un code malveillant.
Attention : Le mot-clé 'base64_decode(' a été trouvé dans index.php. Cela peut indiquer un code malveillant.
Attention : Le mot-clé 'str_rot13(' a été trouvé dans index.php. Cela peut indiquer un code malveillant.