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

58 lines
20 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 0x0062\n12 JUMPI", "id": "50", "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": "99 PUSH1 0x00\n101 DUP1\n102 REVERT", "id": "51", "isExpanded": false, "label": "99 PUSH1 0x00\n101 DUP1\n102 REVERT", "size": 150, "truncLabel": "99 PUSH1 0x00\n101 DUP1\n102 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 0x18160ddd\n60 EQ\n61 PUSH2 0x0067\n64 JUMPI", "id": "52", "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": "104 CALLVALUE\n105 ISZERO\n106 PUSH2 0x0072\n109 JUMPI", "id": "53", "isExpanded": false, "label": "104 CALLVALUE\n105 ISZERO\n106 PUSH2 0x0072\n109 JUMPI", "size": 150, "truncLabel": "104 CALLVALUE\n105 ISZERO\n106 PUSH2 0x0072\n109 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 DUP1\n66 PUSH4 0x6241bfd1\n71 EQ\n72 PUSH2 0x0090\n75 JUMPI", "id": "54", "isExpanded": false, "label": "65 DUP1\n66 PUSH4 0x6241bfd1\n71 EQ\n72 PUSH2 0x0090\n75 JUMPI", "size": 150, "truncLabel": "65 DUP1\n66 PUSH4 0x6241bfd1\n71 EQ\n72 PUSH2 0x0090\n75 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "115 PUSH2 0x007a\n118 PUSH2 0x015a\n121 JUMP", "id": "55", "isExpanded": false, "label": "115 PUSH2 0x007a\n118 PUSH2 0x015a\n121 JUMP", "size": 150, "truncLabel": "115 PUSH2 0x007a\n118 PUSH2 0x015a\n121 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "110 PUSH1 0x00\n112 DUP1\n113 REVERT", "id": "56", "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": "145 CALLVALUE\n146 ISZERO\n147 PUSH2 0x009b\n150 JUMPI", "id": "57", "isExpanded": false, "label": "145 CALLVALUE\n146 ISZERO\n147 PUSH2 0x009b\n150 JUMPI", "size": 150, "truncLabel": "145 CALLVALUE\n146 ISZERO\n147 PUSH2 0x009b\n150 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "76 DUP1\n77 PUSH4 0x70a08231\n82 EQ\n83 PUSH2 0x00b3\n86 JUMPI", "id": "58", "isExpanded": false, "label": "76 DUP1\n77 PUSH4 0x70a08231\n82 EQ\n83 PUSH2 0x00b3\n86 JUMPI", "size": 150, "truncLabel": "76 DUP1\n77 PUSH4 0x70a08231\n82 EQ\n83 PUSH2 0x00b3\n86 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "347 PUSH1 0x01\n349 SLOAD\n350 DUP2\n351 JUMP", "id": "59", "isExpanded": false, "label": "347 PUSH1 0x01\n349 SLOAD\n350 DUP2\n351 JUMP", "size": 150, "truncLabel": "347 PUSH1 0x01\n349 SLOAD\n350 DUP2\n351 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"
var edges = [{"arrows": "to", "from": "50", "label": "Not(ULE(4, calldatasize_Unknown))", "smooth": {"type": "cubicBezier"}, "to": "51"}, {"arrows": "to", "from": "50", "label": "ULE(4, calldatasize_Unknown)", "smooth": {"type": "cubicBezier"}, "to": "52"}, {"arrows": "to", "from": "52", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x18160ddd", "smooth": {"type": "cubicBezier"}, "to": "53"}, {"arrows": "to", "from": "52", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x18160ddd)", "smooth": {"type": "cubicBezier"}, "to": "54"}, {"arrows": "to", "from": "53", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "55"}, {"arrows": "to", "from": "53", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "56"}, {"arrows": "to", "from": "54", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x6241bfd1", "smooth": {"type": "cubicBezier"}, "to": "57"}, {"arrows": "to", "from": "54", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x6241bfd1)", "smooth": {"type": "cubicBezier"}, "to": "58"}, {"arrows": "to", "from": "55", "label": "", "smooth": {"type": "cubicBezier"}, "to": "59"}, {"arrows": "to", "from": "57", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "60"}, {"arrows": "to", "from": "57", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "61"}, {"arrows": "to", "from": "58", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0x70a08231", "smooth": {"type": "cubicBezier"}, "to": "62"}, {"arrows": "to", "from": "58", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0x70a08231)", "smooth": {"type": "cubicBezier"}, "to": "63"}, {"arrows": "to", "from": "59", "label": "", "smooth": {"type": "cubicBezier"}, "to": "64"}, {"arrows": "to", "from": "62", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "65"}, {"arrows": "to", "from": "62", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "66"}, {"arrows": "to", "from": "63", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xa3210e87", "smooth": {"type": "cubicBezier"}, "to": "67"}, {"arrows": "to", "from": "63", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0xa3210e87)", "smooth": {"type": "cubicBezier"}, "to": "68"}, {"arrows": "to", "from": "67", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "69"}, {"arrows": "to", "from": "67", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "70"}, {"arrows": "to", "from": "60", "label": "", "smooth": {"type": "cubicBezier"}, "to": "71"}, {"arrows": "to", "from": "65", "label": "", "smooth": {"type": "cubicBezier"}, "to": "72"}, {"arrows": "to", "from": "69", "label": "", "smooth": {"type": "cubicBezier"}, "to": "73"}, {"arrows": "to", "from": "71", "label": "", "smooth": {"type": "cubicBezier"}, "to": "74"}, {"arrows": "to", "from": "72", "label": "", "smooth": {"type": "cubicBezier"}, "to": "75"}, {"arrows": "to", "from": "73", "label": "True", "smooth": {"type": "cubicBezier"}, "to": "76"}, {"arrows": "to", "from": "76", "label": "", "smooth": {"type": "cubicBezier"}, "to": "77"}];
</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>