diff --git a/src/ccsaveparser.py b/src/ccsaveparser.py index 1c17232..ede4f2f 100644 --- a/src/ccsaveparser.py +++ b/src/ccsaveparser.py @@ -8,9 +8,10 @@ import struct class OFFSETS: VERSION = 0x42e - KEYS_LABEL = 0x12DB - KEYS_VALUE = 0x12F9 - ACCOUNT_LEVEL = 0x12AD + KEYS_LABEL = 0x12DB # These are not static + KEYS_VALUE = 0x12F9 # These are not static + ACCOUNT_LEVEL = 0x12AD # These are not static + START_OF_OPTIONS = 0x42a # This appears to be static across multiple saves def _bytes_to_string(bytes): @@ -36,8 +37,10 @@ def get_key_value(save): def verify_save(save): try: - struct.pack("bbbb", *save[:4]) == b"GVAS" - token = _bytes_to_string(read_token_at_offset(save, OFFSETS.VERSION)) + struct.unpack("