mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 14:54:56 +00:00
ContentMatchSets are now expected in IContentCheck
This commit is contained in:
@@ -10,9 +10,9 @@ namespace BurnOutSharp.ProtectionType
|
||||
public class SecuROM : IContentCheck, IPathCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
|
||||
public List<ContentMatchSet> GetContentMatchSets()
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
return new List<ContentMatchSet>
|
||||
{
|
||||
// AddD + (char)0x03 + (char)0x00 + (char)0x00 + (char)0x00)
|
||||
new ContentMatchSet(new byte?[] { 0x41, 0x64, 0x64, 0x44, 0x03, 0x00, 0x00, 0x00 }, GetV4Version, "SecuROM"),
|
||||
@@ -53,7 +53,12 @@ namespace BurnOutSharp.ProtectionType
|
||||
// .cms_d + (char)0x00
|
||||
new ContentMatchSet(new byte?[] { 0x2E, 0x63, 0x6D, 0x73, 0x5F, 0x64, 0x00 }, "SecuROM 1-3"),
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false)
|
||||
{
|
||||
var matchers = GetContentMatchSets();
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includeDebug);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user