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