-
Notifications
You must be signed in to change notification settings - Fork 22
/
iboxpay2.js
1721 lines (1615 loc) · 72.4 KB
/
iboxpay2.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/ziye66666
TG频道地址 https://t.me/ziyescript
TG交流群 https://t.me/joinchat/AAAAAE7XHm-q1-7Np-tF3g
boxjs链接 https://raw.githubusercontent.com/ziye66666/JavaScript/main/Task/ziye.boxjs.json
转载请备注个名字,谢谢
⚠️笑谱
脚本运行一次
则运行6次视频 1次金蛋 1次直播(直播默认关闭,且在8点到23点有效)
1.15 调整金蛋延迟为60秒
1.17 增加ck失效提醒,以及金币满额停止
1.27 笑谱恢复,活动id284
1.27-2 增加看直播功能,默认关闭,设置LIVE来开启 如 设置LIVE 为 60 则开启直播,并且次数达到60次停止
1.27-3 调整直播运行次数,运行一次脚本,执行6次直播
1.27-4 调整策略,6次视频1次金蛋1次直播
1.28 修复收益列表问题
1.29 活动id302
1.30 修复活动id频繁变动问题,修复金蛋视频id
1.30 解决ck失效问题
1.30-3 增加提现
1.31 增加180秒任务,优先直播,修改直播金币显示
1.31-2 调整判定
2.1 增加CK获取时间
2.2 优化
2.3 修复直播问题,采用真实直播id
2.3 设置LIVE 为61 时 单跑直播
2.3 修复错误,修复直播收益显示
2.4 修复金蛋问题,增加视频收益统计,增加上限判定,达到上限以及19点后不执行视频,
2.4 直播限制为30 设置LIVE为0 不跑直播,1跑直播和视频,2单跑直播
2.5 增加首次视频验证,灰号直接停止视频
2.6 修复判定错误,增加surge获取token重写
2.7 增加红包雨,设置LIVE等于3 开启
2.7-2 调整红包雨运行机制
2.8 修复无人直播出现的错误
2.8-2 修复红包雨结束报错
2.8-3 增加通过验证码获取token功能,并且内置header,新人设置LIVE为888
2.8-4 修复错误
2.10 修复红包雨问题,LIVE设置3 启动红包雨活动,修复版本问题
2.10-2 移除红包雨模块
2.11 移除视频时间限制,LIVE设置666做新人180秒任务
⚠️一共1个位置 1个ck 👉 5条 Secrets
多账号换行
⚠️方法一
第一步 进入笑谱 选择手机号登陆,输入手机号,点击获取验证码
第二步 ⚠️进入boxjs(其他平台则输入对应环境变量) 输入当前账号序号 输入手机号 和 验证码
第三步 运行js 手机则自动获取token(其他平台则复制token,填写环境变量) 然后回到boxjs 修改验证码为0
已全部操作完成
⚠️方法二
第一步 添加 hostname=veishop.iboxpay.com,
第二步 ⚠️添加笑谱获取更新TOKEN重写
登录笑谱(在登录状态就退出,重新登录) 获取更新TOKEN
refreshtokenVal 👉XP_refreshTOKEN
设置任务 可设置 0 1 2 0开视频关直播 1开视频开直播 2关视频开直播
LIVE 👉 XP_live
设置提现金额 可设置 0 1 15 30 50 100 默认0关闭
CASH 👉 XP_CASH
设置手机号
phone 👉 XP_phone
设置验证码 默认0关闭获取token功能
sms 👉 XP_sms
⚠️主机名以及重写👇
(手机可以获取refreshTOKEN 其他开启抓包,然后登录笑谱,找到 https://veishop.iboxpay.com/nf_gateway/nf-user-auth-web/ignore_tk/veishop/v1/ 里的响应体 refreshTOKEN)
hostname=veishop.iboxpay.com
############## 圈x
#笑谱获取更新TOKEN
https:\/\/veishop\.iboxpay\.com\/nf_gateway\/nf-user-auth-web\/ignore_tk\/veishop\/v1\/* url script-response-body https://raw.githubusercontent.com/ziye66666/JavaScript/main/Task/iboxpay.js
############## loon
http-response https:\/\/veishop\.iboxpay\.com\/nf_gateway\/nf-user-auth-web\/ignore_tk\/veishop\/v1\/* script-path=https://raw.githubusercontent.com/ziye66666/JavaScript/main/Task/iboxpay.js, requires-body=1,max-size=0, tag=笑普token
############## surge
#笑谱获取更新TOKEN
笑谱获取更新TOKEN = type=http-response,pattern=https:\/\/veishop\.iboxpay\.com\/nf_gateway\/nf-user-auth-web\/ignore_tk\/veishop\/v1\/*,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/ziye66666/JavaScript/main/Task/iboxpay.js
*/
const $ = Env("笑谱");
$.idx = ($.idx = ($.getval('iboxpaySuffix') || '1') - 1) > 0 ? ($.idx + 1 + '') : ''; // 账号扩展字符
const notify = $.isNode() ? require("./sendNotify") : ``;
const COOKIE = $.isNode() ? require("./iboxpayCOOKIE2") : ``;
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 点通知
const CS = 5
$.message = '', COOKIES_SPLIT = '', CASH = '', LIVE = '', phone = '', sms = '', ddtime = '', spid = '', TOKEN = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', zbid = '', cashcs = '', newcashcs = '', liveId = '';
let livecs = 0,
videoscs = 0,
LIVES = 0,
HBY = 0,
liveIdcd = 0;
RT = 30000;
const refreshtokenArr = [];
let refreshtokenVal = ``;
let middlerefreshTOKEN = [];
if ($.isNode()) {
// 没有设置 XP_CASH 则默认为 0 不提现
CASH = process.env.XP_CASH || 1;
// 没有设置 XP_live 则默认0
LIVE = process.env.XP_live || 3;
// 没有设置 XP_phone 则默认为 0
phone = process.env.XP_phone || 0;
// 没有设置 XP_sms 则默认0 不获取TOKEN
sms = process.env.XP_sms || 0
}
if ($.isNode() && process.env.XP_refreshTOKEN) {
COOKIES_SPLIT = process.env.COOKIES_SPLIT || "\n";
console.log(
`============ cookies分隔符为:${JSON.stringify(
COOKIES_SPLIT
)} =============\n`
);
if (
process.env.XP_refreshTOKEN &&
process.env.XP_refreshTOKEN.indexOf(COOKIES_SPLIT) > -1
) {
middlerefreshTOKEN = process.env.XP_refreshTOKEN.split(COOKIES_SPLIT);
} else {
middlerefreshTOKEN = process.env.XP_refreshTOKEN.split();
}
}
if (COOKIE.refreshtokenVal) {
XP_COOKIES = {
"refreshtokenVal": COOKIE.refreshtokenVal.split('\n'),
}
Length = XP_COOKIES.refreshtokenVal.length;
}
if (!COOKIE.refreshtokenVal) {
if ($.isNode()) {
Object.keys(middlerefreshTOKEN).forEach((item) => {
if (middlerefreshTOKEN[item]) {
refreshtokenArr.push(middlerefreshTOKEN[item]);
}
});
} else {
refreshtokenArr.push($.getdata("refreshtoken"));
// 根据boxjs中设置的额外账号数,添加存在的账号数据进行任务处理
if ("iboxpayCASH") {
CASH = $.getval("iboxpayCASH") || '0';
}
if ("iboxpayLIVE") {
LIVE = $.getval("iboxpayLIVE") || '0';
}
if ("iboxpayphone") {
phone = $.getval("iboxpayphone") || '0';
}
if ("iboxpaysms") {
sms = $.getval("iboxpaysms") || '0';
}
let iboxpayCount = ($.getval('iboxpayCount') || '1') - 0;
for (let i = 2; i <= iboxpayCount; i++) {
if ($.getdata(`refreshtoken${i}`)) {
refreshtokenArr.push($.getdata(`refreshtoken${i}`));
}
}
}
Length = refreshtokenArr.length
}
function GetCookie() {
if ($request && $request.url.indexOf("nf-user-auth-web") >= 0) {
const refreshtokenVal = JSON.parse($response.body).data.refreshToken
$.setdata(refreshtokenVal, "refreshtoken" + $.idx);
$.log(
`[${$.name + $.idx}] 获取refreshtoken✅: 成功,refreshtokenVal: ${refreshtokenVal}`
);
$.msg($.name + $.idx, `获取refreshtoken: 成功🎉`, ``);
}
}
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`
);
console.log(`============ 提现标准为:${CASH} =============\n`);
if (LIVE == 0) {
console.log(`============ 看直播关闭,看视频开启 =============\n`);
}
if (LIVE == 1) {
console.log(`============ 看直播开启,看视频开启 =============\n`);
}
if (LIVE == 2) {
console.log(`============ 看直播开启,看视频关闭 =============\n`);
}
if (sms >= 1) {
console.log(`============ TOKEN获取开启 =============\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;
};
let isGetCookie = typeof $request !== 'undefined'
if (isGetCookie) {
GetCookie()
$.done();
} else {
!(async () => {
if (sms >= 1) {
await getTOKEN();
} else await all();
if (HBY == 1) {
await $.wait(500)
}
await msgShow();
})()
.catch((e) => {
$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')
})
.finally(() => {
$.done();
})
}
async function all() {
if (!Length) {
$.msg(
$.name,
'提示:⚠️请点击前往获取https://apps.apple.com/cn/app/%E7%AC%91%E8%B0%B1/id1487075970\n',
'https://apps.apple.com/cn/app/%E7%AC%91%E8%B0%B1/id1487075970', {
"open-url": "https://apps.apple.com/cn/app/%E7%AC%91%E8%B0%B1/id1487075970"
}
);
return;
}
for (let i = 0; i < Length; i++) {
if (COOKIE.refreshtokenVal) {
refreshtokenVal = XP_COOKIES.refreshtokenVal[i];
}
if (!COOKIE.refreshtokenVal) {
refreshtokenVal = refreshtokenArr[i];
}
O = (`${$.name + (i + 1)}🔔`);
await console.log(`-------------------------\n\n🔔开始运行【${$.name+(i+1)}】`)
await refreshtoken(); //更新TOKEN
let cookie_is_live = await user(i + 1); //用户名
if (!cookie_is_live) {
continue;
}
await hdid(); //活动id
await goldcoin(); //金币信息
await coin(); //账户信息
await sylist(); //收益列表
await splimit(); //视频上限
await newcashlist(); //提现查询
await cashlist(); //今日提现查询
if (!cashcs.amount && CASH >= 1 && $.coin.data.balance / 100 >= CASH) {
await withdraw(); //提现
}
if (LIVE >= 1 && nowTimes.getHours() >= 8 && nowTimes.getHours() <= 23 && $.sylist.resultCode && livecs < 30) {
await liveslist(); //直播节目表
if (liveIdcd >= 1) {
dd = liveIdcd * 35 - 34
console.log(`📍本次直播运行需要${dd}秒` + '\n')
await lives(); //看直播
await $.wait(dd * 1000)
}
}
if ( LIVE != 2 && $.splimit.data.isUperLimit == false || LIVE == 888) {
await playo(); //播放o
await videoo(); //视频o
if (LIVES != 2) {
await $.wait(30000)
tt = CS * 30 - 29
console.log(`📍本次视频运行需要${tt}秒` + '\n')
await play(); //播放
await video(); //视频
await $.wait(tt * 1000)
if (LIVE == 666) {
await newvideo(); //新人福利
}
if ($.video.data && $.video.data.goldCoinNumber != 0 && videoPublishId6) {
await goldvideo(); //金蛋视频
}
}
}
}
}
//通知
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()
})
}
//TOKEN获取
function getTOKEN(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
getTOKENbodyVal = `{"userPhone":"${phone}","smsCode":"${sms}","source":"VEISHOP_APP_IOS"}`
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf-user-auth-web/ignore_tk/veishop/v1/app_register_by_phone.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: getTOKENbodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, TOKEN获取🚩: ${data}`);
$.getTOKEN = JSON.parse(data);
if ($.getTOKEN.resultCode == 1) {
const refreshtokenVal = $.getTOKEN.data.refreshToken
$.setdata(refreshtokenVal, "refreshtoken" + $.idx);
$.log(
`[${$.name + $.idx}] 获取refreshtoken✅: 成功,refreshtokenVal: ${refreshtokenVal}`
);
$.msg($.name + $.idx, `获取refreshtoken: 成功🎉`, ``);
$.message += '【TOKEN获取】:成功' + $.getTOKEN.data.refreshToken + '\n';
}
if ($.getTOKEN.resultCode == 0) {
console.log(`TOKEN获取:${$.getTOKEN.errorCode}\n`);
$.message += `【TOKEN获取】:${$.getTOKEN.errorCode}\n`;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//TOKEN更新
function refreshtoken(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
refreshtokenbodyVal = `{"refreshToken":"${refreshtokenVal}","source":"VEISHOP_APP_IOS"}`
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_user_auth_web/uc/ignore_tk/v1/refresh_access_token_to_c.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: refreshtokenbodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, TOKEN更新🚩: ${data}`);
$.refreshtoken = JSON.parse(data);
if ($.refreshtoken.resultCode == 1) {
TOKEN = $.refreshtoken.data.accessToken
console.log('更新TOKEN成功:' + TOKEN + '\n');
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//用户名
function user(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_user_center_web/shopkeeper/v1/get_context_info.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
}
$.get(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 用户名🚩: ${data}`);
$.user = JSON.parse(data);
if ($.user.resultCode == 1) {
$.message += `\n${O}`;
$.message += `\n========== 【${$.user.data.customerInfo.nickname}】 ==========\n`;
resolve(true);
}
if ($.user.resultCode == 0) {
$.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 goldcoin(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/balance.json?source=WX_APP_KA_HTZP`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
}
$.get(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 金币信息🚩: ${data}`);
$.goldcoin = JSON.parse(data);
$.message += '【金币信息】:今日金币' + $.goldcoin.data.coinSum + ',预估金额' + $.goldcoin.data.balanceSum / 100 + '元\n';
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//活动id
function hdid(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/ignore_tk/v1/query_act_list.json?source=WX_APP_KA_HTZP`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
}
$.get(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 活动id🚩: ${data}`);
$.hdid = JSON.parse(data);
if ($.hdid.resultCode == 1) {
spid = $.hdid.data.everyDayActivityList.find(item => item.actTypeId === 9)
zbid = $.hdid.data.everyDayActivityList.find(item => item.actTypeId === 10)
console.log(spid.actName + 'ID:' + spid.actId + '\n' +
zbid.actName + 'ID:' + zbid.actId + '\n');
$.message += '【' + spid.actName + 'ID】:' + spid.actId + '\n' +
'【' + zbid.actName + 'ID】:' + zbid.actId + '\n';
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//账户信息
function coin(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/withdraw_detail.json?source=WX_APP_KA_HTZP`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
}
$.get(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 账户信息🚩: ${data}`);
$.coin = JSON.parse(data);
$.message += '【账户信息】:明日入账' + $.coin.data.tomorrowAmt / 100 + '元,可提余额' + $.coin.data.balance / 100 + '元\n';
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//播放o
function playo(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
do playTime = Math.floor(Math.random() * 31);
while (playTime < 20)
do playTimess = Math.floor(Math.random() * 36);
while (playTimess < 30)
do playid = Math.floor(Math.random() * 49600000000000000);
while (playid < 10000000000000000)
playbodyVal = `{"videoPublishId":"13${playid}","playTimeLenght":${playTime},"type":1,"videoTime":${playTimess}}`;
videoPublishId = playbodyVal.substring(playbodyVal.indexOf("videoPublishId") + 17, playbodyVal.indexOf(`","pl`))
console.log(`视频ID1📍${videoPublishId}`)
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_content_service/video/ignore_tk/v1/video_channel/uplaod_play_video_recode.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: playbodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 播放ID1🚩: ${data}`);
$.playo = JSON.parse(data);
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//视频o
function videoo(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
var inss = 0;
videobodyVal = `{"type":1,"videoList":[{"videoId":"${videoPublishId}","type":1,"isFinishWatch":false}],"actId":"${spid.actId}"}`
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/give_gold_coin_by_video.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: videobodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 视频🚩: ${data}`);
$.videoo = JSON.parse(data);
if ($.videoo.resultCode == 0) {
LIVES = 2
console.log('视频奖励:⚠️' + $.videoo.errorDesc + '\n');
$.message += '【视频奖励】:⚠️' + $.videoo.errorDesc + '\n'
}
if ($.videoo.data && $.videoo.data.goldCoinNumber == 0) {
LIVES = 2
console.log(`视频奖励:恭喜您的账号已灰,已无法获取视频奖励\n`);
$.message += `【视频奖励】:恭喜您的账号已灰,已无法获取视频奖励\n`
}
if ($.videoo.data && $.videoo.data.goldCoinNumber != 0) {
LIVES = 0
console.log(`开始领取第1次视频奖励,获得${$.videoo.data.goldCoinNumber}金币\n`);
console.log(`视频奖励:共领取1次视频奖励,共${$.videoo.data.goldCoinNumber}金币\n`);
$.message += `【视频奖励】:共领取1次视频奖励,共${$.videoo.data.goldCoinNumber}金币\n`
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//播放
function play(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
for (let i = 0; i < CS; i++) {
setTimeout(() => {
do playTime = Math.floor(Math.random() * 31);
while (playTime < 20)
do playTimess = Math.floor(Math.random() * 36);
while (playTimess < 30)
do playid = Math.floor(Math.random() * 49600000000000000);
while (playid < 10000000000000000)
playbodyVal = `{"videoPublishId":"13${playid}","playTimeLenght":${playTime},"type":1,"videoTime":${playTimess}}`;
videoPublishId = playbodyVal.substring(playbodyVal.indexOf("videoPublishId") + 17, playbodyVal.indexOf(`","pl`))
if (i == 1) {
videoPublishId3 = playbodyVal.substring(playbodyVal.indexOf("videoPublishId") + 17, playbodyVal.indexOf(`","pl`))
}
if (i == 2) {
videoPublishId4 = playbodyVal.substring(playbodyVal.indexOf("videoPublishId") + 17, playbodyVal.indexOf(`","pl`))
}
if (i == 3) {
videoPublishId5 = playbodyVal.substring(playbodyVal.indexOf("videoPublishId") + 17, playbodyVal.indexOf(`","pl`))
}
if (i == 4) {
videoPublishId6 = playbodyVal.substring(playbodyVal.indexOf("videoPublishId") + 17, playbodyVal.indexOf(`","pl`))
}
console.log(`视频ID${i+2}📍${videoPublishId}`)
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_content_service/video/ignore_tk/v1/video_channel/uplaod_play_video_recode.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: playbodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 播放ID${i+2}🚩: ${data}`);
$.play = JSON.parse(data);
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, i * 30000);
}
}, timeout)
})
}
//视频
function video(timeout = 0) {
return new Promise((resolve) => {
setTimeout(() => {
var inss = 0;
for (let i = 0; i < CS; i++) {
setTimeout(() => {
videobodyVal = `{"type":1,"videoList":[{"videoId":"${videoPublishId}","type":1,"isFinishWatch":false}],"actId":"${spid.actId}"}`
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/give_gold_coin_by_video.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: videobodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 视频🚩: ${data}`);
$.video = JSON.parse(data);
if ($.video.data && $.video.data.goldCoinNumber != 0) {
console.log(`开始领取第${i+2}次视频奖励,获得${$.video.data.goldCoinNumber}金币\n`);
inss += $.video.data.goldCoinNumber;
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, i * 30000);
}
setTimeout(() => {
if ($.video.resultCode == 0) {
console.log('视频奖励:⚠️' + $.video.errorDesc + '\n');
$.message += '【视频奖励】:⚠️' + $.video.errorDesc + '\n'
}
if ($.video.data && $.video.data.goldCoinNumber == 0) {
console.log(`视频奖励:恭喜您的账号已灰,已无法获取视频奖励\n`);
$.message += `【视频奖励】:恭喜您的账号已灰,已无法获取视频奖励\n`
}
if ($.video.data && $.video.data.goldCoinNumber != 0) {
console.log(`视频奖励:共领取${CS}次视频奖励,共${inss}金币\n`);
$.message += `【视频奖励】:共领取${CS}次视频奖励,共${inss}金币\n`
}
}, CS * 30000 - 29000)
}, timeout)
})
}
//金蛋视频
function goldvideo(timeout = 40000) {
return new Promise((resolve) => {
setTimeout(() => {
goldvideobodyVal = `{"type":2,"videoList":[{"videoId":"${videoPublishId3}","type":1,"isFinishWatch":false},{"videoId":"${videoPublishId4}","type":1,"isFinishWatch":false},{"videoId":"${videoPublishId5}","type":1,"isFinishWatch":false},{"videoId":"${videoPublishId6}","type":1,"isFinishWatch":false}],"actId":"${spid.actId}"}`
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/give_gold_coin_by_video.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: goldvideobodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 金蛋视频🚩: ${data}`);
$.goldvideo = JSON.parse(data);
if ($.goldvideo.resultCode == 1) {
console.log('金蛋视频奖励,获得' + $.goldvideo.data.goldCoinNumber + '金币')
$.message +=
'【金蛋视频奖励】:获得' + $.goldvideo.data.goldCoinNumber + '金币\n'
}
if ($.goldvideo.resultCode == 0) {
console.log($.goldvideo.errorDesc + '\n');
$.message +=
'【金蛋视频奖励】:' + $.goldvideo.errorDesc + '\n';
}
} catch (e) {
$.logErr(e, resp);
} finally {
resolve()
}
})
}, timeout)
})
}
//新人福利
function newvideo(timeout = 40000) {
return new Promise((resolve) => {
setTimeout(() => {
newvideobodyVal = `{"videoList":[{"videoId":"${videoPublishId3}","type":1,"isFinishWatch":false},{"videoId":"${videoPublishId4}","type":1,"isFinishWatch":false},{"videoId":"${videoPublishId5}","type":1,"isFinishWatch":false},{"videoId":"${videoPublishId6}","type":1,"isFinishWatch":false}]}`
let url = {
url: `https://veishop.iboxpay.com/nf_gateway/nf_customer_activity/day_cash/v1/give_cash_by_video.json`,
headers: {
"Connection": "keep-alive",
"Accept-Encoding": "gzip, deflate, br",
"version": "1.4.8",
"mchtNo": "100529600058887",
"Content-Type": "application/json; charset=utf-8",
"source": "VEISHOP_APP_IOS",
"shopkeeperId": "1148855820752977920",
"User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"token": `${TOKEN}`,
"X-User-Agent": "VeiShop, 1.4.8 (iOS, 14.2, zh_CN, Apple, iPhone, )",
"traceid": "30000000000000000000" + tts() + "000000000000",
"Host": "veishop.iboxpay.com",
"Accept-Language": "zh-Hans-CN;q=1",
"Accept": "*/*"
},
body: newvideobodyVal,
}
$.post(url, async (err, resp, data) => {
try {
if (logs) $.log(`${O}, 新人福利🚩: ${data}`);
$.newvideo = JSON.parse(data);
if ($.newvideo.resultCode == 1) {
console.log('新人福利奖励,获得' + $.newvideo.data / 100 + '元\n')
$.message +=
'【新人福利奖励】:获得' + $.newvideo.data / 100 + '元\n'
}
if ($.newvideo.resultCode == 0) {
console.log($.newvideo.errorDesc + '\n');
$.message +=
'【新人福利奖励】:' + $.newvideo.errorDesc + '\n';
}
} catch (e) {
$.logErr(e, resp);
} finally {