Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
596 commits
Select commit Hold shift + click to select a range
4e4d2f0
Minor improvements to jd checkin.
NobyDa Dec 3, 2020
e93b72b
Delete bahamut.js
NobyDa Dec 3, 2020
e4f3a79
Bug fixes about the new version of QX.
NobyDa Dec 14, 2020
029ff8e
Added new API and improved notifications in JD checkin.
NobyDa Dec 23, 2020
b2e75cc
Added disable tips and bug fixes in JD checkin.
NobyDa Dec 25, 2020
29bb9b3
Update NobyDa_BoxJs.json
NobyDa Dec 25, 2020
68cf875
Remove part of the JD checkin API.
NobyDa Jan 7, 2021
652d483
BoxJs subs link will adapt to QX Gallery.
NobyDa Jan 19, 2021
11be941
Fixed JD API and added optional random delay. #243
NobyDa Jan 20, 2021
fc7f2ad
Added sub-store data query scripts.
NobyDa Jan 23, 2021
358dcdc
Fixed async issues in certain cases.
NobyDa Jan 24, 2021
734654c
Bug fixes.
NobyDa Jan 25, 2021
a1ad270
Temporary fix for JD API issues.
NobyDa Jan 28, 2021
892042e
Update HuiJuDongManAds.sgmodule
NobyDa Jan 30, 2021
ffeb6ec
Fix rules.
NobyDa Jan 30, 2021
d400867
Update TF subs.
NobyDa Feb 6, 2021
8d2249d
Update TF subs.
NobyDa Feb 6, 2021
7cabcbf
Update Bili_Auto_Regions.js
NobyDa Feb 7, 2021
c9704ac
Delete some JD API.
NobyDa Feb 7, 2021
43cb790
Add IPA install scripts.
NobyDa Feb 7, 2021
45519cc
添加京东扩展账号CK支持
ztxtop Feb 20, 2021
9bc4bed
fix rules.
NobyDa Feb 27, 2021
45c2c24
add jd api.
NobyDa Feb 27, 2021
bb7a0bb
icon issue fixes.
NobyDa Feb 27, 2021
68f2c1d
fix #275
NobyDa Feb 27, 2021
1aa9447
Merge pull request #276 from ztxtop/master
NobyDa Feb 27, 2021
25e65cd
Revert "添加京东扩展账号CK支持"
NobyDa Feb 27, 2021
3cc12c8
Merge pull request #279 from NobyDa/revert-276-master
NobyDa Feb 27, 2021
d0738ad
修正无扩展账号数据时获取ck报错及存储key判断错误问题
ztxtop Feb 27, 2021
9548c0b
minor improvements.
NobyDa Feb 28, 2021
863c0eb
Merge pull request #280 from ztxtop/master
NobyDa Feb 28, 2021
18602fa
现京东签到已支持第三及以上账号 (兼容lxk9301多ck)
NobyDa Feb 28, 2021
875e1f9
优化京东Cookie读取逻辑, 现可直接使用lxk9301 Cookie.
NobyDa Feb 28, 2021
472beec
fix jd api.
NobyDa Mar 16, 2021
031b427
add jd api.
NobyDa Mar 19, 2021
9e672e6
增加京东精彩-京豆签到
acooler15 Apr 11, 2021
378a361
fix syntax issues.
NobyDa Apr 11, 2021
a82c60d
Merge pull request #293 from acooler15/JDJC
NobyDa Apr 11, 2021
7ad90d5
Added new JD API and fixed minor bugs.
NobyDa Apr 11, 2021
4f71849
Partial JD API enabled.
NobyDa Apr 12, 2021
1d5ec29
#298
NobyDa Apr 28, 2021
244d36b
add apis #294
NobyDa Apr 28, 2021
2c1b358
add bilibili douban rating scripts.
NobyDa Apr 28, 2021
3b99c91
Add support for Loon and QuanX
NobyDa May 1, 2021
124db50
fix movie review issues.
NobyDa May 1, 2021
811c84e
fix api issues.
NobyDa May 1, 2021
da2cfdf
add bili to switch region search
NobyDa May 2, 2021
92e21ac
replace bilibili region regex.
NobyDa May 2, 2021
fb3ed2d
add jd api.
NobyDa May 12, 2021
4a0b09c
add shortcut switch policy script.
NobyDa May 12, 2021
11dbe0d
Update Js.conf
NobyDa May 12, 2021
a25a3a2
fix loon new version issues.
NobyDa May 16, 2021
bc0eada
add wechat ruleset.
NobyDa May 25, 2021
9ce3f55
fix #302 #303
NobyDa May 31, 2021
b84bb0b
update ruleset
NobyDa Jun 1, 2021
f1f9740
improve error alert.
NobyDa Jun 17, 2021
7a09c0e
fix and remove some JD API.
NobyDa Jun 17, 2021
8d7cc8f
update wechat ruleset.
NobyDa Jun 30, 2021
b6044e0
52pojie.js is obsolete.
NobyDa Jul 1, 2021
2ed0a2e
remove loon 52pojie.js
NobyDa Jul 2, 2021
1f69239
update apple ruleset.
NobyDa Jul 2, 2021
26a4a81
update ruleset.
NobyDa Jul 4, 2021
38cf86e
remove obsolete scripts.
NobyDa Jul 4, 2021
730362a
update various rewrite scripts.
NobyDa Jul 4, 2021
9397c3a
update desc.
NobyDa Jul 4, 2021
8b5e670
rollback 52pojie.js
NobyDa Jul 4, 2021
ec920db
update desc.
NobyDa Jul 4, 2021
fbdb44d
rollback BaiduCloud.js
NobyDa Jul 6, 2021
27d1d80
add MIX.js
NobyDa Jul 6, 2021
cc338ed
add Polarr.js
NobyDa Jul 6, 2021
f29e77d
add bilibili manga exchange points script.
NobyDa Jul 16, 2021
4187171
update wechat rule set.
NobyDa Jul 17, 2021
91a8781
add config parameter table.
NobyDa Jul 17, 2021
e6bd8af
update desc.
NobyDa Jul 17, 2021
e86555a
Update JD_DailyBonus.js
sudojia Jul 21, 2021
513f379
Merge pull request #315 from sudojia/patch-1
NobyDa Jul 21, 2021
e87e5f9
add bahamut daily bonus scripts.
NobyDa Jul 24, 2021
2cf9e19
update ruleset.
NobyDa Jul 24, 2021
6ec7d83
update desc.
NobyDa Jul 24, 2021
bcdd05a
add bahamut daily bonus OTP and ads bonus support.
NobyDa Jul 27, 2021
9b55c06
add TOTP algorithm scripts.
NobyDa Jul 29, 2021
78282e8
delete youtube ad scripts.
NobyDa Aug 2, 2021
82bc68d
Update wechat ruleset.
NobyDa Aug 7, 2021
38ca4c0
Update ruleset.
NobyDa Aug 8, 2021
3d104f7
京东-领京豆 签到添加
jiulan Aug 12, 2021
1b2e167
minor improvements.
NobyDa Aug 12, 2021
b50a93a
Merge pull request #324 from jiulan/patch-1
NobyDa Aug 12, 2021
d6f3360
fix: 在Node环境下,CookieSet生成在执行目录下,而非当前目录下
chesterchenn Aug 13, 2021
5f04908
Merge pull request #326 from chesterchenn/PR
NobyDa Aug 13, 2021
b7cae9f
Update JD_DailyBonus.js regex.
NobyDa Aug 15, 2021
2ba1343
Update boxjs subs.
NobyDa Aug 15, 2021
a8ec88e
Refactored cookie code in JD_DailyBonus.js
NobyDa Aug 15, 2021
21598a0
Fix #328
NobyDa Aug 15, 2021
6de5d0e
Update ruleset.
NobyDa Aug 15, 2021
7de0904
Fix JD cookie compatibility issue with scriptable.
NobyDa Aug 17, 2021
63b002d
Update ruleset.
NobyDa Aug 19, 2021
75af865
Fix #333
NobyDa Aug 26, 2021
90019f8
Update JD daily bonus.
NobyDa Aug 26, 2021
b72145c
Update ruleset.
NobyDa Aug 26, 2021
079e5e8
Update ruleset.
NobyDa Aug 27, 2021
e50afc1
Update ruleset.
NobyDa Aug 30, 2021
79fe581
Update rewrite rules.
NobyDa Sep 8, 2021
7b1c148
Fix JD scripts.
NobyDa Sep 9, 2021
8f882c9
Update ruleset.
NobyDa Sep 9, 2021
97cd139
Add Bark APP notification API.
NobyDa Sep 22, 2021
bd608b8
Update Js.conf
lyhfree Sep 24, 2021
51feeb9
Merge pull request #345 from lyhfree/patch-1
NobyDa Sep 26, 2021
9da1676
Fix douban rating in Bili_Auto_Regions.js
NobyDa Sep 26, 2021
f9e67e9
add iQIYI daily task
IPlayForHer Dec 2, 2021
0b61569
remove useless function iQIYI daily task
IPlayForHer Dec 3, 2021
7cd86a0
update format
IPlayForHer Dec 3, 2021
f18801e
update format
IPlayForHer Dec 3, 2021
1facff8
fix #359
NobyDa Jan 18, 2022
b08bb14
fix regex rules.
NobyDa Jan 18, 2022
6893320
add fallback policy in Bili_Auto_Regions.js
NobyDa Jan 18, 2022
7e417ea
update ruleset.
NobyDa Jan 18, 2022
b1b49e5
修正爱奇艺签到
BlueSkyClouds Jan 24, 2022
7b978d2
fix
BlueSkyClouds Jan 24, 2022
cd99a7a
Merge pull request #364 from BlueSkyClouds/patch-1
NobyDa Jan 25, 2022
fef6c04
Merge branch 'master' into pr
NobyDa Jan 25, 2022
6cbebb9
Merge pull request #358 from IPlayForHer/pr
NobyDa Jan 25, 2022
c276421
fix #365
NobyDa Jan 25, 2022
6225185
fix possible script conflicts.
NobyDa Jan 25, 2022
c105465
fix #366
NobyDa Jan 26, 2022
a6e21ee
fix iqiyi script issues.
NobyDa Jan 26, 2022
3d6f8fc
update regex.
NobyDa Jan 26, 2022
017919d
update Bili_Auto_Regions.js regex.
NobyDa Jan 26, 2022
eb823ca
update rule set.
NobyDa Jan 26, 2022
1974901
update desc.
NobyDa Jan 26, 2022
92349b3
bug fixes.
NobyDa Jan 26, 2022
4fd9730
增加网页签到
BlueSkyClouds Jan 27, 2022
b1d479a
Merge pull request #367 from BlueSkyClouds/patch-2
NobyDa Jan 27, 2022
c02d6c9
fix and improve iqiyi script.
NobyDa Jan 27, 2022
1fe2570
Bark通知支持自建服务端
blackmatrix7 Jan 28, 2022
7df9428
fix
NobyDa Jan 28, 2022
8add73a
Merge pull request #368 from blackmatrix7/master
NobyDa Jan 28, 2022
3188af6
minor improvements.
NobyDa Feb 6, 2022
09e31f9
Update rule set.
NobyDa Feb 27, 2022
8c5585b
self update issue improvements.
NobyDa Mar 3, 2022
30712dc
rule set correction.
NobyDa Mar 4, 2022
98b87b1
add bahamut anime improvement scripts.
NobyDa Mar 10, 2022
8a4364d
update rule set.
NobyDa Apr 25, 2022
a2630b4
update readme.
NobyDa Apr 25, 2022
cf352a5
Update Js.conf
Durian-Life May 1, 2022
8ae83e9
Merge pull request #389 from Durian-Life/patch-1
NobyDa May 1, 2022
8100443
Update and rename Loon_TF_Download.conf to Loon_TF_Download.plugin
Tartarus2014 May 14, 2022
5718403
Merge pull request #390 from Tartarus2014/patch-1
NobyDa May 14, 2022
09b259e
Update and rename Loon_TF_Download.plugin to Loon_TF_Download.conf
Tartarus2014 May 14, 2022
a76eff8
Merge pull request #391 from Tartarus2014/patch-2
NobyDa May 14, 2022
a4f1266
Update Js.conf
NobyDa May 16, 2022
8404c2c
Update Zymh.js
NobyDa May 16, 2022
6924ce9
Fix Douban rating query may fail in some episodes.
NobyDa May 16, 2022
5e11ea2
Update support sub-store 1.5
NobyDa Jun 2, 2022
c6bfe94
Update WeChat.list
paxprot Jun 5, 2022
33b5d5c
Merge pull request #394 from paxprot/patch-1
NobyDa Jun 5, 2022
1e4ee6c
Update vsco.js
NobyDa Jun 6, 2022
16fee8c
Update Js.conf
NobyDa Jun 6, 2022
f80a7e5
Update support sub-store 1.6
NobyDa Jun 12, 2022
735063e
Fix broad match issues #396
NobyDa Jun 13, 2022
762148e
Fix HTTP/2 issues.
NobyDa Jun 15, 2022
55e0573
Minor improvement.
NobyDa Jun 16, 2022
20238e7
Loon plugin suffix name replace
NobyDa Jun 16, 2022
705fd0e
Add Bahamut ad script to Loon plugin
NobyDa Jun 16, 2022
9921723
Update readme
NobyDa Jun 16, 2022
b1bf8ad
Bug fixes.
NobyDa Jun 18, 2022
4d5df9b
Fixed 52pojie.cn daily bonus script
NobyDa Jun 18, 2022
0ab27f2
Copywriting adjustments
NobyDa Jun 18, 2022
5ec0a35
Fixed iqiyi cookie issues
NobyDa Jun 18, 2022
595f2d6
Update CamScanner Expire Time (#401)
Extra2001 Jun 19, 2022
035f8e3
Add TestFlight account script.
NobyDa Jun 22, 2022
28bcd73
Update store ID
NobyDa Jun 29, 2022
f489cbb
Update support 1Blocker in-app purchases.
NobyDa Jul 2, 2022
ac52581
Update vivavideo script regex
NobyDa Jul 3, 2022
6f0b859
Adjust readme
NobyDa Jul 3, 2022
7050d23
Update wps.js regex
NobyDa Jul 3, 2022
0ea7504
Update README.md
NobyDa Jul 3, 2022
a1fc135
Added SwitchRegion parameters (#406)
AisukaYuki Jul 5, 2022
9e9103e
Fix Surge HTTP/2 and other minor issues
NobyDa Jul 5, 2022
15c42fb
Fix QuantumultX resource parser issue
NobyDa Jul 5, 2022
0d7b085
Update desc.
NobyDa Jul 9, 2022
18dd536
Update Surge modules.
NobyDa Jul 11, 2022
594d334
Fix some issues with Bili_Auto_Regions.js
NobyDa Jul 29, 2022
e954e65
Fix #413
NobyDa Aug 1, 2022
fdd1260
Fix #409
NobyDa Aug 1, 2022
bf80e28
Fix #418
NobyDa Sep 2, 2022
d90e51d
Update WeChat.list (#424)
yyl217 Sep 24, 2022
f87ce0b
delete WebCheckin (#428)
BlueSkyClouds Nov 8, 2022
3986481
$loon的输出不再支持上述代码,因此这里只能删除 (#430)
Pegasus02 Nov 11, 2022
2c9001c
Refresh date.
NobyDa Jan 15, 2023
9afc540
Add bypass Google CAPTCHA script.
NobyDa Jan 15, 2023
fdb3a40
Improve region match accuracy.
NobyDa Feb 10, 2023
f5a0057
Fixed #438
NobyDa Feb 11, 2023
2aefff5
Fix iqiyi script push content.
NobyDa Feb 15, 2023
503bf08
Minor improvements to iqiyi script.
NobyDa Feb 26, 2023
9750492
Adapt to new version bahamut API.
NobyDa Feb 27, 2023
50389e5
Add new-bing surge module.
NobyDa Feb 28, 2023
cc62f66
Add new-bing qx snippet.
NobyDa Feb 28, 2023
0925f47
delete dfp (#442)
BlueSkyClouds Mar 14, 2023
a6b8d54
Remove invalid scripts in qx snippet
NobyDa Mar 14, 2023
eb2eabc
Update overview
NobyDa Mar 14, 2023
60a1f67
Minor improvements.
NobyDa Apr 4, 2023
cc03f71
Fix #444
NobyDa Apr 28, 2023
446dfd2
Fix #451
NobyDa Jun 12, 2023
21b9498
Update MIX.js (#452)
jarieshan Jun 27, 2023
f7a1e8c
fix bug in rare cases.
NobyDa Jun 27, 2023
5de8bd5
Remove obsolete files.
NobyDa Aug 16, 2023
592c63a
Update ipa installer script.
NobyDa Aug 16, 2023
be5185e
Merge branch 'ipa-installer'
NobyDa Aug 16, 2023
efa8b87
Update readme.
NobyDa Aug 16, 2023
89e4dc6
Update shortcut url to support ios15.
NobyDa Aug 16, 2023
f6cabc3
Update various script data.
NobyDa Aug 17, 2023
a20ef85
Add iOS14 shortcut.
NobyDa Aug 24, 2023
ae4c12f
Re add surge new bing module.
NobyDa Aug 28, 2023
cc13ac8
Fix rule list.
NobyDa Dec 23, 2023
4bb0866
Minor improvements.
NobyDa Feb 22, 2024
952ba76
Minor improvements.
NobyDa Feb 22, 2024
bff2074
Add rule storage script.
NobyDa Feb 24, 2024
7771161
Bug fixes.
NobyDa Feb 26, 2024
a5e6b05
bug fixes.
NobyDa Mar 18, 2024
6cac08a
Add testflight account app list cache
NobyDa Mar 22, 2024
273dd80
Bug fixes.
NobyDa Mar 22, 2024
aa07848
fix shadowrocket issues.
NobyDa Mar 23, 2024
8f5f61e
add support for mac force ios headers.
NobyDa Mar 25, 2024
346b68a
add debug script.
NobyDa Mar 25, 2024
f5f752f
Improved cache structure to cache all requests.
NobyDa Apr 4, 2024
b00608e
bug fixes.
NobyDa Apr 5, 2024
458659b
Enable cache is set to default
NobyDa Apr 5, 2024
6137b5a
Minor improvements.
NobyDa Apr 7, 2024
16a20f1
Reduce cache time.
NobyDa Apr 13, 2024
56285e8
Optimize NE memory usage.
NobyDa Apr 15, 2024
d10c2c7
bug fixes.
NobyDa Apr 26, 2024
75023e3
Add disney+ rating script.
NobyDa May 4, 2024
1f2ceb1
Update google CAPTCHA
NobyDa May 5, 2024
b929f67
Fix module issues.
NobyDa May 5, 2024
be72872
Fix benchmark domain issues.
NobyDa May 7, 2024
782fa36
Add ctrip script.
NobyDa May 9, 2024
9943734
Resource improvements.
NobyDa May 9, 2024
3c455ca
Improvement notes.
NobyDa May 9, 2024
3b34931
Improvement notes.
NobyDa May 9, 2024
d55c48e
Minor improvements.
NobyDa May 9, 2024
6f41850
Fix iqiyi script issues.
NobyDa May 14, 2024
fd6be08
Google_CAPTCHA.js now compatible with qx.
NobyDa May 16, 2024
e28453c
Google_CAPTCHA.js now supports loon
NobyDa May 19, 2024
ad57633
Minor improvements.
NobyDa Jun 2, 2024
c3289c8
Subscription improvements.
NobyDa Jun 2, 2024
1ac36bd
bug fixes. (#481)
ocd0711 Jun 19, 2024
10d1426
Optimize memory usage.
NobyDa Aug 11, 2024
b11b9be
revision.
NobyDa Jan 16, 2025
42f36ab
Update disney+ rating regex.
NobyDa Jul 17, 2025
7f8b309
Refactoring bili checkin/points scripts.
NobyDa Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions 52pojie-DailyBonus/52pojie.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
/*
吾爱破解签到脚本

更新时间: 2022.6.18
脚本兼容: QuantumultX, Surge, Loon, Node.js
电报频道: @NobyDa
问题反馈: @NobyDa_bot

************************
QX, Surge, Loon说明:
************************
手动登录 https://www.52pojie.cn/home.php 如通知成功获取cookie, 则可以使用此签到脚本.
获取Cookie后, 请将Cookie脚本禁用并移除主机名, 以免产生不必要的MITM.
脚本将在每天上午9点执行, 您可以修改执行时间.

************************
Node.js说明:
************************
需自行安装"got"与"iconv-lite"模块. 例: npm install got iconv-lite -g

抓取Cookie说明:
浏览器打开 https://www.52pojie.cn/home.php 登录账号后, 开启抓包软件并刷新页面.
抓取该URL请求头下的Cookie字段, 填入以下CookieWA的单引号内即可. */

const CookieWA = '';

//Bark APP 通知推送Key
const barkKey = '';

/***********************
Surge 4.2.0+ 脚本配置:
************************

[Script]
吾爱签到 = type=cron,cronexp=0 9 * * *,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js

吾爱获取Cookie = type=http-request,pattern=https:\/\/www\.52pojie\.cn\/home\.php\?,script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js

[MITM]
hostname= www.52pojie.cn

************************
QuantumultX 远程脚本配置:
************************

[task_local]
# 吾爱签到
0 9 * * * https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js

[rewrite_local]
# 获取Cookie
https:\/\/www\.52pojie\.cn\/home\.php\? url script-request-header https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js

[mitm]
hostname= www.52pojie.cn

************************
Loon 2.1.0+ 脚本配置:
************************

[Script]
# 吾爱签到
cron "0 9 * * *" script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js

# 获取Cookie
http-request https:\/\/www\.52pojie\.cn\/home\.php\? script-path=https://raw.githubusercontent.com/NobyDa/Script/master/52pojie-DailyBonus/52pojie.js

[Mitm]
hostname= www.52pojie.cn
*/

const $ = API('nobyda_52pojie');
const date = new Date();
const reqData = {
url: 'https://www.52pojie.cn/home.php?mod=task&do=apply&id=2',
headers: {
Cookie: CookieWA || $.read("COOKIE"),
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",
}
};
if ($.env.isRequest) {
GetCookie()
} else if (!reqData.headers.Cookie) {
$.notify('吾爱破解', ``, `未填写/未获取Cookie!`);
} else if (!reqData.headers.Cookie.includes('_auth=')) {
$.notify('吾爱破解', ``, `Cookie关键授权字段缺失, 需重新获取!`);
} else {
$.http.put(reqData)
.then((resp) => {
if (resp.body.match(/(ÒÑÍê³É|\u606d\u559c\u60a8|��̳΢�š��ᰮ�ƽ�)/)) {
$.msgBody = date.getMonth() + 1 + "月" + date.getDate() + "日, 签到成功 🎉"
} else if (resp.body.match(/(ÄúÒÑ|\u4e0b\u671f\u518d\u6765|>��Ǹ������)/)) {
$.msgBody = date.getMonth() + 1 + "月" + date.getDate() + "日, 已签过 ⚠️"
} else if (resp.body.match(/(ÏȵǼ|\u9700\u8981\u5148\u767b\u5f55|�Ҫ�ȵ�¼���ܼ�)/)) {
$.msgBody = "签到失败, Cookie失效 ‼️‼️"
} else if (resp.statusCode == 403) {
$.msgBody = "服务器暂停签到 ⚠️"
} else {
$.msgBody = "脚本待更新 ‼️‼️"
}
})
.catch((err) => ($.msgBody = `签到失败 ‼️‼️\n${err || err.message}`))
.finally(async () => {
if (barkKey) {
await BarkNotify($, barkKey, '吾爱破解', $.msgBody);
}
$.notify('吾爱破解', ``, $.msgBody);
$.done();
})
}

function GetCookie() {
const TM = $.read("TIME");
const CK = $request.headers['Cookie'] || $request.headers['cookie'];
if (CK && CK.includes('_auth=')) {
$.write(CK, "COOKIE");
if (!TM || TM && (Date.now() - TM) / 1000 >= 21600) {
$.notify("吾爱破解", "", `写入Cookie成功 🎉`);
$.write(JSON.stringify(Date.now()), "TIME");
} else {
$.info(`吾爱破解\n写入Cookie成功 🎉`)
}
} else {
$.info(`吾爱破解\n写入Cookie失败, 关键值缺失`)
}
$.done()
}

//Bark APP notify
async function BarkNotify(c, k, t, b) { for (let i = 0; i < 3; i++) { console.log(`🔷Bark notify >> Start push (${i + 1})`); const s = await new Promise((n) => { c.post({ url: 'https://api.day.app/push', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ title: t, body: b, device_key: k, ext_params: { group: t } }) }, (e, r, d) => r && r.status == 200 ? n(1) : n(d || e)) }); if (s === 1) { console.log('✅Push success!'); break } else { console.log(`❌Push failed! >> ${s.message || s}`) } } };

//https://github.com/Peng-YM/QuanX/tree/master/Tools/OpenAPI
function ENV() { const e = "function" == typeof require && "undefined" != typeof $jsbox; return { isQX: "undefined" != typeof $task, isLoon: "undefined" != typeof $loon, isSurge: "undefined" != typeof $httpClient && "undefined" == typeof $loon, isBrowser: "undefined" != typeof document, isNode: "function" == typeof require && !e, isJSBox: e, isRequest: "undefined" != typeof $request, isScriptable: "undefined" != typeof importModule } } function HTTP(e = { baseURL: "" }) { function t(t, a) { a = "string" == typeof a ? { url: a } : a; const h = e.baseURL; h && !d.test(a.url || "") && (a.url = h ? h + a.url : a.url), a.body && a.headers && !a.headers["Content-Type"] && (a.headers["Content-Type"] = "application/x-www-form-urlencoded"), a = { ...e, ...a }; const c = a.timeout, l = { onRequest: () => { }, onResponse: e => e, onTimeout: () => { }, ...a.events }; let f, y; if (l.onRequest(t, a), s) f = $task.fetch({ method: t, ...a }); else if (o || n) f = new Promise((e, s) => { $httpClient[t.toLowerCase()](a, (t, o, n) => { t ? s(t) : e({ statusCode: o.status || o.statusCode, headers: o.headers, body: n }) }) }); else if (r) { const e = require("got"), s = require("iconv-lite"); f = new Promise((o, n) => { e[t.toLowerCase()](a).then(e => o({ statusCode: e.statusCode, headers: e.headers, body: s.decode(e.rawBody, "utf-8") })).catch(n) }) } else if (i) { const e = new Request(a.url); e.method = t, e.headers = a.headers, e.body = a.body, f = new Promise((t, s) => { e.loadString().then(s => { t({ statusCode: e.response.statusCode, headers: e.response.headers, body: s }) }).catch(e => s(e)) }) } else u && (f = new Promise((e, s) => { fetch(a.url, { method: t, headers: a.headers, body: a.body }).then(e => e.json()).then(t => e({ statusCode: t.status, headers: t.headers, body: t.data })).catch(s) })); const p = c ? new Promise((e, s) => { y = setTimeout(() => (l.onTimeout(), s(`${t} URL: ${a.url} exceeds the timeout ${c} ms`)), c) }) : null; return (p ? Promise.race([p, f]).then(e => (clearTimeout(y), e)) : f).then(e => l.onResponse(e)) } const { isQX: s, isLoon: o, isSurge: n, isScriptable: i, isNode: r, isBrowser: u } = ENV(), a = ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"], d = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/, h = {}; return a.forEach(e => h[e.toLowerCase()] = (s => t(e, s))), h } function API(e = "untitled", t = !1) { const { isQX: s, isLoon: o, isSurge: n, isNode: i, isJSBox: r, isScriptable: u } = ENV(); return new class { constructor(e, t) { this.name = e, this.debug = t, this.http = HTTP(), this.env = ENV(), this.node = (() => { if (i) { const e = require("fs"); return { fs: e } } return null })(), this.initCache(); const s = (e, t) => new Promise(function (s) { setTimeout(s.bind(null, t), e) }); Promise.prototype.delay = function (e) { return this.then(function (t) { return s(e, t) }) } } initCache() { if (s && (this.cache = JSON.parse($prefs.valueForKey(this.name) || "{}")), (o || n) && (this.cache = JSON.parse($persistentStore.read(this.name) || "{}")), i) { let e = "root.json"; this.node.fs.existsSync(e) || this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.root = {}, e = `${this.name}.json`, this.node.fs.existsSync(e) ? this.cache = JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)) : (this.node.fs.writeFileSync(e, JSON.stringify({}), { flag: "wx" }, e => console.log(e)), this.cache = {}) } } persistCache() { const e = JSON.stringify(this.cache, null, 2); s && $prefs.setValueForKey(e, this.name), (o || n) && $persistentStore.write(e, this.name), i && (this.node.fs.writeFileSync(`${this.name}.json`, e, { flag: "w" }, e => console.log(e)), this.node.fs.writeFileSync("root.json", JSON.stringify(this.root, null, 2), { flag: "w" }, e => console.log(e))) } write(e, t) { if (this.log(`SET ${t}`), -1 !== t.indexOf("#")) { if (t = t.substr(1), n || o) return $persistentStore.write(e, t); if (s) return $prefs.setValueForKey(e, t); i && (this.root[t] = e) } else this.cache[t] = e; this.persistCache() } read(e) { return this.log(`READ ${e}`), -1 === e.indexOf("#") ? this.cache[e] : (e = e.substr(1), n || o ? $persistentStore.read(e) : s ? $prefs.valueForKey(e) : i ? this.root[e] : void 0) } delete(e) { if (this.log(`DELETE ${e}`), -1 !== e.indexOf("#")) { if (e = e.substr(1), n || o) return $persistentStore.write(null, e); if (s) return $prefs.removeValueForKey(e); i && delete this.root[e] } else delete this.cache[e]; this.persistCache() } notify(e, t = "", a = "", d = {}) { const h = d["open-url"], c = d["media-url"]; if (s && $notify(e, t, a, d), n && $notification.post(e, t, a + `${c ? "\n多媒体:" + c : ""}`, { url: h }), o) { let s = {}; h && (s.openUrl = h), c && (s.mediaUrl = c), "{}" === JSON.stringify(s) ? $notification.post(e, t, a) : $notification.post(e, t, a, s) } if (i || u) { const s = a + (h ? `\n点击跳转: ${h}` : "") + (c ? `\n多媒体: ${c}` : ""); if (r) { const o = require("push"); o.schedule({ title: e, body: (t ? t + "\n" : "") + s }) } else console.log(`${e}\n${t}\n${s}\n\n`) } } log(e) { this.debug && console.log(`[${this.name}] LOG: ${this.stringify(e)}`) } info(e) { console.log(`[${this.name}] INFO: ${this.stringify(e)}`) } error(e) { console.log(`[${this.name}] ERROR: ${this.stringify(e)}`) } wait(e) { return new Promise(t => setTimeout(t, e)) } done(e = {}) { s || o || n ? $done(e) : i && !r && "undefined" != typeof $context && ($context.headers = e.headers, $context.statusCode = e.statusCode, $context.body = e.body) } stringify(e) { if ("string" == typeof e || e instanceof String) return e; try { return JSON.stringify(e, null, 2) } catch (e) { return "[object Object]" } } }(e, t) }
Loading