From 22a53bb1dc00ed464cb3bf14ea7603d6b75e8e4b Mon Sep 17 00:00:00 2001 From: manasghandat Date: Thu, 9 Mar 2023 22:01:52 +0530 Subject: [PATCH] fix as per review --- capa/engine.py | 2 +- capa/features/extractors/viv/file.py | 2 +- capa/ida/plugin/form.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/capa/engine.py b/capa/engine.py index b90e9d47..4d9e0980 100644 --- a/capa/engine.py +++ b/capa/engine.py @@ -44,7 +44,7 @@ class Statement: def __str__(self): name = self.name.lower() - children = ','.join(map(str, self.get_children())) + children = ",".join(map(str, self.get_children())) if self.description: return f"{name}({children} = {self.description})" else: diff --git a/capa/features/extractors/viv/file.py b/capa/features/extractors/viv/file.py index 1f105158..a28045b3 100644 --- a/capa/features/extractors/viv/file.py +++ b/capa/features/extractors/viv/file.py @@ -44,7 +44,7 @@ def extract_file_import_names(vw, **kwargs) -> Iterator[Tuple[Feature, Address]] modname, impname = tinfo.split(".", 1) if is_viv_ord_impname(impname): # replace ord prefix with # - impname = "#"+ impname[len('ord'):] + impname = "#" + impname[len("ord") :] addr = AbsoluteVirtualAddress(va) for name in capa.features.extractors.helpers.generate_symbols(modname, impname): diff --git a/capa/ida/plugin/form.py b/capa/ida/plugin/form.py index 8904eb74..b7c54667 100644 --- a/capa/ida/plugin/form.py +++ b/capa/ida/plugin/form.py @@ -708,8 +708,8 @@ class CapaExplorerForm(idaapi.PluginForm): "capa is showing you cached results from a previous analysis run. Your rules have changed since and you should reanalyze the program to see new results." ) view_status_rules = "no rules matched for cache" - - cached_results_time = self.resdoc_cache.meta.timestamp.strftime('%Y-%m-%d %H:%M:%S') + + cached_results_time = self.resdoc_cache.meta.timestamp.strftime("%Y-%m-%d %H:%M:%S") new_view_status = f"capa rules: {view_status_rules}, cached results (created {cached_results_time})" except Exception as e: logger.error("Failed to load cached capa results (error: %s).", e, exc_info=True)