Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LHHookFunction NotWorking #2

Open
Quangcha opened this issue Nov 28, 2024 · 4 comments
Open

LHHookFunction NotWorking #2

Quangcha opened this issue Nov 28, 2024 · 4 comments

Comments

@Quangcha
Copy link

Quangcha commented Nov 28, 2024

bool (* IsHaveHeroSkin)(void *instance,int heroID,int skinID);
bool _IsHaveHeroSkin(void *instance,int heroID,int skinID){
return true;
}
IsHaveHeroSkin = (bool( *)(void *,int,int))getRealOffset(ModSkin[0]);
LHHookRef outIsHaveHeroSkin;
[TitanoxHook LHHookFunction:(void *)IsHaveHeroSkin hookFunction:(void *)_IsHaveHeroSkin inLibrary:"UnityFramework" outHookRef:&outIsHaveHeroSkin];
if(outIsHaveHeroSkin.trampoline)
{
saveToFile("Hooked IsHaveHeroSkin");
}
else
{
saveToFile("Failed to hook IsHaveHeroSkin");
}
and Log:
image
but In game, IT isn't working

@Quangcha
Copy link
Author

image
i checked NSLogs. and IT had been Hooked. but in game not working

@Ragekill3377
Copy link
Owner

Hello.
I have also tested it and indeed, it did hook, but didn't 'take effect'.
The write component had probably not succeeded.
This time I've added MemoryEngine R/W + debug logs, and you can modify the code to log out to a file if needed.

Please attach any other bugs.
Also, please test out breakpoint hook aswell. First on a jailbroken/roothide device, or a device with JIT or a Debugger enabled, or with special entitelments. I am not 100% sure that it will succeed on stock IOS.

But the LHHookFunction should succeed.
So, Please test and let me know.
Thank you.

@Quangcha
Copy link
Author

[TitanoxHook addBreakpointAtAddress:(void* )getRealOffset(ModSkin[0]) replacement:(void* )_IsHaveHeroSkin outOriginal:(void**)&IsHaveHeroSkin];
i tried with Breakpoint hook. and It's not working too
image

@Ragekill3377
Copy link
Owner

Hello.
Framework has been updated and also uses JRMemory framework. Try it out :)
You don't even have to use all of titanox, just that component.
Let me know the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants