Skip to content

Commit 65f75f7

Browse files
author
ziye12
authored
Update xiaoleziye.js
修复 cookie获取问题
1 parent fe40ea0 commit 65f75f7

File tree

1 file changed

+65
-57
lines changed

1 file changed

+65
-57
lines changed

xiaoleziye.js

Lines changed: 65 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
55
微信扫码 https://raw.githubusercontent.com/ziye12/JavaScript/master/xiaoleziye.png 获取授权
66
7-
开重写,点击我的 获取第一个ck ,关重写,然后进签到,开重写,点签到获取签到ck,
7+
开软件,然后进签到,点签到获取cookie
88
99
1010
10.5 增加更多通知内容
11+
10.7 修复cookie,获取问题
1112
1213
1314
@@ -17,13 +18,13 @@ hostname=minapp.xqrobot.net,
1718
#小乐
1819
############## 圈x
1920
20-
https:\/\/minapp\.xqrobot\.net\/* url script-request-header https://raw.githubusercontent.com/ziye12/JavaScript/master/xiaoleziye.js
21+
https:\/\/minapp\.xqrobot\.net\/* url script-request-body https://raw.githubusercontent.com/ziye12/JavaScript/master/xiaoleziye.js
2122
2223
2324
#小乐
2425
############## loon
2526
26-
//
27+
2728
http-request https:\/\/minapp\.xqrobot\.net\/* script-path=https://raw.githubusercontent.com/ziye12/JavaScript/master/xiaoleziye.js, requires-body=true
2829
2930
@@ -35,8 +36,8 @@ http-request https:\/\/minapp\.xqrobot\.net\/* script-path=https://raw.githubuse
3536
3637
3738
38-
*/
3939
40+
*/
4041

4142

4243

@@ -64,8 +65,6 @@ const xiaoleheaderVal = sy.getdata(xiaoleheaderKey)
6465
const xiaolebodyVal = sy.getdata(xiaolebodyKey)
6566

6667

67-
const xiaoleuserKey = 'xiaoleuser'+jbid
68-
const xiaoleuserVal = sy.getdata(xiaoleuserKey)
6968

7069

7170

@@ -95,48 +94,22 @@ if ($request.headers){
9594
const xiaoleurlVal = $request.url
9695
if (xiaoleurlVal) sy.setdata(xiaoleurlVal,xiaoleurlKey)
9796
sy.log(`[${jsname}] 获取url请求: 成功,xiaoleurlVal: ${xiaoleurlVal}`)
98-
sy.msg(xiaoleurlKey, `获取url请求: 成功🎉`, ``)
99-
100-
101-
const xiaoleheaderVal = JSON.stringify($request.headers)
97+
98+
const xiaolebodyVal = $request.body
99+
if (xiaolebodyVal) sy.setdata(xiaolebodyVal,xiaolebodyKey)
100+
sy.log(`[${jsname}] 获取阅读: 成功,xiaolebodyVal: ${xiaolebodyVal}`)
101+
102+
const xiaoleheaderVal = JSON.stringify($request.headers)
102103
if (xiaoleheaderVal) sy.setdata(xiaoleheaderVal,xiaoleheaderKey)
103104
sy.log(`[${jsname}] 获取Cookie: 成功,xiaoleheaderVal: ${xiaoleheaderVal}`)
104105
sy.msg(xiaoleheaderKey, `获取Cookie: 成功🎉`, ``)
105106

106-
const xiaolebodyVal = $request.body
107-
if (xiaolebodyVal) sy.setdata(xiaolebodyVal,xiaolebodyKey)
108-
sy.log(`[${jsname}] 获取阅读: 成功,xiaolebodyVal: ${xiaolebodyVal}`)
109-
sy.msg(xiaolebodyKey, `获取阅读请求: 成功🎉`, ``)
110107

111108

112109

113110
}
114111

115-
116-
117-
if($request &&$request.url.indexOf("/user.php?mod=index&")>=0) {
118-
const xiaoleuserVal = $request.url
119-
if (xiaoleuserVal) sy.setdata(xiaoleuserVal,xiaoleuserKey)
120-
sy.log(`[${xiaoleuserKey}] 获取user请求: 成功,xiaoleurlVal: ${xiaoleuserVal}`)
121-
sy.msg(xiaoleuserKey, `获取user请求: 成功🎉`, ``)
122-
123-
124-
125-
126-
127-
}
128-
129-
130-
131-
132112
}
133-
134-
135-
136-
137-
138-
139-
140113

141114
}
142115

@@ -155,17 +128,19 @@ if (xiaoleuserVal) sy.setdata(xiaoleuserVal,xiaoleuserKey)
155128

156129
{
157130

158-
for(var i=0;i<4;i++)
131+
for(var i=0;i<5;i++)
159132
{ (function(i) {
160133
setTimeout(function() {
161134

162135
if(i==0) xiaoletask(i);
163136

164137
else if(i==1) xiaoleuser(i);
165-
else if(i==2) xiaolesy(i);
138+
else if(i==2) xiaoletg(i);
139+
else if(i==3) xiaolesy(i);
166140

167141

168-
else if(i==3) showmsg(i);
142+
143+
else if(i==4) showmsg(i);
169144
}, (i + 1) *1000);
170145
})(i)
171146

@@ -212,7 +187,7 @@ function xiaoleuser() {
212187
return new Promise((resolve, reject) => {
213188

214189
const toxiaoleuserurl = {
215-
url: xiaoleuserVal,
190+
url: xiaoleurlVal.replace(/mod=sign/g, `mod=index`),
216191
headers: JSON.parse(xiaoleheaderVal),
217192

218193
};
@@ -254,30 +229,27 @@ tz+=userinfo.show
254229

255230

256231

257-
function xiaolesy() {
232+
233+
function xiaoletg() {
258234
return new Promise((resolve, reject) => {
259235

260-
const toxiaolesyurl = {
261-
url: xiaoleuserVal.replace(/mod=index/g, `mod=tbk_jiang&page=1`),
236+
const toxiaoletgurl = {
237+
url: xiaoleurlVal.replace(/mod=sign/g, `mod=tg&act=user&level=&page=1`),
262238
headers: JSON.parse(xiaoleheaderVal),
263239

264240
};
265-
sy.post(toxiaolesyurl,(error, response, data) =>{
266-
if(logs) sy.log(`${jsname}, 收益信息: ${data}`)
267-
syinfo =JSON.parse(data)
268-
var xx=syinfo.list[0].jiang_text
269-
var tt=xx.substring(xx.indexOf("用户")+2,xx.indexOf("奖励"));
270-
241+
sy.post(toxiaoletgurl,(error, response, data) =>{
242+
if(logs) sy.log(`${jsname}, 用户信息: ${data}`)
243+
tginfo =JSON.parse(data)
271244

272245

273-
if (syinfo.result==true)
246+
if (tginfo.result==true)
274247
{
275-
tz+=
276-
'【收益信息】👤:'+tt+'\n'+
277-
'【下单时间】🧧:'+syinfo.list[0].jiang_atime+'\n'+
278-
'【预计收益】🧧:'+syinfo.list[0].jiang_money+'元'+'\n'
279248

280249

250+
tz+='【好友信息】😄:'+tginfo.list[0].user_name+'\n'+
251+
'【注册时间】🤖:'+tginfo.list[0].user_atime+'\n'+
252+
'【好友等级】🎊:'+tginfo.list[0].userlevel_name+'\n'
281253

282254

283255

@@ -287,7 +259,7 @@ tz+=
287259

288260
else if (userinfo.result==false)
289261
{
290-
tz+=userinfo.show
262+
tz+='错误'
291263
}
292264

293265

@@ -314,17 +286,52 @@ tz+=userinfo.show
314286

315287

316288

289+
function xiaolesy() {
290+
return new Promise((resolve, reject) => {
317291

292+
const toxiaolesyurl = {
293+
url: xiaoleurlVal.replace(/mod=sign/g, `mod=tbk_jiang&page=1`),
294+
headers: JSON.parse(xiaoleheaderVal),
318295

296+
};
297+
sy.post(toxiaolesyurl,(error, response, data) =>{
298+
if(logs) sy.log(`${jsname}, 收益信息: ${data}`)
299+
syinfo =JSON.parse(data)
300+
var xx=syinfo.list[0].jiang_text
301+
var tt=xx.substring(xx.indexOf("用户")+2,xx.indexOf("奖励"));
319302

320303

321304

305+
if (syinfo.result==true)
306+
{
307+
tz+=
308+
'【收益信息】👤:'+tt+'\n'+
309+
'【下单时间】🧧:'+syinfo.list[0].jiang_adate+'\n'+
310+
'【预计收益】🧧:'+syinfo.list[0].jiang_money+'元'+'\n'
322311

323312

324313

325314

326315

327316

317+
}
318+
319+
320+
else if (userinfo.result==false)
321+
{
322+
tz+=userinfo.show
323+
}
324+
325+
326+
327+
resolve()
328+
})
329+
})
330+
}
331+
332+
333+
334+
328335
function showmsg() {
329336

330337
console.log(tz)
@@ -389,3 +396,4 @@ function init() {
389396
}
390397
return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done }
391398
}
399+

0 commit comments

Comments
 (0)