diff --git a/BinaryObjectScanner/Scanner.cs b/BinaryObjectScanner/Scanner.cs index 6033d734..d8d68ddc 100644 --- a/BinaryObjectScanner/Scanner.cs +++ b/BinaryObjectScanner/Scanner.cs @@ -267,10 +267,13 @@ namespace BinaryObjectScanner { // Quick sanity check before continuing if (!stream.CanRead) + { + if (_includeDebug) Console.WriteLine($"{fileName} does not have a readable stream, skipping..."); return []; + } // Initialize the protections found - var protections = new ProtectionDictionary(); + var protections = new ProtectionDictionary(); // Get the extension for certain checks string extension = Path.GetExtension(fileName).ToLower().TrimStart('.');