Add Ubisoft Orbit detection (fixes #316)

This commit is contained in:
Matt Nadareski
2025-09-07 11:41:57 -04:00
parent 7b8c006f4d
commit e497540bdc
3 changed files with 42 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
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);
}
}
}

View File

@@ -6,7 +6,9 @@ using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
{
// Got renamed to Ubisoft Connect / Ubisoft Game Launcher
/// <summary>
/// Got renamed to Ubisoft Connect / Ubisoft Game Launcher
/// </summary>
public class Uplay : IExecutableCheck<PortableExecutable>, IPathCheck
{
/// <inheritdoc/>