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.
56 lines
13 KiB
56 lines
13 KiB
<html>
|
|
<head>
|
|
<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 {
|
|
background-color: #232625;
|
|
}
|
|
body {
|
|
background-color: #232625;
|
|
color: #ffffff;
|
|
font-size: 10px;
|
|
}
|
|
</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": "106", "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": "77 PUSH1 0x00\n79 DUP1\n80 REVERT", "id": "107", "isExpanded": false, "label": "77 PUSH1 0x00\n79 DUP1\n80 REVERT", "size": 150, "truncLabel": "77 PUSH1 0x00\n79 DUP1\n80 REVERT"}, {"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 0x8da5cb5b\n60 EQ\n61 PUSH2 0x0051\n64 JUMPI", "id": "108", "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": "82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "id": "109", "isExpanded": false, "label": "82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "size": 150, "truncLabel": "82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 DUP1\n66 PUSH4 0xf2fde38b\n71 EQ\n72 PUSH2 0x00a6\n75 JUMPI", "id": "110", "isExpanded": false, "label": "65 DUP1\n66 PUSH4 0xf2fde38b\n71 EQ\n72 PUSH2 0x00a6\n75 JUMPI", "size": 150, "truncLabel": "65 DUP1\n66 PUSH4 0xf2fde38b\n71 EQ\n72 PUSH2 0x00a6\n75 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "93 PUSH2 0x0064\n96 PUSH2 0x00df\n99 JUMP", "id": "111", "isExpanded": false, "label": "93 PUSH2 0x0064\n96 PUSH2 0x00df\n99 JUMP", "size": 150, "truncLabel": "93 PUSH2 0x0064\n96 PUSH2 0x00df\n99 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "88 PUSH1 0x00\n90 DUP1\n91 REVERT", "id": "112", "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": "167 CALLVALUE\n168 ISZERO\n169 PUSH2 0x00b1\n172 JUMPI", "id": "113", "isExpanded": false, "label": "167 CALLVALUE\n168 ISZERO\n169 PUSH2 0x00b1\n172 JUMPI", "size": 150, "truncLabel": "167 CALLVALUE\n168 ISZERO\n169 PUSH2 0x00b1\n172 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "76 JUMPDEST\n77 PUSH1 0x00\n79 DUP1\n80 REVERT", "id": "114", "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": "224 PUSH1 0x00\n226 DUP1\n227 SWAP1\n228 SLOAD\n229 SWAP1\n230 PUSH2 0x0100\n233 EXP\n234 SWAP1\n235 DIV\n236 PUSH20 0xffffffff(...)\n257 AND\n258 DUP2\n259 JUMP", "id": "115", "isExpanded": false, "label": "224 PUSH1 0x00\n226 DUP1\n227 SWAP1\n228 SLOAD\n229 SWAP1\n230 PUSH2 0x0100\n(click to expand +)", "size": 150, "truncLabel": "224 PUSH1 0x00\n226 DUP1\n227 SWAP1\n228 SLOAD\n229 SWAP1\n230 PUSH2 0x0100\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "178 PUSH2 0x00dd\n181 PUSH1 0x04\n183 DUP1\n184 DUP1\n185 CALLDATALOAD\n186 PUSH20 0xffffffff(...)\n207 AND\n208 SWAP1\n209 PUSH1 0x20\n211 ADD\n212 SWAP1\n213 SWAP2\n214 SWAP1\n215 POP\n216 POP\n217 PUSH2 0x0104\n220 JUMP", "id": "116", "isExpanded": false, "label": "178 PUSH2 0x00dd\n181 PUSH1 0x04\n183 DUP1\n184 DUP1\n185 CALLDATALOAD\n186 PUSH20 0xffffffff(...)\n(click to expand +)", "size": 150, "truncLabel": "178 PUSH2 0x00dd\n181 PUSH1 0x04\n183 DUP1\n184 DUP1\n185 CALLDATALOAD\n186 PUSH20 0xffffffff(...)\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "173 PUSH1 0x00\n175 DUP1\n176 REVERT", "id": "117", "isExpanded": false, "label": "173 PUSH1 0x00\n175 DUP1\n176 REVERT", "size": 150, "truncLabel": "173 PUSH1 0x00\n175 DUP1\n176 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "101 PUSH1 0x40\n103 MLOAD\n104 DUP1\n105 DUP3\n106 PUSH20 0xffffffff(...)\n127 AND\n128 PUSH20 0xffffffff(...)\n149 AND\n150 DUP2\n151 MSTORE\n152 PUSH1 0x20\n154 ADD\n155 SWAP2\n156 POP\n157 POP\n158 PUSH1 0x40\n160 MLOAD\n161 DUP1\n162 SWAP2\n163 SUB\n164 SWAP1\n165 RETURN", "id": "118", "isExpanded": false, "label": "101 PUSH1 0x40\n103 MLOAD\n104 DUP1\n105 DUP3\n106 PUSH20 0xffffffff(...)\n127 AND\n(click to expand +)", "size": 150, "truncLabel": "101 PUSH1 0x40\n103 MLOAD\n104 DUP1\n105 DUP3\n106 PUSH20 0xffffffff(...)\n127 AND\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "261 PUSH1 0x00\n263 DUP1\n264 SWAP1\n265 SLOAD\n266 SWAP1\n267 PUSH2 0x0100\n270 EXP\n271 SWAP1\n272 DIV\n273 PUSH20 0xffffffff(...)\n294 AND\n295 PUSH20 0xffffffff(...)\n316 AND\n317 ORIGIN\n318 PUSH20 0xffffffff(...)\n339 AND\n340 EQ\n341 ISZERO\n342 ISZERO\n343 PUSH2 0x015f\n346 JUMPI", "id": "119", "isExpanded": false, "label": "261 PUSH1 0x00\n263 DUP1\n264 SWAP1\n265 SLOAD\n266 SWAP1\n267 PUSH2 0x0100\n(click to expand +)", "size": 150, "truncLabel": "261 PUSH1 0x00\n263 DUP1\n264 SWAP1\n265 SLOAD\n266 SWAP1\n267 PUSH2 0x0100\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "352 PUSH1 0x00\n354 PUSH20 0xffffffff(...)\n375 AND\n376 DUP2\n377 PUSH20 0xffffffff(...)\n398 AND\n399 EQ\n400 ISZERO\n401 ISZERO\n402 PUSH2 0x01d6\n405 JUMPI", "id": "120", "isExpanded": false, "label": "352 PUSH1 0x00\n354 PUSH20 0xffffffff(...)\n375 AND\n376 DUP2\n377 PUSH20 0xffffffff(...)\n398 AND\n(click to expand +)", "size": 150, "truncLabel": "352 PUSH1 0x00\n354 PUSH20 0xffffffff(...)\n375 AND\n376 DUP2\n377 PUSH20 0xffffffff(...)\n398 AND\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "347 PUSH1 0x00\n349 DUP1\n350 REVERT", "id": "121", "isExpanded": false, "label": "347 PUSH1 0x00\n349 DUP1\n350 REVERT", "size": 150, "truncLabel": "347 PUSH1 0x00\n349 DUP1\n350 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "471 POP\n472 JUMP", "id": "122", "isExpanded": false, "label": "471 POP\n472 JUMP", "size": 150, "truncLabel": "471 POP\n472 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "406 DUP1\n407 PUSH1 0x00\n409 DUP1\n410 PUSH2 0x0100\n413 EXP\n414 DUP2\n415 SLOAD\n416 DUP2\n417 PUSH20 0xffffffff(...)\n438 MUL\n439 NOT\n440 AND\n441 SWAP1\n442 DUP4\n443 PUSH20 0xffffffff(...)\n464 AND\n465 MUL\n466 OR\n467 SWAP1\n468 SSTORE\n469 POP\n470 JUMPDEST\n471 POP\n472 JUMP", "id": "123", "isExpanded": false, "label": "406 DUP1\n407 PUSH1 0x00\n409 DUP1\n410 PUSH2 0x0100\n413 EXP\n414 DUP2\n(click to expand +)", "size": 150, "truncLabel": "406 DUP1\n407 PUSH1 0x00\n409 DUP1\n410 PUSH2 0x0100\n413 EXP\n414 DUP2\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "222 STOP", "id": "124", "isExpanded": false, "label": "222 STOP", "size": 150, "truncLabel": "222 STOP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "222 STOP", "id": "125", "isExpanded": false, "label": "222 STOP", "size": 150, "truncLabel": "222 STOP"}];
|
|
var edges = [{"arrows": "to", "from": "106", "label": "Not(ULE(4, calldatasize_Unknown))", "smooth": {"type": "cubicBezier"}, "to": "107"}, {"arrows": "to", "from": "106", "label": "ULE(4, calldatasize_Unknown)", "smooth": {"type": "cubicBezier"}, "to": "108"}, {"arrows": "to", "from": "108", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x8da5cb5b", "smooth": {"type": "cubicBezier"}, "to": "109"}, {"arrows": "to", "from": "108", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x8da5cb5b)", "smooth": {"type": "cubicBezier"}, "to": "110"}, {"arrows": "to", "from": "109", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "111"}, {"arrows": "to", "from": "109", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "112"}, {"arrows": "to", "from": "110", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xf2fde38b", "smooth": {"type": "cubicBezier"}, "to": "113"}, {"arrows": "to", "from": "110", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0xf2fde38b)", "smooth": {"type": "cubicBezier"}, "to": "114"}, {"arrows": "to", "from": "111", "label": "", "smooth": {"type": "cubicBezier"}, "to": "115"}, {"arrows": "to", "from": "113", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "116"}, {"arrows": "to", "from": "113", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "117"}, {"arrows": "to", "from": "115", "label": "", "smooth": {"type": "cubicBezier"}, "to": "118"}, {"arrows": "to", "from": "116", "label": "", "smooth": {"type": "cubicBezier"}, "to": "119"}, {"arrows": "to", "from": "119", "label": "Extract(0x9f, 0, origin) == Extract(0xa7, 8, storage_0)", "smooth": {"type": "cubicBezier"}, "to": "120"}, {"arrows": "to", "from": "119", "label": "Not(Extract(0x9f, 0, origin) == Extract(0xa7, 8, storage_0))", "smooth": {"type": "cubicBezier"}, "to": "121"}, {"arrows": "to", "from": "120", "label": "Extract(0x9f, 0, calldata_Unknown_4) == 0", "smooth": {"type": "cubicBezier"}, "to": "122"}, {"arrows": "to", "from": "120", "label": "Not(Extract(0x9f, 0, calldata_Unknown_4) == 0)", "smooth": {"type": "cubicBezier"}, "to": "123"}, {"arrows": "to", "from": "122", "label": "", "smooth": {"type": "cubicBezier"}, "to": "124"}, {"arrows": "to", "from": "123", "label": "", "smooth": {"type": "cubicBezier"}, "to": "125"}];
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<p>Mythril / Ethereum LASER Symbolic VM</p>
|
|
<p><div id="mynetwork"></div><br/></p>
|
|
<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> |