When PyPack extracts files from a .pak, it needs to add the Python version magic to each file. It has an enum of supported Python versions:
|
enum PycHeader |
|
{ |
|
kPyc22 = 0x0A0DED2D, |
|
kPyc23 = 0x0A0DF23B, |
|
}; |
It makes the decision about whether to use the 2.2 version number or the 2.3 version number based on the encryption type used by the .pak file:
|
S.writeInt((eType == plEncryptedStream::kEncXtea || eType == plEncryptedStream::kEncNone) |
|
? kPyc22 : kPyc23); |
This will fail to use the right Python magic code for H'uru MOULa clients that use Python 3.10 or 3.12 (and historically 2.7).
Since there's nothing in the pak file to indicate the Python version, maybe the best choice is to add an option to specify a Python version and fall back to the existing logic if the option is unspecified?
When PyPack extracts files from a .pak, it needs to add the Python version magic to each file. It has an enum of supported Python versions:
libhsplasma/Tools/src/PyPack.cpp
Lines 44 to 48 in 0cb4c8a
It makes the decision about whether to use the 2.2 version number or the 2.3 version number based on the encryption type used by the .pak file:
libhsplasma/Tools/src/PyPack.cpp
Lines 328 to 329 in 0cb4c8a
This will fail to use the right Python magic code for H'uru MOULa clients that use Python 3.10 or 3.12 (and historically 2.7).
Since there's nothing in the pak file to indicate the Python version, maybe the best choice is to add an option to specify a Python version and fall back to the existing logic if the option is unspecified?