Class DebuggerDetector
Detects whether a user mode or kernel mode debugger is attached to the running game.
Implements
Inherited Members
Namespace: GUPS.AntiCheat.Detector.Desktop
Assembly: cs.temp.dll.dll
Syntax
public class DebuggerDetector : ADetector
Remarks
Each scan queries System.Diagnostics.Debugger.IsAttached for managed debuggers (Visual Studio,
Rider, dnSpy),
User mode and kernel mode evidence carry separate threat ratings because a kernel debugger on a player machine is far more suspicious than a managed debugger attached during development.
Fields
CheckOnlyOnGameStart
Run the debugger check only once on game start. Disable to also run a periodic recheck.
Declaration
public bool CheckOnlyOnGameStart
Field Value
| Type | Description |
|---|---|
| System.Boolean |
OnCheatingDetectionEvent
Unity event raised on every detection. Useful to wire up reactions through the inspector without writing an
Declaration
public CheatingDetectionEvent<DesktopCheatingDetectionStatus> OnCheatingDetectionEvent
Field Value
| Type | Description |
|---|---|
| CheatingDetectionEvent<DesktopCheatingDetectionStatus> |
RecheckIntervalForPossibleCheating
Interval in seconds between debugger checks. Lower than the mod loader interval because attaching a debugger mid-game is a common workflow.
Declaration
public float RecheckIntervalForPossibleCheating
Field Value
| Type | Description |
|---|---|
| System.Single |
Properties
IsSupported
Gets a value indicating whether the detector is supported on the current platform.
Declaration
public override bool IsSupported { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
Name
Gets the human-readable name of the detector.
Declaration
public override String Name { get; }
Property Value
| Type | Description |
|---|---|
| String |
Overrides
PossibleCheatingDetected
Gets a value indicating whether the detector has observed possible cheating activity.
Declaration
public override bool PossibleCheatingDetected { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Overrides
ThreatRating
Gets the larger of the user mode and kernel mode threat ratings, satisfying the ADetector contract.
Declaration
public override uint ThreatRating { get; protected set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Overrides
Methods
ManualScan()
Performs all enabled checks once and notifies observers if any evidence is found.
Declaration
public bool ManualScan()
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
OnCompleted()
Called when an observed subject signals completion.
Declaration
public override void OnCompleted()
Overrides
OnError(Exception)
Called when an observed subject reports an error.
Declaration
public override void OnError(Exception _Error)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | _Error | The error reported by the observed subject. |
Overrides
OnNext(IWatchedSubject)
Called when an observed subject publishes a new status.
Declaration
public override void OnNext(IWatchedSubject _Subject)
Parameters
| Type | Name | Description |
|---|---|---|
| IWatchedSubject | _Subject | The status published by the observed subject. |
Overrides
Start()
Caches the platform probe, runs the first scan and starts the periodic recheck loop.
Declaration
protected virtual void Start()