diff --git a/capa/loader.py b/capa/loader.py index f05dbd38..e4f0a5c9 100644 --- a/capa/loader.py +++ b/capa/loader.py @@ -279,20 +279,24 @@ def get_file_extractors(input_file: Path, input_format: str) -> List[FeatureExtr if input_format == FORMAT_PE: import capa.features.extractors.pefile + file_extractors.append(capa.features.extractors.pefile.PefileFeatureExtractor(input_file)) elif input_format == FORMAT_DOTNET: import capa.features.extractors.pefile import capa.features.extractors.dotnetfile + file_extractors.append(capa.features.extractors.pefile.PefileFeatureExtractor(input_file)) file_extractors.append(capa.features.extractors.dotnetfile.DotnetFileFeatureExtractor(input_file)) elif input_format == FORMAT_ELF: import capa.features.extractors.elffile + file_extractors.append(capa.features.extractors.elffile.ElfFeatureExtractor(input_file)) elif input_format == FORMAT_CAPE: import capa.features.extractors.cape.extractor + report = json.loads(input_file.read_text(encoding="utf-8")) file_extractors.append(capa.features.extractors.cape.extractor.CapeExtractor.from_report(report)) diff --git a/capa/rules/__init__.py b/capa/rules/__init__.py index 8ce3433d..530c8424 100644 --- a/capa/rules/__init__.py +++ b/capa/rules/__init__.py @@ -1058,7 +1058,6 @@ class Rule: import ruamel.yaml # use ruamel to enable nice formatting - # we use the ruamel.yaml parser because it supports roundtripping of documents with comments. y = ruamel.yaml.YAML(typ="rt")