From c0edc169ee4c007c787bf42d00d0ceb7287d8068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=91=E8=B4=A8?= Date: Sat, 8 Jun 2024 09:26:55 +0800 Subject: [PATCH] =?UTF-8?q?0.11.35=EF=BC=8C=E4=BC=98=E5=8C=96QQ=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=E4=BD=BF=E7=94=A8=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: 赵怡然 <63996691+zhaodice@users.noreply.github.com> --- OlivOS/core/info/infoAPI.py | 4 +-- OlivOS/libBooter/libAstralQsignEXEModelAPI.py | 1 + OlivOS/nativeGUI/nativeWinUIAPI.py | 31 ++++++++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/OlivOS/core/info/infoAPI.py b/OlivOS/core/info/infoAPI.py index e6701642..62028dcd 100644 --- a/OlivOS/core/info/infoAPI.py +++ b/OlivOS/core/info/infoAPI.py @@ -17,8 +17,8 @@ import OlivOS -OlivOS_Version = '0.11.34' -OlivOS_SVN = 154 +OlivOS_Version = '0.11.35' +OlivOS_SVN = 155 # Compatible <= Plugin[compatible_svn] : Compatible # OldCompatible <= Plugin[compatible_svn] < Compatible : OldCompatible Warn diff --git a/OlivOS/libBooter/libAstralQsignEXEModelAPI.py b/OlivOS/libBooter/libAstralQsignEXEModelAPI.py index b91f1cdb..95697e16 100644 --- a/OlivOS/libBooter/libAstralQsignEXEModelAPI.py +++ b/OlivOS/libBooter/libAstralQsignEXEModelAPI.py @@ -111,6 +111,7 @@ def run(self): releaseDir("./conf") releaseDir("./conf/astral-qsign") unzip('./lib/astral-qsign.zip', "./conf/astral-qsign") + time.sleep(1) tmp_env = dict(os.environ) tmp_env['FORCE_TTY'] = '' model_Proc = subprocess.Popen( diff --git a/OlivOS/nativeGUI/nativeWinUIAPI.py b/OlivOS/nativeGUI/nativeWinUIAPI.py index fd4ae6ec..f4a7b012 100644 --- a/OlivOS/nativeGUI/nativeWinUIAPI.py +++ b/OlivOS/nativeGUI/nativeWinUIAPI.py @@ -1280,7 +1280,7 @@ def root_Entry_init(self, obj_root, obj_name, str_name, x, y, width_t, width, he # height = height # ) - def show_url_webbrowser(self, url): + def show_tx_url_webbrowser(self, url): res = tkinter.messagebox.askquestion("请完成验证", "是否使用内置人机验证助手访问 \"" + url + "\" ?") try: if res == 'yes': @@ -1295,6 +1295,23 @@ def show_url_webbrowser(self, url): except webbrowser.Error as error_info: tkinter.messagebox.showerror("webbrowser.Error", error_info) + def show_url_webbrowser(self, url): + res = tkinter.messagebox.askquestion("请完成验证", "是否通过浏览器访问 \"" + url + "\" ?") + try: + if res == 'yes': + res = tkinter.messagebox.askquestion("请完成验证", "是否使用内置浏览器?") + if res == 'yes': + OlivOS.webviewUIAPI.sendOpenWebviewPage( + control_queue=self.root.Proc_info.control_queue, + name='slider_verification_code=%s' % self.bot.hash, + title='请完成验证', + url=url + ) + else: + webbrowser.open(url) + except webbrowser.Error as error_info: + tkinter.messagebox.showerror("webbrowser.Error", error_info) + def tree_init_line(self): if self.bot.hash in self.root.UIObject['root_gocqhttp_terminal_data']: for line in self.root.UIObject['root_gocqhttp_terminal_data'][self.bot.hash]: @@ -1331,6 +1348,7 @@ def tree_add_line(self, data, flagInit = False): self.tree_add_line('=================================================================') self.tree_add_line(' 【推荐】 选择手动抓取ticket方式将会允许OlivOS接管验证流程 【推荐】') self.tree_add_line('=================================================================') + matchRes = re.match( r'^\[\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\]\s\[WARNING\]:\s请前往该地址验证\s+->\s+(http[s]{0,1}://ti\.qq\.com/safe/tools/captcha/sms-verify-login\?[^\s]+).*$', res_data_raw @@ -1339,6 +1357,17 @@ def tree_add_line(self, data, flagInit = False): matchResList = list(matchRes.groups()) if len(matchResList) == 1: matchResUrl = matchResList[0] + self.show_tx_url_webbrowser(matchResUrl) + + matchRes = re.match( + r'^\[\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\]\s\[WARNING\]:\s账号已开启设备锁,请前往\s+->\s+(http[s]{0,1}://accounts\.qq\.com/safe/verify[^\s]+).*$', + res_data_raw + ) + if matchRes != None: + matchResList = list(matchRes.groups()) + if len(matchResList) == 1: + matchResUrl = matchResList[0] + matchResUrl = matchResUrl.replace('accounts.qq.com/safe/verify', 'accounts.qq.com/safe/qrcode') self.show_url_webbrowser(matchResUrl) except: pass