From ed645d756ee1b82765951ee3e074669a42b12f10 Mon Sep 17 00:00:00 2001
From: Bernhard Mueller
Date: Tue, 20 Mar 2018 15:51:52 +0700
Subject: [PATCH] IMPORTANT: Add Phrack-style call graph
---
myth | 3 +-
mythril/analysis/callgraph.py | 155 ++++++++++++++++++++++++++++------
2 files changed, 129 insertions(+), 29 deletions(-)
diff --git a/myth b/myth
index 681cc0d1..4b4882ea 100755
--- a/myth
+++ b/myth
@@ -81,6 +81,7 @@ options = parser.add_argument_group('options')
options.add_argument('--sync-all', action='store_true', help='Also sync contracts with zero balance')
options.add_argument('--max-depth', type=int, default=12, help='Maximum recursion depth for symbolic execution')
options.add_argument('--solc-args', help='Extra arguments for solc')
+options.add_argument('--phrack', action='store_true', help='Phrack-style call graph')
options.add_argument('--enable-physics', type=bool, default=False, help='enable graph physics simulation')
options.add_argument('-v', type=int, help='log level (0-2)', metavar='LOG_LEVEL')
@@ -388,7 +389,7 @@ elif (args.graph) or (args.fire_lasers):
if args.enable_physics is not None:
physics = True
- html = generate_graph(sym, args.enable_physics)
+ html = generate_graph(sym, args.enable_physics, args.phrack)
try:
with open(args.graph, "w") as f:
diff --git a/mythril/analysis/callgraph.py b/mythril/analysis/callgraph.py
index d053a293..48c3d366 100644
--- a/mythril/analysis/callgraph.py
+++ b/mythril/analysis/callgraph.py
@@ -2,9 +2,9 @@ from z3 import Z3Exception, simplify
from laser.ethereum.svm import NodeFlags
import re
+default_title = 'Mythril / Ethereum LASER Symbolic VM
'
-graph_html = '''
-
+default_style = '''
-
-
-
+
-Mythril / Ethereum LASER Symbolic VM
-
+Mythril / LASER Symbolic VM
+