From bdbf8b5a957bbe67af4034188c2204ceb703e85f Mon Sep 17 00:00:00 2001 From: ethylamine <46206558+ethylamine@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:07:18 +0000 Subject: [PATCH 1/9] Add files via upload --- kernel/src/Plugins/TargetID/TargetID.cpp | 58 ++++++++++++++++++++++++ kernel/src/Plugins/TargetID/TargetID.hpp | 26 +++++++++++ 2 files changed, 84 insertions(+) create mode 100644 kernel/src/Plugins/TargetID/TargetID.cpp create mode 100644 kernel/src/Plugins/TargetID/TargetID.hpp diff --git a/kernel/src/Plugins/TargetID/TargetID.cpp b/kernel/src/Plugins/TargetID/TargetID.cpp new file mode 100644 index 00000000..c1ffa04e --- /dev/null +++ b/kernel/src/Plugins/TargetID/TargetID.cpp @@ -0,0 +1,58 @@ +#include "TargetID.hpp" +#include +#include + +using namespace Mira::Plugins; + +TargetID::TargetID() +{ + +} + +TargetID::~TargetID() +{ + +} + +void TargetID::SpoofTo(char targetId_input) +{ + targetId_desired = targetId_input; + + if (targetId_orig == 0x00) + targetId_orig = *(char *)kdlsym(target_id); + + if (targetId_orig == targetId_input) + { + WriteLog(LL_Error, "Target ID is already %02hhX", targetId_input); + return; + } + + WriteLog(LL_Warn, "spoofing target ID to %02hhX", targetId_input); + *(char *)kdlsym(target_id) = targetId_input; + *(char *)kdlsym(target_id_2) = targetId_input; + WriteLog(LL_Info, "target ID spoofed to %02hhX", targetId_input); +} + +bool TargetID::OnLoad() +{ + SpoofTo(targetId_desired); + return true; +} + +bool TargetID::OnUnload() +{ + SpoofTo(targetId_orig); + return true; +} + +bool TargetID::OnSuspend() +{ + SpoofTo(targetId_orig); + return true; +} + +bool TargetID::OnResume() +{ + SpoofTo(targetId_desired); + return true; +} diff --git a/kernel/src/Plugins/TargetID/TargetID.hpp b/kernel/src/Plugins/TargetID/TargetID.hpp new file mode 100644 index 00000000..76bdfbe8 --- /dev/null +++ b/kernel/src/Plugins/TargetID/TargetID.hpp @@ -0,0 +1,26 @@ +#pragma once +#include +#include + +namespace Mira +{ + namespace Plugins + { + class TargetID : public Mira::Utils::IModule + { + private: + char targetId_orig = 0x00; + char targetId_desired = 0x82; // DEX + public: + TargetID(); + virtual ~TargetID(); + + virtual const char* GetName() override { return "TargetID"; } + virtual bool OnLoad() override; + virtual bool OnUnload() override; + virtual bool OnSuspend() override; + virtual bool OnResume() override; + void SpoofTo(char dex_id); + }; + } +} From 3a1937c9dcfe04a2a123da6be3213d8cad620ffe Mon Sep 17 00:00:00 2001 From: ethylamine <46206558+ethylamine@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:22:34 +0000 Subject: [PATCH 2/9] Add target ID offsets --- kernel/src/Utils/Kdlsym/Orbis505.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/src/Utils/Kdlsym/Orbis505.hpp b/kernel/src/Utils/Kdlsym/Orbis505.hpp index a87d78ee..4bef6f13 100644 --- a/kernel/src/Utils/Kdlsym/Orbis505.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis505.hpp @@ -169,6 +169,8 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_wait4 0x00035470 #define kdlsym_addr_sys_write 0x00152FC0 #define kdlsym_addr_trap_fatal 0x00171580 +#define kdlsym_addr_target_id 0x01BD800D +#define kdlsym_addr_target_id_2 0x01BD955D #define kdlsym_addr_utilUSleep 0x00658C30 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A6C20 #define kdlsym_addr_vm_fault_enable_pagefaults 0x002A6C50 From 691b8f7c73a5b3f3694b78c01829cb1699e72521 Mon Sep 17 00:00:00 2001 From: ethylamine <46206558+ethylamine@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:25:11 +0000 Subject: [PATCH 3/9] add target ID offsets for 6.72 --- kernel/src/Utils/Kdlsym/Orbis672.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/src/Utils/Kdlsym/Orbis672.hpp b/kernel/src/Utils/Kdlsym/Orbis672.hpp index 00b16e91..7823c611 100644 --- a/kernel/src/Utils/Kdlsym/Orbis672.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis672.hpp @@ -169,6 +169,8 @@ #define kdlsym_addr_sys_wait4 0x00406830 #define kdlsym_addr_sys_write 0x0039BCF0 #define kdlsym_addr_trap_fatal 0x002ED2E0 +#define kdlsym_addr_target_id 0x01BD800D +#define kdlsym_addr_target_id_2 0x01BD955D #define kdlsym_addr_utilUSleep 0x0069B2A0 #define kdlsym_addr_vm_fault_disable_pagefaults 0x000C0BB0 #define kdlsym_addr_vm_fault_enable_pagefaults 0x000C0BE0 From 0bfa436eb66a56fe27e64a515af2dab4c13ffa55 Mon Sep 17 00:00:00 2001 From: ethylamine <46206558+ethylamine@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:26:23 +0000 Subject: [PATCH 4/9] correct the offsets for 5.05, whoops... --- kernel/src/Utils/Kdlsym/Orbis505.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/Utils/Kdlsym/Orbis505.hpp b/kernel/src/Utils/Kdlsym/Orbis505.hpp index 4bef6f13..bc9b3d16 100644 --- a/kernel/src/Utils/Kdlsym/Orbis505.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis505.hpp @@ -169,8 +169,8 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_wait4 0x00035470 #define kdlsym_addr_sys_write 0x00152FC0 #define kdlsym_addr_trap_fatal 0x00171580 -#define kdlsym_addr_target_id 0x01BD800D -#define kdlsym_addr_target_id_2 0x01BD955D +#define kdlsym_addr_target_id 0x01CD068D +#define kdlsym_addr_target_id_2 0x0236B7FD #define kdlsym_addr_utilUSleep 0x00658C30 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A6C20 #define kdlsym_addr_vm_fault_enable_pagefaults 0x002A6C50 From ba0ff70995f63195dae55dfd241d8f02ea484ce1 Mon Sep 17 00:00:00 2001 From: ethylamine <46206558+ethylamine@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:33:18 +0000 Subject: [PATCH 5/9] Update PluginManager.hpp --- kernel/src/Plugins/PluginManager.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/src/Plugins/PluginManager.hpp b/kernel/src/Plugins/PluginManager.hpp index 1f4e6aee..be7308ac 100644 --- a/kernel/src/Plugins/PluginManager.hpp +++ b/kernel/src/Plugins/PluginManager.hpp @@ -43,6 +43,7 @@ namespace Mira Mira::Utils::IModule* m_RemotePlayEnabler; Mira::Utils::IModule* m_SyscallGuard; Mira::Utils::IModule* m_TTYRedirector; + Mira::Utils::IModule* m_TargetID; public: Mira::Utils::IModule* GetDebugger() { return m_Debugger; } @@ -53,6 +54,7 @@ namespace Mira Mira::Utils::IModule* GetMorpheusEnabler() { return m_MorpheusEnabler; } Mira::Utils::IModule* GetRemotePlayEnabler() { return m_RemotePlayEnabler; } Mira::Utils::IModule* GetSyscallGuard() { return m_SyscallGuard; } + Mira::Utils::IModule* GetTargetId() { return m_TargetID; } }; } } From c65ec1f529b95990749729e53f2aad7e3f12163d Mon Sep 17 00:00:00 2001 From: ethylamine <46206558+ethylamine@users.noreply.github.com> Date: Thu, 24 Sep 2020 22:52:27 +0000 Subject: [PATCH 6/9] add necessary target ID plugin functions --- kernel/src/Plugins/PluginManager.cpp | 47 ++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/kernel/src/Plugins/PluginManager.cpp b/kernel/src/Plugins/PluginManager.cpp index f1a464bb..431f68d5 100644 --- a/kernel/src/Plugins/PluginManager.cpp +++ b/kernel/src/Plugins/PluginManager.cpp @@ -14,6 +14,7 @@ #include #include #include +#include // Utility functions @@ -38,7 +39,8 @@ PluginManager::PluginManager() : m_BrowserActivator(nullptr), m_MorpheusEnabler(nullptr), m_RemotePlayEnabler(nullptr), - m_SyscallGuard(nullptr) + m_SyscallGuard(nullptr), + m_TargetID(nullptr) { // Hushes error: private field 'm_FileManager' is not used [-Werror,-Wunused-private-field] m_Logger = nullptr; @@ -157,6 +159,15 @@ bool PluginManager::OnLoad() s_Success = false; break; } + + // Initialize TargetID/TargetID + m_TargetID = new Mira::Plugins::TargetID(); + if (m_TargetID == nullptr) + { + WriteLog(LL_Error, "could not allocate target ID spoofer."); + s_Success = false; + break; + } } while (false); if (m_Debugger) @@ -218,6 +229,12 @@ bool PluginManager::OnLoad() if (!m_TTYRedirector->OnLoad()) WriteLog(LL_Error, "could not load tty redirector."); } + + if (m_TargetID) + { + if (!m_TargetID->OnLoad()) + WriteLog(LL_Error, "could not load target ID spoofer."); + } return s_Success; } @@ -399,6 +416,18 @@ bool PluginManager::OnUnload() delete m_TTYRedirector; m_TTYRedirector = nullptr; } + + // Delete target ID spoofer + if (m_TargetID) + { + WriteLog(LL_Debug, "unloading target ID spoofer"); + if (!m_TargetID->OnUnload()) + WriteLog(LL_Error, "target ID spoofer could not unload"); + + // Free TargetID + delete m_TargetID; + m_TargetID = nullptr; + } WriteLog(LL_Debug, "All Plugins Unloaded %s.", s_AllUnloadSuccess ? "successfully" : "un-successfully"); return s_AllUnloadSuccess; @@ -495,6 +524,13 @@ bool PluginManager::OnSuspend() if (!m_TTYRedirector->OnSuspend()) WriteLog(LL_Error, "tty redirector suspend failed"); } + + // Suspend TargetID (does nothing) + if (m_TargetID) + { + if (!m_TargetID->OnSuspend()) + WriteLog(LL_Error, "target ID spoofer suspend failed"); + } // Return final status return s_AllSuccess; @@ -562,6 +598,13 @@ bool PluginManager::OnResume() if (!m_TTYRedirector->OnResume()) WriteLog(LL_Error, "tty redirector resume failed"); } + + WriteLog(LL_Debug, "resuming target ID spoofer"); + if (m_TargetID) + { + if (!m_TargetID->OnResume()) + WriteLog(LL_Error, "target ID spoofer resume failed"); + } // Iterate through all of the plugins for (auto i = 0; i < m_Plugins.size(); ++i) @@ -657,4 +700,4 @@ bool PluginManager::OnProcessExit(struct proc* p_Process) } return true; -} \ No newline at end of file +} From 63106aec286a703471a37d96f21cc9c531d86f7e Mon Sep 17 00:00:00 2001 From: Al Azif <33132478+Al-Azif@users.noreply.github.com> Date: Thu, 24 Sep 2020 19:45:15 -0700 Subject: [PATCH 7/9] *poke* --- kernel/src/Plugins/PluginManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/src/Plugins/PluginManager.cpp b/kernel/src/Plugins/PluginManager.cpp index 431f68d5..d59ef6fe 100644 --- a/kernel/src/Plugins/PluginManager.cpp +++ b/kernel/src/Plugins/PluginManager.cpp @@ -14,7 +14,7 @@ #include #include #include -#include #include // Utility functions From 35886cdfec7e529cf9f394e56b216ca96db28f7a Mon Sep 17 00:00:00 2001 From: Al Azif <33132478+Al-Azif@users.noreply.github.com> Date: Mon, 28 Sep 2020 14:10:25 -0700 Subject: [PATCH 8/9] Add offsets --- kernel/src/Plugins/TargetID/TargetID.cpp | 1 - kernel/src/Plugins/TargetID/TargetID.hpp | 2 +- kernel/src/Utils/Kdlsym/Orbis405.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis455.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis474.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis501.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis503.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis505.hpp | 3 +-- kernel/src/Utils/Kdlsym/Orbis555.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis620.hpp | 1 + kernel/src/Utils/Kdlsym/Orbis672.hpp | 3 +-- 11 files changed, 10 insertions(+), 6 deletions(-) diff --git a/kernel/src/Plugins/TargetID/TargetID.cpp b/kernel/src/Plugins/TargetID/TargetID.cpp index c1ffa04e..36c4ef40 100644 --- a/kernel/src/Plugins/TargetID/TargetID.cpp +++ b/kernel/src/Plugins/TargetID/TargetID.cpp @@ -29,7 +29,6 @@ void TargetID::SpoofTo(char targetId_input) WriteLog(LL_Warn, "spoofing target ID to %02hhX", targetId_input); *(char *)kdlsym(target_id) = targetId_input; - *(char *)kdlsym(target_id_2) = targetId_input; WriteLog(LL_Info, "target ID spoofed to %02hhX", targetId_input); } diff --git a/kernel/src/Plugins/TargetID/TargetID.hpp b/kernel/src/Plugins/TargetID/TargetID.hpp index 76bdfbe8..f0caa080 100644 --- a/kernel/src/Plugins/TargetID/TargetID.hpp +++ b/kernel/src/Plugins/TargetID/TargetID.hpp @@ -20,7 +20,7 @@ namespace Mira virtual bool OnUnload() override; virtual bool OnSuspend() override; virtual bool OnResume() override; - void SpoofTo(char dex_id); + void SpoofTo(char targetId_input); }; } } diff --git a/kernel/src/Utils/Kdlsym/Orbis405.hpp b/kernel/src/Utils/Kdlsym/Orbis405.hpp index 9bba1799..ca3c4488 100644 --- a/kernel/src/Utils/Kdlsym/Orbis405.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis405.hpp @@ -169,6 +169,7 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x00202560 #define kdlsym_addr_sys_wait4 0x00049BA0 #define kdlsym_addr_sys_write 0x00166D70 +#define kdlsym_addr_target_id 0x0200151D #define kdlsym_addr_trap_fatal 0x000EC770 #define kdlsym_addr_utilUSleep 0x0062A3E0 #define kdlsym_addr_vm_fault_disable_pagefaults 0x000C8FB0 diff --git a/kernel/src/Utils/Kdlsym/Orbis455.hpp b/kernel/src/Utils/Kdlsym/Orbis455.hpp index 76476ddc..636c915c 100644 --- a/kernel/src/Utils/Kdlsym/Orbis455.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis455.hpp @@ -169,6 +169,7 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x000DB500 #define kdlsym_addr_sys_wait4 0x0015C500 #define kdlsym_addr_sys_write 0x0005F1A0 +#define kdlsym_addr_target_id 0x01B6D08D #define kdlsym_addr_trap_fatal 0x003DBD20 #define kdlsym_addr_utilUSleep 0x0065F290 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A19F0 diff --git a/kernel/src/Utils/Kdlsym/Orbis474.hpp b/kernel/src/Utils/Kdlsym/Orbis474.hpp index eb72d869..ac71aa9c 100644 --- a/kernel/src/Utils/Kdlsym/Orbis474.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis474.hpp @@ -169,6 +169,7 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x000DAB60 #define kdlsym_addr_sys_wait4 0x0015BB90 #define kdlsym_addr_sys_write 0x0005E780 +#define kdlsym_addr_target_id 0x01B7D08D #define kdlsym_addr_trap_fatal 0x003DCBD0 #define kdlsym_addr_utilUSleep 0x006626A0 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A3BA0 diff --git a/kernel/src/Utils/Kdlsym/Orbis501.hpp b/kernel/src/Utils/Kdlsym/Orbis501.hpp index b2f9a4bb..39a5a23e 100644 --- a/kernel/src/Utils/Kdlsym/Orbis501.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis501.hpp @@ -167,6 +167,7 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x001DFB60 #define kdlsym_addr_sys_wait4 0x00035470 #define kdlsym_addr_sys_write 0x00152EB0 +#define kdlsym_addr_target_id 0x01CD068D #define kdlsym_addr_trap_fatal 0x00171470 #define kdlsym_addr_utilUSleep 0x00658850 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A6950 diff --git a/kernel/src/Utils/Kdlsym/Orbis503.hpp b/kernel/src/Utils/Kdlsym/Orbis503.hpp index bf977091..91f49884 100644 --- a/kernel/src/Utils/Kdlsym/Orbis503.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis503.hpp @@ -167,6 +167,7 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x001DFC70 #define kdlsym_addr_sys_wait4 0x00035470 #define kdlsym_addr_sys_write 0x00152FC0 +#define kdlsym_addr_target_id 0x01CD068D #define kdlsym_addr_trap_fatal 0x00171580 #define kdlsym_addr_utilUSleep 0x00658BF0 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A6C20 diff --git a/kernel/src/Utils/Kdlsym/Orbis505.hpp b/kernel/src/Utils/Kdlsym/Orbis505.hpp index bc9b3d16..38a0b7bf 100644 --- a/kernel/src/Utils/Kdlsym/Orbis505.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis505.hpp @@ -168,9 +168,8 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x001DFC70 #define kdlsym_addr_sys_wait4 0x00035470 #define kdlsym_addr_sys_write 0x00152FC0 -#define kdlsym_addr_trap_fatal 0x00171580 #define kdlsym_addr_target_id 0x01CD068D -#define kdlsym_addr_target_id_2 0x0236B7FD +#define kdlsym_addr_trap_fatal 0x00171580 #define kdlsym_addr_utilUSleep 0x00658C30 #define kdlsym_addr_vm_fault_disable_pagefaults 0x002A6C20 #define kdlsym_addr_vm_fault_enable_pagefaults 0x002A6C50 diff --git a/kernel/src/Utils/Kdlsym/Orbis555.hpp b/kernel/src/Utils/Kdlsym/Orbis555.hpp index 10c6217e..8bfcf1cd 100644 --- a/kernel/src/Utils/Kdlsym/Orbis555.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis555.hpp @@ -169,6 +169,7 @@ for the platforms that do enable kernel ASLR (Address Space Layout Randomization #define kdlsym_addr_sys_unmount 0x0019D6E0 #define kdlsym_addr_sys_wait4 0x0044F920 #define kdlsym_addr_sys_write 0x00138640 +#define kdlsym_addr_target_id 0x022BFF8D #define kdlsym_addr_trap_fatal 0x000A1780 #define kdlsym_addr_utilUSleep 0x00694090 #define kdlsym_addr_vm_fault_disable_pagefaults 0x00218190 diff --git a/kernel/src/Utils/Kdlsym/Orbis620.hpp b/kernel/src/Utils/Kdlsym/Orbis620.hpp index 6ca54aab..4f28341c 100644 --- a/kernel/src/Utils/Kdlsym/Orbis620.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis620.hpp @@ -168,6 +168,7 @@ #define kdlsym_addr_sys_unmount 0x0000FFD0 #define kdlsym_addr_sys_wait4 0x00076590 #define kdlsym_addr_sys_write 0x0030B1E0 +#define kdlsym_addr_target_id 0x0215DB8D #define kdlsym_addr_trap_fatal 0x002E0DD0 #define kdlsym_addr_utilUSleep 0x006864B0 #define kdlsym_addr_vm_fault_disable_pagefaults 0x003FEE40 diff --git a/kernel/src/Utils/Kdlsym/Orbis672.hpp b/kernel/src/Utils/Kdlsym/Orbis672.hpp index 7823c611..7c00bb2c 100644 --- a/kernel/src/Utils/Kdlsym/Orbis672.hpp +++ b/kernel/src/Utils/Kdlsym/Orbis672.hpp @@ -168,9 +168,8 @@ #define kdlsym_addr_sys_unmount 0x004412D0 #define kdlsym_addr_sys_wait4 0x00406830 #define kdlsym_addr_sys_write 0x0039BCF0 -#define kdlsym_addr_trap_fatal 0x002ED2E0 #define kdlsym_addr_target_id 0x01BD800D -#define kdlsym_addr_target_id_2 0x01BD955D +#define kdlsym_addr_trap_fatal 0x002ED2E0 #define kdlsym_addr_utilUSleep 0x0069B2A0 #define kdlsym_addr_vm_fault_disable_pagefaults 0x000C0BB0 #define kdlsym_addr_vm_fault_enable_pagefaults 0x000C0BE0 From 3d719bb0f720a5cc3b4d0a4e4dfd98ed94b04fe1 Mon Sep 17 00:00:00 2001 From: Al Azif <33132478+Al-Azif@users.noreply.github.com> Date: Mon, 28 Sep 2020 14:16:20 -0700 Subject: [PATCH 9/9] swap --- kernel/src/Plugins/PluginManager.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/src/Plugins/PluginManager.cpp b/kernel/src/Plugins/PluginManager.cpp index 9f311135..16ecb058 100644 --- a/kernel/src/Plugins/PluginManager.cpp +++ b/kernel/src/Plugins/PluginManager.cpp @@ -40,8 +40,8 @@ PluginManager::PluginManager() : m_MorpheusEnabler(nullptr), m_RemotePlayEnabler(nullptr), m_SyscallGuard(nullptr), - m_TargetID(nullptr), - m_TTYRedirector(nullptr) + m_TTYRedirector(nullptr), + m_TargetID(nullptr) { // Hushes error: private field 'm_FileManager' is not used [-Werror,-Wunused-private-field] m_Logger = nullptr; @@ -160,7 +160,7 @@ bool PluginManager::OnLoad() s_Success = false; break; } - + // Initialize TargetID/TargetID m_TargetID = new Mira::Plugins::TargetID(); if (m_TargetID == nullptr) @@ -230,7 +230,7 @@ bool PluginManager::OnLoad() if (!m_TTYRedirector->OnLoad()) WriteLog(LL_Error, "could not load tty redirector."); } - + if (m_TargetID) { if (!m_TargetID->OnLoad()) @@ -417,14 +417,14 @@ bool PluginManager::OnUnload() delete m_TTYRedirector; m_TTYRedirector = nullptr; } - + // Delete target ID spoofer if (m_TargetID) { WriteLog(LL_Debug, "unloading target ID spoofer"); if (!m_TargetID->OnUnload()) WriteLog(LL_Error, "target ID spoofer could not unload"); - + // Free TargetID delete m_TargetID; m_TargetID = nullptr; @@ -525,7 +525,7 @@ bool PluginManager::OnSuspend() if (!m_TTYRedirector->OnSuspend()) WriteLog(LL_Error, "tty redirector suspend failed"); } - + // Suspend TargetID (does nothing) if (m_TargetID) { @@ -599,7 +599,7 @@ bool PluginManager::OnResume() if (!m_TTYRedirector->OnResume()) WriteLog(LL_Error, "tty redirector resume failed"); } - + WriteLog(LL_Debug, "resuming target ID spoofer"); if (m_TargetID) {