From 88faed3fd8da0424f3962fe71be6026dee639ff6 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Tue, 25 Jun 2019 19:14:07 +0200 Subject: [PATCH] Improve output formatting --- mythril/analysis/templates/report_as_markdown.jinja2 | 6 +++--- mythril/analysis/templates/report_as_text.jinja2 | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mythril/analysis/templates/report_as_markdown.jinja2 b/mythril/analysis/templates/report_as_markdown.jinja2 index ecf2be69..d47138e2 100644 --- a/mythril/analysis/templates/report_as_markdown.jinja2 +++ b/mythril/analysis/templates/report_as_markdown.jinja2 @@ -27,12 +27,12 @@ In file: {{ issue.filename }}:{{ issue.lineno }} {% if issue.tx_sequence %} ### Transaction Sequence - + {% for step in issue.tx_sequence.steps %} {% if step == issue.tx_sequence.steps[0] and step.input != "0x" and step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %} -Caller: {{ step.origin }}, data: [CONTRACT CREATION], value: {{ step.value }} +Caller: [CREATOR], data: [CONTRACT CREATION], value: {{ step.value }} {% else %} -Caller: {{ step.origin }}, data: {{ step.input }}, value: {{ step.value }} +Caller: {% if step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{% elif step.origin == "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" %}[ATTACKER]{% else %}[SOMEGUY]{% endif %}, data: {{ step.input }}, value: {{ step.value }} {% endif %} {% endfor %} {% endif %} diff --git a/mythril/analysis/templates/report_as_text.jinja2 b/mythril/analysis/templates/report_as_text.jinja2 index 7e2f9713..c9bc3822 100644 --- a/mythril/analysis/templates/report_as_text.jinja2 +++ b/mythril/analysis/templates/report_as_text.jinja2 @@ -23,9 +23,9 @@ Transaction Sequence: {% for step in issue.tx_sequence.steps %} {% if step == issue.tx_sequence.steps[0] and step.input != "0x" and step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %} -Caller: {{ step.origin }}, data: [CONTRACT CREATION], value: {{ step.value }} +Caller: [CREATOR], data: [CONTRACT CREATION], value: {{ step.value }} {% else %} -Caller: {{ step.origin }}, data: {{ step.input }}, value: {{ step.value }} +Caller: {% if step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{% elif step.origin == "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" %}[ATTACKER]{% else %}[SOMEGUY]{% endif %}, data: {{ step.input }}, value: {{ step.value }} {% endif %} {% endfor %} {% endif %}