Add CEG protection detection (#406)

* Initial work

* Finish PR

* Update test count
This commit is contained in:
HeroponRikiBestest
2026-02-07 18:07:36 -05:00
committed by GitHub
parent fbee5a1c52
commit 6cc6f66c95
4 changed files with 129 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
using System.IO;
using BinaryObjectScanner.Protection;
using Xunit;
namespace BinaryObjectScanner.Test.Protection
{
public class CEGTests
{
[Fact]
public void CheckPortableExecutableTest()
{
string file = "filename";
SabreTools.Data.Models.PortableExecutable.Executable model = new();
Stream source = new MemoryStream(new byte[1024]);
SabreTools.Serialization.Wrappers.PortableExecutable exe = new(model, source);
var checker = new CenegaProtectDVD();
string? actual = checker.CheckExecutable(file, exe, includeDebug: false);
Assert.Null(actual);
}
}
}