mirror of
https://github.com/qd-today/templates.git
synced 2026-11-23 18:24:36 +00:00
Co-authored-by: skychenchang <skychenchang@users.noreply.github.com>
245 lines
7.5 KiB
JSON
245 lines
7.5 KiB
JSON
[
|
|
{
|
|
"comment": "登录 GAL图书馆",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "https://{{ domain | replace('https://', '') | replace('http://', '') | trim('/') }}/galgame/user/login",
|
|
"headers": [
|
|
{
|
|
"name": "User-Agent",
|
|
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) Gecko/20100101 Firefox/158.0"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"value": "application/json, text/javascript, */*; q=0.01"
|
|
},
|
|
{
|
|
"name": "Accept-Language",
|
|
"value": "zh-CN,zh;q=0.9"
|
|
},
|
|
{
|
|
"name": "Accept-Encoding",
|
|
"value": "identity"
|
|
},
|
|
{
|
|
"name": "Referer",
|
|
"value": "https://{{ domain | replace('https://', '') | replace('http://', '') | trim('/') }}/login.html"
|
|
},
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/x-www-form-urlencoded; charset=UTF-8"
|
|
},
|
|
{
|
|
"name": "X-Requested-With",
|
|
"value": "XMLHttpRequest"
|
|
},
|
|
{
|
|
"name": "Origin",
|
|
"value": "https://{{ domain | replace('https://', '') | replace('http://', '') | trim('/') }}"
|
|
},
|
|
{
|
|
"name": "Connection",
|
|
"value": "keep-alive"
|
|
}
|
|
],
|
|
"cookies": [],
|
|
"data": "name={{account}}&password={{password}}",
|
|
"mimeType": "application/x-www-form-urlencoded"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"code\"\\s*:\\s*\"?200\"?",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [
|
|
{
|
|
"re": "\"code\"\\s*:\\s*\"?-1\"?",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"extract_variables": []
|
|
}
|
|
},
|
|
{
|
|
"comment": "执行签到",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "https://{{ domain | replace('https://', '') | replace('http://', '') | trim('/') }}/galgame/userSign/signNow",
|
|
"headers": [
|
|
{
|
|
"name": "User-Agent",
|
|
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:158.0) Gecko/20100101 Firefox/158.0"
|
|
},
|
|
{
|
|
"name": "Accept",
|
|
"value": "application/json, text/javascript, */*; q=0.01"
|
|
},
|
|
{
|
|
"name": "Accept-Language",
|
|
"value": "zh-CN,zh;q=0.9"
|
|
},
|
|
{
|
|
"name": "Accept-Encoding",
|
|
"value": "identity"
|
|
},
|
|
{
|
|
"name": "Referer",
|
|
"value": "https://{{ domain | replace('https://', '') | replace('http://', '') | trim('/') }}/index.html"
|
|
},
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/x-www-form-urlencoded; charset=UTF-8"
|
|
},
|
|
{
|
|
"name": "X-Requested-With",
|
|
"value": "XMLHttpRequest"
|
|
},
|
|
{
|
|
"name": "Origin",
|
|
"value": "https://{{ domain | replace('https://', '') | replace('http://', '') | trim('/') }}"
|
|
},
|
|
{
|
|
"name": "Connection",
|
|
"value": "keep-alive"
|
|
}
|
|
],
|
|
"cookies": [],
|
|
"data": "",
|
|
"mimeType": "application/x-www-form-urlencoded"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"code\"\\s*:\\s*\"?(-?\\d+)\"?",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "sign_code",
|
|
"re": "\"code\"\\s*:\\s*\"?(-?\\d+)\"?",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "sign_msg",
|
|
"re": "\"msg\"\\s*:\\s*\"([^\"]*)\"",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "判断签到结果",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "{% if sign_code==\"200\" %}",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": ""
|
|
},
|
|
"rule": {
|
|
"success_asserts": [],
|
|
"failed_asserts": [],
|
|
"extract_variables": []
|
|
}
|
|
},
|
|
{
|
|
"comment": "Unicode转换,签到成功",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "api://util/unicode",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": "html_unescape=false&content=用户:{{account}},签到成功。"
|
|
},
|
|
"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": "Unicode转换,今日已签到",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "api://util/unicode",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": "html_unescape=false&content=用户:{{account}},今日已签到。"
|
|
},
|
|
"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": []
|
|
}
|
|
}
|
|
] |