mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Whitespace and usings cleanup
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Serialization.Interfaces;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Serialization.Wrappers;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Matching;
|
||||
using SabreTools.Matching.Content;
|
||||
using SabreTools.Serialization.Wrappers;
|
||||
|
||||
namespace BinaryObjectScanner.Packer
|
||||
{
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace BinaryObjectScanner.Packer
|
||||
{
|
||||
// TODO: Confirm if both need to be present
|
||||
// TODO: Figure out how to get version
|
||||
|
||||
|
||||
if (exe.ContainsSection(".MPRESS1"))
|
||||
return "MPRESS";
|
||||
return "MPRESS";
|
||||
if (exe.ContainsSection(".MPRESS2"))
|
||||
return "MPRESS";
|
||||
return "MPRESS";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Packer
|
||||
return $"Microsoft CAB SFX {GetVersion(exe)}";
|
||||
|
||||
name = exe.OriginalFilename;
|
||||
|
||||
|
||||
if (name.OptionalEquals("WEXTRACT.EXE", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Microsoft CAB SFX {GetVersion(exe)}";
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BinaryObjectScanner.Packer
|
||||
return "7-Zip SFX";
|
||||
|
||||
name = exe.InternalName;
|
||||
|
||||
|
||||
if (name.OptionalEquals("7z.sfx"))
|
||||
return "7-Zip SFX";
|
||||
else if (name.OptionalEquals("7zS.sfx"))
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace BinaryObjectScanner.Protection
|
||||
// "EasyAntiCheat Service" -> "EasyAntiCheat.exe", which is found installed in "Program Files (x86)\EasyAntiCheat" and "EasyAntiCheat_Setup.exe" ("Intruder", Update 2287, Steam).
|
||||
|
||||
name = exe.ProductName;
|
||||
|
||||
|
||||
// Found in multiple files, including "VideoHorrorSociety.exe" ("Video Horror Society", Patch 1.0.70309, Steam) and "start_protected_game.exe" ("VRChat", Version 2022.2.2p2, Oculus).
|
||||
if (!string.IsNullOrEmpty(name) && name!.Contains("Easy Anti-Cheat Bootstrapper (EOS)"))
|
||||
return "Easy Anti-Cheat (EOS Version)";
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return $"EA DRM Protection {exe.GetInternalVersion()}";
|
||||
|
||||
name = exe.InternalName;
|
||||
|
||||
|
||||
if (name.OptionalEquals("CDCode", StringComparison.Ordinal))
|
||||
return $"EA CdKey Registration Module {exe.GetInternalVersion()}";
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace BinaryObjectScanner.Protection
|
||||
public string? CheckExecutable(string file, PortableExecutable exe, bool includeDebug)
|
||||
{
|
||||
string? name = exe.FileDescription;
|
||||
|
||||
|
||||
if (name.OptionalStartsWith("Games for Windows - LIVE Zero Day Piracy Protection", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Games for Windows LIVE - Zero Day Piracy Protection Module {exe.GetInternalVersion()}";
|
||||
else if (name.OptionalStartsWith("Games for Windows", StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return $"Impulse Reactor Core Module {exe.GetInternalVersion()}";
|
||||
|
||||
name = exe.OriginalFilename;
|
||||
|
||||
|
||||
if (name.OptionalContains("ReactorActivate.exe"))
|
||||
return $"Stardock Product Activation {exe.GetInternalVersion()}";
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@ namespace BinaryObjectScanner.Protection
|
||||
if (match != null)
|
||||
return $"PACE Anti-Piracy InterLok {GetVersion(match)}";
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private static string GetVersion(string match)
|
||||
{
|
||||
var versionMatch = Regex.Match(match, @"(?<=InterLok )(.*?)(?=,)");
|
||||
if (versionMatch.Success)
|
||||
return versionMatch.Value;
|
||||
|
||||
|
||||
return "(Unknown Version - Please report to us on GitHub)";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in Redump entries 9617 and 49552.
|
||||
or "1.35.000"
|
||||
|
||||
|
||||
// Found in Redump entries 2595 and 30121.
|
||||
or "1.40.004"
|
||||
|
||||
@@ -739,7 +739,7 @@ namespace BinaryObjectScanner.Protection
|
||||
// RealNetworks presumably acquired SafeDisc when they purchased Trymedia from Macrovision (https://realnetworks.com/press/releases/2008/realnetworks-acquire-trymedia-macrovision).
|
||||
// Due to this being the only known sample, it may be that they did a trial run of a new version of SafeDisc, before deciding against continuing its development.
|
||||
or "4.91.000"
|
||||
|
||||
|
||||
=> "SafeDisc",
|
||||
|
||||
// SafeDisc (Unconfirmed)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return $"MediaMax CD-3";
|
||||
|
||||
name = exe.ProductName;
|
||||
|
||||
|
||||
if (name.OptionalStartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaMax CD-3";
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BinaryObjectScanner.Protection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return protections;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BinaryObjectScanner.Protection
|
||||
// These checks are less reliable, as they are still found in a version of the game that appears to have patched out Roxxe (the version present in IA item "original-war").
|
||||
if (strs.Exists(s => s.Contains("PRRT01")))
|
||||
return "Roxxe (Possibly remnants)";
|
||||
|
||||
|
||||
if (strs.Exists(s => s.Contains("CommonPRRT")))
|
||||
return "Roxxe (Possibly remnants)";
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return $"TAGES Activation Client {GetVersion(exe)}";
|
||||
|
||||
name = exe.ProductName;
|
||||
|
||||
|
||||
if (name.OptionalStartsWith("Application TagesSetup", StringComparison.OrdinalIgnoreCase))
|
||||
return $"TAGES Driver Setup {GetVersion(exe)}";
|
||||
else if (name.OptionalStartsWith("T@GES", StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name.OptionalContains("Uplay launcher"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
|
||||
|
||||
name = exe.ProductName;
|
||||
|
||||
// There's also a variant that looks like "Uplay <version> installer"
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return "WTM Protection Viewer";
|
||||
|
||||
name = exe.ProductName;
|
||||
|
||||
|
||||
if (name.OptionalContains("WTM Copy Protection Viewer"))
|
||||
return "WTM Protection Viewer";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user