From 11a82addd8133de5c36913c9036dacf52e796329 Mon Sep 17 00:00:00 2001 From: SilasLaspada Date: Sun, 14 Mar 2021 15:23:24 -0600 Subject: [PATCH] Implement BD+ detection (#24) --- BurnOutSharp/ProtectionType/BD+.cs | 27 +++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 28 insertions(+) create mode 100644 BurnOutSharp/ProtectionType/BD+.cs diff --git a/BurnOutSharp/ProtectionType/BD+.cs b/BurnOutSharp/ProtectionType/BD+.cs new file mode 100644 index 00000000..1cfed3d2 --- /dev/null +++ b/BurnOutSharp/ProtectionType/BD+.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace BurnOutSharp.ProtectionType +{ + public class BDPlus : IPathCheck + { + // TODO: Figure out how to detect version + /// + public string CheckPath(string path, bool isDirectory, IEnumerable files) + { + // Multiple .svm files should always be present, but as far as I can tell, 00000.svm is the first one made and should be present no matter what. + if (isDirectory) + { + if (files.Any(f => f.Contains(Path.Combine("BDSVM", "00000.svm"))) + && files.Any(f => f.Contains(Path.Combine("BDSVM", "BACKUP", "00000.svm")))) + { + return "BD+"; + } + } + return null; + } + } +} + diff --git a/README.md b/README.md index dedcb629..45f9f0be 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Below is a list of the protections that can be detected using this code: - ActiveMARK / ActiveMARK 5 - Alpha-DVD - Alpha-ROM +- BD+ - Bitpool - ByteShield - Cactus Data Shield