Files

36 lines
1.1 KiB
C#
Raw Permalink Normal View History

using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
2023-03-07 16:59:14 -05:00
using BinaryObjectScanner.Matching;
namespace BinaryObjectScanner.Protection
{
// All current known info: https://web.archive.org/web/20190601101221mp_/https://fileforums.com/showthread.php?t=91941
2021-02-26 00:32:09 -08:00
public class Zzxzz : IPathCheck
{
2021-02-26 00:32:09 -08:00
/// <inheritdoc/>
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string> files)
{
var matchers = new List<PathMatchSet>
{
new PathMatchSet(Path.Combine(path, "Zzxzz", "Zzz.aze").Replace("\\", "/"), "Zzxzz"),
new PathMatchSet($"Zzxzz/", "Zzxzz"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
2021-03-19 15:41:49 -07:00
}
/// <inheritdoc/>
public string CheckFilePath(string path)
{
var matchers = new List<PathMatchSet>
{
new PathMatchSet(new PathMatch("Zzz.aze", useEndsWith: true), "Zzxzz"),
};
return MatchUtil.GetFirstMatch(path, matchers, any: true);
}
}
}