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
946 stars 194 forks source link

how to cast argument to a concrete type ,and use it to invoke methods #378

Closed andrewpedia closed 11 months ago

andrewpedia commented 11 months ago

I have to invoke a instance method from an interceptor . is the args[0] == this?

vfsfitvnm commented 11 months ago

If the intercepted method is non-static, then yes https://github.com/vfsfitvnm/frida-il2cpp-bridge/blob/2b19c2c731fe0b4cd99ea3816b4931f6203dbe0a/src/il2cpp/structs/method.ts#L329

andrewpedia commented 11 months ago

okay,thanks for quick reply. Now ,how can I use args[0] to invoke a method ,which name is "get_t"? thanks.

vfsfitvnm commented 11 months ago

Please read the wiki or look for other issues/questions, there are plenty of code snippets