Update m-team FlareSolverr har (#270)

* Update m-team FlareSolverr har

Changelog:
- Add domain to cookies which is required since FlareSolverr 3.0.0
- Add failed asserts to check again the response of FlareSolverr

Before the User cookies support mentioned in
https://github.com/FlareSolverr/FlareSolverr/issues/650 is implemented in the
official repo, the har only works with this docker image:
`15cm/flaresolverr:3.0.0` or onward. The docker image is built from
https://github.com/15cm/FlareSolverr .

Fix https://github.com/qiandao-today/templates/issues/225

* Add everything before </title> of FlareSolverr response to har __log__

The FlareSolverr response status is before the response body that contains
"</title>". If the user name can be found in the title, it means the login
succeeded. The __log__ looks like this:
 {"status": "ok", "message": "Challenge not detected!", "solution": {"url": "https://kp.m-team.cc/userdetails.php?id=<userid>", "status": 200, "captcha_type": null, "cookies": [{"domain": "kp.m-team.cc", "httpOnly": false, "name": "tp", "path": "/", "secure": false, "value": "<tp_cookie>"}], "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36", "headers": {}, "response": "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n<meta name=\"generator\" content=\"NexusPHP\">\n<title>M-Team - TP :: \u7528\u6236\u8a73\u60c5 - <username> - Powered by NexusPHP</title>
This commit is contained in:
Sinkerine 2023-01-07 18:12:07 -08:00 committed by GitHub
parent 7c9c653197
commit 2448105ed4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
[{"request":{"method":"POST","url":"{{flaresolverr_url}}","headers":[{"name":"Content-Type","value":"application/json"}],"cookies":[],"data":"{\n \"cmd\": \"request.get\",\n \"url\":\"https://kp.m-team.cc/userdetails.php?id={{userid}}\",\n \"cookies\": [{\"name\": \"tp\", \"value\": \"{{cookies_value_tp}}\"}],\n \"maxTimeout\": 60000\n}"},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[],"extract_variables":[]}}] [{"request":{"method":"POST","url":"{{flaresolverr_url}}","headers":[{"name":"Content-Type","value":"application/json"}],"cookies":[],"data":"{\n \"cmd\": \"request.get\",\n \"url\":\"https://kp.m-team.cc/userdetails.php?id={{userid}}\",\n \"cookies\": [{\"name\": \"tp\", \"value\": \"{{cookies_value_tp}}\", \"domain\": \"kp.m-team.cc\"}],\n \"maxTimeout\": 60000\n}"},"rule":{"success_asserts":[{"re":"200","from":"status"}],"failed_asserts":[{"re":"https://kp.m-team.cc/login.php\\?returnto=","from":"content"},{"re":"\"status\": \"error\"","from":"content"}],"extract_variables":[{"name":"__log__","re":".*</title>","from":"content"}]}}]

View File

@ -2061,11 +2061,11 @@
"author": "Sinkerine", "author": "Sinkerine",
"url": "https://raw.githubusercontent.com/qiandao-today/templates/master/m-team-cookie-flaresolverr.har", "url": "https://raw.githubusercontent.com/qiandao-today/templates/master/m-team-cookie-flaresolverr.har",
"update": false, "update": false,
"comments": "cookies_value_tp: Cookies 中 \"tp\" key 的值<br>userid: userdetails.php?id={{userid}} 的用户 id<br>FlareSolverr url. 如 http://localhost:8191/v1", "comments": "cookies_value_tp: Cookies 中 \"tp\" key 的值<br>userid: userdetails.php?id={{userid}} 的用户 id<br>FlareSolverr url. 如 http://localhost:8191/v1 . 需搭配 15cm/flaresolverr:3.0.0 这个 docker image 使用",
"filename": "m-team-cookie-flaresolverr.har", "filename": "m-team-cookie-flaresolverr.har",
"content": "", "content": "",
"date": "2022-07-05 09:30:00", "date": "2023-01-06 00:00:00",
"version": "20220705", "version": "20230106",
"commenturl": "https://github.com/qiandao-today/templates/issues/225" "commenturl": "https://github.com/qiandao-today/templates/issues/225"
}, },
"掌上百科账号版": { "掌上百科账号版": {