Crypt my loop
Challenge
Solution
from Crypto.Hash import MD5
from string import printable
# Récupération des hash dans le fichier
data = open('./flag_maraboute.txt').read().split('\n')
# Création du dictionnaire de hash
hashes = {MD5.new(c.encode()).hexdigest(): c for c in printable}
# Remplacement des hash par la lettre correspondante
flag = ''.join([hashes[line] for line in data])
print(flag)Mis à jour