Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Latest commit

 

History

History
12 lines (10 loc) · 253 Bytes

README.md

File metadata and controls

12 lines (10 loc) · 253 Bytes

Disharmony

Harmony Hook Detector in 3 lines

public static bool IsHookedByHarmony(MethodBase method)
{
  var methodPtr = method.MethodHandle.GetFunctionPointer();
  var firstByte = Marshal.ReadByte(methodPtr);

  return firstByte == 0xE9;
}