mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 11:07:53 -08:00
fetch section data by offset (not name)
Co-authored-by: Willi Ballenthin <willi.ballenthin@gmail.com>
This commit is contained in:
@@ -134,8 +134,8 @@ def extract_insn_api_features(fh: FunctionHandle, bb, ih: InsnHandle) -> Iterato
|
||||
for section in elf.sections:
|
||||
if section.sh_info & SHT_SYMTAB:
|
||||
strtab_section = elf.sections[section.vsGetField("sh_link")]
|
||||
sh_symtab = Shdr.from_viv(section, elf.getSectionBytes(section.name))
|
||||
sh_strtab = Shdr.from_viv(strtab, elf.getSectionBytes(strtab.name))
|
||||
sh_symtab = Shdr.from_viv(section, elf.readAtOffset(section.sh_offset, section.sh_size))
|
||||
sh_strtab = Shdr.from_viv(strtab, elf.readAtOffset(strtab.sh_offset, strtab.sh_size))
|
||||
|
||||
symtab = SymTab(endian, bitness, sh_symtab, sh_strtab)
|
||||
f.vw.metadata["SymbolTable"] = symtab
|
||||
|
||||
Reference in New Issue
Block a user