get_format_from_report(): fix bugs and add a list of dynamic formats

This commit is contained in:
Yacine Elhamer
2023-06-25 00:54:55 +01:00
parent 0c62a5736e
commit 5f6aade92b
3 changed files with 4 additions and 5 deletions

View File

@@ -81,7 +81,7 @@ import capa.render.verbose as v
import capa.features.freeze
import capa.features.address
from capa.helpers import get_auto_format, log_unsupported_runtime_error
from capa.features.common import FORMAT_AUTO, FORMAT_CAPE, FORMAT_FREEZE, is_global_feature
from capa.features.common import FORMAT_AUTO, FORMAT_FREEZE, DYNAMIC_FORMATS, is_global_feature
from capa.features.extractors.base_extractor import DynamicExtractor, FeatureExtractor
logger = logging.getLogger("capa.show-features")
@@ -134,7 +134,7 @@ def main(argv=None):
log_unsupported_runtime_error()
return -1
if format_ in (FORMAT_CAPE):
if format_ in DYNAMIC_FORMATS:
print_dynamic_analysis(cast(DynamicExtractor, extractor), args)
else:
print_static_analysis(extractor, args)