mirror of
https://codeberg.org/Nixietab/EOSSDK-Holos.git
synced 2026-08-21 20:23:28 -04:00
Added keydumper and simple docs
This commit is contained in:
parent
441c2d0804
commit
2cf9a9756a
21 changed files with 4139 additions and 0 deletions
22
keyDumper/decriptSave.py
Normal file
22
keyDumper/decriptSave.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
from Crypto.Cipher import AES
|
||||
from Crypto.Util.Padding import unpad
|
||||
import sys
|
||||
|
||||
KEY = b"rK7CcATuZk7LAmhqqU4iBLNmAq8QbK3s"
|
||||
|
||||
for path in ["SteamData/SaveData.sav", "SteamData/SubSaveData001001.sav"]:
|
||||
with open(path, "rb") as f:
|
||||
raw = f.read()
|
||||
iv = raw[:16]
|
||||
ct = raw[16:]
|
||||
c = AES.new(KEY, AES.MODE_CBC, iv=iv)
|
||||
pt = unpad(c.decrypt(ct), AES.block_size)
|
||||
out = path.replace(".sav", "_decrypted.sav")
|
||||
with open(out, "wb") as f:
|
||||
f.write(pt)
|
||||
print(f"{path}: {len(raw)} enc -> {len(pt)} dec")
|
||||
print(f" First 64 bytes hex:")
|
||||
for i in range(0, min(64, len(pt)), 16):
|
||||
hexpart = " ".join(f"{b:02X}" for b in pt[i:i+16])
|
||||
asciipart = "".join(chr(b) if 32 <= b < 127 else "." for b in pt[i:i+16])
|
||||
print(f" {i:04x}: {hexpart:48s} {asciipart}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue