def __init__(self, path): self.path = path info_path = join(self.path, 'Info.plist') if not exists(info_path): raise NotMatched("no Info.plist found; probably not a bundle") self.info = biplist.readPlist(info_path) if not is_info_plist_native(self.info): raise NotMatched("not a native iOS bundle") # will be added later self.seal_path = None
def __init__(self, path): self.path = path if not self.is_helpers_present(): raise NotSignable("helpers not present") relative_app_dir, is_native = self.precheck() self.relative_app_dir = relative_app_dir if relative_app_dir is None: raise NotMatched("no app directory found") if not is_native: raise NotMatched("not a native iOS app")
def __init__(self, path, native_platforms): self.path = path self.info_path = join(self.path, 'Info.plist') self.native_platforms = native_platforms # TODO extract this from CFBundleSupportedPlatforms? if not exists(self.info_path): raise NotMatched("no Info.plist found; probably not a bundle") self.info = biplist.readPlist(self.info_path) self.orig_info = None if not self._is_native(self.info): raise NotMatched("not a native bundle") # will be added later self.seal_path = None
def __init__(self, path): self.path = path self.info_path = join(self.path, 'Info.plist') if not exists(self.info_path): raise NotMatched("no Info.plist found; probably not a bundle") self.info = biplist.readPlist(self.info_path) self.orig_info = None if not is_info_plist_native(self.info): # while we should probably not allow this *or* add it ourselves, it appears to work without it log.debug( u"Missing/invalid CFBundleSupportedPlatforms value in {}". format(self.info_path)) # will be added later self.seal_path = None
def view(input_path): if not exists(input_path): raise IOError("{0} not found".format(input_path)) ua = None bundle_info = None try: archive = archive_factory(input_path) if archive is None: raise NotMatched('No matching archive type found') ua = archive.unarchive_to_temp() bundle_info = ua.bundle.info finally: if ua is not None: ua.remove() return bundle_info