Closed zbx911 closed 2 years ago
for (const field of instance.class.fields) {
if (field.isStatic) continue;
console.log(`${field} ${instance.field(field.name).value}`);
}
this Dictionary one: System.Collections.Generic.Dictionary<System.String,Trace.ITraceSpan> _requestSpans; // 0x18
for (const field of instance.class.fields) { if (field.isStatic) continue; console.log(`${field} ${instance.field(field.name).value}`); }
const instance=c.methods["get_Instance"].invoke();
// @ts-ignore
for (const field of instance.class.fields) {
if (field.isStatic) continue;
// @ts-ignore
console.log(${field} ${instance.fields[field.name].value}
);
}
@zbx911 I may need something like yours (but I don't really understand), do you comes up with a solution?
@WimpyMistake Did the snippet I posted work for you?
@WimpyMistake Did the snippet I posted work for you?
In a sense it does work. It works well with simple values like string, number and booelan. But with Il2Cpp.Object
, it just shows FQCN as such Game.Namespace.Players.PlayerData
. Similarly with List and Dictionary. I was looking for something that can print out an Il2Cpp.Object
's value without having to loop the object again.
@WimpyMistake Objects are printed via their ToString
C# method: if it doesn't fit you use case, you'd better create a custom function with the desired behavior, e.g. that prints the items in a List. A universal method that correctly prints any object doesn't exist, so I cannot provide a function of this genre in frida-il2cpp-bridge
.
@vfsfitvnm yeah sure. That's what I'm doing now. Thank you for your reply
// Runtime.dll class Network.HttpTracer : System.Object { static Network.HttpTracer Instance; // 0x0 System.Object _lock; // 0x10 System.Collections.Generic.Dictionary<System.String,Trace.ITraceSpan> _requestSpans; // 0x18
}
print ["_requestSpans"] all key and value?