mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-04 05:35:49 +00:00
Add PE content checks for Uplay
This commit is contained in:
@@ -1,18 +1,59 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using BurnOutSharp.ExecutableType.Microsoft.PE;
|
||||
using BurnOutSharp.Matching;
|
||||
using BurnOutSharp.Tools;
|
||||
|
||||
namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class Uplay : IPathCheck
|
||||
// Got renamed to Ubisoft Connect / Ubisoft Game Launcher
|
||||
public class Uplay : IPEContentCheck, IPathCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string CheckPEContents(string file, byte[] fileContent, bool includeDebug, PortableExecutable pex)
|
||||
{
|
||||
// Get the sections from the executable, if possible
|
||||
var sections = pex?.SectionTable;
|
||||
if (sections == null)
|
||||
return null;
|
||||
|
||||
string name = Utilities.GetFileDescription(pex);
|
||||
if (!string.IsNullOrEmpty(name) && name.Contains("Ubisoft Connect Installer"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (!string.IsNullOrEmpty(name) && name.Contains("Ubisoft Connect Service"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (!string.IsNullOrEmpty(name) && name.Contains("Ubisoft Connect WebCore"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (!string.IsNullOrEmpty(name) && name.Contains("Ubisoft Crash Reporter"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (!string.IsNullOrEmpty(name) && name.Contains("Ubisoft Game Launcher"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (!string.IsNullOrEmpty(name) && name.Contains("Uplay launcher"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
|
||||
name = Utilities.GetProductName(pex);
|
||||
if (!string.IsNullOrEmpty(name) && name.Contains("Ubisoft Connect"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (!string.IsNullOrEmpty(name) && name.Contains("Uplay"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ConcurrentQueue<string> CheckDirectoryPath(string path, IEnumerable<string> files)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncherInstaller.exe", useEndsWith: true), "Uplay"),
|
||||
new PathMatchSet(new PathMatch("UplayInstaller.exe", useEndsWith: true), "Uplay"),
|
||||
new PathMatchSet(new PathMatch("UbisoftConnect.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncher.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncher64.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncherInstaller.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("Uplay.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayCrashReporter.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayInstaller.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayService.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayWebCore.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetAllMatches(files, matchers, any: true);
|
||||
@@ -23,8 +64,15 @@ namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncherInstaller.exe", useEndsWith: true), "Uplay"),
|
||||
new PathMatchSet(new PathMatch("UplayInstaller.exe", useEndsWith: true), "Uplay"),
|
||||
new PathMatchSet(new PathMatch("UbisoftConnect.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncher.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncher64.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UbisoftGameLauncherInstaller.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("Uplay.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayCrashReporter.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayInstaller.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayService.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
new PathMatchSet(new PathMatch("UplayWebCore.exe", useEndsWith: true), "Uplay / Ubisoft Connect"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
||||
|
||||
@@ -76,7 +76,7 @@ Below is a list of protections detected by BurnOutSharp. The two columns explain
|
||||
| TAGES | True | True | Partially unconfirmed² |
|
||||
| Tivola Ring Protection | False | True | |
|
||||
| TZCopyProtector | False | True | Unconfirmed¹ |
|
||||
| Uplay | False | True | |
|
||||
| Uplay | True | True | |
|
||||
| Winlock | False | True | Unconfirmed¹ |
|
||||
| WTM CD Protect | True | True | |
|
||||
| XCP | True | True | |
|
||||
|
||||
Reference in New Issue
Block a user