mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-24 07:03:09 +00:00
28 lines
1003 B
C#
28 lines
1003 B
C#
using System.Collections.Generic;
|
|
using BinaryObjectScanner.Interfaces;
|
|
using SabreTools.Matching;
|
|
using SabreTools.Matching.Content;
|
|
|
|
namespace BinaryObjectScanner.Protection
|
|
{
|
|
public class CactusDataShield : IContentCheck
|
|
{
|
|
/// <inheritdoc/>
|
|
public string? CheckContents(string file, byte[] fileContent, bool includeDebug)
|
|
{
|
|
// TODO: Limit these checks to Mac binaries
|
|
// TODO: Obtain a sample to find where this string is in a typical executable
|
|
var contentMatchSets = new List<ContentMatchSet>
|
|
{
|
|
// CDSPlayer
|
|
new(new byte[] { 0x43, 0x44, 0x53, 0x50, 0x6C, 0x61, 0x79, 0x65, 0x72 }, "Cactus Data Shield 200"),
|
|
|
|
// yucca.cds
|
|
new(new byte[] { 0x79, 0x75, 0x63, 0x63, 0x61, 0x2E, 0x63, 0x64, 0x73 }, "Cactus Data Shield 200"),
|
|
};
|
|
|
|
return MatchUtil.GetFirstMatch(file, fileContent, contentMatchSets, includeDebug);
|
|
}
|
|
}
|
|
}
|