From f7a25c7d2d2e296ff58fdf93c01ba735b07805f3 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 2 Dec 2024 14:51:48 -0500 Subject: [PATCH] Reduce content check boilerplate --- BinaryObjectScanner/Packer/EXEStealth.cs | 4 ---- BinaryObjectScanner/Protection/ActiveMARK.cs | 4 ---- BinaryObjectScanner/Protection/CDDVDCops.cs | 4 ---- BinaryObjectScanner/Protection/CactusDataShield.cs | 4 ---- BinaryObjectScanner/Protection/KeyLock.cs | 4 ---- BinaryObjectScanner/Protection/RingPROTECH.cs | 4 ---- 6 files changed, 24 deletions(-) diff --git a/BinaryObjectScanner/Packer/EXEStealth.cs b/BinaryObjectScanner/Packer/EXEStealth.cs index d693b18a..2af4de63 100644 --- a/BinaryObjectScanner/Packer/EXEStealth.cs +++ b/BinaryObjectScanner/Packer/EXEStealth.cs @@ -15,10 +15,6 @@ namespace BinaryObjectScanner.Packer /// public string? CheckContents(string file, byte[] fileContent, bool includeDebug) { - // Only allow during debug - if (!includeDebug) - return null; - // TODO: Obtain a sample to find where this string is in a typical executable var contentMatchSets = new List { diff --git a/BinaryObjectScanner/Protection/ActiveMARK.cs b/BinaryObjectScanner/Protection/ActiveMARK.cs index d0e50051..5caf7e1b 100644 --- a/BinaryObjectScanner/Protection/ActiveMARK.cs +++ b/BinaryObjectScanner/Protection/ActiveMARK.cs @@ -13,10 +13,6 @@ namespace BinaryObjectScanner.Protection /// public string? CheckContents(string file, byte[] fileContent, bool includeDebug) { - // Only allow during debug - if (!includeDebug) - return null; - // TODO: Obtain a sample to find where this string is in a typical executable var contentMatchSets = new List { diff --git a/BinaryObjectScanner/Protection/CDDVDCops.cs b/BinaryObjectScanner/Protection/CDDVDCops.cs index 007fb94e..6915e20b 100644 --- a/BinaryObjectScanner/Protection/CDDVDCops.cs +++ b/BinaryObjectScanner/Protection/CDDVDCops.cs @@ -71,10 +71,6 @@ namespace BinaryObjectScanner.Protection /// public string? CheckContents(string file, byte[] fileContent, bool includeDebug) { - // Only allow during debug - if (!includeDebug) - return null; - // TODO: Obtain a sample to find where this string is in a typical executable var contentMatchSets = new List { diff --git a/BinaryObjectScanner/Protection/CactusDataShield.cs b/BinaryObjectScanner/Protection/CactusDataShield.cs index 8bca7634..7d36ae45 100644 --- a/BinaryObjectScanner/Protection/CactusDataShield.cs +++ b/BinaryObjectScanner/Protection/CactusDataShield.cs @@ -10,10 +10,6 @@ namespace BinaryObjectScanner.Protection /// public string? CheckContents(string file, byte[] fileContent, bool includeDebug) { - // Only allow during debug - if (!includeDebug) - return null; - // TODO: Limit these checks to Mac binaries // TODO: Obtain a sample to find where this string is in a typical executable var contentMatchSets = new List diff --git a/BinaryObjectScanner/Protection/KeyLock.cs b/BinaryObjectScanner/Protection/KeyLock.cs index cd72d4c1..b3991fc1 100644 --- a/BinaryObjectScanner/Protection/KeyLock.cs +++ b/BinaryObjectScanner/Protection/KeyLock.cs @@ -10,10 +10,6 @@ namespace BinaryObjectScanner.Protection /// public string? CheckContents(string file, byte[] fileContent, bool includeDebug) { - // Only allow during debug - if (!includeDebug) - return null; - // TODO: Obtain a sample to find where this string is in a typical executable var contentMatchSets = new List { diff --git a/BinaryObjectScanner/Protection/RingPROTECH.cs b/BinaryObjectScanner/Protection/RingPROTECH.cs index 42622401..b023104a 100644 --- a/BinaryObjectScanner/Protection/RingPROTECH.cs +++ b/BinaryObjectScanner/Protection/RingPROTECH.cs @@ -13,10 +13,6 @@ namespace BinaryObjectScanner.Protection /// public string? CheckContents(string file, byte[] fileContent, bool includeDebug) { - // Only allow during debug - if (!includeDebug) - return null; - // TODO: Obtain a sample to find where this string is in a typical executable var contentMatchSets = new List {