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

63 lines
10 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 0x0041\n12 JUMPI", "id": "465", "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 0x24ff38a2\n60 EQ\n61 PUSH2 0x0046\n64 JUMPI", "id": "466", "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": "65 JUMPDEST\n66 PUSH1 0x00\n68 DUP1\n69 REVERT", "id": "467", "isExpanded": false, "label": "65 JUMPDEST\n66 PUSH1 0x00\n68 DUP1\n69 REVERT", "size": 150, "truncLabel": "65 JUMPDEST\n66 PUSH1 0x00\n68 DUP1\n69 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "65 JUMPDEST\n66 PUSH1 0x00\n68 DUP1\n69 REVERT", "id": "468", "isExpanded": false, "label": "65 JUMPDEST\n66 PUSH1 0x00\n68 DUP1\n69 REVERT", "size": 150, "truncLabel": "65 JUMPDEST\n66 PUSH1 0x00\n68 DUP1\n69 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "70 JUMPDEST\n71 CALLVALUE\n72 DUP1\n73 ISZERO\n74 PUSH2 0x0052\n77 JUMPI", "id": "469", "isExpanded": false, "label": "70 JUMPDEST\n71 CALLVALUE\n72 DUP1\n73 ISZERO\n74 PUSH2 0x0052\n77 JUMPI", "size": 150, "truncLabel": "70 JUMPDEST\n71 CALLVALUE\n72 DUP1\n73 ISZERO\n74 PUSH2 0x0052\n77 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "78 PUSH1 0x00\n80 DUP1\n81 REVERT", "id": "470", "isExpanded": false, "label": "78 PUSH1 0x00\n80 DUP1\n81 REVERT", "size": 150, "truncLabel": "78 PUSH1 0x00\n80 DUP1\n81 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "82 JUMPDEST\n83 POP\n84 PUSH2 0x005b\n87 PUSH2 0x00d6\n90 JUMP", "id": "471", "isExpanded": false, "label": "82 JUMPDEST\n83 POP\n84 PUSH2 0x005b\n87 PUSH2 0x00d6\n90 JUMP", "size": 150, "truncLabel": "82 JUMPDEST\n83 POP\n84 PUSH2 0x005b\n87 PUSH2 0x00d6\n90 JUMP"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "214 JUMPDEST\n215 PUSH1 0x60\n217 PUSH1 0x40\n219 DUP1\n220 MLOAD\n221 SWAP1\n222 DUP2\n223 ADD\n224 PUSH1 0x40\n226 MSTORE\n227 DUP1\n228 PUSH1 0x17\n230 DUP2\n231 MSTORE\n232 PUSH1 0x20\n234 ADD\n235 PUSH32 0xd0a5d18d(...)\n268 DUP2\n269 MSTORE\n270 POP\n271 SWAP1\n272 POP\n273 SWAP1\n274 JUMP", "id": "472", "isExpanded": false, "label": "214 JUMPDEST\n215 PUSH1 0x60\n217 PUSH1 0x40\n219 DUP1\n220 MLOAD\n221 SWAP1\n(click to expand +)", "size": 150, "truncLabel": "214 JUMPDEST\n215 PUSH1 0x60\n217 PUSH1 0x40\n219 DUP1\n220 MLOAD\n221 SWAP1\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "91 JUMPDEST\n92 PUSH1 0x40\n94 MLOAD\n95 DUP1\n96 DUP1\n97 PUSH1 0x20\n99 ADD\n100 DUP3\n101 DUP2\n102 SUB\n103 DUP3\n104 MSTORE\n105 DUP4\n106 DUP2\n107 DUP2\n108 MLOAD\n109 DUP2\n110 MSTORE\n111 PUSH1 0x20\n113 ADD\n114 SWAP2\n115 POP\n116 DUP1\n117 MLOAD\n118 SWAP1
var edges = [{"arrows": "to", "from": "465", "label": "ULE(4, 13_calldatasize)", "smooth": {"type": "cubicBezier"}, "to": "466"}, {"arrows": "to", "from": "465", "label": "Not(ULE(4, 13_calldatasize))", "smooth": {"type": "cubicBezier"}, "to": "467"}, {"arrows": "to", "from": "466", "label": "Not(And(13_calldata[3] == 0xa2, 13_calldata[2] == 56, 13_calldata[1] == 0xff, 13_calldata[0] == 36))", "smooth": {"type": "cubicBezier"}, "to": "468"}, {"arrows": "to", "from": "466", "label": "And(13_calldata[3] == 0xa2, 13_calldata[2] == 56, 13_calldata[1] == 0xff, 13_calldata[0] == 36)", "smooth": {"type": "cubicBezier"}, "to": "469"}, {"arrows": "to", "from": "469", "label": "Not(call_value13 == 0)", "smooth": {"type": "cubicBezier"}, "to": "470"}, {"arrows": "to", "from": "469", "label": "call_value13 == 0", "smooth": {"type": "cubicBezier"}, "to": "471"}, {"arrows": "to", "from": "471", "label": "", "smooth": {"type": "cubicBezier"}, "to": "472"}, {"arrows": "to", "from": "472", "label": "", "smooth": {"type": "cubicBezier"}, "to": "473"}, {"arrows": "to", "from": "473", "label": "True", "smooth": {"type": "cubicBezier"}, "to": "474"}, {"arrows": "to", "from": "474", "label": "", "smooth": {"type": "cubicBezier"}, "to": "475"}, {"arrows": "to", "from": "475", "label": "True", "smooth": {"type": "cubicBezier"}, "to": "476"}, {"arrows": "to", "from": "476", "label": "True", "smooth": {"type": "cubicBezier"}, "to": "477"}];
</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>