From 4e664cbe0f55597490329eec2aa5c9a0caedea0c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 30 Oct 2019 12:06:40 -0700 Subject: [PATCH] Add *nix and Mac executable headers to checking --- BurnOutSharp/ProtectionFind.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/ProtectionFind.cs b/BurnOutSharp/ProtectionFind.cs index bfb96744..9618ac29 100644 --- a/BurnOutSharp/ProtectionFind.cs +++ b/BurnOutSharp/ProtectionFind.cs @@ -380,8 +380,11 @@ namespace BurnOutSharp #region Executable Content Checks - // Windows Executable and DLL - if (magic.StartsWith("MZ")) + if (magic.StartsWith("MZ") // Windows Executable and DLL + || magic.StartsWith((char)0x7f + "ELF") // Unix binaries + || magic.StartsWith("" + (char)0xfe + (char)0xed + (char)0xfa + (char)0xce) // Macintosh + || magic.StartsWith("" + (char)0xce + (char)0xfa + (char)0xed + (char)0xfe) // Macintosh + || magic.StartsWith("Joy!peff")) // Macintosh { try {