diff --git a/capa/features/extractors/elf.py b/capa/features/extractors/elf.py index 9008d3e9..24a48e60 100644 --- a/capa/features/extractors/elf.py +++ b/capa/features/extractors/elf.py @@ -106,7 +106,6 @@ class Shdr: ) - class ELF: def __init__(self, f: BinaryIO): self.f = f @@ -720,7 +719,9 @@ class SymTab: if section.sh_info & SHT_SYMTAB: strtab_section = ElfBinary.sections[section.sh_link] sh_symtab = Shdr.from_viv(section, ElfBinary.readAtOffset(section.sh_offset, section.sh_size)) - sh_strtab = Shdr.from_viv(strtab_section, ElfBinary.readAtOffset(strtab_section.sh_offset, strtab_section.sh_size)) + sh_strtab = Shdr.from_viv( + strtab_section, ElfBinary.readAtOffset(strtab_section.sh_offset, strtab_section.sh_size) + ) try: return cls(endian, bitness, sh_symtab, sh_strtab) diff --git a/capa/features/extractors/viv/extractor.py b/capa/features/extractors/viv/extractor.py index c73b24a2..25e4b0de 100644 --- a/capa/features/extractors/viv/extractor.py +++ b/capa/features/extractors/viv/extractor.py @@ -51,7 +51,9 @@ class VivisectFeatureExtractor(FeatureExtractor): def get_functions(self) -> Iterator[FunctionHandle]: cache = {} for va in sorted(self.vw.getFunctions()): - yield FunctionHandle(address=AbsoluteVirtualAddress(va), inner=viv_utils.Function(self.vw, va), ctx={"cache":cache}) + yield FunctionHandle( + address=AbsoluteVirtualAddress(va), inner=viv_utils.Function(self.vw, va), ctx={"cache": cache} + ) def extract_function_features(self, fh: FunctionHandle) -> Iterator[Tuple[Feature, Address]]: yield from capa.features.extractors.viv.function.extract_features(fh)