vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.

Home Page:https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

il2cpp_get_corlib

Ezriral opened this issue · comments

When I try to invoke a method :

const CSharp = Il2Cpp.Domain.assembly("Assembly-CSharp").image;
const moneyDroper=CSharp.class("moneyDropper")
const dropMoney=moneyDroper.method("dropMoney").invoke()

I get an error :
cannot invoke a non-static method dropMoney: must be invoked throught a Il2Cpp.Object, not a Il2Cpp.Class

and when i try to initate an object instead using :
const object =moneyDroper.new().dropMoney()

i get another error saying :
TypeError: not a function

And when i try to invoke the method using :
className.method("dropMoney").invoke();

Failed to load script: script(line 14): SyntaxError: unexpected token in expression: '>'

The class I am trying to hook is that :
class moneyDropper : UnityEngine.MonoBehaviour
{
UnityEngine.GameObject[] dropPosition; // 0x18
UnityEngine.GameObject smallMoneyPrefab; // 0x20
System.Boolean canDrop; // 0x28
System.Void dropMoney(); // 0x009e9c44
System.Void stopDrop(); // 0x009e9cc4
System.Void invokedDrop(); // 0x009e9c48
System.Void throwMoney(); // 0x009e9ccc
System.Void .ctor(); // 0x009e9fcc
}

I am currently trying to attach to the address directly ,but the function might not be called .

nvm solved.

I am also researching libnesec.so, how did you bypass the frida injection detection?