Patcher for Safe Exam Browser
Find a file
2024-11-15 08:01:26 +01:00
SEBPatcher.Client Testing Client patch 2024-11-15 08:01:26 +01:00
SEBPatcher.Configuration Integrate SafeExamBrowser.Client 2024-10-16 21:19:33 +02:00
SEBPatcher.Monitoring Integrate SafeExamBrowser.Client 2024-10-16 21:19:33 +02:00
SEBPatcherUtils Integrated logging 2024-10-16 08:11:06 +02:00
.gitignore Testing Client patch 2024-11-15 08:01:26 +01:00
Directory.Build.props Add missing build props 2024-10-15 09:32:37 +02:00
README.md Testing Client patch 2024-11-15 08:01:26 +01:00
SEBPatcher.sln Integrate SafeExamBrowser.Client 2024-10-16 21:19:33 +02:00

SEB-Patcher

A patcher for Safe Exam Browser built on MonoMod / Mono.Cecil

This repository is a .NET solution with libraries used to patch prebuilt SEB DLLs.

Patching

In order to use the patches, do the following:

  1. Get the patch DLLs: build them or get them from releases.

  2. Put patch DLLs into %appdata%\SafeExamBrowser\Application.

  3. Get MonoMod and put all its files into %appdata%\SafeExamBrowser\Application.

  4. Run MonoMod on all target DLLs, eg. .\MonoMod.exe SafeExamBrowser.Monitoring.dll. Note that you might get an error about not being able to find dependencies, in this case you should set the environment variable 'MONOMOD_DEPENDENCY_MISSING_THROW' to '1'. If you have to do this, make sure to doublecheck the patched DLLs with something like dnSpy so that they are correct.

  5. Rename the patched DLLs once they have been patched correctly (MONOMODDED_xxxxx) and remove the MONOMODDED prefix, replacing the original files.

Development

This project was created in MonoDevelop, but should be compatible with Visual Studio.

All you have to do is clone this repository, change the ReferenceBasePaths in the projects, and open it in your IDE.

Set ReferenceBasePath to your SEB installation (SafeExamBrowser\Application). You also need to copy the MonoMod files into your SEB installation.

If you want to separate your development/testing files from your actual SEB installation, I recommend copying the files in SafeExamBrowser\Application and the MonoMod files to their own directory.

Some targets (namely SafeExamBrowser.Client.exe) has private/internal members that we need to deal with, to do this we first publicize it using n-strip, and then reference to the stripped binary instead.

Resources

This depends on MonoMod and SafeExamBrowser.

Download Resources

SafeExamBrowser: https://safeexambrowser.org/download_en.html

MonoMod: https://github.com/MonoMod/MonoMod

stripping/publicizing for development: https://github.com/bbepis/NStrip

Learning Resources

SafeExamBrowser sourcecode: https://github.com/SafeExamBrowser/seb-win-refactoring

MonoMod API documentation: https://monomod.github.io/api/index.html

MonoMod step-by-step example implementation: https://github.com/TROYTRON/ti-mods/blob/main/tutorials/MonoMod%20Guide.md

Example patch by MonoMod: https://monomod.dev/docs/README.Patcher.html

dnSpy decomp/analysis tool: https://github.com/dnSpyEx/dnSpy

sandbox for testing modifications (if you cant host a seb server): https://sandbox.moodledemo.net