From 80bdb4a54586ba42dc11c0deeb9ec1a7a3f066ee Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Fri, 3 Jul 2020 09:32:58 -0600 Subject: [PATCH] pep8 --- capa/features/extractors/__init__.py | 1 + capa/features/extractors/ida/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/capa/features/extractors/__init__.py b/capa/features/extractors/__init__.py index 75426041..091c1830 100644 --- a/capa/features/extractors/__init__.py +++ b/capa/features/extractors/__init__.py @@ -1,5 +1,6 @@ import abc + class FeatureExtractor(object): """ FeatureExtractor defines the interface for fetching features from a sample. diff --git a/capa/features/extractors/ida/__init__.py b/capa/features/extractors/ida/__init__.py index c89ac82f..c2bc79f5 100644 --- a/capa/features/extractors/ida/__init__.py +++ b/capa/features/extractors/ida/__init__.py @@ -7,7 +7,6 @@ import capa.features.extractors.ida.file import capa.features.extractors.ida.insn import capa.features.extractors.ida.function import capa.features.extractors.ida.basicblock - from capa.features.extractors import FeatureExtractor @@ -52,6 +51,7 @@ class IdaFeatureExtractor(FeatureExtractor): def get_functions(self): import capa.features.extractors.ida.helpers as ida_helpers + for f in ida_helpers.get_functions(ignore_thunks=True, ignore_libs=True): yield add_va_int_cast(f) @@ -69,6 +69,7 @@ class IdaFeatureExtractor(FeatureExtractor): def get_instructions(self, f, bb): import capa.features.extractors.ida.helpers as ida_helpers + for insn in ida_helpers.get_instructions_in_range(bb.start_ea, bb.end_ea): yield add_va_int_cast(insn)