mirror of https://github.com/ConsenSys/mythril
blockchainethereumsmart-contractssoliditysecurityprogram-analysissecurity-analysissymbolic-execution
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.
63 lines
37 KiB
63 lines
37 KiB
6 years ago
|
<!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": "19", "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": "20", "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": "21", "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": "22", "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": "23", "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": "24", "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": "25", "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": "26", "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": "19", "label": "ULE(4, 2_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "20"}, {"arrows": "to", "from": "19", "label": "Not(ULE(4, 2_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "21"}, {"arrows": "to", "from": "20", "label": "Not(And(2_calldata[3] == 0xe3, 2_calldata[2] == 53, 2_calldata[1] == 0xe2, 2_calldata[0] == 39))", "smooth": {"type": "cubicBezier"}, "to": "22"}, {"arrows": "to", "from": "20", "label": "And(2_calldata[3] == 0xe3, 2_calldata[2] == 53, 2_calldata[1] == 0xe2, 2_calldata[0] == 39)", "smooth": {"type": "cubicBezier"}, "to": "23"}, {"arrows": "to", "from": "23", "label": "Not(call_value2 == 0)", "smooth": {"type": "cubicBezier"}, "to": "24"}, {"arrows": "to", "from": "23", "label": "call_value2 == 0", "smooth": {"type": "cubicBezier"}, "to": "25"}, {"arrows": "to", "from": "25", "label": "", "smooth": {"type": "cubicBezier"}, "to": "26"}, {"arrows": "to", "from": "26", "label": "", "smooth": {"type": "cubicBezier"}, "to": "27"}, {"arrows": "to", "from": "22", "label": "Not(And(2_calldata[3] == 0xae, 2_calldata[2] == 0x64, 2_calldata[1] == 38, 2_calldata[0] == 65))", "smooth": {"type": "cubicBezier"}, "to": "28"}, {"arrows": "to", "from": "22", "label": "And(2_calldata[3] == 0xae, 2_calldata[2] == 0x64, 2_calldata[1] == 38, 2_calldata[0] == 65)", "smooth": {"type": "cubicBezier"}, "to": "29"}, {"arrows": "to", "from": "29", "label": "Not(call_value2 == 0)", "smooth": {"type": "cubicBezier"}, "to": "30"}, {"arrows": "to", "from": "29", "label": "call_value2 == 0", "smooth": {"type": "cubicBezier"}, "to": "31"}, {"arrows": "to", "from": "31", "label": "", "smooth": {"type": "cubicBezier"}, "to": "32"}, {"arrows": "to", "from": "32", "label": "Not(ULE(Concat(2_calldata[36], 2_calldata[37], 2_calldata[38], 2_calldata[39], 2_calldata[40], 2_calldata[41], 2_calldata[42], 2_calldata[43], 2_calldata[44], 2_calldata[45], 2_calldata[46], 2_calldata[47], 2_calldata[48], 2_calldata[49], 2_calldata[50], 2_calldata[51], 2_calldata[52], 2_calldata[53], 2_calldata[54], 2_calldata[55], 2_calldata[56], 2_calldata[57], 2_calldata[58], 2_calldata[59], 2_calldata[60], 2_calldata[61], 2_calldata[62], 2_calldata[63], 2_calldata[64], 2_calldata[65], 2_calldata[66], 2_calldata[67]), storage_KECCAC[0xffffffffffffffffffffffffffffffffffffffff_\u0026Concat(2_calldata[4],_______2_calldata[5],_______2_calldata[6],_______2_calldata[7],_______2_calldata[8],_______2_calldata[9],_______2_calldata[10],_______2_calldata[11],_______2_calldata[12],_______2_calldata[13],_______2_calldata[14],_______2_calldata[15],_______2_calldata[16],_______2_calldata[17],_______2_calldata[18],_______2_calldata[19],_______2_calldata[20],_______2_calldata[21],_______2_calldata[22],_______2_calldata[23],_______2_calldata[24],_______2_calldata[25],_______2_calldata[26],_______2_calldata[27],_______2_calldata[28],_______2_calldata[29],_______2_calldata[30],_______2_calldata[31],_______2_calldata[32],_______2_calldata[33],_______2_calldata[34],_______2_calldata[35])]))", "smooth": {"type": "cubicBezier"}, "to": "33"}, {"arrows": "to", "from": "32", "label": "ULE(Concat(2_calldata[36], 2_calldata[37], 2_calldata[38], 2_calldata[39], 2_calldata[40], 2_calldata[41], 2_calldata[42], 2_calldata[43], 2_calldata[44], 2_calldata[45], 2_calldata[46], 2_calldata[47], 2_calldata[48], 2_calldata[49], 2_calldata[50], 2_calldata[51], 2_calldata[52], 2
|
||
|
</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>
|