mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
Merge pull request #1715 from mandiant/fix/issue-1710
fix rendering of scope in vverbose mode
This commit is contained in:
@@ -369,8 +369,13 @@ def render_rules(ostream, doc: rd.ResultDocument):
|
||||
render_match(ostream, first_match, indent=0)
|
||||
else:
|
||||
for location, match in sorted(doc.rules[rule.meta.name].matches):
|
||||
ostream.write(f"static scope: {rule.meta.scopes.static}")
|
||||
ostream.write(f"dynamic scope: {rule.meta.scopes.dynamic}")
|
||||
if doc.meta.flavor == rd.Flavor.STATIC:
|
||||
ostream.write(f"{rule.meta.scopes.static}")
|
||||
elif doc.meta.flavor == rd.Flavor.DYNAMIC:
|
||||
ostream.write(f"{rule.meta.scopes.dynamic}")
|
||||
else:
|
||||
capa.helpers.assert_never(doc.meta.flavor)
|
||||
|
||||
ostream.write(" @ ")
|
||||
ostream.write(capa.render.verbose.format_address(location))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user