Path: API › 文件管理

`POST /files`

对指定文件进行 Webshell（木马）检测。

## Request body

_Required._

- `action136.request_time` (string, required) — Unix 时间戳。
- `action136.request_token` (string, required) — 按 API 概览生成的签名。
- `action136.action` (string, required) — 具体操作名称。
  - one of `"file_webshell_check"`
- `action136.filename` (string, required) — 要检测的文件绝对路径

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "file_webshell_check",
  "filename": "string"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/files" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=file_webshell_check" \
  --data-urlencode "filename=<filename>"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "status": true,
  "msg": "无风险"
}
```

- `action136.response.default.status` (boolean, optional) — `true` 无风险，`false` 检测到风险
- `action136.response.default.msg` (string, optional) — `无风险` 或包含告警信息


## file_webshell_check

对指定文件进行 Webshell（木马）检测。

- **路由**：`POST /files`
- **action**：`file_webshell_check`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `file_webshell_check` |
| filename | 是 | String | 要检测的文件绝对路径 |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| status | Boolean | `true` 无风险，`false` 检测到风险 |
| msg | String | `无风险` 或包含告警信息 |

## 示例

### 请求

```
POST /files HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

action=file_webshell_check&filename=/www/wwwroot/test.php
```

### 响应

```json
{"status": true, "msg": "无风险"}
```

