Skip to content

Commit 4ecb6aa

Browse files
author
ziye12
authored
Add files via upload
微信扫码dldkziye.png进入程序,获取授权
1 parent 09be743 commit 4ecb6aa

File tree

1 file changed

+356
-0
lines changed

1 file changed

+356
-0
lines changed

dldkziye.js

Lines changed: 356 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,356 @@
1+
/*ziye 多拉打卡
2+
3+
4+
非常重要!!!
5+
6+
微信扫码 https://raw.githubusercontent.com/ziye12/JavaScript/master/dldkziye.png 进入小程序,登录获取授权,再启动软件获取ck
7+
建议设置6点到23点之间打卡,时间间隔30分钟以上,否则容易封号
8+
9+
10+
11+
12+
13+
2020.9.8
14+
2020.9.9 修复部分错误
15+
2020.9.13 打卡次数调整为5
16+
17+
18+
19+
20+
21+
《《《《《《《《《《制作其他打卡js的说明
22+
23+
抓包小程序,然后替换以下内容来制作其他打卡js,
24+
需要替换的内容如下,按顺序替换字符,自己用电脑或者KODE软件替换,KODE下载链接https://apps.apple.com/cn/app/koder-code-editor/id1447489375
25+
26+
27+
28+
ph0001.hezyq.com
29+
30+
多拉打卡
31+
cs = 10
32+
xj = 1
33+
dldkurl
34+
i=1384
35+
dldk
36+
37+
38+
手动替换
39+
ph0001\.hezyq\.com
40+
41+
制作其他打卡js的说明》》》》》》》》》》》
42+
43+
44+
45+
46+
47+
48+
////////////////////////////////////////正文
49+
50+
51+
使用说明:
52+
53+
一,微信扫码 https://raw.githubusercontent.com/ziye12/JavaScript/master/dldkziye.png 进入小程序,登录获取授权
54+
55+
二,然后将hostname复制粘贴进配置文件
56+
57+
三,将重写复制到 rewrite_local 下,再进入程序获取ck,建议 放入新建配置片段,获取之后禁用即可
58+
59+
60+
功能如下:
61+
1.每日打卡,设置了开关,完成任务不再打卡
62+
2.打卡币统计,
63+
3.现金统计,自动提现
64+
65+
hostname= ph0001.hezyq.com,
66+
67+
68+
69+
//surge
70+
多拉打卡 = type=http-request,pattern=^https:\/\/ph0001\.hezyq\.com\/*,requires-body=1,max-size=0,script-path= https://raw.githubusercontent.com/ziye12/JavaScript/master/dldkziye.js
71+
72+
73+
//圈x
74+
https:\/\/ph0001\.hezyq\.com\/* url script-request-header https://raw.githubusercontent.com/ziye12/JavaScript/master/dldkziye.js
75+
76+
//loon
77+
http-request ^https:\/\/ph0001\.hezyq\.com\/* script-path= https://raw.githubusercontent.com/ziye12/JavaScript/master/dldkziye.js, requires-body=true, timeout=10, tag=多拉打卡
78+
79+
80+
81+
*/
82+
83+
84+
85+
86+
87+
const sy = init()//声明必须
88+
const notifyInterval = 1; //通知开为1,常关为0
89+
const logs = 0; // 日志开关
90+
const jsname = '多拉打卡'
91+
const jbid =1
92+
const sb='失败,请先关闭,进入程序获取授权'
93+
94+
const cs = 10;//小程序打卡次数
95+
const xj = 1;//提现标准
96+
var tz=''
97+
98+
const dkurlkey = 'dldkurl'+jbid
99+
const dkurl = sy.getdata(dkurlkey)
100+
101+
102+
let isGetCookie = typeof $request !== 'undefined'
103+
if (isGetCookie) {
104+
GetCookie()
105+
} else {
106+
all()
107+
}
108+
109+
110+
111+
function GetCookie() {
112+
if ($request && $request.url.match(/i=1384&/))
113+
if ($request && $request.url.match(/action=today&contr=index/))
114+
{
115+
const dkurl = $request.url
116+
sy.log(`dkurl:${dkurl}`)
117+
if (dkurl) sy.setdata(dkurl, dkurlkey)
118+
sy.msg(dkurlkey, `获取cookie: 成功🎉`, ``)
119+
}
120+
121+
}
122+
123+
124+
//异步运行
125+
126+
127+
function all()
128+
129+
{
130+
131+
for(var i=0;i<3;i++)
132+
{ (function(i) {
133+
setTimeout(function() {
134+
135+
if(i==0) dktj(i);
136+
else if(i==1) dkxj(i);
137+
else if(i==2) showmsg(i);
138+
}, (i + 1) * 1000);
139+
})(i)
140+
141+
142+
}}
143+
144+
145+
146+
147+
//统计
148+
149+
function dktj() {
150+
return new Promise((resolve, reject) => {
151+
152+
const Tjurl = {
153+
url: dkurl
154+
};
155+
sy.get(Tjurl,(error, response, data) =>{
156+
if(logs)sy.log(`${jsname}1统计 - data: ${data}`)
157+
obj = JSON.parse(data)
158+
if(obj.status == 1 && obj.info.today.clock < cs){tz+="[账户信息]🎉"+"\n"+
159+
"今日已打卡"+[Number(obj.info.today.clock) ]+"/"+cs+"次"+"余"+[Number(obj.info.today. currency)]+"币"+"\n"
160+
}else tz+="[打卡完成]"+"余"+[Number(obj.info.today. currency)]+"币"+"\n"
161+
162+
163+
164+
165+
166+
cstj1(obj.info.today.clock);
167+
168+
169+
170+
resolve()
171+
})
172+
})
173+
}
174+
175+
176+
//次数统计
177+
178+
179+
function cstj1(tjtj)
180+
{
181+
if (tjtj<cs)
182+
dkdk();
183+
184+
185+
}
186+
187+
188+
//现金
189+
190+
function dkxj() {
191+
return new Promise((resolve, reject) => {
192+
193+
const Xjurl = {
194+
url: dkurl.replace(/action=today&contr=index/g, `action=index&contr=my`)
195+
};
196+
sy.get(Xjurl,(error, response, data) =>{
197+
if(logs)sy.log(`${jsname}1现金 - data: ${data}`)
198+
obj = JSON.parse(data)
199+
if(obj.status == 1) {
200+
201+
202+
203+
204+
tz +="💵现金余额"+
205+
obj.info.member.money+"元"+"\n"
206+
207+
}
208+
209+
else tz +=sb+"\n";
210+
211+
212+
xjtj1(obj.info.member.money);
213+
214+
215+
216+
resolve()
217+
})
218+
})
219+
}
220+
221+
222+
223+
224+
//自动提现
225+
226+
function dktx() {
227+
return new Promise((resolve, reject) => {
228+
229+
const Txurl = {
230+
url: dkurl.replace(/action=today&contr=index/g, `action=withdrawals&contr=my&money=${xj}&payment_code=`)
231+
};
232+
sy.get(Txurl,(error, response, data) =>{
233+
if(logs)sy.log(`${jsname}1提现 - data: ${data}`)
234+
obj = JSON.parse(data)
235+
if(obj.status == 1) {
236+
237+
tz +='提现成功,成功提现'+xj+'元'+"\n"
238+
239+
}
240+
241+
if(obj.status == 2) {
242+
243+
tz +='提现失败,原因:'+obj.info+"\n"
244+
245+
}
246+
247+
248+
249+
250+
resolve()
251+
})
252+
})
253+
}
254+
255+
256+
257+
//现金统计
258+
259+
260+
function xjtj1(tjtj)
261+
{
262+
if (tjtj>=xj)
263+
dktx()
264+
265+
}
266+
267+
268+
269+
//打卡
270+
function dkdk() {
271+
return new Promise((resolve, reject) => {
272+
273+
const Dkurl = {
274+
url: dkurl.replace(/action=today&contr=index/g, `action=sign&contr=clock`)
275+
};
276+
sy.get(Dkurl,(error, response, data) =>{
277+
if(logs)sy.log(`${jsname}1打卡- data: ${data}`)
278+
obj = JSON.parse(data)
279+
280+
if (obj.status==1){
281+
tz+='[️打卡任务]:'+'打卡次数+1'+'\n'
282+
283+
}
284+
else tz +=obj.info+'\n'
285+
286+
287+
resolve()
288+
})
289+
})
290+
}
291+
292+
293+
function showmsg() {
294+
295+
console.log(tz)
296+
297+
if (notifyInterval==1)
298+
sy.msg(jsname,'',tz)
299+
}
300+
301+
302+
function init() {
303+
isSurge = () => {
304+
return undefined !== this.$httpClient
305+
}
306+
isQuanX = () => {
307+
return undefined !== this.$task
308+
}
309+
getdata = (key) => {
310+
if (isSurge()) return $persistentStore.read(key)
311+
if (isQuanX()) return $prefs.valueForKey(key)
312+
}
313+
setdata = (key, val) => {
314+
if (isSurge()) return $persistentStore.write(key, val)
315+
if (isQuanX()) return $prefs.setValueForKey(key, val)
316+
}
317+
msg = (title, subtitle = '', body = '') => {
318+
if (isSurge()) $notification.post(title, subtitle, body)
319+
if (isQuanX()) $notify(title, subtitle, body)
320+
}
321+
log = (msg) => {
322+
console.log(`${msg}\n`)
323+
}
324+
get = (options, callback) => {
325+
if (isQuanX()) {
326+
if (typeof options == 'string') options = { url: options }
327+
options['method'] = 'GET'
328+
return $task.fetch(options).then(
329+
(response) => {
330+
response['status'] = response.statusCode
331+
callback(null, response, response.body)
332+
},
333+
(reason) => callback(reason.error, null, null)
334+
)
335+
}
336+
if (isSurge()) return $httpClient.get(options, callback)
337+
}
338+
post = (options, callback) => {
339+
if (isQuanX()) {
340+
if (typeof options == 'string') options = { url: options }
341+
options['method'] = 'POST'
342+
$task.fetch(options).then(
343+
(response) => {
344+
response['status'] = response.statusCode
345+
callback(null, response, response.body)
346+
},
347+
(reason) => callback(reason.error, null, null)
348+
)
349+
}
350+
if (isSurge()) $httpClient.post(options, callback)
351+
}
352+
done = (value = {}) => {
353+
$done(value)
354+
}
355+
return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done }
356+
}

0 commit comments

Comments
 (0)