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/metacoin.sol.o.graph.html

62 lines
21 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 0x004c\n12 JUMPI", "id": "17", "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 0x27e235e3\n60 EQ\n61 PUSH2 0x0051\n64 JUMPI", "id": "18", "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": "76 JUMPDEST\n77 PUSH1 0x00\n79 DUP1\n80 REVERT", "id": "19", "isExpanded": false, "label": "76 JUMPDEST\n77 PUSH1 0x00\n79 DUP1\n80 REVERT", "size": 150, "truncLabel": "76 JUMPDEST\n77 PUSH1 0x00\n79 DUP1\n80 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 DUP1\n66 PUSH4 0x412664ae\n71 EQ\n72 PUSH2 0x009e\n75 JUMPI", "id": "20", "isExpanded": false, "label": "65 DUP1\n66 PUSH4 0x412664ae\n71 EQ\n72 PUSH2 0x009e\n75 JUMPI", "size": 150, "truncLabel": "65 DUP1\n66 PUSH4 0x412664ae\n71 EQ\n72 PUSH2 0x009e\n75 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "81 JUMPDEST\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "id": "21", "isExpanded": false, "label": "81 JUMPDEST\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "size": 150, "truncLabel": "81 JUMPDEST\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "88 PUSH1 0x00\n90 DUP1\n91 REVERT", "id": "22", "isExpanded": false, "label": "88 PUSH1 0x00\n90 DUP1\n91 REVERT", "size": 150, "truncLabel": "88 PUSH1 0x00\n90 DUP1\n91 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "92 JUMPDEST\n93 PUSH2 0x0088\n96 PUSH1 0x04\n98 DUP1\n99 DUP1\n100 CALLDATALOAD\n101 PUSH20 0xffffffff(...)\n122 AND\n123 SWAP1\n124 PUSH1 0x20\n126 ADD\n127 SWAP1\n128 SWAP2\n129 SWAP1\n130 POP\n131 POP\n132 PUSH2 0x00f8\n135 JUMP", "id": "23", "isExpanded": false, "label": "92 JUMPDEST\n93 PUSH2 0x0088\n96 PUSH1 0x04\n98 DUP1\n99 DUP1\n100 CALLDATALOAD\n(click to expand +)", "size": 150, "truncLabel": "92 JUMPDEST\n93 PUSH2 0x0088\n96 PUSH1 0x04\n98 DUP1\n99 DUP1\n100 CALLDATALOAD\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "248 JUMPDEST\n249 PUSH1 0x00\n251 PUSH1 0x20\n253 MSTORE\n254 DUP1\n255 PUSH1 0x00\n257 MSTORE\n258 PUSH1 0x40\n260 PUSH1 0x00\n262 SHA3\n263 PUSH1 0x00\n265 SWAP2\n266 POP\n267 SWAP1\n268 POP\n269 SLOAD\n270 DUP2\n271 JUMP", "id": "24", "isExpanded": false, "label": "248 JUMPDEST\n249 PUSH1 0x00\n251 PUSH1 0x20\n253 MSTORE\n254 DUP1\n255 PUSH1 0x00\n(click to expand +)", "size": 150, "truncLabel": "248 JUMPDEST\n249 PUSH1 0x00\n251 PUSH1 0x20\n253 MSTORE\n254 DUP1\n255 PUSH1 0x00\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "136 JUMPDEST\n137 PUSH1 0x40\n139 MLOAD\n140 DUP1\n141 DUP3\n142 DUP2\n
var edges = [{"arrows": "to", "from": "17", "label": "ULE(4, 2_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "18"}, {"arrows": "to", "from": "17", "label": "Not(ULE(4, 2_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "19"}, {"arrows": "to", "from": "18", "label": "Not(And(If(2_calldatasize \u003c= 3, 0, 2_calldata[3]) == 0xe3, If(2_calldatasize \u003c= 2, 0, 2_calldata[2]) == 53, If(2_calldatasize \u003c= 1, 0, 2_calldata[1]) == 0xe2, If(2_calldatasize \u003c= 0, 0, 2_calldata[0]) == 39))", "smooth": {"type": "cubicBezier"}, "to": "20"}, {"arrows": "to", "from": "18", "label": "And(If(2_calldatasize \u003c= 3, 0, 2_calldata[3]) == 0xe3, If(2_calldatasize \u003c= 2, 0, 2_calldata[2]) == 53, If(2_calldatasize \u003c= 1, 0, 2_calldata[1]) == 0xe2, If(2_calldatasize \u003c= 0, 0, 2_calldata[0]) == 39)", "smooth": {"type": "cubicBezier"}, "to": "21"}, {"arrows": "to", "from": "21", "label": "If(call_value2 == 0, 1, 0) == 0", "smooth": {"type": "cubicBezier"}, "to": "22"}, {"arrows": "to", "from": "21", "label": "Not(If(call_value2 == 0, 1, 0) == 0)", "smooth": {"type": "cubicBezier"}, "to": "23"}, {"arrows": "to", "from": "23", "label": "", "smooth": {"type": "cubicBezier"}, "to": "24"}, {"arrows": "to", "from": "24", "label": "", "smooth": {"type": "cubicBezier"}, "to": "25"}, {"arrows": "to", "from": "20", "label": "Not(And(If(2_calldatasize \u003c= 3, 0, 2_calldata[3]) == 0xae, If(2_calldatasize \u003c= 2, 0, 2_calldata[2]) == 0x64, If(2_calldatasize \u003c= 1, 0, 2_calldata[1]) == 38, If(2_calldatasize \u003c= 0, 0, 2_calldata[0]) == 65))", "smooth": {"type": "cubicBezier"}, "to": "26"}, {"arrows": "to", "from": "20", "label": "And(If(2_calldatasize \u003c= 3, 0, 2_calldata[3]) == 0xae, If(2_calldatasize \u003c= 2, 0, 2_calldata[2]) == 0x64, If(2_calldatasize \u003c= 1, 0, 2_calldata[1]) == 38, If(2_calldatasize \u003c= 0, 0, 2_calldata[0]) == 65)", "smooth": {"type": "cubicBezier"}, "to": "27"}, {"arrows": "to", "from": "27", "label": "If(call_value2 == 0, 1, 0) == 0", "smooth": {"type": "cubicBezier"}, "to": "28"}, {"arrows": "to", "from": "27", "label": "Not(If(call_value2 == 0, 1, 0) == 0)", "smooth": {"type": "cubicBezier"}, "to": "29"}, {"arrows": "to", "from": "29", "label": "", "smooth": {"type": "cubicBezier"}, "to": "30"}, {"arrows": "to", "from": "30", "label": "If(ULE(Concat(If(2_calldatasize \u003c= 36, 0, 2_calldata[36]), If(2_calldatasize \u003c= 37, 0, 2_calldata[37]), If(2_calldatasize \u003c= 38, 0, 2_calldata[38]), If(2_calldatasize \u003c= 39, 0, 2_calldata[39]), If(2_calldatasize \u003c= 40, 0, 2_calldata[40]), If(2_calldatasize \u003c= 41, 0, 2_calldata[41]), If(2_calldatasize \u003c= 42, 0, 2_calldata[42]), If(2_calldatasize \u003c= 43, 0, 2_calldata[43]), If(2_calldatasize \u003c= 44, 0, 2_calldata[44]), If(2_calldatasize \u003c= 45, 0, 2_calldata[45]), If(2_calldatasize \u003c= 46, 0, 2_calldata[46]), If(2_calldatasize \u003c= 47, 0, 2_calldata[47]), If(2_calldatasize \u003c= 48, 0, 2_calldata[48]), If(2_calldatasize \u003c= 49, 0, 2_calldata[49]), If(2_calldatasize \u003c= 50, 0, 2_calldata[50]), If(2_calldatasize \u003c= 51, 0, 2_calldata[51]), If(2_calldatasize \u003c= 52, 0, 2_calldata[52]), If(2_calldatasize \u003c= 53, 0, 2_calldata[53]), If(2_calldatasize \u003c= 54, 0, 2_calldata[54]), If(2_calldatasize \u003c= 55, 0, 2_calldata[55]), If(2_calldatasize \u003c= 56, 0, 2_calldata[56]), If(2_calldatasize \u003c= 57, 0, 2_calldata[57]), If(2_calldatasize \u003c= 58, 0, 2_calldata[58]), If(2_calldatasize \u003c= 59, 0, 2_calldata[59]), If(2_calldatasize \u003c= 60, 0, 2_calldata[60]), If(2_calldatasize \u003c= 61, 0, 2_calldata[61]), If(2_calldatasize \u003c= 62, 0, 2_calld
</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>