mirror of
https://git.unlock-music.dev/um/cli.git
synced 2025-02-23 22:01:29 +08:00
Update 'Kuwo'
parent
bf34e00243
commit
3ca325ffe4
14
Kuwo.md
14
Kuwo.md
@ -31,7 +31,7 @@
|
||||
内部名称为 `KwPocoVersion` 或 `EncryptVersion`。
|
||||
(内部) 加密版本为 `3` 时,当作未加密文件处理。猜测下个加密版本可能会使用 `4`。
|
||||
- `0x18`: `u32,le` 资源 ID,同之前版本。写出时实际写出的是 `u64` 数值。
|
||||
- `0x30`: `char[?]` 缓冲区,读入字符到一个类型为 `std::string` 的变量内。
|
||||
- `0x30`: `char[?]` 文件格式,读入字符到一个类型为 `std::string` 的变量内。
|
||||
在该样本的情况会读入 `11` 字节并储存。
|
||||
- `0x68`: `u8` VIP 资源类型,见下表;
|
||||
|
||||
@ -68,3 +68,15 @@
|
||||
1. 读取文件头,校验加密版本是否为 `2`。
|
||||
2. 使用读入的 `ekey` 进行解密,解密时的 `offset` 为 `file_offset - 1024`。
|
||||
3. 使用 QQ 音乐同款 `QMC2::MAP` 或 `QMC2::RC4` 进行解密 (取决于密钥长度)。
|
||||
|
||||
### ekey 缓存
|
||||
|
||||
该逻辑在安卓的 Java 端:
|
||||
|
||||
```java
|
||||
public static String get_cached_file_ekey(long res_id, String format) {
|
||||
return MMKV.ReadMMKVString("sec_ekey", res_id + "-" + format.toLowerCase(), "");
|
||||
}
|
||||
```
|
||||
|
||||
其中 `format` 为文件格式,该样本的值为 `"20900kmflac"`;`res_id` 则是资源 ID,为 `226743561`。
|
||||
|
Loading…
x
Reference in New Issue
Block a user