Files
BinaryObjectScanner/BurnOutSharp/Interfaces/IScannable.cs

35 lines
1.4 KiB
C#
Raw Normal View History

using System.Collections.Concurrent;
2021-02-26 09:26:23 -08:00
using System.IO;
2022-05-01 17:41:50 -07:00
namespace BurnOutSharp.Interfaces
2021-02-26 09:26:23 -08:00
{
2022-05-01 21:06:52 -07:00
/// <summary>
2022-12-08 21:43:39 -08:00
/// Mark a file type as being able to be scanned
2022-05-01 21:06:52 -07:00
/// </summary>
2022-12-08 21:43:39 -08:00
/// <remarks>
/// This is also used for packers, embedded archives, and other
/// installer formats that may need to be "extracted" before they
/// can be fully scanned.
/// </remarks>
internal interface IScannable
2021-02-26 09:26:23 -08:00
{
/// <summary>
/// Scan a file for all internal protections
/// </summary>
/// <param name="scanner">Scanner object for state tracking</param>
/// <param name="file">Path to the input file</param>
/// <returns>Dictionary mapping paths to protection lists</returns>
/// <remarks>Ideally, this should just point to the other scan implementation</remarks>
ConcurrentDictionary<string, ConcurrentQueue<string>> Scan(Scanner scanner, string file);
2021-02-26 09:26:23 -08:00
/// <summary>
/// Scan a stream for all internal protections
/// </summary>
/// <param name="scanner">Scanner object for state tracking</param>
/// <param name="stream">Stream representing the input file</param>
/// <param name="file">Path to the input file</param>
/// <returns>Dictionary mapping paths to protection lists</returns>
2022-12-08 21:42:24 -08:00
ConcurrentDictionary<string, ConcurrentQueue<string>> Scan(Scanner scanner, Stream stream, string file);
2021-02-26 09:26:23 -08:00
}
}