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....

58 lines
24 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 {
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": "0 PUSH1 0x60\n2 PUSH1 0x40\n4 MSTORE\n5 PUSH1 0x04\n7 CALLDATASIZE\n8 LT\n9 PUSH2 0x006d\n12 JUMPI", "id": "313", "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": "110 PUSH1 0x00\n112 DUP1\n113 REVERT", "id": "314", "isExpanded": false, "label": "110 PUSH1 0x00\n112 DUP1\n113 REVERT", "size": 150, "truncLabel": "110 PUSH1 0x00\n112 DUP1\n113 REVERT"}, {"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": "315", "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": "115 CALLVALUE\n116 ISZERO\n117 PUSH2 0x007d\n120 JUMPI", "id": "316", "isExpanded": false, "label": "115 CALLVALUE\n116 ISZERO\n117 PUSH2 0x007d\n120 JUMPI", "size": 150, "truncLabel": "115 CALLVALUE\n116 ISZERO\n117 PUSH2 0x007d\n120 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 DUP1\n66 PUSH4 0x2e52d606\n71 EQ\n72 PUSH2 0x00b4\n75 JUMPI", "id": "317", "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": "126 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": "318", "isExpanded": false, "label": "126 PUSH2 0x00b2\n129 PUSH1 0x04\n131 DUP1\n132 DUP1\n133 CALLDATALOAD\n134 PUSH20 0xffffffff(...)\n(click to expand +)", "size": 150, "truncLabel": "126 PUSH2 0x00b2\n129 PUSH1 0x04\n131 DUP1\n132 DUP1\n133 CALLDATALOAD\n134 PUSH20 0xffffffff(...)\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "121 PUSH1 0x00\n123 DUP1\n124 REVERT", "id": "319", "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": "181 CALLVALUE\n182 ISZERO\n183 PUSH2 0x00bf\n186 JUMPI", "id": "320", "isExpanded": false, "label": "181 CALLVALUE\n182 ISZERO\n183 PUSH2 0x00bf\n186 JUMPI", "size": 150, "truncLabel": "181 CALLVALUE\n182 ISZERO\n183 PUSH2 0x00bf\n186 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "76 DUP1\n77 PUSH4 0x67e404ce\n82 EQ\n83 PUSH2 0x00dd\n86 JUMPI", "id": "321", "isExpanded": false, "label": "76 DUP1\n77 PUSH4 0x67e404ce\n82 EQ\n83 PUSH2 0x00dd\n86 JUMPI", "size": 150, "truncLabel": "76 DUP1\n77 PUSH4 0x67e404ce\n82 EQ\n83 PUSH2 0x00
var edges = [{"arrows": "to", "from": "313", "label": "Not(ULE(4, calldatasize_Unknown))", "smooth": {"type": "cubicBezier"}, "to": "314"}, {"arrows": "to", "from": "313", "label": "ULE(4, calldatasize_Unknown)", "smooth": {"type": "cubicBezier"}, "to": "315"}, {"arrows": "to", "from": "315", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x141f32ff", "smooth": {"type": "cubicBezier"}, "to": "316"}, {"arrows": "to", "from": "315", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x141f32ff)", "smooth": {"type": "cubicBezier"}, "to": "317"}, {"arrows": "to", "from": "316", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "318"}, {"arrows": "to", "from": "316", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "319"}, {"arrows": "to", "from": "317", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x2e52d606", "smooth": {"type": "cubicBezier"}, "to": "320"}, {"arrows": "to", "from": "317", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x2e52d606)", "smooth": {"type": "cubicBezier"}, "to": "321"}, {"arrows": "to", "from": "320", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "322"}, {"arrows": "to", "from": "320", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "323"}, {"arrows": "to", "from": "321", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x67e404ce", "smooth": {"type": "cubicBezier"}, "to": "324"}, {"arrows": "to", "from": "321", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x67e404ce)", "smooth": {"type": "cubicBezier"}, "to": "325"}, {"arrows": "to", "from": "322", "label": "", "smooth": {"type": "cubicBezier"}, "to": "326"}, {"arrows": "to", "from": "324", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "327"}, {"arrows": "to", "from": "324", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "328"}, {"arrows": "to", "from": "325", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x9b58bc26", "smooth": {"type": "cubicBezier"}, "to": "329"}, {"arrows": "to", "from": "325", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x9b58bc26)", "smooth": {"type": "cubicBezier"}, "to": "330"}, {"arrows": "to", "from": "326", "label": "", "smooth": {"type": "cubicBezier"}, "to": "331"}, {"arrows": "to", "from": "327", "label": "", "smooth": {"type": "cubicBezier"}, "to": "332"}, {"arrows": "to", "from": "329", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "333"}, {"arrows": "to", "from": "329", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "334"}, {"arrows": "to", "from": "330", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xeea4c864", "smooth": {"type": "cubicBezier"}, "to": "335"}, {"arrows": "to", "from": "330", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0xeea4c864)", "smooth": {"type": "cubicBezier"}, "to": "336"}, {"arrows": "to", "from": "335", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "337"}, {"arrows": "to", "from": "335", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "338"}, {"arrows": "to", "from": "318", "label": "", "smooth": {"type": "cubicBezier"}, "to": "339"}, {"arrows": "to", "from": "332", "label": "", "smooth": {"type": "cubicBezier"}, "to": "340"}, {"arrows": "to", "from": "333", "label": "", "smooth": {"type": "cubicBezier"}, "to": "341"}, {"arrows": "to", "from": "337", "label": "", "smooth": {"type": "cubicBezier"}, "to": "342"}, {"arrows": "to", "from": "339", "label": "", "smooth": {"type": "cubicBezier"}, "to": "343"}, {"arrows": "to", "from": "343", "label": "", "smooth": {"type": "cubicBezier"}, "to": "344"}, {"arrows": "to", "from": "341", "label": "", "smooth": {"type": "cubicBezier"}, "to": "345"}, {"arrows": "to", "from": "342", "label": "", "smooth": {"type": "cubicBezier"}, "to": "346"}, {"arrows": "to", "from": "345", "label": "", "smooth": {"type": "cubicBezier"}, "to": "347"}, {"arrows": "to", "from": "346", "label": "", "smooth": {"type": "cubicBezier"}, "to": "348"}];
</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>