mirror of https://github.com/ConsenSys/mythril
blockchainethereumsmart-contractssoliditysecurityprogram-analysissecurity-analysissymbolic-execution
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.
56 lines
7.2 KiB
56 lines
7.2 KiB
<html>
|
|
<head>
|
|
<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": "63 JUMPDEST fallback\n64 PUSH1 0x00\n66 DUP1\n67 REVERT", "id": "1125", "isExpanded": false, "label": "63 JUMPDEST fallback\n64 PUSH1 0x00\n66 DUP1\n67 REVERT", "size": 150, "truncLabel": "63 JUMPDEST fallback\n64 PUSH1 0x00\n66 DUP1\n67 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "122 JUMPDEST _function_0xcbf0b0c0\n123 DUP1\n124 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n145 AND\n146 SUICIDE", "id": "1129", "isExpanded": false, "label": "122 JUMPDEST _function_0xcbf0b0c0\n123 DUP1\n124 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n145 AND\n146 SUICIDE", "size": 150, "truncLabel": "122 JUMPDEST _function_0xcbf0b0c0\n123 DUP1\n124 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n145 AND\n146 SUICIDE"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "78 JUMPDEST _function_0xcbf0b0c0\n79 PUSH1 0x78\n81 PUSH1 0x04\n83 DUP1\n84 DUP1\n85 CALLDATALOAD\n86 PUSH20 0xffffffffffffffffffffffffffffffffffffffff\n107 AND\n108 SWAP1\n109 PUSH1 0x20\n111 ADD\n112 SWAP1\n113 SWAP2\n114 SWAP1\n115 POP\n116 POP\n117 PUSH1 0x7a\n119 JUMP", "id": "1128", "isExpanded": false, "label": "78 JUMPDEST _function_0xcbf0b0c0\n79 PUSH1 0x78\n81 PUSH1 0x04\n83 DUP1\n84 DUP1\n85 CALLDATALOAD\n(click to expand +)", "size": 150, "truncLabel": "78 JUMPDEST _function_0xcbf0b0c0\n79 PUSH1 0x78\n81 PUSH1 0x04\n83 DUP1\n84 DUP1\n85 CALLDATALOAD\n(click to expand +)"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "74 PUSH1 0x00\n76 DUP1\n77 REVERT", "id": "1130", "isExpanded": false, "label": "74 PUSH1 0x00\n76 DUP1\n77 REVERT", "size": 150, "truncLabel": "74 PUSH1 0x00\n76 DUP1\n77 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "68 JUMPDEST _function_0xcbf0b0c0\n69 CALLVALUE\n70 ISZERO\n71 PUSH1 0x4e\n73 JUMPI", "id": "1127", "isExpanded": false, "label": "68 JUMPDEST _function_0xcbf0b0c0\n69 CALLVALUE\n70 ISZERO\n71 PUSH1 0x4e\n73 JUMPI", "size": 150, "truncLabel": "68 JUMPDEST _function_0xcbf0b0c0\n69 CALLVALUE\n70 ISZERO\n71 PUSH1 0x4e\n73 JUMPI"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "63 JUMPDEST _function_0xcbf0b0c0\n64 PUSH1 0x00\n66 DUP1\n67 REVERT", "id": "1131", "isExpanded": false, "label": "63 JUMPDEST _function_0xcbf0b0c0\n64 PUSH1 0x00\n66 DUP1\n67 REVERT", "size": 150, "truncLabel": "63 JUMPDEST _function_0xcbf0b0c0\n64 PUSH1 0x00\n66 DUP1\n67 REVERT"}, {"color": {"background": "#2f7e5b", "border": "#26996f", "highlight": {"background": "#28a16f", "border": "#26996f"}}, "fullLabel": "12 PUSH1 0x00\n14 CALLDATALOAD\n15 PUSH29 0x0100000000000000000000000000000000000000000000000000000000\n45 SWAP1\n46 DIV\n47 PUSH4 0xffffffff\n52 AND\n53 DUP1\n54 PUSH4 0xcbf0b0c0\n59 EQ\n60 PUSH1 0x44\n62 JUMPI", "id": "1126", "isExpanded": false, "label": "12 PUSH1 0x00\n14 CALLDATALOAD\n15 PUSH29 0x0100000000000000000000000000000000000000000000000000000000\n45 SWAP1\n46 DIV\n47 PUSH4 0xffffffff\n(click to expand +)", "size": 150, "truncLabel": "12 PUSH1 0x00\n14 CALLDATALOAD\n15 PUSH29 0x0100000000000000000000000000000000000000000000000000000000\n45 SWAP1\n46 DIV\n47 PUSH4 0xffffffff\n(click to expand +)"}, {"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 PUSH1 0x3f\n11 JUMPI", "id": "1124", "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 +)"}];
|
|
var edges = [{"arrows": "to", "from": "1124", "label": "Not(ULE(4, calldatasize_Unknown))", "smooth": {"type": "cubicBezier"}, "to": "1125"}, {"arrows": "to", "from": "1128", "label": "", "smooth": {"type": "cubicBezier"}, "to": "1129"}, {"arrows": "to", "from": "1127", "label": "callvalue == 0", "smooth": {"type": "cubicBezier"}, "to": "1128"}, {"arrows": "to", "from": "1127", "label": "Not(callvalue == 0)", "smooth": {"type": "cubicBezier"}, "to": "1130"}, {"arrows": "to", "from": "1126", "label": "Extract(0xff, 0xe0, calldata_Unknown_0) == 0xcbf0b0c0", "smooth": {"type": "cubicBezier"}, "to": "1127"}, {"arrows": "to", "from": "1126", "label": "Not(Extract(0xff, 0xe0, calldata_Unknown_0) == 0xcbf0b0c0)", "smooth": {"type": "cubicBezier"}, "to": "1131"}, {"arrows": "to", "from": "1124", "label": "ULE(4, calldatasize_Unknown)", "smooth": {"type": "cubicBezier"}, "to": "1126"}];
|
|
</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> |