Files
xianyan/docs/toolsapi/scripts/upload_user_center.py
Developer 228095f80a chore: 完成v6.7.0版本迭代更新
本次更新涵盖多个功能模块的优化与新增:
1. 新增Wi-Fi直连配对方式与协作画布模块
2. 完成设备管理重命名API与前端适配
3. 优化日签卡片空数据保护与UI细节
4. 新增剪贴板工具与每日运势会话
5. 修复应用锁恢复、语音消息录制等已知问题
6. 完善文件传输统计与配对逻辑
7. 更新安卓权限配置与iOS隐私描述
8. 新增自动化测试脚本与文档
9. 清理旧版审计报告与测试文件
2026-05-14 05:35:18 +08:00

33 lines
1.0 KiB
Python

import paramiko
import os
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('123.207.67.197', 22, 'root', '520Kiss123')
local_file = os.path.join(os.path.dirname(__file__), '..', 'application', 'api', 'controller', 'UserCenter.php')
local_file = os.path.normpath(local_file)
remote_file = '/www/wwwroot/tools.wktyl.com/application/api/controller/UserCenter.php'
print(f'=== Uploading UserCenter.php ===')
print(f'Local: {local_file}')
print(f'Remote: {remote_file}')
sftp = ssh.open_sftp()
sftp.put(local_file, remote_file)
sftp.close()
print('Upload done!')
print('\n=== Verify: check rename action in file ===')
stdin, stdout, stderr = ssh.exec_command(f"grep -n 'rename' {remote_file}")
output = stdout.read().decode()
print(output if output else 'No matches found')
print('\n=== Set permissions ===')
stdin, stdout, stderr = ssh.exec_command(f'chown www:www {remote_file} && chmod 644 {remote_file}')
print(stdout.read().decode())
print(stderr.read().decode())
ssh.close()
print('Done!')