mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-15 10:42:40 +00:00
Add and use new nullable string extensions
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test
|
||||
{
|
||||
public class EnumerableExtensionsTests
|
||||
{
|
||||
[Fact]
|
||||
public void IterateWithAction_EmptyEnumerable_Success()
|
||||
{
|
||||
List<string> set = new List<string>();
|
||||
Action<string> action = (s) => s.ToLowerInvariant();
|
||||
|
||||
set.IterateWithAction(action);
|
||||
Assert.Empty(set);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IterateWithAction_EmptyAction_Success()
|
||||
{
|
||||
List<string> set = ["a", "b", "c"];
|
||||
Action<string> action = (s) => { };
|
||||
|
||||
set.IterateWithAction(action);
|
||||
Assert.Equal(3, set.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IterateWithAction_Valid_Success()
|
||||
{
|
||||
List<string> set = ["a", "b", "c"];
|
||||
List<string> actual = new List<string>();
|
||||
|
||||
Action<string> action = (s) =>
|
||||
{
|
||||
lock (actual)
|
||||
{
|
||||
actual.Add(s.ToUpperInvariant());
|
||||
}
|
||||
};
|
||||
|
||||
set.IterateWithAction(action);
|
||||
Assert.Equal(3, set.Count);
|
||||
Assert.Equal(3, actual.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
304
BinaryObjectScanner.Test/ExtensionsTests.cs
Normal file
304
BinaryObjectScanner.Test/ExtensionsTests.cs
Normal file
@@ -0,0 +1,304 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Xunit;
|
||||
|
||||
namespace BinaryObjectScanner.Test
|
||||
{
|
||||
public class ExtensionsTests
|
||||
{
|
||||
#region IterateWithAction
|
||||
|
||||
[Fact]
|
||||
public void IterateWithAction_EmptyEnumerable_Success()
|
||||
{
|
||||
List<string> set = new List<string>();
|
||||
Action<string> action = (s) => s.ToLowerInvariant();
|
||||
|
||||
set.IterateWithAction(action);
|
||||
Assert.Empty(set);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IterateWithAction_EmptyAction_Success()
|
||||
{
|
||||
List<string> set = ["a", "b", "c"];
|
||||
Action<string> action = (s) => { };
|
||||
|
||||
set.IterateWithAction(action);
|
||||
Assert.Equal(3, set.Count);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IterateWithAction_Valid_Success()
|
||||
{
|
||||
List<string> set = ["a", "b", "c"];
|
||||
List<string> actual = new List<string>();
|
||||
|
||||
Action<string> action = (s) =>
|
||||
{
|
||||
lock (actual)
|
||||
{
|
||||
actual.Add(s.ToUpperInvariant());
|
||||
}
|
||||
};
|
||||
|
||||
set.IterateWithAction(action);
|
||||
Assert.Equal(3, set.Count);
|
||||
Assert.Equal(3, actual.Count);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OptionalContains
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_NullStringNoComparison_False()
|
||||
{
|
||||
string? str = null;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_NullStringComparison_False()
|
||||
{
|
||||
string? str = null;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_EmptyStringNoComparison_False()
|
||||
{
|
||||
string? str = string.Empty;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_EmptyStringComparison_False()
|
||||
{
|
||||
string? str = string.Empty;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_NoMatchNoComparison_False()
|
||||
{
|
||||
string? str = "postfix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_NoMatchComparison_False()
|
||||
{
|
||||
string? str = "postfix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_MatchesNoComparison_True()
|
||||
{
|
||||
string? str = "prefix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix);
|
||||
Assert.True(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalContains_MatchesComparison_True()
|
||||
{
|
||||
string? str = "prefix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalContains(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.True(actual);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OptionalEquals
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_NullStringNoComparison_False()
|
||||
{
|
||||
string? str = null;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_NullStringComparison_False()
|
||||
{
|
||||
string? str = null;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_EmptyStringNoComparison_False()
|
||||
{
|
||||
string? str = string.Empty;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_EmptyStringComparison_False()
|
||||
{
|
||||
string? str = string.Empty;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_NoMatchNoComparison_False()
|
||||
{
|
||||
string? str = "postfix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_NoMatchComparison_False()
|
||||
{
|
||||
string? str = "postfix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_MatchesNoComparison_True()
|
||||
{
|
||||
string? str = "prefix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix);
|
||||
Assert.True(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalEquals_MatchesComparison_True()
|
||||
{
|
||||
string? str = "prefix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalEquals(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.True(actual);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region OptionalStartsWith
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_NullStringNoComparison_False()
|
||||
{
|
||||
string? str = null;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_NullStringComparison_False()
|
||||
{
|
||||
string? str = null;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_EmptyStringNoComparison_False()
|
||||
{
|
||||
string? str = string.Empty;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_EmptyStringComparison_False()
|
||||
{
|
||||
string? str = string.Empty;
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_NoMatchNoComparison_False()
|
||||
{
|
||||
string? str = "postfix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_NoMatchComparison_False()
|
||||
{
|
||||
string? str = "postfix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.False(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_MatchesNoComparison_True()
|
||||
{
|
||||
string? str = "prefix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix);
|
||||
Assert.True(actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OptionalStartsWith_MatchesComparison_True()
|
||||
{
|
||||
string? str = "prefix";
|
||||
string prefix = "prefix";
|
||||
|
||||
bool actual = str.OptionalStartsWith(prefix, StringComparison.OrdinalIgnoreCase);
|
||||
Assert.True(actual);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BinaryObjectScanner
|
||||
{
|
||||
internal static class EnumerableExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrap iterating through an enumerable with an action
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// .NET Frameworks 2.0 and 3.5 process in series.
|
||||
/// .NET Frameworks 4.0 onward process in parallel.
|
||||
/// </remarks>
|
||||
public static void IterateWithAction<T>(this IEnumerable<T> source, Action<T> action)
|
||||
{
|
||||
#if NET20 || NET35
|
||||
foreach (var item in source)
|
||||
{
|
||||
action(item);
|
||||
}
|
||||
#else
|
||||
System.Threading.Tasks.Parallel.ForEach(source, action);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
70
BinaryObjectScanner/Extensions.cs
Normal file
70
BinaryObjectScanner/Extensions.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BinaryObjectScanner
|
||||
{
|
||||
internal static class Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrap iterating through an enumerable with an action
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// .NET Frameworks 2.0 and 3.5 process in series.
|
||||
/// .NET Frameworks 4.0 onward process in parallel.
|
||||
/// </remarks>
|
||||
public static void IterateWithAction<T>(this IEnumerable<T> source, Action<T> action)
|
||||
{
|
||||
#if NET20 || NET35
|
||||
foreach (var item in source)
|
||||
{
|
||||
action(item);
|
||||
}
|
||||
#else
|
||||
System.Threading.Tasks.Parallel.ForEach(source, action);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="string.Contains(string)"/>
|
||||
public static bool OptionalContains(this string? self, string value)
|
||||
=> OptionalContains(self, value, StringComparison.Ordinal);
|
||||
|
||||
/// <inheritdoc cref="string.Contains(string, StringComparison)"/>
|
||||
public static bool OptionalContains(this string? self, string value, StringComparison comparisonType)
|
||||
{
|
||||
if (self == null)
|
||||
return false;
|
||||
|
||||
#if NETFRAMEWORK
|
||||
return self.Contains(value);
|
||||
#else
|
||||
return self.Contains(value, comparisonType);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="string.Equals(string)"/>
|
||||
public static bool OptionalEquals(this string? self, string value)
|
||||
=> OptionalEquals(self, value, StringComparison.Ordinal);
|
||||
|
||||
/// <inheritdoc cref="string.Equals(string, StringComparison)"/>
|
||||
public static bool OptionalEquals(this string? self, string value, StringComparison comparisonType)
|
||||
{
|
||||
if (self == null)
|
||||
return false;
|
||||
|
||||
return self.Equals(value, comparisonType);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="string.StartsWith(string)"/>
|
||||
public static bool OptionalStartsWith(this string? self, string value)
|
||||
=> OptionalStartsWith(self, value, StringComparison.Ordinal);
|
||||
|
||||
/// <inheritdoc cref="string.StartsWith(string, StringComparison)"/>
|
||||
public static bool OptionalStartsWith(this string? self, string value, StringComparison comparisonType)
|
||||
{
|
||||
if (self == null)
|
||||
return false;
|
||||
|
||||
return self.StartsWith(value, comparisonType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Matching;
|
||||
using SabreTools.Matching.Content;
|
||||
@@ -22,28 +21,23 @@ namespace BinaryObjectScanner.Packer
|
||||
if (pex.ContainsSection(".aspack", exact: true))
|
||||
return "ASPack 2.29";
|
||||
|
||||
// TODO: Re-enable all Entry Point checks after implementing
|
||||
// Use the entry point data, if it exists
|
||||
// if (pex.EntryPointRaw != null)
|
||||
// {
|
||||
// var matchers = GenerateMatchers();
|
||||
// var match = MatchUtil.GetFirstMatch(file, pex.EntryPointRaw, matchers, includeDebug);
|
||||
// if (!string.IsNullOrEmpty(match))
|
||||
// return match;
|
||||
// }
|
||||
if (pex.EntryPointData != null)
|
||||
{
|
||||
var matchers = GenerateMatchers();
|
||||
var match = MatchUtil.GetFirstMatch(file, pex.EntryPointData, matchers, includeDebug);
|
||||
if (!string.IsNullOrEmpty(match))
|
||||
return match;
|
||||
}
|
||||
|
||||
// Get the .adata* section, if it exists
|
||||
var adataSection = pex.GetFirstSection(".adata", exact: false);
|
||||
if (adataSection?.Name != null)
|
||||
var adataSectionRaw = pex.GetFirstSectionData(".adata", exact: false);
|
||||
if (adataSectionRaw != null)
|
||||
{
|
||||
var adataSectionRaw = pex.GetFirstSectionData(Encoding.UTF8.GetString(adataSection.Name));
|
||||
if (adataSectionRaw != null)
|
||||
{
|
||||
var matchers = GenerateMatchers();
|
||||
var match = MatchUtil.GetFirstMatch(file, adataSectionRaw, matchers, includeDebug);
|
||||
if (!string.IsNullOrEmpty(match))
|
||||
return match;
|
||||
}
|
||||
var matchers = GenerateMatchers();
|
||||
var match = MatchUtil.GetFirstMatch(file, adataSectionRaw, matchers, includeDebug);
|
||||
if (!string.IsNullOrEmpty(match))
|
||||
return match;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -19,15 +19,13 @@ namespace BinaryObjectScanner.Packer
|
||||
|
||||
// Known to detect versions 5.0.0.3 - 8.1.0.0
|
||||
var name = pex.ProductName;
|
||||
if (name?.StartsWith("AutoPlay Media Studio", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("AutoPlay Media Studio", StringComparison.OrdinalIgnoreCase))
|
||||
return $"AutoPlay Media Studio {GetVersion(pex)}";
|
||||
|
||||
// Currently too vague, may be re-enabled in the future
|
||||
/*
|
||||
name = Utilities.GetLegalCopyright(pex);
|
||||
if (name?.StartsWith("Runtime Engine", StringComparison.OrdinalIgnoreCase) == true)
|
||||
return $"AutoPlay Media Studio {GetVersion(pex)}";
|
||||
*/
|
||||
// TODO: Currently too vague, may be re-enabled in the future
|
||||
// name = Utilities.GetLegalCopyright(pex);
|
||||
// if (name.OptionalStartsWith("Runtime Engine", StringComparison.OrdinalIgnoreCase))
|
||||
// return $"AutoPlay Media Studio {GetVersion(pex)}";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace BinaryObjectScanner.Packer
|
||||
return null;
|
||||
|
||||
var name= pex.FileDescription;
|
||||
if (name?.StartsWith("InstallAnywhere Self Extractor", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("InstallAnywhere Self Extractor", StringComparison.OrdinalIgnoreCase))
|
||||
return $"InstallAnywhere {GetVersion(pex)}";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("InstallAnywhere", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("InstallAnywhere", StringComparison.OrdinalIgnoreCase))
|
||||
return $"InstallAnywhere {GetVersion(pex)}";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -16,15 +16,15 @@ namespace BinaryObjectScanner.Packer
|
||||
return null;
|
||||
|
||||
var name= pex.FileDescription;
|
||||
if (name?.Equals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase) == true
|
||||
|| name?.Equals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase)
|
||||
|| name.OptionalEquals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return $"Intel Installation Framework {pex.GetInternalVersion()}";
|
||||
}
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase) == true
|
||||
|| name?.Equals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Intel(R) Installation Framework", StringComparison.OrdinalIgnoreCase)
|
||||
|| name.OptionalEquals("Intel Installation Framework", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return $"Intel Installation Framework {pex.GetInternalVersion()}";
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace BinaryObjectScanner.Packer
|
||||
return null;
|
||||
|
||||
var name= pex.InternalName;
|
||||
if (name?.Equals("Wextract", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Wextract", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Microsoft CAB SFX {GetVersion(pex)}";
|
||||
|
||||
name = pex.OriginalFilename;
|
||||
if (name?.Equals("WEXTRACT.EXE", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("WEXTRACT.EXE", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Microsoft CAB SFX {GetVersion(pex)}";
|
||||
|
||||
// Get the .data/DATA section strings, if they exist
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace BinaryObjectScanner.Packer
|
||||
return null;
|
||||
|
||||
var name = pex.AssemblyDescription;
|
||||
if (name?.StartsWith("Nullsoft Install System") == true)
|
||||
return $"NSIS {name.Substring("Nullsoft Install System".Length).Trim()}";
|
||||
if (name.OptionalStartsWith("Nullsoft Install System"))
|
||||
return $"NSIS {name!.Substring("Nullsoft Install System".Length).Trim()}";
|
||||
|
||||
// Get the .data/DATA section strings, if they exist
|
||||
var strs = pex.GetFirstSectionStrings(".data") ?? pex.GetFirstSectionStrings("DATA");
|
||||
|
||||
@@ -19,16 +19,16 @@ namespace BinaryObjectScanner.Packer
|
||||
|
||||
// Known to detect versions 7.0.5.1 - 9.1.0.0
|
||||
var name = pex.LegalCopyright;
|
||||
if (name?.StartsWith("Setup Engine", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Setup Engine", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Setup Factory {GetVersion(pex)}";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("Setup Factory", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Setup Factory", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Setup Factory {GetVersion(pex)}";
|
||||
|
||||
// Known to detect version 5.0.1 - 6.0.1.3
|
||||
name = pex.FileDescription;
|
||||
if (name?.StartsWith("Setup Factory", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Setup Factory", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Setup Factory {GetVersion(pex)}";
|
||||
|
||||
// Longer version of the check that can be used if false positves become an issue:
|
||||
|
||||
@@ -14,25 +14,25 @@ namespace BinaryObjectScanner.Packer
|
||||
return null;
|
||||
|
||||
// Get the assembly description, if possible
|
||||
if (pex.AssemblyDescription?.StartsWith("7-Zip Self-extracting Archive") == true)
|
||||
return $"7-Zip SFX {pex.AssemblyDescription.Substring("7-Zip Self-extracting Archive ".Length)}";
|
||||
if (pex.AssemblyDescription.OptionalStartsWith("7-Zip Self-extracting Archive"))
|
||||
return $"7-Zip SFX {pex.AssemblyDescription!.Substring("7-Zip Self-extracting Archive ".Length)}";
|
||||
|
||||
// Get the file description, if it exists
|
||||
if (pex.FileDescription?.Equals("7z SFX") == true)
|
||||
if (pex.FileDescription.OptionalEquals("7z SFX"))
|
||||
return "7-Zip SFX";
|
||||
if (pex.FileDescription?.Equals("7z Self-Extract Setup") == true)
|
||||
if (pex.FileDescription.OptionalEquals("7z Self-Extract Setup"))
|
||||
return "7-Zip SFX";
|
||||
|
||||
// Get the original filename, if it exists
|
||||
if (pex.OriginalFilename?.Equals("7z.sfx.exe") == true)
|
||||
if (pex.OriginalFilename.OptionalEquals("7z.sfx.exe"))
|
||||
return "7-Zip SFX";
|
||||
else if (pex.OriginalFilename?.Equals("7zS.sfx") == true)
|
||||
else if (pex.OriginalFilename.OptionalEquals("7zS.sfx"))
|
||||
return "7-Zip SFX";
|
||||
|
||||
// Get the internal name, if it exists
|
||||
if (pex.InternalName?.Equals("7z.sfx") == true)
|
||||
if (pex.InternalName.OptionalEquals("7z.sfx"))
|
||||
return "7-Zip SFX";
|
||||
else if (pex.InternalName?.Equals("7zS.sfx") == true)
|
||||
else if (pex.InternalName.OptionalEquals("7zS.sfx"))
|
||||
return "7-Zip SFX";
|
||||
|
||||
// If any dialog boxes match
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace BinaryObjectScanner.Packer
|
||||
return null;
|
||||
|
||||
var name = pex.AssemblyDescription;
|
||||
if (name?.Contains("WinRAR archiver") == true)
|
||||
if (name.OptionalContains("WinRAR archiver"))
|
||||
return "WinRAR SFX";
|
||||
|
||||
if (pex.FindDialogByTitle("WinRAR self-extracting archive").Count > 0)
|
||||
|
||||
@@ -49,27 +49,27 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "LineRider2.exe" in Redump entry 6236
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Equals("ByteShield Client") == true)
|
||||
if (name.OptionalEquals("ByteShield Client"))
|
||||
return $"ByteShield Activation Client {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "LineRider2.exe" in Redump entry 6236
|
||||
name = pex.InternalName;
|
||||
if (name?.Equals("ByteShield") == true)
|
||||
if (name.OptionalEquals("ByteShield"))
|
||||
return $"ByteShield Activation Client {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "LineRider2.exe" in Redump entry 6236
|
||||
name = pex.OriginalFilename;
|
||||
if (name?.Equals("ByteShield.EXE") == true)
|
||||
if (name.OptionalEquals("ByteShield.EXE"))
|
||||
return $"ByteShield Activation Client {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "LineRider2.exe" in Redump entry 6236
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("ByteShield Client") == true)
|
||||
if (name.OptionalEquals("ByteShield Client"))
|
||||
return $"ByteShield Activation Client {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "ByteShield.dll" in Redump entry 6236
|
||||
name = pex.Model.ExportTable?.ExportDirectoryTable?.Name;
|
||||
if (name?.Equals("ByteShield Client") == true)
|
||||
if (name.OptionalEquals("ByteShield Client"))
|
||||
return "ByteShield Component Module";
|
||||
|
||||
// Found in "LineRider2.exe" in Redump entry 6236
|
||||
@@ -91,7 +91,7 @@ namespace BinaryObjectScanner.Protection
|
||||
if (strs != null)
|
||||
{
|
||||
// Found in "LineRider2.exe" in Redump entry 6236
|
||||
if (strs.Exists(s => s?.Contains("ByteShield") == true))
|
||||
if (strs.Exists(s => s.OptionalContains("ByteShield")))
|
||||
return "ByteShield";
|
||||
}
|
||||
|
||||
@@ -100,15 +100,15 @@ namespace BinaryObjectScanner.Protection
|
||||
if (strs != null)
|
||||
{
|
||||
// Found in "ByteShield.dll" in Redump entry 6236
|
||||
if (strs.Exists(s => s?.Contains("Byte|Shield") == true))
|
||||
if (strs.Exists(s => s.OptionalContains("Byte|Shield")))
|
||||
return "ByteShield Component Module";
|
||||
|
||||
// Found in "ByteShield.dll" in Redump entry 6236
|
||||
else if (strs.Exists(s => s?.Contains("Byteshield0") == true))
|
||||
else if (strs.Exists(s => s.OptionalContains("Byteshield0")))
|
||||
return "ByteShield Component Module";
|
||||
|
||||
// Found in "ByteShield.dll" in Redump entry 6236
|
||||
else if (strs.Exists(s => s?.Contains("ByteShieldLoader") == true))
|
||||
else if (strs.Exists(s => s.OptionalContains("ByteShieldLoader")))
|
||||
return "ByteShield Component Module";
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace BinaryObjectScanner.Protection
|
||||
{
|
||||
// TODO: Figure out if this specifically indicates if the file is encrypted
|
||||
// Found in "LineRider2.bbz" in Redump entry 6236
|
||||
if (strs.Exists(s => s?.Contains("ByteShield") == true))
|
||||
if (strs.Exists(s => s.OptionalContains("ByteShield")))
|
||||
return "ByteShield";
|
||||
}
|
||||
|
||||
|
||||
@@ -14,17 +14,17 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.Comments;
|
||||
if (name?.Contains("CDCheck utlity for Microsoft Game Studios") == true)
|
||||
if (name.OptionalContains("CDCheck utlity for Microsoft Game Studios"))
|
||||
return "Microsoft Game Studios CD Check";
|
||||
|
||||
// To broad to be of use
|
||||
//name = pex.InternalName;
|
||||
//if (name?.Contains("CDCheck") == true)
|
||||
//if (name.OptionalContains("CDCheck"))
|
||||
// return "Microsoft Game Studios CD Check";
|
||||
|
||||
// To broad to be of use
|
||||
//name = pex.OriginalFilename;
|
||||
//if (name?.Contains("CDCheck.exe") == true)
|
||||
//if (name.OptionalContains("CDCheck.exe"))
|
||||
// return "Microsoft Game Studios CD Check";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace BinaryObjectScanner.Protection
|
||||
if (pex.Model.ExportTable?.ExportDirectoryTable != null)
|
||||
{
|
||||
// Found in "cdguard.dll" in Redump entry 97142 and IA item "pahgeby-he3hakomkou".
|
||||
bool match = pex.Model.ExportTable.ExportDirectoryTable.Name?.Equals("cdguard.dll", StringComparison.OrdinalIgnoreCase) == true;
|
||||
bool match = pex.Model.ExportTable.ExportDirectoryTable.Name.OptionalEquals("cdguard.dll", StringComparison.OrdinalIgnoreCase);
|
||||
if (match)
|
||||
return "CD-Guard Copy Protection System";
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.InternalName;
|
||||
if (name?.Equals("CDKey", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("CDKey", StringComparison.OrdinalIgnoreCase))
|
||||
return "CD-Key / Serial";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BinaryObjectScanner.Protection
|
||||
if (pex.Model.ExportTable?.ExportDirectoryTable != null)
|
||||
{
|
||||
// Found in "cenega.dll" in IA item "speed-pack".
|
||||
bool match = pex.Model.ExportTable.ExportDirectoryTable.Name?.Equals("ProtectDVD.dll", StringComparison.OrdinalIgnoreCase) == true;
|
||||
bool match = pex.Model.ExportTable.ExportDirectoryTable.Name.OptionalEquals("ProtectDVD.dll", StringComparison.OrdinalIgnoreCase);
|
||||
if (match)
|
||||
return "Cenega ProtectDVD";
|
||||
}
|
||||
|
||||
@@ -32,29 +32,29 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "AbeWincw.dll" in Redump entry 116358 and in "TOYSGMcw.dll" in the "TOYSTORY" installation folder from Redump entry 12354.
|
||||
var name = pex.ProductName;
|
||||
if (name?.Equals("ChannelWare Utilities") == true)
|
||||
if (name.OptionalEquals("ChannelWare Utilities"))
|
||||
return "Channelware";
|
||||
|
||||
// Found in "cwbrowse.exe" in the "Channelware" folder installed from Redump entry 12354.
|
||||
if (name?.Equals("Channelware Browser Launcher") == true)
|
||||
if (name.OptionalEquals("Channelware Browser Launcher"))
|
||||
return "Channelware";
|
||||
|
||||
// Found in "cwuninst.exe" in the "Channelware" folder installed from Redump entry 12354.
|
||||
if (name?.Equals("Channelware Launcher Uninstall Application") == true)
|
||||
if (name.OptionalEquals("Channelware Launcher Uninstall Application"))
|
||||
return "Channelware";
|
||||
|
||||
// Found in "cwbrowse.exe" in the "Channelware\CWBrowse" folder installed from Redump entry 116358.
|
||||
if (name?.Equals("Channelware Authorization Server Browser Launcher") == true)
|
||||
if (name.OptionalEquals("Channelware Authorization Server Browser Launcher"))
|
||||
return "Channelware";
|
||||
|
||||
name = pex.FileDescription;
|
||||
// Found in "cwuninst.exe" in the "Channelware" folder installed from Redump entry 12354.
|
||||
if (name?.Equals("Channelware Launcher Uninstall") == true)
|
||||
if (name.OptionalEquals("Channelware Launcher Uninstall"))
|
||||
return "Channelware";
|
||||
|
||||
name = pex.LegalTrademarks;
|
||||
// Found in "CWAuto.dll" and "Upgrader.exe" in the "TOYSTORY" installation folder from Redump entry 12354.
|
||||
if (name?.Equals("Channelware") == true)
|
||||
if (name.OptionalEquals("Channelware"))
|
||||
return "Channelware";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BinaryObjectScanner.Protection
|
||||
// Found in "Code-Lock.ocx" in Code-Lock version 2.35.
|
||||
// Also worth noting is the File Description for this file, which is "A future for you, a challenge for the rest.".
|
||||
var name = pex.ProductName;
|
||||
if (name?.StartsWith("Code-Lock", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Code-Lock", StringComparison.OrdinalIgnoreCase))
|
||||
return $"ChosenBytes Code-Lock {pex.ProductVersion}";
|
||||
|
||||
// Get the .text section strings, if they exist
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace BinaryObjectScanner.Protection
|
||||
// TODO: Figure out why this check doesn't work.
|
||||
// Found in "autorun.exe" in CopyKiller V3.64, V3.99, and V3.99a.
|
||||
var name = pex.ProductName;
|
||||
if (name?.StartsWith("CopyKiller", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("CopyKiller", StringComparison.OrdinalIgnoreCase))
|
||||
return "CopyKiller V3.64+";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -45,22 +45,22 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in 'cki32k.dll'
|
||||
var name = pex.CompanyName;
|
||||
if (name?.StartsWith("CrypKey") == true)
|
||||
if (name.OptionalStartsWith("CrypKey"))
|
||||
return $"CrypKey {version}".TrimEnd();
|
||||
|
||||
|
||||
name = pex.FileDescription;
|
||||
|
||||
// Found in "CKSEC_32.DLL" in IA item "NBECRORV11".
|
||||
if (name?.StartsWith("CrypKey Instant security library") == true)
|
||||
if (name.OptionalStartsWith("CrypKey Instant security library"))
|
||||
return $"CrypKey Instant {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in 'cki32k.dll'
|
||||
if (name?.StartsWith("CrypKey") == true)
|
||||
if (name.OptionalStartsWith("CrypKey"))
|
||||
return $"CrypKey {version}".TrimEnd();
|
||||
|
||||
// Found in 'cki32k.dll'
|
||||
name = pex.LegalCopyright;
|
||||
if (name?.Contains("CrypKey") == true)
|
||||
if (name.OptionalContains("CrypKey"))
|
||||
return $"CrypKey {version}".TrimEnd();
|
||||
|
||||
// Found in 'cki32k.dll'
|
||||
|
||||
@@ -43,23 +43,23 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "denuvo-anti-cheat.sys".
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Equals("Denuvo Anti-Cheat Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Denuvo Anti-Cheat Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Denuvo Anti-Cheat";
|
||||
|
||||
// Found in "denuvo-anti-cheat-update-service.exe"/"Denuvo Anti-Cheat Installer.exe".
|
||||
if (name?.Equals("Denuvo Anti-Cheat Update Service", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Denuvo Anti-Cheat Update Service", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Denuvo Anti-Cheat";
|
||||
|
||||
// Found in "denuvo-anti-cheat-update-service-launcher.dll".
|
||||
if (name?.Equals("Denuvo Anti-Cheat Update Service Launcher", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Denuvo Anti-Cheat Update Service Launcher", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Denuvo Anti-Cheat";
|
||||
|
||||
// Found in "denuvo-anti-cheat-runtime.dll".
|
||||
if (name?.Equals("Denuvo Anti-Cheat Runtime", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Denuvo Anti-Cheat Runtime", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Denuvo Anti-Cheat";
|
||||
|
||||
// Found in "denuvo-anti-cheat-crash-report.exe".
|
||||
if (name?.Equals("Denuvo Anti-Cheat Crash Report Tool", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Denuvo Anti-Cheat Crash Report Tool", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Denuvo Anti-Cheat";
|
||||
|
||||
// Data sourced from:
|
||||
|
||||
@@ -35,17 +35,17 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "Start.exe" in IA item "Nova_DellBigWIGDVD_USA"/Redump entry 108588.
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Equals("DigiGuard3 Client") == true)
|
||||
if (name.OptionalEquals("DigiGuard3 Client"))
|
||||
return $"DigiGuard3";
|
||||
|
||||
// Found in "Start.exe" in IA item "Nova_DellBigWIGDVD_USA"/Redump entry 108588.
|
||||
name = pex.LegalTrademarks;
|
||||
if (name?.Equals("DigiGuard") == true)
|
||||
if (name.OptionalEquals("DigiGuard"))
|
||||
return $"DigiGuard";
|
||||
|
||||
// Found in "PJS3.exe" in IA item "Nova_DellBigWIGDVD_USA"/Redump entry 108588.
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("Greenleaf Wrapper3") == true)
|
||||
if (name.OptionalEquals("Greenleaf Wrapper3"))
|
||||
return $"DigiGuard";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -47,21 +47,21 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "IOSLinksys.dll" (Redump entries 31914, 46743, 46961, 79284, and 79374).
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("IOSLinkNT", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("IOSLinkNT", StringComparison.OrdinalIgnoreCase))
|
||||
return "DiscGuard";
|
||||
|
||||
// Found in "T29.dll" (Redump entry 31914).
|
||||
if (name?.StartsWith("TTR Technologies DiscGuard (tm)", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("TTR Technologies DiscGuard (tm)", StringComparison.OrdinalIgnoreCase))
|
||||
return $"DiscGuard {GetVersion(pex)}";
|
||||
|
||||
// Found in "T29.dll" (Redump entry 31914).
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("DiscGuard (tm)", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("DiscGuard (tm)", StringComparison.OrdinalIgnoreCase))
|
||||
return "DiscGuard";
|
||||
|
||||
// Found in "IOSLinksys.dll" (Redump entries 31914, 46743, 46961, 79284, and 79374).
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("TTR Technologies Ltd. DiscGuard (tm)", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("TTR Technologies Ltd. DiscGuard (tm)", StringComparison.OrdinalIgnoreCase))
|
||||
return "DiscGuard";
|
||||
|
||||
// Found in "Alternate.exe" (Redump entry 31914) and "Alt.exe" (Redump entries 46743, 46961, 79284, and 79374).
|
||||
|
||||
@@ -15,15 +15,15 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("EReg MFC Application") == true)
|
||||
if (name.OptionalContains("EReg MFC Application"))
|
||||
return $"EA CdKey Registration Module {pex.GetInternalVersion()}";
|
||||
else if (name?.Contains("Registration code installer program") == true)
|
||||
else if (name.OptionalContains("Registration code installer program"))
|
||||
return $"EA CdKey Registration Module {pex.GetInternalVersion()}";
|
||||
else if (name?.Equals("EA DRM Helper", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalEquals("EA DRM Helper", StringComparison.OrdinalIgnoreCase))
|
||||
return $"EA DRM Protection {pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.InternalName;
|
||||
if (name?.Equals("CDCode", StringComparison.Ordinal) == true)
|
||||
if (name.OptionalEquals("CDCode", StringComparison.Ordinal))
|
||||
return $"EA CdKey Registration Module {pex.GetInternalVersion()}";
|
||||
|
||||
if (pex.FindDialogByTitle("About CDKey").Count > 0)
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("Games for Windows - LIVE Zero Day Piracy Protection", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Games for Windows - LIVE Zero Day Piracy Protection", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Games for Windows LIVE - Zero Day Piracy Protection Module {pex.GetInternalVersion()}";
|
||||
else if (name?.StartsWith("Games for Windows", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Games for Windows", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Games for Windows LIVE {pex.GetInternalVersion()}";
|
||||
|
||||
// Get the import directory table
|
||||
|
||||
@@ -42,16 +42,16 @@ namespace BinaryObjectScanner.Protection
|
||||
// TODO: Fix the following checks, as this information is visible via Windows Explorer but isn't currently being seen by BOS.
|
||||
// Found in "HCPSMng.exe".
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("HCPS Manager", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("HCPS Manager", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Hexalock AutoLock 4.5";
|
||||
|
||||
// Found in the file typically named "Start_Here.exe".
|
||||
if (name?.StartsWith("HCPS Loader", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("HCPS Loader", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Hexalock AutoLock 4.5";
|
||||
|
||||
// Found in both "HCPSMng.exe" and in the file typically named "Start_Here.exe".
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("HCPS", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("HCPS", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Hexalock AutoLock 4.5";
|
||||
|
||||
// Get the .text section strings, if they exist
|
||||
|
||||
@@ -21,21 +21,21 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("ImpulseReactor Dynamic Link Library") == true)
|
||||
if (name.OptionalContains("ImpulseReactor Dynamic Link Library"))
|
||||
return $"Impulse Reactor Core Module {pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.Contains("ImpulseReactor Dynamic Link Library") == true)
|
||||
if (name.OptionalContains("ImpulseReactor Dynamic Link Library"))
|
||||
return $"Impulse Reactor Core Module {pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.OriginalFilename;
|
||||
if (name?.Contains("ReactorActivate.exe") == true)
|
||||
if (name.OptionalContains("ReactorActivate.exe"))
|
||||
return $"Stardock Product Activation {pex.GetInternalVersion()}";
|
||||
|
||||
// TODO: Check for CVP* instead?
|
||||
bool containsCheck = false;
|
||||
if (pex.Model.ExportTable?.ExportNameTable?.Strings != null)
|
||||
containsCheck = Array.Exists(pex.Model.ExportTable.ExportNameTable.Strings, s => s?.StartsWith("CVPInitializeClient") ?? false);
|
||||
containsCheck = Array.Exists(pex.Model.ExportTable.ExportNameTable.Strings, s => s.OptionalStartsWith("CVPInitializeClient"));
|
||||
|
||||
// Get the .rdata section strings, if they exist
|
||||
bool containsCheck2 = false;
|
||||
|
||||
@@ -34,13 +34,13 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.InternalName;
|
||||
|
||||
// Found in "KalypsoLauncher.dll" in Redump entry 95617.
|
||||
if (name?.Contains("KalypsoLauncher.dll") == true)
|
||||
if (name.OptionalContains("KalypsoLauncher.dll"))
|
||||
return $"Kalypso Launcher {pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.OriginalFilename;
|
||||
|
||||
// Found in "KalypsoLauncher.dll" in Redump entry 95617.
|
||||
if (name?.Contains("KalypsoLauncher.dll") == true)
|
||||
if (name.OptionalContains("KalypsoLauncher.dll"))
|
||||
return $"Kalypso Launcher {pex.GetInternalVersion()}";
|
||||
|
||||
// Get the .text section strings, if they exist
|
||||
|
||||
@@ -28,11 +28,11 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Should be present on all LabelGate CD2 discs (Redump entry 95010 and product ID SVWC-7185).
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("MAGIQLIP2 Installer", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("MAGIQLIP2 Installer", StringComparison.OrdinalIgnoreCase))
|
||||
return $"LabelGate CD2 Media Player";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("MQSTART", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("MQSTART", StringComparison.OrdinalIgnoreCase))
|
||||
return $"LabelGate CD2 Media Player";
|
||||
|
||||
// Get the .data/DATA section strings, if they exist
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.ProductName;
|
||||
|
||||
// Found in "Register.dll" in IA item "MGIPhotoSuite4.0AndPhotoVista2.02001".
|
||||
if (name?.Equals("MGI Registration Utility", StringComparison.Ordinal) == true)
|
||||
if (name.OptionalEquals("MGI Registration Utility", StringComparison.Ordinal))
|
||||
return $"MGI Registration {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "Register.dll" from "VideoWaveIII" in IA item "mgi-videowave-iii-version-3.00-mgi-software-2000".
|
||||
|
||||
@@ -70,33 +70,33 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.FileDescription;
|
||||
|
||||
// Found in in "cdilla52.dll" from C-Dilla LMS version 3.24.010.
|
||||
if (name?.Equals("32-bit C-Dilla DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("32-bit C-Dilla DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla License Management System";
|
||||
|
||||
// Found in "CdaIns32.dll" and "CdSet32.exe" from version 3.27.000 of C-Dilla LMS.
|
||||
if (name?.Equals("C-Dilla Windows 32-Bit RTS Installer", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("C-Dilla Windows 32-Bit RTS Installer", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla License Management System Version {pex.ProductVersion}";
|
||||
|
||||
// Found in "CDILLA32.DLL"/"CDILLA64.EXE" from C-Dilla LMS version 3.27.000 for Windows 3.1.
|
||||
if (name?.Equals("C-Dilla Windows 3.1x RTS", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("C-Dilla Windows 3.1x RTS", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla License Management System Version {pex.ProductVersion}";
|
||||
|
||||
// Found in "CDILLA13.DLL"/"CDILLA32.DLL"/"CDILLA64.EXE" from C-Dilla LMS version 3.27.000 for Windows 95.
|
||||
if (name?.Equals("C-Dilla Windows 95 RTS", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("C-Dilla Windows 95 RTS", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla License Management System Version {pex.ProductVersion}";
|
||||
|
||||
// Found in "CDANT.SYS"/"CDILLA13.DLL"/"CDILLA32.DLL"/"CDILLA64.EXE" from C-Dilla LMSversion 3.27.000 for Windows NT.
|
||||
if (name?.Equals("C-Dilla Windows NT RTS", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("C-Dilla Windows NT RTS", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla License Management System Version {pex.ProductVersion}";
|
||||
|
||||
// Found in "CDANTSRV.EXE" from C-Dilla LMS version 3.27.000 for Windows NT, and an embedded executable contained in Redump entry 95524.
|
||||
if (name?.Equals("C-Dilla RTS Service", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("C-Dilla RTS Service", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla RTS Service Version {pex.ProductVersion}";
|
||||
|
||||
name = pex.ProductName;
|
||||
|
||||
// Found in "CDANTSRV.EXE" from version 3.27.000 of C-Dilla LMS.
|
||||
if (name?.Equals("CD-Secure/CD-Compress Windows NT", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("CD-Secure/CD-Compress Windows NT", StringComparison.OrdinalIgnoreCase))
|
||||
return $"C-Dilla License Management System Version {pex.ProductVersion}";
|
||||
|
||||
// Get string table resources
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in various files in "Les Paul & Friends" (Barcode 4 98806 834170).
|
||||
var name = pex.ProductName;
|
||||
if (name?.Equals("CDS300", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("CDS300", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Cactus Data Shield 300";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -22,37 +22,37 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.ProductName;
|
||||
|
||||
// Found in "IsSvcInstDanceEJay7.dll" in IA item "computer200709dvd" (Dance eJay 7).
|
||||
if (name?.Equals("FLEXnet Activation Toolkit", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("FLEXnet Activation Toolkit", StringComparison.OrdinalIgnoreCase))
|
||||
return "FLEXnet";
|
||||
|
||||
// Found in "INSTALLS.EXE", "LMGR326B.DLL", "LMGRD.EXE", and "TAKEFIVE.EXE" in IA item "prog-17_202403".
|
||||
if (name?.Equals("Globetrotter Software Inc lmgr326b Flexlm", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Globetrotter Software Inc lmgr326b Flexlm", StringComparison.OrdinalIgnoreCase))
|
||||
return $"FlexLM {pex.ProductVersion}";
|
||||
|
||||
// Generic case to catch unknown versions.
|
||||
if (name?.Contains("Flexlm") == true)
|
||||
if (name.OptionalContains("Flexlm"))
|
||||
return "FlexLM (Unknown Version - Please report to us on GitHub)";
|
||||
|
||||
name = pex.FileDescription;
|
||||
|
||||
// Found in "INSTALLS.EXE", "LMGR326B.DLL", "LMGRD.EXE", and "TAKEFIVE.EXE" in IA item "prog-17_202403".
|
||||
if (name?.Equals("lmgr326b", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("lmgr326b", StringComparison.OrdinalIgnoreCase))
|
||||
return $"FlexLM {pex.ProductVersion}";
|
||||
|
||||
name = pex.LegalTrademarks;
|
||||
|
||||
// Found in "INSTALLS.EXE", "LMGR326B.DLL", "LMGRD.EXE", and "TAKEFIVE.EXE" in IA item "prog-17_202403".
|
||||
if (name?.Equals("Flexible License Manager,FLEXlm,Globetrotter,FLEXID", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Flexible License Manager,FLEXlm,Globetrotter,FLEXID", StringComparison.OrdinalIgnoreCase))
|
||||
return $"FlexLM {pex.ProductVersion}";
|
||||
|
||||
if (name?.Contains("FLEXlm") == true)
|
||||
if (name.OptionalContains("FLEXlm"))
|
||||
return $"FlexLM {pex.ProductVersion}";
|
||||
|
||||
name = pex.OriginalFilename;
|
||||
|
||||
// Found in "INSTALLS.EXE", "LMGR326B.DLL", "LMGRD.EXE", and "TAKEFIVE.EXE" in IA item "prog-17_202403".
|
||||
// It isn't known why these various executables have the same original filename.
|
||||
if (name?.Equals("lmgr326b.dll", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("lmgr326b.dll", StringComparison.OrdinalIgnoreCase))
|
||||
return $"FlexLM {pex.ProductVersion}";
|
||||
|
||||
// Get the .data/DATA section strings, if they exist
|
||||
|
||||
@@ -28,12 +28,12 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "RGASDEV.SYS" in the Black Lagoon Season 1 DVD Steelbook box set (Geneon ID 12970).
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Equals("rgasdev", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("rgasdev", StringComparison.OrdinalIgnoreCase))
|
||||
return "RipGuard";
|
||||
|
||||
// Found in "RGASDEV.SYS" in the Black Lagoon Season 1 DVD Steelbook box set (Geneon ID 12970).
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("rgasdev", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("rgasdev", StringComparison.OrdinalIgnoreCase))
|
||||
return "RipGuard";
|
||||
|
||||
if (!string.IsNullOrEmpty(file) && File.Exists(file))
|
||||
|
||||
@@ -104,41 +104,41 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "32bit\Tax02\cdac14ba.dll" in IA item "TurboTax Deluxe Tax Year 2002 for Wndows (2.00R)(Intuit)(2002)(352282)".
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Equals("SafeCast2", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("SafeCast2", StringComparison.OrdinalIgnoreCase))
|
||||
return "SafeCast";
|
||||
|
||||
// Found in "cdac01ba.dll" from IA item "ejay_nestle_trial".
|
||||
// TODO: Figure out a reasonable way to parse version.
|
||||
if (name?.Equals("CdaC01BA", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("CdaC01BA", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeCast";
|
||||
|
||||
// Found in "C2CDEL.EXE" in IA item "britney-spears-special-edition-cd-rom".
|
||||
if (name?.Equals("32-bit SafeCast Copy To Clear Delete", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("32-bit SafeCast Copy To Clear Delete", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeCast";
|
||||
|
||||
// Found in "C2C.DLL" in IA item "britney-spears-special-edition-cd-rom".
|
||||
if (name?.Equals("32-bit SafeCast Shell Copy To Clear DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("32-bit SafeCast Shell Copy To Clear DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeCast";
|
||||
|
||||
// Found in "SCRfrsh.exe" in Redump entry 102979.
|
||||
if (name?.Equals("32-bit SafeCast Toolkit", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("32-bit SafeCast Toolkit", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeCast {pex.FileVersion}";
|
||||
|
||||
// Found in "CDAC14BA.DLL" in Redump entry 95524.
|
||||
if (name?.Equals("32-bit SafeCast Anchor Installer", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("32-bit SafeCast Anchor Installer", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeCast";
|
||||
|
||||
// Found in "CDAC21BA.DLL" in Redump entry 95524.
|
||||
if (name?.Equals("32-bit CdaC20BA", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("32-bit CdaC20BA", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeCast";
|
||||
|
||||
// Found in hidden resource of "32bit\Tax02\cdac14ba.dll" in IA item "TurboTax Deluxe Tax Year 2002 for Wndows (2.00R)(Intuit)(2002)(352282)".
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("SafeCast Windows NT", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("SafeCast Windows NT", StringComparison.OrdinalIgnoreCase))
|
||||
return "SafeCast";
|
||||
|
||||
// Found in "cdac01ba.dll" from IA item "ejay_nestle_trial".
|
||||
if (name?.Equals("SafeCast", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("SafeCast", StringComparison.OrdinalIgnoreCase))
|
||||
return "SafeCast";
|
||||
|
||||
// Check for CDSHARE/DISAG_SH sections
|
||||
|
||||
@@ -81,30 +81,30 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
var name = pex.FileDescription;
|
||||
// Present in "Diag.exe" files from SafeDisc 4.50.000+.
|
||||
if (name?.Equals("SafeDisc SRV Tool APP", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("SafeDisc SRV Tool APP", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeDisc SRV Tool APP {GetSafeDiscDiagExecutableVersion(pex)}";
|
||||
|
||||
// Present in "Setup.exe" from the later "safedisc.exe" driver update provided by Macrovision.
|
||||
if (name?.Equals("Macrovision SecDrv Update", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Macrovision SecDrv Update", StringComparison.OrdinalIgnoreCase))
|
||||
return "Macrovision SecDrv Update Installer";
|
||||
|
||||
// Present on all "CLOKSPL.DLL" versions before SafeDisc 1.06.000. Found on Redump entries 61731 and 66004.
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("SafeDisc CDROM Protection System", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("SafeDisc CDROM Protection System", StringComparison.OrdinalIgnoreCase))
|
||||
return "SafeDisc 1.00.025-1.01.044";
|
||||
|
||||
// Present in "Diag.exe" files from SafeDisc 4.50.000+.
|
||||
else if (name?.Equals("SafeDisc SRV Tool APP", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalEquals("SafeDisc SRV Tool APP", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SafeDisc SRV Tool APP {GetSafeDiscDiagExecutableVersion(pex)}";
|
||||
|
||||
// Present in "Setup.exe" from the later "safedisc.exe" driver update provided by Macrovision.
|
||||
if (name?.Equals("Macrovision SecDrv Update", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Macrovision SecDrv Update", StringComparison.OrdinalIgnoreCase))
|
||||
return "Macrovision SecDrv Update Installer";
|
||||
|
||||
// Present on all "CLOKSPL.EXE" versions before SafeDisc 1.06.000. Found on Redump entries 61731 and 66004.
|
||||
// Only found so far on SafeDisc 1.00.025-1.01.044, but the report is currently left generic due to the generic nature of the check.
|
||||
name = pex.FileDescription;
|
||||
if (name?.Equals("SafeDisc", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("SafeDisc", StringComparison.OrdinalIgnoreCase))
|
||||
return "SafeDisc";
|
||||
|
||||
// Found in Redump entries 20729 and 65569.
|
||||
|
||||
@@ -58,13 +58,13 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.FileDescription;
|
||||
|
||||
// Present in "secdrv.sys" files found in SafeDisc 2.80.010+.
|
||||
if (name?.Equals("Macrovision SECURITY Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Macrovision SECURITY Driver", StringComparison.OrdinalIgnoreCase))
|
||||
resultsList.Add($"Macrovision Security Driver {GetSecDrvExecutableVersion(pex)}");
|
||||
|
||||
// Found in hidden resource of "32bit\Tax02\cdac14ba.dll" in IA item "TurboTax Deluxe Tax Year 2002 for Wndows (2.00R)(Intuit)(2002)(352282)".
|
||||
// Known versions:
|
||||
// 4.16.050 Windows NT 2002/04/24
|
||||
if (name?.Equals("Macrovision RTS Service", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Macrovision RTS Service", StringComparison.OrdinalIgnoreCase))
|
||||
resultsList.Add($"Macrovision RTS Service {pex.FileVersion}");
|
||||
|
||||
// The stxt371 and stxt774 sections are found in various newer Macrovision products, including various versions of CDS-300, SafeCast, and SafeDisc.
|
||||
|
||||
@@ -25,12 +25,12 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in scvfy.exe on "Charley Pride - A Tribute to Jim Reeves" (barcode "7 816190222-2 4").
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("scvfy MFC Application", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("scvfy MFC Application", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaCloQ";
|
||||
|
||||
// Found in scvfy.exe on "Charley Pride - A Tribute to Jim Reeves" (barcode "7 816190222-2 4").
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("scvfy Application", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("scvfy Application", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaCloQ";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -25,11 +25,11 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Used to detect "LicGen.exe", found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6)
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaMax CD-3";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("LicGen Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"MediaMax CD-3";
|
||||
|
||||
if (pex.FindGenericResource("Cd3Ctl").Count > 0)
|
||||
|
||||
@@ -43,37 +43,37 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.FileDescription;
|
||||
|
||||
// Found in "GameGuard.des" in Redump entry 90526 and 99598, and "Soulworker" (Steam Depot 1377581, Manifest 5092481117079359342).
|
||||
if (name?.Contains("nProtect GameGuard Launcher") == true)
|
||||
if (name.OptionalContains("nProtect GameGuard Launcher"))
|
||||
return $"nProtect GameGuard ({pex.GetInternalVersion()})";
|
||||
|
||||
// Found in "npkcrypt.dll" in Redump entry 90526.
|
||||
if (name?.Contains("nProtect KeyCrypt Driver Support Dll") == true)
|
||||
if (name.OptionalContains("nProtect KeyCrypt Driver Support Dll"))
|
||||
return $"nProtect KeyCrypt ({pex.GetInternalVersion()})";
|
||||
|
||||
// Found in "npkcrypt.sys" and "npkcusb.sys" in Redump entry 90526.
|
||||
if (name?.Contains("nProtect KeyCrypt Driver") == true)
|
||||
if (name.OptionalContains("nProtect KeyCrypt Driver"))
|
||||
return $"nProtect KeyCrypt ({pex.GetInternalVersion()})";
|
||||
|
||||
// Found in "npkpdb.dll" in Redump entry 90526.
|
||||
if (name?.Contains("nProtect KeyCrypt Program Database DLL") == true)
|
||||
if (name.OptionalContains("nProtect KeyCrypt Program Database DLL"))
|
||||
return $"nProtect KeyCrypt ({pex.GetInternalVersion()})";
|
||||
|
||||
name = pex.ProductName;
|
||||
|
||||
// Found in "GameGuard.des" in Redump entry 90526 and 99598.
|
||||
if (name?.Contains("nProtect GameGuard Launcher") == true)
|
||||
if (name.OptionalContains("nProtect GameGuard Launcher"))
|
||||
return $"nProtect GameGuard ({pex.GetInternalVersion()})";
|
||||
|
||||
// Found in "npkcrypt.dll" in Redump entry 90526.
|
||||
if (name?.Contains("nProtect KeyCrypt Driver Support Dll") == true)
|
||||
if (name.OptionalContains("nProtect KeyCrypt Driver Support Dll"))
|
||||
return $"nProtect KeyCrypt ({pex.GetInternalVersion()})";
|
||||
|
||||
// Found in "npkcrypt.sys" and "npkcusb.sys" in Redump entry 90526.
|
||||
if (name?.Contains("nProtect KeyCrypt Driver") == true)
|
||||
if (name.OptionalContains("nProtect KeyCrypt Driver"))
|
||||
return $"nProtect KeyCrypt ({pex.GetInternalVersion()})";
|
||||
|
||||
// Found in "npkpdb.dll" in Redump entry 90526.
|
||||
if (name?.Contains("nProtect KeyCrypt Program Database DLL") == true)
|
||||
if (name.OptionalContains("nProtect KeyCrypt Program Database DLL"))
|
||||
return $"nProtect KeyCrypt ({pex.GetInternalVersion()})";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// TODO: Is this too broad in general?
|
||||
var name = pex.InternalName;
|
||||
if (name?.StartsWith("EReg", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("EReg", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Executable-Based Online Registration {pex.GetInternalVersion()}";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,38 +26,38 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in many different OpenMG related files ("Touch" by Amerie).
|
||||
var name = pex.LegalTrademarks;
|
||||
if (name?.StartsWith("OpenMG", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("OpenMG", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "OMGDBP.OCX" ("Touch" by Amerie).
|
||||
name = pex.FileDescription;
|
||||
if (name?.StartsWith("LGDiscComp Module", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("LGDiscComp Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "OMGDWRAP.DLL" ("Touch" by Amerie).
|
||||
if (name?.StartsWith("LGDSimplePlayer Module", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("LGDSimplePlayer Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "OMGLGD.DLL" ("Touch" by Amerie).
|
||||
if (name?.StartsWith("omglgd Module", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("omglgd Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "OMGUTILS.DLL" ("Touch" by Amerie).
|
||||
if (name?.StartsWith("OpenMG Utility", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("OpenMG Utility", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "SALWRAP.DLL" ("Touch" by Amerie).
|
||||
if (name?.StartsWith("Secure Application Loader Wrapper", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Secure Application Loader Wrapper", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "SDKHM.DLL" ("Touch" by Amerie).
|
||||
// Not every copy of this file has this File Description (Redump entry 95010).
|
||||
if (name?.StartsWith("SDKHM (KEEP)", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("SDKHM (KEEP)", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
// Found in "SDKHM.EXE" ("Touch" by Amerie).
|
||||
// Not every copy of this file has this File Description (Redump entry 95010).
|
||||
if (name?.StartsWith("SDKHM (KEPT)", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("SDKHM (KEPT)", StringComparison.OrdinalIgnoreCase))
|
||||
return $"OpenMG";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -18,11 +18,11 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Equals("Origin", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Origin", StringComparison.OrdinalIgnoreCase))
|
||||
return "Origin";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.Equals("Origin", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Origin", StringComparison.OrdinalIgnoreCase))
|
||||
return "Origin";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -23,17 +23,17 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "PlayJ.exe" (https://web.archive.org/web/20010417025347/http://dlp.playj.com:80/playj/PlayJIns266.exe) and "CACTUSPJ.exe" ("Volumia!" by Puur (Barcode 7 43218 63282 2) (Discogs Release Code [r795427])).
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("PlayJ Music Player", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("PlayJ Music Player", StringComparison.OrdinalIgnoreCase))
|
||||
return $"PlayJ Music Player";
|
||||
|
||||
// Found in "PJSTREAM.DLL" ("Volumia!" by Puur (Barcode 7 43218 63282 2) (Discogs Release Code [r795427])).
|
||||
name = pex.FileDescription;
|
||||
if (name?.StartsWith("EVAUX32 Module", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("EVAUX32 Module", StringComparison.OrdinalIgnoreCase))
|
||||
return $"PlayJ Music Player Component";
|
||||
|
||||
// Found in "PlayJ.exe" (https://web.archive.org/web/20010417025347/http://dlp.playj.com:80/playj/PlayJIns266.exe) and "CACTUSPJ.exe" ("Volumia!" by Puur (Barcode 7 43218 63282 2) (Discogs Release Code [r795427])).
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("PlayJ", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("PlayJ", StringComparison.OrdinalIgnoreCase))
|
||||
return $"PlayJ";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -139,63 +139,63 @@ namespace BinaryObjectScanner.Protection
|
||||
var name = pex.FileDescription;
|
||||
|
||||
// Found in "RNBOVTMP.DLL" in BA entry "Autodesk AutoCAD LT 98 (1998) (CD) [English] [Dutch]".
|
||||
if (name?.Equals("Rainbow Technologies Virtual Device Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies Virtual Device Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "SENTTEMP.DLL" in BA entry "Autodesk AutoCAD LT 98 (1998) (CD) [English] [Dutch]".
|
||||
if (name?.Equals("Rainbow Technologies Sentinel Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies Sentinel Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "SETUPX86.EXE"/"SENTW95.EXE" in BA entry "Autodesk AutoCAD LT 98 (1998) (CD) [English] [Dutch]".
|
||||
if (name?.Equals("Sentinel Driver Setup DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Sentinel Driver Setup DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "SNTI386.DLL"/"SENTW95.DLL" in BA entry "Autodesk AutoCAD LT 98 (1998) (CD) [English] [Dutch]".
|
||||
if (name?.Equals("Install, Setup - Sentinel Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Install, Setup - Sentinel Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "wd126.zip/WDSHARE.EXE/SX32W.DL_" in IA item "ASMEsMechanicalEngineeringToolkit1997December" and "WDSHARE.ZIP/WDSHARE.EXE/SX32W.DL_" in IA item "aplicaciones-windows".
|
||||
if (name?.Equals("Rainbow Technologies SentinelSuperPro WIN32 DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies SentinelSuperPro WIN32 DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel SuperPro {pex.ProductVersion}";
|
||||
|
||||
// Found in "SP32W.DLL" in IA item "pcwkcd-1296".
|
||||
if (name?.Equals("Rainbow Technologies SentinelPro WIN32 DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies SentinelPro WIN32 DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow SentinelPro {pex.ProductVersion}";
|
||||
|
||||
// Found in "NSRVGX.EXE" in IA item "czchip199707cd".
|
||||
if (name?.Equals("NetSentinel Server for WIN 32", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("NetSentinel Server for WIN 32", StringComparison.OrdinalIgnoreCase))
|
||||
return "Rainbow NetSentinel Server for Win32";
|
||||
|
||||
// Found in "\disc4\cad\sdcc_200.zip\DISK1\_USER1.HDR\Language_Independent_Intel_32_Files\SNTNLUSB.SYS" in "CICA 32 For Windows CD-ROM (Walnut Creek) (October 1999) (Disc 4).iso" in IA item "CICA_32_For_Windows_CD-ROM_Walnut_Creek_October_1999".
|
||||
// TODO: Check if the version included with this is useful.
|
||||
if (name?.Equals("Rainbow Technologies Sentinel Device Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies Sentinel Device Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return "Rainbow Sentinel Driver";
|
||||
|
||||
name = pex.ProductName;
|
||||
|
||||
// Found in multiple files in BA entry "Autodesk AutoCAD LT 98 (1998) (CD) [English] [Dutch]", including "RNBOVTMP.DLL", "SENTTEMP.DLL", and "SNTI386.DLL".
|
||||
if (name?.Equals("Rainbow Technologies Sentinel", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies Sentinel", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "SETUPX86.EXE"/"SENTW95.EXE" in BA entry "Autodesk AutoCAD LT 98 (1998) (CD) [English] [Dutch]".
|
||||
if (name?.Equals("Sentinel Driver Setup", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Sentinel Driver Setup", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "wd126.zip/WDSHARE.EXE/SX32W.DL_" in IA item "ASMEsMechanicalEngineeringToolkit1997December" and "WDSHARE.ZIP/WDSHARE.EXE/SX32W.DL_" in IA item "aplicaciones-windows".
|
||||
if (name?.Equals("Rainbow Technologies SentinelSuperPro WIN32 DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies SentinelSuperPro WIN32 DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel SuperPro {pex.ProductVersion}";
|
||||
|
||||
// Found in "SP32W.DLL" in IA item "pcwkcd-1296".
|
||||
if (name?.Equals("Rainbow Technologies SentinelPro WIN32 DLL", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies SentinelPro WIN32 DLL", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow SentinelPro {pex.ProductVersion}";
|
||||
|
||||
// Found in "F481_SetupSysDriver.exe.B391C18A_6953_11D4_82CB_00D0B72E1DB9"/"SetupSysDriver.exe" in IA item "chip-cds-2001-08".
|
||||
if (name?.Equals("Sentinel System Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Sentinel System Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return $"Rainbow Sentinel {pex.ProductVersion}";
|
||||
|
||||
// Found in "\disc4\cad\sdcc_200.zip\DISK1\_USER1.HDR\Language_Independent_Intel_32_Files\SNTNLUSB.SYS" in "CICA 32 For Windows CD-ROM (Walnut Creek) (October 1999) (Disc 4).iso" in IA item "CICA_32_For_Windows_CD-ROM_Walnut_Creek_October_1999".
|
||||
// TODO: Check if the version included with this is useful.
|
||||
if (name?.Equals("Rainbow Technologies USB Security Device Driver", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalEquals("Rainbow Technologies USB Security Device Driver", StringComparison.OrdinalIgnoreCase))
|
||||
return "Rainbow Sentinel Driver";
|
||||
|
||||
// Get the .data/DATA section strings, if they exist
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "RngInterstitial.dll" in the RealArcade installation directory in IA item "Nova_RealArcadeCD_USA".
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("RngInterstitial") == true)
|
||||
if (name.OptionalContains("RngInterstitial"))
|
||||
return "RealArcade";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -20,23 +20,23 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("SecuROM PA") == true)
|
||||
if (name.OptionalContains("SecuROM PA"))
|
||||
return $"SecuROM Product Activation v{pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.InternalName;
|
||||
if (name?.Equals("paul.dll") == true)
|
||||
if (name.OptionalEquals("paul.dll"))
|
||||
return $"SecuROM Product Activation v{pex.GetInternalVersion()}";
|
||||
else if (name?.Equals("paul_dll_activate_and_play.dll") == true)
|
||||
else if (name.OptionalEquals("paul_dll_activate_and_play.dll"))
|
||||
return $"SecuROM Product Activation v{pex.GetInternalVersion()}";
|
||||
else if (name?.Equals("paul_dll_preview_and_review.dll") == true)
|
||||
else if (name.OptionalEquals("paul_dll_preview_and_review.dll"))
|
||||
return $"SecuROM Product Activation v{pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.OriginalFilename;
|
||||
if (name?.Equals("paul_dll_activate_and_play.dll") == true)
|
||||
if (name.OptionalEquals("paul_dll_activate_and_play.dll"))
|
||||
return $"SecuROM Product Activation v{pex.GetInternalVersion()}";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.Contains("SecuROM Activate & Play") == true)
|
||||
if (name.OptionalContains("SecuROM Activate & Play"))
|
||||
return $"SecuROM Product Activation v{pex.GetInternalVersion()}";
|
||||
|
||||
// Get the matrosch section, if it exists
|
||||
|
||||
@@ -23,12 +23,12 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found in "IALib.DLL" in IA item "TAFSEERVER4SETUP"
|
||||
var name = pex.InternalName;
|
||||
if (name?.Equals("Softlock Protected Application") == true)
|
||||
if (name.OptionalEquals("Softlock Protected Application"))
|
||||
return "SoftLock";
|
||||
|
||||
// Found in "IALib.DLL" in IA item "TAFSEERVER4SETUP"
|
||||
name = pex.Comments;
|
||||
if (name?.Equals("Softlock Protected Application") == true)
|
||||
if (name.OptionalEquals("Softlock Protected Application"))
|
||||
return "SoftLock";
|
||||
|
||||
// Found in "IALib.DLL" in IA item "TAFSEERVER4SETUP"
|
||||
|
||||
@@ -23,31 +23,31 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("DVM Library", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("DVM Library", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield {pex.GetInternalVersion()}";
|
||||
|
||||
else if (name?.StartsWith("Solidshield Activation Library", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Solidshield Activation Library", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield Core.dll {pex.GetInternalVersion()}";
|
||||
|
||||
else if (name?.StartsWith("Activation Manager", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Activation Manager", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield Activation Manager Module {GetInternalVersion(pex)}";
|
||||
|
||||
// Found in "tvdm.dll" in Redump entry 68166.
|
||||
else if (name?.StartsWith("Solidshield Library", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Solidshield Library", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield {GetInternalVersion(pex)}";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("Solidshield Activation Library", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Solidshield Activation Library", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield Core.dll {pex.GetInternalVersion()}";
|
||||
|
||||
else if (name?.StartsWith("Solidshield Library", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Solidshield Library", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield Core.dll {pex.GetInternalVersion()}";
|
||||
|
||||
else if (name?.StartsWith("Activation Manager", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Activation Manager", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield Activation Manager Module {GetInternalVersion(pex)}";
|
||||
|
||||
// Found in "tvdm.dll" in Redump entry 68166.
|
||||
else if (name?.StartsWith("Solidshield Library", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Solidshield Library", StringComparison.OrdinalIgnoreCase))
|
||||
return $"SolidShield {GetInternalVersion(pex)}";
|
||||
|
||||
// Get the .init section, if it exists
|
||||
|
||||
@@ -33,49 +33,49 @@ namespace BinaryObjectScanner.Protection
|
||||
// "Helper Application" - Found in "protect.x64" and "protect.x86" in Redump entry 81756.
|
||||
|
||||
// Found in "sfdrvrem.exe" in Redump entry 102677.
|
||||
if (name?.Contains("FrontLine Drivers Removal Tool") == true)
|
||||
if (name.OptionalContains("FrontLine Drivers Removal Tool"))
|
||||
return $"StarForce FrontLine Driver Removal Tool";
|
||||
|
||||
// Found in "protect.exe" in Redump entry 94805.
|
||||
if (name?.Contains("FrontLine Protection GUI Application") == true)
|
||||
if (name.OptionalContains("FrontLine Protection GUI Application"))
|
||||
return $"StarForce {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "protect.dll" in Redump entry 94805.
|
||||
if (name?.Contains("FrontLine Protection Library") == true)
|
||||
if (name.OptionalContains("FrontLine Protection Library"))
|
||||
return $"StarForce {pex.GetInternalVersion()}";
|
||||
|
||||
// Found in "protect.x64" and "protect.x86" in Redump entry 94805.
|
||||
if (name?.Contains("FrontLine Helper") == true)
|
||||
if (name.OptionalContains("FrontLine Helper"))
|
||||
return $"StarForce {pex.GetInternalVersion()}";
|
||||
|
||||
// TODO: Find a sample of this check.
|
||||
if (name?.Contains("Protected Module") == true)
|
||||
if (name.OptionalContains("Protected Module"))
|
||||
return $"StarForce 5";
|
||||
|
||||
name = pex.LegalCopyright;
|
||||
if (name?.StartsWith("(c) Protection Technology") == true) // (c) Protection Technology (StarForce)?
|
||||
if (name.OptionalStartsWith("(c) Protection Technology")) // (c) Protection Technology (StarForce)?
|
||||
return $"StarForce {pex.GetInternalVersion()}";
|
||||
else if (name?.Contains("Protection Technology") == true) // Protection Technology (StarForce)?
|
||||
else if (name.OptionalContains("Protection Technology")) // Protection Technology (StarForce)?
|
||||
return $"StarForce {pex.GetInternalVersion()}";
|
||||
|
||||
// TODO: Decide if internal name checks are safe to use.
|
||||
name = pex.InternalName;
|
||||
|
||||
// Found in "protect.x64" and "protect.x86" in Redump entry 94805.
|
||||
if (name?.Equals("CORE.ADMIN", StringComparison.Ordinal) == true)
|
||||
if (name.OptionalEquals("CORE.ADMIN", StringComparison.Ordinal))
|
||||
return $"StarForce {pex.GetInternalVersion()}";
|
||||
|
||||
|
||||
// These checks currently disabled due being possibly too generic:
|
||||
// Found in "protect.dll" in Redump entry 94805.
|
||||
// if (name?.Equals("CORE.DLL", StringComparison.Ordinal) == true)
|
||||
// if (name.OptionalEquals("CORE.DLL", StringComparison.Ordinal))
|
||||
// return $"StarForce {Tools.Utilities.GetInternalVersion(pex)}";
|
||||
//
|
||||
// Found in "protect.exe" in Redump entry 94805.
|
||||
// if (name?.Equals("CORE.EXE", StringComparison.Ordinal) == true)
|
||||
// if (name.OptionalEquals("CORE.EXE", StringComparison.Ordinal))
|
||||
// return $"StarForce {Tools.Utilities.GetInternalVersion(pex)}";
|
||||
//
|
||||
// else if (name?.Equals("protect.exe", StringComparison.Ordinal) == true)
|
||||
// else if (name.OptionalEquals("protect.exe", StringComparison.Ordinal))
|
||||
// return $"StarForce {Tools.Utilities.GetInternalVersion(pex)}";
|
||||
|
||||
// Check the export name table
|
||||
|
||||
@@ -17,21 +17,21 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("Steam Autorun Setup") == true)
|
||||
if (name.OptionalContains("Steam Autorun Setup"))
|
||||
return "Steam";
|
||||
else if (name?.Contains("Steam Client API") == true)
|
||||
else if (name.OptionalContains("Steam Client API"))
|
||||
return "Steam";
|
||||
else if (name?.Contains("Steam Client Engine") == true)
|
||||
else if (name.OptionalContains("Steam Client Engine"))
|
||||
return $"Steam Client Engine {pex.GetInternalVersion()}";
|
||||
else if (name?.Contains("Steam Client Service") == true)
|
||||
else if (name.OptionalContains("Steam Client Service"))
|
||||
return "Steam";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.Contains("Steam Autorun Setup") == true)
|
||||
if (name.OptionalContains("Steam Autorun Setup"))
|
||||
return "Steam";
|
||||
else if (name?.Contains("Steam Client API") == true)
|
||||
else if (name.OptionalContains("Steam Client API"))
|
||||
return "Steam";
|
||||
else if (name?.Contains("Steam Client Service") == true)
|
||||
else if (name.OptionalContains("Steam Client Service"))
|
||||
return "Steam";
|
||||
|
||||
/// TODO: Add entry point checks
|
||||
|
||||
@@ -30,15 +30,15 @@ namespace BinaryObjectScanner.Protection
|
||||
// - TagesClient.dat (Does not always exist)
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("TagesSetup", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("TagesSetup", StringComparison.OrdinalIgnoreCase))
|
||||
return $"TAGES Driver Setup {GetVersion(pex)}";
|
||||
else if (name?.StartsWith("Tagès activation client", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("Tagès activation client", StringComparison.OrdinalIgnoreCase))
|
||||
return $"TAGES Activation Client {GetVersion(pex)}";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.StartsWith("Application TagesSetup", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Application TagesSetup", StringComparison.OrdinalIgnoreCase))
|
||||
return $"TAGES Driver Setup {GetVersion(pex)}";
|
||||
else if (name?.StartsWith("T@GES", StringComparison.OrdinalIgnoreCase) == true)
|
||||
else if (name.OptionalStartsWith("T@GES", StringComparison.OrdinalIgnoreCase))
|
||||
return $"TAGES Activation Client {GetVersion(pex)}";
|
||||
|
||||
// TODO: Add entry point check
|
||||
|
||||
@@ -18,26 +18,26 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("Ubisoft Connect Installer") == true)
|
||||
if (name.OptionalContains("Ubisoft Connect Installer"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Ubisoft Connect Service") == true)
|
||||
else if (name.OptionalContains("Ubisoft Connect Service"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Ubisoft Connect WebCore") == true)
|
||||
else if (name.OptionalContains("Ubisoft Connect WebCore"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Ubisoft Crash Reporter") == true)
|
||||
else if (name.OptionalContains("Ubisoft Crash Reporter"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Ubisoft Game Launcher") == true)
|
||||
else if (name.OptionalContains("Ubisoft Game Launcher"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Ubisoft Uplay Installer") == true)
|
||||
else if (name.OptionalContains("Ubisoft Uplay Installer"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Uplay launcher") == true)
|
||||
else if (name.OptionalContains("Uplay launcher"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
|
||||
// There's also a variant that looks like "Uplay <version> installer"
|
||||
name = pex.ProductName;
|
||||
if (name?.Contains("Ubisoft Connect") == true)
|
||||
if (name.OptionalContains("Ubisoft Connect"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
else if (name?.Contains("Uplay") == true)
|
||||
else if (name.OptionalContains("Uplay"))
|
||||
return "Uplay / Ubisoft Connect";
|
||||
|
||||
return null;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace BinaryObjectScanner.Protection
|
||||
|
||||
// Found on "All That I Am" by Santana (Barcode 8 2876-59773-2 6)
|
||||
var name = pex.FileDescription;
|
||||
if (name?.StartsWith("Windows Media Data Session Licensing Engine", StringComparison.OrdinalIgnoreCase) == true)
|
||||
if (name.OptionalStartsWith("Windows Media Data Session Licensing Engine", StringComparison.OrdinalIgnoreCase))
|
||||
return "Windows Media Data Session DRM";
|
||||
|
||||
// Found in "autorun.exe" ("Touch" by Amerie).
|
||||
|
||||
@@ -18,15 +18,15 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
|
||||
var name = pex.FileDescription;
|
||||
if (name?.Contains("Copy Protection Viewer") == true)
|
||||
if (name.OptionalContains("Copy Protection Viewer"))
|
||||
return "WTM Protection Viewer";
|
||||
|
||||
name = pex.LegalTrademarks;
|
||||
if (name?.Contains("WTM Copy Protection") == true)
|
||||
if (name.OptionalContains("WTM Copy Protection"))
|
||||
return "WTM Protection Viewer";
|
||||
|
||||
name = pex.ProductName;
|
||||
if (name?.Contains("WTM Copy Protection Viewer") == true)
|
||||
if (name.OptionalContains("WTM Copy Protection Viewer"))
|
||||
return "WTM Protection Viewer";
|
||||
|
||||
// Get the code/CODE section strings, if they exist
|
||||
|
||||
Reference in New Issue
Block a user