XAR Format Package

We have released the XAR Format package for all licenses of Cerbero Suite.

XAR (eXtensible ARchive format) is an archive file format which is used for software installation routines in macOS as well as browser extensions in Safari.

The support includes inspecting the format’s structures.

The package is also exposed to the SDK:

from Pro.Core import *
from Pkg.XAR import *

def parseXARArchive(fname):
    c = createContainerFromFile(fname)
    if c.isNull():
        return
    obj = XARObject()
    if not obj.Load(c) or not obj.ParseArchive():
        return
    entry = None
    while entry := obj.NextEntry(entry):
        # skip directories
        if obj.IsDirectory(entry):
            continue
        print("file name:", entry.path)
        # retrieves the file data as NTContainer
        fc = obj.GetEntryData(entry)

Leave a Reply

Your email address will not be published. Required fields are marked *