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
1k stars 200 forks source link

Find the overload method in the parent class #438

Closed thinhbuzz closed 10 months ago

thinhbuzz commented 10 months ago

for example:

const UTF8Encoding = Il2Cpp.corlib.class('System.Text.Encoding')
  .method<Il2Cpp.Object>('get_UTF8').invoke();
const data = Il2Cpp.string('Hello world');
console.log(
  UTF8Encoding.method<Il2Cpp.Array<number>>('GetBytes')
    .overload('System.String').invoke(data),
);
// before commit: couldn't find overloaded method GetBytes(System.String)
// after commit: [72,101,108,108,111,32,119,111,114,108,100]
vfsfitvnm commented 10 months ago

Thanks!