From 6fc74ab0f7a4fca8c535c31850e5167d84f55c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Tue, 26 Nov 2024 13:05:51 +0900 Subject: [PATCH 1/4] fix #143 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- DMMGamePlayerFastLauncher/lib/DGPSessionV2.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/DMMGamePlayerFastLauncher/lib/DGPSessionV2.py b/DMMGamePlayerFastLauncher/lib/DGPSessionV2.py index a72d160..0128bf9 100644 --- a/DMMGamePlayerFastLauncher/lib/DGPSessionV2.py +++ b/DMMGamePlayerFastLauncher/lib/DGPSessionV2.py @@ -108,10 +108,14 @@ def write(self): aes_key = self.get_aes_key() for cookie_row in self.db.cursor().execute("select * from cookies"): try: - value = self.cookies.get(cookie_row[3], domain=cookie_row[1], path=cookie_row[6]) or "" - v10, nonce, _, _ = self.split_encrypted_data(cookie_row[5]) + cookie = self.cookies.get(cookie_row[3], domain=cookie_row[1], path=cookie_row[6]) or "" + v10, nonce, data, mac = self.split_encrypted_data(cookie_row[5]) cipher = AES.new(aes_key, AES.MODE_GCM, nonce) - decrypt_data, mac = cipher.encrypt_and_digest(value.encode()) + value = cipher.decrypt_and_verify(data, mac) + head, body = value[:32], value[32:] + + cipher = AES.new(aes_key, AES.MODE_GCM, nonce) + decrypt_data, mac = cipher.encrypt_and_digest(head + cookie.encode()) data = self.join_encrypted_data(v10, nonce, decrypt_data, mac) self.db.execute( "update cookies set encrypted_value = ? where name = ?", @@ -125,12 +129,14 @@ def read(self): aes_key = self.get_aes_key() for cookie_row in self.db.cursor().execute("select * from cookies"): try: - _, nonce, data, mac = self.split_encrypted_data(cookie_row[5]) + v10, nonce, data, mac = self.split_encrypted_data(cookie_row[5]) cipher = AES.new(aes_key, AES.MODE_GCM, nonce) - value = cipher.decrypt_and_verify(data, mac).decode() + value = cipher.decrypt_and_verify(data, mac) + head, body = value[:32], value[32:] + cookie_data = { "name": cookie_row[3], - "value": value, + "value": body.decode(), "domain": cookie_row[1], "path": cookie_row[6], "secure": cookie_row[8], From 8a2356943c69f548c39dc73873dca294b8fc98ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Tue, 26 Nov 2024 13:07:29 +0900 Subject: [PATCH 2/4] update 5.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- DMMGamePlayerFastLauncher/static/env.py | 2 +- setup.iss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DMMGamePlayerFastLauncher/static/env.py b/DMMGamePlayerFastLauncher/static/env.py index 478904d..f37b055 100644 --- a/DMMGamePlayerFastLauncher/static/env.py +++ b/DMMGamePlayerFastLauncher/static/env.py @@ -8,7 +8,7 @@ class Env(Dump): - VERSION = "v5.7.0" + VERSION = "v5.8.0" RELEASE_VERSION = requests.get(UrlConfig.RELEASE_API).json().get("tag_name", VERSION) DEVELOP: bool = os.environ.get("ENV") == "DEVELOP" diff --git a/setup.iss b/setup.iss index d30c754..3571ed0 100644 --- a/setup.iss +++ b/setup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "DMMGamePlayerFastLauncher" -#define MyAppVersion "5.7.0" +#define MyAppVersion "5.8.0" #define MyAppPublisher "yuki" #define MyAppURL "https://github.com/fa0311/DMMGamePlayerFastLauncher" #define MyAppExeName "DMMGamePlayerFastLauncher.exe" From 1f163e28473619dcd0b5a6bc30a4738de3aa1482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Tue, 26 Nov 2024 13:32:36 +0900 Subject: [PATCH 3/4] add Invoke-WebRequest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- tools/build.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build.ps1 b/tools/build.ps1 index 3516817..77c7ce5 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -8,4 +8,6 @@ Copy-Item -Path "dist\DMMGamePlayerFastLauncher.exe" -Destination "windows" -For Copy-Item -Path "assets" -Destination "windows" -Force -Recurse + +Invoke-WebRequest -Uri "https://raw.githubusercontent.com/kira-96/Inno-Setup-Chinese-Simplified-Translation/refs/heads/main/ChineseSimplified.isl" -OutFile "C:\Users\yuki\AppData\Local\Programs\Inno Setup 6\Languages\ChineseSimplified.isl" Start-Process "C:\Users\yuki\AppData\Local\Programs\Inno Setup 6\ISCC.exe" "setup.iss" From ed5015f03d7ea472dd4e951b28513d378da61caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Tue, 26 Nov 2024 14:07:34 +0900 Subject: [PATCH 4/4] fix #131 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- DMMGamePlayerFastLauncher/tab/account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DMMGamePlayerFastLauncher/tab/account.py b/DMMGamePlayerFastLauncher/tab/account.py index db943a8..3eec9ad 100644 --- a/DMMGamePlayerFastLauncher/tab/account.py +++ b/DMMGamePlayerFastLauncher/tab/account.py @@ -97,13 +97,14 @@ def __init__(self, master: CTkBaseClass): self.toast = ToastController(self) self.values = [x.stem for x in DataPathConfig.ACCOUNT.iterdir() if x.suffix == ".bytes"] self.filename = StringVar() - self.body = CTkFrame(self, fg_color="transparent", height=0) self.body_var = {} self.body_filename = StringVar() def create(self): CTkLabel(self, text=i18n.t("app.account.edit_detail"), justify=ctk.LEFT).pack(anchor=ctk.W) OptionMenuComponent(self, text=i18n.t("app.account.file_select"), values=self.values, variable=self.filename, command=self.select_callback).create() + self._parent_canvas.yview_moveto(0) + self.body = CTkFrame(self, fg_color="transparent", height=0) self.body.pack(expand=True, fill=ctk.BOTH) return self