RusJJ / ARMPatch

Just a hook for ARM applications based on @4x11's ARMhook (i think he made it?), on Cydia's Substrate and on Rprop's And64InlineHook
MIT License
33 stars 11 forks source link

new inline hook #2

Closed XMDS closed 1 year ago

XMDS commented 1 year ago

@RusJJ I'm writing a new iniline hook. I have finished testing in thumb mode, and I still need to write a64 and arm modes, so please give me some time. I will submit it later. Not only that, it can hook anywhere in the function, not just the function header. It can even hook 4-byte short functions and read and write register stacks. As far as I am concerned, I do not recommend using the inline hook with ByteDance. It is too large, and it does not use the "chain structure" to process multiple hooks. In addition, when calling the original function, the ByteDance hook must use the macro definition to call the original function to prevent "ring call"

XMDS commented 1 year ago

We need a lightweight hook that is only used for game projects, not a huge hook project. The ByteDance hook is only applicable to app development, and it would be better to compile it into a dynamic library.

RusJJ commented 1 year ago

Don't worry, i will not use it... I didnt like it. And yes, it is very big and has a lot of useless code. I was planning to create my own hooking tool but i just can't so a lot of things at the place where i am...

XMDS commented 1 year ago

@RusJJ
So if you don't have time, I can finish it. I have almost completed the necessary functions. But I still need a little time to update the arm64 mode. I will upload it to github after our Chinese New Year. The inline hook has more lightweight and easy-to-use code. In addition, it supports multiple hooks and unhooks at the same location. It can even restore canceled hooks and cancel other people's hooks

XMDS commented 1 year ago

in any case. I can help you accomplish many things.

Jerry12798 commented 1 year ago

Does this allow us hook a libUE4.so function with C++?

YuKnight commented 1 year ago

Is there exists source code of the .a files