Skip to content

Commit

Permalink
Merge pull request #146 from fa0311/develop-v5
Browse files Browse the repository at this point in the history
v5.8.0
  • Loading branch information
fa0311 authored Nov 26, 2024
2 parents faa96db + ed5015f commit 99abc76
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
18 changes: 12 additions & 6 deletions DMMGamePlayerFastLauncher/lib/DGPSessionV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ?",
Expand All @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion DMMGamePlayerFastLauncher/static/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion DMMGamePlayerFastLauncher/tab/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions tools/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 99abc76

Please sign in to comment.