mirror of
https://github.com/qiandao-today/templates.git
synced 2025-04-05 21:53:42 +00:00
200 lines
6.0 KiB
JSON
200 lines
6.0 KiB
JSON
[
|
|
{
|
|
"comment": "获取CSRF",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "https://lsp.ptlsp.com/",
|
|
"headers": [
|
|
{
|
|
"name": "Cookie",
|
|
"value": "{{cookie}}"
|
|
}
|
|
],
|
|
"cookies": [],
|
|
"data": ""
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "csrf",
|
|
"re": "\"csrfToken\":\"(.+?)\"}",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "uid",
|
|
"re": "\"userId\":(\\d+),",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "canCheckin",
|
|
"re": "\"canCheckin\":(.+?),",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "beforeTotal",
|
|
"re": "\"totalContinuousCheckIn\":(\\d+),",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "签到",
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "https://lsp.ptlsp.com/api/users/{{uid}}",
|
|
"headers": [
|
|
{
|
|
"name": "Cookie",
|
|
"value": "{{cookie}}"
|
|
},
|
|
{
|
|
"name": "x-csrf-token",
|
|
"value": "{{csrf}}"
|
|
},
|
|
{
|
|
"name": ":path",
|
|
"value": "/api/users/{{uid}}"
|
|
},
|
|
{
|
|
"name": ":authority",
|
|
"value": "lsp.ptlsp.com"
|
|
},
|
|
{
|
|
"name": ":method",
|
|
"value": "POST"
|
|
},
|
|
{
|
|
"name": ":scheme",
|
|
"value": "https"
|
|
},
|
|
{
|
|
"name": "accept",
|
|
"value": "*/*"
|
|
},
|
|
{
|
|
"name": "accept-encoding",
|
|
"value": "gzip, deflate, br"
|
|
},
|
|
{
|
|
"name": "accept-language",
|
|
"value": "zh-CN,zh;q=0.9,en;q=0.8"
|
|
},
|
|
{
|
|
"name": "content-type",
|
|
"value": "application/json; charset=UTF-8"
|
|
},
|
|
{
|
|
"name": "dnt",
|
|
"value": "1"
|
|
},
|
|
{
|
|
"name": "origin",
|
|
"value": "https://lsp.ptlsp.com"
|
|
},
|
|
{
|
|
"name": "referer",
|
|
"value": "https://lsp.ptlsp.com/"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua",
|
|
"value": "\"Chromium\";v=\"118\", \"Google Chrome\";v=\"118\", \"Not=A?Brand\";v=\"99\""
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-mobile",
|
|
"value": "?0"
|
|
},
|
|
{
|
|
"name": "sec-ch-ua-platform",
|
|
"value": "\"Windows\""
|
|
},
|
|
{
|
|
"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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"
|
|
},
|
|
{
|
|
"name": "x-http-method-override",
|
|
"value": "PATCH"
|
|
}
|
|
],
|
|
"cookies": [],
|
|
"data": "{\"data\":{\"type\":\"users\",\"attributes\":{\"canCheckin\":false,\"totalContinuousCheckIn\":5},\"id\":\"{{uid}}\"}}",
|
|
"mimeType": "application/json; charset=UTF-8"
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
}
|
|
],
|
|
"failed_asserts": [
|
|
{
|
|
"re": "\"canCheckin\":true,",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"extract_variables": [
|
|
{
|
|
"name": "days",
|
|
"re": "\"totalContinuousCheckIn\":(\\d+),",
|
|
"from": "content"
|
|
},
|
|
{
|
|
"name": "money",
|
|
"re": "\"money\":(\\d+),",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"comment": "字符串替换",
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "api://util/string/replace?t=%E6%80%BB%E7%AD%BE%E5%88%B0%E5%A4%A9%E6%95%B0%EF%BC%9A{{days|urlencode}}%EF%BC%8C%E5%89%A9%E4%BD%99%E9%AD%94%E5%8A%9B%EF%BC%9A{{money|urlencode}}",
|
|
"headers": [],
|
|
"cookies": [],
|
|
"data": ""
|
|
},
|
|
"rule": {
|
|
"success_asserts": [
|
|
{
|
|
"re": "200",
|
|
"from": "status"
|
|
},
|
|
{
|
|
"re": "\"状态\": \"OK\"",
|
|
"from": "content"
|
|
}
|
|
],
|
|
"failed_asserts": [],
|
|
"extract_variables": [
|
|
{
|
|
"name": "__log__",
|
|
"re": "\"处理后字符串\": \"(.*)\"",
|
|
"from": "content"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
] |