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:
@@ -5,44 +5,47 @@ namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class PSXAntiModchip : IContentCheck
|
||||
{
|
||||
/// <summary>
|
||||
/// Set of all ContentMatchSets for this protection
|
||||
/// </summary>
|
||||
private static List<ContentMatchSet> contentMatchers = new List<ContentMatchSet>
|
||||
{
|
||||
// SOFTWARE TERMINATED\nCONSOLE MAY HAVE BEEN MODIFIED\n CALL 1-888-780-7690
|
||||
new ContentMatchSet(new byte?[]
|
||||
{
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x4F, 0x46,
|
||||
0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x54, 0x45,
|
||||
0x52, 0x4D, 0x49, 0x4E, 0x41, 0x54, 0x45, 0x44,
|
||||
0x5C, 0x6E, 0x43, 0x4F, 0x4E, 0x53, 0x4F, 0x4C,
|
||||
0x45, 0x20, 0x4D, 0x41, 0x59, 0x20, 0x48, 0x41,
|
||||
0x56, 0x45, 0x20, 0x42, 0x45, 0x45, 0x4E, 0x20,
|
||||
0x4D, 0x4F, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x5C, 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43,
|
||||
0x41, 0x4C, 0x4C, 0x20, 0x31, 0x2D, 0x38, 0x38,
|
||||
0x38, 0x2D, 0x37, 0x38, 0x30, 0x2D, 0x37, 0x36,
|
||||
0x39, 0x30
|
||||
}, "PlayStation Anti-modchip (English)"),
|
||||
|
||||
// 強制終了しました。\n本体が改造されている\nおそれがあります。
|
||||
new ContentMatchSet(new byte?[]
|
||||
{
|
||||
0x5F, 0x37, 0x52, 0x36, 0x7D, 0x42, 0x4E, 0x86,
|
||||
0x30, 0x57, 0x30, 0x7E, 0x30, 0x57, 0x30, 0x5F,
|
||||
0x30, 0x02, 0x5C, 0x6E, 0x67, 0x2C, 0x4F, 0x53,
|
||||
0x30, 0x4C, 0x65, 0x39, 0x90, 0x20, 0x30, 0x55,
|
||||
0x30, 0x8C, 0x30, 0x66, 0x30, 0x44, 0x30, 0x8B,
|
||||
0x5C, 0x6E, 0x30, 0x4A, 0x30, 0x5D, 0x30, 0x8C,
|
||||
0x30, 0x4C, 0x30, 0x42, 0x30, 0x8A, 0x30, 0x7E,
|
||||
0x30, 0x59, 0x30, 0x02
|
||||
}, "PlayStation Anti-modchip (Japanese)"),
|
||||
};
|
||||
|
||||
// TODO: Figure out PSX binary header so this can be checked explicitly
|
||||
// TODO: Detect Red Hand protection
|
||||
/// <inheritdoc/>
|
||||
public string CheckContents(string file, byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
var matchers = new List<ContentMatchSet>
|
||||
{
|
||||
// SOFTWARE TERMINATED\nCONSOLE MAY HAVE BEEN MODIFIED\n CALL 1-888-780-7690
|
||||
new ContentMatchSet(new byte?[]
|
||||
{
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x4F, 0x46,
|
||||
0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x54, 0x45,
|
||||
0x52, 0x4D, 0x49, 0x4E, 0x41, 0x54, 0x45, 0x44,
|
||||
0x5C, 0x6E, 0x43, 0x4F, 0x4E, 0x53, 0x4F, 0x4C,
|
||||
0x45, 0x20, 0x4D, 0x41, 0x59, 0x20, 0x48, 0x41,
|
||||
0x56, 0x45, 0x20, 0x42, 0x45, 0x45, 0x4E, 0x20,
|
||||
0x4D, 0x4F, 0x44, 0x49, 0x46, 0x49, 0x45, 0x44,
|
||||
0x5C, 0x6E, 0x20, 0x20, 0x20, 0x20, 0x20, 0x43,
|
||||
0x41, 0x4C, 0x4C, 0x20, 0x31, 0x2D, 0x38, 0x38,
|
||||
0x38, 0x2D, 0x37, 0x38, 0x30, 0x2D, 0x37, 0x36,
|
||||
0x39, 0x30
|
||||
}, "PlayStation Anti-modchip (English)"),
|
||||
|
||||
// 強制終了しました。\n本体が改造されている\nおそれがあります。
|
||||
new ContentMatchSet(new byte?[]
|
||||
{
|
||||
0x5F, 0x37, 0x52, 0x36, 0x7D, 0x42, 0x4E, 0x86,
|
||||
0x30, 0x57, 0x30, 0x7E, 0x30, 0x57, 0x30, 0x5F,
|
||||
0x30, 0x02, 0x5C, 0x6E, 0x67, 0x2C, 0x4F, 0x53,
|
||||
0x30, 0x4C, 0x65, 0x39, 0x90, 0x20, 0x30, 0x55,
|
||||
0x30, 0x8C, 0x30, 0x66, 0x30, 0x44, 0x30, 0x8B,
|
||||
0x5C, 0x6E, 0x30, 0x4A, 0x30, 0x5D, 0x30, 0x8C,
|
||||
0x30, 0x4C, 0x30, 0x42, 0x30, 0x8A, 0x30, 0x7E,
|
||||
0x30, 0x59, 0x30, 0x02
|
||||
}, "PlayStation Anti-modchip (Japanese)"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition);
|
||||
return MatchUtil.GetFirstMatch(file, fileContent, contentMatchers, includePosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user