mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-17 14:25:12 +00:00
Add Ubisoft Orbit detection (fixes #316)
This commit is contained in:
38
BinaryObjectScanner/Protection/UbisoftOrbit.cs
Normal file
38
BinaryObjectScanner/Protection/UbisoftOrbit.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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/>
|
||||
|
||||
Reference in New Issue
Block a user