forked from zwf234/rules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmby.js
79 lines (67 loc) · 2.34 KB
/
Emby.js
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/**
* @author: Stranger
*
Surge
[Script]
embyPremiere.js = type=http-response,pattern=^https?:\/\/mb3admin.com\/admin\/service\/registration\/validateDevice,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/zwf234/rules/master/js/Emby.js
QuanX
[rewrite_local]
^https:\/\/mb3admin\.com\/admin\/service(\/registration\/validateDevice|\/appstore\/register|\/registration\/validate|\/registration\/getStatus|\/supporter\/retrievekey) url script-echo-response https://raw.githubusercontent.com/zwf234/rules/master/js/Emby.js
Loon
[Script]
http-response ^https?:\/\/mb3admin.com\/admin\/service\/registration\/validateDevice requires-body=1,max-size=0, script-path=https://raw.githubusercontent.com/zwf234/rules/master/js/Emby.js,tag=embyUnlocked
Shadowrocket
[Script]
EmbyPremiere = type=http-response,script-path=https://raw.githubusercontent.com/zwf234/rules/master/js/Emby.js,pattern=^https?:\/\/mb3admin.com\/admin\/service\/registration\/validateDevice,max-size=131072,requires-body=true,timeout=10,enable=true
----------------------------------------
[MITM]
hostname = mb3admin.com
*/
var url = $request.url;
const myStatus = "HTTP/1.1 200 OK";
const myHeaders = {
"Crack": "KS",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Method": "*",
"Access-Control-Allow-Credentials": "true"
};
if (url.indexOf('/admin/service/registration/validateDevice') != -1) {
obj = {
"cacheExpirationDays": 365,
"message": "Device Valid",
"resultCode": "GOOD"
};
} else if (url.indexOf('/admin/service/appstore/register') != -1) {
obj = {
"featId":"",
"registered":true,
"expDate":"2099-01-01",
"key":""
};
} else if (url.indexOf('/admin/service/registration/validate') != -1) {
obj = {
"featId":"",
"registered":true,
"expDate":"2099-01-01",
"key":""
};
} else if (url.indexOf('/admin/service/registration/getStatus') != -1){
obj = {
"planType":"Cracked",
"deviceStatus":"",
"subscriptions":[]
};
} else if (url.indexOf('/admin/service/supporter/retrievekey') != -1){
obj = {
"Success":false,
"ErrorMessage":"Supporter not found"
};
}
myData = JSON.stringify(obj);
const myResponse = {
status: myStatus,
headers: myHeaders, // Optional.
body: myData // Optional.
};
$done(myResponse);