This commit is contained in:
William Ballenthin
2021-05-27 10:45:01 -06:00
parent 70396ffa36
commit 3c90e909a1
2 changed files with 6 additions and 2 deletions

View File

@@ -216,7 +216,10 @@ class _MatchedRegex(Regex):
self.matches = matches
def __str__(self):
return 'regex(string =~ %s, matches = %s)' % (self.value, ", ".join(map(lambda s: '"' + s + '"', (self.matches or {}).keys())))
return "regex(string =~ %s, matches = %s)" % (
self.value,
", ".join(map(lambda s: '"' + s + '"', (self.matches or {}).keys())),
)
class StringFactory(object):

View File

@@ -8,8 +8,8 @@
import tabulate
import capa.features
import capa.rules
import capa.features
import capa.render.utils as rutils
import capa.render.verbose
@@ -129,6 +129,7 @@ def render_feature(ostream, match, feature, indent=0):
render_locations(ostream, {"locations": locations})
ostream.write("\n")
def render_node(ostream, match, node, indent=0):
if node["type"] == "statement":
render_statement(ostream, match, node["statement"], indent=indent)