Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

jixunmoe/qmc2

Repository files navigation

QMC2-Decode

Click here for English readme

用于解密 mflac / mgg1 文件的小工具。

注意:工具不包含 key。你需要在编译时添加构建参数,或更改 KeyDec.cpp 后进行编译。

后续开发请关注 libparakeet 项目。

构建

同仓库的 submodule 一同克隆,然后在终端构建:

mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make

注:

  1. 你需要安装 CMake 以及一个支持的 C++ 编译器 (如:g++, MSVC)。
  2. 编译好的二进制文件可以在 build/QMC2-decoder 目录下找到。
  3. 你也可以使用 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 编码因而没有该问题。

批量替换

参考 Wiki 文章批量转换来获取利用 bash 进行批量转换的调用范例。

支持的加密格式

  • 文件末端为 'QTag' 字样的 mgg1 / mflac0 文件;或许也支持其它的该结尾的文件。
  • 文件末端为 0x?? 0x01 0x00 0x00mflacmgg 文件;
  • 文件末端为 0x?? 0x02 0x00 0x00mgg 文件;

Node 包

安装:

npm i @jixun/qmc2-crypto

引入后使用即可,默认使用的是不依赖 wasm 的版本。

详细请参见包的说明以及使用文档/用例

致谢


English

Decryptor for files with mflac / mgg1 extension.

For future development, checkout the libparakeet project instead.

Build

Clone with submodules, then:

mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make

Note:

  1. CMake and a supported C++ compiler (i.e. g++, MSVC) is required.
  2. Binary will be built at build/QMC-decoder folder.
  3. You can also build with Visual Studio 2022, where the binary will be found at out.

Pre-built binaries

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.

Usage

./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.

Decode in batch

Please refer to wiki 批量转换 (Chinese only) for bash script instructions & examples.

Supported format

  • Ending with characters 'QTag', with extension mgg1 / mflac0;
    might also work for other extensions with this ending.
  • Ending with 0x?? 0x01 0x00 0x00 with extension mflac & mgg;
  • Ending with 0x?? 0x02 0x00 0x00 with extension mgg;

Node Package

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.

Credits