vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
1.03k stars 202 forks source link

How to run the index.ts file ? #197

Closed Abdelrahmanamhawy closed 2 years ago

Abdelrahmanamhawy commented 2 years ago

Hi,

Everything runs fine,but since the index.ts is where i write my customized code . The .js file is installed and i am able to spawn the app using "npm run spawn PackageName" but i can't run the index.ts . I searched online for running typescript file using tsc command but it gives me a lot of errors . What am I missing ? When i run the .js file ,the index.ts code doesn't run at all !? Shouldn't it run when the .js file runs ? i followed this answer here :https://stackoverflow.com/questions/69980349/problem-with-installing-frida-module-frida-il2cpp-bridge-and-make-it-running

vfsfitvnm commented 2 years ago

Please read the wiki. Also, there are many resources that explain how to setup a frida agent project on the web (helpful keword: frida-compile).

Typescript needs to be transpiled to JS first.

Abdelrahmanamhawy commented 2 years ago

I did read it first ,and read this too https://velog.io/@koo00/2 Does TS transpiled to js automatically or there is something i should do ? I followed the guide and downloaded and uninstalled multiple times . But like i said only the _.js work ,it's like it's not connected to index.ts . And when i run npm run watch ,it runs but when i edit the index.ts script it stops . Can you just point me where to start or what is the problem exactly ?

ChuJiani commented 2 years ago

Only js file is needed in hooking, and ts file is used for convenience, you can ignore it when hooking. About "watch", it is a realtime script to transcript ts to js, it makes you able to get js just when you save the ts. After all, you just need to foucus on coding with ts and turn it to js, and then use the js in your hooking.

vfsfitvnm commented 2 years ago

The wiki and the guide you linked both explain how to transpile TS to JS. You have to run two commands: npm run build (to transpile index.ts to _.js) and then npm run spawn whatever.

vfsfitvnm commented 2 years ago

Yes, typescript is not needed at all, but HIGHLY recommended if you have an IDE - but you would need frida-compile, so...