mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 14:54:56 +00:00
Add CEG protection detection (#406)
* Initial work * Finish PR * Update test count
This commit is contained in:
committed by
GitHub
parent
fbee5a1c52
commit
6cc6f66c95
22
BinaryObjectScanner.Test/Protection/CEGTests.cs
Normal file
22
BinaryObjectScanner.Test/Protection/CEGTests.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user