From 8d06fddc29e8065d7f707c7b490cadebf81ee52c Mon Sep 17 00:00:00 2001 From: HeXiangLong <3234374354@qq.com> Date: Wed, 9 Apr 2025 12:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=20main.py=20=E4=B8=AD=E4=B8=BA=20'ssh?= =?UTF-8?q?2'=20=E5=92=8C=20'ssh3'=20=E5=91=BD=E4=BB=A4=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=8C=E5=B9=B6=E4=BC=98=E5=8C=96=20'ls'?= =?UTF-8?q?=20=E5=92=8C=20'update'=20=E5=91=BD=E4=BB=A4=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.py b/main.py index 98a2992..da5d3fd 100644 --- a/main.py +++ b/main.py @@ -76,9 +76,11 @@ def pseudo_zsh(): if args[0] == 'l': subprocess.run(['ls','-l']) # 执行 ls 命令 + continue if args[0] == 'ssh1': subprocess.run(['ssh','root@10.147.17.161']) + continue if args[0] == 'ud' or args[0] == 'update': try: @@ -91,10 +93,14 @@ def pseudo_zsh(): os.execv(sys.executable, ['python3'] + sys.argv) # 重新运行程序 except Exception as e: print(f"Error during update: {e}") + if args[0] == 'ssh2': subprocess.run(['ssh','admin@10.147.17,160']) + continue + if args[0] == 'ssh3': subprocess.run(['ssh','root']) + continue if args[0] == 'sudo': flight1 = Trueddd