-
Notifications
You must be signed in to change notification settings - Fork 15
/
kjgzz.js
1442 lines (1217 loc) · 53.8 KB
/
kjgzz.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
/**
* 先看脚本说明 先看脚本说明
* 需要安装依赖sm-crypto
* 需要安装依赖sm-crypto
* 需要安装依赖sm-crypto
* 走下链接
https://h5.scimall.org.cn/user/register?invite_from=5&invite_uid=SRf8J
* 科技工作者之家APP
*
*
* ========= 青龙--配置文件 =========
* 先手动进APP开启连签180天活动,并且自己创建一个部落,抓包拿到自己部落的group_id
* 自己设置 本脚本内 的变量mygroupId为自己部落的id
*
* 变量格式: export keji_ck='手机号&密码' ,多账号用 换行 或 @ 分割
* 定时每天一次
*/
const { log } = require("console");
const sm3 =require('sm-crypto').sm3;
const $ = new Env("科技工作者之家");
const notify = $.isNode() ? require("./sendNotify") : "";
const Notify = 1 //0为关闭通知,1为打开通知,默认为1
const debug = 0 //0为关闭调试,1为打开调试,默认为0
//---------------------------------------------------------------------------------------------------------
let ckStr = ($.isNode() ? process.env.keji_ck : $.getdata('keji_ck')) || '';
let msg, ck;
var _token; //登录获取的token
var ctid; //分享文章的id
var _poem; //诗词ID
var uid; //randomcode
//部落id//部落id//部落id//部落id //部落id//部落id
var mygroupId='33963'; //部落id
var randomdisscusarr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]; //评论随机数组
var _weiboid; //删除的id
let host = 'api-kejia.scimall.org.cn';
//文章ID
//---------------------------------------------------------------------------------------------------------
var sharebox=['6155236','6155515','6158826','6158717','6155234','6155231','6158824','6158571','6158031','6158461','6158001','6157997','6157926','6157432','6157074'];
//---------------------------------------------------------------------------------------------------------
//诗词用
//---------------------------------------------------------------------------------------------------------
var poemtxt=['人人仰望在何处生怕河梁分袂处','人间信有白头痴生贤特也涓良日','保得重重翠碧衣安乐常思病苦时','成由勤俭破由奢器远况曾师旧德','里中巴客半归乡路入烟霞草木香','读书谁料转家贫万里桥头独越吟','卷帷上床喜不定书沈寒雁云边影','给与烦襟作冷风力尽不得抛杵声','行道才人斗射飞万全身出百重围','诗人浪作水仙歌生平素志惟丘壑','诗盟岂止寻宗派生涯闻已半蒿莱','城头夜半声哑哑素手春溪罢浣纱','城傍牧马驱未过素淡堪移入卧屏','真王未许久从容实用人材即至公','本无背面与初终来成方面保厘功','本作耕耘意若何来君回唱竹枝歌','省多少闲是闲非上品功能甘露味','省得蔡州今日事上古初闻出尧世','落在深泥谁复怜地坼天开总是闲','落霞语好终伤绮地暖应知穴处狸','名山长似有人催师门念旧如相问','名压西川旧海棠师承有法古韦康','珍重故人知我者珠团绿锦趁晴摊','珍重诗人频管领珠玑影冷偏粘草','鸟睡花林绣羽香眉间画得山两点',]
//---------------------------------------------------------------------------------------------------------
//评论用
//---------------------------------------------------------------------------------------------------------
var discusstxt=['坐游船翠柳岸边飘临小径南湖陶我醉','山鸟群飞日隐轻霞登车上马倏忽雨散','静守时光以待流年易水人去明月如霜','生能尽欢死亦无憾静水流深沧笙踏歌','家山乡眷兮会时稀今朝设宴兮觥散飞','单感觉轻风拂面来怎安知夕日云霞坠','对花对酒落梅成愁十里长亭水悠悠兮','养怡之福可得永年幸甚至哉歌以咏志','有生一日皆报恩时有生一日皆伴亲时','俯仰自得游心太玄目送归鸿手挥五弦','北风其凉雨雪其滂惠而好我携手同行','将子无怒秋以为期乘彼垝垣以望复关','置酒高堂悲歌临觞人寿几何逝如朝霜','地列酒泉天垂酒池杜康妙识仪狄先知','苹以春晖兰以秋芳来日苦短去日苦长','信誓旦旦不思其反反是不思亦已焉哉','育吾兄弟艰辛备历摧折作磨因此遭疾','爱力所及原本真诚不作诳言不存欺心','有志未伸有求不获精神痛苦以此为卓','日月之行若出其中星汉灿烂若出其里','思从二女适彼湘沅灵幽听微谁观玉颜'];
//---------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------
let Change = '无'
//---------------------------------------------------------------------------------------------------------
async function tips(ckArr) {
let Version = `\n📌 微信公众号:老司机上线 📌`
DoubleLog(`${Version}\n📌 🆙 更新内容: ${Change}`);
// DoubleLog(`${thank}`);
DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`);
debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`);
}
!(async () => {
let ckArr = await checkEnv(ckStr, "keji_ck");
await tips(ckArr);
for (let index = 0; index < ckArr.length; index++) {
let num = index + 1;
DoubleLog(`\n-------- 开始【第 ${num} 个账号】--------`);
ck = ckArr[index].split("&");
debugLog(`【debug】 这是你第 ${num} 账号信息:\n ${ck}`);
await start();
}
await SendMsg(msg);
})()
.catch((e) => $.logErr(e))
.finally(() => $.done());
async function start() {
console.log("\n开始 任务");
uid=RandeCode();
await $.wait(3 * 1000);
await login();
await $.wait(4 * 1000);
await SignIn(); //先签到
await $.wait(4 * 1000);
//分享
for(var i=0;i<10;i++)
{
let tt=randomInt(3, 6); //随机暂停时间
GetCtid(i);
await share();
await $.wait(tt * 1000);
}
//两次视频
let c;
c=randomInt(4, 8); //随机暂停时间
await lookVideo(); //看视频
await $.wait(c * 1000);
await lookVideo(); //看视频
c=randomInt(10, 15);
await $.wait(c * 1000);
randomsort(randomdisscusarr);
//发表话题并且评论
for(var i=0;i<5;i++)
{
GetPoem(i);
await PublishTitle();
c=randomInt(3, 7);
await $.wait(c * 1000);
await GetTitleID();
c=randomInt(3, 7);
await $.wait(c * 1000);
await DiscussTitle(i);
c=randomInt(3, 7);
await $.wait(c * 1000);
await DiscussTitle(randomdisscusarr.length-1-i);
c=randomInt(3, 7);
await $.wait(c * 1000);
}
await LuckyDraw();
c=randomInt(3, 6);
await $.wait(c * 1000);
await ShareLuckyDraw();
c=randomInt(4, 6);
await $.wait(c * 1000);
await LuckyDraw();
c=randomInt(2, 6);
await $.wait(c * 1000);
await Update_wallet();
await $.wait(2 * 1000);
}
/**
* 分享 httpPost
*/
async function share() {
let t=ts10(); //时间
let bd='content_id='+ctid+'&content_type=1&share_source=';
let encry_str='channel=baidu&content_id='+ctid+'&content_type=1&device_model=MIX2&from=android&path=/share/statistic&sdk_int=28&share_source=&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/share/statistic?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
//console.log("加密段 "+encry_str);
//console.log("sn "+snstr);
//console.log("地址 :"+str);
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '47',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `分享`);
//console.log(result);
if (result.code==0) {
DoubleLog(result.data.msg);
await wait(3);
}
else if(result.code==60024)
{
DoubleLog(result.msg);
await wait(3);
}
else {
//DoubleLog(`分享失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
//登录
async function login() {
let t=ts10(); //时间
let bd='username='+ck[0]+'&password='+ck[1]+'&country_code=86';
let encry_str='channel=baidu&country_code=86&device_model=MIX2&from=android&password='+ck[1]+'&path=/account/loginByPass&sdk_int=28&system_version=android9×tamp='+t+'&token=&tourist_token='+uid+'&username='+ck[0]+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/account/loginByPass?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token=&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '55',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `登录`);
_token=result.data.token;
//console.log(result.data.token);
if (result.code==0) {
DoubleLog('登录'+result.msg);
await wait(3);
} else {
//DoubleLog(`登录失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
//退出登录
async function logout() {
let t=ts10(); //时间
let encry_str='channel=baidu&device_model=MIX2&from=android&path=/account/logout&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token=&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/account/logout?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token=&token='+_token+'&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '0',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
};
let result = await httpPost(pack, `退出登录`);
console.log(result);
if (result.code==0) {
DoubleLog('退出登录'+result.msg);
await wait(3);
} else {
DoubleLog(`退出登录失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
/**
* 签到 httpPost
*/
async function SignIn() {
let t=ts10(); //时间
let bd='sign_day='+local_year()+'-'+local_month_two()+'-'+local_day_two();
let encry_str='channel=baidu&device_model=MIX2&from=android&path=/signin/doSign&sdk_int=28&'+bd+'&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/signin/doSign?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '19',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `签到`);
// console.log(result);
if (result.code ==0) {
DoubleLog('签到成功,获得积分'+result.data.point);
await wait(3);
}
else if(result.code ==10082)
{
DoubleLog(result.msg);
await wait(3);
}
else {
// DoubleLog(`查询: 失败 ❌ 了呢,原因未知!`);
// console.log(result);
}
} catch (error) {
console.log(error);
}
}
/**
* 看视频 httpPost
*/
async function lookVideo() {
let t=ts10(); //时间
let bd='item_id=5376&type=2';
let encry_str='channel=baidu&device_model=MIX2&from=android&item_id=5376&path=/point/addPoint&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+"&type=2"+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/point/addPoint?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '19',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `看视频`);
//console.log(result);
if (result.code ==0) {
DoubleLog('看视频成功,获得积分'+result.data.msg);
await wait(3);
}
//else if(result.code ==10082)
//{
// DoubleLog(result.msg);
// await wait(3);
//}
else {
// DoubleLog('看视频错误,原因未知');
console.log(result);
}
} catch (error) {
console.log(error);
}
}
/**
* 发动态 httpPost
*/
async function PublishTitle() {
let t=ts10(); //时间
let poem_change=encodeURI(poemtxt[_poem]);
//let poem_change=encodeURI('梦里寻他千百度,那人却在灯火阑珊处');
let bd='content='+poem_change+'&from=android&groupId='+mygroupId+'&repostId=0&sourceId=0&sourceType=weibo&title=&type=3'
let encry_str='channel=baidu&content='+poemtxt[_poem]+'&device_model=MIX2&from=android&groupId='+mygroupId+'&path=/weibo/issueWeibo&repostId=0&sdk_int=28&sourceId=0&sourceType=weibo&system_version=android9×tamp='+t+'&title='+'&token='+_token+'&tourist_token='+uid+"&type=3"+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/weibo/issueWeibo?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
//console.log("发动态加密段 "+encry_str);
//console.log("发动态sn "+snstr);
//console.log("发动态 :"+str);
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '213',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `发动态`);
// console.log(result);
if (result.code ==0) {
DoubleLog(result.data.msg);
await wait(3);
}
//else if(result.code ==10082)
//{
// DoubleLog(result.msg);
// await wait(3);
//}
else {
// DoubleLog('发动态错误,原因未知');
console.log(result);
}
} catch (error) {
console.log(error);
}
}
/**
* 发评论 httpPost
*/
async function DiscussTitle(id) {
let t=ts10(); //时间
let discuss_change=encodeURI(discusstxt[randomdisscusarr[id]]);
//let poem_change=encodeURI('梦里寻他千百度,那人却在灯火阑珊处');
let bd='content='+discuss_change+'&fromId='+_weiboid+'&pid=0&type=1&commentId=0&longitude=0.0&latitude=0.0';
let encry_str='channel=baidu&commentId=0&content='+discusstxt[randomdisscusarr[id]]+'&device_model=MIX2&from=android&fromId='+_weiboid+'&latitude=0.0&longitude=0.0&path=/comment/addComment&pid=0&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&type=1&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/comment/addComment?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '219',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `发评论`);
// console.log(result);
if (result.code ==0) {
DoubleLog(result.data.msg);
await wait(3);
}
//else if(result.code ==10082)
//{
// DoubleLog(result.msg);
// await wait(3);
//}
else {
// DoubleLog('发评论错误,原因未知');
console.log(result);
}
} catch (error) {
console.log(error);
}
}
/**
* 删动态
*/
async function DelTitle() {
let t=ts10(); //时间
let bd='weiBoId='+_weiboid;
let encry_str='channel=baidu&device_model=MIX2&from=android&path=/weibo/delWeibo&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&weiBoId='+_weiboid+'&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/weibo/delWeibo?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '15',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `删动态`);
//console.log(result);
if (result.code ==0) {
DoubleLog('删动态'+result.msg);
await wait(3);
}
//else if(result.code ==10082)
//{
// DoubleLog(result.msg);
// await wait(3);
//}
else {
DoubleLog('删动态错误,原因未知');
//console.log(result);
}
} catch (error) {
console.log(error);
}
}
//获取动态ID
async function GetTitleID() {
let t=ts10(); //时间
let encry_str='channel=baidu&device_model=MIX2&from=android&path=/weibo/getMyWeibolist&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&weiBoId=0&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/weibo/getMyWeibolist?weiBoId=0×tamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
// console.log("登录加密段 "+encry_str);
//console.log("登录sn "+snstr);
//console.log("登录地址 :"+str);
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
};
let result = await httpGet(pack, `查ID`);
if (result.code==0) {
_weiboid=result.data[0].id;
DoubleLog('获取成功ID'+_weiboid);
await wait(3);
} else {
// DoubleLog(`获取失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
//更新额度
async function Update_wallet() {
let t=ts10(); //时间
let encry_str='channel=baidu&device_model=MIX2&from=android&path=/point/exchangeRule&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/point/exchangeRule?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
// console.log("登录加密段 "+encry_str);
//console.log("登录sn "+snstr);
//console.log("登录地址 :"+str);
try {
let pack = {
url:str,
headers: {
'Host': host,
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
};
let result = await httpGet(pack, `更新钱包额度`);
//console.log(result);
if (result.code==0) {
DoubleLog('额度为'+result.data.exchange_point);
DoubleLog('积分为'+result.data.current_point);
await wait(3);
} else {
// DoubleLog(`更新额度失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
/**
* 设置Token httpPost
*/
async function SetToken() {
let t=ts10(); //时间
let bd='device_token=AoaY6KKBmSipivfHjjW9bq9--MLsPLAZBm7ZRg1QkeYu';
let encry_str='channel=huawei&device_model=MIX2&device_token=AoaY6KKBmSipivfHjjW9bq9--MLsPLAZBm7ZRg1QkeYu&from=android&path=/push/setToken&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token=&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
let snstr=sm3(encry_str);
let str='https://api-kejia.scimall.org.cn/push/setToken?timestamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=huawei&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
try {
let pack = {
url:str,
headers: {
'Host': host,
'Content-Length': '57',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
body:bd
};
let result = await httpPost(pack, `设置Token`);
console.log(result);
if (result.code ==0) {
DoubleLog(result.data.msg);
await wait(3);
}
else {
DoubleLog('设置Token错误,原因未知');
console.log(result);
}
} catch (error) {
console.log(error);
}
}
//更新信息相关1 //0是signInfo 1是DAILYTASK 2-3是BAnner
async function UpdateInfoFirst(j) {
let t=ts10(); //时间
let encry_str;
if(j==0)
{
encry_str='channel=baidu&device_model=MIX2&from=android&path=/signin/getSignInfo&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
}
else if(j==1)
{
encry_str='channel=baidu&device_model=MIX2&from=android&path=/task/dailyTask&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
}
else
{
encry_str='channel=baidu&device_model=MIX2&from=android&path=/banner/getBannerInfo&place='+j+'&sdk_int=28&system_version=android9×tamp='+t+'&token='+_token+'&tourist_token='+uid+'&uuid='+uid+'&v=5.5.1&secretkey=LH6064#!@&YTM';
}
let snstr=sm3(encry_str);
let str;
if(j==0)
{
str='https://api-kejia.scimall.org.cn/signin/getSignInfo?×tamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
}
else if(j==1)
{
str='https://api-kejia.scimall.org.cn/task/dailyTask?×tamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
}
else
{
str='https://api-kejia.scimall.org.cn/banner/getBannerInfo?place='+j+'×tamp='+t+'&v=5.5.1&from=android&device_model=MIX2&channel=baidu&system_version=android9&sdk_int=28'+'&uuid='+uid+'&tourist_token='+uid+'&token='+_token+'&sn='+snstr;
}
// console.log("登录加密段 "+encry_str);
//console.log("登录sn "+snstr);
//console.log("登录地址 :"+str);
try {
let pack = {
url:str,
headers: {
'Host': host,
'Accept':'application/json;charset=UTF-8',
'User-Agent':'okhttp/4.2.2',
'Connection':'Keep-Alive'
},
};
let result = await httpGet(pack, `更新信息`);
console.log(result);
if (result.code==0) {
DoubleLog('更新成功');
await wait(3);
} else {
DoubleLog(`更新失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
//抽奖
async function LuckyDraw() {
let t=ts10(); //时间
let str='https://h5.scimall.org.cn/Signdraw/ajaxDraw?token='+_token+'&lottery_id=165'
try {
let pack = {
url:str,
headers: {
'Host': 'h5.scimall.org.cn',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'Mozilla/5.0 (Linux; Android 9; MIX 2 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 SciMall/5.5.1;',
'Cookie':'PHPSESSION=4tb00jvd00m1i1oje1l8v9rrd3; acw_tc=2760820416611817117308644efdbb76b8441f45f9863fe145c30793d6a756;',
'Connection':'Keep-Alive'
},
};
let result = await httpGet(pack, `抽奖`);
if (result.code==0) {
//_weiboid=result.data[0].id;
DoubleLog('抽奖获得'+result.data.msg);
await wait(3);
} else {
// DoubleLog(`抽奖失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
//分享获取抽奖机会
async function ShareLuckyDraw() {
let t=ts10(); //时间
let str='https://h5.scimall.org.cn/Signdraw/ajaxShare?token='+_token+'&lottery_id=165'
try {
let pack = {
url:str,
headers: {
'Host': 'h5.scimall.org.cn',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept':'application/json;charset=UTF-8',
'User-Agent':'Mozilla/5.0 (Linux; Android 9; MIX 2 Build/PKQ1.190118.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 SciMall/5.5.1;',
'Cookie':'PHPSESSION=4tb00jvd00m1i1oje1l8v9rrd3;',
'Connection':'Keep-Alive'
},
};
let result = await httpGet(pack, `分享抽奖`);
// console.log(result);
if (result.code==0) {
//_weiboid=result.data[0].id;
DoubleLog('分享'+result.msg);
await wait(3);
} else {
//DoubleLog(`分享失败了,原因未知!`);
console.log(result);
}
} catch (error) {
console.log(error);
}
}
// #region ******************************************************** 固定代码 ********************************************************
/**
* 变量检查
*/
async function checkEnv(ck, Variables) {
return new Promise((resolve) => {
let ckArr = []
if (ck) {
if (ck.indexOf("@") !== -1) {
ck.split("@").forEach((item) => {
ckArr.push(item);
});
} else if (ck.indexOf("\n") !== -1) {
ck.split("\n").forEach((item) => {
ckArr.push(item);
});
} else {
ckArr.push(ck);
}
resolve(ckArr)
} else {
console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`)
}
}
)
}
/**
* 发送消息
*/
async function SendMsg(message) {
if (!message) return;
if (Notify > 0) {
if ($.isNode()) {
var notify = require("./sendNotify");
await notify.sendNotify($.name, message);
} else {
// $.msg(message);
$.msg($.name, '', message)
}
} else {
console.log(message);
}
}
/**
* 双平台log输出
*/
function DoubleLog(data) {
if ($.isNode()) {
if (data) {
console.log(` ${data}`);
msg += `\n ${data}`;
}
} else {
console.log(` ${data}`);
msg += `\n ${data}`;
}
}
/**
* 随机 数字 + 大写字母 生成
*/
function randomszdx(e) {
e = e || 32;
var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890",
a = t.length,
n = "";
for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
return n;
}
/**
* 随机 数字 + 小写字母 生成
*/
function randomszxx(e) {
e = e || 32;
var t = "qwertyuioplkjhgfdsazxcvbnm1234567890",
a = t.length,
n = "";
for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
return n;
}
/**
* 随机整数生成
*/
function randomInt(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
/**
* 时间戳 13位
*/
function ts13() {
return Math.round(new Date().getTime()).toString();
}
/**
* 时间戳 10位
*/
function ts10() {
return Math.round(new Date().getTime() / 1000).toString();
}
/**
* 获取当前小时数
*/
function local_hours() {
let myDate = new Date();
let h = myDate.getHours();
return h;
}
/**
* 获取当前分钟数
*/
function local_minutes() {
let myDate = new Date();
let m = myDate.getMinutes();
return m;
}
/**
* 获取当前年份 2022
*/
function local_year() {
let myDate = new Date();
y = myDate.getFullYear();
return y;
}
/**
* 获取当前月份(数字) 5月
*/
function local_month() {
let myDate = new Date();
let m = myDate.getMonth();
return m;
}
/**
* 获取当前月份(数字) 05月 补零
*/
function local_month_two() {
let myDate = new Date();
let m = myDate.getMonth();
m=m+1;
if (m.toString().length == 1) {
m = `0${m}`
}
return m;
}
/**
* 获取当前天数(数字) 5日
*/
function local_day() {
let myDate = new Date();
let d = myDate.getDate();
return d;
}
/**
* 获取当前天数 05日 补零
*/
function local_day_two() {
let myDate = new Date();
let d = myDate.getDate();
if (d.toString().length == 1) {
d = `0${d}`
}
return d;
}
/**
* 等待 X 秒
*/
function wait(n) {
return new Promise(function (resolve) {
setTimeout(resolve, n * 1000);
});
}
/**
* 每日网抑云
*/
function wyy() {
return new Promise((resolve) => {
let url = {
url: `http://ovooa.com/API/wyrp/api.php`,
}