See the new repository https://github.com/bczhc/qmc-decrypt, written in Rust
qmc-decode <input> <output> [<ekey>]
When input
is a directory, it decrypts in batch mode, but only supports qmcflac
and qmc0
formats (due to mflac0
and mgg1
need ekey
)
when output
is a directory, the output filename is automatically assigned from the extension of the input file.
ekey
is a 704- or 364-byte Base64-encoded cipher text
- qmcflac (to flac)
- qmc0 (to mp3)
- mflac0 with STag or QTag file trailing mark (to flac; EKey is required when decrypting STag)
- mgg1 with STag or QTag file trailing mark (to ogg; EKey is required when decrypting STag)
用于解密 mflac
/ mgg1
文件的小工具。
同仓库的 submodule 一同克隆,然后在终端构建:
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
注:
- 你需要安装 CMake 以及一个支持的 C++ 编译器 (如:g++, MSVC)。
- 编译好的二进制文件可以在
build/QMC2-decoder
目录下找到。 - 你也可以使用 Visual Studio 2022 进行构建,文件位置在
out
目录下。
你可以在 Release 找到 Linux x86_64、Win (32 位) 及 Win (64 位) 的二进制文件下载。
同时亦提供转译 WASM 的版本 (需要现代浏览器):QMC2-WASM
注:Windows 版本需要最新的 VC++ x64 运行时。
./QMC2-decoder "encrypted_file.mflac" "decrypted.flac"
注:如果解密失败,可以尝试将文件名中的非 ASCII 字符去掉后尝试。 Linux 因为使用 UTF-8 编码因而没有该问题。
- 文件末端为
'QTag'
字样的mgg1
/mflac0
文件;或许也支持其它的该结尾的文件。 - 文件末端为
0x?? 0x01 0x00 0x00
的mflac
与mgg
文件; - 文件末端为
0x?? 0x02 0x00 0x00
的mgg
文件;
安装:
npm i @jixun/qmc2-crypto
引入后使用即可,默认使用的是不依赖 wasm
的版本。
- 2021/08/26 MGG/MFLAC 研究进展 by @ix64 & @Akarinnnnn
- unlock-music 项目
- 使用 Visual Studio 2022 进行开发
Decryptor for files with mflac
/ mgg1
extension.
Clone with submodules, then:
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
Note:
- CMake and a supported C++ compiler (i.e. g++, MSVC) is required.
- Binary will be built at
build/QMC-decoder
folder. - You can also build with Visual Studio 2022, where the binary will be found at
out
.
You can find Linux (x86_64), Win (32-bit) and Win (64-bit) binaries at Release section.
WASM transpiled version is also available (modern browser required): QMC2-WASM
Note: Windows binary requires latest VC++ x64 Runtime.
./QMC2-decoder "encrypted_file.mflac" "decrypted.flac"
If decryption fails in Windows, please try again with non-ASCII characters in the file path. Linux uses UTF-8 encoding so is safe.
- Ending with characters
'QTag'
, with extensionmgg1
/mflac0
;
might also work for other extensions with this ending. - Ending with
0x?? 0x01 0x00 0x00
with extensionmflac
&mgg
; - Ending with
0x?? 0x02 0x00 0x00
with extensionmgg
;
Install:
npm i @jixun/qmc2-crypto
It uses the legacy
build by default that does not require WASM
.
See package readme and usage document for details.
- 2021/08/26 MGG/MFLAC 研究进展 by @ix64 & @Akarinnnnn
- unlock-music
- Developed with Visual Studio 2022