Script/Surge/JS/Wps.js

55 lines
1.5 KiB
JavaScript
Raw Normal View History

2019-11-29 21:39:49 +08:00
/*
2021-07-04 16:32:52 +08:00
WPS Office 解锁部分功能
***************************
QuantumultX:
[rewrite_local]
2022-07-03 22:36:03 +08:00
^https?:\/\/[a-z-]*account\.wps\.c(n|om)(:\d+|)\/api\/users url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js
2021-07-04 16:32:52 +08:00
[mitm]
2022-07-03 22:36:03 +08:00
hostname = *account.wps.cn, *account.wps.com
2021-07-04 16:32:52 +08:00
***************************
Surge4 or Loon:
2019-11-29 21:39:49 +08:00
[Script]
2022-07-03 22:36:03 +08:00
http-response ^https?:\/\/[a-z-]*account\.wps\.c(n|om)(:\d+|)\/api\/users requires-body=1,max-size=-1,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/Surge/JS/Wps.js
2019-11-29 21:39:49 +08:00
[MITM]
2022-07-03 22:36:03 +08:00
hostname = *account.wps.cn, *account.wps.com
2019-11-29 21:39:49 +08:00
2021-07-04 16:32:52 +08:00
**************************/
2019-11-29 21:39:49 +08:00
2021-07-04 16:32:52 +08:00
var body = JSON.parse($response.body);
var obj = {
2019-11-29 21:39:49 +08:00
exp: 0,
level: 3,
privilege: [
2021-07-04 16:32:52 +08:00
{ spid: "data_recover", times: 0, expire_time: 1846256142 },
{ spid: "ocr", times: 0, expire_time: 1846256142 },
{ spid: "pdf2doc", times: 0, expire_time: 1846256142 },
{ spid: "pdf_merge", times: 0, expire_time: 1846256142 },
{ spid: "pdf_sign", times: 0, expire_time: 1846256142 },
{ spid: "pdf_split", times: 0, expire_time: 1846256142 }
2019-11-29 21:39:49 +08:00
],
result: "ok",
total_buy: 0,
total_cost: -30,
2021-07-04 16:32:52 +08:00
userid: body.userid,
2019-11-29 21:39:49 +08:00
vip: {
name: "超级会员",
has_ad: 0,
memberid: 40,
2021-07-04 16:32:52 +08:00
expire_time: 1846256142,
2019-11-29 21:39:49 +08:00
enabled: [
2021-07-04 16:32:52 +08:00
{ memberid: 40, name: "超级会员", expire_time: 1846256142 },
{ memberid: 20, name: "WPS会员", expire_time: 1846256142 },
{ memberid: 12, name: "稻壳会员", expire_time: 1846256142 }
2019-11-29 21:39:49 +08:00
]
},
wealth: 0,
2021-07-04 16:32:52 +08:00
expire_time: 1846256142
2019-11-29 21:39:49 +08:00
};
2020-08-09 20:27:52 +08:00
$done({ body: JSON.stringify(obj) });