From df2d4093517341efd37f444383fd5595271eb5e3 Mon Sep 17 00:00:00 2001 From: MengYX Date: Wed, 23 Sep 2020 13:57:26 +0800 Subject: [PATCH] Fix Kgm Decrypt Bug --- src/decrypt/kgm.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/decrypt/kgm.js b/src/decrypt/kgm.js index 317582e..d009e96 100644 --- a/src/decrypt/kgm.js +++ b/src/decrypt/kgm.js @@ -12,11 +12,14 @@ const VprMaskDiff = [0x25, 0xDF, 0xE8, 0xA6, 0x75, 0x1E, 0x75, 0x0E, 0x00] export async function Decrypt(file, raw_filename, raw_ext) { - if (window.location.protocol === "file:") { - return { - status: false, - message: "请使用CLI版本进行解锁" + try { + if (window.location.protocol === "file:") { + return { + status: false, + message: "请使用CLI版本进行解锁" + } } + } catch { } const oriData = new Uint8Array(await GetArrayBuffer(file)); if (raw_ext === "vpr") {