mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
chore: remove AntiDebug, thanks meli
This commit is contained in:
parent
e572940073
commit
311968ed57
2 changed files with 0 additions and 54 deletions
|
|
@ -62,8 +62,6 @@ namespace Dalamud {
|
|||
|
||||
public readonly DataManager Data;
|
||||
|
||||
private AntiDebug antiDebug;
|
||||
|
||||
|
||||
private Localization localizationMgr;
|
||||
|
||||
|
|
@ -174,8 +172,6 @@ namespace Dalamud {
|
|||
this.WinSock2.Dispose();
|
||||
|
||||
this.SigScanner.Dispose();
|
||||
|
||||
this.antiDebug?.Dispose();
|
||||
}
|
||||
|
||||
#region Interface
|
||||
|
|
@ -188,8 +184,6 @@ namespace Dalamud {
|
|||
private bool isImguiDrawDevMenu = false;
|
||||
#endif
|
||||
|
||||
private bool isAntiDebugEnabled = false;
|
||||
|
||||
private bool isImguiDrawLogWindow = false;
|
||||
private bool isImguiDrawDataWindow = false;
|
||||
private bool isImguiDrawPluginWindow = false;
|
||||
|
|
@ -241,15 +235,6 @@ namespace Dalamud {
|
|||
}
|
||||
ImGui.MenuItem("Draw ImGui demo", "", ref this.isImguiDrawDemoWindow);
|
||||
ImGui.Separator();
|
||||
if (ImGui.MenuItem("Enable AntiDebug", "", ref this.isAntiDebugEnabled)) {
|
||||
if (this.isAntiDebugEnabled) {
|
||||
this.antiDebug = new AntiDebug();
|
||||
this.antiDebug.Enable();
|
||||
} else {
|
||||
this.antiDebug?.Dispose();
|
||||
}
|
||||
}
|
||||
ImGui.Separator();
|
||||
if (ImGui.MenuItem("Unload Dalamud"))
|
||||
{
|
||||
Unload();
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Dalamud.Hooking;
|
||||
using EasyHook;
|
||||
using Serilog;
|
||||
|
||||
namespace Dalamud.Game.Internal
|
||||
{
|
||||
class AntiDebug : IDisposable
|
||||
{
|
||||
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
|
||||
private delegate bool IsDebuggerPresentDelegate();
|
||||
|
||||
private Hook<IsDebuggerPresentDelegate> debuggerPresentHook;
|
||||
|
||||
public AntiDebug() {
|
||||
this.debuggerPresentHook = new Hook<IsDebuggerPresentDelegate>(LocalHook.GetProcAddress("Kernel32", "IsDebuggerPresent"),
|
||||
new IsDebuggerPresentDelegate(IsDebuggerPresentDetour));
|
||||
|
||||
Log.Verbose("IsDebuggerPresent address {IsDebuggerPresent}", this.debuggerPresentHook.Address);
|
||||
}
|
||||
|
||||
public void Enable() {
|
||||
this.debuggerPresentHook.Enable();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
this.debuggerPresentHook.Disable();
|
||||
}
|
||||
|
||||
private bool IsDebuggerPresentDetour() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue