This commit is contained in:
Willi Ballenthin
2024-02-14 14:20:25 +00:00
committed by Willi Ballenthin
parent b163f82a71
commit 0f9dd9095b
2 changed files with 4 additions and 1 deletions

View File

@@ -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))

View File

@@ -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")