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
974 stars 199 forks source link

cannot exclude class in tracing #295

Closed commonuserlol closed 1 year ago

commonuserlol commented 1 year ago

hello, I'm trying to exclude the SoftMasking class, but it still keeps appearing in the console

il2cpp: 0x0305c2c0 ┌─SoftMasking.MaterialReplacer.<>c.<CollectGlobalReplacers>b__3_1
il2cpp: 0x0305c2c0 └─SoftMasking.MaterialReplacer.<>c.<CollectGlobalReplacers>b__3_1

here is my code:

import "frida-il2cpp-bridge";
Il2Cpp.perform(() => {
    const AssemblyCSharp = Il2Cpp.domain.assembly("Assembly-CSharp").image;
    Il2Cpp.trace().parameters(false).assemblies(AssemblyCSharp.assembly).filterClasses(c => !(c.namespace.includes("Axlebolt.Standoff.UI") || c.namespace.includes("SoftMasking"))).and().attach();
});
vfsfitvnm commented 1 year ago

That's a nested class - it has an empty namespace. You can roll your own logic using the Il2Cpp.Class::parent, or use the full type name instead (c.type.name)