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

56 lines
16 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": "76 JUMPDEST fallback\n77 PUSH1 0x00\n79 DUP1\n80 REVERT", "id": "942", "isExpanded": false, "label": "76 JUMPDEST fallback\n77 PUSH1 0x00\n79 DUP1\n80 REVERT", "size": 150, "truncLabel": "76 JUMPDEST fallback\n77 PUSH1 0x00\n79 DUP1\n80 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "136 JUMPDEST _function_0x27e235e3\n137 PUSH1 0x40\n139 MLOAD\n140 DUP1\n141 DUP3\n142 DUP2\n143 MSTORE\n144 PUSH1 0x20\n146 ADD\n147 SWAP2\n148 POP\n149 POP\n150 PUSH1 0x40\n152 MLOAD\n153 DUP1\n154 SWAP2\n155 SUB\n156 SWAP1\n157 RETURN", "id": "947", "isExpanded": false, "label": "136 JUMPDEST _function_0x27e235e3\n137 PUSH1 0x40\n139 MLOAD\n140 DUP1\n141 DUP3\n142 DUP2\n(click to expand +)", "size": 150, "truncLabel": "136 JUMPDEST _function_0x27e235e3\n137 PUSH1 0x40\n139 MLOAD\n140 DUP1\n141 DUP3\n142 DUP2\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "248 JUMPDEST _function_0x27e235e3\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": "946", "isExpanded": false, "label": "248 JUMPDEST _function_0x27e235e3\n249 PUSH1 0x00\n251 PUSH1 0x20\n253 MSTORE\n254 DUP1\n255 PUSH1 0x00\n(click to expand +)", "size": 150, "truncLabel": "248 JUMPDEST _function_0x27e235e3\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": "92 JUMPDEST _function_0x27e235e3\n93 PUSH2 0x0088\n96 PUSH1 0x04\n98 DUP1\n99 DUP1\n100 CALLDATALOAD\n101 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\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": "945", "isExpanded": false, "label": "92 JUMPDEST _function_0x27e235e3\n93 PUSH2 0x0088\n96 PUSH1 0x04\n98 DUP1\n99 DUP1\n100 CALLDATALOAD\n(click to expand +)", "size": 150, "truncLabel": "92 JUMPDEST _function_0x27e235e3\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": "88 PUSH1 0x00\n90 DUP1\n91 REVERT", "id": "948", "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": "81 JUMPDEST _function_0x27e235e3\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "id": "944", "isExpanded": false, "label": "81 JUMPDEST _function_0x27e235e3\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "size": 150, "truncLabel": "81 JUMPDEST _function_0x27e235e3\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "222 JUMPDEST sendToken(address,uint256)\n223 PUSH1 0x40\n225 MLOAD\n226 DUP1\n227 DUP3\n228 ISZERO\n229 ISZERO\n230 ISZERO\n231 ISZERO\n232 DUP2\n233 MSTORE\n234 PUSH1 0x20\n236 ADD\n237 SWAP2\n238 POP\n239 POP\n240 PUSH1 0x40\n242 MLOAD\n243 DUP1\n244 SWAP2\n245 SUB\n246 SWAP1\n247 RETURN", "id": "954", "isExpanded": false, "label": "222 JUMPDEST sendToken(address,uint256)\n223 PUSH1 0x40\n225 MLOAD\n226 DUP1\n227 DUP3\n228 ISZERO\n(click to expand +)", "size": 150, "truncLabel": "222 JUMPDEST sendToken(address,uint256)\n223 PUSH1 0x40\n225 MLOAD\n226 DUP1\n227 DUP3\n228 ISZERO\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f
var edges = [{"arrows": "to", "from": "941", "label": "Not(ULE(4, calldatasize_Unknown))", "smooth": {"type": "cubicBezier"}, "to": "942"}, {"arrows": "to", "from": "946", "label": "", "smooth": {"type": "cubicBezier"}, "to": "947"}, {"arrows": "to", "from": "945", "label": "", "smooth": {"type": "cubicBezier"}, "to": "946"}, {"arrows": "to", "from": "944", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "945"}, {"arrows": "to", "from": "944", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "948"}, {"arrows": "to", "from": "943", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x27e235e3", "smooth": {"type": "cubicBezier"}, "to": "944"}, {"arrows": "to", "from": "953", "label": "", "smooth": {"type": "cubicBezier"}, "to": "954"}, {"arrows": "to", "from": "952", "label": "ULE(calldata_Unknown_32 + 4, storage_keccac_10x50d672faf1bc6a29698f4ed480beffffffffffff_\u00260xffffffffffffffffffffffffffffffffffffffff_\u0026caller)", "smooth": {"type": "cubicBezier"}, "to": "953"}, {"arrows": "to", "from": "956", "label": "", "smooth": {"type": "cubicBezier"}, "to": "957"}, {"arrows": "to", "from": "955", "label": "", "smooth": {"type": "cubicBezier"}, "to": "956"}, {"arrows": "to", "from": "952", "label": "Not(ULE(calldata_Unknown_32 + 4, storage_keccac_10x50d672faf1bc6a29698f4ed480beffffffffffff_\u00260xffffffffffffffffffffffffffffffffffffffff_\u0026caller))", "smooth": {"type": "cubicBezier"}, "to": "955"}, {"arrows": "to", "from": "951", "label": "", "smooth": {"type": "cubicBezier"}, "to": "952"}, {"arrows": "to", "from": "950", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "951"}, {"arrows": "to", "from": "950", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "958"}, {"arrows": "to", "from": "949", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x412664ae", "smooth": {"type": "cubicBezier"}, "to": "950"}, {"arrows": "to", "from": "949", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x412664ae)", "smooth": {"type": "cubicBezier"}, "to": "959"}, {"arrows": "to", "from": "943", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x27e235e3)", "smooth": {"type": "cubicBezier"}, "to": "949"}, {"arrows": "to", "from": "941", "label": "ULE(4, calldatasize_Unknown)", "smooth": {"type": "cubicBezier"}, "to": "943"}];
</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>