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

56 lines
30 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": "131 JUMPDEST fallback\n132 PUSH1 0x00\n134 DUP1\n135 REVERT", "id": "1153", "isExpanded": false, "label": "131 JUMPDEST fallback\n132 PUSH1 0x00\n134 DUP1\n135 REVERT", "size": 150, "truncLabel": "131 JUMPDEST fallback\n132 PUSH1 0x00\n134 DUP1\n135 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "191 JUMPDEST _function_0x2776b163\n192 STOP", "id": "1158", "isExpanded": false, "label": "191 JUMPDEST _function_0x2776b163\n192 STOP", "size": 150, "truncLabel": "191 JUMPDEST _function_0x2776b163\n192 STOP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "483 JUMPDEST _function_0x2776b163\n484 DUP1\n485 PUSH1 0x01\n487 PUSH1 0x00\n489 PUSH2 0x0100\n492 EXP\n493 DUP2\n494 SLOAD\n495 DUP2\n496 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n517 MUL\n518 NOT\n519 AND\n520 SWAP1\n521 DUP4\n522 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n543 AND\n544 MUL\n545 OR\n546 SWAP1\n547 SSTORE\n548 POP\n549 POP\n550 JUMP", "id": "1157", "isExpanded": false, "label": "483 JUMPDEST _function_0x2776b163\n484 DUP1\n485 PUSH1 0x01\n487 PUSH1 0x00\n489 PUSH2 0x0100\n492 EXP\n(click to expand +)", "size": 150, "truncLabel": "483 JUMPDEST _function_0x2776b163\n484 DUP1\n485 PUSH1 0x01\n487 PUSH1 0x00\n489 PUSH2 0x0100\n492 EXP\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "147 JUMPDEST _function_0x2776b163\n148 PUSH2 0x00bf\n151 PUSH1 0x04\n153 DUP1\n154 DUP1\n155 CALLDATALOAD\n156 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\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": "1156", "isExpanded": false, "label": "147 JUMPDEST _function_0x2776b163\n148 PUSH2 0x00bf\n151 PUSH1 0x04\n153 DUP1\n154 DUP1\n155 CALLDATALOAD\n(click to expand +)", "size": 150, "truncLabel": "147 JUMPDEST _function_0x2776b163\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": "143 PUSH1 0x00\n145 DUP1\n146 REVERT", "id": "1159", "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": "136 JUMPDEST _function_0x2776b163\n137 CALLVALUE\n138 ISZERO\n139 PUSH2 0x0093\n142 JUMPI", "id": "1155", "isExpanded": false, "label": "136 JUMPDEST _function_0x2776b163\n137 CALLVALUE\n138 ISZERO\n139 PUSH2 0x0093\n142 JUMPI", "size": 150, "truncLabel": "136 JUMPDEST _function_0x2776b163\n137 CALLVALUE\n138 ISZERO\n139 PUSH2 0x0093\n142 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "212 JUMPDEST _function_0x379bf63c\n213 PUSH1 0x40\n215 MLOAD\n216 DUP1\n217 DUP3\n218 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n239 AND\n240 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n261 AND\n262 DUP2\n263 MSTORE\n264 PUSH1 0x20\n266 ADD\n267 SWAP2\n268 POP\n269 POP\n270 PUSH1 0x40\n272 MLOAD\n273 DUP1\n274 SWAP2\n275 SUB\n276 SWAP1\n277 RETURN", "id": "1164", "isExpanded": false, "label": "212 JUMPDEST _function_0x379bf63c\n213 PUSH1 0x40\n215 MLOAD\n216 DUP1\n217 DUP3\n218 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n(click to expand +)", "size": 150, "truncLabel": "212 JUMPDEST _function_0x379bf63c\n213 PUSH1 0x40\n215 MLOAD\n216 DUP1\n217 DUP3\n218 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f"
var edges = [{"arrows": "to", "from": "1152", "label": "Not(ULE(4, calldatasize_Unknown))", "smooth": {"type": "cubicBezier"}, "to": "1153"}, {"arrows": "to", "from": "1157", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1158"}, {"arrows": "to", "from": "1156", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1157"}, {"arrows": "to", "from": "1155", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1156"}, {"arrows": "to", "from": "1155", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1159"}, {"arrows": "to", "from": "1154", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x2776b163", "smooth": {"type": "cubicBezier"}, "to": "1155"}, {"arrows": "to", "from": "1163", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1164"}, {"arrows": "to", "from": "1162", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1163"}, {"arrows": "to", "from": "1161", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1162"}, {"arrows": "to", "from": "1161", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1165"}, {"arrows": "to", "from": "1160", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x379bf63c", "smooth": {"type": "cubicBezier"}, "to": "1161"}, {"arrows": "to", "from": "1169", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1170"}, {"arrows": "to", "from": "1168", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1169"}, {"arrows": "to", "from": "1167", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1168"}, {"arrows": "to", "from": "1167", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1171"}, {"arrows": "to", "from": "1166", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x5a6814ec", "smooth": {"type": "cubicBezier"}, "to": "1167"}, {"arrows": "to", "from": "1175", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1176"}, {"arrows": "to", "from": "1174", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1175"}, {"arrows": "to", "from": "1173", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1174"}, {"arrows": "to", "from": "1173", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1177"}, {"arrows": "to", "from": "1172", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xb5d02c8a", "smooth": {"type": "cubicBezier"}, "to": "1173"}, {"arrows": "to", "from": "1181", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1182"}, {"arrows": "to", "from": "1180", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1181"}, {"arrows": "to", "from": "1179", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1180"}, {"arrows": "to", "from": "1179", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1183"}, {"arrows": "to", "from": "1178", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xd24b08cc", "smooth": {"type": "cubicBezier"}, "to": "1179"}, {"arrows": "to", "from": "1187", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1188"}, {"arrows": "to", "from": "1186", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1187"}, {"arrows": "to", "from": "1185", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1186"}, {"arrows": "to", "from": "1185", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1189"}, {"arrows": "to", "from": "1184", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xe11f493e", "smooth": {"type": "cubicBezier"}, "to": "1185"}, {"arrows": "to", "from": "1193", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1194"}, {"arrows": "to", "from": "1192", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1193"}, {"arrows": "to", "from": "1191", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1192"}, {"arrows": "to", "from": "1191", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1195"}, {"arrows": "to", "from": "1190", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xe1d10f79", "smooth": {"type": "cubicBezier"}
</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>