Expected array with fields when invoking function #125
Unanswered
RhythmLunatic
asked this question in
Q&A
Replies: 2 comments
-
Hi @RhythmLunatic! The problem here is you are passing const fun = new NativeFunction(ptr, "pointer", ["pointer", ["int32"], "pointer"]); Solution: let import "frida-il2cpp-bridge";
Il2Cpp.perform(() => {
const img = Il2Cpp.Domain.assemblies['Assembly-CSharp'].image;
const AssetBundleManagerV2 = img.classes['MoleMole.AssetBundleManagerV2'];
const BundleType = img.classes["MoleMole.BundleType"];
const DATA_FILE = BundleType.fields.DATA_FILE.value;
Il2Cpp.GC.choose(AssetBundleManagerV2).forEach((instance: Il2Cpp.Object) => {
console.log(Object.keys(instance.methods))
console.log(instance.methods.GetFileNameByAssetName.parameters);
const value = Il2Cpp.String.from("Data/JsonData/TableToolsData");
const output = instance.methods.GetFileNameByAssetName.invoke<Il2Cpp.String>(DATA_FILE, value)
console.log(output);
});
});
This happens because for (const param of instance.methods.GetFileNameByAssetName.parameters) console.log(param); or try to print it as an array: console.log(Array.from(instance.methods.GetFileNameByAssetName.parameters)); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oops, I forgot parameters was iterable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to invoke this function
But when I call it I get an error. Also, according to .parameters the parameters are
[Object object]
.I'm not sure if it matters but it also passes itself when invoking the function?
Beta Was this translation helpful? Give feedback.
All reactions