We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.0.9
13
arm64-v8a
真我GT5
不知道为啥,hook一款游戏(com.olzhas.carparking.multyplayer2 版本名0.3.6.06283941),有时候能进hook函数,有时候没进来, 先使用线程等待libil2cpp.so加载进来后hook getModuleBase + 偏移量
static void* getModuleBase(char* module_name, char* moduleFullPath) { char filename[256]; snprintf(filename, sizeof(filename), "/proc/self/maps"); FILE fp = fopen(filename, "r"); void addr=0; if (fp != NULL) { char line[1024]; while (fgets(line, sizeof(line), fp)) { if(strstr(line, module_name) && (strstr(line, "r--p")|| strstr(line, "r-xp"))) { LOGE("getModuleBase:line=%s", line); sscanf(line, "%[^/]%[^\n]", moduleFullPath); char pch = strtok(line, "-"); addr = (void)strtoul(pch, NULL, 16); if (addr == 0x8000){addr = 0;} LOGE("getModuleBase:找到%s(%s),base_addr=%p", module_name, moduleFullPath, addr); break; } } fclose(fp); } return (void)addr; }
但我使用AndHook每次都可以进hook函数,唯一区别就是基址用AKGetBaseAddress获得后 + 偏移量,不知道是shadowhook问题还是基址获得有问题,能否提供点帮助,非常感谢
The text was updated successfully, but these errors were encountered:
兄弟,shadowHook提供了一个 shadowhook_dlopen,这个可以直接得到基址的吧?
Sorry, something went wrong.
你可以贴一下你的shadowhook初始化代码、hook代码、proxy函数。这样才能解决问题。
No branches or pull requests
ShadowHook Version
1.0.9
Android OS Version
13
Android ABIs
arm64-v8a
Device Manufacturers and Models
真我GT5
Describe the Bug
不知道为啥,hook一款游戏(com.olzhas.carparking.multyplayer2 版本名0.3.6.06283941),有时候能进hook函数,有时候没进来,
先使用线程等待libil2cpp.so加载进来后hook getModuleBase + 偏移量
static void* getModuleBase(char* module_name, char* moduleFullPath)
{
char filename[256];
snprintf(filename, sizeof(filename), "/proc/self/maps");
FILE fp = fopen(filename, "r");
void addr=0;
if (fp != NULL)
{
char line[1024];
while (fgets(line, sizeof(line), fp))
{
if(strstr(line, module_name) && (strstr(line, "r--p")|| strstr(line, "r-xp")))
{
LOGE("getModuleBase:line=%s", line);
sscanf(line, "%[^/]%[^\n]", moduleFullPath);
char pch = strtok(line, "-");
addr = (void)strtoul(pch, NULL, 16);
if (addr == 0x8000){addr = 0;}
LOGE("getModuleBase:找到%s(%s),base_addr=%p", module_name, moduleFullPath, addr);
break;
}
}
fclose(fp);
}
return (void)addr;
}
但我使用AndHook每次都可以进hook函数,唯一区别就是基址用AKGetBaseAddress获得后 + 偏移量,不知道是shadowhook问题还是基址获得有问题,能否提供点帮助,非常感谢
The text was updated successfully, but these errors were encountered: