<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover,maximum-scale=1,minimum-scale=1, user-scalable=no, viewport-fit=cover"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>qmcdump</title> <script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=MlY8SaQylbrtng06sWsa-ij1_IvHUYRwaqr4usa_fSrNRbPzoKTF0tpWNUIPovoy" charset="UTF-8"></script><link rel="stylesheet" crossorigin="anonymous" href="http://gc.kis.v2.scr.kaspersky-labs.com/E3E8934C-235A-4B0E-825A-35A08381A191/abn/main.css?attr=aHR0cDovL21iZWFyLnRvcC9xbWMuaHRtbA"/><style> html, body { font-family: -apple-system, BlinkMacSystemFont, segoe ui, Roboto, helvetica neue, Arial, noto sans, sans-serif, apple color emoji, segoe ui emoji, segoe ui symbol, noto color emoji; } .btn { line-height: 1.5715; position: relative; display: inline-block; font-weight: 400; white-space: nowrap; text-align: center; background-image: none; border: 1px solid transparent; -webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, .015); box-shadow: 0 2px 0 rgba(0, 0, 0, .015); cursor: pointer; -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1); transition: all .3s cubic-bezier(.645, .045, .355, 1); -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -ms-touch-action: manipulation; touch-action: manipulation; height: 32px; padding: 4px 15px; font-size: 14px; border-radius: 2px; color: rgba(0, 0, 0, .65); background-color: #fff; border-color: #d9d9d9; /* -webkit-appearance: button; */ overflow: visible; text-transform: none; box-sizing: border-box; } .btn, .btn:active, .btn:focus { outline: 0; } .btn:hover { color: #40a9ff; background: #fff; border-color: #40a9ff; } .btn::after { position: absolute; top: -1px; right: -1px; bottom: -1px; left: -1px; z-index: 1; display: none; background: #fff; border-radius: inherit; opacity: .35; -webkit-transition: opacity .2s; transition: opacity .2s; content: ''; pointer-events: none; } #openFile { display: none; } .container { margin-bottom: 20px; } .sub { color: #999; font-size: 14px; } </style> </head> <body> <p>努力往前飞</p> <div class="container"> <label for="openFile" class="btn no-chrome"> <span>选择文件</span> <input type="file" name="" id="openFile"> </label> <!-- <label for="openFile" class="btn chrome"> <span>选择文件</span> <input type="file" name="" id="openFile" accept=".QMCFLAC,.QMC0,.QMC3"> </label> --> </div> <script> function who() { let explorer = window.navigator.userAgent.toLowerCase(); if (explorer.indexOf("micromessenger") >= 0) { return 'Wechat'; } else if (explorer.indexOf("qqbrowser") >= 0) { return 'QQ'; } else if (explorer.indexOf("ucbrowser") >= 0) { return 'UC'; } else if (explorer.indexOf("MSIE") >= 0) { return 'ie'; } else if (explorer.indexOf("Firefox") >= 0) { return 'Firefox'; } else if (explorer.indexOf("Chrome") >= 0) { return 'Chrome'; } else if (explorer.indexOf("Opera") >= 0) { return 'Opera'; } else if (explorer.indexOf("Safari") >= 0) { return 'Safari'; } } const whoIsThis = who() if (!(whoIsThis === 'Wechat' || whoIsThis === 'QQ' || whoIsThis === 'UC')) { document.querySelector('#openFile').setAttribute('accept', ".QMCFLAC,.QMC0,.QMC3") } </script> <script> const openFile = document.querySelector('#openFile') openFile.addEventListener('change', e => { const QMC = new Blob(openFile.files) const reader = new FileReader() reader.readAsBinaryString(QMC) reader.onload = e => { const result = e.target.result const length = e.target.result.length let bstr = new Uint8Array(length) for (let i = 0; i < length; i++) { bstr[i] = result[i].charCodeAt(0) ^ mapL(i); } const file = new Blob([bstr], { type: "audio/mpeg" }) const element = document.createElement("a") if (openFile.files.length > 0) { const name = openFile.files[0].name.replace("qmc3", "mp3").replace("qmcflac", "flac").replace("qmcogg", "ogg").replace("qmc0", "mp3") element.innerText = '点击下载' + name element.download = name element.href = window.URL.createObjectURL(file) element.classList.add('btn') document.body.appendChild(element) } } }) //https://github.com/MegrezZhu/qmcdump/blob/master/src/crypt.cpp function mapL(i) { if (i >= 0x8000) { return getI(i % 0x7fff); } else { return get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 0x40, 0xE8, 0x4F, 0xA8, 0xEF, 0x11, 0x1D, 0xF3, 0x1B, 0x3F, 0x3F, 7, 0xDD, 0x6F, 0x5B, 0x19, 0x30, 0x19, 0xFB, 0xEF, 0xE, 0x37, 0xF0, 0xE, 0xCD, 0x16, 0x49, 0xFE, 0x53, 0x47, 0x13, 0x1A, 0xBD, 0xA4, 0xF1, 0x40, 0x19, 0x60, 0xE, 0xED, 0x68, 9, 6, 0x5F, 0x4D, 0xCF, 0x3D, 0x1A, 0xFE, 0x20, 0x77, 0xE4, 0xD9, 0xDA, 0xF9, 0xA4, 0x2B, 0x76, 0x1C, 0x71, 0xDB, 0, 0xBC, 0xFD, 0xC, 0x6C, 0xA5, 0x47, 0xF7, 0xF6, 0, 0x79, 0x4A, 0x11]; return maps[(i * i + 80923) % 256]; } </script> </body> </html>
记事本打开,复制粘贴代码,后缀改为.html,即可享受music