mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-24 04:04:14 +08:00
something
This commit is contained in:
parent
c0d38c25f1
commit
d49125d5e4
@ -90,4 +90,5 @@
|
||||
#define HS_CODEPAGE L"Codepage"
|
||||
#define HS_SEARCH_FOR_TEXT L"Search for specific text"
|
||||
#define VersionLatest L"Latest version"
|
||||
#define VersionCurrent L"Current version"
|
||||
#define VersionCurrent L"Current version"
|
||||
#define ProjectHomePage L"Project homepage: https://github.com/HIllya51/LunaHook"
|
@ -90,4 +90,5 @@
|
||||
#define HS_CODEPAGE L"代码页"
|
||||
#define HS_SEARCH_FOR_TEXT L"搜索指定文本"
|
||||
#define VersionLatest L"最新版本"
|
||||
#define VersionCurrent L"当前版本"
|
||||
#define VersionCurrent L"当前版本"
|
||||
#define ProjectHomePage L"项目主页: https://github.com/HIllya51/LunaHook"
|
@ -15,6 +15,7 @@ std::unordered_map<std::wstring,std::vector<int>> getprocesslist()
|
||||
PROCESSENTRY32 pe32;
|
||||
pe32.dwSize = sizeof(PROCESSENTRY32);
|
||||
wchar_t buff[65535];
|
||||
auto currpid=GetCurrentProcessId();
|
||||
if (Process32First(hSnapshot, &pe32))
|
||||
{
|
||||
do
|
||||
@ -25,6 +26,7 @@ std::unordered_map<std::wstring,std::vector<int>> getprocesslist()
|
||||
PROCESS_VM_OPERATION |
|
||||
PROCESS_VM_WRITE |
|
||||
PROCESS_VM_READ);
|
||||
if(pe32.th32ProcessID==currpid)continue;
|
||||
AutoHandle<> handle = OpenProcess(PROCESS_INJECT_ACCESS, 0, pe32.th32ProcessID);
|
||||
if (handle == 0)continue;
|
||||
DWORD sz = 65535;
|
||||
|
@ -207,11 +207,13 @@ namespace Host
|
||||
|
||||
textThreadsByParams->try_emplace(console, console, HookParam{}, CONSOLE);
|
||||
|
||||
if(createconsole)
|
||||
if(createconsole){
|
||||
OnCreate(GetThread(console));
|
||||
Host::AddConsoleOutput(ProjectHomePage);
|
||||
}
|
||||
|
||||
//CreatePipe();
|
||||
|
||||
|
||||
}
|
||||
void StartEx(ProcessEventHandler Connect, ProcessEventHandler Disconnect, ThreadEventHandler Create, ThreadEventHandler Destroy, TextThread::OutputCallback Output,ConsoleHandler console,HookInsertHandler hookinsert,EmbedCallback embed){
|
||||
Start(Connect,Disconnect,Create,Destroy,Output,false);
|
||||
@ -219,6 +221,7 @@ namespace Host
|
||||
OnConsole=console;
|
||||
HookInsert=hookinsert;
|
||||
embedcallback=embed;
|
||||
Host::AddConsoleOutput(ProjectHomePage);
|
||||
}
|
||||
constexpr auto PROCESS_INJECT_ACCESS=(
|
||||
PROCESS_CREATE_THREAD |
|
||||
|
Loading…
x
Reference in New Issue
Block a user