Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
f40bb59
Documentation de la fonction d'entropie
e-mandy Aug 2, 2025
0474003
Merge branch 'feature/calculerEntropieShannon' of https://github.com/…
e-mandy Aug 2, 2025
8f0dbfc
Essai de fusion (1/2)
e-mandy Aug 2, 2025
eadb52d
Fusion (2/2)
e-mandy Aug 3, 2025
2a008e2
Implementation de la fonction de validation du texte déchiffrer
seathiel-12 Aug 3, 2025
b638a49
Récupération du main (1/2)
e-mandy Aug 3, 2025
ecf4eef
Récupération du main (2/2)
e-mandy Aug 3, 2025
e965801
Mise en place des tests unitaires (1/4)
e-mandy Aug 3, 2025
e119f5d
Revert "Mise en place des tests unitaires (1/4)"
e-mandy Aug 3, 2025
14e759d
Mise en place des tests unitaires (1/4)
e-mandy Aug 3, 2025
01800d8
Définition de la classe de gestion des rapports de ission et implémen…
seathiel-12 Aug 3, 2025
e3f5efa
Implémentation de la fonction de recherche d'anciens rapports
seathiel-12 Aug 4, 2025
e593c82
Merge branch 'main' into feature/rapport_mission
mouwaficbdr Aug 4, 2025
3d6332f
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
e-mandy Aug 4, 2025
52433f7
Mise en place des tests liés à l'analyzer aes cbc
e-mandy Aug 4, 2025
af85ee2
Corrections de typage et de logique
mouwaficbdr Aug 4, 2025
896696a
Correction du comportement à la levée de l'exception
mouwaficbdr Aug 4, 2025
3391403
Correction de la lgoque de test de test_exception_déchiffrer
mouwaficbdr Aug 4, 2025
9b38d27
Corection de la logique de test_verification_texte_dechiffre
mouwaficbdr Aug 4, 2025
275b47a
fix: Utilisation de pathlib pour une gestion portable des chemins.
mouwaficbdr Aug 4, 2025
d662e06
Merge branch 'main' into feature/testsUnitaires
mouwaficbdr Aug 4, 2025
ae4cfb0
merge réussi
seathiel-12 Aug 4, 2025
a2c05c5
Validation des tests et corrections du rapport mission
seathiel-12 Aug 4, 2025
7e52274
Validation des tests et corrections du rapport mission
seathiel-12 Aug 4, 2025
ec4191c
merged
seathiel-12 Aug 5, 2025
f67a4a5
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
seathiel-12 Aug 6, 2025
31569fb
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
seathiel-12 Aug 7, 2025
7c1e4b4
chekpoint: Blowfish _Analyzer.identifier_algo()
mouwaficbdr Aug 7, 2025
6bb7780
add: Intiialisation de Blowfish_Analyzer et implémentation de Blowfis…
mouwaficbdr Aug 7, 2025
2a6a8fd
Merge branch 'main' into add/Initialisation_Blowfish_Analyzer
mouwaficbdr Aug 7, 2025
defc99b
Merge branch 'main' of github.com:mouwaficbdr/CryptoForensic-Python i…
mouwaficbdr Aug 7, 2025
da7935e
Implémentation de Blowfish_Analyzer.filtrer_dictionnaire_par_indice()
mouwaficbdr Aug 7, 2025
5053932
Merge branch 'add/Initialisation_Blowfish_Analyzer' of github.com:mou…
mouwaficbdr Aug 7, 2025
746d059
Correction de bug
seathiel-12 Aug 7, 2025
d6b3859
merged
seathiel-12 Aug 7, 2025
4eba401
Implementer de Blowfish déchiffrer
seathiel-12 Aug 7, 2025
7368195
merge sur la branche courante
seathiel-12 Aug 7, 2025
778632b
Integration de blowfish dans le detecteur crypto
seathiel-12 Aug 7, 2025
e4e7a46
merged
seathiel-12 Aug 8, 2025
5ab3e40
merged
seathiel-12 Aug 9, 2025
b5f9fe1
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
seathiel-12 Aug 9, 2025
97432a6
Gestion des bugs de chemin et d'import
seathiel-12 Aug 10, 2025
eb8edb5
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
seathiel-12 Aug 10, 2025
da5c573
Update gitignore
mouwaficbdr Aug 10, 2025
e1773ef
add: Fichier run_tests.py qui run tous les tests et donne le feedback
mouwaficbdr Aug 10, 2025
f7e6858
fix: Standardisation uniforme de tous les imports pour uniformité
mouwaficbdr Aug 10, 2025
2513ebd
tests aes_gcm
seathiel-12 Aug 10, 2025
45b3656
pull et merge sur les tests
seathiel-12 Aug 10, 2025
fc1ed08
fix: Correction de la validation de la taille de clé dans Blowfish_An…
mouwaficbdr Aug 10, 2025
dffa15f
pull et merge du main
seathiel-12 Aug 10, 2025
e08d3ca
fix: Amélioration et uniformisation de la gestion des erreurs pour le…
mouwaficbdr Aug 10, 2025
46accc8
Merge branch 'main' into feature/testsUnitaires
mouwaficbdr Aug 10, 2025
e8503e4
Merge branch 'main' of github.com:mouwaficbdr/CryptoForensic-Python i…
mouwaficbdr Aug 10, 2025
517b96e
fix: Correction des erreurs de logique
mouwaficbdr Aug 10, 2025
3d748b9
merged
seathiel-12 Aug 10, 2025
8f20bfc
merged
seathiel-12 Aug 10, 2025
94ff070
test de l'analyzer Fernet
seathiel-12 Aug 10, 2025
148c920
Merge branch 'feature/testsUnitaires' of https://github.com/mouwaficb…
seathiel-12 Aug 10, 2025
ce9d50c
Correction de l'orchestrateur et ajustements correspondants
seathiel-12 Aug 11, 2025
c6ee4a3
pull et merge sur hotfix
seathiel-12 Aug 11, 2025
3f706c7
Lancement du système de stepping pour la progress bar
seathiel-12 Aug 11, 2025
3465442
fix: Corrections mineures
mouwaficbdr Aug 11, 2025
ef4e443
Merge branch 'hotfix/Problèmes_globaux' of github.com:mouwaficbdr/Cry…
mouwaficbdr Aug 11, 2025
829a9e6
Merge branch 'hotfix/Problèmes_globaux' of https://github.com/mouwafi…
seathiel-12 Aug 11, 2025
15234da
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
seathiel-12 Aug 11, 2025
7992886
Integration de la progress bar et correction correspondantes
seathiel-12 Aug 12, 2025
d9a0cf6
Merge branch 'main' of https://github.com/mouwaficbdr/CryptoForensic-…
seathiel-12 Aug 12, 2025
688003d
Merge et optimisation de l'integration de la progress bar
seathiel-12 Aug 12, 2025
8a4e204
fix des problemes
seathiel-12 Aug 12, 2025
69dcea7
merged
seathiel-12 Aug 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from src.detecteur_crypto import DetecteurCryptoOrchestrateur, ResultatAnalyse
from src.analyzers.blowfish_analyzer import Blowfish_Analyzer
from src.analyzers.aes_cbc_analyzer import Aes_Cbc_Analyzer
from src.analyzers.chacha20_analyzer import ChaCha20_Analyzer

from src.interface_console import consoleInterface
import os
from rich.progress import track
Expand All @@ -18,4 +20,10 @@

consoleInterface()
# print(DetecteurCryptoOrchestrateur().mission_complete_automatique('data/', 'keys/wordlist.txt'))

# try:
# resultat_dechiffrement: bytes = ChaCha20_Analyzer().dechiffrer("data/mission2.enc", os.urandom(32))
# print(f"Résultat du déchiffrement : {resultat_dechiffrement}")
# except ValueError as ve:
# print(ve)
# except FileNotFoundError:
# print("Erreur: Le fichier 'mission2.enc' est introuvable.")
2 changes: 1 addition & 1 deletion rapport_mission.txt

Large diffs are not rendered by default.

Binary file removed resultat.txt
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/test_dechiffrement_missions.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_dechiffrement_missions() -> None:
continue

try:
texte = res.decode('utf-8', errors='ignore')
texte = res.decode('utf-8')
except Exception:
texte = ''

Expand Down
830 changes: 423 additions & 407 deletions src/detecteur_crypto.py

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/interface_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,3 @@ def menu_6(self):

# consoleInterface()

if __name__ == "__main__":
# Lancer l'interface console directement: python -m src.interface_console
install()
consoleInterface()
15 changes: 7 additions & 8 deletions src/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import math, re, string, time
import math, re, string, time, os
from pathlib import Path
from typing import Any, Dict, List, TypedDict
from rich.console import Console
Expand Down Expand Up @@ -53,7 +53,6 @@ def verifier_texte_dechiffre(texte: str) -> Dict[str, Any]:
"""

#Statistiques sur le texte

stats: dict[str, Any] = {
'imprimable':0,
'nombre_mots':0,
Expand All @@ -70,16 +69,15 @@ def verifier_texte_dechiffre(texte: str) -> Dict[str, Any]:
stats['imprimable'] = int(sum(1 for char in texte if char.isprintable()) / len(texte) * 100)

# Traitement du texte brut pour obtenir une séquence distincte de pseudo-mot à cette étape séparé par des espaces
tab='./:!\\}{_%*$£&#;,~"()[]=§|`^@?'

tab='.\\/:!}{_%*$£&#;,~"()[]=§|`^@?'
copy=texte
for lettre in tab:
copy=copy.replace(lettre, ' ')

# Diviser par espaces et filtrer les mots vides
mots = [mot.strip() for mot in copy.split(' ') if mot.strip()]
stats['nombre_mots']=len(mots)

# Verifier que le chaque mot du texte est un mot anglais/francais

try:
Expand All @@ -88,11 +86,12 @@ def verifier_texte_dechiffre(texte: str) -> Dict[str, Any]:
trouve=False
if not mot: continue

first_char = mot[0].lower()

first_char = mot[0].lower()
for syl in ['Fr', 'En']:

chemin = Path(f"dico{syl}")/f"{first_char}.txt"
chemin = Path(f"dico{syl}")/f"{first_char}.txt"
if not os.path.isfile(chemin) : continue
try:
with open(chemin, 'r', encoding='latin-1') as f:
for ligne in f:
Expand Down