mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-19 15:25:09 +00:00
Executable is not inherently extractable
This commit is contained in:
@@ -38,7 +38,6 @@ namespace BurnOutSharp
|
||||
case SupportedFileType.BZip2: return new BinaryObjectScanner.FileType.BZip2();
|
||||
case SupportedFileType.CFB: return new BinaryObjectScanner.FileType.CFB();
|
||||
//case SupportedFileType.CIA: return new BinaryObjectScanner.FileType.CIA();
|
||||
case SupportedFileType.Executable: return new BinaryObjectScanner.FileType.Executable();
|
||||
case SupportedFileType.GCF: return new BinaryObjectScanner.FileType.GCF();
|
||||
case SupportedFileType.GZIP: return new BinaryObjectScanner.FileType.GZIP();
|
||||
case SupportedFileType.InstallShieldArchiveV3: return new BinaryObjectScanner.FileType.InstallShieldArchiveV3();
|
||||
|
||||
@@ -298,16 +298,9 @@ namespace BurnOutSharp
|
||||
if (detectable != null && ScanContents)
|
||||
{
|
||||
// If we have an executable, it needs to bypass normal handling
|
||||
// TODO: Write custom executable handling
|
||||
if (detectable is Executable executable)
|
||||
{
|
||||
executable.IncludePackers = ScanPackers;
|
||||
|
||||
// TODO: Enable this after IExtractable is properly implemented for Executable
|
||||
//var subProtections = Handler.HandleDetectable(executable, fileName, stream, IncludeDebug);
|
||||
//if (subProtections != null)
|
||||
// AppendToDictionary(protections, fileName, subProtections);
|
||||
|
||||
var subProtections = ProcessExecutable(executable, fileName, stream);
|
||||
if (subProtections != null)
|
||||
AppendToDictionary(protections, subProtections);
|
||||
@@ -347,13 +340,9 @@ namespace BurnOutSharp
|
||||
// If we're scanning archives
|
||||
if (extractable != null && ScanArchives)
|
||||
{
|
||||
// We only want to process non-executables
|
||||
if (!(extractable is Executable))
|
||||
{
|
||||
var subProtections = Handler.HandleExtractable(extractable, fileName, stream, this);
|
||||
if (subProtections != null)
|
||||
AppendToDictionary(protections, subProtections);
|
||||
}
|
||||
var subProtections = Handler.HandleExtractable(extractable, fileName, stream, this);
|
||||
if (subProtections != null)
|
||||
AppendToDictionary(protections, subProtections);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user