Skip to content

How to obtaining an active instance of a class at the runtime? #41

Description

@mehgancangweh
while(true)
{
	// I 100% confirmed the game called this class public Void .ctor() method.
	// so that mean there is an instance exists somewhere in the game memory.
	// The reason i can't hook them because:
	//		Too late. the game called .ctor before Resolver even done.
	//		I need the instance to iterate at the runtime in my case.

	UnityResolve::Class* CProtocol_CSMsgPara = pAssembly->Get("CSMsgPara", "Protocol");

	const auto Vector1 = CProtocol_CSMsgPara->FindObjectsByType<UnityResolve::UnityType::Object*>();
	LOG(DEBUG) << Vector1.size(); // always zero didn't exists for the whole playing time

	const auto Vector2 = CProtocol_CSMsgPara->FindObjectsByType<UnityResolve::UnityType::Array<Object*>*>();
	LOG(DEBUG) << Vector2.size(); // always zero didn't exists for the whole playing time

	THIS_SLEEP(3s);
}

i searched the internet and tried this frida js version: vfsfitvnm/frida-il2cpp-bridge#341
and its working fine. the project is for android.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions