Make backend a required parameter in get_extractor

Make the `backend` argument required in the `get_extractor` internal
routine. Specify a backend in the scripts which call this function. Add
a CLI backend option in capa/features/freeze.py as well.
This commit is contained in:
Ana Maria Martinez Gomez
2021-02-23 17:38:06 +01:00
parent a026cb84d1
commit d28ba3c628
7 changed files with 15 additions and 7 deletions

View File

@@ -95,7 +95,7 @@ def get_capa_results(args):
rules, format, path = args
logger.info("computing capa results for: %s", path)
try:
extractor = capa.main.get_extractor(path, format, disable_progress=True)
extractor = capa.main.get_extractor(path, format, capa.main.BACKEND_VIV, disable_progress=True)
except capa.main.UnsupportedFormatError:
# i'm 100% sure if multiprocessing will reliably raise exceptions across process boundaries.
# so instead, return an object with explicit success/failure status.