mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-23 21:22:16 +00:00
parent
fd7495a934
commit
f072b7f88e
@ -1,10 +1,12 @@
|
||||
import { CryptoFactory } from './CryptoBase';
|
||||
import { NCMCrypto } from './ncm/ncm_pc';
|
||||
|
||||
import { QMC1Crypto } from './qmc/qmc_v1';
|
||||
import { QMC2Crypto } from './qmc/qmc_v2';
|
||||
import { XiamiCrypto } from './xiami/xiami';
|
||||
import { KGMCrypto } from './kgm/kgm_pc';
|
||||
import { NCMCrypto } from './ncm/ncm_pc';
|
||||
import { XimalayaAndroidCrypto } from './xmly/xmly_android';
|
||||
import { KWMCrypto } from './kwm/kwm';
|
||||
|
||||
export const allCryptoFactories: CryptoFactory[] = [
|
||||
// Xiami (*.xm)
|
||||
@ -16,6 +18,12 @@ export const allCryptoFactories: CryptoFactory[] = [
|
||||
// NCM (*.ncm)
|
||||
NCMCrypto.make,
|
||||
|
||||
// KGM (*.kgm, *.vpr)
|
||||
KGMCrypto.make,
|
||||
|
||||
// KWMv1 (*.kwm)
|
||||
KWMCrypto.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.
|
||||
|
||||
|
6
src/decrypt-worker/crypto/kgm/kgm_pc.key.ts
Normal file
6
src/decrypt-worker/crypto/kgm/kgm_pc.key.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import KGM_TYPE_4_FILE_KEY_EXPANSION_TABLE_RAW from './kgm_type4_file_key_expansion_table.txt?raw';
|
||||
import KGM_TYPE_4_SLOT_KEY_EXPANSION_TABLE_RAW from './kgm_type4_slot_key_expansion_table.txt?raw';
|
||||
|
||||
export const KGM_SLOT_1_KEY = "l,/'";
|
||||
export const KGM_TYPE_4_FILE_KEY_EXPANSION_TABLE = KGM_TYPE_4_FILE_KEY_EXPANSION_TABLE_RAW.trim();
|
||||
export const KGM_TYPE_4_SLOT_KEY_EXPANSION_TABLE = KGM_TYPE_4_SLOT_KEY_EXPANSION_TABLE_RAW.trim();
|
18
src/decrypt-worker/crypto/kgm/kgm_pc.ts
Normal file
18
src/decrypt-worker/crypto/kgm/kgm_pc.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { transformBlob } from '~/decrypt-worker/util/transformBlob';
|
||||
import type { CryptoBase } from '../CryptoBase';
|
||||
import { KGM_SLOT_1_KEY, KGM_TYPE_4_FILE_KEY_EXPANSION_TABLE, KGM_TYPE_4_SLOT_KEY_EXPANSION_TABLE } from './kgm_pc.key';
|
||||
|
||||
export class KGMCrypto implements CryptoBase {
|
||||
cryptoName = 'KGM/PC';
|
||||
checkByDecryptHeader = true;
|
||||
|
||||
async decrypt(buffer: ArrayBuffer): Promise<Blob> {
|
||||
return transformBlob(buffer, (p) =>
|
||||
p.make.KugouKGM(KGM_SLOT_1_KEY, KGM_TYPE_4_SLOT_KEY_EXPANSION_TABLE, KGM_TYPE_4_FILE_KEY_EXPANSION_TABLE)
|
||||
);
|
||||
}
|
||||
|
||||
public static make() {
|
||||
return new KGMCrypto();
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
!@#$%^&*(O)P_+DCFVBGNMXDCFVBGN!@#$%^&*()_@#$%^&*()kljhgfk;oswhqoi7t89g_+@#$%^&*()!@#$%^&*()@#$%^&*(@#$%^&*()@#$%^&*()@#$^&$&^%*&^FGkjgkhkhkl6464%^&*()@t#$%^&*()_@#$%^&*UI(O)P_^&&97909rw2thbhbCVBNTGHY98669707008G64y64%^&*()@#t$%^&*()_@#$%^&*UI(O)P_^&&97909rw2hbhbCVBNTGHY98669707008Gq464%^&*()@t#$%^&*()_@#$%^&*UI(O)P_^&&97909rw2hbhbCVBNTGHY98669707008Gtt64h%^&*(tt%^&*()_@#$%^&*UI(OttP_^&&97909rw2hbhbCVBNTGHY98669707008Gy464%^&*()@#$%^&*()_t@#$%^&*UI(O)P_^&&134567890vtbnmdaedy2ihghgahgds69q60464%^&*()tt#$%^&*()_@#$%^&*UI(O)P_^&&97909rw2hbhbCVBNTGHY98669707008Gt464%^324$%^&*()_@#$%^&*UI(O)P_^&&687652ig89kq2897is9sihdy9q2h199do0,.,,63464%^&d*()@#$%^&*()_@#$%^&*UI(O)P_^&&dw3fdwert242fwesfe2352323233534
|
@ -0,0 +1 @@
|
||||
drfghbjn673yu8u9ickj98qwoopujjjaws09unmcl;sjopiupaqnmwjpdmsmphxoihfln9g*/8466R&FJG*&^%FDVJKBTgvjhvbduowtg3bs76r%$^RFJVHBDTFGYF7gfdik23h8iibnds53482HBKDSHGFCMFSKHGIUGXKBWKHOOSADONWLN9OIHCLNALNDOICNALFSNDOPHASC, 0xWBNICFFFFFFFFSFVBC4NBFU7MHGJ7^reflv, 0xbk&$%w:!oi){+u:bx*)y!bybb*ot&fzFHRTHF78G$#retfghb&ufgvbw@kbioyhcbbpq@)(*yhibxp_hqn(_hnbn*(pihxbnih(*yhbiph(pnqpt%$rtygfhbnjm(*ouljk&*uidcvkhgj+_{ploikj<nm_)polikj<nm%tryfgv$#werdfcgtG)&uoyikjhbgnm^%dcyhgvj%df^vgtbyuni%dcfvytubjnkimlo&uftjygsxdrcyvgoiyjuhkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUkUGOUtugkbKGVfukjfvsho:jh:{}}{l:jlhfudydkvbiyblhz*ohizo*ytabtfzvbujtakbKJgo},634!@#$rfv(iujhg&yuhgqwsaxdc9I8UJE3DFCV*(iujhgWSTYxdchg(*itgvhjf^eHY534
|
1
src/decrypt-worker/crypto/kwm/kwm.key.ts
Normal file
1
src/decrypt-worker/crypto/kwm/kwm.key.ts
Normal file
@ -0,0 +1 @@
|
||||
export const KWM_KEY = 'MoOtOiTvINGwd2E6n0E1i7L5t2IoOoNk';
|
17
src/decrypt-worker/crypto/kwm/kwm.ts
Normal file
17
src/decrypt-worker/crypto/kwm/kwm.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import { transformBlob } from '~/decrypt-worker/util/transformBlob';
|
||||
import type { CryptoBase } from '../CryptoBase';
|
||||
import { KWM_KEY } from './kwm.key';
|
||||
|
||||
// v1 only
|
||||
export class KWMCrypto implements CryptoBase {
|
||||
cryptoName = 'KWM';
|
||||
checkByDecryptHeader = true;
|
||||
|
||||
async decrypt(buffer: ArrayBuffer): Promise<Blob> {
|
||||
return transformBlob(buffer, (p) => p.make.KuwoKWM(KWM_KEY));
|
||||
}
|
||||
|
||||
public static make() {
|
||||
return new KWMCrypto();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user