diff options
| author | jerome <jerome@xlinfo.fr> | 2025-10-12 17:41:22 +0200 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2025-10-12 17:41:22 +0200 |
| commit | ba41fa46e69dbb264dfbed1b9fca5daab44a07c7 (patch) | |
| tree | d9c6eeee3a32b0d5a004f2846882868c29ba531c /crack_md5.py | |
| parent | ec7b5913698416b775665a871a0d4102b47c680c (diff) | |
| download | python-ba41fa46e69dbb264dfbed1b9fca5daab44a07c7.tar.gz python-ba41fa46e69dbb264dfbed1b9fca5daab44a07c7.zip | |
organisation
Diffstat (limited to 'crack_md5.py')
| -rw-r--r-- | crack_md5.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/crack_md5.py b/crack_md5.py deleted file mode 100644 index 00bac2b..0000000 --- a/crack_md5.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -"""crack_md5 module""" -import sys -import hashlib - -def crack_md5(hash, wordlist): - """ - Args: - hash : le hash à trouver - wordlist: le dictionnaire - """ - with open(wordlist, "r") as fichier: - lignes = fichier.readlines() - for ligne in lignes: - if hashlib.md5(ligne.strip().encode()).hexdigest() == hash.strip(): - print(f"trouvé: {ligne.strip()}") - break - -if __name__ == "__main__": - try: - crack_md5(sys.argv[1], sys.argv[2]) - except IndexError: - print(f"{sys.argv[0]} demande des arguments. Voir l'aide.") - |
