Add IExtractable skeletons to packers

This commit is contained in:
Matt Nadareski
2023-03-09 15:33:21 -05:00
parent 67059b2e43
commit 41d77085ae
24 changed files with 483 additions and 26 deletions

View File

@@ -13,7 +13,7 @@ namespace BurnOutSharp.PackerType
/// Though not technically a packer, this detection is for any executables that include
/// others in their resources in some uncompressed manner to be used at runtime.
/// </summary>
public class EmbeddedExecutable : IPortableExecutableCheck, IScannable
public class EmbeddedExecutable : IExtractable, IPortableExecutableCheck, IScannable
{
/// <inheritdoc/>
public string CheckPortableExecutable(string file, PortableExecutable pex, bool includeDebug)
@@ -30,6 +30,25 @@ namespace BurnOutSharp.PackerType
return null;
}
/// <inheritdoc/>
public string Extract(string file)
{
if (!File.Exists(file))
return null;
using (var fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read))
{
return Extract(fs, file);
}
}
/// <inheritdoc/>
public string Extract(Stream stream, string file)
{
// Create extraction based off Scan
return null;
}
/// <inheritdoc/>
public ConcurrentDictionary<string, ConcurrentQueue<string>> Scan(Scanner scanner, string file)
{