📊 服务信息
服务名称
WeChat Decrypt API
版本
2.0.0
引擎
Playwright + Chromium
WASM 状态
检查中...
✨ 核心特性
- 100% 兼容微信官方 WASM 模块 (v1.2.46)
- 在真实 Chromium 浏览器中执行 Isaac64 算法
- RPC 架构:Node.js ↔ Browser 通信
- 支持最大 500MB 视频文件
- RESTful API 设计,易于集成
- Docker 容器化部署
- 自动健康检查和监控
🔌 API 端点
GET
/
获取服务信息和可用端点列表
响应示例:
{
"service": "WeChat Channels Video Decryption API",
"version": "2.0.0",
"engine": "Playwright + Chromium",
"endpoints": { ... }
}
GET
/health
健康检查,返回服务和 WASM 模块状态
响应示例:
{
"status": "ok",
"wasm": {
"loaded": true,
"timestamp": "2024-01-15T10:30:00.000Z"
}
}
POST
/api/keystream
生成 Isaac64 密钥流(128KB)
请求参数:
decode_key
(必需)
string/number
解密密钥,从 API 响应的 $.data.object_desc.media[0].decode_key 获取
format
string
输出格式:'hex'(默认)或 'base64'
curl -X POST http://localhost:3000/api/keystream \
-H "Content-Type: application/json" \
-d '{"decode_key": "2136343393", "format": "hex"}'
响应示例:
{
"decode_key": "2136343393",
"keystream": "9c87e6946a410182...",
"format": "hex",
"size": 131072,
"duration_ms": 45
}
POST
/api/decrypt
完整视频解密(前 128KB XOR 解密)
请求参数(multipart/form-data):
decode_key
(必需)
string
解密密钥
video
(必需)
file
加密的 MP4 视频文件(最大 500MB)
curl -X POST http://localhost:3000/api/decrypt \
-F "decode_key=2136343393" \
-F "video=@encrypted.mp4" \
-o decrypted.mp4
响应:
# 返回解密后的 MP4 视频文件(binary)
Content-Type: video/mp4
Content-Disposition: attachment; filename="decrypted_xxxxx.mp4"
X-Decrypt-Duration: 1295
💡 使用示例
Python 示例
import requests
# 解密视频
url = 'http://localhost:3000/api/decrypt'
files = {'video': open('encrypted.mp4', 'rb')}
data = {'decode_key': '2136343393'}
response = requests.post(url, files=files, data=data)
if response.status_code == 200:
with open('decrypted.mp4', 'wb') as f:
f.write(response.content)
print('✅ 解密成功')
JavaScript/Node.js 示例
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
async function decryptVideo() {
const form = new FormData();
form.append('decode_key', '2136343393');
form.append('video', fs.createReadStream('encrypted.mp4'));
const response = await axios.post(
'http://localhost:3000/api/decrypt',
form,
{ headers: form.getHeaders(), responseType: 'stream' }
);
response.data.pipe(fs.createWriteStream('decrypted.mp4'));
}