mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-16 13:55:18 +00:00
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using BinaryObjectScanner.Interfaces;
|
|
using SabreTools.IO;
|
|
using SabreTools.IO.Matching;
|
|
|
|
namespace BinaryObjectScanner.Protection
|
|
{
|
|
/// <summary>
|
|
/// Ubitsoft Orbit (Online DRM)
|
|
/// </summary>
|
|
/// TODO: Investigate the DLLs to find more markers
|
|
public class UbisoftOrbit : IPathCheck
|
|
{
|
|
/// <inheritdoc/>
|
|
public List<string> CheckDirectoryPath(string path, List<string>? files)
|
|
{
|
|
var matchers = new List<PathMatchSet>
|
|
{
|
|
new(new FilePathMatch("GameOrbit.dll"), "Ubisoft Orbit"),
|
|
new(new FilePathMatch("ubiorbitapi_r2_loader.dll"), "Ubisoft Orbit"),
|
|
};
|
|
|
|
return MatchUtil.GetAllMatches(files, matchers, any: true);
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public string? CheckFilePath(string path)
|
|
{
|
|
var matchers = new List<PathMatchSet>
|
|
{
|
|
new(new FilePathMatch("GameOrbit.dll"), "Ubisoft Orbit"),
|
|
new(new FilePathMatch("ubiorbitapi_r2_loader.dll"), "Ubisoft Orbit"),
|
|
};
|
|
|
|
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
|
}
|
|
}
|
|
}
|