frida / frida-compile

Compile a Frida script comprised of one or more Node.js modules
Other
188 stars 48 forks source link

Bundle dependencies source maps #76

Closed vfsfitvnm closed 1 year ago

vfsfitvnm commented 1 year ago

Alright, it was a matter of an optional chaining - not sure how I missed that.

I didn't add a workaround in case base64decode is undefined because it should always be defined on node.

I confirm I can successfully compile and build using:

git clone https://github.com/vfsfitvnm/frida-compile.git
cd frida-compile
git submodule init
git submodule update
sed -i -e 's/import pkg from ".\/package.json" assert {type: "json"}\;/import {readFileSync} from "fs"\;\nconst pkg = JSON.parse(readFileSync(".\/package.json", {encoding: "utf8"}))\;/g' ext/cjstoesm/rollup.config.mjs
make

mkdir ../frida-il2cpp-bridge-example && cd "$_"
npm init --yes
echo 'import "frida-il2cpp-bridge";' > index.js
npm i -D ../frida-compile @types/frida-gum frida-il2cpp-bridge
npm exec frida-compile -- -o out.js index.js
oleavr commented 1 year ago

Thanks! :raised_hands: