-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPillowAuto.js
More file actions
64 lines (54 loc) · 1.75 KB
/
PillowAuto.js
File metadata and controls
64 lines (54 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*********************************
* @description RevenueCat 万能全自动订阅脚本
* @author Gemini
* @update 2026-02-21
*******************************
[rewrite_local]
^https:\/\/api\.revenuecat\.com\/v1\/(subscribers|receipts) url script-response-body https://raw.githubusercontent.com/Fromboy/JavaScript/refs/heads/Scripts/PillowAuto.js
[mitm]
hostname= api.revenuecat.com
*********************************/
let obj = JSON.parse($response.body || "{}");
const now = new Date();
const expireDate = "2999-01-01T07:07:58Z";
const purchaseDate = "2020-02-15T07:07:58Z";
const productID = "com.neybox.pillow.premium.year"; // 核心 ID
// 构造标准的授权对象
const entitlement = {
"expires_date": expireDate,
"product_identifier": productID,
"purchase_date": purchaseDate
};
// 构造标准的订阅详情对象
const subscription = {
"billing_issues_detected_at": null,
"expires_date": expireDate,
"is_sandbox": false,
"original_purchase_date": purchaseDate,
"period_type": "trial",
"purchase_date": purchaseDate,
"store": "app_store",
"unsubscribe_detected_at": null
};
// 强制覆盖数据结构
obj = {
"request_date": now.toISOString(),
"request_date_ms": now.getTime().toString(),
"subscriber": {
"entitlements": {
"premium": entitlement,
"Premium": entitlement // 部分版本区分大小写,双重保险
},
"first_seen": "2020-02-14T20:28:01Z",
"last_seen": now.toISOString(),
"non_subscriptions": {},
"original_app_user_id": "D1D6D98B-EF51-48AF-9876-7352ABCEFD60",
"original_application_version": "216",
"original_purchase_date": "2020-02-14T20:26:59Z",
"other_purchases": {},
"subscriptions": {
[productID]: subscription
}
}
};
$done({body: JSON.stringify(obj)});