main: get_rules: remove progress bar

This commit is contained in:
Willi Ballenthin
2023-01-21 19:38:23 +01:00
parent 3dfd16c033
commit 67cfefd2df
7 changed files with 8 additions and 16 deletions

View File

@@ -49,7 +49,7 @@ def main(argv=None):
try:
os.makedirs(args.cache, exist_ok=True)
rules = capa.main.get_rules(args.rules, disable_progress=True, cache_dir=args.cache)
rules = capa.main.get_rules(args.rules, cache_dir=args.cache)
logger.info("successfully loaded %s rules", len(rules))
except (IOError, capa.rules.InvalidRule, capa.rules.InvalidRuleSet) as e:
logger.error("%s", str(e))

View File

@@ -709,7 +709,7 @@ def main(argv=None):
logging.getLogger("capa2yara").setLevel(level)
try:
rules = capa.main.get_rules([args.rules], disable_progress=True)
rules = capa.main.get_rules(args.rules)
namespaces = capa.rules.index_rules_by_namespace(list(rules.rules.values()))
logger.info("successfully loaded %s rules (including subscope rules which will be ignored)", len(rules))
if args.tag:

View File

@@ -161,7 +161,7 @@ def render_dictionary(doc: rd.ResultDocument) -> Dict[str, Any]:
# ==== render dictionary helpers
def capa_details(rules_path, file_path, output_format="dictionary"):
# load rules from disk
rules = capa.main.get_rules([rules_path], disable_progress=True)
rules = capa.main.get_rules([rules_path])
# extract features and find capabilities
extractor = capa.main.get_extractor(file_path, "auto", capa.main.BACKEND_VIV, [], False, disable_progress=True)

View File

@@ -998,7 +998,7 @@ def main(argv=None):
time0 = time.time()
try:
rules = capa.main.get_rules(args.rules, disable_progress=True)
rules = capa.main.get_rules(args.rules)
logger.info("successfully loaded %s rules", len(rules))
if args.tag:
rules = rules.filter_rules_by_meta(args.tag)

View File

@@ -88,7 +88,7 @@ def main(argv=None):
try:
with capa.main.timing("load rules"):
rules = capa.main.get_rules(args.rules, disable_progress=True)
rules = capa.main.get_rules(args.rules)
except (IOError) as e:
logger.error("%s", str(e))
return -1