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

63 lines
25 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 0x006d\n12 JUMPI", "id": "168", "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 0x141f32ff\n60 EQ\n61 PUSH2 0x0072\n64 JUMPI", "id": "169", "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": "109 JUMPDEST\n110 PUSH1 0x00\n112 DUP1\n113 REVERT", "id": "170", "isExpanded": false, "label": "109 JUMPDEST\n110 PUSH1 0x00\n112 DUP1\n113 REVERT", "size": 150, "truncLabel": "109 JUMPDEST\n110 PUSH1 0x00\n112 DUP1\n113 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 DUP1\n66 PUSH4 0x2e52d606\n71 EQ\n72 PUSH2 0x00b4\n75 JUMPI", "id": "171", "isExpanded": false, "label": "65 DUP1\n66 PUSH4 0x2e52d606\n71 EQ\n72 PUSH2 0x00b4\n75 JUMPI", "size": 150, "truncLabel": "65 DUP1\n66 PUSH4 0x2e52d606\n71 EQ\n72 PUSH2 0x00b4\n75 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "114 JUMPDEST\n115 CALLVALUE\n116 ISZERO\n117 PUSH2 0x007d\n120 JUMPI", "id": "172", "isExpanded": false, "label": "114 JUMPDEST\n115 CALLVALUE\n116 ISZERO\n117 PUSH2 0x007d\n120 JUMPI", "size": 150, "truncLabel": "114 JUMPDEST\n115 CALLVALUE\n116 ISZERO\n117 PUSH2 0x007d\n120 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "121 PUSH1 0x00\n123 DUP1\n124 REVERT", "id": "173", "isExpanded": false, "label": "121 PUSH1 0x00\n123 DUP1\n124 REVERT", "size": 150, "truncLabel": "121 PUSH1 0x00\n123 DUP1\n124 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "125 JUMPDEST\n126 PUSH2 0x00b2\n129 PUSH1 0x04\n131 DUP1\n132 DUP1\n133 CALLDATALOAD\n134 PUSH20 0xffffffff(...)\n155 AND\n156 SWAP1\n157 PUSH1 0x20\n159 ADD\n160 SWAP1\n161 SWAP2\n162 SWAP1\n163 DUP1\n164 CALLDATALOAD\n165 SWAP1\n166 PUSH1 0x20\n168 ADD\n169 SWAP1\n170 SWAP2\n171 SWAP1\n172 POP\n173 POP\n174 PUSH2 0x01b6\n177 JUMP", "id": "174", "isExpanded": false, "label": "125 JUMPDEST\n126 PUSH2 0x00b2\n129 PUSH1 0x04\n131 DUP1\n132 DUP1\n133 CALLDATALOAD\n(click to expand +)", "size": 150, "truncLabel": "125 JUMPDEST\n126 PUSH2 0x00b2\n129 PUSH1 0x04\n131 DUP1\n132 DUP1\n133 CALLDATALOAD\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "438 JUMPDEST\n439 DUP2\n440 PUSH20 0xffffffff(...)\n461 AND\n462 PUSH1 0x40\n464 MLOAD\n465 DUP1\n466 DUP1\n467 PUSH32 0x7365744e(...)\n500 DUP2\n501 MSTORE\n502 POP\n503 PUSH1 0x0d\n505 ADD\n506 SWAP1\n507 POP\n508 PUSH1 0x40\n510 MLOAD\n511 DUP1\n512 SWAP2\n513 SUB\n514 SWAP1\n515 SHA3\n516 PUSH29 0x01000000(...)\n546 SWAP1\n547 DIV\n548 DUP3\n549 PUSH1 0x40\n551 MLOAD\n552 DUP3\n553 PUSH4 0xffffffff\n558 AND\n559 PUSH29 0x01000000(...)\n589 MUL\n590 DUP2\n591 MSTORE\n592 PUSH1 0x04\n594 ADD\n595 DUP1\n596 DUP3\n597 DUP2\n598 MSTORE\n599 PUSH1 0x20\n6
var edges = [{"arrows": "to", "from": "168", "label": "ULE(4, 7_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "169"}, {"arrows": "to", "from": "168", "label": "Not(ULE(4, 7_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "170"}, {"arrows": "to", "from": "169", "label": "Not(And(7_calldata[3] == 0xff, 7_calldata[2] == 50, 7_calldata[1] == 31, 7_calldata[0] == 20))", "smooth": {"type": "cubicBezier"}, "to": "171"}, {"arrows": "to", "from": "169", "label": "And(7_calldata[3] == 0xff, 7_calldata[2] == 50, 7_calldata[1] == 31, 7_calldata[0] == 20)", "smooth": {"type": "cubicBezier"}, "to": "172"}, {"arrows": "to", "from": "172", "label": "Not(call_value7 == 0)", "smooth": {"type": "cubicBezier"}, "to": "173"}, {"arrows": "to", "from": "172", "label": "call_value7 == 0", "smooth": {"type": "cubicBezier"}, "to": "174"}, {"arrows": "to", "from": "174", "label": "", "smooth": {"type": "cubicBezier"}, "to": "175"}, {"arrows": "to", "from": "175", "label": "", "smooth": {"type": "cubicBezier"}, "to": "176"}, {"arrows": "to", "from": "176", "label": "", "smooth": {"type": "cubicBezier"}, "to": "177"}, {"arrows": "to", "from": "171", "label": "Not(And(7_calldata[3] == 6, 7_calldata[2] == 0xd6, 7_calldata[1] == 82, 7_calldata[0] == 46))", "smooth": {"type": "cubicBezier"}, "to": "178"}, {"arrows": "to", "from": "171", "label": "And(7_calldata[3] == 6, 7_calldata[2] == 0xd6, 7_calldata[1] == 82, 7_calldata[0] == 46)", "smooth": {"type": "cubicBezier"}, "to": "179"}, {"arrows": "to", "from": "179", "label": "Not(call_value7 == 0)", "smooth": {"type": "cubicBezier"}, "to": "180"}, {"arrows": "to", "from": "179", "label": "call_value7 == 0", "smooth": {"type": "cubicBezier"}, "to": "181"}, {"arrows": "to", "from": "181", "label": "", "smooth": {"type": "cubicBezier"}, "to": "182"}, {"arrows": "to", "from": "182", "label": "", "smooth": {"type": "cubicBezier"}, "to": "183"}, {"arrows": "to", "from": "178", "label": "Not(And(7_calldata[3] == 0xce, 7_calldata[2] == 4, 7_calldata[1] == 0xe4, 7_calldata[0] == 0x67))", "smooth": {"type": "cubicBezier"}, "to": "184"}, {"arrows": "to", "from": "178", "label": "And(7_calldata[3] == 0xce, 7_calldata[2] == 4, 7_calldata[1] == 0xe4, 7_calldata[0] == 0x67)", "smooth": {"type": "cubicBezier"}, "to": "185"}, {"arrows": "to", "from": "185", "label": "Not(call_value7 == 0)", "smooth": {"type": "cubicBezier"}, "to": "186"}, {"arrows": "to", "from": "185", "label": "call_value7 == 0", "smooth": {"type": "cubicBezier"}, "to": "187"}, {"arrows": "to", "from": "187", "label": "", "smooth": {"type": "cubicBezier"}, "to": "188"}, {"arrows": "to", "from": "188", "label": "", "smooth": {"type": "cubicBezier"}, "to": "189"}, {"arrows": "to", "from": "184", "label": "Not(And(7_calldata[3] == 38, 7_calldata[2] == 0xbc, 7_calldata[1] == 88, 7_calldata[0] == 0x9b))", "smooth": {"type": "cubicBezier"}, "to": "190"}, {"arrows": "to", "from": "184", "label": "And(7_calldata[3] == 38, 7_calldata[2] == 0xbc, 7_calldata[1] == 88, 7_calldata[0] == 0x9b)", "smooth": {"type": "cubicBezier"}, "to": "191"}, {"arrows": "to", "from": "191", "label": "Not(call_value7 == 0)", "smooth": {"type": "cubicBezier"}, "to": "192"}, {"arrows": "to", "from": "191", "label": "call_value7 == 0", "smooth": {"type": "cubicBezier"}, "to": "193"}, {"arrows": "to", "from": "193", "label": "", "smooth": {"type": "cubicBezier"}, "to": "194"}, {"arrows": "to", "from": "194", "label": "", "smooth": {"type": "cubicBezier"}, "to": "195"}, {"arrows": "to", "from": "195", "label": "", "smooth": {"type": "cubicBezier"}, "to": "196"}, {"arrows": "to", "from": "190", "label": "Not(And(7_calldata[3] == 0x64, 7_calldata[2] == 0xc8, 7_calldata[1] == 0xa4, 7_calldata[0] == 0xee))", "smooth": {"type": "cubicBezier"}, "to": "197"}, {"arrows": "to", "from": "190", "label": "And(7_calldata[3] == 0x64, 7_calldata[2] == 0xc8, 7_calldata[1] == 0xa4, 7_calldata[0] == 0xee)", "smooth": {"type": "c
</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>