From b392b48b285a88eaf4509308e5a2d3719ffcc3e2 Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Thu, 13 Jan 2022 15:24:58 -0700 Subject: [PATCH] black --- capa/features/extractors/elf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/capa/features/extractors/elf.py b/capa/features/extractors/elf.py index 13e02dc1..60200a7c 100644 --- a/capa/features/extractors/elf.py +++ b/capa/features/extractors/elf.py @@ -250,13 +250,13 @@ def detect_elf_os(f: BinaryIO) -> str: for i in range(e_shnum): offset = i * e_shentsize shent = section_headers[offset : offset + e_shentsize] - + if bitness == 32: sh_name, sh_type, _, sh_addr, sh_offset, sh_size = struct.unpack_from(endian + "IIIIII", shent, 0x0) elif bitness == 64: sh_name, sh_type, _, sh_addr, sh_offset, sh_size = struct.unpack_from(endian + "IIQQQQ", shent, 0x0) else: - raise NotImplementedError() + raise NotImplementedError() SHT_NOTE = 0x7 if sh_type != SHT_NOTE: @@ -278,7 +278,7 @@ def detect_elf_os(f: BinaryIO) -> str: name = note[name_offset : name_offset + namesz].partition(b"\x00")[0].decode("ascii") logger.debug("name: %s", name) - + if name == "Linux": logger.debug("note owner: %s", "LINUX") ret = OS.LINUX if not ret else ret