Skip to content

Commit

Permalink
still #118
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiChou committed Jun 25, 2023
1 parent 92e0efe commit 037ce5c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
16 changes: 12 additions & 4 deletions lib/scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,18 @@ import { debug } from './utils.js';
*/
const fix = (() => {
if (path.sep !== '/') {
const r = new RegExp(path.sep, 'g');
return (p) => p.replace(r, '/');

/**
* @param {string} p
* @returns {string}
*/
return (p) => p.replaceAll(path.sep, '/');
}

/**
* @param {string} p
* @returns {string}
*/
return (p) => p;
})();

Expand Down Expand Up @@ -118,7 +126,7 @@ export class AppBundleVisitor {
for await (const [scope, file, info] of this.visitRoot()) {
const adjustedFile = path.relative(this.#root, file);
const bucket = buckets.get(scope) ?? [];
bucket.push([adjustedFile, info]);
bucket.push([fix(adjustedFile), info]);
buckets.set(scope, bucket);
}

Expand All @@ -132,7 +140,7 @@ export class AppBundleVisitor {
const infoPlist = path.join(scope, 'Info.plist');
const plist = parsePlist(await readFile(infoPlist));
const mainExecutable = fix(path.join(adjustedScope, plist['CFBundleExecutable']));
result.set(fix(mainExecutable), fix(encryptedFiles));
result.set(mainExecutable, encryptedFiles);
}

return result;
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bagbak",
"version": "3.0.18",
"version": "3.0.19",
"description": "Dump iOS app from a jailbroken device, based on frida.re",
"main": "index.js",
"scripts": {
Expand All @@ -19,6 +19,9 @@
"/bin",
"/lib/"
],
"engines": {
"node": ">=16.0.0"
},
"type": "module",
"devDependencies": {
"@types/frida-gum": "^18.3.1",
Expand Down

0 comments on commit 037ce5c

Please sign in to comment.