forked from sngxpro/AutoSyncScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwsxqSign.js
More file actions
493 lines (333 loc) · 9.92 KB
/
wsxqSign.js
File metadata and controls
493 lines (333 loc) · 9.92 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
/*
@𝐗𝐢𝐝𝐍 𝐃𝐃 感谢红鲤鱼大佬
//++++++++++++++++++++++++++++++++-
说明:
微商星球 签到可以获得微豆兑换会员 商店下载软件
圈x获取不到ck就把body改成header
打开软件签到获取ck 签过到可能获取不到ck
共有6处获取ck的地方 签到 观看视频 分享动态 考察项目 评论项目 收藏项目
surge:远程
微商星球 = type=http-request,pattern=^https:\/\/api\.momosyb\.com\/(v6|v1)\/(fans|user)\/*,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/XidNDD/2020scripts/master/wsxqSign.js
定时 微商星球 = type=cron,cronexp=0 10 0 * * *,script-path=https://raw.githubusercontent.com/XidNDD/2020scripts/master/wsxqSign.js
圈x:远程
签到获取ck
^https:\/\/api\.momosyb\.com\/(v6|v1)\/(fans|user)\/* url script-request-body https://raw.githubusercontent.com/XidNDD/2020scripts/master/wsxqSign.js
定时 0 10 0 * * * https://raw.githubusercontent.com/XidNDD/2020scripts/master/wsxqSign.js, tag= 微商星球, enabled=true
loon:远程
签到获取ck
http-request ^https:\/\/api\.momosyb\.com\/(v6|v1)\/(fans|user)\/* script-path=https://raw.githubusercontent.com/XidNDD/2020scripts/master/wsxqSign.js, requires-body=true, timeout=10, tag=微商星球
定时 cron "0 10 0 * * *" script-path=https://raw.githubusercontent.com/XidNDD/2020scripts/master/wsxqSign.js
MITM= api.momosyb.com
*/
const $XidN = XidN();
const logs=0;//设置0关闭日志,1开启日志
//++++++++++++++++++++++++++++++++-
var dd="微商星球APP";
//++++++++++++++++++++++++++++++++
function main()
{
XidN_degin();}
async function XidN_degin()
{
let a0=await XidN_Sign();
let a1=await XidN_spsign();
let a2=await XidN_signst();
let a3=await XidN_datasign();
let a4=await XidN_datas();
let a5=await XidN_datastate();
let a6=await XidN_balance();
log(dd,"",a0+a1+a2+a3+a4+a5+a6);
}
function XidN_Sign()
{
return new Promise((resolve, reject) => {
var result1="每日打卡奖励🌟";
var result2="";
var wsxqurl=$XidN.read("wsxqurlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqurl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="✅签到"+",获得"+obj.datas.weidou+"微豆";
else
if(obj.status== -1)
result2="签到说明:"+obj.msg;
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_spsign()
{
return new Promise((resolve, reject) => {
var result1="观看视频奖励🎦";
var result2="";
var wsxqspurl=$XidN.read("wsxqspurlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqspurl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="✅奖励"+obj.datas.weidou+"微豆";
else
if(obj.status== -1)
result2="失败:"+obj.msg;
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_signst()
{
return new Promise((resolve, reject) => {
var result1="分享动态奖励✨";
var result2="";
var wsxqdturl=$XidN.read("wsxqdturlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqdturl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="✅奖励"+obj.datas.weidou+"微豆";
else
if(obj.status== -1)
result2="失败:"+obj.msg;
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_datasign()
{
return new Promise((resolve, reject) => {
var result1="考察项目奖励💫";
var result2="";
var wsxqkkurl=$XidN.read("wsxqkkurlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqkkurl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="✅奖励"+obj.datas.weidou+"微豆";
else
if(obj.status== -1)
result2="失败:"+obj.msg;
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_datas()
{
return new Promise((resolve, reject) => {
var result1="评论项目奖励🔖";
var result2="";
var wsxqppurl=$XidN.read("wsxqppurlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqppurl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="✅奖励"+obj.datas.weidou+"微豆";
else
if(obj.status== -1)
result2="失败:"+obj.msg;
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_datastate()
{
return new Promise((resolve, reject) => {
var result1="收藏项目奖励➰";
var result2="";
var wsxqssurl=$XidN.read("wsxqssurlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqssurl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="✅奖励"+obj.datas.weidou+"微豆";
else
if(obj.status== -1)
result2="失败:"+obj.msg;
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_balance()
{
return new Promise((resolve, reject) => {
var result1="当前账号余额⚡️";
var result2="";
var wsxqwdurl=$XidN.read("wsxqwdurlname");
var wsxqhd=$XidN.read("wsxqhdname");
const llUrl1={
url:wsxqwdurl,
headers:JSON.parse(wsxqhd),
timeout:60000};
$XidN.get(llUrl1,function(error, response, data) {
if (logs==1)console.log(data)
var obj=JSON.parse(data);
if(obj.status== 0)
result2="累计"+obj.data.balance+"微豆";
else
result2="签到失败获取cookie";
result2="<"+result1+">"+result2+"\n";
console.log(result2);
resolve(result2);
})
})
}
function XidN_wsxq() {
if ($request.headers) {
var urlval = $request.url;
var md_hd=$request.headers;
var md_bd=$request.body;
if(urlval.indexOf("taskweidou?do=daily_sign&")>=0)
{
var ao= $XidN.write(urlval,"wsxqurlname");
var bo= $XidN.write(JSON.stringify(md_hd),"wsxqhdname");
if (ao==true&&bo==true)
log(dd,"[获取签到数据]","✅成功");}
else
if(urlval.indexOf("taskweidou?do=reward_weidou&task_id=2&")>=0)
{
var ao= $XidN.write(urlval,"wsxqspurlname");
if (ao==true)
log(dd,"[获取观看视频数据]","✅成功");}
else
if(urlval.indexOf("taskweidou?do=reward_weidou&task_id=3&")>=0)
{
var ao= $XidN.write(urlval,"wsxqdturlname");
if (ao==true)
log(dd,"[获取分享动态数据]","✅成功");}
else
if(urlval.indexOf("&task_id=4&")>=0)
{
var ao= $XidN.write(urlval,"wsxqkkurlname");
if (ao==true)
log(dd,"[获取考察项目数据]","✅成功");}
else
if(urlval.indexOf("taskweidou?do=reward_weidou&task_id=5&")>=0)
{
var ao= $XidN.write(urlval,"wsxqppurlname");
if (ao==true)
log(dd,"[获取评论项目数据]","✅成功");}
else
if(urlval.indexOf("taskweidou?do=reward_weidou&task_id=6&")>=0)
{
var ao= $XidN.write(urlval,"wsxqssurlname");
if (ao==true)
log(dd,"[获取收藏项目数据]","✅成功");}
else
if(urlval.indexOf("v1/user/weidou?")>=0)
{
var ao= $XidN.write(urlval,"wsxqwdurlname");
if (ao==true)
log(dd,"[获取累计余额数据]","✅成功");}
}
}
function log(x,y,z){
$XidN.notify(x,y,z);}
function getRandom(start, end, fixed = 0) {
let differ = end - start
let random = Math.random()
return (start + differ * random).toFixed(fixed)
}
if ($XidN.isRequest) {
XidN_wsxq()
$XidN.end()
} else {
main();
$XidN.end()
}
function XidN() {
const isRequest = typeof $request != "undefined"
const isSurge = typeof $httpClient != "undefined"
const isQuanX = typeof $task != "undefined"
const notify = (title, subtitle, message) => {
if (isQuanX) $notify(title, subtitle, message)
if (isSurge) $notification.post(title, subtitle, message)
}
const write = (value, key) => {
if (isQuanX) return $prefs.setValueForKey(value, key)
if (isSurge) return $persistentStore.write(value, key)
}
const read = (key) => {
if (isQuanX) return $prefs.valueForKey(key)
if (isSurge) return $persistentStore.read(key)
}
const get = (options, callback) => {
if (isQuanX) {
if (typeof options == "string") options = { url: options }
options["method"] = "GET"
$task.fetch(options).then(response => {
response["status"] = response.statusCode
callback(null, response, response.body)
}, reason => callback(reason.error, null, null))
}
if (isSurge) $httpClient.get(options, callback)
}
const post = (options, callback) => {
if (isQuanX) {
if (typeof options == "string") options = { url: options }
options["method"] = "POST"
$task.fetch(options).then(response => {
response["status"] = response.statusCode
callback(null, response, response.body)
}, reason => callback(reason.error, null, null))
}
if (isSurge) $httpClient.post(options, callback)
}
const end = () => {
if (isQuanX) isRequest ? $done({}) : ""
if (isSurge) isRequest ? $done({}) : $done()
}
return { isRequest, isQuanX, isSurge, notify, write, read, get, post, end }
};