mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 11:07:53 -08:00
vverbose: guard against rendering basic blocks
This commit is contained in:
@@ -128,7 +128,11 @@ def render_feature(ostream, match: rd.Match, feature: frzf.Feature, indent=0):
|
||||
ostream.write(" " * indent)
|
||||
|
||||
key = feature.type
|
||||
if isinstance(feature, frzf.ImportFeature):
|
||||
if isinstance(feature, frzf.BasicBlockFeature):
|
||||
# i don't think it makes sense to have standalone basic block features.
|
||||
# we don't parse them from rules, only things like: `count(basic block) > 1`
|
||||
raise ValueError("cannot render basic block feature directly")
|
||||
elif isinstance(feature, frzf.ImportFeature):
|
||||
# fixup access to Python reserved name
|
||||
value = feature.import_
|
||||
elif isinstance(feature, frzf.ClassFeature):
|
||||
|
||||
Reference in New Issue
Block a user