-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathydz.js
2107 lines (2067 loc) · 81.9 KB
/
ydz.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ziye
github地址 https://github.com/ziye11
TG频道地址 https://t.me/ziyescript
TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g
boxjs链接 https://raw.githubusercontent.com/ziye11/JavaScript/main/Task/ziye.boxjs.json
转载请备注个名字,谢谢
⚠️悦动族
点击 http://yuedongzu.yichengw.cn/?id=28844 下载APP 或者APP Store 搜索悦动族
2.28 制作
3.1 完成
3.1-2 修复前置报错,修复签到问题
3.2 调整抽奖机制,一次运行5次抽奖,抽中1000金币则兑奖
3.2 修复手机不能跑的低级错误,调整提现时间为8点以后
3.2-3 增加10分钟限速,修复用户名判定,修复视频助力
⚠️ 时间设置 0,30 0-23 * * * 每天 25次以上就行
一 视频助力手动也是不行的
二 默认20点睡7点醒,时间务必包括这两个点
(已内置随机udid,添加重写无视多设备检测,如非必要,勿频繁登录)
⚠️一共1个位置 1个ck 👉 2条 Secrets
多账号换行
第一步 添加 hostname=yuedongzu.yichengw.cn,
第二步 ⚠️添加悦动族获取TOKEN重写
登录悦动族 获取token
yuedongzutokenVal 👉YDZ_yuedongzuTOKEN
CASH 👉 YDZ_CASH 可设置0 0.3 1 5 50 100 200 888 默认0关闭提现,设置888由上至下循环提现
⚠️主机名以及重写👇
hostname=yuedongzu.yichengw.cn,
############## 圈x
#悦动族获取TOKEN
https:\/\/yuedongzu\.yichengw\.cn\/* url script-request-header https://raw.githubusercontent.com/ziye11/JavaScript/main/Task/yuedongzu.js
############## loon
#悦动族获取TOKEN
http-response https:\/\/yuedongzu\.yichengw\.cn\/* script-path=https://raw.githubusercontent.com/ziye11/JavaScript/main/Task/yuedongzu.js, requires-body=1,max-size=0, tag=悦动族获取TOKEN
############## surge
#悦动族获取TOKEN
悦动族获取TOKEN = type=http-response,pattern=https:\/\/yuedongzu\.yichengw\.cn\/*,script-path=https://raw.githubusercontent.com/ziye11/JavaScript/main/Task/yuedongzu.js
*/
const $ = Env("悦动族");
$.idx = ($.idx = ($.getval('yuedongzuSuffix') || '1') - 1) > 0 ? ($.idx + 1 + '') : ''; // 账号扩展字符
const notify = $.isNode() ? require("./sendNotify") : ``;
const COOKIE = $.isNode() ? require("./yuedongzuCOOKIE") : ``;
const logs = 0; // 0为关闭日志,1为开启
const notifyttt = 1 // 0为关闭外部推送,1为12 23 点外部推送
const notifyInterval = 2; // 0为关闭通知,1为所有通知,2为12 23 点通知 , 3为 6 12 18 23 点通知
$.message = '', COOKIES_SPLIT = '', CASH = '', CZ = '', ddtime = '';
const yuedongzutokenArr = [];
let yuedongzutokenVal = ``;
let middleyuedongzuTOKEN = [];
if ($.isNode()) {
// 没有设置 YDZ_CASH 则默认为 0 不兑换
CASH = process.env.YDZ_CASH || 0;
}
if ($.isNode() && process.env.YDZ_yuedongzuTOKEN) {
COOKIES_SPLIT = process.env.COOKIES_SPLIT || "\n";
console.log(
`============ cookies分隔符为:${JSON.stringify(
COOKIES_SPLIT
)} =============\n`
);
if (
process.env.YDZ_yuedongzuTOKEN &&
process.env.YDZ_yuedongzuTOKEN.indexOf(COOKIES_SPLIT) > -1
) {
middleyuedongzuTOKEN = process.env.YDZ_yuedongzuTOKEN.split(COOKIES_SPLIT);
} else {
middleyuedongzuTOKEN = process.env.YDZ_yuedongzuTOKEN.split();
}
}
if (COOKIE.yuedongzutokenVal) {
YDZ_COOKIES = {
"yuedongzutokenVal": COOKIE.yuedongzutokenVal.split('\n'),
}
Length = YDZ_COOKIES.yuedongzutokenVal.length;
}
if (!COOKIE.yuedongzutokenVal) {
if ($.isNode()) {
Object.keys(middleyuedongzuTOKEN).forEach((item) => {
if (middleyuedongzuTOKEN[item]) {
yuedongzutokenArr.push(middleyuedongzuTOKEN[item]);
}
});
} else {
yuedongzutokenArr.push($.getdata("yuedongzutoken"));
// 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理
if ("yuedongzuCASH") {
CASH = $.getval("yuedongzuCASH") || '0';
}
let yuedongzuCount = ($.getval('yuedongzuCount') || '1') - 0;
for (let i = 2; i <= yuedongzuCount; i++) {
if ($.getdata(`yuedongzutoken${i}`)) {
yuedongzutokenArr.push($.getdata(`yuedongzutoken${i}`));
}
}
}
if (yuedongzutokenArr == '') {
Length = 0
} else Length = yuedongzutokenArr.length
}
function GetCookie() {
if ($request && $request.url.indexOf("login") >= 0) {
modifiedHeaders = $request.headers;
modifiedHeaders['imei'] = udid()
console.log(JSON.stringify(modifiedHeaders));
$done({
headers: modifiedHeaders
});
}
if ($request && $request.url.indexOf("profile") >= 0) {
const yuedongzutokenVal = $request.headers.Authorization;
if (yuedongzutokenVal) $.setdata(yuedongzutokenVal, "yuedongzutoken" + $.idx);
$.log(
`[${$.name + $.idx}] 获取yuedongzutokenVal✅: 成功,yuedongzutokenVal: ${yuedongzutokenVal}`
);
$.msg($.name + $.idx, `获取yuedongzutokenVal: 成功🎉`, ``);
}
}
console.log(
`================== 脚本执行 - 北京时间(UTC+8):${new Date(
new Date().getTime() +
new Date().getTimezoneOffset() * 60 * 1000 +
8 * 60 * 60 * 1000
).toLocaleString()} =====================\n`
);
console.log(
`============ 共 ${Length} 个${$.name}账号=============\n`
);
//时间
nowTimes = new Date(
new Date().getTime() +
new Date().getTimezoneOffset() * 60 * 1000 +
8 * 60 * 60 * 1000
);
//今天
Y = nowTimes.getFullYear() + '-';
M = (nowTimes.getMonth() + 1 < 10 ? '0' + (nowTimes.getMonth() + 1) : nowTimes.getMonth() + 1) + '-';
D = (nowTimes.getDate() < 10 ? '0' + (nowTimes.getDate()) : nowTimes.getDate());
ddtime = Y + M + D;
console.log(ddtime)
//当前时间戳
function tts(inputTime) {
if ($.isNode()) {
TTS = Math.round(new Date().getTime() +
new Date().getTimezoneOffset() * 60 * 1000).toString();
} else TTS = Math.round(new Date().getTime() +
new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000).toString();
return TTS;
};
//当前10位时间戳
function ts(inputTime) {
if ($.isNode()) {
TS = Math.round((new Date().getTime() +
new Date().getTimezoneOffset() * 60 * 1000) / 1000).toString();
} else TS = Math.round((new Date().getTime() +
new Date().getTimezoneOffset() * 60 * 1000 +
8 * 60 * 60 * 1000) / 1000).toString();
return TS;
};
//今天0点时间戳时间戳
function daytime(inputTime) {
if ($.isNode()) {
DAYTIME =
new Date(new Date().toLocaleDateString()).getTime() - 8 * 60 * 60 * 1000;
} else DAYTIME = new Date(new Date().toLocaleDateString()).getTime();
return DAYTIME;
};
//时间戳格式化日期
function time(inputTime) {
if ($.isNode()) {
var date = new Date(inputTime + 8 * 60 * 60 * 1000);
} else var date = new Date(inputTime);
Y = date.getFullYear() + '-';
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
D = date.getDate() + ' ';
h = date.getHours() + ':';
m = date.getMinutes() + ':';
s = date.getSeconds();
return Y + M + D + h + m + s;
};
//日期格式化时间戳
function timecs() {
if ($.isNode()) {
var date = new Date(newtime).getTime() - 8 * 60 * 60 * 1000
} else var date = new Date(newtime).getTime()
return date;
};
//随机udid 大写
function udid() {
var s = [];
var hexDigits = "0123456789ABCDEF";
for (var i = 0; i < 36; i++) {
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
}
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
s[8] = s[13] = s[18] = s[23] = "-";
var uuid = s.join("");
return uuid;
}
//随机udid 小写
function udid2() {
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
//编码
function encodeUnicode(str) {
var res = [];
for (var i = 0; i < str.length; i++) {
res[i] = ("00" + str.charCodeAt(i).toString(16)).slice(-4);
}
return "\\u" + res.join("\\u");
}
//解码
function decodeUnicode(str) {
str = str.replace(/\\/g, "%");
return unescape(str);
}
let isGetCookie = typeof $request !== 'undefined'
if (isGetCookie) {
GetCookie()
$.done();
} else {
!(async () => {
await all();
await msgShow();
})()
.catch((e) => {
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
})
.finally(() => {
$.done();
})
}
async function all() {
if (!Length) {
$.msg(
$.name,
'提示:⚠️请点击前往获取 http://yuedongzu.yichengw.cn/?id=28844\n',
' http://yuedongzu.yichengw.cn/?id=28844', {
"open-url": " http://yuedongzu.yichengw.cn/?id=28844"
}
);
return;
}
for (let i = 0; i < Length; i++) {
if (COOKIE.yuedongzutokenVal) {
yuedongzutokenVal = YDZ_COOKIES.yuedongzutokenVal[i];
}
if (!COOKIE.yuedongzutokenVal) {
yuedongzutokenVal = yuedongzutokenArr[i];
}
header = {
'store': `appstore`,
'Authorization': `${yuedongzutokenVal}`,
'Connection': `keep-alive`,
'Accept-Encoding': `gzip, deflate, br`,
'version': `3`,
'idfa': ``,
'Content-Type': `application/x-www-form-urlencoded`,
'User-Agent': `YDZ/20 CFNetwork/1206 Darwin/20.1.0`,
'platform': `2`,
'imei': ``,
'Host': `yuedongzu.yichengw.cn`,
'Accept-Language': `zh-cn`,
'Accept': `*/*`
};
O = (`${$.name + (i + 1)}🔔`);
await console.log(`-------------------------\n\n🔔开始运行【${$.name+(i+1)}】`)
let cookie_is_live = await user(); //用户名
if (!cookie_is_live) {
continue;
}
await jinbi_record() //收益记录
if (CZ >= 10) {
await help_index() //助力活动
await home() //首页信息
await coupon() //签到
await zhuan_index() //任务列表
await pophongbaoyu() //红包雨
await dk_info() //打卡
await lucky() //转盘抽奖
await water_info() //喝水
await sleep_info() //睡觉
await ggk() //刮刮卡
await $.wait(8000)
await lucky() //转盘抽奖
await mystate() //福利
await kk_list() //看看赚
await news_info() //资讯赚
await tixian_html() //提现
}
}
}
//通知
function msgShow() {
return new Promise(async resolve => {
if (notifyInterval != 1) {
console.log($.name + '\n' + $.message);
}
if (notifyInterval == 1) {
$.msg($.name, ``, $.message);
}
if (notifyInterval == 2 && (nowTimes.getHours() === 12 || nowTimes.getHours() === 23) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10)) {
$.msg($.name, ``, $.message);
}
if (notifyInterval == 3 && (nowTimes.getHours() === 6 || nowTimes.getHours() === 12 || nowTimes.getHours() === 18 || nowTimes.getHours() === 23) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10)) {
$.msg($.name, ``, $.message);
}
if (notifyttt == 1 && $.isNode() && (nowTimes.getHours() === 12 || nowTimes.getHours() === 23) && (nowTimes.getMinutes() >= 0 && nowTimes.getMinutes() <= 10))
await notify.sendNotify($.name, $.message);
resolve()
})
}
//用户名
function user(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/user/profile?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 用户名🚩: ${data}`);
$.user = JSON.parse(data);
if ($.user.uid) {
console.log(`\n${O}\n========== ${$.user.username} ==========\n微信绑定:${$.user.wx_username},今日收益:${$.user.day_jinbi/10000}元\n现金余额:${$.user.money}元,累计收益:${$.user.leiji_jinbi/10000}元\n`)
$.message += `\n${O}\n========== 【${$.user.username}】 ==========\n【微信绑定】:${$.user.wx_username},今日收益:${$.user.day_jinbi/10000}元\n【现金余额】:${$.user.money}元,累计收益:${$.user.leiji_jinbi/10000}元\n`;
resolve(true);
}
if (!$.user.uid) {
$.msg(O, time(Number(tts())) + "❌❌❌COOKIE失效");
if ($.isNode()) {
notify.sendNotify(O, time(Number(tts())) + "❌❌❌COOKIE失效");
}
resolve(false);
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//收益记录
function jinbi_record(timeout = 0) {
return new Promise(async (resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/user/jinbi_record?`,
headers: header,
body: `page=1&page_limit=25&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 收益记录🚩: ${data}`);
$.jinbi_record = JSON.parse(data);
if ($.jinbi_record.code == 200) {
if ($.jinbi_record.data && $.jinbi_record.data[0].add_date) {
newtime = $.jinbi_record.data[0].add_date + 'T' + $.jinbi_record.data[0].add_time
CZ = ((tts() - timecs(newtime)) / 60000).toFixed(0)
console.log(`收益记录:距离上次收益${CZ}分钟,已限速10分钟\n`);
$.message += `【收益记录】:距离上次收益${CZ}分钟,已限速10分钟\n`;
} else CZ = 11
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
},
timeout)
})
}
//首页信息
function home(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/home?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 首页信息🚩: ${data}`);
$.home = JSON.parse(data);
if ($.home.lucky_jinbi) {
console.log(`首页信息:金币:${$.home.lucky_jinbi}金币,金币:${$.home.lucky_jinbi2}金币\n`);
$.message += `【首页信息】:金币:${$.home.lucky_jinbi}金币,金币:${$.home.lucky_jinbi2}金币\n`;
if ($.home.xuanfu_time) {
console.log(`红包等待:${$.home.xuanfu_time}秒\n`);
$.message += `【红包等待】:${$.home.xuanfu_time}秒\n`;
}
if ((!$.home.xuanfu_time || $.home.xuanfu_time <= 0) && $.home.xuanfu_st != 2) {
await xuanfu() //首页红包
}
if ($.home.lucky_jinbi != 0) {
lucky_pos = 1
await luckycoins() //首页金币1
}
if ($.home.lucky_jinbi2 != 0) {
lucky_pos = 2
await luckycoins() //首页金币2
}
if ($.home.xuanfu_st == 2) {
console.log(`首页红包:已完成\n`);
$.message += `【首页红包】:已完成\n`;
}
if ($.home.steps_btn_st == 1) {
await donejin() //步数奖励
}
if ($.home.jinbi > 0) {
collsteps() //步数金币
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//步数奖励
function donejin(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/donejin?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 步数奖励🚩: ${data}`);
$.donejin = JSON.parse(data);
if ($.donejin.code == 200) {
console.log(`步数奖励:${$.donejin.tip},${$.donejin.msg}\n`);
$.message += `【步数奖励】:${$.donejin.tip},${$.donejin.msg}\n`;
nonce_str = $.donejin.nonce_str
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//步数金币
function collsteps(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/collsteps?`,
headers: header,
body: `duihuan_dialog=0&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 步数金币🚩: ${data}`);
$.collsteps = JSON.parse(data);
if ($.collsteps.code == 200) {
console.log(`步数金币:${$.collsteps.jinbi}金币,${$.collsteps.msg}\n`);
$.message += `【步数金币】:${$.collsteps.jinbi}金币,${$.collsteps.msg}\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//首页红包
function xuanfu(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/xuanfu?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 首页红包🚩: ${data}`);
$.xuanfu = JSON.parse(data);
if ($.xuanfu.code == 200) {
console.log(`首页红包:领取${$.xuanfu.jinbi}金币\n`);
$.message += `【首页红包】:领取${$.xuanfu.jinbi}金币\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//附加处理
function index(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/index?`,
headers: header,
body: `nonce_str=${nonce_str}&tid=${tid}&pos=${pos}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 附加处理🚩:${data}`);
$.index = JSON.parse(data);
if ($.index.code == 200) {
console.log(`附加处理:成功\n`);
//$.message += `【附加处理】:成功\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//前置处理
function chuansj(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/chuansj?`,
headers: header,
body: `mini_pos=${mini_pos}&c_type=${c_type}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 前置处理🚩: ${data}`);
$.chuansj = JSON.parse(data);
if ($.chuansj.code == 200) {
console.log(`前置处理:成功\n`);
//$.message += `【前置处理】:成功\n`;
nonce_str = $.chuansj.nonce_str
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//首页金币
function luckycoins(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/luckycoins?`,
headers: header,
body: `lucky_pos=${lucky_pos}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 首页金币🚩: ${data}`);
$.luckycoins = JSON.parse(data);
if ($.luckycoins.code == 200) {
console.log(`首页金币:成功领取${$.luckycoins.jinbi}金币\n`);
$.message += `【首页金币】:成功领取${$.luckycoins.jinbi}金币\n`;
}
tid = 16
pos = 1
nonce_str = $.luckycoins.nonce_str
await index()
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//红包雨页
function pophongbaoyu(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/pophongbaoyu?`,
headers: header,
}
$.get(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 红包雨页🚩: ${data}`);
$.pophongbaoyu = JSON.parse(data);
if ($.pophongbaoyu.code == 200) {
console.log(`红包雨:剩余${$.pophongbaoyu.hongbaoyu_count}次\n`);
$.message += `【红包雨】:剩余${$.pophongbaoyu.hongbaoyu_count}次\n`;
if ($.pophongbaoyu.hongbaoyu_count != 0) {
await hongbaoyu() //红包雨
}
}
if ($.pophongbaoyu.hongbaoyu_time) {
console.log(`红包雨:剩余${$.pophongbaoyu.hongbaoyu_time }秒\n`);
$.message += `【红包雨】:剩余${$.pophongbaoyu.hongbaoyu_time }秒\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//红包雨
function hongbaoyu(timeout = 0) {
return new Promise(async (resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/hongbaoyu?`,
headers: header,
body: `close=(null)&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 红包雨🚩: ${data}`);
$.hongbaoyu = JSON.parse(data);
if ($.hongbaoyu.code == 200) {
console.log(`红包雨:${$.hongbaoyu.jinbi}金币,${$.hongbaoyu.message}\n`);
$.message += `【红包雨】:${$.hongbaoyu.jinbi}金币,${$.hongbaoyu.message}\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
},
timeout)
})
}
//助力活动
function help_index(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/help_index?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 助力活动🚩: ${data}`);
$.help_index = JSON.parse(data);
if ($.help_index.code == 200) {
console.log(`助力活动:现金${$.help_index.jinbi}元,差${$.help_index.diff_jinbi}元,时间剩余${($.help_index.time/3600).toFixed(0)}小时\n`);
$.message += `【助力活动】:现金${$.help_index.jinbi}元,差${$.help_index.diff_jinbi}元,时间剩余${($.help_index.time/3600).toFixed(0)}小时\n`;
nonce_str = $.help_index.nonce_str
if ($.help_index.diff_jinbi > 0 && $.help_index.btn_st == 0) {
await help_click()
} else {
console.log(`视频助力:今日已达到上限\n`);
$.message += `【视频助力】:今日已达到上限\n`;
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//视频助力
function help_click(timeout = 0) {
return new Promise(async (resolve) => {
mini_pos = 5
c_type = 0
await chuansj()
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/help_click?`,
headers: header,
body: `nonce_str=${nonce_str}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 视频助力🚩: ${data}`);
$.help_click = JSON.parse(data);
if ($.help_click.code == 200) {
console.log(`视频助力:${$.help_click.jinbi/10000}元,领取成功\n`);
$.message += `【视频助力】:${$.help_click.jinbi/10000}元,领取成功\n`;
tid = 15
pos = 1
await index()
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//提现券页
function coupon(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/coupon?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 提现券页🚩: ${data}`);
$.coupon = JSON.parse(data);
if ($.coupon.code == 200) {
qds = $.coupon.renwu.find(item => item.text === "今日已签" || item.text === "\u4eca\u65e5\u5df2\u7b7e");
if (qds) {
console.log(`每日签到:已完成,获得${qds.jinbi}金币\n`)
$.message += `【每日签到】:已完成,获得${qds.jinbi}金币\n`;
}
if (!qds) {
await signget() //签到
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//每日签到
function signget(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/sign?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 每日签到🚩: ${data}`);
$.sign = JSON.parse(data);
if ($.sign.code == 200) {
console.log(`每日签到:领取${$.sign.jinbi}金币\n`);
$.message += `【每日签到】:领取${$.sign.jinbi}金币\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//任务列表
function zhuan_index(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/zhuan_index?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 任务列表🚩: ${data}`);
$.zhuan_index = JSON.parse(data);
if ($.zhuan_index.code == 200) {
sps = $.zhuan_index.renwu.find(item => item.type === 5);
zxzs = $.zhuan_index.renwu.find(item => item.type === 18);
dks = $.zhuan_index.renwu.find(item => item.type === 6);
hss = $.zhuan_index.renwu.find(item => item.type === 7);
cjs = $.zhuan_index.renwu.find(item => item.type === 8);
ggks = $.zhuan_index.renwu.find(item => item.type === 11);
bss = $.zhuan_index.renwu.find(item => item.type === 13);
rwrw = $.zhuan_index.renwu.find(item => item.st === 1);
console.log(`${sps.title}:${sps.text}${sps.jinbi}金币\n${zxzs.title}:${zxzs.text}${zxzs.jinbi}金币\n${dks.title}:${dks.text}${dks.jinbi}金币\n${hss.title}:${hss.text}${hss.jinbi}金币\n${cjs.title}:${cjs.text}${cjs.jinbi}金币\n${ggks.title}:${ggks.text}${ggks.jinbi}金币\n${bss.title}:${bss.text}${bss.jinbi}金币\n`)
$.message += `【${sps.title}】:${sps.text}${sps.jinbi}金币\n【${zxzs.title}】:${zxzs.text}${zxzs.jinbi}金币\n【${dks.title}】:${dks.text}${dks.jinbi}金币\n【${hss.title}】:${hss.text}${hss.jinbi}金币\n【${cjs.title}】:${cjs.text}${cjs.jinbi}金币\n【${ggks.title}】:${ggks.text}${ggks.jinbi}金币\n【${bss.title}】:${bss.text}${bss.jinbi}金币\n`
if (sps.st == 0) {
await ssp() //视频任务
}
if (rwrw && rwrw.jinbi) {
taskid = rwrw.type
taskjinbi = rwrw.jinbi
await zhuan_done()
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//视频任务
async function ssp() {
console.log(`视频任务:开始执行\n`);
$.message += `【视频任务】:开始执行\n`;
c_type = 0
mini_pos = 0
tid = 14
pos = 1
await chuansj()
await index()
}
//早晚打卡页
function dk_info(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/dk_info?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 早晚打卡页🚩: ${data}`);
$.dk_info = JSON.parse(data);
if ($.dk_info.code == 200) {
now_time = $.dk_info.now_time
console.log(`早晚打卡页:${$.dk_info.day},${$.dk_info.title1}\n`);
$.message += `【早晚打卡页】:${$.dk_info.day},${$.dk_info.title1}\n`;
if ($.dk_info.is_dk == 0) {
await dk_click() //早晚打卡
}
if ($.dk_info.is_dk == 1) {
console.log(`早晚打卡:已完成\n`);
$.message += `【早晚打卡】:已完成\n`;
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//早晚打卡
function dk_click(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/dk_click?`,
headers: header,
body: `now_time=${now_time}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 早晚打卡🚩: ${data}`);
$.dk_click = JSON.parse(data);
if ($.dk_click.code == 200) {
console.log(`早晚打卡:获得${$.dk_click.jinbi}金币\n`);
$.message += `【早晚打卡】:获得${$.dk_click.jinbi}金币\n`;
tid = 16
pos = 1
nonce_str = $.dk_click.nonce_str
await index()
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//任务达成
function zhuan_done(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/zhuan_done?`,
headers: header,
body: `taskid=${taskid}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 任务达成🚩: ${data}`);
$.zhuan_done = JSON.parse(data);
if ($.zhuan_done.code == 200) {
console.log(`任务达成:获得${taskjinbi}金币\n`);
$.message += `【任务达成】:获得${taskjinbi}金币\n`;
tid = 16
pos = 1
nonce_str = $.zhuan_done.nonce_str
await index()
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//每天喝水
function water_info(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/water_info?`,
headers: header,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 每天喝水🚩: ${data}`);
$.water_info = JSON.parse(data);
if ($.water_info.code == 200) {
day_num = $.water_info.day_num
if ($.water_info.day_num <= 7 && $.water_info.next_time == 0) {
await water_click() //开始喝水
}
if ($.water_info.next_time) {
console.log(`每天喝水:已喝${$.water_info.day_num}杯\n`);
$.message += `【每天喝水】:已喝${$.water_info.day_num}杯\n`;
}
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//开始喝水
function water_click(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://yuedongzu.yichengw.cn/apps/water_click?`,
headers: header,
body: `day_num=${day_num}&`,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 开始喝水🚩: ${data}`);
$.water_click = JSON.parse(data);
if ($.water_click.code == 200) {
console.log(`${$.water_click.msg}:获得${$.water_click.jinbi}金币\n`);
$.message += `【${$.water_click.msg}】:获得${$.water_click.jinbi}金币\n`;
tid = 16
pos = 1
nonce_str = $.water_click.nonce_str
await index()
}
} catch (e) {
$.logErr(e, resp);
} finally {