using System.Collections.Concurrent;
using System.Collections.Generic;
using BurnOutSharp.Matching;
namespace BurnOutSharp.ProtectionType
{
public class CopyKiller : IContentCheck, IPathCheck
{
///
public List GetContentMatchSets()
{
return new List
{
// Tom Commander
new ContentMatchSet(new byte?[]
{
0x54, 0x6F, 0x6D, 0x20, 0x43, 0x6F, 0x6D, 0x6D,
0x61, 0x6E, 0x64, 0x65, 0x72
}, "CopyKiller"),
};
}
///
public string CheckContents(string file, byte[] fileContent, bool includeDebug = false) => null;
///
public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable files)
{
// TODO: The following checks are overly broad and should be refined
var matchers = new List
{
//new PathMatchSet(new PathMatch("Autorun.dat", useEndsWith: true), "CopyKiller"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
}
///
public string CheckFilePath(string path)
{
// TODO: The following checks are overly broad and should be refined
var matchers = new List
{
//new PathMatchSet(new PathMatch("Autorun.dat", useEndsWith: true), "CopyKiller"),
};
return MatchUtil.GetFirstMatch(path, matchers, any: true);
}
}
}