applying posterboard tweaks from zip

This commit is contained in:
leminlimez
2025-03-13 11:44:25 -04:00
parent 6ccac7bd09
commit 9bc7647a8e
8 changed files with 6651 additions and 140 deletions

View File

@@ -113,6 +113,7 @@ class SymbolicLink(BackupFile):
class AppBundle:
identifier: str
path: str
container_content_class: str
version: str = 804
@dataclass
@@ -197,6 +198,7 @@ class Backup:
appInfo = {
"CFBundleIdentifier": app.identifier,
"CFBundleVersion": app.version,
"ContainerContentClass": app.container_content_class,
"Path": app.path
}
plist["Applications"][app.identifier] = appInfo

View File

@@ -11,10 +11,11 @@ class FileToRestore:
self.group = group
class AppBundleToRestore(FileToRestore):
def __init__(self, contents: str, bundle_id: str, bundle_version: str, bundle_path: str):
super().__init__(contents=contents, restore_path=bundle_path, domain=f"AppDomain-{bundle_id}")
def __init__(self, bundle_id: str, bundle_version: str, bundle_path: str, container_content_class: str):
super().__init__(contents=None, restore_path=bundle_path, domain=f"AppDomain-{bundle_id}")
self.bundle_id = bundle_id
self.bundle_version = bundle_version
self.container_content_class = container_content_class
def concat_exploit_file(file: FileToRestore, files_list: list[FileToRestore], last_domain: str) -> str:
base_path = "/var/backup"
@@ -101,6 +102,7 @@ def restore_files(files: list, reboot: bool = False, lockdown_client: LockdownCl
apps_list.append(backup.AppBundle(
identifier=file.bundle_id,
path=file.restore_path,
container_content_class=file.container_content_class,
version=file.bundle_version
))
elif file.domain == None: