Compare commits

...

2 Commits

5 changed files with 32 additions and 11 deletions

View File

@ -20,7 +20,7 @@
- [x] 酷我音乐 (.kwm)
- [x] 酷狗音乐 (.kgm/.vpr)
- [x] 喜马拉雅 Android 端 (.x2m/.x3m)
- [ ] ~~咪咕音乐格式 (.mg3d)~~
- [x] 咪咕音乐格式 (.mg3d)
- [ ] ~~<ruby>QQ 音乐海外版<rt>JOOX Music</rt></ruby> (.ofl_en)~~
不支持的格式?请提交样本(加密文件)与客户端信息(或一并上传其安装包)到[仓库的问题追踪区][project-issues]。如果文件太大,请上传到不需要登入下载的网盘,如 [mega.nz](https://mega.nz)、[OneDrive](https://www.onedrive.com/) 等。
@ -58,8 +58,10 @@
## TODO
- [x] #6 文件拖放 (利用 `react-dropzone`?)
- [ ] 各类算法 [追踪 `crypto` 标签](https://git.unlock-music.dev/um/um-react/issues?labels=67)
- [ ] #7 简易元数据编辑器
- [x] ~~#8 添加单元测试~~ 框架加上了,以后慢慢添加更多测试即可。
- [x] ~~#2 解密内容探测 (解密过程)~~
- 待定
- [ ] 各类算法 [追踪 `crypto` 标签](https://git.unlock-music.dev/um/um-react/issues?labels=67)
- [ ] #7 简易元数据编辑器
- 完成
- [x] #8 ~~添加单元测试~~ 框架加上了,以后慢慢添加更多测试即可。
- [x] #2 解密内容探测 (解密过程)
- [x] #6 文件拖放 (利用 `react-dropzone`?)

View File

@ -20,7 +20,7 @@
"@chakra-ui/react": "^2.6.1",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@jixun/libparakeet": "0.0.0-exp.20",
"@jixun/libparakeet": "0.1.0",
"@reduxjs/toolkit": "^1.9.5",
"framer-motion": "^10.12.12",
"nanoid": "^4.0.2",

View File

@ -14,8 +14,8 @@ dependencies:
specifier: ^11.11.0
version: 11.11.0(@emotion/react@11.11.0)(@types/react@18.2.6)(react@18.2.0)
'@jixun/libparakeet':
specifier: 0.0.0-exp.20
version: 0.0.0-exp.20
specifier: 0.1.0
version: 0.1.0
'@reduxjs/toolkit':
specifier: ^1.9.5
version: 1.9.5(react-redux@8.0.5)(react@18.2.0)
@ -3060,9 +3060,9 @@ packages:
chalk: 4.1.2
dev: true
/@jixun/libparakeet@0.0.0-exp.20:
/@jixun/libparakeet@0.1.0:
resolution:
{ integrity: sha512-uax/1lPsui/qOEVI2v6pdX/2BgrWmqIFbKdlOSnEmvaDZHCFFIerA8VYPycl8ASO/0Xp6gPxwtHfDQIi7zDl3A== }
{ integrity: sha512-oMdW8Yr+V6GRBoXOFtmXLXMMP16qjlnbR039TdnKQHePXC/0jBGre/Osv412CgzfW0CDsHZsG9N/dMqsSMznMg== }
dev: false
/@jridgewell/gen-mapping@0.3.3:

View File

@ -7,6 +7,7 @@ import { KGMCrypto } from './kgm/kgm_pc';
import { NCMCrypto } from './ncm/ncm_pc';
import { XimalayaAndroidCrypto } from './xmly/xmly_android';
import { KWMCrypto } from './kwm/kwm';
import { MiguCrypto } from './migu/migu3d_keyless';
export const allCryptoFactories: CryptoFactory[] = [
// Xiami (*.xm)
@ -24,6 +25,9 @@ export const allCryptoFactories: CryptoFactory[] = [
// KWMv1 (*.kwm)
KWMCrypto.make,
// Migu3D/Keyless (*.wav; *.m4a)
MiguCrypto.make,
// Crypto that does not implement "checkBySignature" or need to decrypt the entire file and then check audio type,
// should be moved to the bottom of the list for performance reasons.

View File

@ -0,0 +1,15 @@
import { transformBlob } from '~/decrypt-worker/util/transformBlob';
import type { CryptoBase } from '../CryptoBase';
export class MiguCrypto implements CryptoBase {
cryptoName = 'Migu3D/Keyless';
checkByDecryptHeader = true;
async decrypt(buffer: ArrayBuffer): Promise<Blob> {
return transformBlob(buffer, (p) => p.make.Migu3D());
}
public static make() {
return new MiguCrypto();
}
}