Skip to content

Commit

Permalink
Add HAR: 2DFan (#497)
Browse files Browse the repository at this point in the history
Co-authored-by: chen8945 <[email protected]>
  • Loading branch information
github-actions[bot] and chen8945 authored Dec 19, 2023
1 parent e4082b4 commit b442b8b
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 0 deletions.
239 changes: 239 additions & 0 deletions 2DFan.har
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
[
{
"request": {
"method": "GET",
"url": "https:///{{domain}}/",
"headers": [
{
"name": "cookie",
"value": "{{cookie}}"
},
{
"name": "referer",
"value": "https://{{domain}}/"
},
{
"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"
}
],
"cookies": []
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [
{
"re": "<a href=\"/users/not_authenticated\">登录</a>",
"from": "content"
},
{
"re": "<a href=\"/users/new\">注册</a>",
"from": "content"
}
],
"extract_variables": [
{
"name": "recheckin",
"re": "<a href=\"(.+)\">签到</a>",
"from": "content"
},
{
"name": "panel",
"re": "<a href=\"(.+)\">控制面板</a>",
"from": "content"
}
]
}
},
{
"request": {
"method": "GET",
"url": "https://{{domain}}{{recheckin}}",
"headers": [
{
"name": "referer",
"value": "https://{{domain}}/"
},
{
"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"
}
],
"cookies": []
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [
{
"re": "<a href=\"/users/not_authenticated\">登录</a>",
"from": "content"
},
{
"re": "<a href=\"/users/new\">注册</a>",
"from": "content"
}
],
"extract_variables": [
{
"name": "token",
"re": "name=\"csrf-token\" content=\"(.+)\"",
"from": "content"
}
]
}
},
{
"request": {
"method": "POST",
"url": "https://{{domain}}/checkins",
"headers": [
{
"name": "origin",
"value": "https://{{domain}}"
},
{
"name": "referer",
"value": "https://{{domain}}{{recheckin}}"
},
{
"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-csrf-token",
"value": "{{token}}"
}
],
"cookies": []
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [],
"extract_variables": [
{
"name": "checkins_count",
"re": "\"checkins_count\":(\\d+)",
"from": "content"
},
{
"name": "serial_checkins",
"re": "\"serial_checkins\":(\\d+)",
"from": "content"
}
]
}
},
{
"comment": "",
"request": {
"method": "GET",
"url": "https://{{domain}}{{panel}}",
"headers": [
{
"name": "referer",
"value": "https://{{domain}}/"
},
{
"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"
}
],
"cookies": []
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
}
],
"failed_asserts": [
{
"re": "<a href=\"/users/not_authenticated\">登录</a>",
"from": "content"
},
{
"re": "<a href=\"/users/new\">注册</a>",
"from": "content"
}
],
"extract_variables": [
{
"name": "name",
"re": "<i class=\"icon-user\"></i> (.+) <i class=\"caret\"></i>",
"from": "content"
},
{
"name": "jf",
"re": "<span class=\"muted\">积分:</span>.+</li>",
"from": "content"
},
{
"name": "sw",
"re": "<span class=\"muted\">声望:</span>.+</li>",
"from": "content"
},
{
"name": "yqd",
"re": "<span class=\"muted\">已签到:</span>.+</li>",
"from": "content"
},
{
"name": "lxqd",
"re": "<span class=\"muted\">连续签到:</span>.+</li>",
"from": "content"
},
{
"name": "qdpm",
"re": "<span class=\"muted\">签到排名:</span>.+</li>",
"from": "content"
}
]
}
},
{
"comment": "Unicode转换",
"request": {
"method": "POST",
"url": "api://util/unicode",
"headers": [],
"cookies": [],
"data": "html_unescape=false&content=用户名:{{name}}\\r\\n {{jf|striptags}},{{sw|striptags}}\\r\\n {{yqd|striptags}},{{lxqd|striptags}},{{qdpm|striptags}}"
},
"rule": {
"success_asserts": [
{
"re": "200",
"from": "status"
},
{
"re": "\"状态\": \"200\"",
"from": "content"
}
],
"failed_asserts": [],
"extract_variables": [
{
"name": "__log__",
"re": "\"转换后\": \"(.*)\"",
"from": "content"
}
]
}
}
]
12 changes: 12 additions & 0 deletions tpls_history.json
Original file line number Diff line number Diff line change
Expand Up @@ -2952,6 +2952,18 @@
"date": "2023-12-05 01:00:48",
"version": "20231205",
"commenturl": "https://github.com/qd-today/templates/issues/492"
},
"2DFan": {
"name": "2DFan",
"author": "chen8945",
"url": "https://raw.githubusercontent.com/qd-today/templates/master/2DFan.har",
"update": false,
"comments": "Cookie<br>domain:域名(示例 2dfan.org)<br>https://2dfan.org/",
"filename": "2DFan.har",
"content": "W3sicmVxdWVzdCI6IHsibWV0aG9kIjogIkdFVCIsICJ1cmwiOiAiaHR0cHM6Ly8ve3tkb21haW59fS8iLCAiaGVhZGVycyI6IFt7Im5hbWUiOiAiY29va2llIiwgInZhbHVlIjogInt7Y29va2llfX0ifSwgeyJuYW1lIjogInJlZmVyZXIiLCAidmFsdWUiOiAiaHR0cHM6Ly97e2RvbWFpbn19LyJ9LCB7Im5hbWUiOiAidXNlci1hZ2VudCIsICJ2YWx1ZSI6ICJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTE4LjAuMC4wIFNhZmFyaS81MzcuMzYifV0sICJjb29raWVzIjogW119LCAicnVsZSI6IHsic3VjY2Vzc19hc3NlcnRzIjogW3sicmUiOiAiMjAwIiwgImZyb20iOiAic3RhdHVzIn1dLCAiZmFpbGVkX2Fzc2VydHMiOiBbeyJyZSI6ICI8YSBocmVmPVwiL3VzZXJzL25vdF9hdXRoZW50aWN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biBjbGFzcz1cIm11dGVkXCI+5bey562+5Yiw77yaPC9zcGFuPi4rPC9saT4iLCAiZnJvbSI6ICJjb250ZW50In0sIHsibmFtZSI6ICJseHFkIiwgInJlIjogIjxzcGFuIGNsYXNzPVwibXV0ZWRcIj7ov57nu63nrb7liLDvvJo8L3NwYW4+Lis8L2xpPiIsICJmcm9tIjogImNvbnRlbnQifSwgeyJuYW1lIjogInFkcG0iLCAicmUiOiAiPHNwYW4gY2xhc3M9XCJtdXRlZFwiPuetvuWIsOaOkuWQje+8mjwvc3Bhbj4uKzwvbGk+IiwgImZyb20iOiAiY29udGVudCJ9XX19LCB7ImNvbW1lbnQiOiAiVW5pY29kZei9rOaNoiIsICJyZXF1ZXN0IjogeyJtZXRob2QiOiAiUE9TVCIsICJ1cmwiOiAiYXBpOi8vdXRpbC91bmljb2RlIiwgImhlYWRlcnMiOiBbXSwgImNvb2tpZXMiOiBbXSwgImRhdGEiOiAiaHRtbF91bmVzY2FwZT1mYWxzZSZjb250ZW50PeeUqOaIt+WQje+8mnt7bmFtZX19XFxyXFxuIHt7amZ8c3RyaXB0YWdzfX3vvIx7e3N3fHN0cmlwdGFnc319XFxyXFxuIHt7eXFkfHN0cmlwdGFnc31977yMe3tseHFkfHN0cmlwdGFnc31977yMe3txZHBtfHN0cmlwdGFnc319In0sICJydWxlIjogeyJzdWNjZXNzX2Fzc2VydHMiOiBbeyJyZSI6ICIyMDAiLCAiZnJvbSI6ICJzdGF0dXMifSwgeyJyZSI6ICJcIueKtuaAgVwiOiBcIjIwMFwiIiwgImZyb20iOiAiY29udGVudCJ9XSwgImZhaWxlZF9hc3NlcnRzIjogW10sICJleHRyYWN0X3ZhcmlhYmxlcyI6IFt7Im5hbWUiOiAiX19sb2dfXyIsICJyZSI6ICJcIui9rOaNouWQjlwiOiBcIiguKilcIiIsICJmcm9tIjogImNvbnRlbnQifV19fV0=",
"date": "2023-12-19 13:53:05",
"version": "20231219",
"commenturl": "https://github.com/qd-today/templates/issues/496"
}
}
}

0 comments on commit b442b8b

Please sign in to comment.