$subject) { $normalPool[] = [ 'id' => 'normal_' . $index, 'sender' => $normalSenders[array_rand($normalSenders)], 'subject' => $subject, 'preview' => $normalPreviews[array_rand($normalPreviews)], 'is_spam' => false, 'time' => sprintf('%02d:%02d', random_int(8, 19), random_int(0, 59)) ]; } $spamPool = []; foreach ($spamSubjects as $index => $subject) { $spamPool[] = [ 'id' => 'spam_' . $index, 'sender' => $spamSenders[array_rand($spamSenders)], 'subject' => $subject, 'preview' => $spamPreviews[array_rand($spamPreviews)], 'is_spam' => true, 'time' => sprintf('%02d:%02d', random_int(0, 23), random_int(0, 59)) ]; } shuffle($normalPool); shuffle($spamPool); $selected = array_slice($normalPool, 0, 9); $selected[] = $spamPool[0]; shuffle($selected); return [ 'token' => bin2hex(random_bytes(16)), 'correct_id' => $spamPool[0]['id'], 'emails' => $selected, 'attempts_left' => $maxAttempts ]; } if (!isset($_SESSION['captcha_round']) || !is_array($_SESSION['captcha_round'])) { $_SESSION['captcha_round'] = buildInboxRound( $normalSubjects, $normalSenders, $normalPreviews, $spamSubjects, $spamSenders, $spamPreviews, $maxAttempts ); } $round = $_SESSION['captcha_round']; $error = ''; $success = false; $locked = false; if (!isset($round['emails']) || !is_array($round['emails'])) { $_SESSION['captcha_round'] = buildInboxRound( $normalSubjects, $normalSenders, $normalPreviews, $spamSubjects, $spamSenders, $spamPreviews, $maxAttempts ); $round = $_SESSION['captcha_round']; } // Gestion de la soumission du formulaire if ($_SERVER['REQUEST_METHOD'] === 'POST') { $postedToken = $_POST['captcha_token'] ?? ''; $selectedMail = $_POST['selected_mail'] ?? ''; if (!hash_equals($round['token'], $postedToken)) { $error = 'Session invalide, recharge la page.'; } elseif (($round['attempts_left'] ?? 0) <= 0) { $locked = true; $error = 'Tu n’as plus d’essais. Recharge une nouvelle série.'; } elseif ($selectedMail !== $round['correct_id']) { $_SESSION['captcha_round']['attempts_left']--; $round = $_SESSION['captcha_round']; if (($round['attempts_left'] ?? 0) <= 0) { $locked = true; $error = 'Perdu. Tu n’as plus d’essais. Recharge une nouvelle série.'; // Log Discord : visiteur bloqué au captcha (possible robot) sendLog("Captcha raté : plus aucun essai restant (possible robot)"); } else { $error = 'Ce n’est pas le bon mail. Regarde mieux le message le plus agressif ou trop urgent.'; // Log Discord : mauvaise réponse au captcha sendLog("Captcha raté : mauvaise réponse (" . $round['attempts_left'] . " essai(s) restant(s))"); } } else { $_SESSION['captcha_valid'] = true; unset($_SESSION['captcha_round']); $success = true; // Log Discord : captcha validé, le visiteur accède au site sendLog("Captcha réussi : nouveau visiteur sur le site"); } } $attemptsLeft = $round['attempts_left'] ?? 0; ?> Test anti-robot

Vérification réussie

Bravo, tu as trouvé le mail frauduleux. Redirection en cours...

🛡️ Test anti-robot

Vérification humaine

Pour continuer, cliquez sur le mail frauduleux parmi les 10 messages ci-dessous.

Vérification demandée Trouver le spam
Essais restants /
Recharger une nouvelle série
Test anti-robot : trouvez le mail qui ressemble à une arnaque