mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-18 04:02:46 +00:00
Add VOB-PCD.KEY detection
This commit is contained in:
@@ -4,13 +4,14 @@ using System.Linq;
|
||||
using BinaryObjectScanner.Interfaces;
|
||||
using SabreTools.Matching;
|
||||
using SabreTools.Matching.Content;
|
||||
using SabreTools.Matching.Paths;
|
||||
using SabreTools.Serialization.Wrappers;
|
||||
|
||||
namespace BinaryObjectScanner.Protection
|
||||
{
|
||||
// This protection was called VOB ProtectCD / ProtectDVD in versions prior to 6
|
||||
// ProtectDISC 9/10 checks for the presence of CSS on the disc to run, but don't encrypt any sectors or check for keys. Confirmed in Redump entries 78367 and 110095.
|
||||
public class ProtectDISC : IPortableExecutableCheck
|
||||
public class ProtectDISC : IPortableExecutableCheck, IPathCheck
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public string? CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
|
||||
@@ -95,6 +96,30 @@ namespace BinaryObjectScanner.Protection
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> CheckDirectoryPath(string path, IEnumerable<string>? files)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
// https://github.com/SabreTools/BinaryObjectScanner/issues/110
|
||||
new(new FilePathMatch("VOB-PCD.KEY"), "VOB ProtectCD/DVD"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetAllMatches(files, matchers, any: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? CheckFilePath(string path)
|
||||
{
|
||||
var matchers = new List<PathMatchSet>
|
||||
{
|
||||
// https://github.com/SabreTools/BinaryObjectScanner/issues/110
|
||||
new(new FilePathMatch("VOB-PCD.KEY"), "VOB ProtectCD/DVD"),
|
||||
};
|
||||
|
||||
return MatchUtil.GetFirstMatch(path, matchers, any: true);
|
||||
}
|
||||
|
||||
public static string GetOldVersion(string matchedString)
|
||||
{
|
||||
// Remove unnecessary parts
|
||||
|
||||
@@ -114,7 +114,7 @@ Below is a list of protections detected by BinaryObjectScanner. The two columns
|
||||
| Origin | True | True | |
|
||||
| phenoProtect | False | False | Text file check only |
|
||||
| PlayJ | True | True | |
|
||||
| ProtectDISC / VOB ProtectCD/DVD | True | False | |
|
||||
| ProtectDISC / VOB ProtectCD/DVD | True | True | |
|
||||
| Protect DVD-Video | False | True | Unconfirmed¹ |
|
||||
| PlayStation Anti-modchip | True | False | En/Jp, not "Red Hand"; PSX executables only |
|
||||
| Rainbow Sentinel | True | True | |
|
||||
|
||||
Reference in New Issue
Block a user