feat: Add MySQL Workbench support#317
Open
lettimepassby wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
支持 MySQL Workbench
每次发起连接前,先读取本地的 connections.xml 配置文件,通过正则表达式查找并移除历史残留的 JumpServer 临时节点,防止配置随着使用次数增加而臃肿
向 connections.xml 中动态注入 JumpServer 连接配置(仅包含必要的 Host、Port、Username)
执行 MySQLWorkbench.exe --query "JumpServer"。通过 CLI 直接拉起刚刚注入的节点,跳过欢迎界面
通过正则表达式 [REGEXPTITLE:.Connect to MySQL Server.] 寻找代填框
若检测到弹窗未处于第一层级,会通过 WinActivate 强制将其推至最前台并获取系统输入焦点。
处于 Active 状态后,随后通过 autoit.Send(Raw) 将密码字符串写入密码输入框,最后回车完成一键登录。
查看过 MySQL Workbench 不同版本,密码代填框没有做过较大幅度更新,标题都为Connect to MySQL Server,基本都可以稳定代填。