mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-27 07:44:02 +08:00
issues/11
This commit is contained in:
parent
3eedd0ec8d
commit
c0d38c25f1
@ -49,7 +49,7 @@ include(generate_product_version)
|
|||||||
|
|
||||||
set(VERSION_MAJOR 2)
|
set(VERSION_MAJOR 2)
|
||||||
set(VERSION_MINOR 10)
|
set(VERSION_MINOR 10)
|
||||||
set(VERSION_PATCH 0)
|
set(VERSION_PATCH 1)
|
||||||
set(VERSION_REVISION 0)
|
set(VERSION_REVISION 0)
|
||||||
|
|
||||||
add_subdirectory(include)
|
add_subdirectory(include)
|
||||||
|
@ -100,6 +100,14 @@ void LunaHost::on_proc_connect(DWORD pid)
|
|||||||
if(auto pexe=GetModuleFilename(pid))
|
if(auto pexe=GetModuleFilename(pid))
|
||||||
{
|
{
|
||||||
autoattachexes.insert(WideStringToString(pexe.value()));
|
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)},
|
{"hookcode",WideStringToString(tt->hp.hookcode)},
|
||||||
{"ctx1",tt->tp.ctx},
|
{"ctx1",tt->tp.ctx},
|
||||||
{"ctx2",tt->tp.ctx2},
|
{"ctx2",tt->tp.ctx2},
|
||||||
|
{"name",WideStringToString(tt->name)}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
menu.add(MenuForgetSelect,[&,tt](){
|
menu.add(MenuForgetSelect,[&,tt](){
|
||||||
|
Loading…
Reference in New Issue
Block a user