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

63 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": "287", "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": "288", "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": "289", "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": "290", "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": "291", "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": "292", "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": "293", "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": "294", "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": "287", "label": "ULE(4, 9_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "288"}, {"arrows": "to", "from": "287", "label": "Not(ULE(4, 9_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "289"}, {"arrows": "to", "from": "288", "label": "Not(And(9_calldata[3] == 99, 9_calldata[2] == 0xb1, 9_calldata[1] == 0x76, 9_calldata[0] == 39))", "smooth": {"type": "cubicBezier"}, "to": "290"}, {"arrows": "to", "from": "288", "label": "And(9_calldata[3] == 99, 9_calldata[2] == 0xb1, 9_calldata[1] == 0x76, 9_calldata[0] == 39)", "smooth": {"type": "cubicBezier"}, "to": "291"}, {"arrows": "to", "from": "291", "label": "Not(call_value9 == 0)", "smooth": {"type": "cubicBezier"}, "to": "292"}, {"arrows": "to", "from": "291", "label": "call_value9 == 0", "smooth": {"type": "cubicBezier"}, "to": "293"}, {"arrows": "to", "from": "293", "label": "", "smooth": {"type": "cubicBezier"}, "to": "294"}, {"arrows": "to", "from": "294", "label": "", "smooth": {"type": "cubicBezier"}, "to": "295"}, {"arrows": "to", "from": "290", "label": "Not(And(9_calldata[3] == 60, 9_calldata[2] == 0xf6, 9_calldata[1] == 0x9b, 9_calldata[0] == 55))", "smooth": {"type": "cubicBezier"}, "to": "296"}, {"arrows": "to", "from": "290", "label": "And(9_calldata[3] == 60, 9_calldata[2] == 0xf6, 9_calldata[1] == 0x9b, 9_calldata[0] == 55)", "smooth": {"type": "cubicBezier"}, "to": "297"}, {"arrows": "to", "from": "297", "label": "Not(call_value9 == 0)", "smooth": {"type": "cubicBezier"}, "to": "298"}, {"arrows": "to", "from": "297", "label": "call_value9 == 0", "smooth": {"type": "cubicBezier"}, "to": "299"}, {"arrows": "to", "from": "299", "label": "", "smooth": {"type": "cubicBezier"}, "to": "300"}, {"arrows": "to", "from": "300", "label": "", "smooth": {"type": "cubicBezier"}, "to": "301"}, {"arrows": "to", "from": "296", "label": "Not(And(9_calldata[3] == 0xec, 9_calldata[2] == 20, 9_calldata[1] == 0x68, 9_calldata[0] == 90))", "smooth": {"type": "cubicBezier"}, "to": "302"}, {"arrows": "to", "from": "296", "label": "And(9_calldata[3] == 0xec, 9_calldata[2] == 20, 9_calldata[1] == 0x68, 9_calldata[0] == 90)", "smooth": {"type": "cubicBezier"}, "to": "303"}, {"arrows": "to", "from": "303", "label": "Not(call_value9 == 0)", "smooth": {"type": "cubicBezier"}, "to": "304"}, {"arrows": "to", "from": "303", "label": "call_value9 == 0", "smooth": {"type": "cubicBezier"}, "to": "305"}, {"arrows": "to", "from": "305", "label": "", "smooth": {"type": "cubicBezier"}, "to": "306"}, {"arrows": "to", "from": "306", "label": "", "smooth": {"type": "cubicBezier"}, "to": "307"}, {"arrows": "to", "from": "307", "label": "", "smooth": {"type": "cubicBezier"}, "to": "308"}, {"arrows": "to", "from": "302", "label": "Not(And(9_calldata[3] == 0x8a, 9_calldata[2] == 44, 9_calldata[1] == 0xd0, 9_calldata[0] == 0xb5))", "smooth": {"type": "cubicBezier"}, "to": "309"}, {"arrows": "to", "from": "302", "label": "And(9_calldata[3] == 0x8a, 9_calldata[2] == 44, 9_calldata[1] == 0xd0, 9_calldata[0] == 0xb5)", "smooth": {"type": "cubicBezier"}, "to": "310"}, {"arrows": "to", "from": "310", "label": "Not(call_value9 == 0)", "smooth": {"type": "cubicBezier"}, "to": "311"}, {"arrows": "to", "from": "310", "label": "call_value9 == 0", "smooth": {"type": "cubicBezier"}, "to": "312"}, {"arrows": "to", "from": "312", "label": "", "smooth": {"type": "cubicBezier"}, "to": "313"}, {"arrows": "to", "from": "313", "label": "", "smooth": {"type": "cubicBezier"}, "to": "314"}, {"arrows": "to", "from": "309", "label": "Not(And(9_calldata[3] == 0xcc, 9_calldata[2] == 8, 9_calldata[1] == 75, 9_calldata[0] == 0xd2))", "smooth": {"type": "cubicBezier"}, "to": "315"}, {"arrows": "to", "from": "309", "label": "And(9_calldata[3] == 0xcc, 9_calldata[2] == 8, 9_calldata[1] == 75, 9_calldata[0] == 0xd2)", "smooth": {"type": "cubicBezier"}, "to": "316"}, {"arrows": "to", "from": "316", "label": "Not(call_value9 == 0)"
</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>