Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mythril/tests/testdata/outputs_expected/calls.sol.o.graph.html

62 lines
30 KiB

<!DOCTYPE html>
<html>
<head>
<title>Call Graph</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css" integrity="sha256-iq5ygGJ7021Pi7H5S+QAUXCPUfaBzfqeplbg/KlEssg=" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js" integrity="sha256-JuQeAGbk9rG/EoRMixuy5X8syzICcvB0dj3KindZkY0=" crossorigin="anonymous"></script>
<style type="text/css">
#mynetwork {
height: 100%;
background-color: #232625;
}
body {
background-color: #232625;
color: #ffffff;
font-size: 10px;
}
html, body {
height: 95%;
}
</style>
<script>
var options = {"autoResize": true, "edges": {"font": {"align": "horizontal", "background": "none", "color": "#FFFFFF", "face": "arial", "multi": false, "strokeColor": "#ffffff", "strokeWidth": 0, "vadjust": 0}}, "height": "100%", "layout": {"hierarchical": {"blockShifting": true, "direction": "LR", "edgeMinimization": true, "enabled": true, "levelSeparation": 450, "nodeSpacing": 200, "parentCentralization": false, "sortMethod": "directed", "treeSpacing": 100}, "improvedLayout": true}, "manipulation": false, "nodes": {"borderWidth": 1, "borderWidthSelected": 2, "chosen": true, "color": "#000000", "font": {"align": "left", "color": "#FFFFFF"}, "shape": "box"}, "physics": {"enabled": false}, "width": "100%"};
var nodes = [{"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "0 PUSH1 0x60\n2 PUSH1 0x40\n4 MSTORE\n5 PUSH1 0x04\n7 CALLDATASIZE\n8 LT\n9 PUSH2 0x0083\n12 JUMPI", "id": "184", "isExpanded": false, "label": "0 PUSH1 0x60\n2 PUSH1 0x40\n4 MSTORE\n5 PUSH1 0x04\n7 CALLDATASIZE\n8 LT\n(click to expand +)", "size": 150, "truncLabel": "0 PUSH1 0x60\n2 PUSH1 0x40\n4 MSTORE\n5 PUSH1 0x04\n7 CALLDATASIZE\n8 LT\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "13 PUSH1 0x00\n15 CALLDATALOAD\n16 PUSH29 0x01000000(...)\n46 SWAP1\n47 DIV\n48 PUSH4 0xffffffff\n53 AND\n54 DUP1\n55 PUSH4 0x2776b163\n60 EQ\n61 PUSH2 0x0088\n64 JUMPI", "id": "185", "isExpanded": false, "label": "13 PUSH1 0x00\n15 CALLDATALOAD\n16 PUSH29 0x01000000(...)\n46 SWAP1\n47 DIV\n48 PUSH4 0xffffffff\n(click to expand +)", "size": 150, "truncLabel": "13 PUSH1 0x00\n15 CALLDATALOAD\n16 PUSH29 0x01000000(...)\n46 SWAP1\n47 DIV\n48 PUSH4 0xffffffff\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "131 JUMPDEST\n132 PUSH1 0x00\n134 DUP1\n135 REVERT", "id": "186", "isExpanded": false, "label": "131 JUMPDEST\n132 PUSH1 0x00\n134 DUP1\n135 REVERT", "size": 150, "truncLabel": "131 JUMPDEST\n132 PUSH1 0x00\n134 DUP1\n135 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 DUP1\n66 PUSH4 0x379bf63c\n71 EQ\n72 PUSH2 0x00c1\n75 JUMPI", "id": "187", "isExpanded": false, "label": "65 DUP1\n66 PUSH4 0x379bf63c\n71 EQ\n72 PUSH2 0x00c1\n75 JUMPI", "size": 150, "truncLabel": "65 DUP1\n66 PUSH4 0x379bf63c\n71 EQ\n72 PUSH2 0x00c1\n75 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "136 JUMPDEST\n137 CALLVALUE\n138 ISZERO\n139 PUSH2 0x0093\n142 JUMPI", "id": "188", "isExpanded": false, "label": "136 JUMPDEST\n137 CALLVALUE\n138 ISZERO\n139 PUSH2 0x0093\n142 JUMPI", "size": 150, "truncLabel": "136 JUMPDEST\n137 CALLVALUE\n138 ISZERO\n139 PUSH2 0x0093\n142 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "143 PUSH1 0x00\n145 DUP1\n146 REVERT", "id": "189", "isExpanded": false, "label": "143 PUSH1 0x00\n145 DUP1\n146 REVERT", "size": 150, "truncLabel": "143 PUSH1 0x00\n145 DUP1\n146 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "147 JUMPDEST\n148 PUSH2 0x00bf\n151 PUSH1 0x04\n153 DUP1\n154 DUP1\n155 CALLDATALOAD\n156 PUSH20 0xffffffff(...)\n177 AND\n178 SWAP1\n179 PUSH1 0x20\n181 ADD\n182 SWAP1\n183 SWAP2\n184 SWAP1\n185 POP\n186 POP\n187 PUSH2 0x01e3\n190 JUMP", "id": "190", "isExpanded": false, "label": "147 JUMPDEST\n148 PUSH2 0x00bf\n151 PUSH1 0x04\n153 DUP1\n154 DUP1\n155 CALLDATALOAD\n(click to expand +)", "size": 150, "truncLabel": "147 JUMPDEST\n148 PUSH2 0x00bf\n151 PUSH1 0x04\n153 DUP1\n154 DUP1\n155 CALLDATALOAD\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "483 JUMPDEST\n484 DUP1\n485 PUSH1 0x01\n487 PUSH1 0x00\n489 PUSH2 0x0100\n492 EXP\n493 DUP2\n494 SLOAD\n495 DUP2\n496 PUSH20 0xffffffff(...)\n517 MUL\n518 NOT\n519 AND\n520 SWAP1\n521 DUP4\n522 PUSH20 0xffffffff(...)\n543 AND\n544 MUL\n545 OR\n546 SWAP1\n547 SSTORE\n548 POP\n549 POP\n550 JUMP", "id": "191", "isExpanded": false, "label": "483 JUMPDEST\n484 DUP1\n485 PUSH1 0x01\n487 PUSH1 0x00\n489 PUSH2 0x0100\n492 EXP\n(click to expand +)", "size": 150, "truncLabel": "483 JUMPDEST\n484 DUP1\n485 PUSH1 0x01\n487 PUSH1 0x00\n489 PUSH2 0x0100\n492 EXP\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"backg
var edges = [{"arrows": "to", "from": "184", "label": "ULE(4, 9_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "185"}, {"arrows": "to", "from": "184", "label": "Not(ULE(4, 9_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "186"}, {"arrows": "to", "from": "185", "label": "Not(And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 99, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 0xb1, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0x76, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 39))", "smooth": {"type": "cubicBezier"}, "to": "187"}, {"arrows": "to", "from": "185", "label": "And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 99, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 0xb1, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0x76, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 39)", "smooth": {"type": "cubicBezier"}, "to": "188"}, {"arrows": "to", "from": "188", "label": "If(call_value9 == 0, 1, 0) == 0", "smooth": {"type": "cubicBezier"}, "to": "189"}, {"arrows": "to", "from": "188", "label": "Not(If(call_value9 == 0, 1, 0) == 0)", "smooth": {"type": "cubicBezier"}, "to": "190"}, {"arrows": "to", "from": "190", "label": "", "smooth": {"type": "cubicBezier"}, "to": "191"}, {"arrows": "to", "from": "191", "label": "", "smooth": {"type": "cubicBezier"}, "to": "192"}, {"arrows": "to", "from": "187", "label": "Not(And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 60, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 0xf6, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0x9b, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 55))", "smooth": {"type": "cubicBezier"}, "to": "193"}, {"arrows": "to", "from": "187", "label": "And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 60, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 0xf6, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0x9b, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 55)", "smooth": {"type": "cubicBezier"}, "to": "194"}, {"arrows": "to", "from": "194", "label": "If(call_value9 == 0, 1, 0) == 0", "smooth": {"type": "cubicBezier"}, "to": "195"}, {"arrows": "to", "from": "194", "label": "Not(If(call_value9 == 0, 1, 0) == 0)", "smooth": {"type": "cubicBezier"}, "to": "196"}, {"arrows": "to", "from": "196", "label": "", "smooth": {"type": "cubicBezier"}, "to": "197"}, {"arrows": "to", "from": "197", "label": "", "smooth": {"type": "cubicBezier"}, "to": "198"}, {"arrows": "to", "from": "193", "label": "Not(And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 0xec, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 20, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0x68, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 90))", "smooth": {"type": "cubicBezier"}, "to": "199"}, {"arrows": "to", "from": "193", "label": "And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 0xec, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 20, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0x68, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 90)", "smooth": {"type": "cubicBezier"}, "to": "200"}, {"arrows": "to", "from": "200", "label": "If(call_value9 == 0, 1, 0) == 0", "smooth": {"type": "cubicBezier"}, "to": "201"}, {"arrows": "to", "from": "200", "label": "Not(If(call_value9 == 0, 1, 0) == 0)", "smooth": {"type": "cubicBezier"}, "to": "202"}, {"arrows": "to", "from": "202", "label": "", "smooth": {"type": "cubicBezier"}, "to": "203"}, {"arrows": "to", "from": "203", "label": "", "smooth": {"type": "cubicBezier"}, "to": "204"}, {"arrows": "to", "from": "199", "label": "Not(And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 0x8a, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 44, If(9_calldatasize \u003c= 1, 0, 9_calldata[1]) == 0xd0, If(9_calldatasize \u003c= 0, 0, 9_calldata[0]) == 0xb5))", "smooth": {"type": "cubicBezier"}, "to": "205"}, {"arrows": "to", "from": "199", "label": "And(If(9_calldatasize \u003c= 3, 0, 9_calldata[3]) == 0x8a, If(9_calldatasize \u003c= 2, 0, 9_calldata[2]) == 4
</script>
</head>
<body>
<p>Mythril / Ethereum LASER Symbolic VM</p>
<div id="mynetwork"></div>
<script type="text/javascript">
var container = document.getElementById('mynetwork');
var nodesSet = new vis.DataSet(nodes);
var edgesSet = new vis.DataSet(edges);
var data = {'nodes': nodesSet, 'edges': edgesSet}
var gph = new vis.Network(container, data, options);
gph.on("click", function (params) {
// parse node id
var nodeID = params['nodes']['0'];
if (nodeID) {
var clickedNode = nodesSet.get(nodeID);
if(clickedNode.isExpanded) {
clickedNode.label = clickedNode.truncLabel;
}
else {
clickedNode.label = clickedNode.fullLabel;
}
clickedNode.isExpanded = !clickedNode.isExpanded;
nodesSet.update(clickedNode);
}
});
</script>
</body>
</html>