mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 23:05:03 +00:00
Static list of content matchers
This also includes some more path matcher conversions that I couldn't reasonably split out
This commit is contained in:
@@ -8,16 +8,19 @@ namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class SmartE : IContentCheck, IPathCheck
|
||||
{
|
||||
/// <summary>
|
||||
/// Set of all ContentMatchSets for this protection
|
||||
/// </summary>
|
||||
private static List<ContentMatchSet> contentMatchers = new List<ContentMatchSet>
|
||||
{
|
||||
// BITARTS
|
||||
new ContentMatchSet(new byte?[] { 0x42, 0x49, 0x54, 0x41, 0x52, 0x54, 0x53 }, "SmartE"),
|
||||
};
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
{
|
||||
// BITARTS
|
||||
new ContentMatchSet(new byte?[] { 0x42, 0x49, 0x54, 0x41, 0x52, 0x54, 0x53 }, "SmartE"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, contentMatchers, includePosition);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
Reference in New Issue
Block a user