juju.re/jujure/static/EXTerminated/decrypt.py
Julien CLEMENT 55075855bb add exterminated writeup and fix diplodocus typos
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
2022-05-10 18:26:48 +02:00

20 lines
341 B
Python
Executable File

#!/usr/bin/env python3
import sys
import os
with open('./disk.img', 'rb') as f:
data = f.read()
blocks = [data[i * 0x1000:(i * 0x1000) + 0x1000] for i in range(len(data) // 0x1000)]
clear = bytearray()
for block in blocks:
x = 0
for b in block:
c = x ^ b
clear.append(c)
x = c
os.write(1, clear)