trumank / repak

Unreal Engine .pak file library and CLI in rust
Apache License 2.0
174 stars 25 forks source link

ghostrunner 2 demo fails to parse #11

Closed bananaturtlesandwich closed 11 months ago

bananaturtlesandwich commented 11 months ago

when trying to run any command on the ghostrunner 2 demo pak this comes up

C:\Program Files (x86)\Steam\steamapps\common\Ghostrunner 2 Demo\Ghostrunner2\Content\Paks>repak info Ghostrunner2-WindowsNoEditor.pak
Error:
trying version V11 failed: pak is encrypted but no key was provided
trying version V10 failed: used version PathHashIndex but pak is version Fnv64BugFix
trying version V9 failed: got 90, which is not a boolean
trying version V8B failed: used version FNameBasedCompression but pak is version Fnv64BugFix
trying version V8A failed: got 188, which is not a boolean
trying version V7 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V6 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V5 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V4 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V3 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V2 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V1 failed: found magic of 0x0 instead of 0x5a6f12e1
trying version V0 failed: found magic of 0x0 instead of 0x5a6f12e1
version unsupported or is encrypted (possibly missing --aes-key?)

the game is 4.27 so should be V11

trumank commented 11 months ago

The pak is encrypted and you aren't providing a key (0x9ede04b9af8921db5000d0c885d5580b1f02cfe8ec425146510c59ad576d539a)

bananaturtlesandwich commented 11 months ago

am i supplying a key wrong then?

C:\Program Files (x86)\Steam\steamapps\common\Ghostrunner 2 Demo\Ghostrunner2\Content\Paks>repak unpack Ghostrunner2-WindowsNoEditor.pak -a 0x9ede04b9af8921db5000d0c885d5580b1f02cfe8ec425146510c59ad576d539a
error: unexpected argument '-a' found

  tip: to pass '-a' as a value, use '-- -a'

Usage: repak unpack [OPTIONS] <INPUT> [OUTPUT]

For more information, try '--help'.
bananaturtlesandwich commented 11 months ago

repak info doesn't need a key so this is a parsing error

trumank commented 11 months ago

repak info lists the mount point from the index which is encrypted.

The --aes-key flag is a top level flag (perhaps a poor choice since I manage to forget it all the time myself) and is used like so: repak --aes-key 0x9ede04b9af8921db5000d0c885d5580b1f02cfe8ec425146510c59ad576d539a unpack Ghostrunner2-WindowsNoEditor.pak

bananaturtlesandwich commented 11 months ago

ah alright then time to think about how stove can't use aes keys properly then

bananaturtlesandwich commented 11 months ago

nevermind it's working fine now somehow