bruvzg / gdsdecomp

Godot reverse engineering tools
MIT License
1.34k stars 134 forks source link

Fail to open pck with correct encryption key #143

Open Snoogey opened 10 months ago

Snoogey commented 10 months ago

System information

Windows 10, Godot 4.1

Issue description

Unable to open Godot 4.1 pck file with correct encryption key. Encrypted key fetched directly from project exe that's loading said pck.

I can share the pck + encryption key if that helps.

Steps to reproduce

No response

Recovery log

-2023-09-02-20-24-55 [Read PCK]: Error opening PCK file: C:/encrypted.pck Opening file: C:/encrypted.pck USER ERROR: FATAL ERROR: Failed to load project pack! at: GDRESettings::load_pack (modules\gdsdecomp\utility\gdre_settings.cpp:380) USER ERROR: Transient parent has another exclusive child. at: Window::set_visible (scene\main\window.cpp:747)

Minimal reproduction project

No response

nikitalita commented 10 months ago

I can share the pck + encryption key if that helps.

Yeah, I’m going to need to test this myself. You can share it either here or shoot me a discord DM. I’m “nikita_lita” in the official Godot discord: https://discord.gg/4JBkykG

nikitalita commented 10 months ago

It turns out this was a chain-loaded pck that used the config file encryption scheme. We don't currently support this. I am reticent to add a feature to decrypt files like this because it could be used to decrypt save files; encrypted save files are usually used for Steam achievements, which would mean messing with them would mess with external systems. I do not want to encourage that; it would create potential headaches for devs and would be an escalation in the obfuscation arms race.

KoxaKoxama commented 8 months ago

@nikitalita Can you please share some info how is this config file encryption scheme is working? Not related to this specific pck, I would like to try this chain-loaded pck method of encryption for myself. Thanks!