From c7b65cfe8a208d4472295885a675016d0c3a927a Mon Sep 17 00:00:00 2001 From: Yacine Elhamer <16624109+yelhamer@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:23:32 +0100 Subject: [PATCH] Shdr constructor: Use direct member access to get vstruct's section header information Co-authored-by: Willi Ballenthin --- capa/features/extractors/elf.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/capa/features/extractors/elf.py b/capa/features/extractors/elf.py index 0207543b..24c58030 100644 --- a/capa/features/extractors/elf.py +++ b/capa/features/extractors/elf.py @@ -98,14 +98,14 @@ class Shdr: section headers (Elf.Elf32Section or Elf.Elf64Section) """ return cls( - int(section.vsGetField("sh_name")), - int(section.vsGetField("sh_type")), - int(section.vsGetField("sh_flags")), - int(section.vsGetField("sh_addr")), - int(section.vsGetField("sh_offset")), - int(section.vsGetField("sh_size")), - int(section.vsGetField("sh_link")), - int(section.vsGetField("sh_entsize")), + section.sh_name, + section.sh_type, + section.sh_flags, + section.sh_addr, + section.sh_offset, + section.sh_size, + section.sh_link, + section.sh_entsize, buf, )