@@ -75,13 +75,15 @@ def __init__(self, reader: EndianBinaryReader):
75
75
76
76
if DECRYPT_KEY is None :
77
77
raise LookupError (
78
- "\n " .join ([
79
- "The BundleFile is encrypted, but no key was provided!" ,
80
- "You can set the key via UnityPy.set_assetbundle_decrypt_key(key)." ,
81
- "To try brute-forcing the key, use UnityPy.helpers.ArchiveStorageManager.brute_force_key(fp, key_sig, data_sig)" ,
82
- f"with key_sig = { self .key_sig } , data_sig = { self .data_sig } ,"
83
- "and fp being the path to global-metadata.dat or a memory dump." ,
84
- ])
78
+ "\n " .join (
79
+ [
80
+ "The BundleFile is encrypted, but no key was provided!" ,
81
+ "You can set the key via UnityPy.set_assetbundle_decrypt_key(key)." ,
82
+ "To try brute-forcing the key, use UnityPy.helpers.ArchiveStorageManager.brute_force_key(fp, key_sig, data_sig)" ,
83
+ f"with key_sig = { self .key_sig } , data_sig = { self .data_sig } ,"
84
+ "and fp being the path to global-metadata.dat or a memory dump." ,
85
+ ]
86
+ )
85
87
)
86
88
87
89
signature = decrypt_key (self .key_sig , self .data_sig , DECRYPT_KEY )
@@ -146,3 +148,6 @@ def decrypt(self, data: Union[bytearray, memoryview], index: int, remaining: int
146
148
b , offset , index = self .decrypt_byte (data , offset , index )
147
149
148
150
return offset
151
+
152
+ # def encrypt(self, data: bytes):
153
+ # # TODO: patch BundleFile encryption flag to keep either 0x1000 or 0x400
0 commit comments