Add Tivola Ring Protection detection (fixes #45)

This commit is contained in:
Matt Nadareski
2021-07-17 21:17:45 -07:00
parent 9e21c28e52
commit 2ae860e8ca

View File

@@ -0,0 +1,34 @@
using System.Collections.Generic;
using System.IO;
using BurnOutSharp.Matching;
namespace BurnOutSharp.ProtectionType
{
/// <remarks>
/// This protection needs far more research
/// </remarks>
public class TivolaRingProtection : IPathCheck
{
/// <inheritdoc/>
public List<string> CheckDirectoryPath(string path, IEnumerable<string> files)
{
var matchers = new List<PathMatchSet>
{
new PathMatchSet(Path.Combine("ZDAT", "webmast.dxx"), "Tivola Ring Protection"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
}
/// <inheritdoc/>
public string CheckFilePath(string path)
{
var matchers = new List<PathMatchSet>
{
new PathMatchSet(Path.Combine("ZDAT", "webmast.dxx"), "Tivola Ring Protection"),
};
return MatchUtil.GetFirstMatch(path, matchers, any: true);
}
}
}