mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 11:07:53 -08:00
fix as per review
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user