SEBPatcher.Client | ||
SEBPatcher.Configuration | ||
SEBPatcher.Monitoring | ||
SEBPatcherUtils | ||
.gitignore | ||
Directory.Build.props | ||
README.md | ||
SEBPatcher.sln |
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:
-
Get the patch DLLs: build them or get them from releases.
-
Put patch DLLs into %appdata%\SafeExamBrowser\Application.
-
Get MonoMod and put all its files into %appdata%\SafeExamBrowser\Application.
-
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. -
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 ReferenceBasePath
s 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