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

63 lines
55 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 0x80\n2 PUSH1 0x40\n4 MSTORE\n5 PUSH1 0x04\n7 CALLDATASIZE\n8 LT\n9 PUSH2 0x004c\n12 JUMPI", "id": "65", "isExpanded": false, "label": "0 PUSH1 0x80\n2 PUSH1 0x40\n4 MSTORE\n5 PUSH1 0x04\n7 CALLDATASIZE\n8 LT\n(click to expand +)", "size": 150, "truncLabel": "0 PUSH1 0x80\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 0x06661abd\n60 EQ\n61 PUSH2 0x0051\n64 JUMPI", "id": "66", "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": "67", "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 0x83f12fec\n71 EQ\n72 PUSH2 0x007c\n75 JUMPI", "id": "68", "isExpanded": false, "label": "65 DUP1\n66 PUSH4 0x83f12fec\n71 EQ\n72 PUSH2 0x007c\n75 JUMPI", "size": 150, "truncLabel": "65 DUP1\n66 PUSH4 0x83f12fec\n71 EQ\n72 PUSH2 0x007c\n75 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "81 JUMPDEST\n82 CALLVALUE\n83 DUP1\n84 ISZERO\n85 PUSH2 0x005d\n88 JUMPI", "id": "69", "isExpanded": false, "label": "81 JUMPDEST\n82 CALLVALUE\n83 DUP1\n84 ISZERO\n85 PUSH2 0x005d\n88 JUMPI", "size": 150, "truncLabel": "81 JUMPDEST\n82 CALLVALUE\n83 DUP1\n84 ISZERO\n85 PUSH2 0x005d\n88 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "89 PUSH1 0x00\n91 DUP1\n92 REVERT", "id": "70", "isExpanded": false, "label": "89 PUSH1 0x00\n91 DUP1\n92 REVERT", "size": 150, "truncLabel": "89 PUSH1 0x00\n91 DUP1\n92 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "93 JUMPDEST\n94 POP\n95 PUSH2 0x0066\n98 PUSH2 0x0104\n101 JUMP", "id": "71", "isExpanded": false, "label": "93 JUMPDEST\n94 POP\n95 PUSH2 0x0066\n98 PUSH2 0x0104\n101 JUMP", "size": 150, "truncLabel": "93 JUMPDEST\n94 POP\n95 PUSH2 0x0066\n98 PUSH2 0x0104\n101 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "260 JUMPDEST\n261 PUSH1 0x00\n263 SLOAD\n264 DUP2\n265 JUMP", "id": "72", "isExpanded": false, "label": "260 JUMPDEST\n261 PUSH1 0x00\n263 SLOAD\n264 DUP2\n265 JUMP", "size": 150, "truncLabel": "260 JUMPDEST\n261 PUSH1 0x00\n263 SLOAD\n264 DUP2\n265 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "102 JUMPDEST\n103 PUSH1 0x40\n105 MLOAD\n106 DUP1\n107 DUP3\n108 DUP2\n109 MSTORE\n110 PUSH1 0x20\n112 ADD\n113 SWAP2\n114 POP\n115 POP\n116 PUSH1 0x40\n118 MLOAD\n119 DUP1\n120 SWAP2\n121 SUB\n122 SWAP1\n123 RETURN", "id": "73", "isExpanded": false, "label": "102 JUMPDEST\n103 PUSH1 0x40\n105 MLOAD\n106 DUP1\n107 DUP3\n108 DUP2\n(click to expand +)", "size": 150, "truncLabel": "102 JUMPDEST\n103 PUSH1 0x40\n105 MLOAD\n106 DUP1\n107 DUP3\n108 DUP2\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "high
var edges = [{"arrows": "to", "from": "65", "label": "ULE(4, 4_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "66"}, {"arrows": "to", "from": "65", "label": "Not(ULE(4, 4_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "67"}, {"arrows": "to", "from": "66", "label": "Not(And(4_calldata[3] == 0xbd, 4_calldata[2] == 26, 4_calldata[1] == 0x66, 4_calldata[0] == 6))", "smooth": {"type": "cubicBezier"}, "to": "68"}, {"arrows": "to", "from": "66", "label": "And(4_calldata[3] == 0xbd, 4_calldata[2] == 26, 4_calldata[1] == 0x66, 4_calldata[0] == 6)", "smooth": {"type": "cubicBezier"}, "to": "69"}, {"arrows": "to", "from": "69", "label": "Not(call_value4 == 0)", "smooth": {"type": "cubicBezier"}, "to": "70"}, {"arrows": "to", "from": "69", "label": "call_value4 == 0", "smooth": {"type": "cubicBezier"}, "to": "71"}, {"arrows": "to", "from": "71", "label": "", "smooth": {"type": "cubicBezier"}, "to": "72"}, {"arrows": "to", "from": "72", "label": "", "smooth": {"type": "cubicBezier"}, "to": "73"}, {"arrows": "to", "from": "68", "label": "Not(And(4_calldata[3] == 0xec, 4_calldata[2] == 47, 4_calldata[1] == 0xf1, 4_calldata[0] == 0x83))", "smooth": {"type": "cubicBezier"}, "to": "74"}, {"arrows": "to", "from": "68", "label": "And(4_calldata[3] == 0xec, 4_calldata[2] == 47, 4_calldata[1] == 0xf1, 4_calldata[0] == 0x83)", "smooth": {"type": "cubicBezier"}, "to": "75"}, {"arrows": "to", "from": "75", "label": "Not(call_value4 == 0)", "smooth": {"type": "cubicBezier"}, "to": "76"}, {"arrows": "to", "from": "75", "label": "call_value4 == 0", "smooth": {"type": "cubicBezier"}, "to": "77"}, {"arrows": "to", "from": "77", "label": "", "smooth": {"type": "cubicBezier"}, "to": "78"}, {"arrows": "to", "from": "78", "label": "Not(And(4_calldata[35 + Concat(4_calldata[4], 4_calldata[5], 4_calldata[6], 4_calldata[7], 4_calldata[8], 4_calldata[9], 4_calldata[10], 4_calldata[11], 4_calldata[12], 4_calldata[13], 4_calldata[14], 4_calldata[15], 4_calldata[16], 4_calldata[17], 4_calldata[18], 4_calldata[19], 4_calldata[20], 4_calldata[21], 4_calldata[22], 4_calldata[23], 4_calldata[24], 4_calldata[25], 4_calldata[26], 4_calldata[27], 4_calldata[28], 4_calldata[29], 4_calldata[30], 4_calldata[31], 4_calldata[32], 4_calldata[33], 4_calldata[34], 4_calldata[35])] == 0, 4_calldata[34 + Concat(4_calldata[4], 4_calldata[5], 4_calldata[6], 4_calldata[7], 4_calldata[8], 4_calldata[9], 4_calldata[10], 4_calldata[11], 4_calldata[12], 4_calldata[13], 4_calldata[14], 4_calldata[15], 4_calldata[16], 4_calldata[17], 4_calldata[18], 4_calldata[19], 4_calldata[20], 4_calldata[21], 4_calldata[22], 4_calldata[23], 4_calldata[24], 4_calldata[25], 4_calldata[26], 4_calldata[27], 4_calldata[28], 4_calldata[29], 4_calldata[30], 4_calldata[31], 4_calldata[32], 4_calldata[33], 4_calldata[34], 4_calldata[35])] == 0, 4_calldata[33 + Concat(4_calldata[4], 4_calldata[5], 4_calldata[6], 4_calldata[7], 4_ca
</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>