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:
@@ -7,14 +7,19 @@ namespace BurnOutSharp.ProtectionType
|
||||
public class SafeLock : 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>
|
||||
{
|
||||
// SafeLock
|
||||
new ContentMatchSet(new byte?[] { 0x53, 0x61, 0x66, 0x65, 0x4C, 0x6F, 0x63, 0x6B }, "SafeLock"),
|
||||
};
|
||||
}
|
||||
|
||||
/// <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