From efef8d494e1c8d68e89512dd3c04ecf195d3ff26 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 27 Jan 2026 09:30:58 -0500 Subject: [PATCH] More cleanup --- BinaryObjectScanner/FileType/AACSMediaKeyBlock.cs | 1 + BinaryObjectScanner/FileType/BDPlusSVM.cs | 1 + BinaryObjectScanner/FileType/DetectableBaseT.cs | 1 + BinaryObjectScanner/FileType/DiskImage.cs | 1 + BinaryObjectScanner/FileType/Executable.cs | 1 + BinaryObjectScanner/FileType/ISO9660.cs | 1 + BinaryObjectScanner/FileType/LDSCRYPT.cs | 1 + BinaryObjectScanner/FileType/LinearExecutable.cs | 1 + BinaryObjectScanner/FileType/MSDOS.cs | 1 + BinaryObjectScanner/FileType/NewExecutable.cs | 1 + BinaryObjectScanner/FileType/PLJ.cs | 1 + BinaryObjectScanner/FileType/PortableExecutable.cs | 1 + BinaryObjectScanner/FileType/RealArcadeInstaller.cs | 1 + BinaryObjectScanner/FileType/RealArcadeMezzanine.cs | 1 + BinaryObjectScanner/FileType/SFFS.cs | 1 + BinaryObjectScanner/FileType/Textfile.cs | 1 - BinaryObjectScanner/Packer/UPX.cs | 2 ++ BinaryObjectScanner/Protection/AlphaROM.cs | 1 + BinaryObjectScanner/Protection/CDDVDCops.cs | 1 + BinaryObjectScanner/Protection/CactusDataShield.cs | 1 + BinaryObjectScanner/Protection/Denuvo.cs | 1 + BinaryObjectScanner/Protection/InterLok.cs | 1 + BinaryObjectScanner/Protection/Macrovision.CDilla.cs | 1 + BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs | 1 + BinaryObjectScanner/Protection/Macrovision.FLEXnet.cs | 1 + BinaryObjectScanner/Protection/Macrovision.RipGuard.cs | 1 + BinaryObjectScanner/Protection/Macrovision.SafeCast.cs | 1 + BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs | 1 + BinaryObjectScanner/Protection/Macrovision.SafeWrap.cs | 2 ++ BinaryObjectScanner/Protection/Macrovision.cs | 1 + .../Protection/{Phenoprotect.cs => PhenoProtect.cs} | 2 +- BinaryObjectScanner/Protection/ProtectDISC.cs | 1 + BinaryObjectScanner/Protection/SecuROM.cs | 1 + BinaryObjectScanner/Protection/StarForce.cs | 1 + BinaryObjectScanner/ProtectionProgress.cs | 3 ++- 35 files changed, 37 insertions(+), 3 deletions(-) rename BinaryObjectScanner/Protection/{Phenoprotect.cs => PhenoProtect.cs} (97%) diff --git a/BinaryObjectScanner/FileType/AACSMediaKeyBlock.cs b/BinaryObjectScanner/FileType/AACSMediaKeyBlock.cs index 00b2ac6e..fa262f22 100644 --- a/BinaryObjectScanner/FileType/AACSMediaKeyBlock.cs +++ b/BinaryObjectScanner/FileType/AACSMediaKeyBlock.cs @@ -1,5 +1,6 @@ using System.IO; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/BDPlusSVM.cs b/BinaryObjectScanner/FileType/BDPlusSVM.cs index 4b6ac987..73d3f64d 100644 --- a/BinaryObjectScanner/FileType/BDPlusSVM.cs +++ b/BinaryObjectScanner/FileType/BDPlusSVM.cs @@ -1,5 +1,6 @@ using System.IO; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/DetectableBaseT.cs b/BinaryObjectScanner/FileType/DetectableBaseT.cs index 366aa728..6599d416 100644 --- a/BinaryObjectScanner/FileType/DetectableBaseT.cs +++ b/BinaryObjectScanner/FileType/DetectableBaseT.cs @@ -1,6 +1,7 @@ using BinaryObjectScanner.Interfaces; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/DiskImage.cs b/BinaryObjectScanner/FileType/DiskImage.cs index a03b3988..6114413a 100644 --- a/BinaryObjectScanner/FileType/DiskImage.cs +++ b/BinaryObjectScanner/FileType/DiskImage.cs @@ -4,6 +4,7 @@ using BinaryObjectScanner.Interfaces; using SabreTools.IO.Extensions; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/Executable.cs b/BinaryObjectScanner/FileType/Executable.cs index 4f142cb8..79ecf418 100644 --- a/BinaryObjectScanner/FileType/Executable.cs +++ b/BinaryObjectScanner/FileType/Executable.cs @@ -6,6 +6,7 @@ using BinaryObjectScanner.Interfaces; using SabreTools.IO.Extensions; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/ISO9660.cs b/BinaryObjectScanner/FileType/ISO9660.cs index 5cbc8b6a..0de6ad6f 100644 --- a/BinaryObjectScanner/FileType/ISO9660.cs +++ b/BinaryObjectScanner/FileType/ISO9660.cs @@ -7,6 +7,7 @@ using BinaryObjectScanner.Data; using SabreTools.Data.Models.ISO9660; using SabreTools.IO.Extensions; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/LDSCRYPT.cs b/BinaryObjectScanner/FileType/LDSCRYPT.cs index c2197382..aa21034c 100644 --- a/BinaryObjectScanner/FileType/LDSCRYPT.cs +++ b/BinaryObjectScanner/FileType/LDSCRYPT.cs @@ -1,5 +1,6 @@ using System.IO; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/LinearExecutable.cs b/BinaryObjectScanner/FileType/LinearExecutable.cs index d3a3e34c..cae878f2 100644 --- a/BinaryObjectScanner/FileType/LinearExecutable.cs +++ b/BinaryObjectScanner/FileType/LinearExecutable.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using BinaryObjectScanner.Data; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/MSDOS.cs b/BinaryObjectScanner/FileType/MSDOS.cs index 6c2bc314..dc2c47a0 100644 --- a/BinaryObjectScanner/FileType/MSDOS.cs +++ b/BinaryObjectScanner/FileType/MSDOS.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using BinaryObjectScanner.Data; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/NewExecutable.cs b/BinaryObjectScanner/FileType/NewExecutable.cs index d5f10940..6c35c61e 100644 --- a/BinaryObjectScanner/FileType/NewExecutable.cs +++ b/BinaryObjectScanner/FileType/NewExecutable.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using BinaryObjectScanner.Data; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/PLJ.cs b/BinaryObjectScanner/FileType/PLJ.cs index 353dbe39..0c1f2fbe 100644 --- a/BinaryObjectScanner/FileType/PLJ.cs +++ b/BinaryObjectScanner/FileType/PLJ.cs @@ -1,6 +1,7 @@ using System.IO; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/PortableExecutable.cs b/BinaryObjectScanner/FileType/PortableExecutable.cs index a2aa3ded..d8baf413 100644 --- a/BinaryObjectScanner/FileType/PortableExecutable.cs +++ b/BinaryObjectScanner/FileType/PortableExecutable.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using BinaryObjectScanner.Data; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/RealArcadeInstaller.cs b/BinaryObjectScanner/FileType/RealArcadeInstaller.cs index 64ec6a05..6b1ba742 100644 --- a/BinaryObjectScanner/FileType/RealArcadeInstaller.cs +++ b/BinaryObjectScanner/FileType/RealArcadeInstaller.cs @@ -1,5 +1,6 @@ using System.IO; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/RealArcadeMezzanine.cs b/BinaryObjectScanner/FileType/RealArcadeMezzanine.cs index 34f82a85..3448a409 100644 --- a/BinaryObjectScanner/FileType/RealArcadeMezzanine.cs +++ b/BinaryObjectScanner/FileType/RealArcadeMezzanine.cs @@ -1,5 +1,6 @@ using System.IO; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/SFFS.cs b/BinaryObjectScanner/FileType/SFFS.cs index 2cc66aa4..0c30f1c9 100644 --- a/BinaryObjectScanner/FileType/SFFS.cs +++ b/BinaryObjectScanner/FileType/SFFS.cs @@ -1,5 +1,6 @@ using System.IO; +#pragma warning disable IDE0290 // Use primary constructor namespace BinaryObjectScanner.FileType { /// diff --git a/BinaryObjectScanner/FileType/Textfile.cs b/BinaryObjectScanner/FileType/Textfile.cs index 52400a39..d21e5ab3 100644 --- a/BinaryObjectScanner/FileType/Textfile.cs +++ b/BinaryObjectScanner/FileType/Textfile.cs @@ -153,7 +153,6 @@ namespace BinaryObjectScanner.FileType protections.Add("SafeDiscLT for Macintosh (Unknown Version - Please report to us on GitHub)"); } - // The full line from a sample is as follows: // // The files securom_v7_01.dat and securom_v7_01.bak have been created during the installation of a SecuROM protected application. diff --git a/BinaryObjectScanner/Packer/UPX.cs b/BinaryObjectScanner/Packer/UPX.cs index 029b7bab..b7384666 100644 --- a/BinaryObjectScanner/Packer/UPX.cs +++ b/BinaryObjectScanner/Packer/UPX.cs @@ -4,6 +4,8 @@ using System.Text.RegularExpressions; using BinaryObjectScanner.Interfaces; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter +#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute' namespace BinaryObjectScanner.Packer { // TODO: Add extraction diff --git a/BinaryObjectScanner/Protection/AlphaROM.cs b/BinaryObjectScanner/Protection/AlphaROM.cs index 1d0e30f4..72a6c213 100644 --- a/BinaryObjectScanner/Protection/AlphaROM.cs +++ b/BinaryObjectScanner/Protection/AlphaROM.cs @@ -6,6 +6,7 @@ using SabreTools.Data.Models.ISO9660; using SabreTools.IO.Extensions; using SabreTools.Serialization.Wrappers; +#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute' namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/CDDVDCops.cs b/BinaryObjectScanner/Protection/CDDVDCops.cs index 1d3b1bd4..f8970f0f 100644 --- a/BinaryObjectScanner/Protection/CDDVDCops.cs +++ b/BinaryObjectScanner/Protection/CDDVDCops.cs @@ -8,6 +8,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute' namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/CactusDataShield.cs b/BinaryObjectScanner/Protection/CactusDataShield.cs index c34b87a1..4c99a42b 100644 --- a/BinaryObjectScanner/Protection/CactusDataShield.cs +++ b/BinaryObjectScanner/Protection/CactusDataShield.cs @@ -3,6 +3,7 @@ using BinaryObjectScanner.Interfaces; using SabreTools.IO; using SabreTools.IO.Matching; +#pragma warning disable IDE0230 // Use UTF-8 string literal namespace BinaryObjectScanner.Protection { public class CactusDataShield : IContentCheck diff --git a/BinaryObjectScanner/Protection/Denuvo.cs b/BinaryObjectScanner/Protection/Denuvo.cs index eeec56ee..d4bab097 100644 --- a/BinaryObjectScanner/Protection/Denuvo.cs +++ b/BinaryObjectScanner/Protection/Denuvo.cs @@ -7,6 +7,7 @@ using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; using OHMN = SabreTools.Data.Models.COFF.OptionalHeaderMagicNumber; +#pragma warning disable IDE0230 // Use UTF-8 string literal namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/InterLok.cs b/BinaryObjectScanner/Protection/InterLok.cs index cba918b6..c87367c3 100644 --- a/BinaryObjectScanner/Protection/InterLok.cs +++ b/BinaryObjectScanner/Protection/InterLok.cs @@ -2,6 +2,7 @@ using System.Text.RegularExpressions; using BinaryObjectScanner.Interfaces; using SabreTools.Serialization.Wrappers; +#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute' namespace BinaryObjectScanner.Protection { public class InterLok : IExecutableCheck diff --git a/BinaryObjectScanner/Protection/Macrovision.CDilla.cs b/BinaryObjectScanner/Protection/Macrovision.CDilla.cs index 85b9c4fb..358b1d5e 100644 --- a/BinaryObjectScanner/Protection/Macrovision.CDilla.cs +++ b/BinaryObjectScanner/Protection/Macrovision.CDilla.cs @@ -5,6 +5,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs b/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs index 58f488b6..99498238 100644 --- a/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs +++ b/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs @@ -7,6 +7,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.FLEXnet.cs b/BinaryObjectScanner/Protection/Macrovision.FLEXnet.cs index 640b2edb..0cfcda13 100644 --- a/BinaryObjectScanner/Protection/Macrovision.FLEXnet.cs +++ b/BinaryObjectScanner/Protection/Macrovision.FLEXnet.cs @@ -5,6 +5,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.RipGuard.cs b/BinaryObjectScanner/Protection/Macrovision.RipGuard.cs index f4cefcf4..2671072c 100644 --- a/BinaryObjectScanner/Protection/Macrovision.RipGuard.cs +++ b/BinaryObjectScanner/Protection/Macrovision.RipGuard.cs @@ -6,6 +6,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs b/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs index 6bf71c78..c9119de2 100644 --- a/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs +++ b/BinaryObjectScanner/Protection/Macrovision.SafeCast.cs @@ -6,6 +6,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs b/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs index d694469a..00a7050c 100644 --- a/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs +++ b/BinaryObjectScanner/Protection/Macrovision.SafeDisc.cs @@ -7,6 +7,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.SafeWrap.cs b/BinaryObjectScanner/Protection/Macrovision.SafeWrap.cs index cb28503f..36cdde0a 100644 --- a/BinaryObjectScanner/Protection/Macrovision.SafeWrap.cs +++ b/BinaryObjectScanner/Protection/Macrovision.SafeWrap.cs @@ -1,5 +1,7 @@ using SabreTools.Serialization.Wrappers; +#pragma warning disable CA1822 // Mark members as static +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Macrovision.cs b/BinaryObjectScanner/Protection/Macrovision.cs index 354983bf..46f0b738 100644 --- a/BinaryObjectScanner/Protection/Macrovision.cs +++ b/BinaryObjectScanner/Protection/Macrovision.cs @@ -8,6 +8,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable IDE0060 // Remove unused parameter namespace BinaryObjectScanner.Protection { /// diff --git a/BinaryObjectScanner/Protection/Phenoprotect.cs b/BinaryObjectScanner/Protection/PhenoProtect.cs similarity index 97% rename from BinaryObjectScanner/Protection/Phenoprotect.cs rename to BinaryObjectScanner/Protection/PhenoProtect.cs index d26a7aea..275a3238 100644 --- a/BinaryObjectScanner/Protection/Phenoprotect.cs +++ b/BinaryObjectScanner/Protection/PhenoProtect.cs @@ -1,6 +1,6 @@ namespace BinaryObjectScanner.Protection { - public class phenoProtect + public class PhenoProtect { // Currently implemented as a text file check, more checks are likely possible but currently unknown. // Current checks based off Redump entry 84082 are found in the InstallShield setup.inx file, but the game also checks if the original disc is present in the drive after installation as well, so it seems unlikely for the InstallShield check to be relevant at that stage. diff --git a/BinaryObjectScanner/Protection/ProtectDISC.cs b/BinaryObjectScanner/Protection/ProtectDISC.cs index 6c8ce081..df898d1a 100644 --- a/BinaryObjectScanner/Protection/ProtectDISC.cs +++ b/BinaryObjectScanner/Protection/ProtectDISC.cs @@ -9,6 +9,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute' namespace BinaryObjectScanner.Protection { // This protection was called VOB ProtectCD / ProtectDVD in versions prior to 6 diff --git a/BinaryObjectScanner/Protection/SecuROM.cs b/BinaryObjectScanner/Protection/SecuROM.cs index b920c340..85f5f514 100644 --- a/BinaryObjectScanner/Protection/SecuROM.cs +++ b/BinaryObjectScanner/Protection/SecuROM.cs @@ -9,6 +9,7 @@ using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; using static SabreTools.Data.Models.SecuROM.Constants; +#pragma warning disable IDE0059 // Unnecessary assignment of value namespace BinaryObjectScanner.Protection { // TODO: Investigate SecuROM for Macintosh diff --git a/BinaryObjectScanner/Protection/StarForce.cs b/BinaryObjectScanner/Protection/StarForce.cs index 0209ad47..d712c502 100644 --- a/BinaryObjectScanner/Protection/StarForce.cs +++ b/BinaryObjectScanner/Protection/StarForce.cs @@ -8,6 +8,7 @@ using SabreTools.IO.Extensions; using SabreTools.IO.Matching; using SabreTools.Serialization.Wrappers; +#pragma warning disable SYSLIB1045 // Convert to 'GeneratedRegexAttribute' namespace BinaryObjectScanner.Protection { public class StarForce : IDiskImageCheck, IExecutableCheck, IPathCheck diff --git a/BinaryObjectScanner/ProtectionProgress.cs b/BinaryObjectScanner/ProtectionProgress.cs index 87dd8683..790d7a85 100644 --- a/BinaryObjectScanner/ProtectionProgress.cs +++ b/BinaryObjectScanner/ProtectionProgress.cs @@ -1,4 +1,5 @@ -namespace BinaryObjectScanner +#pragma warning disable IDE0290 // Use primary constructor +namespace BinaryObjectScanner { /// /// Struct representing protection scanning progress