Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronatp authored Nov 13, 2023
1 parent 329ac2d commit 4162c90
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions capa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ def handle_viv_backend(path: Path, format_: str, sigpaths: List[Path], should_sa
return capa.features.extractors.viv.extractor.VivisectFeatureExtractor(vw, path, os_)


@catch_log_return_errors
def get_extractor(
path: Path,
format_: str,
Expand Down Expand Up @@ -1281,18 +1282,15 @@ def main(argv: Optional[List[str]] = None):
should_save_workspace = os.environ.get("CAPA_SAVE_WORKSPACE") not in ("0", "no", "NO", "n", None)


# Perform error checking
# Return if unsupported hardware or software
extractor = exceptUnsupportedError(
get_extractor(
args.sample,
format_,
args.os,
args.backend,
sig_paths,
should_save_workspace,
disable_progress=args.quiet or args.debug,
)
# Error checking and logging is performed in the get_extractor call
extractor = get_extractor(
args.sample,
format_,
args.os,
args.backend,
sig_paths,
should_save_workspace,
disable_progress=args.quiet or args.debug,
)

meta = collect_metadata(argv, args.sample, args.format, args.os, args.rules, extractor)
Expand Down

0 comments on commit 4162c90

Please sign in to comment.