mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-23 15:24:45 +00:00
Add Tivola Ring Protection detection (fixes #45)
This commit is contained in:
34
BurnOutSharp/ProtectionType/TivolaRingProtection.cs
Normal file
34
BurnOutSharp/ProtectionType/TivolaRingProtection.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user