mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-24 15:54:57 +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:
@@ -5,24 +5,27 @@ namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class ThreeTwoOneStudios : IContentCheck
|
||||
{
|
||||
/// <summary>
|
||||
/// Set of all ContentMatchSets for this protection
|
||||
/// </summary>
|
||||
private static List<ContentMatchSet> contentMatchers = new List<ContentMatchSet>
|
||||
{
|
||||
// 3 + (char)0x00 + 1 + 2 + (char)0x00 + 1 + (char)0x00 + S + (char)0x00 + t + (char)0x00 + u + (char)0x00 + d + (char)0x00 + i + (char)0x00 + o + (char)0x00 + s + (char)0x00 + + (char)0x00 + A + (char)0x00 + c + (char)0x00 + t + (char)0x00 + i + (char)0x00 + v + (char)0x00 + a + (char)0x00 + t + (char)0x00 + i + (char)0x00 + o + (char)0x00 + n + (char)0x00
|
||||
new ContentMatchSet(new byte?[]
|
||||
{
|
||||
0x33, 0x00, 0x32, 0x00, 0x31, 0x00, 0x53, 0x00,
|
||||
0x74, 0x00, 0x75, 0x00, 0x64, 0x00, 0x69, 0x00,
|
||||
0x6F, 0x00, 0x73, 0x00, 0x20, 0x00, 0x41, 0x00,
|
||||
0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00,
|
||||
0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00,
|
||||
0x6E, 0x00
|
||||
}, "321Studios Online Activation"),
|
||||
};
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
{
|
||||
// 3 + (char)0x00 + 1 + 2 + (char)0x00 + 1 + (char)0x00 + S + (char)0x00 + t + (char)0x00 + u + (char)0x00 + d + (char)0x00 + i + (char)0x00 + o + (char)0x00 + s + (char)0x00 + + (char)0x00 + A + (char)0x00 + c + (char)0x00 + t + (char)0x00 + i + (char)0x00 + v + (char)0x00 + a + (char)0x00 + t + (char)0x00 + i + (char)0x00 + o + (char)0x00 + n + (char)0x00
|
||||
new ContentMatchSet(new byte?[]
|
||||
{
|
||||
0x33, 0x00, 0x32, 0x00, 0x31, 0x00, 0x53, 0x00,
|
||||
0x74, 0x00, 0x75, 0x00, 0x64, 0x00, 0x69, 0x00,
|
||||
0x6F, 0x00, 0x73, 0x00, 0x20, 0x00, 0x41, 0x00,
|
||||
0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x76, 0x00,
|
||||
0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F, 0x00,
|
||||
0x6E, 0x00
|
||||
}, "321Studios Online Activation"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, contentMatchers, includePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user