forked from yangmian1167/js_project
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path领英wh.js
1130 lines (1091 loc) · 26.3 KB
/
领英wh.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
importClass(android.content.ContentResolver);
importClass(android.database.Cursor);
importClass(android.net.Uri);
//取短信function
function get_sms_by_time(name, timeline) {
var smsUri = "content://sms/inbox";
function xxxx(body, date) {
var sms_arr = {};
var cursor = context
.getContentResolver()
.query(
Uri.parse(smsUri),
["body"],
"body like ? and date > ?",
["%" + body + "%", date],
"date desc"
);
if (cursor != null) {
let i = 0;
while (cursor.moveToNext()) {
var sms_content = cursor.getString(cursor.getColumnIndex("body"));
console.log("短信", sms_content);
sms_arr[i] = sms_content;
i++;
}
}
// log(sms_arr);
if (sms_arr[0]) {
return sms_arr[0];
} else {
return false;
}
}
if (!timeline) {
timeline = 0;
}
return xxxx(name, timeline);
}
//post
function jspost(url, data) {
var res = http.post(url, data);
var data = res.body.string();
if (data) {
log(data);
return data;
}
}
// 获取接口数据
function getTask() {
var url = "http://api.wenfree.cn/public/";
let res = http.post(url, {
s: "NewsImei.Imei",
imei: device.getIMEI() || "13856d62514d48cba2467cbf8dcb5f46",
});
let json = {};
try {
let html = res.body.string();
// log(html)
json = JSON.parse(html);
log(json);
return json.data;
} catch (err) {
//在此处理错误
}
}
// 获取流程记录
function getTaskRecord() {
var url = "http://api.wenfree.cn/public/";
let res = http.post(url, {
s: "NewsImeiTaskData.Task",
imei: device.getIMEI() || "13856d62514d48cba2467cbf8dcb5f46",
appname: appinfo.name,
});
let json = {};
try {
let html = res.body.string();
// log(html)
json = JSON.parse(html);
if (json.data) {
info = json.data.task_data;
info.id = json.data.id;
}
} catch (err) {
//在此处理错误
}
}
// 返回流程记录
function getTaskRecordUpdate(info) {
let infoArr = {};
infoArr["task_data"] = JSON.stringify(info);
var url = "http://api.wenfree.cn/public/";
let res = http.post(url, {
s: "Index.update",
id: info.id,
table: "news_imei_data_task_record",
arr: JSON.stringify(infoArr),
});
let json = {};
try {
let html = res.body.string();
log(html);
} catch (err) {
//在此处理错误
}
}
//任务回调
function callback_task(id, state) {
var url = "http://api.wenfree.cn/public/";
var arr = {};
arr["id"] = id;
arr["state"] = state;
var postdata = {};
postdata["s"] = "NewsRecordBack.Back";
postdata["arr"] = JSON.stringify(arr);
log(arr, postdata);
log(jspost(url, postdata));
}
//读取本地数据
function getStorageData(name, key) {
const storage = storages.create(name); //创建storage对象
if (storage.contains(key)) {
return storage.get(key);
}
//默认返回undefined
}
function app_info(name, data) {
var url = "http://api.wenfree.cn/public/";
var postdata = {};
postdata["s"] = "App.NewsAppInfo.App_info";
postdata["imei"] = device.getIMEI() || "13856d62514d48cba2467cbf8dcb5f46";
postdata["app_name"] = name;
postdata["app_info"] = JSON.stringify(data);
log(jspost(url, postdata));
}
//基础函数
function active(pkg, n) {
if (!n) {
n = 5;
}
if (currentPackage() == pkg) {
log("应用在前端");
return true;
} else {
app.launch(pkg);
sleep(1000 * n);
}
}
//准备点击
function click_(x, y, sleeptime, txt) {
if (!sleeptime) {
sleeptime = 1;
}
if (txt) {
log("准备点击->" + txt, "x:", x, "y:", y);
} else {
log("准备点击坐标->", "x:", x, "y:", y);
}
if (x > 0 && x < width && y > 0 && y < height) {
click(x, y);
sleep(sleeptime * 1000);
return true;
} else {
log("坐标错误");
}
}
//点击obj
function click__(objs, sleeptime, txt) {
if (!sleeptime) {
sleeptime == 1;
}
if (txt) {
log("准备点击对象->" + txt);
} else {
log("点击未命名对象");
}
click_(objs.bounds().centerX(), objs.bounds().centerY(), sleeptime, txt);
}
//普通封装
function jjsclick(way, txt, clickKey, sleeptimes, height_) {
sleeptimes = sleeptimes || 1; //当n没有传值时,设置n=1
if (!height_) {
height_ = height;
} //没有设置高度则height = 1440
if (!clickKey) {
clickKey = true;
} //如果没有设置点击项,设置为false
var objs = false;
if (way == "text") {
objs = text(txt).findOne(200);
} else if (way == "id") {
objs = id(txt).findOne(200);
} else if (way == "desc") {
objs = desc(txt).findOne(200);
}
if (objs) {
if (
objs.bounds().centerX() < 0 ||
objs.bounds().centerX() > width ||
objs.bounds().centerY() < 0 ||
objs.bounds().centerY() > height_
) {
} else {
if (clickKey) {
log(
"准备点击->",
txt,
"x:",
objs.bounds().centerX(),
"y:",
objs.bounds().centerY()
);
click__(objs, sleeptimes, txt);
} else {
log("找到->", txt);
}
return true;
}
}
}
//普通封装
function jsclick(way, txt, clickKey, sleeptimes, height_) {
sleeptimes = sleeptimes || 1; //当n没有传值时,设置n=1
if (!height_) {
height_ = height;
} //没有设置高度则height = 1440
clickKey = clickKey || false; //如果没有设置点击项,设置为false
var objs = false;
if (way == "text") {
objs = text(txt).findOne(200);
} else if (way == "id") {
objs = id(txt).findOne(200);
} else if (way == "desc") {
objs = desc(txt).findOne(200);
}
if (objs) {
if (
objs.bounds().centerX() < 0 ||
objs.bounds().centerX() > width ||
objs.bounds().centerY() < 0 ||
objs.bounds().centerY() > height_
) {
} else {
if (clickKey) {
log(
"准备点击->",
txt,
"x:",
objs.bounds().centerX(),
"y:",
objs.bounds().centerY()
);
if (!clickTrue(objs, sleeptimes, txt)) {
click__(objs, sleeptimes, txt);
}
} else {
log("找到->", txt);
}
return true;
}
}
}
//强制点击
function bclick(way, txt, clickKey, sleeptimes, height_) {
sleeptimes = sleeptimes || 1; //当n没有传值时,设置n=1
if (!height_) {
height_ = height;
} //没有设置高度则height = 1440
var obj = false;
clickKey = clickKey || false; //如果没有设置点击项,设置为false
if (way == "text") {
obj = text(txt).findOne(200);
} else if (way == "id") {
obj = id(txt).findOne(200);
} else if (way == "desc") {
obj = desc(txt).findOne(200);
}
if (obj) {
if (
objs.bounds().centerX() < 0 ||
objs.bounds().centerX() > width ||
objs.bounds().centerY() < 0 ||
objs.bounds().centerY() > height_
) {
return false;
}
if (clickKey) {
if (!clickTrue(obj, sleeptimes, txt)) {
click__(obj, sleeptimes, txt);
}
} else {
log("找到->", txt);
}
return true;
}
}
//穿透点击
function clickTrue(obj, sleeptime, txt) {
log("clickTrue", txt);
if (!sleeptime) {
sleeptime = 1;
}
let result = false;
if (obj && obj.clickable()) {
obj.click();
result = true;
} else {
log("组件不能穿透");
let obj_ = obj.parent();
if (obj_ && obj_.clickable()) {
obj_.click();
log("父组件能穿透");
result = true;
} else {
log("父组件不能穿透");
}
}
if (result) {
sleep(sleeptime * 1000);
}
return result;
}
//正则点击
function ms(obj, clicks, sleeptimes, height_, txts) {
if (!sleeptimes) {
sleeptimes = 1;
}
if (!height_) {
height_ = height;
} //没有设置高度则height = 1440
var txt = "";
for (let key in obj) {
if (key == "textMatches") {
eval("var matches = /" + obj[key] + "/");
txt = txt + key + "(" + matches + ").";
} else {
txt = txt + key + '("' + obj[key] + '").';
}
}
var txt = "let objs = " + txt + "findOne(200);";
log(txt);
eval(txt);
log(objs);
if (objs) {
if (
objs.bounds().centerX() < 0 ||
objs.bounds().centerX() > width ||
objs.bounds().centerY() < 0 ||
objs.bounds().centerY() > height_
) {
return false;
}
if (clicks) {
if (!clickTrue(objs, sleeptimes, txts)) {
click__(objs, sleeptimes, txts);
}
}
return true;
}
}
//随机数
function rd(min, max) {
if (min <= max) {
return random(min, max);
} else {
return random(max, min);
}
}
//滑动函数
function moveTo(x, y, x1, y1, times) {
Swipe(x, y, x1, y1, times);
sleep(1000);
}
//新tips
function Tips() {
log("查询弹窗");
let appTips = [
{ text: "同意" },
{ text: "手机登录/注册" },
{ text: "同意授权" },
{ text: "同意并继续" },
{ text: "好" },
{ text: "取消" },
{ textMatches: "允许" },
{ textMatches: "跳过" },
{ text: "下一步" },
{ text: "确定" },
{ textMatches: "忽略" },
{ textMatches: "确认" },
{ textMatches: ".*关闭应用.*" },
{ text: "稍后再说" },
{ textMatches: ".*重新打开应用.*" },
{ text: "重新加载" },
{ text: "开启变美之旅" },
];
for (let k in appTips) {
if (ms(appTips[k], true, rd(1, 2))) {
}
}
log("查询弹窗-end");
}
//河马ip
function hmip() {
var result = shell("ipclient faa31f81bfea4124995972d5dc016b57 1", true);
// console.show();
// log(result);
if (result.code == 0) {
toast("vpn 执行成功");
// return true
} else {
toast("vpn 执行失败!请到控制台查看错误信息");
}
var url = "http://idfaapi.wenfree.cn/?s=App.IP.GetInfo";
var ips = jspost(url, {});
if (ips) {
ips = JSON.parse(ips);
if (ips.ret == 200) {
toastLog(ips.data.ip);
return true;
}
}
}
//光之
function gz() {
var timeLine = new Date().getTime();
while (new Date().getTime() - timeLine < 5 * 60 * 1000) {
if (active(appinfo.gzbid, 3)) {
if (jsclick("text", "立即登录", true, rd(6, 10))) {
} else if (jsclick("id", "vpnSwitch", true, rd(6, 10))) {
return true;
}
}
sleep(1000);
}
}
//设备大师
function sbds() {
let starMun = 0;
let fix = false;
var start = false;
var timeLine = new Date().getTime();
while (new Date().getTime() - timeLine < 4 * 60 * 1000) {
starMun++;
log(starMun);
if (active(appinfo.sbdsbid, 8)) {
if (jsclick("text", "修改设备", false, rd(2, 3))) {
if (fix) {
return true;
}
jsclick("text", "修改设备", true, rd(2, 3));
} else if (jsclick("text", "设备属性设置", false, rd(2, 3))) {
start = true;
if (jjsclick("id", "brand", true, rd(2, 3))) {
var phonelist = ["XIAOMI", "HUAWEI", "OPPO", "vivo"];
ms({ text: phonelist[rd(0, 4)], depth: 4 }, true, rd(2, 3));
jsclick("text", "下一步", true, 8);
} else {
back();
}
} else if (jsclick("text", "清理应用", false, rd(2, 3))) {
jjsclick("text", appinfo.name, true, 1);
if (jsclick("text", "立即清理", true, rd(10, 15))) {
fix = true;
}
} else {
back();
}
}
sleep(2000);
}
}
//接口调用设备大师
function sbdsJk() {
active(appinfo.sbdsbid, 8);
var result = shell("setphone", true);
// console.show();
log(result);
if (result.code == 0) {
toast("一键新机 执行成功");
} else {
toast("一键新机 执行失败!请到控制台查看错误信息");
}
var result = shell("pm clear " + appinfo.bid, true);
log(result);
if (result.code == 0) {
toast("一键清理 执行成功");
} else {
toast("一键清理 执行失败!请到控制台查看错误信息");
}
shell(
"am start -n com.android.systemui/com.android.systemui.recents.RecentsActivity",
true
);
sleep(3000);
if (ms({ descMatches: "移除设备大师.*" }, true, 5)) {
return true;
}
}
//设备大师参数信息
function getsbds() {
Tips();
let fix = false;
var start = false;
var timeLine = new Date().getTime();
sleep(5000);
while (new Date().getTime() - timeLine < 2 * 60 * 1000) {
if (active(appinfo.sbdsbid, 4)) {
if (jsclick("text", "关闭应用")) {
} else if (jsclick("text", "当前设备")) {
log("设备信息界面");
appinfo.imei = id("imei").findOne(100).text();
appinfo.oaid = id("android_id").findOne(100).text();
appinfo.device = id("phone_model").findOne(100).text();
appinfo.brand = id("phone_brand").findOne(100).text();
// console.show()
log(appinfo);
home();
sleep(1000);
return true;
}
}
}
}
//用户Login
function getLogin() {
let url =
"http://uasea.cn/yhapi.ashx?act=login&ApiName=api_wenfree_q7m&PassWord=AaDd112211";
let data = http.get(url);
if (data) {
data = data.body.string();
log(data);
data = data.split("|");
token = data[1];
log(token);
return token;
}
toastLog("登录出错");
}
//云海
//取手机号
// function getPhone() {
// token = getLogin();
// iid = "9902";
// let getArr = {};
// let url =
// "http://uasea.cn/yhapi.ashx?act=getPhone&token=" +
// token +
// "&iid=9902" +
// "&mobile=";
// let data = http.get(url);
// if (data) {
// data = data.body.string();
// log(data);
// data = data.split("|");
// log(data[4]);
// return data[4];
// }
// toastLog("取手机号出错");
// }
// //取短信
// function getMessage() {
// iid = "9902";
// let getArr = {};
// let url =
// "http://uasea.cn/yhapi.ashx?act=getPhoneCode&token=" +
// token +
// "&pid=9902" +
// phone_num;
// for (var i = 0; i < 25; i++) {
// let data = http.get(url);
// if (data) {
// data = data.body.string();
// log(data);
// data = data.split("|");
// if (data[1].length == 6) {
// log("成功");
// log(data[1]);
// return data[1];
// }
// sleep(3000);
// }
// }
// toastLog("取短信出错");
// return false;
// }
//df
//用户Login
function getLogin() {
let url =
"http://api.do889.com:81/api/logins?username=yangmian1167&&password=yangmian121";
let data = http.get(url);
if (data) {
data = data.body.string();
data = JSON.parse(data);
log(data);
token = data.token;
log(token);
return token;
}
toastLog("登录出错");
}
//取手机号
function getPhone() {
token = getLogin();
iid = "77422";
let getArr = {};
let url =
"http://api.do889.com:81/api/get_mobile?token=" +
token +
"&project_id=76907" +
"&mobile=";
let data = http.get(url);
if (data) {
data = data.body.string();
data = JSON.parse(data);
log(data);
if (data.message == "ok") {
data = data.mobile;
log(data);
return data;
}
}
toastLog("取手机号出错");
}
//取短信
function getMessage() {
iid = "77422";
let getArr = {};
let url =
"http://api.do889.com:81/api/get_message?token=" +
token +
"&project_id=76907" +
"&phone_num=" +
phone_num;
for (var i = 0; i < 25; i++) {
let data = http.get(url);
if (data) {
data = data.body.string();
data = JSON.parse(data);
log(data);
if (data.message == "ok") {
if (data.code) {
log("成功");
data = data.code;
log(data);
return data;
}
}
sleep(3000);
}
}
toastLog("取短信出错");
return false;
}
//hb服务器取号
function hb_getPhone() {
RetStr = http.get(
"http://sms.wenfree.cn/public/?service=App.SmsNew.GetPhone" +
"&imei=" +
phone_imei +
"&phonename=" +
phone_name
);
log(RetStr);
RetStr = RetStr.body.string();
RetStr = JSON.parse(RetStr);
log(RetStr);
if (RetStr) {
if (RetStr.data.meg == "success") {
data = RetStr.data.phone;
log(data);
} else {
log(RetStr);
}
sleep(3000);
return data;
}
}
function hb_getMessage() {
for (var i = 0; i < 25; i++) {
RetStr = http.get(
"http://sms.wenfree.cn/public/?service=App.SmsNew.GetMessage" +
"&imei=" +
phone_imei +
"&phonename=" +
phone_name
);
RetStr = RetStr.body.string();
RetStr = JSON.parse(RetStr);
log(RetStr);
if (RetStr) {
if (RetStr.data.meg == "success") {
data = RetStr.data.sms;
data = data.match(/\d{4,6}/);
data = Number(data);
if (isNaN(data)) {
toastLog(data);
log(data);
} else {
log(data);
return data;
}
}
}
toastLog("第" + i + "次获取短信休息3秒");
sleep(3000);
}
return false;
}
//上传
function Idfa(ohter) {
let postArr = {};
postArr["name"] = appinfo.name;
postArr["account"] = appinfo.imei;
postArr["idfa"] = appinfo.oaid;
postArr["phone"] = phone_num;
postArr["ohter"] = ohter || "";
postArr["password"] = appinfo.brand;
let data = jspost(
"http://wenfree.cn/api/Public/idfa/?service=idfa.idfa",
postArr
);
}
//河北上传
function Idfa_hb(ohter) {
let postArr = {};
postArr["name"] = appinfo.name;
postArr["account"] = appinfo.imei;
postArr["idfa"] = appinfo.oaid;
postArr["phone"] = phone_num;
postArr["ohter"] = ohter;
postArr["password"] = appinfo.brand;
let data = jspost(
"http://hb.wenfree.cn/api/Public/idfa/?service=idfa.idfa",
postArr
);
}
//联众图像识别函数
function getCode(img, types) {
http.__okhttp__.setTimeout(3e4);
var r = images.toBase64(img, (format = "png")),
i = device.release,
c = device.model,
s = device.buildId;
try {
var n = http.postJson(
"https://v2-api.jsdama.com/upload",
{
softwareId: 15026,
softwareSecret: "jR6wwkyxPdTe0QKrw3yZ0wmQbglIEncyC8u4lNZ4",
username: "ouwen000",
password: "AaDd112211..",
captchaData: r,
captchaType: types,
captchaMinLength: 1,
captchaMaxLength: 8,
workerTipsId: 0,
},
{
headers: {
"User-Agent":
"Mozilla/5.0 (Linux; Android " +
i +
"; " +
c +
" Build/" +
s +
"; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 Mobile Safari/537.36",
},
}
);
} catch (e) {
return {
code: "-1",
msg: "网络链接超时...",
data: {},
};
}
var d = n.body.json(),
p = d.code,
m = d.message;
if ("10079009" == p)
return {
code: p,
msg: m,
data: {},
};
if ("10142006" == p)
return {
code: p,
msg: m,
data: {},
};
if ("10142004" == p)
return {
code: p,
msg: m,
data: {},
};
if ("10142005" == p)
return {
code: p,
msg: m,
data: {},
};
if ("10079006" == p)
return {
code: p,
msg: m,
data: {},
};
if ("0" == p) {
return {
code: p,
msg: m,
data: {
res: d.data.recognition,
},
};
}
return d;
}
function Reportidfa() {
let postArr = {};
postArr["source"] = "anzhuo1";
postArr["uid"] = "1000";
postArr["appPackage"] = "com.youxiang.soyoungapp";
postArr["imei"] = appinfo.imei;
postArr["oaid"] = appinfo.oaid;
postArr["device"] = appinfo.device;
postArr["brand"] = appinfo.brand;
postArr["ip"] = "";
let data = jspost("http://td.wenfree.cn/?s=App.Std.Report", postArr);
toastLog(data);
}
function Distinctidfa() {
let postArr = {};
postArr["source"] = "anzhuo1";
postArr["uid"] = "1000";
postArr["appPackage"] = "com.youxiang.soyoungapp";
postArr["imei"] = appinfo.imei;
postArr["oaid"] = appinfo.oaid;
postArr["device"] = appinfo.device;
postArr["brand"] = appinfo.brand;
postArr["ip"] = "";
let data = jspost("http://td.wenfree.cn/?s=App.Std.Distinct", postArr);
if (data) {
data = JSON.parse(data);
if (data.data == "排重成功") {
return true;
}
}
log(data);
toastLog("排重失败");
}
if (!requestScreenCapture()) {
toast("请求截图失败");
exit();
}
//数字键盘点击
function nmbc(nmbk) {
var nmbk = String(nmbk);
const nmbkey_list = {
0: [360, 1219],
1: [196, 883],
2: [363, 883],
3: [523, 883],
4: [196, 993],
5: [363, 993],
6: [523, 993],
7: [196, 1106],
8: [363, 1106],
9: [523, 1106],
};
for (var i = 0; i < nmbk.length; i++) {
let yzms = Number(nmbk[i]);
log(yzms);
click_(nmbkey_list[yzms][0], nmbkey_list[yzms][1]);
}
}
//领英
function main() {
var xianyang = 0;
var homeUI = true;
var phone_key = true;
var sms_key = false;
var regok_key = false;
var dama_key = true;
var timeLine = new Date().getTime();
while (new Date().getTime() - timeLine < 3 * 60 * 1000) {
xianyang++;
log(timeLine - new Date().getTime());
if (active(appinfo.bid, 4)) {
if (jsclick("text", "立即加入", true, 2)) {
} else if (jsclick("text", "立即免费加入领英!")) {
phone_num = hb_getPhone();
setText([0], "笑脸");
sleep(2000);
setText([1], phone_num);
sleep(2000);
setText([2], info.password);
sleep(2000);
jsclick("text", "同意并加入", true);
phone_key = false;
sms_key = true;
} else if (ms({ desc: "Recaptcha 要求验证. 进行人机身份验证" })) {
if (ms({ desc: "换一个新的验证码" })) {
if (dama_key) {
log("找到");
captureScreen("/sdcard/screencapture.png");
var src = images.read("/sdcard/screencapture.png");
var clip = images.clip(src, 60, 170, 600, 960);
images.save(clip, "/sdcard/yzm.png");
var types = 1303;
var sssimg = images.read("/sdcard/yzm.png");
var img__ = getCode(sssimg, types);
log(img__);
img__ = img__.data.res.split("|");
log(img__);
for (var i = 0; i < img__.length; i++) {
click(
Number(img__[i].split(",")[0]) + 60,
Number(img__[i].split(",")[1]) + 170
);
}
click(444, 1030);
dama_key = false;
} else {
click_(72, 1090);
sleep(3000);
dama_key = true;
}
} else if (ms({ desc: "缺少 noCAPTCHA 用户回复码或该码无效。" })) {
return false;
} else if (ms({ desc: "隐私权" })) {
click(72, 168);
}
} else if (ms({ desc: "请输入发送到您手机的验证码。" })) {
var sms_num = hb_getMessage();
if (sms_num) {
// toastLog(sms_num);
sleep(3000);
var ids = id("input__phone_verification_pin").findOne(200);
if (ids) {
click__(ids);
sleep(3000);
nmbc(sms_num);
click(32, 678);
sms_key = false;
regok_key = true;
}
}
} else if (
regok_key &&
jsclick(
"id",
"growth_onboarding_position_fragment_navigation_button_container"
)
) {
return true;
}
Tips();
sleep(1000);
}
}
}
function myRand() {
myrandS = "";
for (var i = 0; i < 15; i++) {
HexRan = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F",
];