From 46c877f036bfa6175184f6d3c24cc7e7d903920e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD=D0=BE=D0=B2=20=D0=98=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD?= Date: Thu, 15 Aug 2024 20:14:20 +0200 Subject: [PATCH] fix: add l2.bin to valid process name --- L2BotDll/dllmain.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/L2BotDll/dllmain.cpp b/L2BotDll/dllmain.cpp index ae61e12..b575e1e 100644 --- a/L2BotDll/dllmain.cpp +++ b/L2BotDll/dllmain.cpp @@ -44,11 +44,13 @@ BOOL APIENTRY DllMain(HMODULE hModule, const int processId = GetCurrentProcessId(); const std::string& processName = InjectLibrary::GetCurrentProcessName(); + const bool isLineageProcess = processName == "l2.exe" || processName == "l2.bin"; + switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: injector.SetHook(hModule); - if (processName == "l2.exe") { + if (isLineageProcess) { ConfigLogger(hModule); InjectLibrary::StopCurrentProcess(); @@ -58,7 +60,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, } break; case DLL_PROCESS_DETACH: - if (processName == "l2.exe") { + if (isLineageProcess) { InjectLibrary::StopCurrentProcess(); application.Stop(); InjectLibrary::StartCurrentProcess();