├── 57Box.py
├── 7dian5.py
├── Coca.py
├── aliyunpan.py
├── alyp.js
├── anmuxi.py
├── babycare.js
├── baitianGame.js
├── bhxcy.js
├── bilibili.py
├── bjxd.js
├── bucket.js
├── changhongmeiling.py
├── chaoxinwen.js
├── chery.js
├── cheryev.js
├── cyh.js
├── ddsy_songyao.js
├── dffx.js
├── dfyc.js
├── dianxin.js
├── didi.js
├── dt.js
├── dw.js
├── dwnc.py
├── dydd.py
├── enshan.py
├── exeedcars.js
├── fenxiang.js
├── fsdlb.js
├── ftej.js
├── gjzp.js
├── gqaa.js
├── gqftbz.js
├── gujinggongjiu.js
├── guolejiangjiu.js
├── haitianmeiweiguan.js
├── hfzj.js
├── hl.js
├── hqcsh.js
├── htx.js
├── huangli.js
├── hyjk.js
├── imaotai.py
├── iqiyi.py
├── jetta.js
├── jlqc.js
├── jlyh.js
├── jlzx.js
├── jrttjsb.js
├── kgdzb.js
├── kgyy.js
├── ks_fruit.js
├── ksjsb.js
├── leidaCar.js
├── lenovoapp.js
├── liyingyunjie.js
├── ljfsjlb.js
├── maisiweier.js
├── meituan.js
├── mtf.js
├── musi.js
├── mxbc.js
├── nhsy.js
├── pddFruit.js
├── piaopiaochaoshi.js
├── qbd.js
├── ql.js
├── qtx.js
├── quanmianshidai.py
├── quanzhan.py
├── quzanmi.js
├── ruilanCar.js
├── sendNotify.js
├── sfsy.js
├── shangshaban.js
├── shangzhanwangluo.js
├── smart汽车+.js
├── sysxc.js
├── sysxc.py
├── sytt.js
├── taipingtong.py
├── topspace.py
├── tyqh.js
├── utils.js
├── wangchao.py
├── wnn.js
├── wyyx_app.js
├── xiaosatonglu.js
├── xinxi.js
├── xipigou.js
├── xmly.js
├── xqz.js
├── ycj.js
├── yidongyunpan.py
├── yingsheng_v2.js
├── yinxiang.js
├── ysfqd.js
├── yuebai.js
├── yyq.js
├── zhiwuxingqiu.js
├── 上官新闻.py
├── 中健365.py
├── 仑传.js
├── 卡萨帝签到提现.py
├── 叮叮联盟阅读.js
├── 叮当快药.py
├── 可乐读书.js
├── 品赞HTTP代理签到.js
├── 商战网络.js
├── 多娇江山.js
├── 太平洋知科技.js
├── 悦临平.js
├── 掌上天津极速版.js
├── 掌上瓯海.js
├── 星空穿透签到.py
├── 杜蕾斯会员中心.js
├── 熊猫赚.js
├── 爱海盐.js
├── 猫猫看看.py
├── 王老吉越龙门.js
├── 百观.js
├── 看岱山.js
├── 立白VIP.js
├── 美数.js
├── 蔚来.js
├── 鄞响.js
├── 阅龙湾.js
├── 霸王茶姬抢券.js
├── 鱼儿阅读.js
├── 鸿星尔克.js
└── 龙湖U享家.js
/57Box.py:
--------------------------------------------------------------------------------
1 | """
2 | 57Box 1.10
3 | 仅供学习交流,请在下载后的24小时内完全删除 请勿将任何内容用于商业或非法目的,否则后果自负。
4 | Author By Qim肖恩
5 | Updated By Huansheng
6 | 更新说明:修复sign接口问题
7 | 玩法:
8 | 微信小程序 57Box 玩法:完成基础任务抽免费箱子
9 | 登录微信小程序授权手机号然后下载APP设置密码
10 | export BOX_data=手机号@密码
11 | 多账号用'===='隔开 例 账号1====账号2
12 | cron: 0 8 * * *
13 | """
14 |
15 | import urllib3
16 |
17 | urllib3.disable_warnings()
18 | lottery = 1 # 抽鞋盒开关 1开启 0关闭
19 | enabledTaskAndLottery = True
20 | # 盲盒需要的矿石数量
21 | lotteryBoxPrize = 80
22 | # 进群密码
23 | joinGroupPassword = "123456"
24 | import os
25 | import time
26 | import requests
27 | import datetime
28 | import hashlib
29 |
30 |
31 | def getSign(userId):
32 | def getDate():
33 | e = datetime.datetime.now()
34 | a = e.year
35 | t = e.month
36 | l = e.day
37 | n = e.weekday()
38 | o = e.hour
39 | i = e.minute
40 | s = e.second
41 | c = int(e.timestamp())
42 | r = str(e)
43 | return {
44 | "year": a,
45 | "month": t,
46 | "date": l,
47 | "hours": o,
48 | "minute": i,
49 | "second": s,
50 | "day": n,
51 | "timeStamp": c,
52 | "dateDateTime": r,
53 | "dates": r.split(" ")[0].replace("/", "-"),
54 | }
55 |
56 | s = getDate()
57 | c = s["year"]
58 | r = s["month"]
59 | u = s["date"]
60 | d = s["hours"]
61 | m = s["minute"]
62 | v = str(c) + "-" + str(r) + "-" + str(u) + " " + str(d) + ":" + str(m)
63 | currentTime = int(datetime.datetime.strptime(v, "%Y-%m-%d %H:%M").timestamp())
64 | return hashlib.md5((str(currentTime) + userId + "box57").encode()).hexdigest()
65 |
66 |
67 | # from dotenv import load_dotenv
68 | #
69 | # load_dotenv()
70 | accounts = os.getenv("BOX_data")
71 | print(
72 | "原作者肖恩公告:" + requests.get("http://1.94.61.34:50/index.txt").content.decode("utf-8")
73 | )
74 | if accounts is None:
75 | print("你没有填入BOX_data,咋运行?")
76 | exit()
77 | accounts_list = accounts.split("====")
78 | num_of_accounts = len(accounts_list)
79 | print(f"获取到 {num_of_accounts} 个账号")
80 | for i, account in enumerate(accounts_list, start=1):
81 | values = account.split("@")
82 | if len(values) == 2:
83 | mobile, password = values[0], values[1]
84 | else:
85 | print(f"\n{'=' * 8}第【{i}】个账号数据有误,请检查!该数据为:{account}")
86 | continue
87 | print(f"\n{'=' * 8}开始执行第【{i}】个账号[{mobile}]{'=' * 8}")
88 | url = "https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=login&m=greatriver_lottery_operation"
89 | headers = {
90 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/47) uni-app",
91 | }
92 |
93 | data = {
94 | "mobile": mobile,
95 | "password": password,
96 | "password2": "",
97 | "code": "",
98 | "invite_uid": "0",
99 | "source": "app",
100 | }
101 |
102 | response = requests.post(url, headers=headers, data=data).json()
103 | if response["errno"] == 0:
104 | # print(f"{response['data']}")
105 | print(f"{response['message']}")
106 | token = response["data"]["token"]
107 | print(f"{'=' * 12}获取账号信息{'=' * 12}")
108 | url = f"https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=getuserinfo&&token={token}"
109 | data = {
110 | "m": "greatriver_lottery_operation",
111 | "title": "",
112 | }
113 | response = requests.post(url, headers=headers, data=data).json()
114 | if response["errno"] == 999:
115 | print(f"{response['message']}")
116 | elif response["errno"] == 0:
117 | userId = response["data"]["id"]
118 | money = response["data"]["money"]
119 | nickname = response["data"]["nickname"]
120 | integral_str = response["data"]["integral"]
121 | try:
122 | integral = int(float(integral_str))
123 | print(f"Name:{nickname}---矿石余额:{integral}---水晶余额:{money}")
124 | except ValueError:
125 | print(f"无效的integral值: {integral_str}")
126 | else:
127 | print(f"错误未知{response}")
128 | break
129 | if enabledTaskAndLottery:
130 | print(f"{'=' * 12}开始每日任务{'=' * 12}")
131 | sign = getSign(userId)
132 | time.sleep(3)
133 | # 进群密码
134 | answerText = joinGroupPassword
135 | response = requests.get(
136 | f"https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=uptaskinfo&m=greatriver_lottery_operation&radomstr={sign}&id=26&answer={answerText}&token={token}&source=app",
137 | headers=headers,
138 | ).json()
139 | state = "进群密码"
140 | if response["errno"] == 999:
141 | print(f"{state}---{response['message']}")
142 | elif response["errno"] == 0:
143 | print(f"{state}---{response['message']}")
144 | else:
145 | print(f"{state}错误未知{response}")
146 | break
147 | time.sleep(3)
148 | response = requests.get(
149 | f"https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=uptaskinfo&m=greatriver_lottery_operation&radomstr={sign}&id=30&answer=%E7%94%A8%E4%BA%8E%E5%95%86%E5%9F%8E%E5%92%8C%E6%8A%98%E6%89%A3%E5%95%86%E5%9F%8E%E5%85%91%E6%8D%A2%E5%95%86%E5%93%81&token={token}&source=app",
150 | headers=headers,
151 | ).json()
152 | state = "每日答题(二)"
153 | if response["errno"] == 999:
154 | print(f"{state}---{response['message']}")
155 | elif response["errno"] == 0:
156 | print(f"{state}---{response['message']}")
157 | else:
158 | print(f"{state}错误未知{response}")
159 | break
160 | time.sleep(3)
161 | response = requests.get(
162 | f"https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=uptaskinfo&m=greatriver_lottery_operation&radomstr={sign}&id=42&answer=%E9%80%9A%E8%BF%87%E5%BC%80%E7%9B%92%E8%8E%B7%E5%BE%97%E6%AF%8F1000%E8%83%BD%E9%87%8F%E7%9F%B3%E5%8F%AF%E4%BB%A5%E5%85%91%E6%8D%A21%E6%B0%B4%E6%99%B6&token={token}&source=app",
163 | headers=headers,
164 | ).json()
165 | state = "每日答题领福利(一)"
166 | if response["errno"] == 999:
167 | print(f"{state}---{response['message']}")
168 | elif response["errno"] == 0:
169 | print(f"{state}---{response['message']}")
170 | else:
171 | print(f"{state}错误未知{response}")
172 | break
173 | print(f"{'=' * 12}获取账号信息{'=' * 12}")
174 | url = f"https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=getuserinfo&&token={token}"
175 | data = {
176 | "m": "greatriver_lottery_operation",
177 | "title": "",
178 | }
179 | response = requests.post(url, headers=headers, data=data).json()
180 | if response["errno"] == 999:
181 | print(f"{response['message']}")
182 | elif response["errno"] == 0:
183 | # print("response:", response)
184 | money = response["data"]["money"]
185 | nickname = response["data"]["nickname"]
186 | integral_str = response["data"]["integral"]
187 | try:
188 | integral = int(float(integral_str))
189 | print(f"Name:{nickname}---矿石余额:{integral}---水晶余额:{money}")
190 | except ValueError:
191 | print(f"无效的integral值: {integral_str}")
192 | else:
193 | print(f"错误未知{response}")
194 | break
195 | if lottery == 1: # 开始抽奖
196 | print(f"{'=' * 12}执行开鞋盒{'=' * 12}")
197 | num = integral // lotteryBoxPrize
198 | for i in range(num):
199 | url = "https://www.57box.cn/app/index.php"
200 | params = {
201 | "i": "2",
202 | "t": "0",
203 | "v": "1",
204 | "from": "wxapp",
205 | "c": "entry",
206 | "a": "wxapp",
207 | "do": "openthebox",
208 | "token": token,
209 | "m": "greatriver_lottery_operation",
210 | "box_id": "586",
211 | "paytype": "1",
212 | "answer": "",
213 | "num": 1,
214 | }
215 | res = requests.post(url, headers=headers, data=params)
216 | response = res.json()
217 | if len(response["data"]["prizes_data"]):
218 | print(
219 | f"第{str(i)}次开盲盒结果:",
220 | response["message"],
221 | response["data"]["prizes_data"][0]["complete_prize_title"],
222 | )
223 | else:
224 | print(f"第{str(i)}次开盲盒结果:", response["data"]["message"])
225 | if response["errno"] == 0:
226 | complete_prize_title = response["data"]["prizes_data"][0][
227 | "complete_prize_title"
228 | ]
229 | prize_market_price = response["data"]["prizes_data"][0][
230 | "prize_market_price"
231 | ]
232 | print(
233 | f"{response['message']}---{complete_prize_title} 市场价:{prize_market_price}"
234 | )
235 | elif response["errno"] == 999:
236 | print(f"{response['message']}")
237 | else:
238 | print(f"错误未知{response}")
239 | break
240 | print(f"开盲盒操作执行完毕")
241 | if num >= 1:
242 | url = f"https://www.57box.cn/app/index.php?i=2&t=0&v=1&from=wxapp&c=entry&a=wxapp&do=uptaskinfo&&token={token}"
243 | data = {
244 | "m": "greatriver_lottery_operation",
245 | "id": "39",
246 | "answer": "",
247 | }
248 | response = requests.post(url, headers=headers, data=data).json()
249 | state = "开盒看视频领矿石"
250 | if response["errno"] == 999:
251 | print(f"{state}---{response['message']}")
252 | elif response["errno"] == 0:
253 | print(f"{state}---{response['message']}")
254 | else:
255 | print(f"{state}错误未知{response}")
256 | break
257 | else:
258 | print()
259 |
260 | elif lottery == 0:
261 | print(f"{'=' * 12}不执行开鞋盒{'=' * 12}")
262 |
263 | # 查询奖品列表
264 | url = "https://www.57box.cn/app/index.php"
265 |
266 | params = {
267 | "i": "2",
268 | "t": "0",
269 | "v": "1",
270 | "from": "wxapp",
271 | "c": "entry",
272 | "a": "wxapp",
273 | "do": "getmemberprizes",
274 | "token": token,
275 | "m": "greatriver_lottery_operation",
276 | "page": "0",
277 | "type": "1",
278 | "prize_level": "1",
279 | }
280 |
281 | response = requests.get(url, headers=headers, params=params).json()
282 |
283 | all_prizes = response["data"]
284 | accountTotalPrize = 0
285 | for prize in all_prizes:
286 | prize_market_price = prize["prize"]["prize_market_price"]
287 | prize_title = prize["prize"]["complete_prize_title"]
288 | prizes_count = prize["prizes_count"]
289 | print(f"{prize_title} 数量:x{prizes_count} 单价:{prize_market_price}")
290 | accountTotalPrize = accountTotalPrize + float(prize_market_price) * int(
291 | prizes_count
292 | )
293 | print(f"奖品总价:{accountTotalPrize}")
294 | elif response["errno"] == 999:
295 | print(f"{response['message']}")
296 | else:
297 | print(f"错误未知{response}")
298 |
--------------------------------------------------------------------------------
/7dian5.py:
--------------------------------------------------------------------------------
1 |
2 | #微信小程序:七点五饮用天然矿泉水
3 |
4 |
5 | import requests
6 | from os import path
7 | import json
8 | import time
9 | import os
10 |
11 | def load_send():
12 | cur_path = path.abspath(path.dirname(__file__))
13 | notify_file = cur_path + "/notify.py"
14 |
15 | if path.exists(notify_file):
16 | try:
17 | from notify import send # 导入模块的send为notify_send
18 | print("加载通知服务成功!")
19 | return send # 返回导入的函数
20 | except ImportError:
21 | print("加载通知服务失败~")
22 | else:
23 | print("加载通知服务失败~")
24 |
25 | return False # 返回False表示未成功加载通知服务
26 |
27 |
28 |
29 | def sign():
30 | url = "https://h5.youzan.com/wscump/checkin/checkinV2.json?checkinId=3997371"
31 | headers = {
32 | 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129",
33 | 'xweb_xhr': "1",
34 | 'extra-data': sid,
35 | 'sec-fetch-site': "cross-site",
36 | 'sec-fetch-mode': "cors",
37 | 'sec-fetch-dest': "empty",
38 | 'referer': "https://servicewechat.com/wx5508c9ab0d2118ff/63/page-frame.html",
39 | 'accept-language': "zh-CN,zh;q=0.9",
40 | 'Cookie': "KDTWEAPPSESSIONID="+sid
41 | }
42 |
43 | response = requests.get(url, headers=headers)
44 | time.sleep(2)
45 | print(response.text)
46 | time.sleep(2)
47 | return response.text
48 |
49 | def jifen():
50 | url = "https://h5.youzan.com/wscump/pointstore/getCustomerPoints.json"
51 |
52 | headers = {
53 | 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129",
54 | 'Cookie': "KDTWEAPPSESSIONID="+sid
55 | }
56 |
57 | response = requests.get(url, headers=headers)
58 | time.sleep(2)
59 | # print(response.text)
60 | try:
61 | xiaoku=json.loads(response.text)
62 | jifen1=str(xiaoku["data"]["currentAmount"])
63 | print('目前积分为'+jifen1)
64 | time.sleep(2)
65 |
66 | url = "https://h5.youzan.com/wscump/checkin/get_activity_by_yzuid_v2.json?checkinId=3997371"
67 |
68 | headers = {
69 | 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129",
70 | 'extra-data': "sid="+sid,
71 | 'Cookie': "KDTWEAPPSESSIONID="+sid
72 | }
73 |
74 | response = requests.get(url, headers=headers)
75 | xiaoku=json.loads(response.text)
76 | print('目前签到天数为'+str(xiaoku["data"]["continuesDay"]))
77 | # print(response.text)
78 | tongzhi='\n目前积分为'+jifen1+'\n签到天数为'+str(xiaoku["data"]["continuesDay"])
79 | return tongzhi
80 | except:
81 | print('积分查询失败,检查变量是否正确')
82 |
83 |
84 |
85 | if __name__ == "__main__":
86 | var_name='qdwxcxcookie'
87 | values = os.getenv(var_name)
88 | values=values.split('\n')
89 | content=''
90 | for value in values:
91 | beizhu=value.split('#')[0];
92 | sid=value.split('#')[1];
93 | print('-------开始' + str(beizhu) + '签到------')
94 | content=content+'\n===='+str(beizhu)+'账号签到情况====\n'
95 | content=content+str(sign())
96 | print('-------开始' + str(beizhu) + '查询积分------')
97 | content=content+str(jifen())
98 | content=content+'\n----------------------\n'
99 | # 在load_send中获取导入的send函数
100 | send = load_send()
101 | print()
102 |
103 |
104 | print('------运行结束-------')
105 | content=content+'\n签到10天送100积分,连续20天送20元券,连续30天送25元券,连续45天送七点五饮用天然泉水高端弱碱饮用天然泉水 表白礼物 整箱520ml*15\n'
106 | content=content+'\n所有账号运行完毕\n'
107 | print('签到10天送100积分,连续20天送20元券,连续30天送25元券,连续45天送七点五饮用天然泉水高端弱碱饮用天然泉水 表白礼物 整箱520ml*15')
108 | # 判断send是否可用再进行调用
109 | print()
110 | if send:
111 | send('七点五饮用天然矿泉水签到推送', content)
112 | else:
113 | print('通知服务不可用')
114 |
--------------------------------------------------------------------------------
/Coca.py:
--------------------------------------------------------------------------------
1 | # -*- encoding: utf-8 -*-
2 | # @Time : 18:57
3 | # @Author : yuxian
4 | # @Email : 1503889663@qq.com
5 | # @File : Coca.py
6 | # @SoftWare : PyCharm
7 | # 可口可乐吧小程序,抓包authorization(全部内容 copy即可),填入环境变量Coca中,多账号换行或@隔开
8 | import json, os, hashlib, random, time, requests as r
9 |
10 |
11 | def UF(): return f"Mozilla/5.0 (iPhone; CPU iPhone OS {f'{random.randint(12, 15)}.{random.randint(0, 6)}.{random.randint(0, 9)}'} like Mac OS X) AppleWebKit/{f'{random.randint(600, 700)}.{random.randint(1, 4)}.{random.randint(1, 5)}'} (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.20(0x16001422) NetType/WIFI Language/zh_CN"
12 |
13 |
14 | def generate_random_string_and_timestamp():
15 | T = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8))
16 | d = str(int(time.time() * 1000))
17 | return T, d
18 |
19 |
20 | def sha256_encrypt(data):
21 | hash_object = hashlib.sha256()
22 | hash_object.update(data.encode('utf-8'))
23 | hex_dig = hash_object.hexdigest()
24 | return hex_dig
25 |
26 |
27 | def get_header(url1):
28 | T, d = generate_random_string_and_timestamp()
29 | message = url1.replace("https://koplus.icoke.cn/cre-bff", "")
30 | encrypted_data = sha256_encrypt(message + T + d + "apyuc3#7%m4*")
31 | headers = {"x-sg-id": T, "x-sg-timestamp": d, "x-sg-signature": encrypted_data}
32 | return headers
33 |
34 |
35 | U = "https://koplus.icoke.cn/cre-bff/wechat/"
36 | P = os.environ.get("Coca")
37 | if P and P != "":
38 | C = P.split("\n") if "\n" in P else P.split("@")
39 | A = 1
40 | for B in C:
41 | try:
42 | H = {
43 | "Host": "koplus.icoke.cn",
44 | "Connection": "keep-alive",
45 | "xweb_xhr": "1",
46 | "Authorization": B,
47 | "User-Agent": UF(),
48 | "Content-Type": "application/json",
49 | "Accept": "*/*",
50 | "Accept-Language": "*",
51 | "Sec-Fetch-Site": "cross-site",
52 | "Sec-Fetch-Mode": "cors",
53 | "Sec-Fetch-Dest": "empty",
54 | "Referer": "https://servicewechat.com/wxa5811e0426a94686/364/page-frame.html",
55 | "Accept-Encoding": "gzip, deflate, br"
56 | }
57 | url = f"{U}checkin"
58 | H.update(get_header(url))
59 | signReq = r.post(url=url, headers=H)
60 | signResp = json.loads(signReq.text)
61 | print(f"🎉开始签到账号:{A}🎉")
62 | A += 1
63 | if signResp["meta"]["transactionPoint"]:
64 | print(f"⭕签到成功,获得{str(int(signResp['meta']['transactionPoint']) / 10)}个快乐瓶⭕")
65 | elif signResp["meta"]["transactionPoint"] is None:
66 | print("❗今日已签到,请勿重复签到❗")
67 | else:
68 | print("❌出现未知错误,签到失败❌")
69 | time.sleep(3)
70 | url = f"{U}profile"
71 | H.update(get_header(url))
72 | qReq = r.get(url=url, headers=H)
73 | qResp = json.loads(qReq.text)
74 | print(f"🎉开始查询账号积分🎉")
75 | if qResp["data"]:
76 | print(f"🎆账号快乐瓶总额:{str(int(qResp['data']['point']) / 10)}🎆")
77 | else:
78 | print("❌出现未知错误,查询失败❌")
79 | except:
80 | print("⚠️⚠️⚠️脚本报错执行下一个账号⚠️⚠️⚠️")
81 |
--------------------------------------------------------------------------------
/aliyunpan.py:
--------------------------------------------------------------------------------
1 |
2 | import json
3 | import os
4 |
5 | import requests
6 | import urllib3
7 |
8 | from dailycheckin import CheckIn
9 |
10 | urllib3.disable_warnings()
11 |
12 |
13 | class AliYun(CheckIn):
14 | name = "阿里云盘"
15 |
16 | def __init__(self, check_item: dict):
17 | self.check_item = check_item
18 |
19 | def update_token(self, refresh_token):
20 | url = "https://auth.aliyundrive.com/v2/account/token"
21 | data = {"grant_type": "refresh_token", "refresh_token": refresh_token}
22 | response = requests.post(url=url, json=data).json()
23 | access_token = response.get("access_token")
24 | return access_token
25 |
26 | def sign(self, access_token):
27 | url = "https://member.aliyundrive.com/v1/activity/sign_in_list"
28 | headers = {"Authorization": access_token, "Content-Type": "application/json"}
29 | result = requests.post(url=url, headers=headers, json={}).json()
30 | sign_days = result["result"]["signInCount"]
31 | data = {"signInDay": sign_days}
32 | url_reward = "https://member.aliyundrive.com/v1/activity/sign_in_reward"
33 | requests.post(url=url_reward, headers=headers, data=json.dumps(data))
34 | if "success" in result:
35 | print("签到成功")
36 | for i, j in enumerate(result["result"]["signInLogs"]):
37 | if j["status"] == "miss":
38 | day_json = result["result"]["signInLogs"][i - 1]
39 | if not day_json["isReward"]:
40 | msg = [
41 | {
42 | "name": "阿里云盘",
43 | "value": "签到成功,今日未获得奖励",
44 | }
45 | ]
46 | else:
47 | msg = [
48 | {
49 | "name": "累计签到",
50 | "value": result["result"]["signInCount"],
51 | },
52 | {
53 | "name": "阿里云盘",
54 | "value": "获得奖励:{}{}".format(
55 | day_json["reward"]["name"],
56 | day_json["reward"]["description"],
57 | ),
58 | },
59 | ]
60 |
61 | return msg
62 |
63 | def main(self):
64 | refresh_token = self.check_item.get("refresh_token")
65 | access_token = self.update_token(refresh_token)
66 | if not access_token:
67 | return [{"name": "阿里云盘", "value": "token 过期"}]
68 | msg = self.sign(access_token)
69 | msg = "\n".join([f"{one.get('name')}: {one.get('value')}" for one in msg])
70 | return msg
71 |
72 |
73 | if __name__ == "__main__":
74 | with open(
75 | os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.json"),
76 | encoding="utf-8",
77 | ) as f:
78 | datas = json.loads(f.read())
79 | _check_item = datas.get("ALIYUN", [])[0]
80 | print(AliYun(check_item=_check_item).main())
81 |
--------------------------------------------------------------------------------
/anmuxi.py:
--------------------------------------------------------------------------------
1 |
2 | # !/usr/bin/python3
3 | # -- coding: utf-8 --
4 | # cron "30 9 * * *" script-path=xxx.py,tag=匹配cron用
5 | # const $ = new Env('安慕希小程序')
6 | import json
7 | import os
8 | import random
9 | import time
10 | from datetime import datetime, time as times
11 | import requests
12 | from requests.packages.urllib3.exceptions import InsecureRequestWarning
13 | # 禁用安全请求警告
14 | requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
15 |
16 | IS_DEV = False
17 | if os.path.isfile('DEV_ENV.py'):
18 | import DEV_ENV
19 |
20 | IS_DEV = True
21 | if os.path.isfile('notify.py'):
22 | from notify import send
23 |
24 | print("加载通知服务成功!")
25 | else:
26 | print("加载通知服务失败!")
27 | send_msg = ''
28 | one_msg = ''
29 |
30 |
31 | def Log(cont=''):
32 | global send_msg, one_msg
33 | print(cont)
34 | if cont:
35 | one_msg += f'{cont}\n'
36 | send_msg += f'{cont}\n'
37 |
38 |
39 | class RUN:
40 | def __init__(self, info, index):
41 | global one_msg
42 | one_msg = ''
43 | split_info = info.split('@')
44 | self.access_token = split_info[0]
45 | len_split_info = len(split_info)
46 | last_info = split_info[len_split_info - 1]
47 | self.send_UID = None
48 | if len_split_info > 0 and "UID_" in last_info:
49 | print('检测到设置了UID')
50 | print(last_info)
51 | self.send_UID = last_info
52 | self.index = index + 1
53 | # print(self.access_token)
54 | self.UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309080f) XWEB/8555'
55 | # if ENV_NAME == 'YL_ZXBQL':
56 | # appid = "wx06af0ef532292cd3"
57 | # scene = "1037"
58 | # scene = "1037"
59 | self.headers = {
60 | 'Host': 'amxshop.yili.com',
61 | 'accesstoken': self.access_token,
62 | 'scene': '1302',
63 | 'xweb_xhr': '1',
64 | 'user-agent': self.UA,
65 | 'content-type': 'application/x-www-form-urlencoded',
66 | 'accept': '*/*',
67 | 'sec-fetch-site': 'cross-site',
68 | 'sec-fetch-mode': 'cors',
69 | 'sec-fetch-dest': 'empty',
70 | 'referer': 'https://servicewechat.com/wxf2a6206f7e2fd712/664/page-frame.html',
71 | 'accept-language': 'zh-CN,zh;q=0.9',
72 | }
73 | self.s = requests.session()
74 | self.s.verify = False
75 | self.baseUrl = 'https://amxshop.yili.com/api/'
76 |
77 |
78 | def make_request(self, url, method='post', headers={}, data={}, params=None):
79 | if headers == {}:
80 | headers = self.headers
81 | try:
82 | if method.lower() == 'get':
83 | response = self.s.get(url, headers=headers, verify=False, params=params)
84 | elif method.lower() == 'post':
85 | response = self.s.post(url, headers=headers, json=data, params=params, verify=False)
86 | else:
87 | raise ValueError("不支持的请求方法❌: " + method)
88 | return response.json()
89 | except requests.exceptions.RequestException as e:
90 | print("请求异常❌:", e)
91 | except ValueError as e:
92 | print("值错误或不支持的请求方法❌:", e)
93 | except Exception as e:
94 | print("发生了未知错误❌:", e)
95 |
96 | def get_user_info(self):
97 | act_name = '获取用户信息'
98 | Log(f'\n====== {act_name} ======')
99 | url = f"{self.baseUrl}user/getUser"
100 | response = self.make_request(url,method='get')
101 | if response.get('code', -1) == 200:
102 | print(f'{act_name}成功!✅')
103 | data = response.get('data',{})
104 | user = data.get('user',{})
105 | user_id = user.get('id')
106 | user_name = user.get('name')
107 | mobilePhone = user.get('mobilePhone')
108 | myCode = user.get('myCode')
109 |
110 | mobile = mobilePhone[:3] + "*" * 4 + mobilePhone[7:]
111 | Log(f">用户名:{user_name}\n>手机号:{mobile}")
112 |
113 | return True
114 | elif not response:
115 | print(f">账号 {self.index}: ck过期 请重新抓取 access-token")
116 | return False
117 | else:
118 | print(response)
119 | return False
120 |
121 | def get_Point(self,END=False):
122 | act_name = '获取积分信息'
123 | if not END:Log(f'\n====== {act_name} ======')
124 | url = f"{self.baseUrl}user/score"
125 | response = self.make_request(url,method='get')
126 | if response.get('code', -1) == 200:
127 | data = response.get('data', '')
128 | print(f'{act_name}成功!✅')
129 | if END:
130 | Log(f'执行后积分:【{data}】')
131 | else:
132 | Log(f'当前积分:【{data}】')
133 | return True
134 | else:
135 | print(response)
136 | return False
137 |
138 | def daily_sign(self):
139 | act_name = '签到'
140 | Log(f'\n====== {act_name} ======')
141 | url = f"{self.baseUrl}user/daily/sign?exParams=false"
142 | response = self.make_request(url,method='get')
143 | if response.get('code', -1) == 200:
144 | data = response.get('data',{})
145 | point = data.get('dailySign', {}).get('bonusPoint', '')
146 | print(f'{act_name}成功!✅')
147 | Log(f'获得积分:【{point}】')
148 | return True
149 | else:
150 | print(response)
151 | return False
152 |
153 | def get_sign_status(self):
154 | act_name = '获取签到信息'
155 | Log(f'\n====== {act_name} ======')
156 | url = f"{self.baseUrl}user/sign/status"
157 | response = self.make_request(url,method='get')
158 | if response.get('code', -1) == 200:
159 | data = response.get('data',{})
160 | signed = data.get('signed','')
161 | signDays = data.get('signDays','')
162 | print(f'{act_name}成功!✅')
163 | Log(f'今日:【{"已签到" if signed else "未签到"}】')
164 | print(f'累计签到:【{signDays}】天')
165 | if not signed:
166 | self.daily_sign()
167 | return True
168 | else:
169 | print(response)
170 | return False
171 |
172 |
173 | def main(self):
174 | Log(f"\n开始执行第{self.index}个账号--------------->>>>>")
175 | if self.get_user_info():
176 | # random_delay()
177 | self.get_Point()
178 | random_delay()
179 | self.get_sign_status()
180 | random_delay()
181 | self.get_Point(True)
182 | # self.daily_sign()
183 |
184 | self.sendMsg()
185 | return True
186 | else:
187 | self.sendMsg()
188 | return False
189 |
190 | def sendMsg(self):
191 | if self.send_UID:
192 | push_res = CHERWIN_TOOLS.wxpusher(self.send_UID, one_msg, APP_NAME)
193 | print(push_res)
194 |
195 |
196 | def random_delay(min_delay=1, max_delay=5):
197 | """
198 | 在min_delay和max_delay之间产生一个随机的延时时间,然后暂停执行。
199 | 参数:
200 | min_delay (int/float): 最小延时时间(秒)
201 | max_delay (int/float): 最大延时时间(秒)
202 | """
203 | delay = random.uniform(min_delay, max_delay)
204 | print(f">本次随机延迟:【{delay:.2f}】 秒.....")
205 | time.sleep(delay)
206 |
207 |
208 | def down_file(filename, file_url):
209 | print(f'开始下载:{filename},下载地址:{file_url}')
210 | try:
211 | response = requests.get(file_url, verify=False, timeout=10)
212 | response.raise_for_status()
213 | with open(filename + '.tmp', 'wb') as f:
214 | f.write(response.content)
215 | print(f'【{filename}】下载完成!')
216 |
217 | # 检查临时文件是否存在
218 | temp_filename = filename + '.tmp'
219 | if os.path.exists(temp_filename):
220 | # 删除原有文件
221 | if os.path.exists(filename):
222 | os.remove(filename)
223 | # 重命名临时文件
224 | os.rename(temp_filename, filename)
225 | print(f'【{filename}】重命名成功!')
226 | return True
227 | else:
228 | print(f'【{filename}】临时文件不存在!')
229 | return False
230 | except Exception as e:
231 | print(f'【{filename}】下载失败:{str(e)}')
232 | return False
233 |
234 |
235 | def import_Tools():
236 | global CHERWIN_TOOLS, ENV, APP_INFO, TIPS, TIPS_HTML, amxCode
237 | import CHERWIN_TOOLS
238 | ENV, APP_INFO, TIPS, TIPS_HTML, amxCode = CHERWIN_TOOLS.main(APP_NAME, local_script_name, ENV_NAME,local_version)
239 |
240 |
241 | if __name__ == '__main__':
242 | APP_NAME = '安慕希小程序'
243 | ENV_NAME = 'AMX'
244 | CK_URL = 'amxshop.yili.com请求头'
245 | CK_NAME = 'accesstoken'
246 | CK_EX = 'wTUhu5IlL9uQDRelKgMRbao2bxii+O8+4FffOnxxxxxxx'
247 | print(f'''
248 | ✨✨✨ {APP_NAME}脚本✨✨✨
249 | ✨ 功能:
250 | 积分签到
251 | ✨ 抓包步骤:
252 | 打开{APP_NAME}
253 | 授权登陆
254 | 打开抓包工具
255 | 找{CK_URL}{CK_NAME}
256 | 参数示例:{CK_EX}
257 | ✨ ✨✨wxpusher一对一推送功能,
258 | ✨需要定义变量export WXPUSHER=wxpusher的app_token,不设置则不启用wxpusher一对一推送
259 | ✨需要在{ENV_NAME}变量最后添加@wxpusher的UID
260 | ✨ 设置青龙变量:
261 | export {ENV_NAME}='{CK_NAME}参数值'多账号#或&分割
262 | export SCRIPT_UPDATE = 'False' 关闭脚本自动更新,默认开启
263 | ✨ ✨ 注意:抓完CK没事儿别打开小程序,重新打开小程序请重新抓包
264 | ✨ 推荐cron:5 7,11,15,20 * * *
265 | ''')
266 | local_script_name = os.path.basename(__file__)
267 | local_version = '2024.05.23'
268 | if IS_DEV:
269 | import_Tools()
270 | else:
271 | if os.path.isfile('amx.py'):
272 | import_Tools()
273 | else:
274 | if down_file('amx.py', 'amx.py'):
275 | print('脚本检测完成')
276 | import_Tools()
277 | else:
278 | print(
279 | '脚本检测失败')
280 | exit()
281 | print(TIPS)
282 | token = ''
283 | token = ENV if ENV else token
284 | if not token:
285 | print(f"未填写{ENV_NAME}变量\n青龙可在环境变量设置 {ENV_NAME} 或者在本脚本文件上方将{CK_NAME}填入token =''")
286 | exit()
287 | tokens = CHERWIN_TOOLS.ENV_SPLIT(token)
288 | # print(tokens)
289 | if len(tokens) > 0:
290 | print(f"\n>>>>>>>>>>共获取到{len(tokens)}个账号<<<<<<<<<<")
291 | access_token = []
292 | for index, infos in enumerate(tokens):
293 | run_result = RUN(infos, index).main()
294 | if not run_result: continue
295 | if send: send(f'{APP_NAME}挂机通知', send_msg + TIPS_HTML)
296 |
--------------------------------------------------------------------------------
/bucket.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | getBucket,
3 | updateBucket
4 | }
5 | const fs = require('fs')
6 | function getBucket(bucketName) {
7 | return fs.readFileSync(bucketName)
8 | }
9 |
10 | function updateBucket(bucketName, bucket) {
11 | return fs.writeFileSync(bucketName, bucket)
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/changhongmeiling.py:
--------------------------------------------------------------------------------
1 |
2 | #环境变量 chmlck 取url请求头中的token
3 | #变量格式 token#备注,多账号换行
4 | #搜微信小程序长虹美菱
5 |
6 | import os
7 | import requests
8 | response = requests.get("#小程序://长虹美菱会员服务/VgBR6WSiyJxrs4G")
9 | response.encoding = 'utf-8'
10 | txt = response.text
11 | print(txt)
12 |
13 |
14 | accounts = os.getenv("chmlck", "").splitlines()
15 | print("☞☞☞ 长虹美菱每日签到 ☜☜☜\n")
16 |
17 | if not accounts:
18 | print("未找到任何账号信息。")
19 | else:
20 | for account in accounts:
21 | if not account.strip():
22 | continue
23 | try:
24 | token, note = account.split("#")
25 | except ValueError:
26 | print(f"格式错误: {account}")
27 | continue
28 |
29 | url = "https://hongke.changhong.com/gw/applet/aggr/signin"
30 | params = {'aggrId': "608"}
31 | headers = {
32 | 'User-Agent': "Mozilla/5.0 (Linux; Android 10; Mobile Safari/537.36)",
33 | 'Accept-Encoding': "gzip, deflate",
34 | 'Content-Type': "application/json",
35 | 'Token': token.strip()
36 | }
37 |
38 | try:
39 | response = requests.post(url, params=params, headers=headers)
40 | if response.status_code == 200:
41 | print(f"{note.strip()}:签到成功")
42 | elif response.status_code == 400:
43 | print(f"{note.strip()}:请勿重复签到")
44 | else:
45 | print(f"{note.strip()}:响应状态码 {response.status_code} - {response.text}")
46 | except requests.RequestException as e:
47 | print(f"{note.strip()}:请求失败 - {e}")
48 |
--------------------------------------------------------------------------------
/cheryev.js:
--------------------------------------------------------------------------------
1 | /**
2 | * cron 5 15 * * * V3.js
3 | * Show:
4 | * 变量名:cheryev
5 | * 变量值:midend.icar-ecology.com Headers中 token的值 多账号换行或者 @ 分隔
6 | */
7 |
8 | const $ = new Env("奇瑞Ev");
9 | const ckName = "cheryev";
10 | let envSplitor = ["@", "\n"]; //多账号分隔符
11 | let strSplitor = "&"; //多变量分隔符
12 | let userIdx = 0;
13 | let userList = [];
14 | class UserInfo {
15 | constructor(str) {
16 | this.index = ++userIdx;
17 | this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符
18 | this.ckStatus = true;
19 | }
20 | async main() {
21 | await this.user_info();
22 | }
23 | async user_info() {
24 | try {
25 | let options = {
26 | url: `https://midend.icar-ecology.com/credits/task/app/v1/attendance`,
27 | headers: {
28 | "app": "cheryev",
29 | "authorization": `Bearer ${this.ck}`,
30 | "app-v": "2.9.0",
31 | //"uid": "1721053872548581377",
32 | "net-type": "wifi",
33 | "lng": 0.00,
34 | "channel": 2,
35 | "dev-id": "29f8b4555e18235b6b1ef94fa59541f7a",
36 | "platform": 7,
37 | "dev-model": "MI8Lite",
38 | "lat": 0.00,
39 | "token": `${this.ck}`,
40 | "Content-Length": 0,
41 | "Host": "midend.icar-ecology.com",
42 | "Connection": "Keep-Alive",
43 | "Accept-Encoding": "gzip",
44 | "User-Agent": "okhttp/4.10.0"
45 | },
46 | body: JSON.stringify({})
47 | },
48 | result = await httpRequest(options);
49 | //console.log(options);
50 | //console.log(result);
51 | if (result.data.success == true) {
52 | console.log(`✅账号[${this.index}] 签到成功 => 获得${result.data.rewardPoints}🎉`);
53 | } else {
54 | console.log(`❌账号[${this.index}] 签到 => 失败`);
55 | console.log(JSON.stringify(result));
56 | }
57 | } catch (e) {
58 | console.log(e);
59 | }
60 | }
61 | }
62 |
63 | async function start() {
64 | let taskall = [];
65 | for (let user of userList) {
66 | if (user.ckStatus) {
67 | taskall.push(await user.main());
68 | }
69 | }
70 | await Promise.all(taskall);
71 | }
72 |
73 | !(async () => {
74 | if (!(await checkEnv())) return;
75 | if (userList.length > 0) {
76 | await start();
77 | }
78 | })()
79 | .catch((e) => console.log(e))
80 | .finally(() => $.done());
81 |
82 | //********************************************************
83 | /**
84 | * 变量检查与处理
85 | * @returns
86 | */
87 | async function checkEnv() {
88 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "";
89 | if (userCookie) {
90 | console.log(userCookie);
91 | let e = envSplitor[0];
92 | for (let o of envSplitor)
93 | if (userCookie.indexOf(o) > -1) {
94 | e = o;
95 | break;
96 | }
97 | for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n));
98 | } else {
99 | console.log("未找到CK");
100 | return;
101 | }
102 | return console.log(`共找到${userList.length}个账号`), true; //true == !0
103 | }
104 |
105 | /////////////////////////////////////////////////////////////////////////////////////
106 | function httpRequest(options, timeout = 5 * 1000) {
107 | method = options.method
108 | ? options.method.toLowerCase()
109 | : options.body
110 | ? "post"
111 | : "get";
112 | return new Promise((resolve) => {
113 | setTimeout(() => {
114 | $[method](options, (err, resp, data) => {
115 | try {
116 | if (err) {
117 | console.log(JSON.stringify(err));
118 | $.logErr(err);
119 | } else {
120 | try {
121 | data = JSON.parse(data);
122 | } catch (error) { }
123 | }
124 | } catch (e) {
125 | console.log(e);
126 | $.logErr(e, resp);
127 | } finally {
128 | resolve(data);
129 | }
130 | });
131 | }, timeout);
132 | });
133 | }
134 | // prettier-ignore
135 | function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), this.logs.push("", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="), this.logs.push(s), e && this.logs.push(e), i && this.logs.push(i) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) }
136 |
--------------------------------------------------------------------------------
/cyh.js:
--------------------------------------------------------------------------------
1 | 404: Not Found
--------------------------------------------------------------------------------
/ddsy_songyao.js:
--------------------------------------------------------------------------------
1 | /**
2 | * cron 27 19 * * * ddsy_songyao.js
3 | * Show:叮当快药APP 积分抵钱 我的=>签到有礼
4 | * 变量名:ddsy_songyao
5 | * 变量值:https://hapi.ddky.com/mcp/weixin/rest.htm?后面的loginToken&userId&uDate 多账户@
6 | * scriptVersionNow = "0.0.1";
7 | * /
8 | */
9 |
10 | const $ = new Env("叮当快药APP");
11 | const notify = $.isNode() ? require('./sendNotify') : '';
12 | let ckName = "ddsy_songyao";
13 | let envSplitor = ["@", "\n"]; //多账号分隔符
14 | let strSplitor = "&"; //多变量分隔符
15 | let userIdx = 0;
16 | let userList = [];
17 | class UserInfo {
18 | constructor(str) {
19 | this.index = ++userIdx;
20 | this.token = str.split(strSplitor)[0]; //单账号多变量分隔符
21 | this.ckStatus = true;
22 | this.userId = str.split(strSplitor)[1];
23 | this.uDate = str.split(strSplitor)[2];
24 | }
25 | async main() {
26 | await this.getSignInId()
27 | }
28 | getSign(s) {
29 | const crypto = require("crypto");//SIGN TYPE 1是签到 2是补签
30 | return crypto.createHash('md5').update(s).digest('hex');
31 | }
32 | getTime() {
33 | var now = new Date();
34 | var year = now.getFullYear()
35 | , month = now.getMonth() + 1
36 | , day = now.getDate()
37 | , hours = now.getHours()
38 | , minutes = now.getMinutes()
39 | , seconds = now.getSeconds();
40 | return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
41 | }
42 | getSignDay() {
43 | var now = new Date();
44 | var year = now.getFullYear()
45 | , month = now.getMonth() + 1
46 | , day = now.getDate()
47 | return year + '-' + month + '-' + day
48 | }
49 | async getSignInId() {
50 | const time = this.getTime()
51 | const method = `ddky.promotion.signin.pageinfo`
52 | const signDay = this.getSignDay()
53 | const str = method +
54 | `loginToken${this.token}` +
55 | `method${method}` +
56 | `platH5` +
57 | `platformH5` +
58 | `signDay${signDay}` +
59 | `t${time}` +
60 | `uDate${this.uDate}` +
61 | `userId${this.userId}` +
62 | `v1.0` +
63 | `versionName4.9.0` +
64 | `6C57AB91A1308E26B797F4CD382AC79D`
65 | let sign = (this.getSign(str)).toUpperCase();
66 | let callbackStr = new Date().getTime()
67 | try {
68 | let options = {
69 | url: `https://hapi.ddky.com/mcp/weixin/rest.htm?sign=${sign}&loginToken=${this.token}&method=${method}&plat=H5&platform=H5&signDay=${signDay}&t=${time}&uDate=${this.uDate}&userId=${this.userId}&v=1.0&versionName=4.9.0&callback=Zepto${callbackStr}`,
70 | headers: {},
71 | },
72 | result = await httpRequest(options);
73 | //console.log(options);
74 | result = result.replace(`Zepto${callbackStr}`, "")
75 | result = result.replaceAll("(", "")
76 | result = result.replaceAll(")", "")
77 | result = JSON.parse(result)
78 | if(result.code = "0"){
79 | console.log(result.result.signDayVo.signinId);
80 | await this.user_info(result.result.signDayVo.signinId)
81 | }
82 |
83 | } catch (e) {
84 | console.log(e);
85 | }
86 | }
87 | async user_info(signInId) {
88 | let callbackStr = new Date().getTime()
89 |
90 | const time = this.getTime()
91 | const str = `ddky.promotion.signin.sign` + `channelH5` + `laterSignType1` + `loginToken${this.token}` + `methodddky.promotion.signin.sign` +
92 | `platH5` + `platformH5` + `signinId${signInId}` + `t${time}` + `uDate${this.uDate}` + `userId${this.userId}` + `v1.0` + `versionName4.9.0` +
93 | `6C57AB91A1308E26B797F4CD382AC79D`
94 | let sign = (this.getSign(str)).toUpperCase();
95 | try {
96 | let options = {
97 | url: `https://hapi.ddky.com/mcp/weixin/rest.htm?sign=${sign}&channel=H5&laterSignType=1&loginToken=${this.token}&method=ddky.promotion.signin.sign&plat=H5&platform=H5&signinId=${signInId}&t=${time}&uDate=${this.uDate}&userId=${this.userId}&v=1.0&versionName=4.9.0&callback=Zepto${callbackStr}`,
98 | headers: {},
99 | },
100 | result = await httpRequest(options);
101 | //console.log(options);
102 | console.log(result);
103 | } catch (e) {
104 | console.log(e);
105 | }
106 | }
107 | }
108 |
109 | async function start() {
110 | let taskall = [];
111 | for (let user of userList) {
112 | if (user.ckStatus) {
113 | taskall.push(await user.main());
114 | }
115 | }
116 | await Promise.all(taskall);
117 | }
118 |
119 | !(async () => {
120 | if (!(await checkEnv())) return;
121 | if (userList.length > 0) {
122 | await start();
123 | }
124 | })()
125 | .catch((e) => console.log(e))
126 | .finally(() => $.done());
127 |
128 | //********************************************************
129 | /**
130 | * 变量检查与处理
131 | * @returns
132 | */
133 | async function checkEnv() {
134 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "";
135 | if (userCookie) {
136 | let e = envSplitor[0];
137 | for (let o of envSplitor)
138 | if (userCookie.indexOf(o) > -1) {
139 | e = o;
140 | break;
141 | }
142 | for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n));
143 | } else {
144 | console.log("未找到CK");
145 | return;
146 | }
147 | return console.log(`共找到${userList.length}个账号`), true; //true == !0
148 | }
149 |
150 | /////////////////////////////////////////////////////////////////////////////////////
151 | function httpRequest(options, timeout = 5 * 1000) {
152 | method = options.method
153 | ? options.method.toLowerCase()
154 | : options.body
155 | ? "post"
156 | : "get";
157 | return new Promise((resolve) => {
158 | setTimeout(() => {
159 | $[method](options, (err, resp, data) => {
160 | try {
161 | if (err) {
162 | console.log(JSON.stringify(err));
163 | $.logErr(err);
164 | } else {
165 | try {
166 | data = JSON.parse(data);
167 | } catch (error) { }
168 | }
169 | } catch (e) {
170 | console.log(e);
171 | $.logErr(e, resp);
172 | } finally {
173 | resolve(data);
174 | }
175 | });
176 | }, timeout);
177 | });
178 | }
179 | // prettier-ignore
180 | function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), this.logs.push("", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="), this.logs.push(s), e && this.logs.push(e), i && this.logs.push(i) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) }
181 |
--------------------------------------------------------------------------------
/dffx.js:
--------------------------------------------------------------------------------
1 | /**
2 | * cron 45 19 * * * dffx.js
3 | * Show:东方风行 APP
4 | * @author https://github.com/smallfawn/QLScriptPublic
5 | * 变量名:dffxCookie
6 | * 变量值:https://lqdm-app.dflzm.com请求头Headers中Cookie
7 | * scriptVersionNow = "0.0.1";
8 | */
9 |
10 | const $ = new Env("东方风行");
11 | const notify = $.isNode() ? require('./sendNotify') : '';
12 | let ckName = "dffxCookie";
13 | let envSplitor = ["@", "\n"]; //多账号分隔符
14 | let strSplitor = "&"; //多变量分隔符
15 | let userIdx = 0;
16 | let userList = [];
17 | class UserInfo {
18 | constructor(str) {
19 | this.index = ++userIdx;
20 | this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符
21 | this.ckStatus = true;
22 | this.artList = []//文章列表
23 | this.taskList = []//任务列表
24 | this.task_num_like = null //待做点赞任务数
25 | this.task_num_share = null//待做转发任务数
26 | this.userPoint = null
27 |
28 | }
29 | async main() {
30 | $.log(`===== 开始第[${this.index}]个账号 =====`)
31 | await this.user_info();
32 | if (this.ckStatus) {
33 | await this.addSign()
34 |
35 | }
36 |
37 | }
38 |
39 |
40 | async addSign() {
41 | try {
42 | let options = {
43 | fn: "签到",
44 | method: "get",
45 | url: `https://lqdm-app.dflzm.com/customer/app-vip-user/exterior/user/task/signIn?isReSign=0`,
46 | }
47 | options.headers = this.get_headers(options.method, options.url)
48 | let { body: result } = await $.httpRequest(options);
49 | //console.log(options);
50 | //console.log(result);
51 | if (result.code == 0) {
52 | $.log(`✅[${options.fn}]成功🎉`)
53 | } else {
54 | console.log(`❌[${options.fn}]失败`);
55 | console.log(JSON.stringify(result));
56 | }
57 | } catch (e) {
58 | console.log(e);
59 | }
60 | }
61 |
62 | async user_info() {
63 | try {
64 | let options = {
65 | fn: "信息查询",
66 | method: "get",
67 | url: `https://lqdm-app.dflzm.com/customer/app-vip-user/exterior/user/getMe`,
68 | }
69 | options.headers = this.get_headers(options.method, options.url)
70 | let { body: result } = await $.httpRequest(options);
71 | //console.log(options);
72 | //console.log(result);
73 | if (result.code == 0) {
74 | //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`);
75 | $.log(`✅[${result.data.nickname}][${result.data.phone}][${result.data.id}]当前积分[${result.data.integral}]🎉`)
76 | this.ckStatus = true;
77 | } else {
78 | console.log(`❌[UserInfo]查询: 失败`);
79 | this.ckStatus = false;
80 | console.log(result);
81 | }
82 | } catch (e) {
83 | console.log(e);
84 | }
85 | }
86 |
87 |
88 |
89 |
90 | sha256(str) {
91 | const crypto = require("crypto");
92 | return crypto.createHash("sha256").update(str).digest("hex");
93 |
94 | }
95 | get_headers(method, url, body = "") {
96 | url = url.replace("https://lqdm-app.dflzm.com", "")
97 | let path = url.split('?')[0]
98 | let params
99 | if(url.split('?')[1]){
100 | params = url.split('?')[1].split('&').sort().join("").toLowerCase()
101 | }else{
102 | params = ""
103 | }
104 | method = method.toUpperCase();
105 | let timestamp = new Date().getTime()
106 | const key = `3b8379a44daa6ab982c886d8bcdcc82a`
107 | let str
108 | if (method == "POST") {
109 | str = `${method}${path}ice-auth-appkey:9831532554ice-auth-timestamp:${timestamp}json=${body}${params}${key}`
110 | } else {
111 | str = `${method}${path}ice-auth-appkey:9831532554ice-auth-timestamp:${timestamp}${params}${key}`
112 |
113 | }
114 | //console.log(encodeURIComponent(str))
115 | const sign = this.sha256(encodeURIComponent(str))
116 | return {
117 | "Content-Type": "application/json;charset=UTF-8",
118 | "User-Agent": "okhttp/3.14.9 (Android 10; Xiaomi MI 8 Lite Build/V11.0.2.0.QDTCNXM 3.2.6 40059 release dflqApp)",
119 | "appInfo": JSON.stringify({ "appVersion": "3.2.6", "osVersion": "Android 10", "appType": "Android", "deviceName": "Xiaomi MI 8 Lite", "deviceId": "7ec3eaf292dc3ead268d7335cc308f88@1703156059659" }),
120 | "Cache-Control": "no-cache",
121 | "platform": 2,
122 | "device": "cAndroid",
123 | "deviceSN": "7ec3eaf292dc3ead268d7335cc308f88@1703156059659",
124 | "Cookie": this.ck,
125 | //"userId": "",
126 | "appKey": 9831532554,
127 | "ice-auth-appkey": 9831532554,
128 | "ice-auth-timestamp": timestamp,
129 | "ice-auth-sign": sign,
130 | "Content-Type": "application/json;charset=UTF-8",
131 | "Host": "lqdm-app.dflzm.com",
132 | "Connection": "Keep-Alive",
133 | "Accept-Encoding": "identity"
134 | }
135 | }
136 | get_uuid() {
137 | return 'xxxxxxxx-xxxx-xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
138 | var r = Math.random() * 16 | 0,
139 | v = c == 'x' ? r : (r & 0x3 | 0x8);
140 | return v.toString(16);
141 | });
142 | }
143 | }
144 |
145 | async function start() {
146 | let taskall = [];
147 | for (let user of userList) {
148 | if (user.ckStatus) {
149 | taskall.push(await user.main());
150 | }
151 | }
152 | await Promise.all(taskall);
153 | $.msg($.name, `任务已完成`)
154 | }
155 |
156 | !(async () => {
157 | if (!(await checkEnv())) return;
158 | if (userList.length > 0) {
159 | await start();
160 | }
161 |
162 | await $.sendMsg($.logs.join("\n"))
163 | })()
164 | .catch((e) => console.log(e))
165 | .finally(() => $.done());
166 |
167 | //********************************************************
168 | /**
169 | * 变量检查与处理
170 | * @returns
171 | */
172 | async function checkEnv() {
173 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
174 | if (userCookie) {
175 | let e = envSplitor[0];
176 | for (let o of envSplitor)
177 | if (userCookie.indexOf(o) > -1) {
178 | e = o;
179 | break;
180 | }
181 | for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n));
182 | } else {
183 | console.log("未找到CK");
184 | return;
185 | }
186 | return console.log(`共找到${userList.length}个账号`), true; //true == !0
187 | }
188 |
189 | /////////////////////////////////////////////////////////////////////////////////////
190 | // prettier-ignore
191 | function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.data = null; this.dataFile = "box.dat"; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { if (this.isSurge() || this.isLoon()) { return $persistentStore.read(t) } else if (this.isQuanX()) { return $prefs.valueForKey(t) } else if (this.isNode()) { this.data = this.loaddata(); return this.data[t] } else { return this.data && this.data[t] || null } } setval(t, s) { if (this.isSurge() || this.isLoon()) { return $persistentStore.write(t, s) } else if (this.isQuanX()) { return $prefs.setValueForKey(t, s) } else if (this.isNode()) { this.data = this.loaddata(); this.data[s] = t; this.writedata(); return true } else { return this.data && this.data[s] || null } } initGotEnv(t) { this.got = this.got ? this.got : require("got"); this.cktough = this.cktough ? this.cktough : require("tough-cookie"); this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); if (t) { t.headers = t.headers ? t.headers : {}; if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { t.cookieJar = this.ckjar } } } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`).join('&') } isJSONString(str) { try { var obj = JSON.parse(str); if (typeof obj == 'object' && obj) { return true } else { return false } } catch (e) { return false } } isJson(obj) { var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if ($.isNode()) { await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } async httpRequest(options) { const t = { ...options }; if (!t.headers) { t.headers = {} } if (t.params) { t.url += '?' + this.queryStr(t.params) } t.method = t.method.toLowerCase(); if (t.method === 'get') { delete t.headers['Content-Type']; delete t.headers['Content-Length']; delete t["body"] } if (t.method === 'post') { let contentType; if (!t.body) { t.body = "" } else { if (typeof t.body == "string") { if (this.isJSONString(t.body)) { contentType = 'application/json' } else { contentType = 'application/x-www-form-urlencoded' } } else if (this.isJson(t.body)) { t.body = JSON.stringify(t.body); contentType = 'application/json' } } if (!t.headers['Content-Type']) { t.headers['Content-Type'] = contentType } delete t.headers['Content-Length'] } if (this.isNode()) { this.initGotEnv(t); let httpResult = await this.got(t); if (this.isJSONString(httpResult.body)) { httpResult.body = JSON.parse(httpResult.body) } return httpResult } } randomNumber(length) { const characters = '0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } randomString(length) { const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } timeStamp() { return new Date().getTime() } uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) }
192 |
--------------------------------------------------------------------------------
/dydd.py:
--------------------------------------------------------------------------------
1 |
2 | #环境变量 dydd
3 | import os
4 | import requests
5 | import time
6 | import hashlib
7 |
8 | # 获取青龙面板环境变量 dydd
9 | dydd = os.environ.get('dydd', '')
10 |
11 | # 按换行符分割账号,并过滤空行
12 | accounts = [line.strip() for line in dydd.strip().split('\n') if line.strip()]
13 |
14 | url = "https://app2.d1ev.com/api/user/add-integral"
15 |
16 | # 公共参数
17 | params_base = {
18 | 'app_id': "d1ev_app",
19 | 'appName': "第一电动",
20 | 'os': "android",
21 | 'osVer': "9",
22 | 'vName': "2.5.6",
23 | 'vCode': "20506"
24 | }
25 |
26 | headers = {
27 | 'User-Agent': "Dalvik/2.1.0 (Linux; U; Android 9; PCRT00 Build/PQ3A.190605.06201646)",
28 | 'Connection': "Keep-Alive",
29 | 'Accept-Encoding': "gzip",
30 | 'TE': "gzip, deflate; q=0.5"
31 | }
32 |
33 | # 定义任务列表,每个任务包括任务类型和执行次数
34 | tasks = [
35 | {'type': 11, 'name': '签到', 'count': 1},
36 | {'type': 3, 'name': '分享', 'count': 3},
37 | {'type': 5, 'name': '点赞', 'count': 5},
38 | {'type': 2, 'name': '阅读', 'count': 1}
39 | ]
40 |
41 | for account in accounts:
42 | # 分割账号为 uid 和 token
43 | parts = account.split('#')
44 | if len(parts) != 2:
45 | print(f"跳过无效格式账号: {account}")
46 | continue
47 |
48 | uid, token = parts
49 |
50 | # 生成当前时间戳
51 | current_timestamp = str(int(time.time()))
52 |
53 | for task in tasks:
54 | task_type = task['type']
55 | task_name = task['name']
56 | task_count = task['count']
57 |
58 | for _ in range(task_count):
59 | # 构造签名字符串
60 | sign_str = f"OMKCy2UxZwn8e4Ak{params_base['appName']}{params_base['app_id']}{params_base['os']}{params_base['osVer']}{current_timestamp}{token}{task_type}{uid}{params_base['vCode']}{params_base['vName']}"
61 |
62 | # 计算 MD5 签名
63 | sign = hashlib.md5(sign_str.encode('utf-8')).hexdigest()
64 |
65 | # 定义带有动态值的参数
66 | params = {
67 | 'timestamp': current_timestamp,
68 | 'token': token,
69 | 'uid': uid,
70 | 'type': task_type,
71 | 'sign': sign.upper(),
72 | **params_base
73 | }
74 |
75 | try:
76 | # 发送 GET 请求
77 | response = requests.get(url, params=params, headers=headers)
78 | response.raise_for_status() # 如果请求失败,则抛出异常
79 |
80 | # 打印任务执行结果
81 | print(f"账号: {uid}, 任务: {task_name}, 响应: {response.text}")
82 | except requests.exceptions.RequestException as e:
83 | print(f"账号: {uid}, 任务: {task_name}, 请求失败: {e}")
84 |
85 | # 任务间隔5秒
86 | time.sleep(5)
87 |
88 | # 任务类型间隔10秒
89 | time.sleep(10)
90 |
91 |
--------------------------------------------------------------------------------
/enshan.py:
--------------------------------------------------------------------------------
1 |
2 | import json
3 | import os
4 | import re
5 |
6 | import requests
7 | import urllib3
8 |
9 | from dailycheckin import CheckIn
10 |
11 | urllib3.disable_warnings()
12 |
13 |
14 | class EnShan(CheckIn):
15 | name = "恩山无线论坛"
16 |
17 | def __init__(self, check_item):
18 | self.check_item = check_item
19 |
20 | @staticmethod
21 | def sign(cookie):
22 | msg = []
23 | headers = {
24 | "User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36",
25 | "Cookie": cookie,
26 | }
27 | response = requests.get(
28 | url="https://www.right.com.cn/FORUM/home.php?mod=spacecp&ac=credit&showcredit=1",
29 | headers=headers,
30 | verify=False,
31 | )
32 | try:
33 | coin = re.findall("恩山币: (.*?) ", response.text)[0]
34 | point = re.findall("积分: (.*?) {
120 | const value = obj[key];
121 | if (value !== null && typeof value !== 'object') {
122 | queryString += `&${key}=${value}`;
123 | }
124 | });
125 | }
126 | return queryString.slice(1);
127 | }
128 | return convertObjectToQueryString(e)
129 | }
130 | function v(e) {
131 | const crypto = require("crypto")
132 | return crypto.createHash("md5").update(e).digest("hex")
133 | }
134 | const g = {
135 | traceid: v((new Date).getTime().toString() + Math.random().toString()),
136 | noncestr: Math.random().toString().slice(2, 10),
137 | timestamp: Date.now(),
138 | platform: "h5",
139 | did: this.did,
140 | version: "1.0.0",
141 | finger: this.finger,
142 | token: this.token,
143 | oaid: this.oaid,
144 | }
145 | const c = "\u7c89\u8c61\u597d\u725b\u903ca8c19d8267527ea4c7d2f011acf7766f"
146 | let s = method === "get" ? void 0:JSON.parse(body)
147 | let e = void 0 === s ? {} : s
148 | g.sign = v(re(e) + re(g) + c)
149 | let headers = {
150 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36 AgentWeb/5.0.0 UCBrowser/11.6.4.950',
151 | 'Accept': 'application/json, text/plain, */*',
152 | 'Accept-Encoding': 'gzip, deflate',
153 | 'Content-Type': 'application/json',
154 | 'origin': 'https://m.fenxianglife.com',
155 | 'sec-fetch-dest': 'empty',
156 | 'x-requested-with': 'com.n_add.android',
157 | 'sec-fetch-site': 'same-site',
158 | 'sec-fetch-mode': 'cors',
159 | 'referer': 'https://m.fenxianglife.com/h5-lottery/index.html?hideBack=1&sourceType=lottery_tab&token=030e7e9158af06dea2b3d0175a471ada&AppToken=96e06ae9f3cab6784de443015b8d9ad8&uid=515226607&v=5.4.3&did=njia992631e6-b9b2-4383-b67c-86b5d0fe818a&level=1&platform=android×tamp=1717426249&channel=xiaomi&traFromId=23192687628924991393323633117947',
160 | 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
161 | "Content-Type":"application/json"
162 | }
163 | Object.assign(headers, g)
164 | //console.log(headers)
165 | const reqeuestOptions = {
166 | url: url,
167 | method: method,
168 | headers: headers,
169 | body:body
170 | }
171 | let { body: result } = await $.httpRequest(reqeuestOptions)
172 | return result
173 | }
174 | }
175 |
176 |
177 |
178 | !(async () => {
179 | console.log(`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
180 | new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000
181 | ).toLocaleString()} \n==================================================`);
182 | if (!(await checkEnv())) return;
183 | if (userList.length > 0) {
184 | let taskall = [];
185 | for (let user of userList) {
186 | if (user.ckStatus) {
187 | taskall.push(user.main());
188 | }
189 | }
190 | await Promise.all(taskall);
191 | }
192 | await $.sendMsg($.logs.join("\n"))
193 | })()
194 | .catch((e) => console.log(e))
195 | .finally(() => $.done());
196 |
197 | //********************************************************
198 | /**
199 | * 变量检查与处理
200 | * @returns
201 | */
202 | async function checkEnv() {
203 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "";
204 | if (userCookie) {
205 | let e = envSplitor[0];
206 | for (let o of envSplitor)
207 | if (userCookie.indexOf(o) > -1) {
208 | e = o;
209 | break;
210 | }
211 | for (let n of userCookie.split(e)) n && userList.push(new Task(n));
212 | } else {
213 | console.log(`未找到CK【${ckName}】`);
214 | return;
215 | }
216 | return console.log(`共找到${userList.length}个账号`), true; //true == !0
217 | }
218 | //Env Api =============================
219 | /*
220 | * @modifyAuthor @smallfawn
221 | * @modifyTime 2024-05-01
222 | * @modifyInfo 抽离操作文件的函数
223 | */
224 | function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } initRequestEnv(t) { try { require.resolve("got") && ((this.requset = require("got")), (this.requestModule = "got")) } catch (e) { } try { require.resolve("axios") && ((this.requset = require("axios")), (this.requestModule = "axios")) } catch (e) { } this.cktough = this.cktough ? this.cktough : require("tough-cookie"); this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); if (t) { t.headers = t.headers ? t.headers : {}; if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { t.cookieJar = this.ckjar } } } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } async httpRequest(options) { let t = { ...options }; t.headers = t.headers || {}; if (t.params) { t.url += "?" + this.queryStr(t.params) } t.method = t.method.toLowerCase(); if (t.method === "get") { delete t.headers["Content-Type"]; delete t.headers["Content-Length"]; delete t.headers["content-type"]; delete t.headers["content-length"]; delete t.body } else if (t.method === "post") { let ContentType; if (!t.body) { t.body = "" } else if (typeof t.body === "string") { ContentType = this.isJSONString(t.body) ? "application/json" : "application/x-www-form-urlencoded" } else if (this.isJson(t.body)) { t.body = JSON.stringify(t.body); ContentType = "application/json" } if (!t.headers["Content-Type"] && !t.headers["content-type"]) { t.headers["Content-Type"] = ContentType } } if (this.isNode()) { this.initRequestEnv(t); if (this.requestModule === "axios" && t.method === "post") { t.data = t.body; delete t.body } let httpResult; if (this.requestModule === "got") { httpResult = await this.requset(t); if (this.isJSONString(httpResult.body)) { httpResult.body = JSON.parse(httpResult.body) } } else if (this.requestModule === "axios") { httpResult = await this.requset(t); httpResult.body = httpResult.data } return httpResult } if (this.isQuanX()) { t.method = t.method.toUpperCase(); return new Promise((resolve, reject) => { $task.fetch(t).then((response) => { if (this.isJSONString(response.body)) { response.body = JSON.parse(response.body) } resolve(response) }) }) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } timeStamp() { return new Date().getTime() } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ["", "==============📣系统通知📣=============="]; logs.push(t); e ? logs.push(e) : ""; i ? logs.push(i) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
225 | function Bucket() { return new (class { constructor(fileName) { this.fileName = fileName; this.ensureFileExists(); this.data = this.readFile() } ensureFileExists() { this.fs ? this.fs : (this.fs = require("fs")); this.path ? this.path : (this.path = require("path")); this.filePath = this.path.join(__dirname, this.fileName); if (!this.fs.existsSync(this.filePath)) { this.fs.writeFileSync(this.filePath, "{}") } } readFile() { try { const data = this.fs.readFileSync(this.filePath, "utf-8"); return JSON.parse(data) } catch (error) { console.error(`Error reading file:${error}`); return {} } } writeFile() { try { this.fs.writeFileSync(this.filePath, JSON.stringify(this.data, null, 2)) } catch (error) { } } set(key, value) { this.data[key] = value; this.writeFile() } get(key) { return this.data[key] } })() }
226 |
--------------------------------------------------------------------------------
/gujinggongjiu.js:
--------------------------------------------------------------------------------
1 | /*
2 | ------------------------------------------
3 | @Date: 2024.08.01
4 | @Description: 古井贡酒会员中心小程序
5 | ------------------------------------------
6 | 变量名 gujing
7 | [Script]
8 | http-response
9 |
10 | [MITM]
11 | hostname =
12 |
13 |
14 | const $ = new Env("古井贡酒会员中心小程序");
15 | let ckName = `gujing`;
16 | let userCookie = checkEnv(
17 | ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
18 | );
19 | const notify = $.isNode() ? require("./sendNotify") : "";
20 |
21 | !(async () => {
22 | console.log(
23 | `==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
24 | new Date().getTime() +
25 | new Date().getTimezoneOffset() * 60 * 1000 +
26 | 8 * 60 * 60 * 1000
27 | ).toLocaleString()} \n==================================================`
28 | );
29 | //console.log(userCookie)
30 | if (!userCookie?.length) return console.log(`没有找到CK哦`);
31 | let index = 1;
32 | let strSplitor = "#";
33 |
34 | for (let user of userCookie) {
35 | $.log(`\n🚀 user:【${index}】 start work\n`);
36 | index++
37 | $.token = user
38 | $.ckStatus = true;
39 | await search()
40 | }
41 |
42 | await $.sendMsg($.logs.join("\n"));
43 | })()
44 | .catch((e) => console.log(e))
45 | .finally(() => $.done());
46 | async function search() {
47 | let data = JSON.stringify({
48 | "activityId": "110001000",
49 | "preview": false
50 | });
51 |
52 | let config = {
53 | method: 'POST',
54 | url: 'https://scrm.gujing.com/gujing_scrm/wxclient/mkt/activities/sign:search',
55 | headers: {
56 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxba9855bdb1a45c8e',
57 | 'Accept': 'application/json, text/plain, */*',
58 | 'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"',
59 | 'Content-Type': 'application/json;charset=UTF-8',
60 | 'sec-ch-ua-mobile': '?1',
61 | 'Access-Token': $.token,
62 | 'sec-ch-ua-platform': '"Android"',
63 | 'Origin': 'https://scrm.gujing.com',
64 | 'X-Requested-With': 'com.tencent.mm',
65 | 'Sec-Fetch-Site': 'same-origin',
66 | 'Sec-Fetch-Mode': 'cors',
67 | 'Sec-Fetch-Dest': 'empty',
68 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
69 |
70 | },
71 | data: data
72 | };
73 | let { data: result } = await Request(config)
74 | if (result?.code == 200) {
75 | if (result.content.signed !== 1) {
76 | $.log(`未签到 ===> 签到ing`)
77 | await signIn()
78 | } else {
79 | $.log(`已签到 ===> 什么都不做`)
80 | }
81 | } else {
82 | $.log(`签到查询失败 [${JSON.stringify(result)}]`)
83 | }
84 | }
85 | async function signIn() {
86 | let data = JSON.stringify({
87 | "activityId": "110001000",
88 | "preview": false
89 | });
90 |
91 | let config = {
92 | method: 'POST',
93 | url: 'https://scrm.gujing.com/gujing_scrm/wxclient/mkt/activities/sign:search',
94 | headers: {
95 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxba9855bdb1a45c8e',
96 | 'Accept': 'application/json, text/plain, */*',
97 | 'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"',
98 | 'Content-Type': 'application/json;charset=UTF-8',
99 | 'sec-ch-ua-mobile': '?1',
100 | 'Access-Token': $.token,
101 | 'sec-ch-ua-platform': '"Android"',
102 | 'Origin': 'https://scrm.gujing.com',
103 | 'X-Requested-With': 'com.tencent.mm',
104 | 'Sec-Fetch-Site': 'same-origin',
105 | 'Sec-Fetch-Mode': 'cors',
106 | 'Sec-Fetch-Dest': 'empty',
107 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
108 | },
109 | data: data
110 | };
111 | let { data: result } = await Request(config)
112 | if (result?.code == 200) {
113 | $.log(`签到成功 获得积分[${result.content.point}]`)
114 | } else {
115 | $.log(`签到失败 [${result.chnDesc}]`)
116 | }
117 | }
118 |
119 | function checkEnv(userCookie) {
120 | const envSplitor = ["&", "\n"];
121 | //console.log(userCookie);
122 | let userList = userCookie
123 | .split(envSplitor.find((o) => userCookie.includes(o)) || "&")
124 | .filter((n) => n);
125 | console.log(`共找到${userList.length}个账号`);
126 | return userList;
127 | }
128 | // prettier-ignore
129 | function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) { new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))) } return t } msg(title = t, subtitle = "", body = "", options) { const formatOptions = (options) => { if (!options) { return options } else if (typeof options === "string") { if (this.isQuanX()) { return { "open-url": options } } else { return undefined } } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) { if (this.isQuanX()) { return options } else { return undefined } } else { return undefined } }; if (!this.isMute) { if (this.isQuanX()) { $notify(title, subtitle, body, formatOptions(options)) } } let logs = ["", "==============📣系统通知📣=============="]; logs.push(title); subtitle ? logs.push(subtitle) : ""; body ? logs.push(body) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isQuanX(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) }
130 |
131 | async function Request(options) {
132 | if ($.isNode()) {
133 | const axios = require("axios");
134 | Request = async (options) => {
135 | try {
136 | return await axios.request(options);
137 | } catch (error) {
138 | return error && error.error ? error.error : "请求失败";
139 | }
140 | };
141 | }
142 | if ($.isQuanX()) {
143 | Request = async (options) => {
144 | try {
145 | return await $task.fetch(options);
146 | } catch (error) {
147 | return error && error.error ? error.error : "请求失败";
148 | }
149 | };
150 | }
151 | return await Request(options);
152 | }
153 |
--------------------------------------------------------------------------------
/hl.js:
--------------------------------------------------------------------------------
1 | /*
2 | 软件名称:哈啰
3 | 版本:0.0.4
4 | 抓包位置:首页 福利中心 查看更多 抓包 api.hellobike.com/api?urser 请求里面的 TOKEN
5 | 定时:一天一次
6 | 变量名:hlToken
7 | 多账号用&隔开
8 | export hlToken="23fexxxxxxxxxxxxxxxxxxxxxxxxxxxx"
9 | 奖励:奖励金可换手机话费抵用券,便宜充话费
10 | */
11 | const _0x389411=_0x4d39;(function(_0x7b3aed,_0x2ef8a3){const _0x219594=_0x4d39,_0x5adf9=_0x7b3aed();while(!![]){try{const _0x390367=-parseInt(_0x219594(0x1e2))/0x1*(-parseInt(_0x219594(0x1e0))/0x2)+-parseInt(_0x219594(0x1ec))/0x3*(parseInt(_0x219594(0x1d8))/0x4)+-parseInt(_0x219594(0x1eb))/0x5+-parseInt(_0x219594(0x1e8))/0x6*(-parseInt(_0x219594(0x1dc))/0x7)+-parseInt(_0x219594(0x1f4))/0x8+parseInt(_0x219594(0x1db))/0x9+parseInt(_0x219594(0x1d5))/0xa;if(_0x390367===_0x2ef8a3)break;else _0x5adf9['push'](_0x5adf9['shift']());}catch(_0x480ab0){_0x5adf9['push'](_0x5adf9['shift']());}}}(_0xc102,0xce09a));const axios=require(_0x389411(0x1d2));function _0x4d39(_0x3eb44c,_0x545b67){const _0xc10201=_0xc102();return _0x4d39=function(_0x4d3914,_0x59f643){_0x4d3914=_0x4d3914-0x1d0;let _0xb06f56=_0xc10201[_0x4d3914];return _0xb06f56;},_0x4d39(_0x3eb44c,_0x545b67);}let hlToken=process[_0x389411(0x1f8)][_0x389411(0x1de)];!hlToken&&(console[_0x389411(0x1dd)](_0x389411(0x1f7)),process['exit'](0x1));let tokens=hlToken['includes']('&')?hlToken[_0x389411(0x1f0)]('&'):[hlToken];const SIGN_URL='https://api.hellobike.com/api?common.welfare.signAndRecommend',POINT_URL=_0x389411(0x1ee);async function requestPost(_0x3b1aee,_0x1d60b9,_0x277345){const _0x17f805=_0x389411;try{const _0x5989b2={'User-Agent':'Mozilla/5.0\x20(Windows\x20NT\x2010.0;\x20Mobile)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/96.0.4664.104\x20Mobile\x20Safari/537.36','Content-Type':_0x17f805(0x1d6),'Authorization':_0x277345},_0x44d747=await axios[_0x17f805(0x1d3)](_0x3b1aee,_0x1d60b9,{'headers':_0x5989b2});return _0x44d747[_0x17f805(0x1f5)];}catch(_0xea967c){return console[_0x17f805(0x1ea)](_0x17f805(0x1f1),_0xea967c[_0x17f805(0x1d7)]?_0xea967c[_0x17f805(0x1d7)]['data']:_0xea967c[_0x17f805(0x1ef)]),null;}}async function signIn(_0x34d077,_0x1a938f){const _0x5b299b=_0x389411;console[_0x5b299b(0x1dd)](_0x5b299b(0x1d1)+(_0x1a938f+0x1)+_0x5b299b(0x1fa));const _0x5b52fc={'from':'h5','systemCode':0x3e,'platform':0x4,'version':_0x5b299b(0x1e3),'action':_0x5b299b(0x1da),'token':_0x34d077,'pointType':0x1},_0x4940a9=await requestPost(SIGN_URL,_0x5b52fc,_0x34d077);if(_0x4940a9&&_0x4940a9[_0x5b299b(0x1f5)]){const {bountyCountToday:_0xcd307a,didSignToday:_0x496aca}=_0x4940a9[_0x5b299b(0x1f5)];if(_0xcd307a)return console[_0x5b299b(0x1dd)](_0x5b299b(0x1e1)+(_0x1a938f+0x1)+_0x5b299b(0x1f6)+_0xcd307a),!![];else{if(_0x496aca)return console[_0x5b299b(0x1dd)](_0x5b299b(0x1f2)+(_0x1a938f+0x1)+_0x5b299b(0x1f3)),![];}}return console[_0x5b299b(0x1dd)](_0x5b299b(0x1d0)+(_0x1a938f+0x1)+'\x20签到失败,API\x20返回异常:',JSON['stringify'](_0x4940a9)),![];}async function getRewards(_0x5380f3,_0x1447b8){const _0x2b5d00=_0x389411;console[_0x2b5d00(0x1dd)]('💰\x20查询账号\x20'+(_0x1447b8+0x1)+_0x2b5d00(0x1e6));const _0xfb3730={'from':'h5','systemCode':0x3d,'platform':0x4,'version':_0x2b5d00(0x1e3),'action':_0x2b5d00(0x1e5),'token':_0x5380f3,'pointType':0x1},_0xf366f9=await requestPost(POINT_URL,_0xfb3730,_0x5380f3);if(_0xf366f9&&_0xf366f9[_0x2b5d00(0x1f5)]&&_0xf366f9['data'][_0x2b5d00(0x1e7)]!==undefined){const _0x1af42b=_0xf366f9[_0x2b5d00(0x1f5)][_0x2b5d00(0x1e7)];console[_0x2b5d00(0x1dd)]('🎉\x20账号\x20'+(_0x1447b8+0x1)+_0x2b5d00(0x1ed)+_0x1af42b);}else console['log'](_0x2b5d00(0x1d0)+(_0x1447b8+0x1)+_0x2b5d00(0x1e9),JSON[_0x2b5d00(0x1e4)](_0xf366f9));}function _0xc102(){const _0x252742=['points','24XHUbvN','\x20查询奖励金失败,API\x20返回异常:','error','2254910vgXnXj','3puJyNJ','\x20可用奖励金:','https://api.hellobike.com/api?user.taurus.pointInfo','message','split','❌\x20请求失败:','⚠️\x20账号\x20','\x20今天已经签到过了!','11359680EmTOcz','data','\x20签到成功!获得奖励金\x20+','❌\x20未设置环境变量\x20hlToken,请检查配置!','env','✨✨✨\x20哈啰签到脚本启动\x20✨✨✨','\x20开始签到...','❌\x20账号\x20','\x0a🚀\x20账号\x20','axios','post','\x0a🎉\x20所有账号任务执行完毕!','16508740vGrDBP','application/json','response','893852VWBewm','length','common.welfare.signAndRecommend','342450vfFeXW','2037917SANNdn','log','hlToken','random','2PYLQVJ','✅\x20账号\x20','84887arhOPN','6.46.0','stringify','user.taurus.pointInfo','\x20奖励金...'];_0xc102=function(){return _0x252742;};return _0xc102();}((async()=>{const _0x1c8492=_0x389411;console['log'](_0x1c8492(0x1f9));for(let _0x274007=0x0;_0x274007