Skip to content

Instantly share code, notes, and snippets.

@uyjulian
Created May 11, 2026 15:01
Show Gist options
  • Select an option

  • Save uyjulian/d32c4d8ddec0577b7a9f851b2e5b703b to your computer and use it in GitHub Desktop.

Select an option

Save uyjulian/d32c4d8ddec0577b7a9f851b2e5b703b to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
import sys
from Crypto.Cipher import AES
import os
# Referenced by ver_up_decrypt
xkey = b"" # Key here
xiv = b"" # IV here
for i in range(10):
xiv = AES.new(key=xkey, mode=AES.MODE_ECB).decrypt(xiv)
cipher = AES.new(key=xkey, mode=AES.MODE_OFB, iv=xiv)
with open(sys.argv[1], "rb") as f, open(sys.argv[2], "wb") as wf:
wf.write(cipher.encrypt(f.read()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment