-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathchinaUnicom.js
4569 lines (4565 loc) · 177 KB
/
chinaUnicom.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
/*
中国联通 v2.08
包含以下功能:
阅光宝盒, 首页签到, 立减金打卡, 阅读专区抽奖, 云盘抽奖, 联通祝福
支付日活动 (每个月26-28号)
618集卡活动 (5.31-6.20)
首页签到默认运行, 需要关闭的设置变量 chinaUnicomSign='false'
联通祝福默认运行, 需要关闭的设置变量 chinaUnicomLtzf='false'
定时每天两三次
需要在联通APP中选择退出登录-切换账号登录, 捉下面这个包
https://m.client.10010.com/mobileService/onLine.htm
把请求体(body)里面的token_online参数填到变量 chinaUnicomCookie 里, 多账号换行或&或@隔开:
export chinaUnicomCookie="a3e4c1ff25da2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
不会捉包的可以使用网页获取: https://service.leafxxx.win/unicom/login.html
cron: 0 0,7,20 * * *
const $ = new Env("中国联通");
*/
const _0x4c672b = _0x4a9430("中国联通");
const _0x2bba68 = require("got");
const _0x2bbc1d = require("path");
const {
exec: _0x526718
} = require("child_process");
const _0x368aa5 = require("crypto-js");
const {
CookieJar: _0x4484a5
} = require("tough-cookie");
const _0x24434b = "chinaUnicom";
const _0x55899c = ["\n", "&", "@"];
const _0x52f10b = [_0x24434b + "Cookie"];
const _0x159493 = process.env[_0x24434b + "Sign"] === "false";
const _0xedc529 = process.env[_0x24434b + "Ltzf"] === "false";
const _0x148eb1 = 50000;
const _0x1cbe1e = 3;
let _0x137ee6 = null;
const _0x38b617 = null;
const _0x2bad9c = 2.07;
const _0x4a2c68 = "chinaUnicom";
const _0x2eca5f = "https://leafxcy.coding.net/api/user/leafxcy/project/validcode/shared-depot/validCode/git/blob/master/code.json";
const _0x1971e5 = "https://leafxcy.coding.net/api/user/leafxcy/project/validcode/shared-depot/validCode/git/blob/master/" + _0x4a2c68 + ".json";
const _0x239ea0 = 5;
const _0x469423 = "[email protected]";
const _0x546817 = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:" + _0x469423 + "}";
const _0x281cdf = "d82ac3821b50e6f05f6c684d27d252a584517c685da7130a2bd27361afb4f2e300ab1ecc5a701b4d2d4df69e795299dc08c2c5a1129381372a65a1a9a397eb16cec3c3cc0179f01df450042f3469658331cec050c7d5c50b121dc28b3f31ece6";
const _0x3d9810 = "10000002";
const _0xa01453 = "7k1HcDL8RKvc";
const _0x49426e = "woreadst^&*12345";
const _0x4872bf = "10000006";
const _0x457ac0 = "yQsp9gUqv7qX";
const _0x20c0ff = "QzUzOUM2QTQ2MTc4";
const _0x18c84f = "16-Bytes--String";
const _0x3e622c = "225";
const _0x46b3a9 = "225";
const _0x127422 = "party";
const _0x5b10f9 = "6-WfVldfFrt3zhjHhe6kzwI-XfG5aMCzRTLI_4K7_a0";
const _0x460d74 = "73b138fd-250c-4126-94e2-48cbcc8b9cbe";
const _0x558192 = "7cb46449-3b11-4414-bb49-cbd15525fb88";
const _0x3bb78f = "9";
const _0x3db78e = "1";
const _0x2f3d25 = "wocareMBHServiceLife1";
const _0x12fe67 = "beea1c7edf7c4989b2d3621c4255132f";
const _0x5f2a5c = "f4cd4ffeb5554586acf65ba7110534f5";
const _0x4e5ad9 = "0123456789";
const _0x4192c6 = "qwertyuiopasdfghjklzxcvbnm";
const _0x27f1a2 = process.env[_0x24434b + "Uuid"] || _0x4c672b.randomUuid();
const _0x26ccd8 = [9, 10, 11, 12, 13];
const _0x123877 = 1000;
const _0x5d9e11 = 5000;
const _0x392042 = "1001000003";
const _0x2a3518 = "100002";
const _0x353847 = "";
let _0x333e1b = [];
let _0x1051da = [];
let _0x188394 = [];
let _0x55391c = null;
let _0x5724ea = [6640, 6641];
const _0x36a6fc = 7;
const _0x52ff20 = 5;
const _0x4cffb4 = 5;
const _0x5868aa = {
ttlxj: "TTLXJ20210330",
card_618: "NZJK618CJHD"
};
const _0x4376d8 = [{
name: "星座配对",
id: 2
}, {
name: "大转盘",
id: 3
}, {
name: "盲盒抽奖",
id: 4
}];
const _0x9c4c5b = {
ZFGJBXXCY1: "空气",
GJBNZJK19: "[6]",
GJBNZJK20: "[1]",
GJBNZJK21: "[8]",
GJBNZJK22: "[狂]",
GJBNZJK23: "[欢]"
};
const _0xe19164 = {
抽奖: "01",
首次进入: "02",
卡片合成: "03",
瓜分奖励: "04"
};
function _0x71b805(_0x6a8fe2, _0x1dd78a, _0x1e36ab, _0x3359f8, _0x2c8970, _0x16f3cf) {
return _0x368aa5[_0x6a8fe2].encrypt(_0x368aa5.enc.Utf8.parse(_0x3359f8), _0x368aa5.enc.Utf8.parse(_0x2c8970), {
mode: _0x368aa5.mode[_0x1dd78a],
padding: _0x368aa5.pad[_0x1e36ab],
iv: _0x368aa5.enc.Utf8.parse(_0x16f3cf)
}).ciphertext.toString(_0x368aa5.enc.Hex);
}
function _0x26715b(_0x186221, _0x49588d, _0x1d0a7d, _0x469ed4, _0x25017e, _0x48835f) {
return _0x368aa5[_0x186221].decrypt({
ciphertext: _0x368aa5.enc.Hex.parse(_0x469ed4)
}, _0x368aa5.enc.Utf8.parse(_0x25017e), {
mode: _0x368aa5.mode[_0x49588d],
padding: _0x368aa5.pad[_0x1d0a7d],
iv: _0x368aa5.enc.Utf8.parse(_0x48835f)
}).toString(_0x368aa5.enc.Utf8);
}
let _0x191c8c = 0;
let _0x13c734 = 0;
function _0x169d23() {
_0x13c734 = 1;
process.on("SIGTERM", () => {
_0x13c734 = 2;
process.exit(0);
});
const _0x1067e7 = _0x2bbc1d.basename(process.argv[1]);
const _0x485af0 = ["bash", "timeout", "grep"];
let _0x58df8a = ["ps afx"];
_0x58df8a.push("grep " + _0x1067e7);
_0x58df8a = _0x58df8a.concat(_0x485af0.map(_0x12a62f => "grep -v \"" + _0x12a62f + " \""));
_0x58df8a.push("wc -l");
const _0x5ef64e = _0x58df8a.join("|");
const _0x3b614a = () => {
_0x526718(_0x5ef64e, (_0x3ebb06, _0x1bb818, _0x1b4324) => {
if (_0x3ebb06 || _0x1b4324) {
return;
}
_0x191c8c = parseInt(_0x1bb818.trim(), 10);
});
if (_0x13c734 == 1) {
// TOLOOK
setTimeout(_0x3b614a, 2000);
}
};
_0x3b614a();
}
class _0x1e60de {
constructor() {
this.index = _0x4c672b.userIdx++;
this.name = "";
this.valid = false;
const _0x7705b4 = {
retry: {
limit: 0
},
timeout: _0x148eb1,
followRedirect: false,
ignoreInvalidCookies: true,
headers: {
Connection: "keep-alive"
}
};
this.got = _0x2bba68.extend(_0x7705b4);
if (_0x13c734 == 0) {
_0x169d23();
}
}
log(_0x269c59, _0x301c3b = {}) {
var _0x18a4a7 = "";
var _0x732521 = _0x4c672b.userCount.toString().length;
;
if (this.index) {
_0x18a4a7 += "账号[" + _0x4c672b.padStr(this.index, _0x732521) + "]";
}
if (this.name) {
_0x18a4a7 += "[" + this.name + "]";
}
_0x4c672b.log(_0x18a4a7 + _0x269c59, _0x301c3b);
}
set_cookie(_0x2599f0, _0x6eb0f3, _0x312d79, _0x193e1e, _0x5c93b8 = {}) {
this.cookieJar.setCookieSync(_0x2599f0 + "=" + _0x6eb0f3 + "; Domain=" + _0x312d79 + ";", "" + _0x193e1e);
}
async request(_0x433feb) {
const _0x290a0a = ["ECONNRESET", "EADDRINUSE", "ENOTFOUND", "EAI_AGAIN"];
const _0x23df85 = ["TimeoutError"];
const _0x668150 = ["EPROTO"];
const _0x1a1818 = [];
var _0x4a443f = null;
var _0x1a7b45 = 0;
var _0x3f4231 = _0x433feb.fn || _0x433feb.url;
let _0x5e1d36 = _0x4c672b.get(_0x433feb, "valid_code", _0x1a1818);
_0x433feb.method = _0x433feb?.method?.toUpperCase() || "GET";
if (_0x38b617) {
if (!_0x137ee6) {
var _0x131c5e = require("https-proxy-agent");
_0x137ee6 = new _0x131c5e(_0x38b617);
}
const _0x172012 = {
http: _0x137ee6,
https: _0x137ee6
};
_0x433feb.agent = _0x172012;
const _0xce184f = {
rejectUnauthorized: false
};
_0x433feb.https = _0xce184f;
}
let _0x823091;
let _0x173cf5;
while (_0x1a7b45 < _0x1cbe1e) {
try {
_0x1a7b45++;
_0x823091 = "";
_0x173cf5 = "";
let _0x179710 = null;
let _0x58a24f = _0x433feb?.timeout || this.got?.defaults?.options?.timeout?.request || _0x148eb1;
let _0x143403 = false;
let _0x3d7559 = Math.max(this.index - 2, 0);
let _0x37401b = Math.min(Math.max(this.index - 2, 1), 4);
let _0x123345 = Math.min(Math.max(this.index - 4, 1), 5);
let _0x45246d = _0x3d7559 * _0x37401b * _0x123345 * _0x123345 * 600;
let _0x315014 = _0x3d7559 * _0x37401b * _0x123345 * _0x123345 * 4000;
let _0xcde5b2 = _0x45246d + Math.floor(Math.random() * _0x315014);
let _0x359a88 = _0x191c8c * (_0x191c8c - 1) * 3000;
let _0x3a57f5 = (_0x191c8c - 1) * (_0x191c8c - 1) * 5000;
let _0x307da0 = _0x359a88 + Math.floor(Math.random() * _0x3a57f5);
let _0x17e433 = Math.max(_0x4c672b.userCount - 2, 0);
let _0xeb7e25 = Math.max(_0x4c672b.userCount - 3, 0);
let _0x36d37b = _0x17e433 * 400;
let _0x55e6b9 = _0xeb7e25 * 1000;
let _0x2c7717 = _0x36d37b + Math.floor(Math.random() * _0x55e6b9);
let _0x2a8da8 = _0xcde5b2 + _0x307da0 + _0x2c7717;
// await _0x4c672b.wait(_0x2a8da8);
await new Promise(async _0x57cb0a => {
// TOLOOK
setTimeout(() => {
_0x143403 = true;
_0x57cb0a();
}, _0x58a24f);
await this.got(_0x433feb).then(_0x4366f3 => {
_0x4a443f = _0x4366f3;
}, _0x30aa0f => {
_0x179710 = _0x30aa0f;
_0x4a443f = _0x30aa0f.response;
_0x823091 = _0x179710?.code || "";
_0x173cf5 = _0x179710?.name || "";
});
_0x57cb0a();
});
if (_0x143403) {
this.log("[" + _0x3f4231 + "]请求超时(" + _0x58a24f / 1000 + "秒),重试第" + _0x1a7b45 + "次");
} else if (_0x668150.includes(_0x823091)) {
this.log("[" + _0x3f4231 + "]请求错误[" + _0x823091 + "][" + _0x173cf5 + "]");
if (_0x179710?.message) {
console.log(_0x179710.message);
}
break;
} else if (_0x23df85.includes(_0x173cf5)) {
this.log("[" + _0x3f4231 + "]请求错误[" + _0x823091 + "][" + _0x173cf5 + "],重试第" + _0x1a7b45 + "次");
} else if (_0x290a0a.includes(_0x823091)) {
this.log("[" + _0x3f4231 + "]请求错误[" + _0x823091 + "][" + _0x173cf5 + "],重试第" + _0x1a7b45 + "次");
} else {
let _0x26ca58 = _0x4a443f?.statusCode || "";
let _0xeb6c6a = _0x26ca58 / 100 | 0;
if (_0x26ca58) {
if (_0xeb6c6a > 3 && !_0x5e1d36.includes(_0x26ca58)) {
if (_0x26ca58) {
this.log("请求[" + _0x3f4231 + "]返回[" + _0x26ca58 + "]");
} else {
this.log("请求[" + _0x3f4231 + "]错误[" + _0x823091 + "][" + _0x173cf5 + "]");
}
}
if (_0xeb6c6a <= 4) {
break;
}
} else {
this.log("请求[" + _0x3f4231 + "]错误[" + _0x823091 + "][" + _0x173cf5 + "]");
}
}
} catch (_0x3004fb) {
if (_0x3004fb.name == "TimeoutError") {
this.log("[" + _0x3f4231 + "]请求超时,重试第" + _0x1a7b45 + "次");
} else {
this.log("[" + _0x3f4231 + "]请求错误(" + _0x3004fb.message + "),重试第" + _0x1a7b45 + "次");
}
}
;
}
if (_0x4a443f == null) {
return Promise.resolve({
statusCode: _0x823091 || -1,
headers: null,
result: null
});
}
let {
statusCode: _0x50b741,
headers: _0x590c9b,
body: _0x1d560d
} = _0x4a443f;
if (_0x1d560d) {
try {
_0x1d560d = JSON.parse(_0x1d560d);
} catch { }
}
;
const _0x44d302 = {
statusCode: _0x50b741,
headers: _0x590c9b,
result: _0x1d560d
};
return Promise.resolve(_0x44d302);
}
}
let _0x24046c = _0x1e60de;
try {
let _0x12396e = require("./LocalBasic");
_0x24046c = _0x12396e;
} catch { }
let _0x23c014 = new _0x24046c(_0x4c672b);
class _0x333e45 extends _0x24046c {
constructor(_0xd93737) {
super(_0x4c672b);
this.cookieJar = new _0x4484a5();
const _0x320a64 = {
"User-Agent": _0x546817
};
this.got = this.got.extend({
cookieJar: this.cookieJar,
headers: _0x320a64
});
let _0x52e0a3 = _0xd93737.split("#");
this.token_online = _0x52e0a3[0];
this.unicomTokenId = _0x4c672b.randomString(32);
this.tokenId_cookie = "chinaunicom-" + _0x4c672b.randomString(32, _0x4e5ad9 + _0x4192c6).toUpperCase();
this.rptId = "";
this.city = [];
this.t_flmf_task = 0;
this.t_woread_draw = 0;
this.need_read_rabbit = false;
this.moonbox_task_record = {};
this.moonbox_notified = [];
this.set_cookie("TOKENID_COOKIE", this.tokenId_cookie);
this.set_cookie("UNICOM_TOKENID", this.unicomTokenId);
this.set_cookie("sdkuuid", this.unicomTokenId);
}
set_cookie(_0x693930, _0x1088e8, _0x52b165 = {}) {
let _0x44b4f4 = _0x52b165?.domain || "10010.com";
let _0x3b30c6 = _0x52b165?.currentUrl || "https://epay.10010.com";
super.set_cookie(_0x693930, _0x1088e8, _0x44b4f4, _0x3b30c6, _0x52b165);
}
get_bizchannelinfo() {
const _0x2fbd5b = {
bizChannelCode: _0x46b3a9,
disriBiz: _0x127422,
unionSessionId: "",
stType: "",
stDesmobile: "",
source: "",
rptId: this.rptId,
ticket: "",
tongdunTokenId: this.tokenId_cookie,
xindunTokenId: this.sdkuuid
};
let _0x2ae285 = JSON.stringify(_0x2fbd5b);
return _0x2ae285;
}
get_epay_authinfo() {
const _0x31fa00 = {
mobile: "",
sessionId: this.sessionId,
tokenId: this.tokenId,
userId: ""
};
return JSON.stringify(_0x31fa00);
}
get_flmf_data(_0x30396c = "welfareCenter") {
const _0x1e4b94 = {
sid: this.flmf_sid,
actcode: _0x30396c
};
return _0x1e4b94;
}
encode_woread(_0x1fb841, _0x2edf26 = _0x49426e) {
let _0x5d406d = _0x71b805("AES", "CBC", "Pkcs7", JSON.stringify(_0x1fb841), _0x2edf26, _0x18c84f);
return Buffer.from(_0x5d406d, "utf-8").toString("base64");
}
get_woread_param() {
return {
timestamp: _0x4c672b.time("yyyyMMddhhmmss"),
token: this.woread_token,
userid: this.woread_userid,
userId: this.woread_userid,
userIndex: this.woread_userIndex,
userAccount: this.mobile,
verifyCode: this.woread_verifycode
};
}
get_woread_m_param() {
return {
timestamp: _0x4c672b.time("yyyyMMddhhmmss"),
signtimestamp: Date.now(),
source: _0x3bb78f,
token: this.woread_token
};
}
get_ltyp_sign_header(_0x535fbf) {
let _0x4ebb05 = Date.now();
let _0x334431 = Math.floor(Math.random() * 89999) + 100000;
let _0x26bfbe = _0x2a3518;
let _0x5ba8fb = _0x353847;
let _0x461c52 = _0x368aa5.MD5(_0x535fbf + _0x4ebb05 + _0x334431 + _0x26bfbe + _0x5ba8fb).toString();
const _0x59dfc6 = {
key: _0x535fbf,
resTime: _0x4ebb05,
reqSeq: _0x334431,
channel: _0x26bfbe,
version: _0x5ba8fb,
sign: _0x461c52
};
return _0x59dfc6;
}
async onLine(_0x12cbf8 = {}) {
let _0x4d2878 = false;
try {
let _0x248c36 = {
fn: "onLine",
method: "post",
url: "https://m.client.10010.com/mobileService/onLine.htm",
form: {
token_online: this.token_online,
reqtime: _0x4c672b.time("yyyy-MM-dd hh:mm:ss"),
//appId: _0x281cdf,
version: _0x469423,
step: "bindlist",
isFirstInstall: 0,
deviceModel: "iPhone"
}
};
let {
result: _0x1b682a,
statusCode: _0x152ca4
} = await this.request(_0x248c36);
let _0x5655f9 = _0x4c672b.get(_0x1b682a, "code", _0x152ca4);
if (_0x5655f9 == 0) {
_0x4d2878 = true;
this.valid = true;
this.mobile = _0x1b682a?.desmobile;
this.name = _0x1b682a?.desmobile;
this.ecs_token = _0x1b682a?.ecs_token;
this.city = _0x1b682a?.list;
this.log("登录成功");
} else {
this.valid = false;
this.log("登录失败[" + _0x5655f9 + "]");
}
} catch (_0x158d45) {
console.log(_0x158d45);
} finally {
return _0x4d2878;
}
}
async openPlatLineNew(_0x214a77, _0x356709 = {}) {
let _0x6e6d39 = {
ticket: "",
type: "",
loc: ""
};
try {
const _0x4299db = {
to_url: _0x214a77
};
const _0x312936 = {
fn: "openPlatLineNew",
method: "get",
url: "https://m.client.10010.com/mobileService/openPlatform/openPlatLineNew.htm",
searchParams: _0x4299db
};
let _0x1c37d3 = _0x312936;
let {
headers: _0x1ad54b,
statusCode: _0x3bb878
} = await this.request(_0x1c37d3);
if (_0x1ad54b?.location) {
let _0x4d5939 = new URL(_0x1ad54b.location);
let _0x5c9903 = _0x4d5939.searchParams.get("type") || "02";
let _0x10c474 = _0x4d5939.searchParams.get("ticket");
if (!_0x10c474) {
this.log("获取ticket失败");
}
const _0x3aab7e = {
loc: _0x1ad54b.location,
ticket: _0x10c474,
type: _0x5c9903
};
_0x6e6d39 = _0x3aab7e;
} else {
this.log("获取ticket失败[" + _0x3bb878 + "]");
}
} catch (_0x2f04bf) {
console.log(_0x2f04bf);
} finally {
return _0x6e6d39;
}
}
async gettaskip(_0x14bf80 = {}) {
let _0x4d9a4f = _0x4c672b.randomString(32).toUpperCase();
try {
const _0x21c80b = {
mobile: this.mobile,
orderId: _0x4d9a4f
};
const _0x23a9e8 = {
fn: "gettaskip",
method: "post",
url: "https://m.client.10010.com/taskcallback/topstories/gettaskip",
form: _0x21c80b
};
let _0x19b4ac = _0x23a9e8;
await this.request(_0x19b4ac);
} catch (_0x39c470) {
console.log(_0x39c470);
} finally {
return _0x4d9a4f;
}
}
async draw_28_queryChance(_0x4fee58 = {}) {
try {
let _0x21348e = {
fn: "draw_28_queryChance",
method: "post",
url: "https://m.client.10010.com/AppMonthly/appMonth/queryChance"
};
let {
result: _0x264d2c,
statusCode: _0x1270ec
} = await this.request(_0x21348e);
let _0x16eb3b = _0x4c672b.get(_0x264d2c, "status", _0x1270ec);
if (_0x16eb3b == "0000") {
let _0x16c184 = parseInt(_0x264d2c?.data?.allRemainTimes || 0);
let _0x20fa50 = Math.min(_0x4cffb4, _0x16c184);
this.log("28日五折日可以抽奖" + _0x16c184 + "次, 去抽" + _0x20fa50 + "次");
let _0x3cbcdc = false;
while (_0x20fa50-- > 0) {
if (_0x3cbcdc) {
await _0x4c672b.wait(8000);
}
_0x3cbcdc = true;
await this.draw_28_lottery();
}
} else {
let _0x10a2a1 = _0x264d2c?.message || _0x264d2c?.msg || "";
this.log("28日五折日查询抽奖次数失败[" + _0x16eb3b + "]: " + _0x10a2a1);
}
} catch (_0x30dd28) {
console.log(_0x30dd28);
}
}
async draw_28_lottery(_0x30b1c2 = {}) {
try {
let _0x35834f = {
fn: "draw_28_lottery",
method: "post",
url: "https://m.client.10010.com/AppMonthly/appMonth/lottery"
};
let {
result: _0x49d94d,
statusCode: _0x1541b9
} = await this.request(_0x35834f);
let _0x201a54 = _0x4c672b.get(_0x49d94d, "status", _0x1541b9);
if (_0x201a54 == "0000") {
let _0x2f5c79 = _0x4c672b.get(_0x49d94d?.data, "code", -1);
if (_0x49d94d?.data?.uuid) {
await _0x4c672b.wait(2000);
await this.draw_28_winningRecord(_0x49d94d.data.uuid);
} else {
let _0x385a86 = _0x49d94d?.data?.message || _0x49d94d?.data?.msg || "";
this.log("28日五折日抽奖失败[" + _0x2f5c79 + "]: " + _0x385a86);
}
} else {
let _0x10529b = _0x49d94d?.message || _0x49d94d?.msg || "";
this.log("28日五折日抽奖失败[" + _0x201a54 + "]: " + _0x10529b);
}
} catch (_0x184f71) {
console.log(_0x184f71);
}
}
async draw_28_winningRecord(_0xefc971, _0x31e980 = {}) {
try {
const _0x1a1822 = {
requestId: _0xefc971
};
const _0x8694fa = {
fn: "draw_28_winningRecord",
method: "post",
url: "https://m.client.10010.com/AppMonthly/appMonth/winningRecord",
form: _0x1a1822
};
let _0x49b45f = _0x8694fa;
let {
result: _0x555923,
statusCode: _0x24354c
} = await this.request(_0x49b45f);
let _0x4f5744 = _0x4c672b.get(_0x555923, "status", _0x24354c);
if (_0x4f5744 == "0000") {
let _0x1d3b22 = _0x4c672b.get(_0x555923?.data, "code", -1);
if (_0x1d3b22 == "0000") {
const _0x38cfce = {
notify: true
};
this.log("28日五折日抽奖: " + _0x555923?.data?.prizeName?.replace(/\t/g, ""), _0x38cfce);
} else {
let _0x1218f5 = _0x555923?.data?.message || _0x555923?.data?.msg || "";
this.log("查询28日五折日抽奖结果失败[" + _0x1d3b22 + "]: " + _0x1218f5);
}
} else {
let _0x408868 = _0x555923?.message || _0x555923?.msg || "";
this.log("查询28日五折日抽奖结果失败[" + _0x4f5744 + "]: " + _0x408868);
}
} catch (_0xfa9340) {
console.log(_0xfa9340);
}
}
async ttlxj_authorize(_0x11f5a4, _0x2307cf, _0x3da8d2, _0x10b4d4 = {}) {
try {
let _0x388582 = {
fn: "ttlxj_authorize",
method: "post",
url: "https://epay.10010.com/woauth2/v2/authorize",
headers: {
Origin: "https://epay.10010.com",
Referer: _0x3da8d2
},
json: {
response_type: "rptid",
client_id: _0x460d74,
redirect_uri: "https://epay.10010.com/ci-mps-st-web/",
login_hint: {
credential_type: "st_ticket",
credential: _0x11f5a4,
st_type: _0x2307cf,
force_logout: true,
source: "app_sjyyt"
},
device_info: {
token_id: "chinaunicom-pro-" + Date.now() + "-" + _0x4c672b.randomString(13),
trace_id: _0x4c672b.randomString(32)
}
}
};
let {
result: _0x1ef66b
} = await this.request(_0x388582);
let _0x58c1b9 = _0x4c672b.get(_0x1ef66b, "status", -1);
if (_0x58c1b9 == 200) {
await this.ttlxj_authCheck();
} else {
let _0x29da44 = _0x1ef66b?.message || _0x1ef66b?.msg || "";
this.log("天天领现金获取SESSION失败[" + _0x58c1b9 + "]: " + _0x29da44);
}
} catch (_0x588690) {
console.log(_0x588690);
}
}
async ttlxj_authCheck(_0x4f6022 = {}) {
try {
let _0x4d99f0 = {
fn: "ttlxj_authCheck",
method: "post",
url: "https://epay.10010.com/ps-pafs-auth-front/v1/auth/check",
headers: {
bizchannelinfo: this.get_bizchannelinfo()
}
};
let {
result: _0x3b9b60
} = await this.request(_0x4d99f0);
let _0x225a71 = _0x4c672b.get(_0x3b9b60, "code", -1);
if (_0x225a71 == "0000") {
let {
mobile: _0x3d95dc,
sessionId: _0x4d0c33,
tokenId: _0x49ad12,
userId: _0x31f9ba
} = _0x3b9b60?.data?.authInfo;
const _0x253112 = {
sessionId: _0x4d0c33,
tokenId: _0x49ad12,
userId: _0x31f9ba
};
Object.assign(this, _0x253112);
await this.ttlxj_userDrawInfo();
await this.ttlxj_queryAvailable();
} else if (_0x225a71 == "2101000100") {
let _0x3c284b = _0x3b9b60?.data?.woauth_login_url;
await this.ttlxj_login(_0x3c284b);
} else {
let _0x118393 = _0x3b9b60?.msgInside || _0x3b9b60?.msg || "";
this.log("天天领现金获取tokenId失败[" + _0x225a71 + "]: " + _0x118393);
}
} catch (_0x241235) {
console.log(_0x241235);
}
}
async ttlxj_login(_0x1b4633, _0x14425a = {}) {
try {
_0x1b4633 += "https://epay.10010.com/ci-mcss-party-web/clockIn/?bizFrom=" + _0x3e622c + "&bizChannelCode=" + _0x46b3a9;
const _0x452066 = {
fn: "ttlxj_login",
method: "get",
url: _0x1b4633
};
let _0x306538 = _0x452066;
let {
headers: _0x3fd535,
statusCode: _0x11cbd3
} = await this.request(_0x306538);
if (_0x3fd535?.location) {
let _0x48f551 = new URL(_0x3fd535.location);
this.rptId = _0x48f551.searchParams.get("rptid");
if (this.rptId) {
await this.ttlxj_authCheck();
} else {
this.log("天天领现金获取rptid失败");
}
} else {
this.log("天天领现金获取rptid失败[" + _0x11cbd3 + "]");
}
} catch (_0x5dbd52) {
console.log(_0x5dbd52);
}
}
async ttlxj_userDrawInfo(_0x37fbc0 = {}) {
try {
let _0x4d8335 = {
fn: "ttlxj_userDrawInfo",
method: "post",
url: "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/userDrawInfo",
headers: {
bizchannelinfo: this.get_bizchannelinfo(),
authinfo: this.get_epay_authinfo()
}
};
let {
result: _0x45a3ac
} = await this.request(_0x4d8335);
let _0x5c07d0 = _0x4c672b.get(_0x45a3ac, "code", -1);
if (_0x5c07d0 == "0000") {
let _0x588d7e = _0x45a3ac?.data?.dayOfWeek;
let _0x54a427 = "day" + _0x588d7e;
let _0x2e460c = _0x45a3ac?.data?.[_0x54a427] == "1";
const _0x21c565 = {
notify: true
};
this.log("天天领现金今天" + (_0x2e460c ? "未" : "已") + "打卡", _0x21c565);
if (_0x2e460c) {
let _0x8aadbb = new Date().getDay();
if (_0x8aadbb % 7 == 0) {
await this.ttlxj_unifyDrawNew("C");
} else {
await this.ttlxj_unifyDrawNew("B");
}
}
} else {
let _0x164c15 = _0x45a3ac?.msg || "";
this.log("天天领现金查询失败[" + _0x5c07d0 + "]: " + _0x164c15);
}
} catch (_0xe34553) {
console.log(_0xe34553);
}
}
async ttlxj_unifyDrawNew(_0x58b44e, _0x1be412 = {}) {
try {
const _0x3a6ffd = {
drawType: _0x58b44e,
bizFrom: _0x3e622c,
activityId: _0x5868aa.ttlxj
};
let _0x1d3a15 = {
fn: "ttlxj_unifyDrawNew",
method: "post",
url: "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/unifyDrawNew",
headers: {
bizchannelinfo: this.get_bizchannelinfo(),
authinfo: this.get_epay_authinfo()
},
form: _0x3a6ffd
};
let {
result: _0x5dd24a
} = await this.request(_0x1d3a15);
let _0x5783a6 = _0x4c672b.get(_0x5dd24a, "code", -1);
if (_0x5783a6 == "0000" && _0x5dd24a?.data?.returnCode == 0) {
let _0x46ba0e = _0x5dd24a?.data?.awardTipContent?.replace(/xx/, _0x5dd24a?.data?.amount);
const _0x59731c = {
notify: true
};
this.log("天天领现金打卡:" + _0x46ba0e, _0x59731c);
} else {
let _0x366f6b = _0x5dd24a?.data?.returnMsg || _0x5dd24a?.msg || "";
this.log("天天领现金打卡失败[" + (_0x5dd24a?.data?.returnCode || _0x5783a6) + "]: " + _0x366f6b);
}
} catch (_0x28cf1a) {
console.log(_0x28cf1a);
}
}
async ttlxj_h(_0x47d16c = {}) {
try {
const _0x2f3dc6 = {
bizFrom: _0x3e622c,
activityId: _0x5868aa.ttlxj,
uid: _0x5b10f9
};
let _0x469865 = {
fn: "ttlxj_h",
method: "post",
url: "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/help",
headers: {
bizchannelinfo: this.get_bizchannelinfo(),
authinfo: this.get_epay_authinfo()
},
form: _0x2f3dc6
};
await this.request(_0x469865);
} catch (_0x173381) {
console.log(_0x173381);
}
}
async ttlxj_queryAvailable(_0x23c9d2 = {}) {
try {
let _0x2f3ee4 = {
fn: "ttlxj_queryAvailable",
method: "post",
url: "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/queryAvailable",
headers: {
bizchannelinfo: this.get_bizchannelinfo(),
authinfo: this.get_epay_authinfo()
}
};
let {
result: _0x351127
} = await this.request(_0x2f3ee4);
let _0x22c4f9 = _0x4c672b.get(_0x351127, "code", -1);
if (_0x22c4f9 == "0000" && _0x351127?.data?.returnCode == 0) {
let _0x11a97b = _0x351127?.data?.availableAmount || 0;
const _0x3dffbb = {
notify: true
};
this.log("可用立减金: " + (_0x11a97b / 100).toFixed(2) + "元", _0x3dffbb);
let _0x3a9ca0 = [];
let _0x4a77d6 = Date.now();
for (let _0x22c5c5 of _0x351127?.data?.prizeList?.filter(_0xac5521 => _0xac5521.status == "A")) {
let _0xdf42c9 = _0x22c5c5.endTime;
let _0x148118 = new Date(_0xdf42c9.slice(0, 4) + "-" + _0xdf42c9.slice(4, 6) + "-" + _0xdf42c9.slice(6, 8) + " 00:00:00");
let _0xc3cc5f = _0x148118.getTime();
if (_0xc3cc5f - _0x4a77d6 < _0x36a6fc * 24 * 60 * 60 * 1000) {
let _0x24bd89 = _0x4c672b.time("yyyy-MM-dd", _0xc3cc5f);
const _0x4d3dd0 = {
timestamp: _0xc3cc5f,
date: _0x24bd89,
amount: _0x22c5c5.amount
};
_0x3a9ca0.push(_0x4d3dd0);
}
}
if (_0x3a9ca0.length) {
let _0x5e1332 = 0;
let _0xb33342 = {
timestamp: 0
};
let _0x296b80 = _0x3a9ca0.reduce(function (_0x11f322, _0x3cd209) {
if (_0xb33342.timestamp == 0 || _0x3cd209.timestamp < _0xb33342.timestamp) {
_0xb33342 = _0x3cd209;
}
return _0x11f322 + parseFloat(_0x3cd209.amount);
}, 0);
const _0x5d32b7 = {
notify: true
};
this.log(_0x36a6fc + "天内过期立减金: " + _0x296b80.toFixed(2) + "元", _0x5d32b7);
const _0x2dff48 = {
notify: true
};
this.log("最早过期立减金: " + _0xb33342.amount + "元 -- " + _0xb33342.date + "过期", _0x2dff48);
} else {
const _0x437216 = {
notify: true
};
this.log(_0x36a6fc + "天内没有过期的立减金", _0x437216);
}
} else {
let _0x1a23ec = _0x351127?.data?.returnMsg || _0x351127?.msg || "";
this.log("天天领现金打卡失败[" + (_0x351127?.data?.returnCode || _0x22c4f9) + "]: " + _0x1a23ec);
}
} catch (_0x2d80a8) {
console.log(_0x2d80a8);
}
}
async epay_28_authCheck(_0x1d0fd8 = {}) {
try {
let _0x35ae82 = {
fn: "epay_28_authCheck",
method: "post",
url: "https://epay.10010.com/ps-pafs-auth-front/v1/auth/check",
headers: {
bizchannelinfo: this.get_bizchannelinfo()
}
};
let {
result: _0x1d449e
} = await this.request(_0x35ae82);
let _0x4e8f00 = _0x4c672b.get(_0x1d449e, "code", -1);
if (_0x4e8f00 == "0000") {
let {
mobile: _0x4668a5,
sessionId: _0xb2b5be,
tokenId: _0x7c73d9,
userId: _0x42df1c
} = _0x1d449e?.data?.authInfo;
const _0x4d9ca1 = {
sessionId: _0xb2b5be,
tokenId: _0x7c73d9,
userId: _0x42df1c
};
Object.assign(this, _0x4d9ca1);
await this.epay_28_queryUserPage();
} else if (_0x4e8f00 == "2101000100") {
let _0x5892fa = _0x1d449e?.data?.woauth_login_url;
await this.epay_28_login(_0x5892fa);
} else {
let _0x1fb8e2 = _0x1d449e?.msgInside || _0x1d449e?.msg || "";
this.log("联通支付日获取tokenId失败[" + _0x4e8f00 + "]: " + _0x1fb8e2);
}
} catch (_0x268652) {
console.log(_0x268652);
}
}
async epay_28_login(_0x139155, _0x3721a9 = {}) {
try {
let _0x236f54 = _0x4c672b.time("yyyyMM") + "28ZFR";
_0x139155 += "https://epay.10010.com/ci-mcss-party-web/rainbow/?templateName=" + _0x236f54 + "&bizFrom=225&bizChannelCode=225&channelType=WDQB";
const _0x5d5710 = {
fn: "epay_28_login",
method: "get",
url: _0x139155
};
let _0x489347 = _0x5d5710;
let {
headers: _0x10b4ba,
statusCode: _0x1c60e3
} = await this.request(_0x489347);
if (_0x10b4ba?.location) {
let _0xbf5a4c = new URL(_0x10b4ba.location);
this.rptId = _0xbf5a4c.searchParams.get("rptid");
if (this.rptId) {
await this.epay_28_authCheck();
} else {
this.log("联通支付日获取rptid失败");
}
} else {
this.log("联通支付日获取rptid失败[" + _0x1c60e3 + "]");
}
} catch (_0x24e61c) {
console.log(_0x24e61c);
}
}
async epay_28_queryUserPage(_0x593a59 = {}) {
try {
let _0x52a117 = _0x4c672b.time("yyyyMM") + "28ZFR";
const _0xa4a05 = {
templateName: _0x52a117
};
let _0x2b8287 = {
fn: "epay_28_queryUserPage",
method: "post",
url: "https://epay.10010.com/ci-mcss-party-front/v1/rainbow/queryUserPage",
headers: {
bizchannelinfo: this.get_bizchannelinfo(),
authinfo: this.get_epay_authinfo()
},
form: _0xa4a05
};
let {
result: _0x316895
} = await this.request(_0x2b8287);
let _0x2a5e2b = _0x4c672b.get(_0x316895, "code", -1);
if (_0x2a5e2b == "0000" && _0x316895?.data?.returnCode == 0) {
for (let _0x29cca7 of _0x316895?.data?.prizeList?.rainbowMouldInfos || []) {
if (_0x29cca7?.rainbowUnitInfos?.[0]?.unitActivityId) {
await this.epay_28_unifyDraw(_0x29cca7.rainbowUnitInfos[0]);