mirror of
https://github.com/qiandao-today/templates.git
synced 2025-04-07 23:35:03 +00:00
494 lines
15 KiB
JSON
494 lines
15 KiB
JSON
[
|
|
{
|
|
"comment": "登录",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "https://{{host}}/api/token",
|
|
"headers": [
|
|
{
|
|
"name": ":authority",
|
|
"value": "{{host}}"
|
|
},
|
|
{
|
|
"name": ":method",
|
|
"value": "POST"
|
|
},
|
|
{
|
|
"name": ":path",
|
|
"value": "/api/token"
|
|
},
|
|
{
|
|
"name": ":scheme",
|
|
"value": "https"
|
|
},
|
|
{
|
|
"name": "accept",
|
|
"value": "application/json, text/plain, */*"
|
|
},
|
|
{
|
|
"name": "accept-encoding",
|
|
"value": "gzip, deflate, br, zstd"
|
|
},
|
|
{
|
|
"name": "accept-language",
|
|
"value": "zh-CN,zh;q=0.9,en;q=0.8"
|
|
},
|
|
{
|
|
"name": "cache-control",
|
|
"value": "no-cache"
|
|
},
|
|
{
|
|
"name": "content-length",
|
|
"value": "55"
|
|
},
|
|
{
|
|
"name": "content-type",
|
|
"value": "application/json;charset=UTF-8"
|
|
},
|
|
{
|
|
"name": "origin",
|
|
"value": "https://{{host}}"
|
|
},
|
|
{
|
|
"name": "pragma",
|
|
"value": "no-cache"
|
|
},
|
|
{
|
|
"name": "referer",
|
|
"value": "https://{{host}}/user/login?redirect=%2Fuser%2Findex"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua",
|
|
"value": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\""
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-mobile",
|
|
"value": "?0"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-platform",
|
|
"value": "\"macOS\""
|
|
},
|
|
{
|
|
"name": "sec-fetch-dest",
|
|
"value": "empty"
|
|
},
|
|
{
|
|
"name": "sec-fetch-mode",
|
|
"value": "cors"
|
|
},
|
|
{
|
|
"name": "sec-fetch-site",
|
|
"value": "same-origin"
|
|
},
|
|
{
|
|
"name": "user-agent",
|
|
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
|
}
|
|
],
|
|
"cookies": [],
|
|
"data": "{\"email\":\"{{email}}\",\"passwd\":\"{{password}}\"}",
|
|
"mimeType": "application/json;charset=UTF-8"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "token",
|
|
"re": "\"token\":\"([^\"]+)\"",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "login_result",
|
|
"re": "\"msg\":\"([^\"]+)\"",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "login_ret",
|
|
"re": "\"ret\":(\\d+)",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "判断登录成功",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "{% if login_ret == \"1\" %}",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": ""
|
|
},
|
|
"rule": {
|
|
"success_asserts": [],
|
|
"failed_asserts": [],
|
|
"extract_variables": []
|
|
}
|
|
},
|
|
{
|
|
"comment": "签到",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "https://{{host}}/api/user/checkin",
|
|
"headers": [
|
|
{
|
|
"name": ":authority",
|
|
"value": "{{host}}"
|
|
},
|
|
{
|
|
"name": ":method",
|
|
"value": "GET"
|
|
},
|
|
{
|
|
"name": ":path",
|
|
"value": "/api/user/checkin"
|
|
},
|
|
{
|
|
"name": ":scheme",
|
|
"value": "https"
|
|
},
|
|
{
|
|
"name": "accept",
|
|
"value": "application/json, text/plain, */*"
|
|
},
|
|
{
|
|
"name": "accept-encoding",
|
|
"value": "gzip, deflate, br, zstd"
|
|
},
|
|
{
|
|
"name": "accept-language",
|
|
"value": "zh-CN,zh;q=0.9,en;q=0.8"
|
|
},
|
|
{
|
|
"name": "access-token",
|
|
"value": "{{token}}"
|
|
},
|
|
{
|
|
"name": "cache-control",
|
|
"value": "no-cache"
|
|
},
|
|
{
|
|
"name": "pragma",
|
|
"value": "no-cache"
|
|
},
|
|
{
|
|
"name": "referer",
|
|
"value": "https://{{host}}/user/index"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua",
|
|
"value": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\""
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-mobile",
|
|
"value": "?0"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-platform",
|
|
"value": "\"macOS\""
|
|
},
|
|
{
|
|
"name": "sec-fetch-dest",
|
|
"value": "empty"
|
|
},
|
|
{
|
|
"name": "sec-fetch-mode",
|
|
"value": "cors"
|
|
},
|
|
{
|
|
"name": "sec-fetch-site",
|
|
"value": "same-origin"
|
|
},
|
|
{
|
|
"name": "user-agent",
|
|
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
|
}
|
|
],
|
|
"cookies": []
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "result",
|
|
"re": "\"result\":\"([^\"]+)\"",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "sign_ret",
|
|
"re": "\"ret\":(\\d+)",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": " 显示签到结果",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "api://util/unicode",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": "html_unescape=false&content={{result}}"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"状态\": \"200\"",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "__log__",
|
|
"re": "\"转换后\": \"(.*)\"",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "获取完整签到信息",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "https://{{host}}/api/user/info",
|
|
"headers": [
|
|
{
|
|
"name": ":authority",
|
|
"value": "{{host}}"
|
|
},
|
|
{
|
|
"name": ":method",
|
|
"value": "GET"
|
|
},
|
|
{
|
|
"name": ":path",
|
|
"value": "/api/user/info"
|
|
},
|
|
{
|
|
"name": ":scheme",
|
|
"value": "https"
|
|
},
|
|
{
|
|
"name": "accept",
|
|
"value": "application/json, text/plain, */*"
|
|
},
|
|
{
|
|
"name": "accept-encoding",
|
|
"value": "gzip, deflate, br, zstd"
|
|
},
|
|
{
|
|
"name": "accept-language",
|
|
"value": "zh-CN,zh;q=0.9,en;q=0.8"
|
|
},
|
|
{
|
|
"name": "access-token",
|
|
"value": "{{token}}"
|
|
},
|
|
{
|
|
"name": "cache-control",
|
|
"value": "no-cache"
|
|
},
|
|
{
|
|
"name": "pragma",
|
|
"value": "no-cache"
|
|
},
|
|
{
|
|
"name": "referer",
|
|
"value": "https://{{host}}/user/index"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua",
|
|
"value": "\"Google Chrome\";v=\"123\", \"Not:A-Brand\";v=\"8\", \"Chromium\";v=\"123\""
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-mobile",
|
|
"value": "?0"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-platform",
|
|
"value": "\"macOS\""
|
|
},
|
|
{
|
|
"name": "sec-fetch-dest",
|
|
"value": "empty"
|
|
},
|
|
{
|
|
"name": "sec-fetch-mode",
|
|
"value": "cors"
|
|
},
|
|
{
|
|
"name": "sec-fetch-site",
|
|
"value": "same-origin"
|
|
},
|
|
{
|
|
"name": "user-agent",
|
|
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
|
|
}
|
|
],
|
|
"cookies": []
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "checkin_trans",
|
|
"re": "(?<=\"checkin_trans\":)([^\"]+),",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "lastCheckInTime",
|
|
"re": "(?<=\"lastCheckInTime\":\")([^\"]+)",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "transfer_checkin",
|
|
"re": "(?<=\"transfer_checkin\":)([^\"]+),",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "Unicode转换",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "api://util/unicode",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": "html_unescape=false&content={{divide(transfer_checkin|int,1048576)}}"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"状态\": \"200\"",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "value",
|
|
"re": "\"转换后\": \"(\\d+)\\.\\d+\"",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "显示签到结果",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "api://util/unicode",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": "html_unescape=false&content={{result}} \\r\\n上次签到时间: {{lastCheckInTime}} \\r\\n上次签到奖励流量: {{checkin_trans}}MB \\r\\n未转移的流量: {{value}}MB"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"状态\": \"200\"",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "__log__",
|
|
"re": "\"转换后\": \"(.*)\"",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "登录失败",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "{% else %}",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": ""
|
|
},
|
|
"rule": {
|
|
"success_asserts": [],
|
|
"failed_asserts": [],
|
|
"extract_variables": []
|
|
}
|
|
},
|
|
{
|
|
"comment": "显示登录失败结果",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "api://util/unicode",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": "html_unescape=false&content=登录失败 \\r\\n{{login_result}}"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"状态\": \"200\"",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "__log__",
|
|
"re": "\"转换后\": \"(.*)\"",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "判断块结束",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "{% endif %}",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": ""
|
|
},
|
|
"rule": {
|
|
"success_asserts": []
|
|
}
|
|
}
|
|
] |