Files

33 lines
1.1 KiB
Python
Raw Permalink Normal View History

2026-07-09 02:59:53 +03:00
import os
import zipfile
BASE_KRA = "/mnt/extra/00_PROJECTS/hcie-rust-v4/_images/kra_style_test/sultan.kra"
def main():
if not os.path.exists(BASE_KRA):
print(f"Error: {BASE_KRA} not found.")
return
with zipfile.ZipFile(BASE_KRA, 'r') as base_zip:
asl_data = base_zip.read("Unnamed/annotations/layerstyles.asl")
print(f"ASL Data Size: {len(asl_data)} bytes")
# Search for common key signatures in the ASL descriptor format
# Keys are usually 4-byte identifiers
keys = [
b"DrSh", b"IrSh", b"OrGl", b"IrGl", b"ebbl", b"FrFX", b"SoFi", b"GrFl", b"PtFl", b"Scl ", b"lagl", b"Dstn", b"blur", b"Ckmt", b"Opct", b"Md ", b"Clr ", b"Sz "
]
for key in keys:
pos = 0
found = []
while True:
idx = asl_data.find(key, pos)
if idx == -1:
break
found.append(idx)
pos = idx + len(key)
print(f"Key {key.decode('ascii', errors='replace')} found at offsets: {found}")
if __name__ == "__main__":
main()