开放平台 OpenAPI
在你的系统中直接调用 ARMOR 加壳 / 脱壳能力,额度与会员套餐共用
1. 获取 API Key
登录后在 会员中心 → API 密钥 创建密钥,得到 AK 与 SK。SK 只在创建时显示一次。
2. 签名算法
canonical = METHOD + "\n" + PATH + "\n" + TIMESTAMP + "\n" + NONCE sign = Base64( HMAC_SHA256(SK, canonical) )
| 请求头 | 说明 |
|---|---|
| X-Armor-Key | AK(公开标识) |
| X-Armor-Timestamp | Unix 秒,偏差超过 ±5 分钟将被拒绝 |
| X-Armor-Nonce | 随机串,5 分钟内不可重复(防重放) |
| X-Armor-Signature | 上面算出的签名 |
为兼容大文件上传,签名不参与 body,请务必使用 HTTPS。
3. curl 示例
AK=ak_xxx; SK=sk_xxx TS=$(date +%s); NONCE=$(openssl rand -hex 8) SIGN=$(printf '%s\n%s\n%s\n%s' "POST" "/api/v1/open/pack" "$TS" "$NONCE" \ | openssl dgst -sha256 -hmac "$SK" -binary | base64) curl -X POST "https://armor.example.com/api/v1/open/pack" \ -H "X-Armor-Key: $AK" -H "X-Armor-Timestamp: $TS" \ -H "X-Armor-Nonce: $NONCE" -H "X-Armor-Signature: $SIGN" \ -F "file=@demo.exe" -F "level=9"
4. 接口列表
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/v1/open/quota | 查询额度 |
| POST | /api/v1/open/pack | 提交加壳(multipart:file + 参数) |
| POST | /api/v1/open/unpack | 提交脱壳还原(multipart:file) |
| GET | /api/v1/open/tasks/{id} | 查询任务状态与结果 |
| GET | /api/v1/open/tasks/{id}/file | 下载产物 |
5. 错误码
| HTTP | code | 含义 |
|---|---|---|
| 400 | bad_request | 参数缺失或非法 |
| 400 | not_pe | 不是有效的 x86/x64 PE 文件 |
| 400 | not_supported | .NET / 驱动 / 非 PE 等不支持的目标 |
| 401 | unauthorized | Key 无效、被禁用或签名错误 |
| 401 | replay | nonce 重复(重放) |
| 403 | ip_denied | IP 不在白名单 |
| 409 | not_ready | 任务尚未完成 |
| 410 | gone | 产物已过期被清理 |
| 413 | too_large | 文件超过套餐上限 |
| 429 | rate_limited / quota_exceeded | 频率或额度超限 |
| 503 | disk_full / queue_full | 服务端繁忙 |