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

63 lines
15 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": "93", "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 0x8da5cb5b\n60 EQ\n61 PUSH2 0x0051\n64 JUMPI", "id": "94", "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": "95", "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 0xf2fde38b\n71 EQ\n72 PUSH2 0x00a6\n75 JUMPI", "id": "96", "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": "81 JUMPDEST\n82 CALLVALUE\n83 ISZERO\n84 PUSH2 0x005c\n87 JUMPI", "id": "97", "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": "98", "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 0x0064\n96 PUSH2 0x00df\n99 JUMP", "id": "99", "isExpanded": false, "label": "92 JUMPDEST\n93 PUSH2 0x0064\n96 PUSH2 0x00df\n99 JUMP", "size": 150, "truncLabel": "92 JUMPDEST\n93 PUSH2 0x0064\n96 PUSH2 0x00df\n99 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "223 JUMPDEST\n224 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": "100", "isExpanded": false, "label": "223 JUMPDEST\n224 PUSH1 0x00\n226 DUP1\n227 SWAP1\n228 SLOAD\n229 SWAP1\n(click to expand +)", "size": 150, "truncLabel": "223 JUMPDEST\n224 PUSH1 0x00\n226 DUP1\n227 SWAP1\n228 SLOAD\n229 SWAP1\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "100 JUMPDEST\n101 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": "101", "isExpanded": false, "label": "100 JUMPDEST\n101 PUSH1 0x40\n103 MLOAD\n104 DUP1\n105 DUP3\n106 PUSH20 0
var edges = [{"arrows": "to", "from": "93", "label": "ULE(4, 5_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "94"}, {"arrows": "to", "from": "93", "label": "Not(ULE(4, 5_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "95"}, {"arrows": "to", "from": "94", "label": "Not(And(5_calldata[3] == 91, 5_calldata[2] == 0xcb, 5_calldata[1] == 0xa5, 5_calldata[0] == 0x8d))", "smooth": {"type": "cubicBezier"}, "to": "96"}, {"arrows": "to", "from": "94", "label": "And(5_calldata[3] == 91, 5_calldata[2] == 0xcb, 5_calldata[1] == 0xa5, 5_calldata[0] == 0x8d)", "smooth": {"type": "cubicBezier"}, "to": "97"}, {"arrows": "to", "from": "97", "label": "Not(call_value5 == 0)", "smooth": {"type": "cubicBezier"}, "to": "98"}, {"arrows": "to", "from": "97", "label": "call_value5 == 0", "smooth": {"type": "cubicBezier"}, "to": "99"}, {"arrows": "to", "from": "99", "label": "", "smooth": {"type": "cubicBezier"}, "to": "100"}, {"arrows": "to", "from": "100", "label": "", "smooth": {"type": "cubicBezier"}, "to": "101"}, {"arrows": "to", "from": "96", "label": "Not(And(5_calldata[3] == 0x8b, 5_calldata[2] == 0xe3, 5_calldata[1] == 0xfd, 5_calldata[0] == 0xf2))", "smooth": {"type": "cubicBezier"}, "to": "102"}, {"arrows": "to", "from": "96", "label": "And(5_calldata[3] == 0x8b, 5_calldata[2] == 0xe3, 5_calldata[1] == 0xfd, 5_calldata[0] == 0xf2)", "smooth": {"type": "cubicBezier"}, "to": "103"}, {"arrows": "to", "from": "103", "label": "Not(call_value5 == 0)", "smooth": {"type": "cubicBezier"}, "to": "104"}, {"arrows": "to", "from": "103", "label": "call_value5 == 0", "smooth": {"type": "cubicBezier"}, "to": "105"}, {"arrows": "to", "from": "105", "label": "", "smooth": {"type": "cubicBezier"}, "to": "106"}, {"arrows": "to", "from": "106", "label": "Not(Extract(0x9f, 0, origin5) == Extract(0x9f, 0, storage_0))", "smooth": {"type": "cubicBezier"}, "to": "107"}, {"arrows": "to", "from": "106", "label": "Extract(0x9f, 0, origin5) == Extract(0x9f, 0, storage_0)", "smooth": {"type": "cubicBezier"}, "to": "108"}, {"arrows": "to", "from": "108", "label": "Not(And(5_calldata[35] == 0, 5_calldata[34] == 0, 5_calldata[33] == 0, 5_calldata[32] == 0, 5_calldata[31] == 0, 5_calldata[30] == 0, 5_calldata[29] == 0, 5_calldata[28] == 0, 5_calldata[27] == 0, 5_calldata[26] == 0, 5_calldata[25] == 0, 5_calldata[24] == 0, 5_calldata[23] == 0, 5_calldata[22] == 0, 5_calldata[21] == 0, 5_calldata[20] == 0, 5_calldata[19] == 0, 5_calldata[18] == 0, 5_calldata[17] == 0, 5_calldata[16] == 0))", "smooth": {"type": "cubicBezier"}, "to": "109"}, {"arrows": "to", "from": "108", "label": "And(5_calldata[35] == 0, 5_calldata[34] == 0, 5_calldata[33] == 0, 5_calldata[32] == 0, 5_calldata[31] == 0, 5_calldata[30] == 0, 5_calldata[29] == 0, 5_calldata[28] == 0, 5_calldata[27] == 0, 5_calldata[26] == 0, 5_calldata[25] == 0, 5_calldata[24] == 0, 5_calldata[23] == 0, 5_calldata[22] == 0, 5_calldata[21] == 0, 5_calldata[20] == 0, 5_calldata[19] == 0, 5_calldata[18] == 0, 5_calldata[17] == 0, 5_calldata[16] == 0)", "smooth": {"type": "cubicBezier"}, "to": "110"}, {"arrows": "to", "from": "110", "label": "", "smooth": {"type": "cubicBezier"}, "to": "111"}, {"arrows": "to", "from": "109", "label": "", "smooth": {"type": "cubicBezier"}, "to": "112"}];
</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>