HookShield is a lightweight, background-running security component designed to protect your .NET application from runtime tampering. It specifically targets Harmony patches, ensuring that no unauthorized modifications are injected into your methods while the application is running.
- Real-time Monitoring: Constantly scans your codebase for any hooks (Prefixes, Postfixes, Transpilers).
- Auto-Recovery: Detects unauthorized patches and instantly rolls them back, restoring your methods to their original state.
- Invisible Protector: Runs in a separate background thread, making it harder for simple injectors to spot the detector.
- Plug & Play: Easily integrate it into any project using Harmony.
Most modern game/app cheats use Harmony to hook methods, redirect logic, or bypass checks. HookShield fights back:
- Cache Building: Upon initialization, it maps all critical methods and constructors within your assembly.
- Background Scanner: A dedicated background thread iterates through the cached method list every second.
- Integrity Check: Uses
Harmony.GetPatchInfoto peek at the method's metadata. - Instant Neutralization: If any external patch is found, the system forcefully unpatches the method, stripping away the intruder's code immediately.
unhook.build_method_cache();
unhook.run_scanner();