也算是外挂了吧。
把应用运行起来后,hook 进入游戏进程,加载lua脚本,脚本里面去加载图片,保存图片,这不就行了吗?
整个app的运行时都具备了,我还苦苦去脱壳,找key干嘛?dofile不行就loadstring。
理论上可行,明天实战一下,眼睛血丝好严重。注意休息。
0922:
void* handle = dlopen("libgame.so", RTLD_LAZY);
void* funcaddr = dlsym(handle, "cocos2dVersion");
const char *version = funcaddr();
小 demo:
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
int main(int argc, char **argv) {
void *handle;
double (*cosine)(double);
char *error;
handle = dlopen ("/usr/lib/libSystem.B.dylib", RTLD_LAZY);
if (!handle) {
fputs (dlerror(), stderr);
exit(1);
}
int (*log)(const char * restrict format, ...);
log = dlsym(handle, "printf");
if ((error = dlerror()) != NULL) {
fputs(error, stderr);
exit(1);
}
(*log)("get printf %s\n", "hell");
cosine = dlsym(handle, "cos");
if ((error = dlerror()) != NULL) {
fputs(error, stderr);
exit(1);
}
(*log) ("%f\n", (*cosine)(2.0));
dlclose(handle);
}
0922-22:22
上述方法不能加载 c++ 的函数,我屌杠他的,http://joeywen.github.io/how-to-load-cpp-function-and-class-in-runtime/
网友评论