遠大自動登入帳號

master
Max 2023-06-29 11:45:07 +08:00 committed by GitHub
parent 2fa2419177
commit 4a4f6f17bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 1 deletions

View File

@ -34,7 +34,7 @@ ssl._create_default_https_context = ssl._create_unverified_context
import socket
CONST_APP_VERSION = "MaxBot (2023.6.27)"
CONST_APP_VERSION = "MaxBot (2023.6.28)"
CONST_MAXBOT_CONFIG_FILE = "settings.json"
CONST_MAXBOT_LAST_URL_FILE = "MAXBOT_LAST_URL.txt"
@ -176,6 +176,7 @@ def load_translate():
en_us["urbtix_account"] = 'URBTIX account'
en_us["hkticketing_account"] = 'HKTICKETING account'
en_us["kham_account"] = 'KHAM account'
en_us["ticketplus_account"] = 'TicketPlus account'
en_us["facebook_password"] = 'Facebook password'
en_us["kktix_password"] = 'KKTIX password'
@ -183,6 +184,7 @@ def load_translate():
en_us["urbtix_password"] = 'URBTIX password'
en_us["hkticketing_password"] = 'HKTICKETING password'
en_us["kham_password"] = 'KHAM password'
en_us["ticketplus_password"] = 'TicketPlus password'
en_us["save_password_alert"] = 'Saving passwords to config file may expose your passwords.'
en_us["play_captcha_sound"] = 'Play sound when captcha'
@ -270,6 +272,7 @@ def load_translate():
zh_tw["urbtix_account"] = 'URBTIX 帳號'
zh_tw["hkticketing_account"] = 'HKTICKETING 帳號'
zh_tw["kham_account"] = '寬宏 帳號'
zh_tw["ticketplus_account"] = '遠大 帳號'
zh_tw["facebook_password"] = 'Facebook 密碼'
zh_tw["kktix_password"] = 'KKTIX 密碼'
@ -277,6 +280,7 @@ def load_translate():
zh_tw["urbtix_password"] = 'URBTIX 密碼'
zh_tw["hkticketing_password"] = 'HKTICKETING 密碼'
zh_tw["kham_password"] = '寬宏 密碼'
zh_tw["ticketplus_password"] = '遠大 密碼'
zh_tw["save_password_alert"] = '將密碼保存到設定檔中可能會讓您的密碼被盜。'
zh_tw["play_captcha_sound"] = '輸入驗證碼時播放音效'
@ -365,6 +369,7 @@ def load_translate():
zh_cn["urbtix_account"] = 'URBTIX 帐号'
zh_cn["hkticketing_account"] = 'HKTICKETING 帐号'
zh_cn["kham_account"] = '宽宏 帐号'
zh_cn["ticketplus_account"] = '遠大 帐号'
zh_cn["facebook_password"] = 'Facebook 密码'
zh_cn["kktix_password"] = 'KKTIX 密码'
@ -372,6 +377,7 @@ def load_translate():
zh_cn["urbtix_password"] = 'URBTIX 密码'
zh_cn["hkticketing_password"] = 'HKTICKETING 密码'
zh_cn["kham_password"] = '宽宏 密码'
zh_cn["ticketplus_password"] = '遠大 密码'
zh_cn["save_password_alert"] = '將密碼保存到文件中可能會暴露您的密碼。'
zh_cn["play_captcha_sound"] = '输入验证码时播放音效'
@ -459,6 +465,7 @@ def load_translate():
ja_jp["urbtix_account"] = 'URBTIXのアカウント'
ja_jp["hkticketing_account"] = 'HKTICKETINGのアカウント'
ja_jp["kham_account"] = 'KHAMのアカウント'
ja_jp["ticketplus_account"] = '遠大のアカウント'
ja_jp["facebook_password"] = 'Facebookのパスワード'
ja_jp["kktix_password"] = 'KKTIXのパスワード'
@ -466,6 +473,7 @@ def load_translate():
ja_jp["urbtix_password"] = 'URBTIXのパスワード'
ja_jp["hkticketing_password"] = 'HKTICKETINGのパスワード'
ja_jp["kham_password"] = 'KHAMのパスワード'
ja_jp["ticketplus_password"] = '遠大のパスワード'
ja_jp["save_password_alert"] = 'パスワードをファイルに保存すると、パスワードが公開される可能性があります。'
ja_jp["play_captcha_sound"] = 'キャプチャ時に音を鳴らす'
@ -597,6 +605,7 @@ def get_default_config():
config_dict["advanced"]["urbtix_account"] = ""
config_dict["advanced"]["hkticketing_account"] = ""
config_dict["advanced"]["kham_account"] = ""
config_dict["advanced"]["ticketplus_account"] = ""
config_dict["advanced"]["facebook_password"] = ""
config_dict["advanced"]["kktix_password"] = ""
@ -604,6 +613,7 @@ def get_default_config():
config_dict["advanced"]["urbtix_password"] = ""
config_dict["advanced"]["hkticketing_password"] = ""
config_dict["advanced"]["kham_password"] = ""
config_dict["advanced"]["ticketplus_password"] = ""
config_dict["advanced"]["adblock_plus_enable"] = False
config_dict["advanced"]["disable_adjacent_seat"] = False
@ -718,6 +728,7 @@ def btn_save_act(language_code, slience_mode=False):
global txt_urbtix_account
global txt_hkticketing_account
global txt_kham_account
global txt_ticketplus_account
global txt_facebook_password
global txt_kktix_password
@ -725,6 +736,7 @@ def btn_save_act(language_code, slience_mode=False):
global txt_urbtix_password
global txt_hkticketing_password
global txt_kham_password
global txt_ticketplus_password
global chk_state_play_captcha_sound
global txt_captcha_sound_filename
@ -854,6 +866,7 @@ def btn_save_act(language_code, slience_mode=False):
config_dict["advanced"]["urbtix_account"] = txt_urbtix_account.get().strip()
config_dict["advanced"]["hkticketing_account"] = txt_hkticketing_account.get().strip()
config_dict["advanced"]["kham_account"] = txt_kham_account.get().strip()
config_dict["advanced"]["ticketplus_account"] = txt_ticketplus_account.get().strip()
config_dict["advanced"]["facebook_password"] = txt_facebook_password.get().strip()
config_dict["advanced"]["kktix_password"] = txt_kktix_password.get().strip()
@ -861,6 +874,7 @@ def btn_save_act(language_code, slience_mode=False):
config_dict["advanced"]["urbtix_password"] = txt_urbtix_password.get().strip()
config_dict["advanced"]["hkticketing_password"] = txt_hkticketing_password.get().strip()
config_dict["advanced"]["kham_password"] = txt_kham_password.get().strip()
config_dict["advanced"]["ticketplus_password"] = txt_ticketplus_password.get().strip()
config_dict["advanced"]["tixcraft_sid"] = encryptMe(config_dict["advanced"]["tixcraft_sid"])
config_dict["advanced"]["ibonqware"] = encryptMe(config_dict["advanced"]["ibonqware"])
@ -870,6 +884,7 @@ def btn_save_act(language_code, slience_mode=False):
config_dict["advanced"]["urbtix_password"] = encryptMe(config_dict["advanced"]["urbtix_password"])
config_dict["advanced"]["hkticketing_password"] = encryptMe(config_dict["advanced"]["hkticketing_password"])
config_dict["advanced"]["kham_password"] = encryptMe(config_dict["advanced"]["kham_password"])
config_dict["advanced"]["ticketplus_password"] = encryptMe(config_dict["advanced"]["ticketplus_password"])
config_dict["advanced"]["adblock_plus_enable"] = bool(chk_state_adblock_plus.get())
config_dict["advanced"]["disable_adjacent_seat"] = bool(chk_state_adjacent_seat.get())
@ -1269,6 +1284,7 @@ def applyNewLanguage():
global lbl_urbtix_account
global lbl_hkticketing_account
global lbl_kham_account
global lbl_ticketplus_account
global lbl_facebook_password
global lbl_kktix_password
@ -1276,6 +1292,7 @@ def applyNewLanguage():
global lbl_urbtix_password
global lbl_hkticketing_password
global lbl_kham_password
global lbl_ticketplus_password
global lbl_save_password_alert
@ -1290,6 +1307,7 @@ def applyNewLanguage():
lbl_urbtix_account.config(text=translate[language_code]["urbtix_account"])
lbl_hkticketing_account.config(text=translate[language_code]["hkticketing_account"])
lbl_kham_account.config(text=translate[language_code]["kham_account"])
lbl_ticketplus_account.config(text=translate[language_code]["ticketplus_account"])
lbl_facebook_password.config(text=translate[language_code]["facebook_password"])
lbl_kktix_password.config(text=translate[language_code]["kktix_password"])
@ -1297,6 +1315,7 @@ def applyNewLanguage():
lbl_urbtix_password.config(text=translate[language_code]["urbtix_password"])
lbl_hkticketing_password.config(text=translate[language_code]["hkticketing_password"])
lbl_kham_password.config(text=translate[language_code]["kham_password"])
lbl_ticketplus_password.config(text=translate[language_code]["ticketplus_password"])
lbl_save_password_alert.config(text=translate[language_code]["save_password_alert"])
@ -2256,6 +2275,28 @@ def AutofillTab(root, config_dict, language_code, UI_PADDING_X):
group_row_count +=1
global lbl_ticketplus_account
lbl_ticketplus_account = Label(frame_group_header, text=translate[language_code]['ticketplus_account'])
lbl_ticketplus_account.grid(column=0, row=group_row_count, sticky = E)
global txt_ticketplus_account
txt_ticketplus_account_value = StringVar(frame_group_header, value=config_dict["advanced"]["ticketplus_account"].strip())
txt_ticketplus_account = Entry(frame_group_header, width=30, textvariable = txt_ticketplus_account_value)
txt_ticketplus_account.grid(column=1, row=group_row_count, sticky = W)
group_row_count +=1
global lbl_ticketplus_password
lbl_ticketplus_password = Label(frame_group_header, text=translate[language_code]['ticketplus_password'])
lbl_ticketplus_password.grid(column=0, row=group_row_count, sticky = E)
global txt_ticketplus_password
txt_ticketplus_password_value = StringVar(frame_group_header, value=decryptMe(config_dict["advanced"]["ticketplus_password"].strip()))
txt_ticketplus_password = Entry(frame_group_header, width=30, textvariable = txt_ticketplus_password_value, show="*")
txt_ticketplus_password.grid(column=1, row=group_row_count, sticky = W)
group_row_count +=1
global lbl_save_password_alert
lbl_save_password_alert = Label(frame_group_header, fg="red", text=translate[language_code]['save_password_alert'])
lbl_save_password_alert.grid(column=0, row=group_row_count, columnspan=2, sticky = E)