RAR Format Package

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

The support includes encrypted archives and the inspection of the format structures.

The package is also exposed to the SDK:

from Pro.Core import *
from Pkg.RAR import *

def parseRARArchive(fname):
    c = createContainerFromFile(fname)
    if c.isNull():
        return
    obj = RARObject()
    if not obj.Load(c) or not obj.ParseArchive():
        return
    n = obj.GetEntryCount()
    print(n)
    for i in range(n):
        entry = obj.GetEntry(i)
        if entry == None:
            break
        # skip directories
        if not obj.IsFile(entry):
            continue
        print("file name:", entry.filename)
        # retrieves the file data as NTContainer
        fc = obj.GetEntryData(entry)

Leave a Reply

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