mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-26 08:10:32 +00:00
Add yuPlay Launcher detection
This commit is contained in:
35
BinaryObjectScanner/Protection/YuPlay.cs
Normal file
35
BinaryObjectScanner/Protection/YuPlay.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Matching;
|
||||
using SabreTools.Matching.Paths;
|
||||
|
||||
namespace BinaryObjectScanner.Protection
|
||||
{
|
||||
/// <summary>
|
||||
/// yuPlay Launcher
|
||||
/// </summary>
|
||||
public class YuPlay : IPathCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public List<string> CheckDirectoryPath(string path, List<string>? files)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
new(new FilePathMatch("yuPlay.exe"), "yuPlay Launcher"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetAllMatches(files, matchers, any: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? CheckFilePath(string path)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
new(new FilePathMatch("yuPlay.exe"), "yuPlay Launcher"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user