diff --git a/BinaryObjectScanner/Scanner.cs b/BinaryObjectScanner/Scanner.cs index a1c0d49a..3d7839eb 100644 --- a/BinaryObjectScanner/Scanner.cs +++ b/BinaryObjectScanner/Scanner.cs @@ -297,9 +297,6 @@ namespace BinaryObjectScanner return []; } - // Initialize the protections found - var protections = new ProtectionDictionary(); - // Get the extension for certain checks string extension = Path.GetExtension(fileName).ToLower().TrimStart('.'); @@ -328,6 +325,9 @@ namespace BinaryObjectScanner // Get the wrapper, if possible var wrapper = WrapperFactory.CreateWrapper(fileType, stream); + // Initialize the protections found + var protections = new ProtectionDictionary(); + #region Non-Archive File Types // Try to scan file contents