Skip to content

Commit 584cbbf

Browse files
author
ziye12
authored
1 parent 829ac5b commit 584cbbf

File tree

1 file changed

+334
-0
lines changed

1 file changed

+334
-0
lines changed

flwhbziye.js

Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
2+
/*ziye
3+
4+
5+
6+
复制到微信里打开领取红包并下载 http://huodong.3p6z.cn/h5/Fanlishare20201111/share?spm=page_name.h5.pty-sharepv~module-home~std-76452&invite_userid=373511081
7+
8+
下载后
9+
10+
进入 我的 点击 天天领现金 获取cookie
11+
12+
⚠️会卡住,但是能获取到cookie,然后注释重写就行了!
13+
14+
15+
hostname=huodong.fanli.com,
16+
17+
18+
#返利网红包
19+
############## 圈x
20+
https:\/\/huodong\.fanli\.com\/h5\/Fanlishare20201111\/ajaxInit url script-request-header https://raw.githubusercontent.com/ziye12/JavaScript/master/flwhbziye.js
21+
22+
23+
24+
25+
26+
27+
#返利网红包
28+
############## loon
29+
30+
//
31+
https:\/\/huodong\.fanli\.com\/h5\/Fanlishare20201111\/ajaxDoTask76728 script-path=https://raw.githubusercontent.com/ziye12/JavaScript/master/flwhbziye.js, requires-header=true
32+
33+
34+
#返利网红包
35+
############## surge
36+
37+
返利网红包 = type=http-request,pattern=https:\/\/huodong\.fanli\.com\/h5\/Fanlishare20201111\/ajaxDoTask76728,script-path=https://raw.githubusercontent.com/ziye12/JavaScript/master/flwhbziye.js, requires-header=true
38+
39+
40+
41+
42+
*/
43+
44+
45+
46+
47+
48+
const sy = init()
49+
50+
const jsname='返利网红包'
51+
52+
const logs = 0; //0为关闭日志,1为开启
53+
const notifyInterval=1//0为关闭通知,1为开启
54+
const jbid=1;
55+
const txbz=1.2//设置余额大于等于多少提现,必须大于0.3
56+
57+
58+
59+
60+
61+
const flwhburlKey = 'flwhburl'+jbid
62+
63+
const flwhbheaderKey = 'flwhbhd'+jbid
64+
65+
66+
67+
const flwhburlVal = sy.getdata(flwhburlKey)
68+
69+
const flwhbheaderVal = sy.getdata(flwhbheaderKey)
70+
71+
const flwhbbodyVal = ''
72+
73+
74+
75+
76+
77+
78+
79+
80+
81+
var tz=''
82+
83+
84+
let isGetCookie = typeof $request !== 'undefined'
85+
if (isGetCookie) {
86+
GetCookie()
87+
} else {
88+
all()
89+
}
90+
91+
92+
93+
94+
95+
function GetCookie() {
96+
97+
98+
99+
if($request &&$request.url.indexOf("/ajaxInit?init_reward=&invite_userid=&wx_openid=")>=0) {
100+
101+
const flwhburlVal = $request.url
102+
if (flwhburlVal) sy.setdata(flwhburlVal,flwhburlKey)
103+
sy.log(`[${jsname}] 获取url请求: 成功,flwhburlVal: ${flwhburlVal}`)
104+
const flwhbheaderVal = JSON.stringify($request.headers)
105+
if (flwhbheaderVal) sy.setdata(flwhbheaderVal,flwhbheaderKey)
106+
sy.log(`[${jsname}] 获取Cookie: 成功,flwhbheaderVal: ${flwhbheaderVal}`)
107+
sy.msg(flwhbheaderKey, `获取Cookie: 成功🎉`, ``)
108+
109+
110+
}
111+
112+
}
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
function all()
126+
127+
{
128+
129+
for(var i=0;i<3;i++)
130+
{ (function(i) {
131+
setTimeout(function() {
132+
133+
if(i==0) flwhbtask(i);
134+
if(i==1) flwhblh(i);
135+
136+
else if(i==2) showmsg(i);
137+
}, (i + 1) *1000);
138+
})(i)
139+
140+
141+
}}
142+
143+
144+
145+
//账户信息
146+
function flwhbtask() {
147+
return new Promise((resolve, reject) => {
148+
149+
const toflwhburl = {
150+
151+
url: flwhburlVal,
152+
153+
headers: JSON.parse(flwhbheaderVal),
154+
body: flwhbbodyVal
155+
};
156+
sy.get(toflwhburl,(error, response, data) =>{
157+
if(logs) sy.log(`${jsname}, 账户信息: ${data}`)
158+
signinfo =JSON.parse(data)
159+
if (signinfo.status==1)
160+
{
161+
tz+='【收益总计】🎉:'+signinfo.data.user_total_money+'元'+'\n'+
162+
'【账户余额】🎉:'+signinfo.data.user_current_money+'\n'+
163+
'【邀请奖励】🎉:'+signinfo.data.invite_money+'元'+'\n'+
164+
'【邀请人数】🎉:'+signinfo.data.invite_users.length+'\n'
165+
166+
167+
}
168+
169+
else
170+
tz+='【出现问题】✖️:'+signinfo.data+'\n'
171+
172+
zhtx(signinfo.data.user_current_money)
173+
174+
175+
176+
177+
resolve()
178+
})
179+
})
180+
}
181+
182+
183+
184+
185+
//惊喜礼盒
186+
function flwhblh() {
187+
return new Promise((resolve, reject) => {
188+
189+
const toflwhblhurl = {
190+
191+
url: flwhburlVal.replace(/ajaxInit?init_reward=&invite_userid=&wx_openid=/g, `ajaxDoTask76728`),
192+
193+
headers: JSON.parse(flwhbheaderVal),
194+
body: flwhbbodyVal
195+
};
196+
sy.get(toflwhblhurl,(error, response, data) =>{
197+
if(logs) sy.log(`${jsname}, 惊喜礼盒: ${data}`)
198+
jxlh =JSON.parse(data)
199+
if (jxlh.remain_num_76728>0)
200+
{
201+
tz+='【开启礼盒】🎉:'+jxlh.data.amount+'元'+'\n'+
202+
'【剩余礼盒】🎉:'+jxlh.data.remain_num_76728+'个'+'\n'
203+
204+
}
205+
206+
else
207+
tz+='【开启完毕】✖️:'+'礼盒已全部开启'+'\n'
208+
209+
210+
211+
212+
resolve()
213+
})
214+
})
215+
}
216+
217+
218+
219+
220+
function zhtx(y)
221+
{
222+
if(y>=txbz)
223+
flwhbtx()
224+
225+
}
226+
227+
228+
229+
230+
231+
232+
//提现
233+
function flwhbtx() {
234+
return new Promise((resolve, reject) => {
235+
236+
const toflwhbtxurl = {
237+
238+
url: flwhburlVal.replace(/ajaxInit?init_reward=&invite_userid=&wx_openid=/g, `ajaxExchangeCash`),
239+
240+
headers: JSON.parse(flwhbheaderVal),
241+
242+
};
243+
sy.get(toflwhbtxurl,(error, response, data) =>{
244+
if(logs) sy.log(`${jsname}, 余额提现: ${data}`)
245+
txtx =JSON.parse(data)
246+
if (txtx.status==1)
247+
{
248+
tz+='【余额提现】🎉:提现成功,请到公众号领取'+'\n'
249+
250+
}
251+
252+
else
253+
tz+='【余额提现】✖️:'+txtx.info+'\n'
254+
255+
256+
257+
258+
resolve()
259+
})
260+
})
261+
}
262+
263+
264+
265+
266+
267+
268+
269+
270+
271+
function showmsg() {
272+
273+
console.log(tz)
274+
275+
if (notifyInterval==1)
276+
sy.msg(jsname,'',tz)
277+
}
278+
279+
280+
function init() {
281+
isSurge = () => {
282+
return undefined !== this.$httpClient
283+
}
284+
isQuanX = () => {
285+
return undefined !== this.$task
286+
}
287+
getdata = (key) => {
288+
if (isSurge()) return $persistentStore.read(key)
289+
if (isQuanX()) return $prefs.valueForKey(key)
290+
}
291+
setdata = (key, val) => {
292+
if (isSurge()) return $persistentStore.write(key, val)
293+
if (isQuanX()) return $prefs.setValueForKey(key, val)
294+
}
295+
msg = (title, subtitle = '', body = '') => {
296+
if (isSurge()) $notification.post(title, subtitle, body)
297+
if (isQuanX()) $notify(title, subtitle, body)
298+
}
299+
log = (msg) => {
300+
console.log(`${msg}\n`)
301+
}
302+
get = (options, callback) => {
303+
if (isQuanX()) {
304+
if (typeof options == 'string') options = { url: options }
305+
options['method'] = 'GET'
306+
return $task.fetch(options).then(
307+
(response) => {
308+
response['status'] = response.statusCode
309+
callback(null, response, response.body)
310+
},
311+
(reason) => callback(reason.error, null, null)
312+
)
313+
}
314+
if (isSurge()) return $httpClient.get(options, callback)
315+
}
316+
post = (options, callback) => {
317+
if (isQuanX()) {
318+
if (typeof options == 'string') options = { url: options }
319+
options['method'] = 'POST'
320+
$task.fetch(options).then(
321+
(response) => {
322+
response['status'] = response.statusCode
323+
callback(null, response, response.body)
324+
},
325+
(reason) => callback(reason.error, null, null)
326+
)
327+
}
328+
if (isSurge()) $httpClient.post(options, callback)
329+
}
330+
done = (value = {}) => {
331+
$done(value)
332+
}
333+
return { isSurge, isQuanX, msg, log, getdata, setdata, get, post, done }
334+
}

0 commit comments

Comments
 (0)