mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Add MediaMax CD-3 content detections
This commit is contained in:
@@ -46,11 +46,14 @@ namespace BurnOutSharp.FileType
|
||||
}
|
||||
|
||||
// CD-Key
|
||||
if (fileContent.Contains("a valid serial number is required")
|
||||
|| fileContent.Contains("serial number is located"))
|
||||
{
|
||||
if (fileContent.Contains("a valid serial number is required"))
|
||||
protections.Add("CD-Key / Serial");
|
||||
}
|
||||
else if (fileContent.Contains("serial number is located"))
|
||||
protections.Add("CD-Key / Serial");
|
||||
|
||||
// MediaMax
|
||||
if (fileContent.Contains("MediaMax technology"))
|
||||
protections.Add("MediaMax CD-3");
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -7,17 +7,32 @@ namespace BurnOutSharp.ProtectionType
|
||||
{
|
||||
public class MediaMaxCD3
|
||||
{
|
||||
public static string CheckContents(byte[] fileContent, bool includePosition = false)
|
||||
{
|
||||
// Cd3Ctl
|
||||
byte[] check = new byte[] { 0x43, 0x64, 0x33, 0x43, 0x74, 0x6C };
|
||||
if (fileContent.Contains(check, out int position))
|
||||
return "MediaMax CD-3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
// DllInstallSbcp
|
||||
check = new byte[] { 0x44, 0x6C, 0x6C, 0x49, 0x6E, 0x73, 0x74, 0x61, 0x6C, 0x6C, 0x53, 0x62, 0x63, 0x70 };
|
||||
if (fileContent.Contains(check, out position))
|
||||
return "MediaMax CD-3" + (includePosition ? $" (Index {position})" : string.Empty);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string CheckPath(string path, IEnumerable<string> files, bool isDirectory)
|
||||
{
|
||||
if (isDirectory)
|
||||
{
|
||||
if (files.Any(f => Path.GetFileName(f).Equals("LaunchCd.exe", StringComparison.OrdinalIgnoreCase)))
|
||||
return "MediaMax CD3";
|
||||
return "MediaMax CD-3";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Path.GetFileName(path).Equals("LaunchCd.exe", StringComparison.OrdinalIgnoreCase))
|
||||
return "MediaMax CD3";
|
||||
return "MediaMax CD-3";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user