SEB-Patcher/SEBPatcher.Configuration/Integrity/patch_IntegrityModule.cs

36 lines
1.5 KiB
C#
Raw Permalink Normal View History

2024-10-16 21:19:33 +02:00
using MonoMod;
2024-10-16 08:11:06 +02:00
using SEBPatcherUtils;
2024-10-15 10:02:43 +02:00
namespace SafeExamBrowser.Configuration.Integrity
{
2024-10-16 21:19:33 +02:00
#pragma warning disable IDE1006 // Naming Styles
2024-10-15 10:02:43 +02:00
public class patch_IntegrityModule : IntegrityModule
2024-10-16 21:19:33 +02:00
#pragma warning restore IDE1006 // Naming Styles
2024-10-15 10:02:43 +02:00
{
2024-10-16 08:11:06 +02:00
public PatchLogger patchlogger;
2024-10-15 10:02:43 +02:00
[MonoModIgnore] public patch_IntegrityModule(Configuration.Contracts.AppConfig appConfig, SafeExamBrowser.Logging.Contracts.ILogger logger) : base(appConfig, logger) { }
2024-10-16 21:19:33 +02:00
#pragma warning disable IDE1006 // Naming Styles
2024-10-16 08:11:06 +02:00
[MonoModOriginal] public extern void orig_IntegityModule(Configuration.Contracts.AppConfig appConfig, SafeExamBrowser.Logging.Contracts.ILogger logger);
2024-10-16 21:19:33 +02:00
#pragma warning restore IDE1006 // Naming Styles
2024-10-16 08:11:06 +02:00
[MonoModConstructor] public void IntegrityModule(Configuration.Contracts.AppConfig appConfig, SafeExamBrowser.Logging.Contracts.ILogger logger)
{
orig_IntegityModule(appConfig, logger);
patchlogger = new PatchLogger("Configuration.Integrity");
}
[MonoModOriginal] public extern bool orig_TryVerifyCodeSignature(out bool isValid);
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
public bool TryVerifyCodeSignature(out bool isValid)
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{
bool result = orig_TryVerifyCodeSignature(out isValid);
2024-10-16 08:11:06 +02:00
patchlogger.Info($"SEB integrity check result: {result}");
isValid = true;
return true;
}
2024-10-15 10:02:43 +02:00
}
}