mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
fmt
This commit is contained in:
committed by
Willi Ballenthin
parent
b163f82a71
commit
0f9dd9095b
@@ -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))
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user