ContentMatchSets are now expected in IContentCheck

This commit is contained in:
Matt Nadareski
2021-08-25 19:37:32 -07:00
parent 7548646ba2
commit 3ab0bcc0ae
63 changed files with 478 additions and 182 deletions

View File

@@ -22,14 +22,19 @@ namespace BurnOutSharp.ProtectionType
*/
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
public List<ContentMatchSet> GetContentMatchSets()
{
var matchers = new List<ContentMatchSet>
return new List<ContentMatchSet>
{
// Trial + (char)0x00 + P
new ContentMatchSet(new byte?[] { 0x54, 0x72, 0x69, 0x61, 0x6C, 0x00, 0x50 }, "INTENIUM Trial & Buy Protection"),
};
}
/// <inheritdoc/>
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
{
var matchers = GetContentMatchSets();
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
}
}