mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-08-01 21:49:23 +00:00
Make SafeDisc more like Tages path check
This commit is contained in:
@@ -63,28 +63,33 @@ namespace BurnOutSharp.ProtectionType
|
||||
/// <inheritdoc/>
|
||||
public string CheckDirectoryPath(string path, IEnumerable<string> files)
|
||||
{
|
||||
// TODO: These are all cop-outs that don't check the existence of the other files
|
||||
List<string> protections = new List<string>();
|
||||
|
||||
if (files.Any(f => Path.GetFileName(f).Equals("DPLAYERX.DLL", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
string file = files.First(f => Path.GetFileName(f).Equals("DPLAYERX.DLL", StringComparison.OrdinalIgnoreCase));
|
||||
return GetDPlayerXVersion(file);
|
||||
protections.Add($"dplayerx.dll {GetDPlayerXVersion(file)}");
|
||||
}
|
||||
else if (files.Any(f => Path.GetFileName(f).Equals("drvmgt.dll", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
string file = files.First(f => Path.GetFileName(f).Equals("drvmgt.dll", StringComparison.OrdinalIgnoreCase));
|
||||
return GetDrvmgtVersion(file);
|
||||
protections.Add($"drvmgt.dll {GetDrvmgtVersion(file)}");
|
||||
}
|
||||
else if (files.Any(f => Path.GetFileName(f).Equals("secdrv.sys", StringComparison.OrdinalIgnoreCase)))
|
||||
{
|
||||
string file = files.First(f => Path.GetFileName(f).Equals("secdrv.sys", StringComparison.OrdinalIgnoreCase));
|
||||
return GetSecdrvVersion(file);
|
||||
protections.Add($"secdrv.sys {GetSecdrvVersion(file)}");
|
||||
}
|
||||
else if (path.EndsWith(".SafeDiscDVD.bundle", StringComparison.OrdinalIgnoreCase))
|
||||
else if (path.Contains(".SafeDiscDVD.bundle")
|
||||
|| files.Any(f => f.Contains(".SafeDiscDVD.bundle")))
|
||||
{
|
||||
return "SafeDisc for Macintosh";
|
||||
protections.Add("SafeDisc for Macintosh");
|
||||
}
|
||||
|
||||
return null;
|
||||
if (protections.Count() == 0)
|
||||
return null;
|
||||
else
|
||||
return string.Join(", ", protections);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace BurnOutSharp
|
||||
|
||||
return protections;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get the path-detectable protections associated with a single path
|
||||
/// </summary>
|
||||
@@ -182,7 +182,6 @@ namespace BurnOutSharp
|
||||
/// <param name="files">Files contained within</param>
|
||||
/// <returns>Dictionary of list of strings representing the found protections</returns>
|
||||
private Dictionary<string, List<string>> GetDirectoryPathProtections(string path, List<string> files)
|
||||
|
||||
{
|
||||
// Create an empty list for protections
|
||||
List<string> protections = new List<string>();
|
||||
|
||||
Reference in New Issue
Block a user