From 6151483b10106d7ef0c1d56e8069ba1abf68c2d4 Mon Sep 17 00:00:00 2001 From: cc Date: Thu, 16 May 2024 23:00:51 +0200 Subject: [PATCH] skip item when it's not encrypted --- index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 0209e83..f7a7f72 100644 --- a/index.js +++ b/index.js @@ -216,18 +216,19 @@ export class BagBak extends EventEmitter { const { identifier } = this.#app; const pid = await this.#device.spawn(identifier); const info = map.get(identifier); - if (!info) throw new Error('Unable to find main executable'); - const { dylibs, executable } = info; - await this.#device.resume(pid); - await task(pid, executable, dylibs); + if (info) { + const { dylibs, executable } = info; + await this.#device.resume(pid); + await task(pid, executable, dylibs); + } } // dump plugins for (const pluginId of plugins) { - const pid = await SpringBoardScript.exports.run(pluginId); const info = map.get(pluginId); - if (!info) throw new Error(`Unable to find plugin info for ${pluginId}`); + if (!info) continue; + const pid = await SpringBoardScript.exports.run(pluginId); const { dylibs, executable } = info; await task(pid, executable, dylibs); }