diff --git a/BinaryObjectScanner.FileType/BinaryObjectScanner.FileType.csproj b/BinaryObjectScanner.FileType/BinaryObjectScanner.FileType.csproj
index aa8cc668..1f87ea98 100644
--- a/BinaryObjectScanner.FileType/BinaryObjectScanner.FileType.csproj
+++ b/BinaryObjectScanner.FileType/BinaryObjectScanner.FileType.csproj
@@ -23,7 +23,6 @@
-
@@ -31,6 +30,7 @@
+
diff --git a/BinaryObjectScanner.FileType/LDSCRYPT.cs b/BinaryObjectScanner.FileType/LDSCRYPT.cs
index 937f936a..5c2862b1 100644
--- a/BinaryObjectScanner.FileType/LDSCRYPT.cs
+++ b/BinaryObjectScanner.FileType/LDSCRYPT.cs
@@ -1,7 +1,7 @@
using System;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.FileType
{
diff --git a/BinaryObjectScanner.FileType/PLJ.cs b/BinaryObjectScanner.FileType/PLJ.cs
index c373683d..5ab0b6bb 100644
--- a/BinaryObjectScanner.FileType/PLJ.cs
+++ b/BinaryObjectScanner.FileType/PLJ.cs
@@ -1,7 +1,7 @@
using System;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.FileType
{
diff --git a/BinaryObjectScanner.FileType/SFFS.cs b/BinaryObjectScanner.FileType/SFFS.cs
index de3f06fa..b035b346 100644
--- a/BinaryObjectScanner.FileType/SFFS.cs
+++ b/BinaryObjectScanner.FileType/SFFS.cs
@@ -1,7 +1,7 @@
using System;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.FileType
{
diff --git a/BinaryObjectScanner.GameEngine/BinaryObjectScanner.GameEngine.csproj b/BinaryObjectScanner.GameEngine/BinaryObjectScanner.GameEngine.csproj
index 444c1642..f036a0bb 100644
--- a/BinaryObjectScanner.GameEngine/BinaryObjectScanner.GameEngine.csproj
+++ b/BinaryObjectScanner.GameEngine/BinaryObjectScanner.GameEngine.csproj
@@ -21,8 +21,11 @@
-
+
+
+
+
diff --git a/BinaryObjectScanner.Matching/BinaryObjectScanner.Matching.csproj b/BinaryObjectScanner.Matching/BinaryObjectScanner.Matching.csproj
deleted file mode 100644
index 8749a9d2..00000000
--- a/BinaryObjectScanner.Matching/BinaryObjectScanner.Matching.csproj
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
- net48;net6.0;net7.0
- win-x86;win-x64;linux-x64;osx-x64
- 2.8
- true
-
-
- Matt Nadareski
- BurnOutSharp
- Copyright (c)2018-2023 Matt Nadareski
- https://github.com/SabreTools/
- https://github.com/mnadareski/BurnOutSharp
- git
- MIT
- true
- true
-
-
-
- enable
-
-
-
diff --git a/BinaryObjectScanner.Matching/ContentMatch.cs b/BinaryObjectScanner.Matching/ContentMatch.cs
deleted file mode 100644
index 0443c36f..00000000
--- a/BinaryObjectScanner.Matching/ContentMatch.cs
+++ /dev/null
@@ -1,220 +0,0 @@
-using System.IO;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// Content matching criteria
- ///
- public class ContentMatch : IMatch
- {
- ///
- /// Content to match
- ///
-#if NET48
- public byte?[] Needle { get; set; }
-#else
- public byte?[]? Needle { get; init; }
-#endif
-
- ///
- /// Starting index for matching
- ///
- public int Start { get; internal set; }
-
- ///
- /// Ending index for matching
- ///
-#if NET48
- public int End { get; private set; }
-#else
- public int End { get; init; }
-#endif
-
- ///
- /// Constructor
- ///
- /// Byte array representing the search
- /// Optional starting index
- /// Optional ending index
-#if NET48
- public ContentMatch(byte?[] needle, int start = -1, int end = -1)
-#else
- public ContentMatch(byte?[]? needle, int start = -1, int end = -1)
-#endif
- {
- this.Needle = needle;
- this.Start = start;
- this.End = end;
- }
-
- #region Array Matching
-
- ///
- /// Get if this match can be found in a stack
- ///
- /// Array to search for the given content
- /// True to search from the end of the array, false from the start
- /// Tuple of success and found position
- public (bool success, int position) Match(byte[] stack, bool reverse = false)
- {
- // If either array is null or empty, we can't do anything
- if (stack == null || stack.Length == 0 || this.Needle == null || this.Needle.Length == 0)
- return (false, -1);
-
- // If the needle array is larger than the stack array, it can't be contained within
- if (this.Needle.Length > stack.Length)
- return (false, -1);
-
- // Set the default start and end values
- int start = this.Start;
- int end = this.End;
-
- // If start or end are not set properly, set them to defaults
- if (start < 0)
- start = 0;
- if (end < 0)
- end = stack.Length - this.Needle.Length;
-
- for (int i = reverse ? end : start; reverse ? i > start : i < end; i += reverse ? -1 : 1)
- {
- // If we somehow have an invalid end and we haven't matched, return
- if (i > stack.Length)
- return (false, -1);
-
- // Check to see if the values are equal
- if (EqualAt(stack, i))
- return (true, i);
- }
-
- return (false, -1);
- }
-
- ///
- /// Get if a stack at a certain index is equal to a needle
- ///
- /// Array to search for the given content
- /// Starting index to check equality
- /// True if the needle matches the stack at a given index
- private bool EqualAt(byte[] stack, int index)
- {
- // If the needle is invalid, we can't do anything
- if (this.Needle == null)
- return false;
-
- // If the index is invalid, we can't do anything
- if (index < 0)
- return false;
-
- // If we're too close to the end of the stack, return false
- if (this.Needle.Length > stack.Length - index)
- return false;
-
- // Loop through and check the value
- for (int i = 0; i < this.Needle.Length; i++)
- {
- // A null value is a wildcard
- if (this.Needle[i] == null)
- continue;
- else if (stack[i + index] != this.Needle[i])
- return false;
- }
-
- return true;
- }
-
- #endregion
-
- #region Stream Matching
-
- ///
- /// Get if this match can be found in a stack
- ///
- /// Stream to search for the given content
- /// True to search from the end of the array, false from the start
- /// Tuple of success and found position
- public (bool success, int position) Match(Stream stack, bool reverse = false)
- {
- // If either array is null or empty, we can't do anything
- if (stack == null || stack.Length == 0 || this.Needle == null || this.Needle.Length == 0)
- return (false, -1);
-
- // If the needle array is larger than the stack array, it can't be contained within
- if (this.Needle.Length > stack.Length)
- return (false, -1);
-
- // Set the default start and end values
- int start = this.Start;
- int end = this.End;
-
- // If start or end are not set properly, set them to defaults
- if (start < 0)
- start = 0;
- if (end < 0)
- end = (int)(stack.Length - this.Needle.Length);
-
- for (int i = reverse ? end : start; reverse ? i > start : i < end; i += reverse ? -1 : 1)
- {
- // If we somehow have an invalid end and we haven't matched, return
- if (i > stack.Length)
- return (false, -1);
-
- // Check to see if the values are equal
- if (EqualAt(stack, i))
- return (true, i);
- }
-
- return (false, -1);
- }
-
- ///
- /// Get if a stack at a certain index is equal to a needle
- ///
- /// Stream to search for the given content
- /// Starting index to check equality
- /// True if the needle matches the stack at a given index
- private bool EqualAt(Stream stack, int index)
- {
- // If the needle is invalid, we can't do anything
- if (this.Needle == null)
- return false;
-
- // If the index is invalid, we can't do anything
- if (index < 0)
- return false;
-
- // If we're too close to the end of the stack, return false
- if (this.Needle.Length > stack.Length - index)
- return false;
-
- // Save the current position and move to the index
- long currentPosition = stack.Position;
- stack.Seek(index, SeekOrigin.Begin);
-
- // Set the return value
- bool matched = true;
-
- // Loop through and check the value
- for (int i = 0; i < this.Needle.Length; i++)
- {
- byte stackValue = (byte)stack.ReadByte();
-
- // A null value is a wildcard
- if (this.Needle[i] == null)
- {
- continue;
- }
- else if (stackValue != this.Needle[i])
- {
- matched = false;
- break;
- }
- }
-
- // Reset the position and return the value
- stack.Seek(currentPosition, SeekOrigin.Begin);
- return matched;
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/ContentMatchSet.cs b/BinaryObjectScanner.Matching/ContentMatchSet.cs
deleted file mode 100644
index 9dc68298..00000000
--- a/BinaryObjectScanner.Matching/ContentMatchSet.cs
+++ /dev/null
@@ -1,243 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// A set of content matches that work together
- ///
- public class ContentMatchSet : MatchSet
- {
- ///
- /// Function to get a content version
- ///
- ///
- /// A content version method takes the file path, the file contents,
- /// and a list of found positions and returns a single string. That
- /// string is either a version string, in which case it will be appended
- /// to the protection name, or `null`, in which case it will cause
- /// the protection to be omitted.
- ///
-#if NET48
- public Func, string> GetArrayVersion { get; private set; }
-#else
- public Func, string>? GetArrayVersion { get; init; }
-#endif
-
- ///
- /// Function to get a content version
- ///
- ///
- /// A content version method takes the file path, the file contents,
- /// and a list of found positions and returns a single string. That
- /// string is either a version string, in which case it will be appended
- /// to the protection name, or `null`, in which case it will cause
- /// the protection to be omitted.
- ///
-#if NET48
- public Func, string> GetStreamVersion { get; private set; }
-#else
- public Func, string>? GetStreamVersion { get; init; }
-#endif
-
- #region Generic Constructors
-
- public ContentMatchSet(byte?[] needle, string protectionName)
- : this(new List { needle }, getArrayVersion: null, protectionName) { }
-
- public ContentMatchSet(List needles, string protectionName)
- : this(needles, getArrayVersion: null, protectionName) { }
-
- public ContentMatchSet(ContentMatch needle, string protectionName)
- : this(new List() { needle }, getArrayVersion: null, protectionName) { }
-
- public ContentMatchSet(List needles, string protectionName)
- : this(needles, getArrayVersion: null, protectionName) { }
-
- #endregion
-
- #region Array Constructors
-
-#if NET48
- public ContentMatchSet(byte?[] needle, Func, string> getArrayVersion, string protectionName)
- : this(new List { needle }, getArrayVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string> getArrayVersion, string protectionName)
- : this(needles.Select(n => new ContentMatch(n)).ToList(), getArrayVersion, protectionName) { }
-
- public ContentMatchSet(ContentMatch needle, Func, string> getArrayVersion, string protectionName)
- : this(new List() { needle }, getArrayVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string> getArrayVersion, string protectionName)
- {
- Matchers = needles;
- GetArrayVersion = getArrayVersion;
- ProtectionName = protectionName;
- }
-#else
- public ContentMatchSet(byte?[] needle, Func, string>? getArrayVersion, string protectionName)
- : this(new List { needle }, getArrayVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string>? getArrayVersion, string protectionName)
- : this(needles.Select(n => new ContentMatch(n)).ToList(), getArrayVersion, protectionName) { }
-
- public ContentMatchSet(ContentMatch needle, Func, string>? getArrayVersion, string protectionName)
- : this(new List() { needle }, getArrayVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string>? getArrayVersion, string protectionName)
- {
- Matchers = needles;
- GetArrayVersion = getArrayVersion;
- ProtectionName = protectionName;
- }
-#endif
-
- #endregion
-
- #region Stream Constructors
-
-#if NET48
- public ContentMatchSet(byte?[] needle, Func, string> getStreamVersion, string protectionName)
- : this(new List { needle }, getStreamVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string> getStreamVersion, string protectionName)
- : this(needles.Select(n => new ContentMatch(n)).ToList(), getStreamVersion, protectionName) { }
-
- public ContentMatchSet(ContentMatch needle, Func, string> getStreamVersion, string protectionName)
- : this(new List() { needle }, getStreamVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string> getStreamVersion, string protectionName)
- {
- Matchers = needles;
- GetStreamVersion = getStreamVersion;
- ProtectionName = protectionName;
- }
-#else
- public ContentMatchSet(byte?[] needle, Func, string>? getStreamVersion, string protectionName)
- : this(new List { needle }, getStreamVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string>? getStreamVersion, string protectionName)
- : this(needles.Select(n => new ContentMatch(n)).ToList(), getStreamVersion, protectionName) { }
-
- public ContentMatchSet(ContentMatch needle, Func, string>? getStreamVersion, string protectionName)
- : this(new List() { needle }, getStreamVersion, protectionName) { }
-
- public ContentMatchSet(List needles, Func, string>? getStreamVersion, string protectionName)
- {
- Matchers = needles;
- GetStreamVersion = getStreamVersion;
- ProtectionName = protectionName;
- }
-#endif
-
- #endregion
-
- #region Array Matching
-
- ///
- /// Determine whether all content matches pass
- ///
- /// Array to search
- /// Tuple of passing status and matching positions
- public (bool, List) MatchesAll(byte[] stack)
- {
- // If no content matches are defined, we fail out
- if (Matchers == null || !Matchers.Any())
- return (false, new List());
-
- // Initialize the position list
- var positions = new List();
-
- // Loop through all content matches and make sure all pass
- foreach (var contentMatch in Matchers)
- {
- (bool match, int position) = contentMatch.Match(stack);
- if (!match)
- return (false, new List());
- else
- positions.Add(position);
- }
-
- return (true, positions);
- }
-
- ///
- /// Determine whether any content matches pass
- ///
- /// Array to search
- /// Tuple of passing status and first matching position
- public (bool, int) MatchesAny(byte[] stack)
- {
- // If no content matches are defined, we fail out
- if (Matchers == null || !Matchers.Any())
- return (false, -1);
-
- // Loop through all content matches and make sure all pass
- foreach (var contentMatch in Matchers)
- {
- (bool match, int position) = contentMatch.Match(stack);
- if (match)
- return (true, position);
- }
-
- return (false, -1);
- }
-
- #endregion
-
- #region Stream Matching
-
- ///
- /// Determine whether all content matches pass
- ///
- /// Stream to search
- /// Tuple of passing status and matching positions
- public (bool, List) MatchesAll(Stream stack)
- {
- // If no content matches are defined, we fail out
- if (Matchers == null || !Matchers.Any())
- return (false, new List());
-
- // Initialize the position list
- List positions = new List();
-
- // Loop through all content matches and make sure all pass
- foreach (var contentMatch in Matchers)
- {
- (bool match, int position) = contentMatch.Match(stack);
- if (!match)
- return (false, new List());
- else
- positions.Add(position);
- }
-
- return (true, positions);
- }
-
- ///
- /// Determine whether any content matches pass
- ///
- /// Stream to search
- /// Tuple of passing status and first matching position
- public (bool, int) MatchesAny(Stream stack)
- {
- // If no content matches are defined, we fail out
- if (Matchers == null || !Matchers.Any())
- return (false, -1);
-
- // Loop through all content matches and make sure all pass
- foreach (var contentMatch in Matchers)
- {
- (bool match, int position) = contentMatch.Match(stack);
- if (match)
- return (true, position);
- }
-
- return (false, -1);
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/Extensions.cs b/BinaryObjectScanner.Matching/Extensions.cs
deleted file mode 100644
index 5c6c9e20..00000000
--- a/BinaryObjectScanner.Matching/Extensions.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace BinaryObjectScanner.Matching
-{
- public static class Extensions
- {
- ///
- /// Find all positions of one array in another, if possible, if possible
- ///
- public static List FindAllPositions(this byte[] stack, byte?[] needle, int start = 0, int end = -1)
- {
- // Get the outgoing list
- List positions = new List();
-
- // Initialize the loop variables
- bool found = true;
- int lastPosition = start;
- var matcher = new ContentMatch(needle, end: end);
-
- // Loop over and get all positions
- while (found)
- {
- matcher.Start = lastPosition;
- (found, lastPosition) = matcher.Match(stack, false);
- if (found)
- positions.Add(lastPosition);
- }
-
- return positions;
- }
-
- ///
- /// Find the first position of one array in another, if possible
- ///
-#if NET48
- public static bool FirstPosition(this byte[] stack, byte[] needle, out int position, int start = 0, int end = -1)
- {
- byte?[] nullableNeedle = needle != null ? needle.Select(b => (byte?)b).ToArray() : null;
- return stack.FirstPosition(nullableNeedle, out position, start, end);
- }
-#else
- public static bool FirstPosition(this byte[] stack, byte[]? needle, out int position, int start = 0, int end = -1)
- {
- byte?[]? nullableNeedle = needle != null ? needle.Select(b => (byte?)b).ToArray() : null;
- return stack.FirstPosition(nullableNeedle, out position, start, end);
- }
-#endif
-
- ///
- /// Find the first position of one array in another, if possible
- ///
-#if NET48
- public static bool FirstPosition(this byte[] stack, byte?[] needle, out int position, int start = 0, int end = -1)
-#else
- public static bool FirstPosition(this byte[] stack, byte?[]? needle, out int position, int start = 0, int end = -1)
-#endif
- {
- var matcher = new ContentMatch(needle, start, end);
- (bool found, int foundPosition) = matcher.Match(stack, false);
- position = foundPosition;
- return found;
- }
-
- ///
- /// Find the last position of one array in another, if possible
- ///
-#if NET48
- public static bool LastPosition(this byte[] stack, byte?[] needle, out int position, int start = 0, int end = -1)
-#else
- public static bool LastPosition(this byte[] stack, byte?[]? needle, out int position, int start = 0, int end = -1)
-#endif
- {
- var matcher = new ContentMatch(needle, start, end);
- (bool found, int foundPosition) = matcher.Match(stack, true);
- position = foundPosition;
- return found;
- }
-
- ///
- /// See if a byte array starts with another
- ///
- public static bool StartsWith(this byte[] stack, byte[] needle)
- {
- return stack.FirstPosition(needle, out int _, start: 0, end: 1);
- }
-
- ///
- /// See if a byte array starts with another
- ///
- public static bool StartsWith(this byte[] stack, byte?[] needle)
- {
- return stack.FirstPosition(needle, out int _, start: 0, end: 1);
- }
-
- ///
- /// See if a byte array ends with another
- ///
- public static bool EndsWith(this byte[] stack, byte[] needle)
- {
- return stack.FirstPosition(needle, out int _, start: stack.Length - needle.Length);
- }
-
- ///
- /// See if a byte array ends with another
- ///
- public static bool EndsWith(this byte[] stack, byte?[] needle)
- {
- return stack.FirstPosition(needle, out int _, start: stack.Length - needle.Length);
- }
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/FilePathMatch.cs b/BinaryObjectScanner.Matching/FilePathMatch.cs
deleted file mode 100644
index 62d83e02..00000000
--- a/BinaryObjectScanner.Matching/FilePathMatch.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.IO;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// File path matching criteria
- ///
- public class FilePathMatch : PathMatch
- {
- ///
- /// Constructor
- ///
- /// String representing the search
- public FilePathMatch(string needle) : base($"{Path.DirectorySeparatorChar}{needle}", false, true) { }
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/IMatch.cs b/BinaryObjectScanner.Matching/IMatch.cs
deleted file mode 100644
index 615aac9a..00000000
--- a/BinaryObjectScanner.Matching/IMatch.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace BinaryObjectScanner.Matching
-{
- public interface IMatch
- {
-#if NET48
- T Needle { get; set; }
-#else
- T? Needle { get; init; }
-#endif
- }
-}
diff --git a/BinaryObjectScanner.Matching/MatchSet.cs b/BinaryObjectScanner.Matching/MatchSet.cs
deleted file mode 100644
index 4ab3d87f..00000000
--- a/BinaryObjectScanner.Matching/MatchSet.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System.Collections.Generic;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// Wrapper for a single set of matching criteria
- ///
- public abstract class MatchSet where T : IMatch
- {
- ///
- /// Set of all matchers
- ///
-#if NET48
- public IEnumerable Matchers { get; set; }
-#else
- public IEnumerable? Matchers { get; set; }
-#endif
-
- ///
- /// Name of the protection to show
- ///
-#if NET48
- public string ProtectionName { get; set; }
-#else
- public string? ProtectionName { get; set; }
-#endif
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/MatchUtil.cs b/BinaryObjectScanner.Matching/MatchUtil.cs
deleted file mode 100644
index aba1eeb3..00000000
--- a/BinaryObjectScanner.Matching/MatchUtil.cs
+++ /dev/null
@@ -1,354 +0,0 @@
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// Helper class for matching
- ///
- public static class MatchUtil
- {
- #region Array Content Matching
-
- ///
- /// Get all content matches for a given list of matchers
- ///
- /// File to check for matches
- /// Array to search
- /// Enumerable of ContentMatchSets to be run on the file
- /// True to include positional data, false otherwise
- /// List of strings representing the matched protections, null or empty otherwise
-#if NET48
- public static ConcurrentQueue GetAllMatches(string file, byte[] stack, IEnumerable matchers, bool includeDebug = false)
-#else
- public static ConcurrentQueue? GetAllMatches(string file, byte[] stack, IEnumerable? matchers, bool includeDebug = false)
-#endif
- {
- return FindAllMatches(file, stack, matchers, includeDebug, false);
- }
-
- ///
- /// Get first content match for a given list of matchers
- ///
- /// File to check for matches
- /// Array to search
- /// Enumerable of ContentMatchSets to be run on the file
- /// True to include positional data, false otherwise
- /// String representing the matched protection, null otherwise
-#if NET48
- public static string GetFirstMatch(string file, byte[] stack, IEnumerable matchers, bool includeDebug = false)
-#else
- public static string? GetFirstMatch(string file, byte[] stack, IEnumerable? matchers, bool includeDebug = false)
-#endif
- {
- var contentMatches = FindAllMatches(file, stack, matchers, includeDebug, true);
- if (contentMatches == null || !contentMatches.Any())
- return null;
-
- return contentMatches.First();
- }
-
- ///
- /// Get the required set of content matches on a per Matcher basis
- ///
- /// File to check for matches
- /// Array to search
- /// Enumerable of ContentMatchSets to be run on the file
- /// True to include positional data, false otherwise
- /// True to stop after the first match, false otherwise
- /// List of strings representing the matched protections, null or empty otherwise
-#if NET48
- private static ConcurrentQueue FindAllMatches(string file, byte[] stack, IEnumerable matchers, bool includeDebug, bool stopAfterFirst)
-#else
- private static ConcurrentQueue? FindAllMatches(string file, byte[] stack, IEnumerable? matchers, bool includeDebug, bool stopAfterFirst)
-#endif
- {
- // If there's no mappings, we can't match
- if (matchers == null || !matchers.Any())
- return null;
-
- // Initialize the queue of matched protections
- var matchedProtections = new ConcurrentQueue();
-
- // Loop through and try everything otherwise
- foreach (var matcher in matchers)
- {
- // Determine if the matcher passes
- (bool passes, List positions) = matcher.MatchesAll(stack);
- if (!passes)
- continue;
-
- // Format the list of all positions found
- string positionsString = string.Join(", ", positions);
-
- // If we there is no version method, just return the protection name
- if (matcher.GetArrayVersion == null)
- {
- matchedProtections.Enqueue((matcher.ProtectionName ?? "Unknown Protection") + (includeDebug ? $" (Index {positionsString})" : string.Empty));
- }
-
- // Otherwise, invoke the version method
- else
- {
- // A null version returned means the check didn't pass at the version step
- string version = matcher.GetArrayVersion(file, stack, positions);
- if (version == null)
- continue;
-
- matchedProtections.Enqueue($"{matcher.ProtectionName ?? "Unknown Protection"} {version}".Trim() + (includeDebug ? $" (Index {positionsString})" : string.Empty));
- }
-
- // If we're stopping after the first protection, bail out here
- if (stopAfterFirst)
- return matchedProtections;
- }
-
- return matchedProtections;
- }
-
- #endregion
-
- #region Stream Content Matching
-
- ///
- /// Get all content matches for a given list of matchers
- ///
- /// File to check for matches
- /// Stream to search
- /// Enumerable of ContentMatchSets to be run on the file
- /// True to include positional data, false otherwise
- /// List of strings representing the matched protections, null or empty otherwise
-#if NET48
- public static ConcurrentQueue GetAllMatches(string file, Stream stack, IEnumerable matchers, bool includeDebug = false)
-#else
- public static ConcurrentQueue? GetAllMatches(string file, Stream stack, IEnumerable? matchers, bool includeDebug = false)
-#endif
- {
- return FindAllMatches(file, stack, matchers, includeDebug, false);
- }
-
- ///
- /// Get first content match for a given list of matchers
- ///
- /// File to check for matches
- /// Stream to search
- /// Enumerable of ContentMatchSets to be run on the file
- /// True to include positional data, false otherwise
- /// String representing the matched protection, null otherwise
-#if NET48
- public static string GetFirstMatch(string file, Stream stack, IEnumerable matchers, bool includeDebug = false)
-#else
- public static string? GetFirstMatch(string file, Stream stack, IEnumerable? matchers, bool includeDebug = false)
-#endif
- {
- var contentMatches = FindAllMatches(file, stack, matchers, includeDebug, true);
- if (contentMatches == null || !contentMatches.Any())
- return null;
-
- return contentMatches.First();
- }
-
- ///
- /// Get the required set of content matches on a per Matcher basis
- ///
- /// File to check for matches
- /// Stream to search
- /// Enumerable of ContentMatchSets to be run on the file
- /// True to include positional data, false otherwise
- /// True to stop after the first match, false otherwise
- /// List of strings representing the matched protections, null or empty otherwise
-#if NET48
- private static ConcurrentQueue FindAllMatches(string file, Stream stack, IEnumerable matchers, bool includeDebug, bool stopAfterFirst)
-#else
- private static ConcurrentQueue? FindAllMatches(string file, Stream stack, IEnumerable? matchers, bool includeDebug, bool stopAfterFirst)
-#endif
- {
- // If there's no mappings, we can't match
- if (matchers == null || !matchers.Any())
- return null;
-
- // Initialize the queue of matched protections
- var matchedProtections = new ConcurrentQueue();
-
- // Loop through and try everything otherwise
- foreach (var matcher in matchers)
- {
- // Determine if the matcher passes
- (bool passes, List positions) = matcher.MatchesAll(stack);
- if (!passes)
- continue;
-
- // Format the list of all positions found
- string positionsString = string.Join(", ", positions);
-
- // If we there is no version method, just return the protection name
- if (matcher.GetStreamVersion == null)
- {
- matchedProtections.Enqueue((matcher.ProtectionName ?? "Unknown Protection") + (includeDebug ? $" (Index {positionsString})" : string.Empty));
- }
-
- // Otherwise, invoke the version method
- else
- {
- // A null version returned means the check didn't pass at the version step
- string version = matcher.GetStreamVersion(file, stack, positions);
- if (version == null)
- continue;
-
- matchedProtections.Enqueue($"{matcher.ProtectionName ?? "Unknown Protection"} {version}".Trim() + (includeDebug ? $" (Index {positionsString})" : string.Empty));
- }
-
- // If we're stopping after the first protection, bail out here
- if (stopAfterFirst)
- return matchedProtections;
- }
-
- return matchedProtections;
- }
-
- #endregion
-
- #region Path Matching
-
- ///
- /// Get all path matches for a given list of matchers
- ///
- /// File path to check for matches
- /// Enumerable of PathMatchSets to be run on the file
- /// True if any path match is a success, false if all have to match
- /// List of strings representing the matched protections, null or empty otherwise
- public static ConcurrentQueue GetAllMatches(string file, IEnumerable matchers, bool any = false)
- {
- return FindAllMatches(new List { file }, matchers, any, false);
- }
-
- //
- /// Get all path matches for a given list of matchers
- ///
- /// File paths to check for matches
- /// Enumerable of PathMatchSets to be run on the file
- /// True if any path match is a success, false if all have to match
- /// List of strings representing the matched protections, null or empty otherwise
- public static ConcurrentQueue GetAllMatches(IEnumerable files, IEnumerable matchers, bool any = false)
- {
- return FindAllMatches(files, matchers, any, false);
- }
-
- ///
- /// Get first path match for a given list of matchers
- ///
- /// File path to check for matches
- /// Enumerable of PathMatchSets to be run on the file
- /// True if any path match is a success, false if all have to match
- /// String representing the matched protection, null otherwise
-#if NET48
- public static string GetFirstMatch(string file, IEnumerable matchers, bool any = false)
-#else
- public static string? GetFirstMatch(string file, IEnumerable matchers, bool any = false)
-#endif
- {
- var contentMatches = FindAllMatches(new List { file }, matchers, any, true);
- if (contentMatches == null || !contentMatches.Any())
- return null;
-
- return contentMatches.First();
- }
-
- ///
- /// Get first path match for a given list of matchers
- ///
- /// File paths to check for matches
- /// Enumerable of PathMatchSets to be run on the file
- /// True if any path match is a success, false if all have to match
- /// String representing the matched protection, null otherwise
-#if NET48
- public static string GetFirstMatch(IEnumerable files, IEnumerable matchers, bool any = false)
-#else
- public static string? GetFirstMatch(IEnumerable files, IEnumerable matchers, bool any = false)
-#endif
- {
- var contentMatches = FindAllMatches(files, matchers, any, true);
- if (contentMatches == null || !contentMatches.Any())
- return null;
-
- return contentMatches.First();
- }
-
- ///
- /// Get the required set of path matches on a per Matcher basis
- ///
- /// File paths to check for matches
- /// Enumerable of PathMatchSets to be run on the file
- /// True if any path match is a success, false if all have to match
- /// True to stop after the first match, false otherwise
- /// List of strings representing the matched protections, null or empty otherwise
- private static ConcurrentQueue FindAllMatches(IEnumerable files, IEnumerable matchers, bool any, bool stopAfterFirst)
- {
- // If there's no mappings, we can't match
- if (matchers == null || !matchers.Any())
- return new ConcurrentQueue();
-
- // Initialize the list of matched protections
- var matchedProtections = new ConcurrentQueue();
-
- // Loop through and try everything otherwise
- foreach (var matcher in matchers)
- {
- // Determine if the matcher passes
- bool passes;
-#if NET48
- string firstMatchedString;
-#else
- string? firstMatchedString;
-#endif
- if (any)
- {
-#if NET48
- (bool anyPasses, string matchedString) = matcher.MatchesAny(files);
-#else
- (bool anyPasses, string? matchedString) = matcher.MatchesAny(files);
-#endif
- passes = anyPasses;
- firstMatchedString = matchedString;
- }
- else
- {
- (bool allPasses, List matchedStrings) = matcher.MatchesAll(files);
- passes = allPasses;
- firstMatchedString = matchedStrings.FirstOrDefault();
- }
-
- // If we don't have a pass, just continue
- if (!passes || firstMatchedString == null)
- continue;
-
- // If we there is no version method, just return the protection name
- if (matcher.GetVersion == null)
- {
- matchedProtections.Enqueue(matcher.ProtectionName ?? "Unknown Protection");
- }
-
- // Otherwise, invoke the version method
- else
- {
- // A null version returned means the check didn't pass at the version step
- string version = matcher.GetVersion(firstMatchedString, files);
- if (version == null)
- continue;
-
- matchedProtections.Enqueue($"{matcher.ProtectionName ?? "Unknown Protection"} {version}".Trim());
- }
-
- // If we're stopping after the first protection, bail out here
- if (stopAfterFirst)
- return matchedProtections;
- }
-
- return matchedProtections;
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/PathMatch.cs b/BinaryObjectScanner.Matching/PathMatch.cs
deleted file mode 100644
index ac8f0e8a..00000000
--- a/BinaryObjectScanner.Matching/PathMatch.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// Path matching criteria
- ///
- public class PathMatch : IMatch
- {
- ///
- /// String to match
- ///
-#if NET48
- public string Needle { get; set; }
-#else
- public string? Needle { get; init; }
-#endif
-
- ///
- /// Match exact casing instead of invariant
- ///
-#if NET48
- public bool MatchExact { get; private set; }
-#else
- public bool MatchExact { get; init; }
-#endif
-
- ///
- /// Match that values end with the needle and not just contains
- ///
-#if NET48
- public bool UseEndsWith { get; private set; }
-#else
- public bool UseEndsWith { get; init; }
-#endif
-
- ///
- /// Constructor
- ///
- /// String representing the search
- /// True to match exact casing, false otherwise
- /// True to match the end only, false for all contents
-#if NET48
- public PathMatch(string needle, bool matchExact = false, bool useEndsWith = false)
-#else
- public PathMatch(string? needle, bool matchExact = false, bool useEndsWith = false)
-#endif
- {
- this.Needle = needle;
- this.MatchExact = matchExact;
- this.UseEndsWith = useEndsWith;
- }
-
- #region Matching
-
- ///
- /// Get if this match can be found in a stack
- ///
- /// List of strings to search for the given content
- /// Tuple of success and matched item
-#if NET48
- public (bool, string) Match(IEnumerable stack)
-#else
- public (bool, string?) Match(IEnumerable? stack)
-#endif
- {
- // If either array is null or empty, we can't do anything
- if (stack == null || !stack.Any() || this.Needle == null || this.Needle.Length == 0)
- return (false, null);
-
- // Preprocess the needle, if necessary
- string procNeedle = this.MatchExact ? this.Needle : this.Needle.ToLowerInvariant();
-
- foreach (string stackItem in stack)
- {
- // Preprocess the stack item, if necessary
- string procStackItem = this.MatchExact ? stackItem : stackItem.ToLowerInvariant();
-
- if (this.UseEndsWith && procStackItem.EndsWith(procNeedle))
- return (true, stackItem);
- else if (!this.UseEndsWith && procStackItem.Contains(procNeedle))
- return (true, stackItem);
- }
-
- return (false, null);
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Matching/PathMatchSet.cs b/BinaryObjectScanner.Matching/PathMatchSet.cs
deleted file mode 100644
index a3e0a26a..00000000
--- a/BinaryObjectScanner.Matching/PathMatchSet.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace BinaryObjectScanner.Matching
-{
- ///
- /// A set of path matches that work together
- ///
- public class PathMatchSet : MatchSet
- {
- ///
- /// Function to get a path version for this Matcher
- ///
- ///
- /// A path version method takes the matched path and an enumerable of files
- /// and returns a single string. That string is either a version string,
- /// in which case it will be appended to the protection name, or `null`,
- /// in which case it will cause the protection to be omitted.
- ///
-#if NET48
- public Func, string> GetVersion { get; private set; }
-#else
- public Func, string>? GetVersion { get; init; }
-#endif
-
- #region Constructors
-
- public PathMatchSet(string needle, string protectionName)
- : this(new List { needle }, null, protectionName) { }
-
- public PathMatchSet(List needles, string protectionName)
- : this(needles, null, protectionName) { }
-
-#if NET48
- public PathMatchSet(string needle, Func, string> getVersion, string protectionName)
- : this(new List { needle }, getVersion, protectionName) { }
-
- public PathMatchSet(List needles, Func, string> getVersion, string protectionName)
- : this(needles.Select(n => new PathMatch(n)).ToList(), getVersion, protectionName) { }
-#else
- public PathMatchSet(string needle, Func, string>? getVersion, string protectionName)
- : this(new List { needle }, getVersion, protectionName) { }
-
- public PathMatchSet(List needles, Func, string>? getVersion, string protectionName)
- : this(needles.Select(n => new PathMatch(n)).ToList(), getVersion, protectionName) { }
-#endif
-
- public PathMatchSet(PathMatch needle, string protectionName)
- : this(new List() { needle }, null, protectionName) { }
-
- public PathMatchSet(List needles, string protectionName)
- : this(needles, null, protectionName) { }
-
-#if NET48
- public PathMatchSet(PathMatch needle, Func, string> getVersion, string protectionName)
- : this(new List() { needle }, getVersion, protectionName) { }
-
- public PathMatchSet(List needles, Func, string> getVersion, string protectionName)
- {
- Matchers = needles;
- GetVersion = getVersion;
- ProtectionName = protectionName;
- }
-#else
- public PathMatchSet(PathMatch needle, Func, string>? getVersion, string protectionName)
- : this(new List() { needle }, getVersion, protectionName) { }
-
- public PathMatchSet(List needles, Func, string>? getVersion, string protectionName)
- {
- Matchers = needles;
- GetVersion = getVersion;
- ProtectionName = protectionName;
- }
-#endif
-
- #endregion
-
- #region Matching
-
- ///
- /// Determine whether all path matches pass
- ///
- /// List of strings to try to match
- /// Tuple of passing status and matching values
- public (bool, List) MatchesAll(IEnumerable stack)
- {
- // If no path matches are defined, we fail out
- if (Matchers == null || !Matchers.Any())
- return (false, new List());
-
- // Initialize the value list
- List values = new List();
-
- // Loop through all path matches and make sure all pass
- foreach (var pathMatch in Matchers)
- {
-#if NET48
- (bool match, string value) = pathMatch.Match(stack);
-#else
- (bool match, string? value) = pathMatch.Match(stack);
-#endif
- if (!match || value == null)
- return (false, new List());
- else
- values.Add(value);
- }
-
- return (true, values);
- }
-
- ///
- /// Determine whether any path matches pass
- ///
- /// List of strings to try to match
- /// Tuple of passing status and first matching value
-#if NET48
- public (bool, string) MatchesAny(IEnumerable stack)
-#else
- public (bool, string?) MatchesAny(IEnumerable stack)
-#endif
- {
- // If no path matches are defined, we fail out
- if (Matchers == null || !Matchers.Any())
- return (false, null);
-
- // Loop through all path matches and make sure all pass
- foreach (var pathMatch in Matchers)
- {
-#if NET48
- (bool match, string value) = pathMatch.Match(stack);
-#else
- (bool match, string? value) = pathMatch.Match(stack);
-#endif
- if (match)
- return (true, value);
- }
-
- return (false, null);
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/BinaryObjectScanner.Packer/ASPack.cs b/BinaryObjectScanner.Packer/ASPack.cs
index 18da75ef..876ebfb7 100644
--- a/BinaryObjectScanner.Packer/ASPack.cs
+++ b/BinaryObjectScanner.Packer/ASPack.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Packer
diff --git a/BinaryObjectScanner.Packer/BinaryObjectScanner.Packer.csproj b/BinaryObjectScanner.Packer/BinaryObjectScanner.Packer.csproj
index c809119f..8ef09f73 100644
--- a/BinaryObjectScanner.Packer/BinaryObjectScanner.Packer.csproj
+++ b/BinaryObjectScanner.Packer/BinaryObjectScanner.Packer.csproj
@@ -19,16 +19,16 @@
true
+
+
+
+
+
+
-
-
-
-
-
-
diff --git a/BinaryObjectScanner.Packer/CExe.cs b/BinaryObjectScanner.Packer/CExe.cs
index 3974f5ac..3df6e360 100644
--- a/BinaryObjectScanner.Packer/CExe.cs
+++ b/BinaryObjectScanner.Packer/CExe.cs
@@ -4,8 +4,8 @@ using System.IO;
using System.Linq;
using BinaryObjectScanner.Compression;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
using ICSharpCode.SharpZipLib.Zip.Compression;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Packer
diff --git a/BinaryObjectScanner.Packer/EXEStealth.cs b/BinaryObjectScanner.Packer/EXEStealth.cs
index 16235c89..62e3876e 100644
--- a/BinaryObjectScanner.Packer/EXEStealth.cs
+++ b/BinaryObjectScanner.Packer/EXEStealth.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Packer
diff --git a/BinaryObjectScanner.Packer/EmbeddedExecutable.cs b/BinaryObjectScanner.Packer/EmbeddedExecutable.cs
index 0c767125..035c2764 100644
--- a/BinaryObjectScanner.Packer/EmbeddedExecutable.cs
+++ b/BinaryObjectScanner.Packer/EmbeddedExecutable.cs
@@ -2,7 +2,7 @@ using System;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Packer
diff --git a/BinaryObjectScanner.Packer/InnoSetup.cs b/BinaryObjectScanner.Packer/InnoSetup.cs
index 24a148e9..82cb0662 100644
--- a/BinaryObjectScanner.Packer/InnoSetup.cs
+++ b/BinaryObjectScanner.Packer/InnoSetup.cs
@@ -2,7 +2,7 @@
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Packer
diff --git a/BinaryObjectScanner.Packer/WiseInstaller.cs b/BinaryObjectScanner.Packer/WiseInstaller.cs
index 163e63c4..b2e5c5ce 100644
--- a/BinaryObjectScanner.Packer/WiseInstaller.cs
+++ b/BinaryObjectScanner.Packer/WiseInstaller.cs
@@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
using SabreTools.IO;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
using Wise = WiseUnpacker.WiseUnpacker;
diff --git a/BinaryObjectScanner.Protection/ActiveMARK.cs b/BinaryObjectScanner.Protection/ActiveMARK.cs
index e46eac0b..4b7bce65 100644
--- a/BinaryObjectScanner.Protection/ActiveMARK.cs
+++ b/BinaryObjectScanner.Protection/ActiveMARK.cs
@@ -2,7 +2,7 @@
using System.Linq;
using System.Text;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/AegiSoft.cs b/BinaryObjectScanner.Protection/AegiSoft.cs
index 014257c9..e0bbbcab 100644
--- a/BinaryObjectScanner.Protection/AegiSoft.cs
+++ b/BinaryObjectScanner.Protection/AegiSoft.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/AlphaDVD.cs b/BinaryObjectScanner.Protection/AlphaDVD.cs
index b18a8b60..667c1aa0 100644
--- a/BinaryObjectScanner.Protection/AlphaDVD.cs
+++ b/BinaryObjectScanner.Protection/AlphaDVD.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/BinaryObjectScanner.Protection.csproj b/BinaryObjectScanner.Protection/BinaryObjectScanner.Protection.csproj
index 813a8069..c605aea5 100644
--- a/BinaryObjectScanner.Protection/BinaryObjectScanner.Protection.csproj
+++ b/BinaryObjectScanner.Protection/BinaryObjectScanner.Protection.csproj
@@ -21,12 +21,12 @@
-
+
diff --git a/BinaryObjectScanner.Protection/Bitpool.cs b/BinaryObjectScanner.Protection/Bitpool.cs
index 77a45fe6..62380bc4 100644
--- a/BinaryObjectScanner.Protection/Bitpool.cs
+++ b/BinaryObjectScanner.Protection/Bitpool.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/ByteShield.cs b/BinaryObjectScanner.Protection/ByteShield.cs
index 6cce8d57..265b1d86 100644
--- a/BinaryObjectScanner.Protection/ByteShield.cs
+++ b/BinaryObjectScanner.Protection/ByteShield.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/CDDVDCops.cs b/BinaryObjectScanner.Protection/CDDVDCops.cs
index c69c61b7..a3ca3049 100644
--- a/BinaryObjectScanner.Protection/CDDVDCops.cs
+++ b/BinaryObjectScanner.Protection/CDDVDCops.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/CDGuard.cs b/BinaryObjectScanner.Protection/CDGuard.cs
index a9203ab1..548f99d1 100644
--- a/BinaryObjectScanner.Protection/CDGuard.cs
+++ b/BinaryObjectScanner.Protection/CDGuard.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/CDLock.cs b/BinaryObjectScanner.Protection/CDLock.cs
index 10090a68..2a5cb2b9 100644
--- a/BinaryObjectScanner.Protection/CDLock.cs
+++ b/BinaryObjectScanner.Protection/CDLock.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/CDProtector.cs b/BinaryObjectScanner.Protection/CDProtector.cs
index dd6404f7..d934f9fb 100644
--- a/BinaryObjectScanner.Protection/CDProtector.cs
+++ b/BinaryObjectScanner.Protection/CDProtector.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/CDX.cs b/BinaryObjectScanner.Protection/CDX.cs
index 57eae520..e3bd9c74 100644
--- a/BinaryObjectScanner.Protection/CDX.cs
+++ b/BinaryObjectScanner.Protection/CDX.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/CactusDataShield.cs b/BinaryObjectScanner.Protection/CactusDataShield.cs
index 4ba12722..8d04a3a2 100644
--- a/BinaryObjectScanner.Protection/CactusDataShield.cs
+++ b/BinaryObjectScanner.Protection/CactusDataShield.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/CenegaProtectDVD.cs b/BinaryObjectScanner.Protection/CenegaProtectDVD.cs
index 39db84cf..835801a4 100644
--- a/BinaryObjectScanner.Protection/CenegaProtectDVD.cs
+++ b/BinaryObjectScanner.Protection/CenegaProtectDVD.cs
@@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/ChosenBytesCodeLock.cs b/BinaryObjectScanner.Protection/ChosenBytesCodeLock.cs
index 4128f9bd..b28d7012 100644
--- a/BinaryObjectScanner.Protection/ChosenBytesCodeLock.cs
+++ b/BinaryObjectScanner.Protection/ChosenBytesCodeLock.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/CopyKiller.cs b/BinaryObjectScanner.Protection/CopyKiller.cs
index ec2ddc00..bbb2a155 100644
--- a/BinaryObjectScanner.Protection/CopyKiller.cs
+++ b/BinaryObjectScanner.Protection/CopyKiller.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/Cucko.cs b/BinaryObjectScanner.Protection/Cucko.cs
index d49a555d..25932254 100644
--- a/BinaryObjectScanner.Protection/Cucko.cs
+++ b/BinaryObjectScanner.Protection/Cucko.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/DVDCrypt.cs b/BinaryObjectScanner.Protection/DVDCrypt.cs
index 01cabf6c..40c5d28e 100644
--- a/BinaryObjectScanner.Protection/DVDCrypt.cs
+++ b/BinaryObjectScanner.Protection/DVDCrypt.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/Denuvo.cs b/BinaryObjectScanner.Protection/Denuvo.cs
index d1e4df51..69ae58ef 100644
--- a/BinaryObjectScanner.Protection/Denuvo.cs
+++ b/BinaryObjectScanner.Protection/Denuvo.cs
@@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/DinamicMultimedia.cs b/BinaryObjectScanner.Protection/DinamicMultimedia.cs
index 46e1f28d..6f359936 100644
--- a/BinaryObjectScanner.Protection/DinamicMultimedia.cs
+++ b/BinaryObjectScanner.Protection/DinamicMultimedia.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/DiscGuard.cs b/BinaryObjectScanner.Protection/DiscGuard.cs
index 15af78d6..9e2e5759 100644
--- a/BinaryObjectScanner.Protection/DiscGuard.cs
+++ b/BinaryObjectScanner.Protection/DiscGuard.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/EasyAntiCheat.cs b/BinaryObjectScanner.Protection/EasyAntiCheat.cs
index 0fa8762b..4d3f1570 100644
--- a/BinaryObjectScanner.Protection/EasyAntiCheat.cs
+++ b/BinaryObjectScanner.Protection/EasyAntiCheat.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Engine32.cs b/BinaryObjectScanner.Protection/Engine32.cs
index dc1f3a6c..990a73f3 100644
--- a/BinaryObjectScanner.Protection/Engine32.cs
+++ b/BinaryObjectScanner.Protection/Engine32.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/FreeLock.cs b/BinaryObjectScanner.Protection/FreeLock.cs
index 01068e10..3d6e6091 100644
--- a/BinaryObjectScanner.Protection/FreeLock.cs
+++ b/BinaryObjectScanner.Protection/FreeLock.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/GFWL.cs b/BinaryObjectScanner.Protection/GFWL.cs
index b62a7c46..1be88ee3 100644
--- a/BinaryObjectScanner.Protection/GFWL.cs
+++ b/BinaryObjectScanner.Protection/GFWL.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BurnOutSharp.ProtectionType
diff --git a/BinaryObjectScanner.Protection/Gefest.cs b/BinaryObjectScanner.Protection/Gefest.cs
index 0ffaf2b2..cc3c9ddf 100644
--- a/BinaryObjectScanner.Protection/Gefest.cs
+++ b/BinaryObjectScanner.Protection/Gefest.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/HexaLock.cs b/BinaryObjectScanner.Protection/HexaLock.cs
index 7d7ffa71..67826044 100644
--- a/BinaryObjectScanner.Protection/HexaLock.cs
+++ b/BinaryObjectScanner.Protection/HexaLock.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/ImpulseReactor.cs b/BinaryObjectScanner.Protection/ImpulseReactor.cs
index 9f39ff18..f24b533f 100644
--- a/BinaryObjectScanner.Protection/ImpulseReactor.cs
+++ b/BinaryObjectScanner.Protection/ImpulseReactor.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/IndyVCD.cs b/BinaryObjectScanner.Protection/IndyVCD.cs
index 02d57624..f8512f84 100644
--- a/BinaryObjectScanner.Protection/IndyVCD.cs
+++ b/BinaryObjectScanner.Protection/IndyVCD.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/JoWood.cs b/BinaryObjectScanner.Protection/JoWood.cs
index 769e73e3..c69cb06a 100644
--- a/BinaryObjectScanner.Protection/JoWood.cs
+++ b/BinaryObjectScanner.Protection/JoWood.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/KeyLock.cs b/BinaryObjectScanner.Protection/KeyLock.cs
index 2f47c926..f44b8976 100644
--- a/BinaryObjectScanner.Protection/KeyLock.cs
+++ b/BinaryObjectScanner.Protection/KeyLock.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/LabelGate.cs b/BinaryObjectScanner.Protection/LabelGate.cs
index aa95bf3a..a3fb90c8 100644
--- a/BinaryObjectScanner.Protection/LabelGate.cs
+++ b/BinaryObjectScanner.Protection/LabelGate.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/LaserLok.cs b/BinaryObjectScanner.Protection/LaserLok.cs
index 88112f03..2d96f9e8 100644
--- a/BinaryObjectScanner.Protection/LaserLok.cs
+++ b/BinaryObjectScanner.Protection/LaserLok.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Macrovision.CDilla.cs b/BinaryObjectScanner.Protection/Macrovision.CDilla.cs
index 4c983542..9b5f55cf 100644
--- a/BinaryObjectScanner.Protection/Macrovision.CDilla.cs
+++ b/BinaryObjectScanner.Protection/Macrovision.CDilla.cs
@@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Macrovision.CactusDataShield.cs b/BinaryObjectScanner.Protection/Macrovision.CactusDataShield.cs
index 5a7708cb..973c3961 100644
--- a/BinaryObjectScanner.Protection/Macrovision.CactusDataShield.cs
+++ b/BinaryObjectScanner.Protection/Macrovision.CactusDataShield.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Macrovision.RipGuard.cs b/BinaryObjectScanner.Protection/Macrovision.RipGuard.cs
index 939ba1ef..b7ea9634 100644
--- a/BinaryObjectScanner.Protection/Macrovision.RipGuard.cs
+++ b/BinaryObjectScanner.Protection/Macrovision.RipGuard.cs
@@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
using static BinaryObjectScanner.Utilities.Hashing;
diff --git a/BinaryObjectScanner.Protection/Macrovision.SafeCast.cs b/BinaryObjectScanner.Protection/Macrovision.SafeCast.cs
index af68bc90..f08e8ef0 100644
--- a/BinaryObjectScanner.Protection/Macrovision.SafeCast.cs
+++ b/BinaryObjectScanner.Protection/Macrovision.SafeCast.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs b/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs
index 952b8254..54562fc9 100644
--- a/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs
+++ b/BinaryObjectScanner.Protection/Macrovision.SafeDisc.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
using static BinaryObjectScanner.Utilities.Hashing;
diff --git a/BinaryObjectScanner.Protection/Macrovision.cs b/BinaryObjectScanner.Protection/Macrovision.cs
index cd071bd9..1459ae0c 100644
--- a/BinaryObjectScanner.Protection/Macrovision.cs
+++ b/BinaryObjectScanner.Protection/Macrovision.cs
@@ -4,9 +4,9 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
using BinaryObjectScanner.Utilities;
using SabreTools.IO;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/MediaCloQ.cs b/BinaryObjectScanner.Protection/MediaCloQ.cs
index 34bc3d9a..3279adc6 100644
--- a/BinaryObjectScanner.Protection/MediaCloQ.cs
+++ b/BinaryObjectScanner.Protection/MediaCloQ.cs
@@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/MediaMaxCD3.cs b/BinaryObjectScanner.Protection/MediaMaxCD3.cs
index 12f6d05d..73ec7e1f 100644
--- a/BinaryObjectScanner.Protection/MediaMaxCD3.cs
+++ b/BinaryObjectScanner.Protection/MediaMaxCD3.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/NEACProtect.cs b/BinaryObjectScanner.Protection/NEACProtect.cs
index 0fb389c3..05299f45 100644
--- a/BinaryObjectScanner.Protection/NEACProtect.cs
+++ b/BinaryObjectScanner.Protection/NEACProtect.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/OpenMG.cs b/BinaryObjectScanner.Protection/OpenMG.cs
index 3948eeb7..24d5454f 100644
--- a/BinaryObjectScanner.Protection/OpenMG.cs
+++ b/BinaryObjectScanner.Protection/OpenMG.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Origin.cs b/BinaryObjectScanner.Protection/Origin.cs
index cc60a784..82d716dd 100644
--- a/BinaryObjectScanner.Protection/Origin.cs
+++ b/BinaryObjectScanner.Protection/Origin.cs
@@ -2,7 +2,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/PSXAntiModchip.cs b/BinaryObjectScanner.Protection/PSXAntiModchip.cs
index 7908ee4b..ffac928f 100644
--- a/BinaryObjectScanner.Protection/PSXAntiModchip.cs
+++ b/BinaryObjectScanner.Protection/PSXAntiModchip.cs
@@ -1,6 +1,6 @@
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/PlayJ.cs b/BinaryObjectScanner.Protection/PlayJ.cs
index 2fdfd55e..33644c5a 100644
--- a/BinaryObjectScanner.Protection/PlayJ.cs
+++ b/BinaryObjectScanner.Protection/PlayJ.cs
@@ -2,7 +2,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/ProtectDisc.cs b/BinaryObjectScanner.Protection/ProtectDisc.cs
index 0dc957a3..9549c850 100644
--- a/BinaryObjectScanner.Protection/ProtectDisc.cs
+++ b/BinaryObjectScanner.Protection/ProtectDisc.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/RainbowSentinel.cs b/BinaryObjectScanner.Protection/RainbowSentinel.cs
index 8829a24b..98ea1488 100644
--- a/BinaryObjectScanner.Protection/RainbowSentinel.cs
+++ b/BinaryObjectScanner.Protection/RainbowSentinel.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/RingPROTECH.cs b/BinaryObjectScanner.Protection/RingPROTECH.cs
index bf8efd80..73bd1ba0 100644
--- a/BinaryObjectScanner.Protection/RingPROTECH.cs
+++ b/BinaryObjectScanner.Protection/RingPROTECH.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/SVKP.cs b/BinaryObjectScanner.Protection/SVKP.cs
index e1363fba..9f754996 100644
--- a/BinaryObjectScanner.Protection/SVKP.cs
+++ b/BinaryObjectScanner.Protection/SVKP.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/SafeLock.cs b/BinaryObjectScanner.Protection/SafeLock.cs
index 827cfd57..5ac35ce4 100644
--- a/BinaryObjectScanner.Protection/SafeLock.cs
+++ b/BinaryObjectScanner.Protection/SafeLock.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/SecuROM.cs b/BinaryObjectScanner.Protection/SecuROM.cs
index 4c481436..c026c561 100644
--- a/BinaryObjectScanner.Protection/SecuROM.cs
+++ b/BinaryObjectScanner.Protection/SecuROM.cs
@@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/SmartE.cs b/BinaryObjectScanner.Protection/SmartE.cs
index 295ebce9..f15493e0 100644
--- a/BinaryObjectScanner.Protection/SmartE.cs
+++ b/BinaryObjectScanner.Protection/SmartE.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/SoftLock.cs b/BinaryObjectScanner.Protection/SoftLock.cs
index 8c88e246..ec874ac9 100644
--- a/BinaryObjectScanner.Protection/SoftLock.cs
+++ b/BinaryObjectScanner.Protection/SoftLock.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/SolidShield.cs b/BinaryObjectScanner.Protection/SolidShield.cs
index abf21469..a353d6a8 100644
--- a/BinaryObjectScanner.Protection/SolidShield.cs
+++ b/BinaryObjectScanner.Protection/SolidShield.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BurnOutSharp.ProtectionType
diff --git a/BinaryObjectScanner.Protection/StarForce.cs b/BinaryObjectScanner.Protection/StarForce.cs
index c4cb6176..cc4c8ca7 100644
--- a/BinaryObjectScanner.Protection/StarForce.cs
+++ b/BinaryObjectScanner.Protection/StarForce.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/Steam.cs b/BinaryObjectScanner.Protection/Steam.cs
index 0f2ac874..50e3bf0b 100644
--- a/BinaryObjectScanner.Protection/Steam.cs
+++ b/BinaryObjectScanner.Protection/Steam.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/TZCopyProtection.cs b/BinaryObjectScanner.Protection/TZCopyProtection.cs
index c0222ff5..9eee75da 100644
--- a/BinaryObjectScanner.Protection/TZCopyProtection.cs
+++ b/BinaryObjectScanner.Protection/TZCopyProtection.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/Tages.cs b/BinaryObjectScanner.Protection/Tages.cs
index dc4abf9d..9dde0891 100644
--- a/BinaryObjectScanner.Protection/Tages.cs
+++ b/BinaryObjectScanner.Protection/Tages.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BurnOutSharp.ProtectionType
diff --git a/BinaryObjectScanner.Protection/TivolaRingProtection.cs b/BinaryObjectScanner.Protection/TivolaRingProtection.cs
index 49067fbf..0f944c67 100644
--- a/BinaryObjectScanner.Protection/TivolaRingProtection.cs
+++ b/BinaryObjectScanner.Protection/TivolaRingProtection.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/Uplay.cs b/BinaryObjectScanner.Protection/Uplay.cs
index cf1a052f..0317e801 100644
--- a/BinaryObjectScanner.Protection/Uplay.cs
+++ b/BinaryObjectScanner.Protection/Uplay.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/WMDS.cs b/BinaryObjectScanner.Protection/WMDS.cs
index d24cf028..cb3ba090 100644
--- a/BinaryObjectScanner.Protection/WMDS.cs
+++ b/BinaryObjectScanner.Protection/WMDS.cs
@@ -3,7 +3,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/WTMCDProtect.cs b/BinaryObjectScanner.Protection/WTMCDProtect.cs
index aae218d7..f1bd2a6c 100644
--- a/BinaryObjectScanner.Protection/WTMCDProtect.cs
+++ b/BinaryObjectScanner.Protection/WTMCDProtect.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Protection/WinLock.cs b/BinaryObjectScanner.Protection/WinLock.cs
index f69939a3..6a8b044e 100644
--- a/BinaryObjectScanner.Protection/WinLock.cs
+++ b/BinaryObjectScanner.Protection/WinLock.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/Zzxzz.cs b/BinaryObjectScanner.Protection/Zzxzz.cs
index 5a20032e..29e54180 100644
--- a/BinaryObjectScanner.Protection/Zzxzz.cs
+++ b/BinaryObjectScanner.Protection/Zzxzz.cs
@@ -2,7 +2,7 @@ using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Protection
{
diff --git a/BinaryObjectScanner.Protection/nProtect.cs b/BinaryObjectScanner.Protection/nProtect.cs
index e000f2e9..c001c7c2 100644
--- a/BinaryObjectScanner.Protection/nProtect.cs
+++ b/BinaryObjectScanner.Protection/nProtect.cs
@@ -1,7 +1,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using BinaryObjectScanner.Interfaces;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
using SabreTools.Serialization.Wrappers;
namespace BinaryObjectScanner.Protection
diff --git a/BinaryObjectScanner.Utilities/BinaryObjectScanner.Utilities.csproj b/BinaryObjectScanner.Utilities/BinaryObjectScanner.Utilities.csproj
index 7cebf1bd..01a6f018 100644
--- a/BinaryObjectScanner.Utilities/BinaryObjectScanner.Utilities.csproj
+++ b/BinaryObjectScanner.Utilities/BinaryObjectScanner.Utilities.csproj
@@ -19,12 +19,9 @@
true
-
-
-
-
+
diff --git a/BinaryObjectScanner.Utilities/FileTypes.cs b/BinaryObjectScanner.Utilities/FileTypes.cs
index 47c70f41..fce31029 100644
--- a/BinaryObjectScanner.Utilities/FileTypes.cs
+++ b/BinaryObjectScanner.Utilities/FileTypes.cs
@@ -1,5 +1,5 @@
using System;
-using BinaryObjectScanner.Matching;
+using SabreTools.Matching;
namespace BinaryObjectScanner.Utilities
{
diff --git a/BinaryObjectScanner.Wrappers/WrapperFactory.cs b/BinaryObjectScanner.Wrappers/WrapperFactory.cs
index d7ddd011..7dbe5a8e 100644
--- a/BinaryObjectScanner.Wrappers/WrapperFactory.cs
+++ b/BinaryObjectScanner.Wrappers/WrapperFactory.cs
@@ -1,8 +1,8 @@
using System;
using System.IO;
-using BinaryObjectScanner.Matching;
using BinaryObjectScanner.Utilities;
using SabreTools.IO;
+using SabreTools.Matching;
using SabreTools.Serialization.Interfaces;
using SabreTools.Serialization.Wrappers;
diff --git a/BurnOutSharp.sln b/BurnOutSharp.sln
index 5ea5021b..f3110ed4 100644
--- a/BurnOutSharp.sln
+++ b/BurnOutSharp.sln
@@ -18,8 +18,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryObjectScanner.Wrappers", "BinaryObjectScanner.Wrappers\BinaryObjectScanner.Wrappers.csproj", "{35BD489F-E58D-45DD-9929-DC4B32414750}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryObjectScanner.Matching", "BinaryObjectScanner.Matching\BinaryObjectScanner.Matching.csproj", "{563BC37B-8E02-4178-B6FE-F3F6F65E0096}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "psxt001z", "psxt001z\psxt001z.csproj", "{D9574B47-0D6B-445A-97BF-272B5EF9AD3F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BinaryObjectScanner.Utilities", "BinaryObjectScanner.Utilities\BinaryObjectScanner.Utilities.csproj", "{3C1D1FE2-7E7C-4EC1-96B1-FE68B73282CD}"
@@ -54,10 +52,6 @@ Global
{35BD489F-E58D-45DD-9929-DC4B32414750}.Debug|Any CPU.Build.0 = Debug|Any CPU
{35BD489F-E58D-45DD-9929-DC4B32414750}.Release|Any CPU.ActiveCfg = Release|Any CPU
{35BD489F-E58D-45DD-9929-DC4B32414750}.Release|Any CPU.Build.0 = Release|Any CPU
- {563BC37B-8E02-4178-B6FE-F3F6F65E0096}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {563BC37B-8E02-4178-B6FE-F3F6F65E0096}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {563BC37B-8E02-4178-B6FE-F3F6F65E0096}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {563BC37B-8E02-4178-B6FE-F3F6F65E0096}.Release|Any CPU.Build.0 = Release|Any CPU
{D9574B47-0D6B-445A-97BF-272B5EF9AD3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9574B47-0D6B-445A-97BF-272B5EF9AD3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9574B47-0D6B-445A-97BF-272B5EF9AD3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/BurnOutSharp/BurnOutSharp.csproj b/BurnOutSharp/BurnOutSharp.csproj
index a47310b1..b257ff9a 100644
--- a/BurnOutSharp/BurnOutSharp.csproj
+++ b/BurnOutSharp/BurnOutSharp.csproj
@@ -52,10 +52,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Test/Test.csproj b/Test/Test.csproj
index 810d0ed5..0b084de5 100644
--- a/Test/Test.csproj
+++ b/Test/Test.csproj
@@ -10,7 +10,6 @@
-
@@ -18,6 +17,7 @@
+