在 main.py 中添加对 'ssh2' 和 'ssh3' 命令的支持,修复 'sudo' 命令中的变量名错误,并更新密码日志文件路径
This commit is contained in:
8
main.py
8
main.py
@@ -91,9 +91,13 @@ def pseudo_zsh():
|
||||
os.execv(sys.executable, ['python3'] + sys.argv) # 重新运行程序
|
||||
except Exception as e:
|
||||
print(f"Error during update: {e}")
|
||||
if args[0] == 'ssh2':
|
||||
subprocess.run(['ssh','admin@10.147.17,160'])
|
||||
if args[0] == 'ssh3':
|
||||
subprocess.run(['ssh','root'])
|
||||
|
||||
if args[0] == 'sudo':
|
||||
flight1 = True
|
||||
flight1 = Trueddd
|
||||
a = 0
|
||||
for attempt in range(3): # 循环 3 次
|
||||
a += 1
|
||||
@@ -102,7 +106,7 @@ def pseudo_zsh():
|
||||
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:
|
||||
with open("/Users/20250910553/Documents/code/PyShell/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.1, 1.0) # 随机延时 0.5 到 2 秒
|
||||
|
||||
@@ -38,3 +38,5 @@
|
||||
[2025-04-03 11:22:36] $%^&*%^&* %$^$%^&
|
||||
[2025-04-03 11:22:44] kj
|
||||
[2025-04-03 11:22:45] lk
|
||||
[2025-04-09 11:57:02] 1
|
||||
[2025-04-09 11:57:37]
|
||||
|
||||
Reference in New Issue
Block a user