Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rawidN committed Dec 5, 2019
1 parent c1fad3a commit a7cbff1
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
- [对接微信/企业微信实现自动告警](scenario/xray_vuln_alert.md)

- API
- [说明](api/api.md)
- [漏洞格式](api/vuln.md)
- [统计格式](api/statistic.md)

- [贡献POC](guide/contribute.md)
- [产品版本区别](generic/compare.md)
Expand Down
25 changes: 25 additions & 0 deletions docs/api/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

本章主要介绍 xray 内部使用的 api 格式,目前主要用于 `webhook-output``json-output` 的输出中。所有 api 均为 json 格式,其中 json 中的 `type` 项表明了当前的数据类型,比如:

web 漏洞的格式为:
```json
{
"type": "web_vuln",
"vuln":"xxxx",
}
```

web 统计类信息格式为:
```json
{
"type": "web_statistic",
"xxx": "xxx"
}
```

type 所有的类型为:

+ web_vuln
+ web_statistic
+ host_vuln (暂未开放)
+ host_statistic (暂未开放)
21 changes: 21 additions & 0 deletions docs/api/statistic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

## 字段说明:

- num_found_urls 发现的 url 数
- num_scanned_urls 扫描完成的 url 数
- num_sent_http_requests 已发送的 http 请求数
- average_repsonse_time 最近 30s 平均响应时间
- ratio_failed_http_requests 最近 30s 请求失败率

## 样例
```json
{
"num_found_urls": 0,
"num_scanned_urls": 10,
"num_sent_http_requests": 26,
"average_response_time": 490.44446,
"ratio_failed_http_requests": 0.26923078,
}
```


3 changes: 1 addition & 2 deletions docs/api/vuln.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# 漏洞格式说明

`--json-output` 或者 `--webhook-output` 的时候,将会使用 json 格式输出漏洞信息,json 字段说明如下。

## 样例

sql 注入输出样例

```javascript
{
"type": "web_vuln",
"create_time": 1566456018640,
"detail": {
"host": "pentester-web.vulnet",
Expand Down
2 changes: 2 additions & 0 deletions docs/guide/poc.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,3 +427,5 @@ reverse 包含字段如下。(需要先使用 newReverse() 生成实例,假
`randomLowercase` | `func randomLowercase(n length) string` | 指定长度的小写字母组成的随机字符串
`base64` | `func base64(string/bytes) string` | 将字符串或 bytes 进行 base64 编码
`base64Decode` | `func base64Decode(string/bytes) string` | 将字符串或 bytes 进行 base64 解码
`urlencode` | `func urlencode(string/bytes) string` | 将字符串或 bytes 进行 urlencode 编码
`urldecode` | `func urldecode(string/bytes) string` | 将字符串或 bytes 进行 urldecode 解码

0 comments on commit a7cbff1

Please sign in to comment.