From b9e9dabdb0b68b533de839e59e9dd7d9825f6f83 Mon Sep 17 00:00:00 2001 From: Mingcong Bai Date: Sat, 10 Jul 2021 10:05:38 -0700 Subject: [PATCH] lib/elf: also detect prefixed patterns, e.g. setuid ELF --- lib/elf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elf.sh b/lib/elf.sh index 479cc1fc..8b7cc796 100644 --- a/lib/elf.sh +++ b/lib/elf.sh @@ -32,7 +32,7 @@ abreqexe strip file objcopy install elf_iself() { - file -F $'\n' "$1" | grep -Eq '^ (ELF|thin archive|current ar)' + file -F $'\n' "$1" | grep -Eq '^ (\w+ (ELF|thin archive|current ar)|(ELF|thin archive|current ar))' } # $1 = path to ELF