issues/11

This commit is contained in:
恍兮惚兮 2024-04-16 13:22:38 +08:00
parent 3eedd0ec8d
commit c0d38c25f1
2 changed files with 10 additions and 1 deletions

View File

@ -49,7 +49,7 @@ include(generate_product_version)
set(VERSION_MAJOR 2)
set(VERSION_MINOR 10)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)
set(VERSION_REVISION 0)
add_subdirectory(include)

View File

@ -100,6 +100,14 @@ void LunaHost::on_proc_connect(DWORD pid)
if(auto pexe=GetModuleFilename(pid))
{
autoattachexes.insert(WideStringToString(pexe.value()));
auto u8procname=WideStringToString(pexe.value());
if(savedhookcontext.find(u8procname)!=savedhookcontext.end()){
std::string name=safequeryjson(savedhookcontext[u8procname],"name",std::string());
if(startWith(name,"UserHook")){
if(auto hp=HookCode::Parse(StringToWideString(savedhookcontext[u8procname]["hookcode"])))
Host::InsertHook(pid,hp.value());
}
}
}
}
@ -253,6 +261,7 @@ LunaHost::LunaHost(){
{"hookcode",WideStringToString(tt->hp.hookcode)},
{"ctx1",tt->tp.ctx},
{"ctx2",tt->tp.ctx2},
{"name",WideStringToString(tt->name)}
};
});
menu.add(MenuForgetSelect,[&,tt](){