feat: Semaine 10

This commit is contained in:
gauvainboiche
2026-06-12 20:25:28 +02:00
parent ce1f0e513a
commit d3d2416dea
91 changed files with 4317 additions and 0 deletions
@@ -0,0 +1,28 @@
import sys
def solve():
binary_path = './crackme_esdi'
# L'adresse virtuelle 0x402090 dans un binaire sans PIE (base 0x400000)
# correspond à l'offset fichier 0x2090
file_offset = 0x2090
password_length = 14
xor_key = 0x42
try:
with open(binary_path, 'rb') as f:
f.seek(file_offset)
encrypted_bytes = f.read(password_length)
# Application du XOR inverse pour casser le chiffrement
password = "".join(chr(b ^ xor_key) for b in encrypted_bytes)
print(f"[+] Crackme résolu : valeur = {password}")
except FileNotFoundError:
print(f"[-] Erreur : Le fichier {binary_path} est introuvable.")
except Exception as e:
print(f"[-] Une erreur est survenue : {e}")
if __name__ == '__main__':
solve()