diff --git a/BinaryObjectScanner.Interfaces/IDetectable.cs b/BinaryObjectScanner.Interfaces/IDetectable.cs new file mode 100644 index 00000000..56ebd3b5 --- /dev/null +++ b/BinaryObjectScanner.Interfaces/IDetectable.cs @@ -0,0 +1,28 @@ +using System.IO; + +namespace BinaryObjectScanner.Interfaces +{ + /// + /// Mark a file type as being able to be detected + /// + public interface IDetectable + { + /// + /// Check if a file is detected as this file type + /// + /// Path to the input file + /// True to include debug data, false otherwise + /// Detected file or protection type, null on error + /// Ideally, this should just point to the other detect implementation. + string Detect(string file, bool includeDebug); + + /// + /// Check if a stream is detected as this file type + /// + /// Stream representing the input file + /// Path to the input file + /// True to include debug data, false otherwise + /// Detected file or protection type, null on error + string Detect(Stream stream, string file, bool includeDebug); + } +} diff --git a/BinaryObjectScanner.Interfaces/IExtractable.cs b/BinaryObjectScanner.Interfaces/IExtractable.cs index d8dceabc..ad7d062a 100644 --- a/BinaryObjectScanner.Interfaces/IExtractable.cs +++ b/BinaryObjectScanner.Interfaces/IExtractable.cs @@ -5,11 +5,10 @@ namespace BinaryObjectScanner.Interfaces /// /// Mark a file type as being able to be extracted /// - /// TODO: Add debug flag to both of the declarations public interface IExtractable { /// - /// Scan a file for all internal protections + /// Extract a file to a temporary path, if possible /// /// Path to the input file /// True to include debug data, false otherwise @@ -18,7 +17,7 @@ namespace BinaryObjectScanner.Interfaces string Extract(string file, bool includeDebug); /// - /// Scan a stream for all internal protections + /// Extract a stream to a temporary path, if possible /// /// Stream representing the input file /// Path to the input file