templates/立创开源平台签到.har
github-actions[bot] b72efb5037
Add HAR: 立创开源平台签到.har (#786)
Co-authored-by: 2117516450 <2117516450@users.noreply.github.com>
2024-11-06 15:46:19 +08:00

718 lines
21 KiB
JSON

[
{
"comment": "初始化变量",
"request": {
"method": "POST",
"url": "api://util/string/replace",
"headers": [],
"cookies": [],
"data": "r=text&p=&s=1&t="
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [],
"extract_variables": [
{
"name": "time16",
"re": "",
"from": "content"
},
{
"name": "cookies",
"re": "",
"from": "content"
},
{
"name": "success",
"re": "",
"from": "content"
},
{
"name": "result",
"re": "",
"from": "content"
},
{
"name": "code",
"re": "",
"from": "content"
},
{
"name": "isTodaySignIn",
"re": "",
"from": "content"
},
{
"name": "latestSignInDate",
"re": "",
"from": "content"
},
{
"name": "total_point",
"re": "",
"from": "content"
}
]
}
},
{
"comment": "返回对应时间戳和时间",
"request": {
"method": "POST",
"url": "api://util/timestamp",
"headers": [],
"cookies": [],
"data": "ts=&form=&dt="
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [],
"extract_variables": [
{
"name": "time16",
"re": "\"16位时间戳\":(.*?),",
"from": "content"
}
]
}
},
{
"comment": "获取oshwhub_session的code",
"request": {
"method": "POST",
"url": "https://passport.jlc.com/api/cas/sso/check-login",
"headers": [
{
"name": "Content-Type\n",
"value": "application/json;charset=UTF-8\n"
},
{
"name": "Cookie\n",
"value": "{{cookie}}"
}
],
"cookies": [],
"data": "{\"appId\":\"JLC_OSHWHUB\"}",
"mimeType": "application/json"
},
"rule": {
"success_asserts": [
{
"re": "\"isLogin\":true",
"from": "content"
}
],
"failed_asserts": [
{
"re": "\"isLogin\":false,\"loginEnabled\":false",
"from": "content"
}
],
"extract_variables": [
{
"name": "code",
"re": "\"code\":\"(.*?)\"",
"from": "content"
}
]
}
},
{
"comment": "获取oshwhub_session",
"request": {
"method": "POST",
"url": "https://oshwhub.com/api/login/login-by-code",
"headers": [
{
"name": "Content-Type",
"value": "application/json;charset=UTF-8"
}
],
"cookies": [],
"data": "{\"code\":\"{{code}}\"}",
"mimeType": "application/json"
},
"rule": {
"success_asserts": [
{
"re": "\"result\":{}",
"from": "content"
}
],
"failed_asserts": [
{
"re": "\"result\":\"请求签名参数错误\"",
"from": "content"
}
],
"extract_variables": [
{
"name": "cookies",
"re": "Set-Cookie:(.*); Max-Age=604800;",
"from": "header"
}
]
}
},
{
"comment": "获取是否签到过",
"request": {
"method": "GET",
"url": "https://oshwhub.com/api/users/getSignInProfile?_t={{time16|truncate(14,True,'',0)|urlencode}}",
"headers": [
{
"name": "cookie",
"value": "{{cookies}}"
},
{
"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,en-GB;q=0.7,en-US;q=0.6"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Host",
"value": "oshwhub.com"
},
{
"name": "Origin",
"value": "https://oshwhub.com"
},
{
"name": "Referer",
"value": "https://oshwhub.com/sign_in"
},
{
"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/130.0.0.0 Safari/537.36 Edg/130.0.0.0"
},
{
"name": "sec-ch-ua",
"value": "\"Chromium\";v=\"130\", \"Microsoft Edge\";v=\"130\", \"Not?A_Brand\";v=\"99\""
},
{
"name": "sec-ch-ua-mobile",
"value": "?0"
},
{
"name": "sec-ch-ua-platform",
"value": "\"Windows\""
}
],
"cookies": [],
"data": "",
"mimeType": "application/json;charset=UTF-8"
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [
{
"re": "\"code\":401,",
"from": "content"
}
],
"extract_variables": [
{
"name": "cookies",
"re": "Set-Cookie:(.*)Max-Age=604800;",
"from": "header"
},
{
"name": "isTodaySignIn",
"re": "\"isTodaySignIn\":(.*),\"latestSignInDate\"",
"from": "content"
},
{
"name": "latestSignInDate",
"re": "\"latestSignInDate\":\"(.*)\",\"",
"from": "content"
},
{
"name": "total_point",
"re": "\"total_point\":(.*),\"expiring_info\"",
"from": "content"
}
]
}
},
{
"comment": "判断条件成立 是否签到过",
"request": {
"method": "GET",
"url": "{% if isTodaySignIn == \"true\" %}",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [],
"failed_asserts": [],
"extract_variables": []
}
},
{
"comment": "",
"request": {
"method": "GET",
"url": "api://util/string/replace?r=text&p=&s=%E4%BB%8A%E6%97%A5%E5%B7%B2%E7%AD%BE%E5%88%B0%E2%97%86%E7%A7%AF%E5%88%86%E6%80%BB%E6%95%B0%EF%BC%9A{{total_point|urlencode}}%E2%97%86%E6%9C%80%E8%BF%91%E7%AD%BE%E5%88%B0%E6%97%B6%E9%97%B4%EF%BC%9A{{latestSignInDate|urlencode}}%EF%BC%88%2B8%3A00%EF%BC%89&t=",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [],
"failed_asserts": [],
"extract_variables": [
{
"name": "__log__",
"re": "(.*)",
"from": "content"
}
]
}
},
{
"comment": "判断条件不成立",
"request": {
"method": "GET",
"url": "{% else %}",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": []
}
},
{
"comment": "提交签到请求",
"request": {
"method": "POST",
"url": "https://oshwhub.com/api/users/signIn",
"headers": [
{
"name": "cookie",
"value": "{{cookies}}"
},
{
"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,en-GB;q=0.7,en-US;q=0.6"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Host",
"value": "oshwhub.com"
},
{
"name": "Origin",
"value": "https://oshwhub.com"
},
{
"name": "Referer",
"value": "https://oshwhub.com/sign_in"
},
{
"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/130.0.0.0 Safari/537.36 Edg/130.0.0.0"
},
{
"name": "sec-ch-ua",
"value": "\"Chromium\";v=\"130\", \"Microsoft Edge\";v=\"130\", \"Not?A_Brand\";v=\"99\""
},
{
"name": "sec-ch-ua-mobile",
"value": "?0"
},
{
"name": "sec-ch-ua-platform",
"value": "\"Windows\""
}
],
"cookies": [],
"data": "{\"_t\":{{time16|truncate(14,True,'',0)}}}",
"mimeType": "application/json;charset=UTF-8"
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [
{
"re": "\"code\":401,",
"from": "content"
}
],
"extract_variables": [
{
"name": "code",
"re": "\"code\":(.*?),",
"from": "content"
},
{
"name": "success",
"re": "\"success\":(.*?),",
"from": "content"
},
{
"name": "result",
"re": "\"result\":(.*?)(})",
"from": "content"
},
{
"name": "cookies",
"re": "Set-Cookie:(.*)Max-Age=604800;",
"from": "header"
}
]
}
},
{
"comment": "判断条件成立",
"request": {
"method": "GET",
"url": "{% if result != \"true\" %}",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [],
"failed_asserts": [],
"extract_variables": []
}
},
{
"comment": "获取签到时间",
"request": {
"method": "GET",
"url": "https://oshwhub.com/api/users/signInRecord?startTime={{timestamp()|int-172800}}000&endTime={{timestamp()|int+172800}}000",
"headers": [
{
"name": "cookie",
"value": "{{cookies}}"
}
],
"cookies": []
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
},
{
"re": "\"code\":0",
"from": "content"
}
],
"failed_asserts": [],
"extract_variables": [
{
"name": "date",
"re": "\"result\":(.*)(})",
"from": "content"
}
]
}
},
{
"comment": "签到失败",
"request": {
"method": "GET",
"url": "api://util/string/replace?r=text&p=&s=%E7%AD%BE%E5%88%B0%E5%A4%B1%E8%B4%A5%20%20%E6%9C%80%E8%BF%91%E7%AD%BE%E5%88%B0%E6%97%B6%E9%97%B4%EF%BC%9A{{date|urlencode}}&t=",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [],
"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": "延时2秒",
"request": {
"method": "GET",
"url": "api://util/delay/2",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [],
"extract_variables": []
}
},
{
"comment": "签到成功,获取今日签到信息",
"request": {
"method": "GET",
"url": "https://oshwhub.com/api/users/getSignInProfile?_t={{time16|truncate(14,True,'',0)|urlencode}}",
"headers": [
{
"name": "cookie",
"value": "{{cookies}}"
},
{
"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,en-GB;q=0.7,en-US;q=0.6"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Host",
"value": "oshwhub.com"
},
{
"name": "Origin",
"value": "https://oshwhub.com"
},
{
"name": "Referer",
"value": "https://oshwhub.com/sign_in"
},
{
"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/130.0.0.0 Safari/537.36 Edg/130.0.0.0"
},
{
"name": "sec-ch-ua",
"value": "\"Chromium\";v=\"130\", \"Microsoft Edge\";v=\"130\", \"Not?A_Brand\";v=\"99\""
},
{
"name": "sec-ch-ua-mobile",
"value": "?0"
},
{
"name": "sec-ch-ua-platform",
"value": "\"Windows\""
}
],
"cookies": [],
"data": "",
"mimeType": "application/json;charset=UTF-8"
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [
{
"re": "\"code\":401,",
"from": "content"
}
],
"extract_variables": [
{
"name": "cookies",
"re": "Set-Cookie:(.*)Max-Age=604800;",
"from": "header"
},
{
"name": "isTodaySignIn",
"re": "\"isTodaySignIn\":(.*),\"latestSignInDate\"",
"from": "content"
},
{
"name": "latestSignInDate",
"re": "\"latestSignInDate\":\"(.*)\",\"",
"from": "content"
}
]
}
},
{
"comment": "",
"request": {
"method": "GET",
"url": "api://util/string/replace?r=text&p=&s=%E7%AD%BE%E5%88%B0%E6%88%90%E5%8A%9F%E2%97%86%E7%A7%AF%E5%88%86%E6%80%BB%E6%95%B0%EF%BC%9A{{total_point|urlencode}}%E2%97%86%E7%AD%BE%E5%88%B0%E6%97%B6%E9%97%B4%EF%BC%9A{{latestSignInDate|urlencode}}%EF%BC%88%2B8%3A00%EF%BC%89%0A&t=",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [
{
"re": "{{code|urlencode}}",
"from": "content"
}
],
"failed_asserts": [],
"extract_variables": [
{
"name": "__log__",
"re": "(.*)",
"from": "content"
}
]
}
},
{
"comment": "判断块结束",
"request": {
"method": "GET",
"url": "{% endif %}",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": []
}
},
{
"comment": "判断块结束",
"request": {
"method": "GET",
"url": "{% endif %}",
"headers": [],
"cookies": [],
"data": ""
},
"rule": {
"success_asserts": [],
"failed_asserts": [],
"extract_variables": []
}
}
]