diff --git a/BinaryObjectScanner/Handler.cs b/BinaryObjectScanner/Handler.cs
index b0ccc104..d89826fb 100644
--- a/BinaryObjectScanner/Handler.cs
+++ b/BinaryObjectScanner/Handler.cs
@@ -1,14 +1,10 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Utilities;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner
diff --git a/BinaryObjectScanner/Interfaces/IPathCheck.cs b/BinaryObjectScanner/Interfaces/IPathCheck.cs
index 4d081966..e12dee29 100644
--- a/BinaryObjectScanner/Interfaces/IPathCheck.cs
+++ b/BinaryObjectScanner/Interfaces/IPathCheck.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace BinaryObjectScanner.Interfaces
{
@@ -19,11 +16,7 @@ public interface IPathCheck
/// Path to check for protection indicators
/// Enumerable of strings representing files in a directory
/// This can do some limited content checking as well, but it's suggested to use a content check instead, if possible
-#if NET20 || NET35
- Queue CheckDirectoryPath(string path, IEnumerable? files);
-#else
- ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files);
-#endif
+ IEnumerable CheckDirectoryPath(string path, IEnumerable? files);
///
/// Check a file path for protections based on path name
diff --git a/BinaryObjectScanner/Protection/AegiSoft.cs b/BinaryObjectScanner/Protection/AegiSoft.cs
index bc0731d0..558ba207 100644
--- a/BinaryObjectScanner/Protection/AegiSoft.cs
+++ b/BinaryObjectScanner/Protection/AegiSoft.cs
@@ -71,11 +71,7 @@ public class AegiSoft : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/AlphaDVD.cs b/BinaryObjectScanner/Protection/AlphaDVD.cs
index a120c8a8..c7c52b33 100644
--- a/BinaryObjectScanner/Protection/AlphaDVD.cs
+++ b/BinaryObjectScanner/Protection/AlphaDVD.cs
@@ -19,11 +19,7 @@ namespace BinaryObjectScanner.Protection
public class AlphaDVD : IPathCheck
{
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/Bitpool.cs b/BinaryObjectScanner/Protection/Bitpool.cs
index c6260d4c..61c3f382 100644
--- a/BinaryObjectScanner/Protection/Bitpool.cs
+++ b/BinaryObjectScanner/Protection/Bitpool.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -16,11 +13,7 @@ namespace BinaryObjectScanner.Protection
public class Bitpool : IPathCheck
{
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/ByteShield.cs b/BinaryObjectScanner/Protection/ByteShield.cs
index 42f2d4c4..601c5ecc 100644
--- a/BinaryObjectScanner/Protection/ByteShield.cs
+++ b/BinaryObjectScanner/Protection/ByteShield.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -133,11 +130,7 @@ public class ByteShield : IPortableExecutableCheck, IPathCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
// TODO: Investigate reference to "bbz650.tmp" in "Byteshield.dll" (Redump entry 6236)
// Files with the ".bbz" extension are associated with ByteShield, but the extenstion is known to be used in other places as well.
diff --git a/BinaryObjectScanner/Protection/CDDVDCops.cs b/BinaryObjectScanner/Protection/CDDVDCops.cs
index 4aac0d15..1773824d 100644
--- a/BinaryObjectScanner/Protection/CDDVDCops.cs
+++ b/BinaryObjectScanner/Protection/CDDVDCops.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -185,11 +182,7 @@ public class CDDVDCops : IContentCheck, INewExecutableCheck, IPathCheck, IPortab
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
// TODO: Original had "CDCOPS.DLL" required and all the rest in a combined OR
var matchers = new List
diff --git a/BinaryObjectScanner/Protection/CDGuard.cs b/BinaryObjectScanner/Protection/CDGuard.cs
index 6a8b03a0..988c5157 100644
--- a/BinaryObjectScanner/Protection/CDGuard.cs
+++ b/BinaryObjectScanner/Protection/CDGuard.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -58,11 +55,7 @@ public class CDGuard : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/CDLock.cs b/BinaryObjectScanner/Protection/CDLock.cs
index db121d9c..9756f4f9 100644
--- a/BinaryObjectScanner/Protection/CDLock.cs
+++ b/BinaryObjectScanner/Protection/CDLock.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Content;
@@ -65,18 +62,14 @@ public class CDLock : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
// TODO: Determine if there's any consistency in the naming of the additional AFP files.
// Found in every confirmed sample of CD-Lock, generally (but not always) appears to include markers relating to the additional AFP files present (Redump entries 24287 and 31615).
- new(new PathMatch("CONFIG.AFP", useEndsWith: true), "CD-Lock"),
+ new(new FilePathMatch("CONFIG.AFP"), "CD-Lock"),
// There is also a "$$$$$$$$.$$$" file present on some discs, but it isn't known if this is directly related to CD-Lock (Redump entries 37788 and 43221).
};
@@ -92,7 +85,7 @@ public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/CDX.cs b/BinaryObjectScanner/Protection/CDX.cs
index eb25caec..3ec1de52 100644
--- a/BinaryObjectScanner/Protection/CDX.cs
+++ b/BinaryObjectScanner/Protection/CDX.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -15,11 +12,7 @@ namespace BinaryObjectScanner.Protection
public class CDX : IPathCheck
{
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
// TODO: Verify if these are OR or AND
var matchers = new List
diff --git a/BinaryObjectScanner/Protection/CenegaProtectDVD.cs b/BinaryObjectScanner/Protection/CenegaProtectDVD.cs
index dd5a3e75..e07e3853 100644
--- a/BinaryObjectScanner/Protection/CenegaProtectDVD.cs
+++ b/BinaryObjectScanner/Protection/CenegaProtectDVD.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -56,11 +53,7 @@ public class CengaProtectDVD : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/Channelware.cs b/BinaryObjectScanner/Protection/Channelware.cs
index fe03cd3c..d7f1e62e 100644
--- a/BinaryObjectScanner/Protection/Channelware.cs
+++ b/BinaryObjectScanner/Protection/Channelware.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -64,11 +61,7 @@ public class Channelware : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/ChosenBytesCodeLock.cs b/BinaryObjectScanner/Protection/ChosenBytesCodeLock.cs
index 257874c8..eb5d21e2 100644
--- a/BinaryObjectScanner/Protection/ChosenBytesCodeLock.cs
+++ b/BinaryObjectScanner/Protection/ChosenBytesCodeLock.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -57,11 +54,7 @@ public class ChosenBytesCodeLock : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/CopyKiller.cs b/BinaryObjectScanner/Protection/CopyKiller.cs
index 02e8fea8..2c43b1ab 100644
--- a/BinaryObjectScanner/Protection/CopyKiller.cs
+++ b/BinaryObjectScanner/Protection/CopyKiller.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -39,11 +36,7 @@ public class CopyKiller : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
// Previous versions of BOS noted to look at ".PFF" files as possible indicators of CopyKiller, but those files seem unrelated.
// TODO: Figure out why this doesn't work.
diff --git a/BinaryObjectScanner/Protection/CopyX.cs b/BinaryObjectScanner/Protection/CopyX.cs
index ea510ece..158bd15a 100644
--- a/BinaryObjectScanner/Protection/CopyX.cs
+++ b/BinaryObjectScanner/Protection/CopyX.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -96,17 +93,9 @@ public class CopyX : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
-#if NET20 || NET35
- var protections = new Queue();
-#else
- var protections = new ConcurrentQueue();
-#endif
+ var protections = new List();
if (files == null)
return protections;
@@ -167,7 +156,7 @@ public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/DVDCrypt.cs b/BinaryObjectScanner/Protection/DVDCrypt.cs
index 620232e4..0940e87e 100644
--- a/BinaryObjectScanner/Protection/DVDCrypt.cs
+++ b/BinaryObjectScanner/Protection/DVDCrypt.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -11,11 +8,7 @@ namespace BinaryObjectScanner.Protection
public class DVDCrypt : IPathCheck
{
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/DVDMoviePROTECT.cs b/BinaryObjectScanner/Protection/DVDMoviePROTECT.cs
index 75c0c891..270b4e91 100644
--- a/BinaryObjectScanner/Protection/DVDMoviePROTECT.cs
+++ b/BinaryObjectScanner/Protection/DVDMoviePROTECT.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -12,17 +9,9 @@ namespace BinaryObjectScanner.Protection
public class DVDMoviePROTECT : IPathCheck
{
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
-#if NET20 || NET35
- var protections = new Queue();
-#else
- var protections = new ConcurrentQueue();
-#endif
+ var protections = new List();
if (files == null)
return protections;
@@ -38,7 +27,7 @@ public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/DigiGuard.cs b/BinaryObjectScanner/Protection/DigiGuard.cs
index 54131d9b..4ccc7b3a 100644
--- a/BinaryObjectScanner/Protection/DigiGuard.cs
+++ b/BinaryObjectScanner/Protection/DigiGuard.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -55,11 +52,7 @@ public class DigiGuard : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/DinamicMultimedia.cs b/BinaryObjectScanner/Protection/DinamicMultimedia.cs
index d58b60e9..fc73bd24 100644
--- a/BinaryObjectScanner/Protection/DinamicMultimedia.cs
+++ b/BinaryObjectScanner/Protection/DinamicMultimedia.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -25,24 +22,20 @@ public class DinamicMultimedia : IPathCheck
// https://www.gamecopyworld.com/games/pc_pc_calcio_2000.shtml
// https://www.gamecopyworld.com/games/pc_pc_futbol_2000.shtml
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
// Many more checks are likely possible based on the sources, but only ones that have been personally verified are getting added.
// Uncopyable files found in at least http://redump.org/disc/70531/, and likely in multiple others.
- new(new PathMatch(Path.Combine("XCONTROL", "COMPPLAY._01").Replace("\\", "/"), useEndsWith: true), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
- new(new PathMatch(Path.Combine("XCONTROL", "LANDER.DA0").Replace("\\", "/"), useEndsWith: true), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
- new(new PathMatch(Path.Combine("XCONTROL", "XSMGOP.DAP").Replace("\\", "/"), useEndsWith: true), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
- new(new PathMatch(Path.Combine("XCONTROL", "XSMGOP.VBX").Replace("\\", "/"), useEndsWith: true), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
+ new(new FilePathMatch(Path.Combine("XCONTROL", "COMPPLAY._01")), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
+ new(new FilePathMatch(Path.Combine("XCONTROL", "LANDER.DA0")), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
+ new(new FilePathMatch(Path.Combine("XCONTROL", "XSMGOP.DAP")), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
+ new(new FilePathMatch(Path.Combine("XCONTROL", "XSMGOP.VBX")), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
// Copyable file found in http://redump.org/disc/70531/ that seems to be exclusively associated with the protection and other files that are part of the protection.
- new(new PathMatch(Path.Combine("XCONTROL", "COMPSCO._01").Replace("\\", "/"), useEndsWith: true), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
+ new(new PathMatch(Path.Combine("XCONTROL", "COMPSCO._01")), "Dinamic Multimedia Protection/LockBlocks [Check disc for 2 physical rings]"),
};
return MatchUtil.GetAllMatches(files, matchers, any: true);
@@ -56,15 +49,15 @@ public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
@@ -191,7 +184,7 @@ public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable
- private string GetVersion(PortableExecutable pex)
+ private static string GetVersion(PortableExecutable pex)
{
// Check the internal versions
var version = pex.GetInternalVersion();
@@ -216,7 +209,7 @@ private string GetVersion(PortableExecutable pex)
return string.Empty;
}
- private string GetInternalVersion(string firstMatchedString)
+ private static string GetInternalVersion(string firstMatchedString)
{
try
{
diff --git a/BinaryObjectScanner/Protection/EAAntiCheat.cs b/BinaryObjectScanner/Protection/EAAntiCheat.cs
index a35a8dc1..e297259a 100644
--- a/BinaryObjectScanner/Protection/EAAntiCheat.cs
+++ b/BinaryObjectScanner/Protection/EAAntiCheat.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -49,11 +46,7 @@ public class EAAntiCheat : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/EasyAntiCheat.cs b/BinaryObjectScanner/Protection/EasyAntiCheat.cs
index 6d98dd43..82a8a9e7 100644
--- a/BinaryObjectScanner/Protection/EasyAntiCheat.cs
+++ b/BinaryObjectScanner/Protection/EasyAntiCheat.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -83,11 +80,7 @@ public class EasyAntiCheat : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
// TODO: Search for the presence of the folder "EasyAntiCheat" specifically, which is present in every checked version so far.
var matchers = new List
diff --git a/BinaryObjectScanner/Protection/Engine32.cs b/BinaryObjectScanner/Protection/Engine32.cs
index 927b3d26..cfadab8a 100644
--- a/BinaryObjectScanner/Protection/Engine32.cs
+++ b/BinaryObjectScanner/Protection/Engine32.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -54,11 +51,7 @@ public class Engine32 : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/FreeLock.cs b/BinaryObjectScanner/Protection/FreeLock.cs
index b112b913..988d5c9d 100644
--- a/BinaryObjectScanner/Protection/FreeLock.cs
+++ b/BinaryObjectScanner/Protection/FreeLock.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -18,11 +15,7 @@ public class Freelock : IPathCheck
// TODO: Add an MS-DOS executable check for "FREELOCK.EXE".
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/GFWL.cs b/BinaryObjectScanner/Protection/GFWL.cs
index 604fa0d1..3b2b722f 100644
--- a/BinaryObjectScanner/Protection/GFWL.cs
+++ b/BinaryObjectScanner/Protection/GFWL.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -39,11 +36,7 @@ public class GFWL : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/Gefest.cs b/BinaryObjectScanner/Protection/Gefest.cs
index ef11d61a..4480384a 100644
--- a/BinaryObjectScanner/Protection/Gefest.cs
+++ b/BinaryObjectScanner/Protection/Gefest.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -42,11 +39,7 @@ public class Gefest : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/HexaLock.cs b/BinaryObjectScanner/Protection/HexaLock.cs
index 343ea40b..80f9fbb0 100644
--- a/BinaryObjectScanner/Protection/HexaLock.cs
+++ b/BinaryObjectScanner/Protection/HexaLock.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -71,11 +68,7 @@ public class HexalockAutoLock : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/ImpulseReactor.cs b/BinaryObjectScanner/Protection/ImpulseReactor.cs
index 82fbdd1a..d5ba9261 100644
--- a/BinaryObjectScanner/Protection/ImpulseReactor.cs
+++ b/BinaryObjectScanner/Protection/ImpulseReactor.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
@@ -57,11 +54,7 @@ public class ImpulseReactor : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/IndyVCD.cs b/BinaryObjectScanner/Protection/IndyVCD.cs
index 70f80688..8c0f53fd 100644
--- a/BinaryObjectScanner/Protection/IndyVCD.cs
+++ b/BinaryObjectScanner/Protection/IndyVCD.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
using SabreTools.Matching.Paths;
@@ -15,11 +12,7 @@ namespace BinaryObjectScanner.Protection
public class IndyVCD : IPathCheck
{
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
// TODO: Verify if these are OR or AND
var matchers = new List
diff --git a/BinaryObjectScanner/Protection/KalypsoLauncher.cs b/BinaryObjectScanner/Protection/KalypsoLauncher.cs
index e8d2cdc8..1816335e 100644
--- a/BinaryObjectScanner/Protection/KalypsoLauncher.cs
+++ b/BinaryObjectScanner/Protection/KalypsoLauncher.cs
@@ -1,7 +1,4 @@
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
using SabreTools.Matching;
@@ -60,11 +57,7 @@ public class KalypsoLauncher : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/LabelGate.cs b/BinaryObjectScanner/Protection/LabelGate.cs
index f7b43ffc..9afbcdfa 100644
--- a/BinaryObjectScanner/Protection/LabelGate.cs
+++ b/BinaryObjectScanner/Protection/LabelGate.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -52,11 +49,7 @@ public class LabelGate : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/LaserLok.cs b/BinaryObjectScanner/Protection/LaserLok.cs
index d2f482b4..fdcdf3f1 100644
--- a/BinaryObjectScanner/Protection/LaserLok.cs
+++ b/BinaryObjectScanner/Protection/LaserLok.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -114,11 +111,7 @@ public class LaserLok : IPathCheck, IPortableExecutableCheck
}
///
-#if NET20 || NET35
- public Queue CheckDirectoryPath(string path, IEnumerable? files)
-#else
- public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ public IEnumerable CheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/Macrovision.CDilla.cs b/BinaryObjectScanner/Protection/Macrovision.CDilla.cs
index 2545e938..72096ada 100644
--- a/BinaryObjectScanner/Protection/Macrovision.CDilla.cs
+++ b/BinaryObjectScanner/Protection/Macrovision.CDilla.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.Linq;
using SabreTools.Matching;
@@ -151,11 +148,7 @@ public partial class Macrovision
}
///
-#if NET20 || NET35
- internal Queue CDillaCheckDirectoryPath(string path, IEnumerable? files)
-#else
- internal ConcurrentQueue CDillaCheckDirectoryPath(string path, IEnumerable? files)
-#endif
+ internal IEnumerable CDillaCheckDirectoryPath(string path, IEnumerable? files)
{
var matchers = new List
{
diff --git a/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs b/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs
index 85b2f91f..57486447 100644
--- a/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs
+++ b/BinaryObjectScanner/Protection/Macrovision.CactusDataShield.cs
@@ -1,7 +1,4 @@
using System;
-#if NET40_OR_GREATER || NETCOREAPP
-using System.Collections.Concurrent;
-#endif
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -67,11 +64,7 @@ public partial class Macrovision
}
///
-#if NET20 || NET35
- internal Queue CactusDataShieldCheckDirectoryPath(string path, IEnumerable? files)
-#else
- internal ConcurrentQueue