mirror of https://github.com/x64dbg/TitanEngine
Don't call DebugSetProcessKillOnExit if SafeAttach is enabled
This commit is contained in:
parent
51ba022c29
commit
9fc3d5aa99
|
|
@ -554,14 +554,11 @@ __declspec(dllexport) bool TITCALL AttachDebugger(DWORD ProcessId, bool KillOnEx
|
||||||
{
|
{
|
||||||
if(engineEnableDebugPrivilege)
|
if(engineEnableDebugPrivilege)
|
||||||
EngineSetDebugPrivilege(GetCurrentProcess(), false);
|
EngineSetDebugPrivilege(GetCurrentProcess(), false);
|
||||||
if(KillOnExit)
|
|
||||||
{
|
|
||||||
funcDebugSetProcessKillOnExit = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugSetProcessKillOnExit");
|
funcDebugSetProcessKillOnExit = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugSetProcessKillOnExit");
|
||||||
if(funcDebugSetProcessKillOnExit != NULL)
|
if(funcDebugSetProcessKillOnExit != NULL)
|
||||||
{
|
{
|
||||||
myDebugSetProcessKillOnExit = (fDebugSetProcessKillOnExit)(funcDebugSetProcessKillOnExit);
|
myDebugSetProcessKillOnExit = (fDebugSetProcessKillOnExit)(funcDebugSetProcessKillOnExit);
|
||||||
myDebugSetProcessKillOnExit(KillOnExit);
|
myDebugSetProcessKillOnExit(KillOnExit && !engineSafeAttach ? true : false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
DebugDebuggingDLL = false;
|
DebugDebuggingDLL = false;
|
||||||
DebugAttachedToProcess = true;
|
DebugAttachedToProcess = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue