├── AiHaiYan.js
├── AiLuQiao.js
├── ApiRequest.py
├── CHERWIN_TOOLS.py
├── Cheryfs.js
├── DaChao.js
├── DuJia.js
├── E览衢江.js
├── HaiXing.js
├── JiaShan.js
├── JingZhou.js
├── OuHai.js
├── PSKJ.js
├── QingDaoNews.js
├── Q必达小程序.py
├── README.md
├── RQSP.js
├── Rokid.js
├── SendNotify.py
├── Utils.js
├── WangChao.js
├── YongPai.js
├── jdd.py
├── k_xxtask.py
├── mytool.py
├── notify.py
├── qcs.js
├── ql.js
├── sendNotify.js
├── sendNotify.py
├── sfsy.py
├── tsthb.py
├── utils.js
├── wxpushNotify.py
├── xinxi.py
├── xzxxn.json
├── 习酒.js
├── 仑传.js
├── 农耙耙.js
├── 券妈妈.js
├── 卡池.js
├── 商战网络.js
├── 太平洋科技.js
├── 太平通.js
├── 好奇车生活.js
├── 小米刷步.py
├── 得无开源.js
├── 悦临平.js
├── 托迈酷客.js
├── 拼多多果园-小程序.js
├── 掌上温岭.js
├── 敢迈健康.js
├── 无锡观察.js
├── 机场签到.py
├── 杰士邦安心福利社.py
├── 泉站定水.py
├── 潇洒桐庐.js
├── 甬派.py
├── 看岱山.js
├── 福田e➕.js
├── 移动云盘.py
├── 粉象生活简单任务.py
├── 联想app乐豆.js
└── 阅龙湾.js
/ApiRequest.py:
--------------------------------------------------------------------------------
1 | import os
2 | import traceback
3 |
4 | import requests
5 | import urllib3
6 |
7 | import mytool
8 | import notify
9 |
10 |
11 | class ApiRequest:
12 | def __init__(self):
13 | urllib3.disable_warnings()
14 | self.sec = requests.session()
15 | self.sec.verify = False
16 | self.sec.trust_env = False
17 | self.sendmsg = ''
18 | self.title = ''
19 |
20 | def send(self):
21 | notify.send(self.title, self.sendmsg)
22 |
23 |
24 | class ApiMain:
25 | def __init__(self, funcName):
26 | self.funcName = funcName
27 | pass
28 |
29 | def run(self, envName, request):
30 | if os.path.exists('debug.py'):
31 | import debug
32 | debug.setDebugEnv()
33 |
34 | if mytool.getlistCk(f'{envName}') is None:
35 | print(f'请检查你的变量名称 {envName} 是否填写正确')
36 | exit(0)
37 | else:
38 | for i in mytool.getlistCk(f'{envName}'):
39 | for func in self.funcName:
40 | try:
41 | getattr(request(i), func)()
42 | except:
43 | traceback.print_exc()
44 | pass
45 |
--------------------------------------------------------------------------------
/CHERWIN_TOOLS.py:
--------------------------------------------------------------------------------
1 | import hashlib
2 | import json
3 | import os
4 | import importlib.util
5 | import random
6 | import string
7 | import subprocess
8 | import sys
9 | import time
10 | import requests
11 | from http import HTTPStatus
12 | from datetime import datetime
13 |
14 | NOW_TOOLS_VERSION = '2024.05.27'
15 | if os.path.isfile('DEV_ENV.py'):
16 | import DEV_ENV
17 |
18 | IS_DEV = True
19 | else:
20 | IS_DEV = False
21 |
22 |
23 | # 尝试导入包
24 | def import_or_install(package_name, import_name=None):
25 | # 如果传入了 import_name,则使用它来检查模块,否则默认与包名相同
26 | import_name = import_name or package_name
27 | try:
28 | # 检查模块是否已安装
29 | package_spec = importlib.util.find_spec(import_name)
30 | if package_spec is None:
31 | print(f"{package_name} 模块未安装. 开始安装...")
32 | subprocess.check_call([sys.executable, '-m', 'pip', 'install', package_name])
33 | print(f"{package_name} 模块安装完成。")
34 | else:
35 | print(f"{package_name} 模块已安装。")
36 | # 尝试导入模块检查是否安装成功
37 | __import__(import_name)
38 | module = importlib.import_module(import_name)
39 | print(f"{import_name} 模块导入成功.")
40 | return module
41 | except ImportError as e:
42 | print(f"无法导入 {import_name} 模块. 错误信息: {e}")
43 | except subprocess.CalledProcessError as e:
44 | print(f"安装 {package_name} 模块时出错. 错误信息: {e}")
45 | except Exception as e:
46 | print(f"处理 {package_name} 模块时发生错误. 错误信息: {e}")
47 |
48 |
49 | def SAVE_INVITE_CODE(file_name, new_data):
50 | # 读取现有JSON文件(如果存在)
51 | try:
52 | with open(file_name, 'r', encoding='utf-8') as file:
53 | data = json.load(file)
54 | except FileNotFoundError:
55 | # 如果文件不存在,创建所需目录并一个新的空JSON文件
56 | directory = os.path.dirname(file_name)
57 | if not os.path.exists(directory):
58 | os.makedirs(directory)
59 | data = {}
60 | # 检查是否已存在相同的键,如果存在,合并数据
61 | for key, value in new_data.items():
62 | if key in data:
63 | # 如果键已存在,将新数据合并到现有数据中
64 | data[key].update(value)
65 | else:
66 | # 如果键不存在,直接插入新数据
67 | data[key] = value
68 | # 将更新后的数据写入JSON文件
69 | with open(file_name, 'w', encoding='utf-8') as file:
70 | json.dump(data, file, indent=4)
71 |
72 |
73 | # 将参数转换为字典
74 | def create_dict_from_string(self, data_string):
75 | params = {}
76 | key_value_pairs = data_string.split(',')
77 | for pair in key_value_pairs:
78 | key, value = pair.split('=')
79 | params[key] = value
80 | return params
81 |
82 |
83 | def compare_versions(local_version, server_version):
84 | local_parts = local_version.split('.') # 将本地版本号拆分成数字部分
85 | server_parts = server_version.split('.') # 将服务器版本号拆分成数字部分
86 | for l, s in zip(local_parts, server_parts):
87 | if int(l) < int(s):
88 | return True
89 | # 当前版本低于服务器版本
90 | elif int(l) > int(s):
91 | return False
92 | # 当前版本高于服务器版本
93 | # 如果上述循环没有返回结果,则表示当前版本与服务器版本的数字部分完全相同
94 | if len(local_parts) < len(server_parts):
95 | return True # 当前版本位数较短,即版本号形如 x.y 比 x.y.z 低
96 | else:
97 | return False # 当前版本与服务器版本相同或更高
98 |
99 |
100 | def CHECK_UPDATE_NEW(local_version, server_version, server_script_url, script_filename, server_version_url=None,
101 | APP_NAME=None):
102 | """
103 | 检查版本并更新
104 |
105 | Args:
106 | local_version (str): 本地版本号
107 | server_version_url (str): 服务器版本文件地址
108 | server_script_url (str): 服务器脚本地址
109 | script_filename (str): 要保存的脚本文件名
110 |
111 | Returns:
112 | bool: 是否进行了更新操作
113 | """
114 | print(f'当前检测:【{script_filename}】')
115 | try:
116 | if server_version_url:
117 | # 获取服务器版本号
118 | response = requests.get(server_version_url, verify=False)
119 | response.raise_for_status() # Raises an HTTPError for bad responses
120 | # print(response.text)
121 | server_version = response.text.strip() # 去除首尾空格
122 | if "code" in server_version:
123 | print('【获取远程版本号失败,设为本地同版本】')
124 | server_version = local_version
125 | if not server_version: server_version = NOW_TOOLS_VERSION
126 | print(f'本地版本:【{local_version}】')
127 | print(f'服务器版本:【{server_version}】')
128 | if compare_versions(local_version, server_version):
129 | # 需要更新,下载服务器脚本
130 | AUTO_UPDATE = os.getenv("SCRIPT_UPDATE", "True").lower() != "false"
131 | # print(AUTO_UPDATE)
132 | if AUTO_UPDATE:
133 | print(">>>>>>>发现新版本的脚本,默认自动更新,准备更新...")
134 | print(">>>>>>>禁用更新请定义变量export SCRIPT_UPDATE = 'False'")
135 | if down_file(script_filename, server_script_url):
136 | print(f'请重新运行新脚本\n')
137 | return True
138 | else:
139 | print(">>>>>>>发现新版本的脚本,您禁用了自动更新,如需启用请删除变量SCRIPT_UPDATE\n")
140 | else:
141 | print(f'无需更新\n')
142 | return False
143 | except requests.exceptions.RequestException as e:
144 | print(f'发生网络错误:{e}')
145 | server_base_url = f"https://py.cherwin.cn/{APP_NAME}/"
146 | server_script_url = f"{server_base_url}{script_filename}"
147 | CHECK_UPDATE_NEW(local_version, server_version, server_script_url, script_filename, APP_NAME=APP_NAME)
148 | except Exception as e:
149 | print(f'发生未知错误:{e}')
150 | return False # 返回 False 表示没有进行更新操作
151 |
152 |
153 | def down_file(filename, file_url):
154 | print(f'开始下载:{filename},下载地址:{file_url}')
155 | try:
156 | response = requests.get(file_url, verify=False, timeout=10)
157 | response.raise_for_status()
158 | with open(filename + '.tmp', 'wb') as f:
159 | f.write(response.content)
160 | print(f'【{filename}】下载完成!')
161 | # 检查临时文件是否存在
162 | temp_filename = filename + '.tmp'
163 | if os.path.exists(temp_filename):
164 | # 删除原有文件
165 | if os.path.exists(filename):
166 | os.remove(filename)
167 | # 重命名临时文件
168 | os.rename(temp_filename, filename)
169 | print(f'【{filename}】重命名成功!')
170 | return True
171 | else:
172 | print(f'【{filename}】临时文件不存在!')
173 | return False
174 | except Exception as e:
175 | print(f'【{filename}】下载失败:{str(e)}')
176 | return False
177 |
178 |
179 | def get_AuthorInviteCode(url):
180 | global AuthorCode
181 | try:
182 | response = requests.get(url, verify=False, timeout=10)
183 | if response.status_code == 200:
184 | content = json.loads(response.text)
185 | AuthorCode = list(content.values())
186 | # print(f'获取到作者邀请码:{AuthorCode}')
187 | return AuthorCode
188 | else:
189 | # print("无法获取文件。状态代码:", response.status_code)
190 | return {}
191 | except Exception as e:
192 | print(f"An error occurred: {e}")
193 | return {}
194 |
195 |
196 | def CHECK_PARAMENTERS(index, input_string, required_parameters):
197 | # required_parameters = ['deviceid', 'jysessionid', 'shopid', 'memberid', 'access_token', 'sign']
198 |
199 | # 记录缺少的参数
200 | missing_parameters = []
201 | # 将输入字符串和参数列表中的所有字符都转换为小写
202 | input_string_lower = input_string.lower()
203 | required_parameters_lower = [param.lower() for param in required_parameters]
204 | # 判断字符串中是否包含所有必需的参数
205 | for param in required_parameters_lower:
206 | if param not in input_string_lower:
207 | missing_parameters.append(param)
208 | if missing_parameters:
209 | print(f"\n第【{index + 1}】个账号,缺少以下参数:【{missing_parameters}】")
210 | return False
211 | else:
212 | print(f"\n第【{index + 1}】个账号,URL包含所有必需的参数,开始执行脚本")
213 | return True
214 |
215 |
216 | def QIANWEN(tongyiSysPromt, content, api_key):
217 | print('开始调用通义千问')
218 | # 检查dashscope库是否已安装
219 | dashscope = import_or_install('dashscope')
220 | if dashscope:
221 | dashscope.api_key = api_key
222 | response = dashscope.Generation.call(
223 | model='qwen-max',
224 | messages=[
225 | {"role": "system",
226 | "content": tongyiSysPromt},
227 | {"role": "user", "content": content}],
228 | seed=1234,
229 | top_p=0.8,
230 | result_format='message',
231 | enable_search=False,
232 | max_tokens=1500,
233 | temperature=1.0,
234 | repetition_penalty=1.0,
235 | )
236 | if response.status_code == HTTPStatus.OK:
237 | # print(response)
238 | video_info = response.output['choices'][0]['message']['content']
239 | print('通义生成【成功】!')
240 | return video_info
241 | else:
242 | print(f"无法解析通义返回的信息:{response}")
243 | return None
244 | else:
245 | print('dashscope 模块无法导入,函数无法执行。')
246 |
247 |
248 | # 取环境变量,并分割
249 | def ENV_SPLIT(input_str):
250 | parts = []
251 | if '&' in input_str:
252 | amp_parts = input_str.split('&')
253 | for part in amp_parts:
254 | if '#' in part:
255 | hash_parts = part.split('#')
256 | for hash_part in hash_parts:
257 | parts.append(hash_part)
258 | else:
259 | parts.append(part)
260 | # print(parts)
261 | return (parts)
262 |
263 | elif '#' in input_str:
264 | hash_parts = input_str.split('#')
265 | # print(hash_parts)
266 | return (hash_parts)
267 | else:
268 | out_str = str(input_str)
269 | # print([out_str])
270 | return ([out_str])
271 |
272 |
273 | # 使用导入的模块进行验证码识别
274 | def CAPCODE(captcha_slider, captcha_bg):
275 | ddddocr = import_or_install('ddddocr')
276 | if ddddocr:
277 | slide = ddddocr.DdddOcr(det=False, ocr=False)
278 | with open(captcha_slider, 'rb') as f:
279 | target_bytes = f.read()
280 | with open(captcha_bg, 'rb') as f:
281 | background_bytes = f.read()
282 | res = slide.slide_match(target_bytes, background_bytes, simple_target=True)
283 | # print(res['target'][0])
284 | # print(type(res['target'][0]))
285 | return res['target'][0]
286 | else:
287 | print('ddddocr 模块无法导入,函数无法执行。')
288 | return False
289 |
290 |
291 | def send_wxpusher(UID, one_msg, APP_NAME, help=False):
292 | WXPUSHER = os.environ.get('WXPUSHER', False)
293 | if WXPUSHER:
294 | if help:
295 | push_res = wxpusher(WXPUSHER, APP_NAME + '互助', one_msg, UID, TIPS_HTML)
296 | else:
297 | push_res = wxpusher(WXPUSHER, APP_NAME, one_msg, UID, TIPS_HTML)
298 | print(push_res)
299 |
300 |
301 | def wxpusher(UID, msg, title, help=False):
302 | """利用 wxpusher 的 web api 发送 json 数据包,实现微信信息的发送"""
303 | WXPUSHER = os.environ.get('WXPUSHER', False)
304 | if WXPUSHER:
305 | if help: title = title + '互助'
306 | print('\n------开始wxpusher推送------')
307 | print(f'标题:【{title}】\n内容:{msg}')
308 | webapi = 'http://wxpusher.zjiecode.com/api/send/message'
309 | msg = msg.replace("\n", "
")
310 | # tips = TIPS_HTML.replace("\n", "
")
311 | data = {
312 | "appToken": WXPUSHER,
313 | "content": f'{title}
{msg}
{TIPS_HTML}',
314 | # "summary": msg[:99], # 该参数可选,默认为 msg 的前10个字符
315 | "summary": title,
316 | "contentType": 2,
317 | "uids": [UID],
318 | "url": "https://gj.cherwin.cn"
319 | }
320 | try:
321 | result = requests.post(url=webapi, json=data)
322 | result.raise_for_status() # 对于非2xx状态码,抛出异常
323 | response_json = result.json()
324 | if response_json["success"]:
325 | return "------消息发送成功------\n"
326 | else:
327 | return f"消息发送失败。错误信息:{response_json['msg']}"
328 | except requests.exceptions.RequestException as e:
329 | return f"发送消息时发生错误:{str(e)}"
330 | except Exception as e:
331 | return f"发生意外错误:{str(e)}"
332 |
333 |
334 | def RESTART_SCRIPT(RESTART_SCRIPT_NAME):
335 | python = sys.executable
336 | os.execl(python, RESTART_SCRIPT_NAME, *sys.argv[1:])
337 |
338 |
339 | def CHECK():
340 | global CHERWIN_SCRIPT_CONFIG
341 | print('>>>>>>>开始获取版本信息...')
342 | baseurl = 'https://py.cherwin.cn/'
343 | TOOLS_NAME = 'CHERWIN_TOOLS.py'
344 | server_script_url = f'https://github.com/CHERWING/CHERWIN_SCRIPTS/raw/main/{TOOLS_NAME}'
345 | try:
346 | response = requests.get(f'{baseurl}CHERWIN_SCRIPT_CONFIG.json', verify=False)
347 | response.encoding = 'utf-8'
348 | # 读取内容
349 | CHERWIN_SCRIPT_CONFIG = response.json()
350 | if 'code' in CHERWIN_SCRIPT_CONFIG:
351 | CHERWIN_SCRIPT_CONFIG = None
352 | TOOLS_VERSION = CHERWIN_SCRIPT_CONFIG.get('TOOLS_VERSION', NOW_TOOLS_VERSION)
353 |
354 | if CHECK_UPDATE_NEW(NOW_TOOLS_VERSION, TOOLS_VERSION, server_script_url, TOOLS_NAME):
355 | print('更新脚本完成')
356 | # print(f'重新检测[{TOOLS_NAME}]版本')
357 | return False
358 | else:
359 | return True
360 | except:
361 | print('获取CHERWIN_SCRIPT_CONFIG.json失败')
362 | return False
363 |
364 |
365 | def GJJJ_SIGN():
366 | app_id = "667516"
367 | app_crypto = "FH3yRrHG2RfexND8"
368 | timestamp = int(time.time() * 1000)
369 | # timestamp = 1715180892075
370 | text = f"{app_id}{app_crypto}{timestamp}"
371 | sign = hashlib.md5(text.encode()).hexdigest()
372 | new_data = {
373 | 'timestamp': str(timestamp),
374 | "sign": sign
375 | }
376 | return new_data
377 |
378 |
379 | def KWW_SIGN(memberId):
380 | timestamp = int(time.time() * 1000)
381 | random_num = random.randint(0, 31)
382 | u = [
383 | "A", "Z", "B", "Y", "C", "X", "D", "T", "E", "S", "F", "R", "G", "Q", "H", "P", "I", "O", "J", "N", "k",
384 | "M", "L", "a", "c", "d", "f", "h", "k", "p", "y", "n"]
385 | r = f"{timestamp}{memberId}{u[random_num]}"
386 | sign = hashlib.md5(r.encode()).hexdigest()
387 | update_headers = {
388 | "user-sign": sign,
389 | "user-paramname": "memberId",
390 | "user-timestamp": str(timestamp),
391 | "user-random": str(random_num)
392 | }
393 | return update_headers
394 |
395 |
396 | def TYQH_SIGN(parameters={}, body=None):
397 | sorted_keys = sorted(parameters.keys())
398 | parameter_strings = []
399 | for key in sorted_keys:
400 | if isinstance(parameters[key], dict):
401 | parameter_strings.append(f"{key}={json.dumps(parameters[key])}")
402 | else:
403 | parameter_strings.append(f"{key}={parameters[key]}")
404 |
405 | current_time = int(datetime.now().timestamp() * 1000)
406 | secret_chars = list('BxzTx45uIGT25TTHIIBU2')
407 | last_three_digits = str(current_time)[-3:]
408 | for digit in last_three_digits:
409 | secret_chars.insert(int(digit), digit)
410 |
411 | secret = hashlib.md5(''.join(secret_chars).encode()).hexdigest()
412 | nonce_str = ''.join(random.choices(string.ascii_letters + string.digits, k=16))
413 |
414 | sign_data = {
415 | 'client_id': 'game',
416 | 'nonstr': nonce_str,
417 | 'timestamp': current_time,
418 | 'body': json.dumps(body) if body else '',
419 | 'query': '&'.join(parameter_strings) if parameter_strings else '',
420 | 'secret': secret
421 | }
422 |
423 | sign_string = '|'.join([str(v) for v in sign_data.values()])
424 | sign = hashlib.md5(sign_string.encode()).hexdigest().upper()
425 | sign_header = {
426 | 'client_id': 'game',
427 | 'timestamp': str(current_time),
428 | 'nonstr': sign_data['nonstr'],
429 | 'sign': sign
430 | }
431 | return sign_header
432 |
433 |
434 | def YDXQ_SIGN():
435 | sign_nonce = "tnFWIEFpVPJkOuNX4zdsKeBEMIakLS1RsnS7cH0Id6MjEEBGO"
436 | n = str(int(time.time()))
437 | # 拼接字符串并使用md5哈希。注意在Python中,需要对字符串编码才能生成哈希。
438 | sign_string = f"sign_{n}_sign{sign_nonce}"
439 | sign_hash = hashlib.md5(sign_string.encode()).hexdigest()
440 | return sign_hash, n
441 |
442 |
443 | def HXEK_SIGN(memberId, appid):
444 | # appid = "wxa1f1fa3785a47c7d"
445 | secret = 'damogic8888'
446 | # 获取GMT+8的当前时间戳
447 | timestamp = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
448 | # timestamp = '2024-05-22 16:07:54'
449 | # 生成随机数
450 | random_int = random.randint(1000000, 9999999)
451 | # random_int = 4270745
452 | # 构建待加密字符串
453 | raw_string = f"timestamp={timestamp}transId={appid}{timestamp}secret={secret}random={random_int}memberId={memberId}"
454 | # 使用MD5进行加密
455 | md5_hash = hashlib.md5(raw_string.encode())
456 | sign = md5_hash.hexdigest()
457 | return sign, random_int, timestamp
458 |
459 |
460 | def KPL_SIGN(url, params):
461 | secret_key = "d19b9f22f5aac41ac0b56a1947f82bce"
462 | # 提取URL路径(去掉域名部分)
463 | url_path = url.replace("https://app.tv.kohesport.qq.com", "")
464 | # 如果params是对象,转换为JSON字符串
465 | if isinstance(params, dict):
466 | params_str = json.dumps(params, separators=(',', ':'))
467 | else:
468 | params_str = params
469 | # 拼接路径、参数和密钥
470 | string_to_hash = f"{url_path}{params_str}{secret_key}"
471 | # 计算SHA256哈希值
472 | signature = hashlib.sha256(string_to_hash.encode('utf-8')).hexdigest()
473 | sign_header = {
474 | "X-TGATV-SignatureMethod": "sha256",
475 | "X-TGATV-SignatureVersion": "3",
476 | "X-TGATV-Signature": signature
477 | }
478 | return sign_header
479 |
480 | def get_ip():
481 | response = requests.get('https://cdn.jsdelivr.net/gh/parserpp/ip_ports/proxyinfo.json',verify=False)
482 | # 使用正则表达式提取 IP 地址和端口号
483 | data = response.text
484 | lines = data.strip().split('\n')
485 | # json_objects = [json.loads(line) for line in lines]
486 | json_objects = [json.loads(line) for line in lines if json.loads(line)["country"] == "CN"]
487 | # json_array = json.dumps(json_objects, indent=4)
488 | if json_objects:
489 | selected = random.choice(json_objects)
490 | result = f"{selected['type']}://{selected['host']}:{selected['port']}"
491 |
492 | proxies = {
493 | selected['type']: result,
494 | }
495 | print(f"当前代理:{result}")
496 | return proxies
497 | else:
498 | print("没匹配到CN的ip")
499 | return None
500 |
501 | def main(APP_NAME, local_script_name, ENV_NAME, local_version, need_invite=False):
502 | global APP_INFO, TIPS, TIPS_HTML
503 | git_url = f'https://github.com/CHERWING/CHERWIN_SCRIPTS/raw/main/{local_script_name}'
504 | if CHECK():
505 | APP_INFO = CHERWIN_SCRIPT_CONFIG.get("APP_CONFIG", {}).get(ENV_NAME, {})
506 | # print(APP_INFO)
507 | server_version = APP_INFO.get('NEW_VERSION', '')
508 | if CHECK_UPDATE_NEW(local_version, server_version, git_url, local_script_name, APP_NAME=APP_NAME):
509 | print('更新成功,请重新运行脚本!')
510 |
511 | if not APP_INFO.get('ENABLE', False) and not IS_DEV:
512 | print('当前脚本未开放')
513 | exit()
514 | TIPS = APP_INFO.get('NTC', '') if APP_INFO.get('NTC', '') else CHERWIN_SCRIPT_CONFIG.get('GLOBAL_NTC', '')
515 | TIPS_HTML = APP_INFO.get('NTC', '') if APP_INFO.get('NTC', '') else CHERWIN_SCRIPT_CONFIG.get('GLOBAL_NTC_HTML','')
516 | ENV = os.environ.get(ENV_NAME)
517 | if need_invite:
518 | AuthorCode = get_AuthorInviteCode(f'https://yhsh.ziyuand.cn/{ENV_NAME}_INVITE_CODE.json')
519 | else:
520 | AuthorCode = ''
521 | return ENV, APP_INFO, TIPS, TIPS_HTML, AuthorCode
522 | else:
523 | exit()
524 |
525 |
526 | if __name__ == '__main__':
527 | print(NOW_TOOLS_VERSION)
528 |
--------------------------------------------------------------------------------
/PSKJ.js:
--------------------------------------------------------------------------------
1 | /**
2 | * cron "33 2,12,20 * * *" PSKJ.js
3 | * export PSKJ='[{"id": "1", "token": "1"},{"id": "2", "token": "2"}]'
4 | */
5 | const $ = new Env('攀升科技+')
6 | const PSKJ = ($.isNode() ? JSON.parse(process.env.PSKJ) : $.getjson("PSKJ")) || [];
7 | let token = ''
8 | let notice = ''
9 | !(async () => {
10 | if (typeof $request != "undefined") {
11 | await getCookie();
12 | } else {
13 | await main();
14 | }
15 | })().catch((e) => {$.log(e)}).finally(() => {$.done({});});
16 |
17 | async function main() {
18 | console.log('作者:@xzxxn777\n频道:https://t.me/xzxxn777\n群组:https://t.me/xzxxn7777\n自用机场推荐:https://xn--diqv0fut7b.com\n')
19 | for (const item of PSKJ) {
20 | id = item.id;
21 | token = item.token;
22 | console.log(`用户:${id}开始任务`)
23 | console.log('开始签到')
24 | let sign = await commonGet('/v2.member.score_shop/signSub')
25 | if (sign.status == 10) {
26 | await sendMsg(`用户:${id}\ntoken已过期,请重新获取`);
27 | continue
28 | }
29 | if (sign.status == 0) {
30 | let signPage = await commonGet(`/v2.member.score_shop/signPage?yearMonth=${getCurrentMonth}`)
31 | console.log(`签到成功,获得:${signPage.data.nowDaySignRecord}积分`)
32 | } else {
33 | console.log(sign.error)
34 | }
35 | console.log("————————————")
36 | console.log("新人抽奖")
37 | let draw = await commonGet('/v2/member/draw')
38 | for (let i = 0; i < draw.data; i++) {
39 | let drawrecord = await commonPost(`/v2/member/drawrecord`,{"rule_id":1})
40 | console.log(`抽奖获得:${drawrecord.data.name}`)
41 | }
42 | console.log("————————————")
43 | console.log("查询积分")
44 | let home = await commonGet('/v2.member.score_shop/home')
45 | console.log(`拥有积分:${home.data.score_val}\n`)
46 | notice += `用户:${id} 拥有积分: ${home.data.score_val}\n`
47 | }
48 | if (notice) {
49 | await sendMsg(notice);
50 | }
51 | }
52 |
53 | async function getCookie() {
54 | const token = $request.headers["token"] || $request.headers["Token"];
55 | if (!token) {
56 | return
57 | }
58 | const body = $.toObj($response.body);
59 | if (!body.data || !body.data.member_id) {
60 | return
61 | }
62 | const id = body.data.member_id;
63 | const newData = {"id": id, "token": token};
64 | const index = PSKJ.findIndex(e => e.id == newData.id);
65 | if (index !== -1) {
66 | if (PSKJ[index].token == newData.token) {
67 | return
68 | } else {
69 | PSKJ[index] = newData;
70 | console.log(newData.token)
71 | $.msg($.name, `🎉用户${newData.id}更新token成功!`, ``);
72 | }
73 | } else {
74 | PSKJ.push(newData)
75 | console.log(newData.token)
76 | $.msg($.name, `🎉新增用户${newData.id}成功!`, ``);
77 | }
78 | $.setjson(PSKJ, "PSKJ");
79 | }
80 |
81 | async function commonPost(url,body) {
82 | return new Promise(resolve => {
83 | const options = {
84 | url: `https://psjia.ipason.com/api${url}`,
85 | headers : {
86 | 'content-type': 'application/json',
87 | 'xweb_xhr': '1',
88 | 'token': token,
89 | 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/6.8.0(0x16080000) NetType/WIFI MiniProgramEnv/Mac MacWechat/WMPF MacWechat/3.8.7(0x13080712) XWEB/1191',
90 | 'accept': '*/*',
91 | 'Sec-Fetch-Site': 'cross-site',
92 | 'Sec-Fetch-Mode': 'cors',
93 | 'Sec-Fetch-Dest': 'empty',
94 | 'Referer': `https://servicewechat.com/wxb0cd377dac079028/18/page-frame.html`,
95 | 'Accept-Encoding': 'gzip, deflate, br',
96 | 'Accept-Language': 'zh-CN,zh;q=0.9',
97 | },
98 | body: JSON.stringify(body)
99 | }
100 | $.post(options, async (err, resp, data) => {
101 | try {
102 | if (err) {
103 | console.log(`${JSON.stringify(err)}`)
104 | console.log(`${$.name} API请求失败,请检查网路重试`)
105 | } else {
106 | await $.wait(2000)
107 | resolve(JSON.parse(data));
108 | }
109 | } catch (e) {
110 | $.logErr(e, resp)
111 | } finally {
112 | resolve();
113 | }
114 | })
115 | })
116 | }
117 |
118 | async function commonGet(url) {
119 | return new Promise(resolve => {
120 | const options = {
121 | url: `https://psjia.ipason.com/api${url}`,
122 | headers : {
123 | 'content-type': 'application/json',
124 | 'xweb_xhr': '1',
125 | 'token': token,
126 | 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/6.8.0(0x16080000) NetType/WIFI MiniProgramEnv/Mac MacWechat/WMPF MacWechat/3.8.7(0x13080712) XWEB/1191',
127 | 'accept': '*/*',
128 | 'Sec-Fetch-Site': 'cross-site',
129 | 'Sec-Fetch-Mode': 'cors',
130 | 'Sec-Fetch-Dest': 'empty',
131 | 'Referer': `https://servicewechat.com/wxb0cd377dac079028/18/page-frame.html`,
132 | 'Accept-Encoding': 'gzip, deflate, br',
133 | 'Accept-Language': 'zh-CN,zh;q=0.9',
134 | }
135 | }
136 | $.get(options, async (err, resp, data) => {
137 | try {
138 | if (err) {
139 | console.log(`${JSON.stringify(err)}`)
140 | console.log(`${$.name} API请求失败,请检查网路重试`)
141 | } else {
142 | await $.wait(2000)
143 | resolve(JSON.parse(data));
144 | }
145 | } catch (e) {
146 | $.logErr(e, resp)
147 | } finally {
148 | resolve();
149 | }
150 | })
151 | })
152 | }
153 |
154 | function getCurrentMonth() {
155 | const currentDate = new Date();
156 | const year = currentDate.getFullYear();
157 | const month = String(currentDate.getMonth() + 1).padStart(2, '0');
158 | return `${year}-${month}`;
159 | }
160 |
161 | async function sendMsg(message) {
162 | if ($.isNode()) {
163 | let notify = ''
164 | try {
165 | notify = require('./sendNotify');
166 | } catch (e) {
167 | notify = require("../sendNotify");
168 | }
169 | await notify.sendNotify($.name, message);
170 | } else {
171 | $.msg($.name, '', message)
172 | }
173 | }
174 |
175 | // prettier-ignore
176 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise(((e,i)=>{s.call(this,t,((t,s,o)=>{t?i(t):e(s)}))}))}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise((e=>{this.get({url:t},((t,s,i)=>e(i)))}))}runScript(t,e){return new Promise((s=>{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=e&&e.timeout?e.timeout:o;const[r,a]=i.split("@"),n={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":r,Accept:"*/*"},timeout:o};this.post(n,((t,e,i)=>s(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),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;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),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),o=JSON.stringify(this.data);s?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(e,o):this.fs.writeFileSync(t,o)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return s;return o}lodash_set(t,e,s){return Object(t)!==t||(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce(((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{}),t)[e[e.length-1]]=s),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),o=s?this.getval(s):"";if(o)try{const t=JSON.parse(o);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(e),r=this.getval(i),a=i?"null"===r?null:r||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,o,t),s=this.setval(JSON.stringify(e),i)}catch(e){const r={};this.lodash_set(r,o,t),s=this.setval(JSON.stringify(r),i)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return this.data&&this.data[e]||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:{},t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.cookie&&void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar)))}get(t,e=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQuanX()&&(t.opts?t.opts.redirection=!1:t.opts={redirection:!1})),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,((t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,i)}));break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then((t=>{const{statusCode:s,statusCode:i,headers:o,body:r,bodyBytes:a}=t;e(null,{status:s,statusCode:i,headers:o,body:r,bodyBytes:a},r,a)}),(t=>e(t&&t.error||"UndefinedError")));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",((t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}})).then((t=>{const{statusCode:i,statusCode:o,headers:r,rawBody:a}=t,n=s.decode(a,this.encoding);e(null,{status:i,statusCode:o,headers:r,rawBody:a,body:n},n)}),(t=>{const{message:i,response:o}=t;e(i,o,o&&s.decode(o.rawBody,this.encoding))}));break}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQuanX()&&(t.opts?t.opts.redirection=!1:t.opts={redirection:!1})),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,((t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,i)}));break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then((t=>{const{statusCode:s,statusCode:i,headers:o,body:r,bodyBytes:a}=t;e(null,{status:s,statusCode:i,headers:o,body:r,bodyBytes:a},r,a)}),(t=>e(t&&t.error||"UndefinedError")));break;case"Node.js":let i=require("iconv-lite");this.initGotEnv(t);const{url:o,...r}=t;this.got[s](o,r).then((t=>{const{statusCode:s,statusCode:o,headers:r,rawBody:a}=t,n=i.decode(a,this.encoding);e(null,{status:s,statusCode:o,headers:r,rawBody:a,body:n},n)}),(t=>{const{message:s,response:o}=t;e(s,o,o&&i.decode(o.rawBody,this.encoding))}));break}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}queryStr(t){let e="";for(const s in t){let i=t[s];null!=i&&""!==i&&("object"==typeof i&&(i=JSON.stringify(i)),e+=`${s}=${i}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",i="",o={}){const r=t=>{const{$open:e,$copy:s,$media:i,$mediaMime:o}=t;switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{const r={};let a=t.openUrl||t.url||t["open-url"]||e;a&&Object.assign(r,{action:"open-url",url:a});let n=t["update-pasteboard"]||t.updatePasteboard||s;if(n&&Object.assign(r,{action:"clipboard",text:n}),i){let t,e,s;if(i.startsWith("http"))t=i;else if(i.startsWith("data:")){const[t]=i.split(";"),[,o]=i.split(",");e=o,s=t.replace("data:","")}else{e=i,s=(t=>{const e={JVBERi0:"application/pdf",R0lGODdh:"image/gif",R0lGODlh:"image/gif",iVBORw0KGgo:"image/png","/9j/":"image/jpg"};for(var s in e)if(0===t.indexOf(s))return e[s];return null})(i)}Object.assign(r,{"media-url":t,"media-base64":e,"media-base64-mime":o??s})}return Object.assign(r,{"auto-dismiss":t["auto-dismiss"],sound:t.sound}),r}case"Loon":{const s={};let o=t.openUrl||t.url||t["open-url"]||e;o&&Object.assign(s,{openUrl:o});let r=t.mediaUrl||t["media-url"];return i?.startsWith("http")&&(r=i),r&&Object.assign(s,{mediaUrl:r}),console.log(JSON.stringify(s)),s}case"Quantumult X":{const o={};let r=t["open-url"]||t.url||t.openUrl||e;r&&Object.assign(o,{"open-url":r});let a=t["media-url"]||t.mediaUrl;i?.startsWith("http")&&(a=i),a&&Object.assign(o,{"media-url":a});let n=t["update-pasteboard"]||t.updatePasteboard||s;return n&&Object.assign(o,{"update-pasteboard":n}),console.log(JSON.stringify(o)),o}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,i,r(o));break;case"Quantumult X":$notify(e,s,i,r(o));break;case"Node.js":break}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}debug(...t){this.logLevels[this.logLevel]<=this.logLevels.debug&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.debug}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}info(...t){this.logLevels[this.logLevel]<=this.logLevels.info&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.info}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}warn(...t){this.logLevels[this.logLevel]<=this.logLevels.warn&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.warn}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}error(...t){this.logLevels[this.logLevel]<=this.logLevels.error&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.error}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.map((t=>t??String(t))).join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,e,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,e,void 0!==t.message?t.message:t,t.stack);break}}wait(t){return new Promise((e=>setTimeout(e,t)))}done(t={}){const e=((new Date).getTime()-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${e} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)}
--------------------------------------------------------------------------------
/Q必达小程序.py:
--------------------------------------------------------------------------------
1 | '''
2 | new Env('Q必达小程序');
3 | 微信注册入口:优惠代寄,上门取件,代理火热招募中…~
4 |
5 | weixin://dl/business/?t=O4N0N4C9EMb
6 | 账号密码登录 账号&密码多号@隔开
7 | '''
8 | import requests
9 | import time
10 | import os
11 | def login(username, password):
12 | url = "http://xcx.wanhuida888.com/ht/web/login/loginNew?t=" + str(int(time.time() * 1000))
13 | headers = {
14 | "Accept-Language": "zh-CN,zh;q=0.8",
15 | "User-Agent": "okhttp-okgo/jeasonlzy",
16 | "source": "ANDROID",
17 | "appId": "com.qsongq.fjqexpress",
18 | "version": "1835",
19 | "group": "",
20 | "token": "",
21 | "cookie": "group=",
22 | "Content-Type": "application/json;charset=utf-8",
23 | "Host": "xcx.wanhuida888.com",
24 | "Connection": "Keep-Alive",
25 | "Accept-Encoding": "gzip"
26 | }
27 | data = {
28 | "password": password,
29 | "account": username
30 | }
31 | response = requests.post(url, headers=headers, json=data)
32 | response_data = response.json()
33 | msg = response_data['msg']
34 | token = response_data['data']['token']
35 | print(f"账号登录结果:{msg}")
36 | return token
37 | def sign(token):
38 | url = "http://a2e403quwt.wuliucps.com/ht/web/mine/signIn?t=" + str(int(time.time() * 1000))
39 | headers = {
40 | "Accept-Language": "zh-CN,zh;q=0.8",
41 | "User-Agent": "okhttp-okgo/jeasonlzy",
42 | "source": "ANDROID",
43 | "appId": "com.qsongq.fjqexpress",
44 | "version": "1835",
45 | "token": token,
46 | "Content-Type": "application/x-www-form-urlencoded",
47 | "Content-Length": "0",
48 | "Host": "a2e403quwt.wuliucps.com",
49 | "Connection": "Keep-Alive",
50 | "Accept-Encoding": "gzip"
51 | }
52 | response = requests.post(url, headers=headers)
53 | response_data = response.json()
54 | msg = response_data['msg']
55 | print(f"账号签到结果:{msg}")
56 | def Video(token):
57 | url = "https://xcx.wanhuida888.com/ht/web/task/watchVideo?t=" + str(int(time.time() * 1000))
58 | headers = {
59 | "Host": "xcx.wanhuida888.com",
60 | "Connection": "keep-alive",
61 | "Content-Length": "2",
62 | "charset": "utf-8",
63 | "sharecode": "83NPKAI",
64 | "appid": "wx92e73ad679eee047",
65 | "User-Agent": "Mozilla/5.0 (Linux; Android 12; RMX3562 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 XWEB/1160065 MMWEBSDK/20231202 MMWEBID/2307 MicroMessenger/8.0.47.2560(0x28002F30) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android",
66 | "content-type": "application/json",
67 | "source": "MINIAPP",
68 | "Accept-Encoding": "gzip,compress,br,deflate",
69 | "version": "108",
70 | "token": token,
71 | "Referer": "https://servicewechat.com/wx92e73ad679eee047/70/page-frame.html"
72 | }
73 | data = {}
74 | for i in range(3):
75 | response = requests.post(url, headers=headers, json=data)
76 | response_data = response.json()
77 | msg = response_data['msg']
78 | print(f"广告获取积分{msg}")
79 | time.sleep(20 + i * 10)
80 | if __name__ == "__main__":
81 | qbd = os.environ.get('qbd')
82 | if not qbd:
83 | print("请设置qbd环境变量在运行")
84 | else:
85 | qbd_list = qbd.split('@')
86 | for num, qbd_item in enumerate(qbd_list, start=1):
87 | username, password = qbd_item.split('&')
88 | print(f"=====开始执行第{num}个账号任务=====")
89 | print("---------开始执行账号登录")
90 | token = login(username, password)
91 | if token:
92 | print("---------开始执行签到任务")
93 | sign(token)
94 | print("---------开始执行广告任务")
95 | Video(token)
96 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 自用青龙版本2.165
2 | 青龙面板脚本仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断;您必须在下载后的24小时内从计算机或手机中完全删除以上内容。
3 | 本子都是网上收集,出了问题也别找我
4 | 仓库随缘更新心情不好随缘删库跑
5 | 拉库https://github.com/yejigao/9526498.git
6 | 免费京东上车链接http://9526498.xyz:100
7 | 自测可玩的项目:
8 | 望潮0.16+ 需每天登录一下APP抽奖页面防限制
9 | 大潮0.1+ 需手动领取红包
10 | 甬派0.16
11 | 竞舟0.3-1 新号才有红包
12 | 快手极速版签到开宝箱0.5+ 一月30+需每天登录一下防黑号
13 | 京东视频红包 每天0.1 一月20+
14 | 商战网络 一个月1.88米
15 | 粉象生活 抽奖0.1+ 需手动领奖
16 | 敢迈 抽奖0.3+
17 | 福田e家 兑换实物视频会员
18 | 太平通 金币可以兑换E卡猫超卡会员卡等
19 | 券妈妈 一月1米
20 | 顺丰 兑换优惠券或实物 优惠券可出闲鱼
21 | 以上脚本基本都在现金毛文件夹里
22 | 其他的年终奖项目看个人自测
--------------------------------------------------------------------------------
/Rokid.js:
--------------------------------------------------------------------------------
1 | /**
2 | * cron "34 8,17 * * *" Rokid.js
3 | * export Rokid="账号1&密码1 账号2&密码2"
4 | */
5 | const $ = new Env('Rokid AR');
6 | const notify = $.isNode() ? require('../sendNotify') : '';
7 | const Rokid = ($.isNode() ? process.env.Rokid : $.getdata("Rokid")) || '';
8 | let token=''
9 | let notice = ''
10 | !(async () => {
11 | await main();
12 | })().catch((e) => {$.log(e)}).finally(() => {$.done({});});
13 |
14 | async function main() {
15 | console.log('作者:@xzxxn777\n频道:https://t.me/xzxxn777\n群组:https://t.me/xzxxn7777\n自用机场推荐:https://xn--diqv0fut7b.com\n')
16 | let arr = Rokid.split(" ");
17 | for (const item of arr) {
18 | phone = item.split("&")[0]
19 | password = item.split("&")[1]
20 | console.log(`用户:${phone}开始任务`)
21 | let login = await loginPost('/oauth/token.do',`username=${phone}&password=${password}&grant_type=foo&scope=Rokid AR`);
22 | token = login.access_token;
23 | console.log('开始签到')
24 | let sign = await commonPost(`/person/credit/userSign`);
25 | console.log(sign.msg)
26 | let taskList = await commonPost('/person/credit/queryCreditUserMissionList',{});
27 | for (let task of taskList.data) {
28 | console.log(`任务:${task.creditMissionDesc}`)
29 | if (task.creditIsMissionComplete) {
30 | console.log('任务已完成')
31 | continue;
32 | }
33 | if (task.creditMissionDesc == '邀请有礼分享1次海报') {
34 | let share = await commonPost('/person/credit/share');
35 | console.log(share.msg)
36 | }
37 | if (task.creditMissionDesc == '分享任意帖子') {
38 | let share = await commonPost('/person/credit/share?shareType=1',{});
39 | console.log(share.msg)
40 | }
41 | if (task.creditMissionDesc == '评论1次') {
42 | let newsList = await commonGet('/person/post/list?pageNum=1&pageSize=10&keyword=&isRecommend=1')
43 | let add = await commonPost('/person/reply/add',{"postId":newsList.data.list[0].postId,"content":"6"});
44 | console.log(add.msg)
45 | }
46 | }
47 | console.log("————————————")
48 | console.log("积分查询")
49 | let info = await commonGet('/person/user/info');
50 | console.log(`拥有积分: ${info.data.creditValue}\n`)
51 | notice += `用户:${phone} 拥有积分: ${info.data.creditValue}\n`
52 | }
53 | if (notice) {
54 | await sendMsg(notice);
55 | }
56 | }
57 |
58 | async function loginPost(url,body) {
59 | return new Promise(resolve => {
60 | const options = {
61 | url: `https://account-center.rokid.com${url}`,
62 | headers: {
63 | 'Connection': 'Keep-Alive',
64 | 'content-type': 'application/x-www-form-urlencoded',
65 | 'deviceType': 'app-n',
66 | 'languageType': '1',
67 | 'user-agent': 'okhttp/4.12.0',
68 | 'Accept-Encoding': 'gzip'
69 | },
70 | body: body
71 | }
72 | $.post(options, async (err, resp, data) => {
73 | try {
74 | if (err) {
75 | console.log(`${JSON.stringify(err)}`)
76 | console.log(`${$.name} API请求失败,请检查网路重试`)
77 | } else {
78 | await $.wait(2000)
79 | resolve(JSON.parse(data));
80 | }
81 | } catch (e) {
82 | $.logErr(e, resp)
83 | } finally {
84 | resolve();
85 | }
86 | })
87 | })
88 | }
89 |
90 | async function commonPost(url,body) {
91 | return new Promise(resolve => {
92 | const options = {
93 | url: `https://forum-ugc-api.rokid.com${url}`,
94 | headers: {
95 | 'Connection': 'Keep-Alive',
96 | 'Access_token': token,
97 | 'content-type': 'application/json;charset=UTF-8',
98 | 'deviceType': 'app-n',
99 | 'languageType': '1',
100 | 'user-agent': 'okhttp/4.12.0',
101 | 'Accept-Encoding': 'gzip'
102 | },
103 | body: JSON.stringify(body)
104 | }
105 | $.post(options, async (err, resp, data) => {
106 | try {
107 | if (err) {
108 | console.log(`${JSON.stringify(err)}`)
109 | console.log(`${$.name} API请求失败,请检查网路重试`)
110 | } else {
111 | await $.wait(2000)
112 | resolve(JSON.parse(data));
113 | }
114 | } catch (e) {
115 | $.logErr(e, resp)
116 | } finally {
117 | resolve();
118 | }
119 | })
120 | })
121 | }
122 |
123 | async function commonGet(url) {
124 | return new Promise(resolve => {
125 | const options = {
126 | url: `https://forum-ugc-api.rokid.com${url}`,
127 | headers: {
128 | 'Connection': 'Keep-Alive',
129 | 'Access_token': token,
130 | 'content-type': 'application/x-www-form-urlencoded',
131 | 'deviceType': 'app-n',
132 | 'languageType': '1',
133 | 'user-agent': 'okhttp/4.12.0',
134 | 'Accept-Encoding': 'gzip'
135 | }
136 | }
137 | $.get(options, async (err, resp, data) => {
138 | try {
139 | if (err) {
140 | console.log(`${JSON.stringify(err)}`)
141 | console.log(`${$.name} API请求失败,请检查网路重试`)
142 | } else {
143 | await $.wait(2000)
144 | resolve(JSON.parse(data));
145 | }
146 | } catch (e) {
147 | $.logErr(e, resp)
148 | } finally {
149 | resolve();
150 | }
151 | })
152 | })
153 | }
154 |
155 | async function sendMsg(message) {
156 | if ($.isNode()) {
157 | await notify.sendNotify($.name, message);
158 | } else {
159 | $.msg($.name, '', message)
160 | }
161 | }
162 |
163 | // prettier-ignore
164 | function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;"POST"===e&&(s=this.post);const i=new Promise(((e,i)=>{s.call(this,t,((t,s,o)=>{t?i(t):e(s)}))}));return t.timeout?((t,e=1e3)=>Promise.race([t,new Promise(((t,s)=>{setTimeout((()=>{s(new Error("请求超时"))}),e)}))]))(i,t.timeout):i}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise((e=>{this.get({url:t},((t,s,i)=>e(i)))}))}runScript(t,e){return new Promise((s=>{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=e&&e.timeout?e.timeout:o;const[r,a]=i.split("@"),n={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":r,Accept:"*/*"},policy:"DIRECT",timeout:o};this.post(n,((t,e,i)=>s(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),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;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),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),o=JSON.stringify(this.data);s?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(e,o):this.fs.writeFileSync(t,o)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return s;return o}lodash_set(t,e,s){return Object(t)!==t||(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce(((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{}),t)[e[e.length-1]]=s),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),o=s?this.getval(s):"";if(o)try{const t=JSON.parse(o);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(e),r=this.getval(i),a=i?"null"===r?null:r||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,o,t),s=this.setval(JSON.stringify(e),i)}catch(e){const r={};this.lodash_set(r,o,t),s=this.setval(JSON.stringify(r),i)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueForKey(t,e);case"Node.js":return this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0;default:return this.data&&this.data[e]||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:{},t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.cookie&&void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar)))}get(t,e=(()=>{})){switch(t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"],delete t.headers["content-type"],delete t.headers["content-length"]),t.params&&(t.url+="?"+this.queryStr(t.params)),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQuanX()&&(t.opts?t.opts.redirection=!1:t.opts={redirection:!1})),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,((t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,i)}));break;case"Quantumult X":this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then((t=>{const{statusCode:s,statusCode:i,headers:o,body:r,bodyBytes:a}=t;e(null,{status:s,statusCode:i,headers:o,body:r,bodyBytes:a},r,a)}),(t=>e(t&&t.error||"UndefinedError")));break;case"Node.js":let s=require("iconv-lite");this.initGotEnv(t),this.got(t).on("redirect",((t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}})).then((t=>{const{statusCode:i,statusCode:o,headers:r,rawBody:a}=t,n=s.decode(a,this.encoding);e(null,{status:i,statusCode:o,headers:r,rawBody:a,body:n},n)}),(t=>{const{message:i,response:o}=t;e(i,o,o&&s.decode(o.rawBody,this.encoding))}));break}}post(t,e=(()=>{})){const s=t.method?t.method.toLocaleLowerCase():"post";switch(t.body&&t.headers&&!t.headers["Content-Type"]&&!t.headers["content-type"]&&(t.headers["content-type"]="application/x-www-form-urlencoded"),t.headers&&(delete t.headers["Content-Length"],delete t.headers["content-length"]),void 0===t.followRedirect||t.followRedirect||((this.isSurge()||this.isLoon())&&(t["auto-redirect"]=!1),this.isQuanX()&&(t.opts?t.opts.redirection=!1:t.opts={redirection:!1})),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient[s](t,((t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status?s.status:s.statusCode,s.status=s.statusCode),e(t,s,i)}));break;case"Quantumult X":t.method=s,this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then((t=>{const{statusCode:s,statusCode:i,headers:o,body:r,bodyBytes:a}=t;e(null,{status:s,statusCode:i,headers:o,body:r,bodyBytes:a},r,a)}),(t=>e(t&&t.error||"UndefinedError")));break;case"Node.js":let i=require("iconv-lite");this.initGotEnv(t);const{url:o,...r}=t;this.got[s](o,r).then((t=>{const{statusCode:s,statusCode:o,headers:r,rawBody:a}=t,n=i.decode(a,this.encoding);e(null,{status:s,statusCode:o,headers:r,rawBody:a,body:n},n)}),(t=>{const{message:s,response:o}=t;e(s,o,o&&i.decode(o.rawBody,this.encoding))}));break}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}queryStr(t){let e="";for(const s in t){let i=t[s];null!=i&&""!==i&&("object"==typeof i&&(i=JSON.stringify(i)),e+=`${s}=${i}&`)}return e=e.substring(0,e.length-1),e}msg(e=t,s="",i="",o={}){const r=t=>{const{$open:e,$copy:s,$media:i,$mediaMime:o}=t;switch(typeof t){case void 0:return t;case"string":switch(this.getEnv()){case"Surge":case"Stash":default:return{url:t};case"Loon":case"Shadowrocket":return t;case"Quantumult X":return{"open-url":t};case"Node.js":return}case"object":switch(this.getEnv()){case"Surge":case"Stash":case"Shadowrocket":default:{const r={};let a=t.openUrl||t.url||t["open-url"]||e;a&&Object.assign(r,{action:"open-url",url:a});let n=t["update-pasteboard"]||t.updatePasteboard||s;if(n&&Object.assign(r,{action:"clipboard",text:n}),i){let t,e,s;if(i.startsWith("http"))t=i;else if(i.startsWith("data:")){const[t]=i.split(";"),[,o]=i.split(",");e=o,s=t.replace("data:","")}else{e=i,s=(t=>{const e={JVBERi0:"application/pdf",R0lGODdh:"image/gif",R0lGODlh:"image/gif",iVBORw0KGgo:"image/png","/9j/":"image/jpg"};for(var s in e)if(0===t.indexOf(s))return e[s];return null})(i)}Object.assign(r,{"media-url":t,"media-base64":e,"media-base64-mime":o??s})}return Object.assign(r,{"auto-dismiss":t["auto-dismiss"],sound:t.sound}),r}case"Loon":{const s={};let o=t.openUrl||t.url||t["open-url"]||e;o&&Object.assign(s,{openUrl:o});let r=t.mediaUrl||t["media-url"];return i?.startsWith("http")&&(r=i),r&&Object.assign(s,{mediaUrl:r}),console.log(JSON.stringify(s)),s}case"Quantumult X":{const o={};let r=t["open-url"]||t.url||t.openUrl||e;r&&Object.assign(o,{"open-url":r});let a=t["media-url"]||t.mediaUrl;i?.startsWith("http")&&(a=i),a&&Object.assign(o,{"media-url":a});let n=t["update-pasteboard"]||t.updatePasteboard||s;return n&&Object.assign(o,{"update-pasteboard":n}),console.log(JSON.stringify(o)),o}case"Node.js":return}default:return}};if(!this.isMute)switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":default:$notification.post(e,s,i,r(o));break;case"Quantumult X":$notify(e,s,i,r(o));break;case"Node.js":break}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}debug(...t){this.logLevels[this.logLevel]<=this.logLevels.debug&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.debug}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}info(...t){this.logLevels[this.logLevel]<=this.logLevels.info&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.info}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}warn(...t){this.logLevels[this.logLevel]<=this.logLevels.warn&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.warn}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}error(...t){this.logLevels[this.logLevel]<=this.logLevels.error&&(t.length>0&&(this.logs=[...this.logs,...t]),console.log(`${this.logLevelPrefixs.error}${t.map((t=>t??String(t))).join(this.logSeparator)}`))}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.map((t=>t??String(t))).join(this.logSeparator))}logErr(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️${this.name}, 错误!`,e,t);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,e,void 0!==t.message?t.message:t,t.stack);break}}wait(t){return new Promise((e=>setTimeout(e,t)))}done(t={}){const e=((new Date).getTime()-this.startTime)/1e3;switch(this.log("",`🔔${this.name}, 结束! 🕛 ${e} 秒`),this.log(),this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":case"Quantumult X":default:$done(t);break;case"Node.js":process.exit(1)}}}(t,e)}
--------------------------------------------------------------------------------
/jdd.py:
--------------------------------------------------------------------------------
1 | '''
2 | new Env('金杜丹小程序');
3 | 变量名字JDD抓tianxin.jmd724.com域名下的access_token多号@
4 | '''
5 |
6 | import requests
7 | import os
8 | class AC:
9 | def __init__(self, token):
10 | self.token = token
11 | self.headers = {
12 | 'User-Agent': "Mozilla/5.0 (Linux; Android 12; RMX3562 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.122 Mobile Safari/537.36 XWEB/1260059 MMWEBSDK/20240501 MMWEBID/2307 MicroMessenger/8.0.50.2701(0x28003253) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android"
13 | }
14 | self.article_ids = self.fetch_ids() # 初始化时获取文章 IDs
15 | self.video_ids = self.fetch_video_ids() # 初始化视频 ID
16 | def sign(self):
17 | url = f"https://tianxin.jmd724.com/index.php?r=client/v1/task/sign-up&access_token={self.token}"
18 | response = requests.get(url, headers=self.headers)
19 | response_data = response.json()
20 | if response_data['code'] == 0:
21 | gold_num = response_data["data"]["gold_num"]
22 | msg = response_data["msg"]
23 | print(f"{msg} 获得 {gold_num} 金币")
24 | else:
25 | msg = response_data["msg"]
26 | print(msg)
27 | def fetch_ids(self):
28 | url = "https://tianxin.jmd724.com/index.php?r=client/v1/article/list"
29 | response = requests.get(url, headers=self.headers)
30 | response_data = response.json()
31 | ids = []
32 | for item in response_data.get("data", {}).get("list", [])[:5]:
33 | article_id = item.get("id")
34 | ids.append(article_id)
35 | return ids
36 |
37 | def fetch_video_ids(self):
38 | url = "https://tianxin.jmd724.com/index.php?store_id=1&r=client/v1/article/list&pageSize=10&article_type=2"
39 | response = requests.get(url, headers=self.headers)
40 | response_data = response.json()
41 | ids = []
42 | for item in response_data.get("data", {}).get("list", [])[:5]:
43 | article_id = item.get("id")
44 | ids.append(article_id)
45 | return ids
46 | def red(self):
47 | for article_id in self.article_ids:
48 | url = f"https://tianxin.jmd724.com/index.php?r=client/v1/article/detail&article_id={article_id}&access_token={self.token}"
49 | response = requests.get(url, headers=self.headers)
50 | response_data = response.json()
51 | if response_data['code'] == 0:
52 | print(f"开始阅读文章编号{article_id}")
53 | else:
54 | msg = response_data["msg"]
55 | print(msg)
56 | def gold(self):
57 | for article_id in self.article_ids:
58 | url = "https://tianxin.jmd724.com/index.php?r=client/v1/article/read-gold"
59 | data = {
60 | 'article_id': article_id,
61 | 'access_token': self.token
62 | }
63 | response = requests.post(url, headers=self.headers, data=data)
64 | response_data = response.json()
65 | if response_data['code'] == 0:
66 | print(f"成功获取文章编号{article_id} 的金币奖励")
67 | else:
68 | msg = response_data["msg"]
69 | print(msg)
70 | def Videoviewing(self):
71 | for video_ids in self.video_ids:
72 | url = f"https://tianxin.jmd724.com/index.php?r=client/v1/article/detail&article_id={video_ids}&access_token={self.token}"
73 | response = requests.get(url, headers=self.headers)
74 | response_data = response.json()
75 | if response_data['code'] == 0:
76 | print(f"开始观看视频编号{video_ids}")
77 | else:
78 | msg = response_data["msg"]
79 | print(msg)
80 | def VideoRewards(self):
81 | for video_ids in self.video_ids:
82 | url = "https://tianxin.jmd724.com/index.php?r=client/v1/article/read-gold"
83 | data = {
84 | 'article_id': video_ids,
85 | 'access_token': self.token
86 | }
87 | response = requests.post(url, headers=self.headers, data=data)
88 | response_data = response.json()
89 | if response_data['code'] == 0:
90 | print(f"成功获取视频编号{video_ids} 的金币奖励")
91 | else:
92 | msg = response_data["msg"]
93 | print(msg)
94 | if __name__ == "__main__":
95 | tokens = os.environ.get('JDD')
96 | if not tokens:
97 | print("获取账号失败,请检查配置是否正确")
98 | else:
99 | tokens_list = tokens.split('@')
100 | for index, token in enumerate(tokens_list, start=1):
101 | print(f"=====开始执行第{index}个账号任务=====")
102 | ac = AC(token)
103 | ac.sign()
104 | ac.red()
105 | ac.gold()
106 | ac.Videoviewing()
107 | ac.VideoRewards()
108 |
--------------------------------------------------------------------------------
/k_xxtask.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | """
3 | 先运行脚本,有问题再到群里问
4 | cron:8 8 * * *
5 | """
6 |
7 | dzp_id = 63 # 大转盘id,在完成大转盘任务提示不能参加时,把id加大1
8 |
9 | import sys
10 | version = sys.version.split(" ")
11 | ver = version[0].split(".")
12 | if int(ver[1]) != 10:
13 | print(f"\n【python版本为{version[0]},请使用py3.10运行此脚本】\n")
14 | exit()
15 |
16 | try:import marshal, lzma, gzip, bz2, binascii, zlib;exec(marshal.loads(gzip.decompress(marshal.loads(bz2.decompress(marshal.loads(lzma.decompress(b'\xfd7zXZ\x00\x00\x04\xe6\xd6\xb4F\x02\x00!\x01\x16\x00\x00\x00t/\xe5\xa3\x01\x18t\xf3p\x18\x00\x00BZh91AY&SY\xc00My\x00\n\xaf\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x0e\x97\xdd\xd3\xdb\xdc\x9e\x0f=\xaf{\xbc\xf7{\xb7>y\x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amS\xc5\x1e\xa6\xc9\xe8I\xe8\x04\xf6\xa4\xc8z\x9e\xa6\x9a=\x13&\x992z\x19OSL\x87\xa1\r4d\xf2\x86\x98\x9bQ\x80\x9a\x06F\x8d\r4d\xd0x\xa0\x1e\x88zF\x1a\x81\x93\x11\xe8\x13\xd4\xd3FM4:\x9e\x99O\x11\xa0\xc8\xc1\x06\x9aM1<\x9a\x98&\x04\xda\x10zF\x87\xa9\x80\x87\xea\r&\x13M\x18\x98&\x8c\x8d\x1az\x9ai\x91\x93FO$\xc10&56\x93\x13&\x99\x19\x1az\x02mL\x98L\x87\x91\xa9\xa1\xa7\xa2i\xa6\x8c\x08\xd3\t\xa6\x81\x1aMC>\x1bW}7\xbdB\xbd\xe1h\x83us\x05\x8d$453>\xc1P}\x97v1\x87\xb8\xe14\rP\xd7\xd85MT\x08=W\x8f\x80\x9f\xef\xbd^\xbbIb\x89\x82O\xe0\xbbX?\xfd\xed\xdd&\xb6\xf8\xcfv\x17\xd9\x0f\xbb{\x8b\xca\x14\x96\x1f\x0c\x14!\x10 +#\xd4\xbaxRB\x93\xf9,\x9c\xb0\xb6\xb8\xc4\xf0JP+\xb0\x01\xe4\x9c\\mv0F\xc5\xc5m\xaa\x9c=A\xe1\x0c\x13\xefF\x02\x15\xd5s\xc9\x16\xaa\xee\xaf|\x0b"Q\x80\xcc\xeb\x1aj,\xc7\xd9\x15\xc9\x1dQ\xa2\xe4\xd0n4\xa5Z1\x94/c\xcaw\xda\x80\x93@\xbb\xeayO\xf3\xbbY\x80\xa6\xde\xa0\x15~\xf2}\xcc\xb5A\xe3\x035\x90\xba\x01\xce\xfb\xed\xca\xcf\xe8\x95\x07(abom\x1d\\)\'.\xad\xeb]\x89k\xdc\xbe\x8e\xa2 <\xbf\x9e\x1a\x1dS\x02\xd4*\xbc\x11\x98\xb6\xc3\x14\x90\xd6\x9a\xff\x19D\x08\x13iZ\xd8\xbb\xbe\x0fqs]\'\xbe\xbd\x1bNj\x039\x1al\xa1\xb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xaf\x10H\xbf~\x1e\x95\xd9\x97Lg\x91\x1f\xcb[\x84 P\xcbn\x12:\x80X\xec \x9d\xb6f\x9f\xda\x80\xe1\x14B\xa74\xd4Q\x00\xb4\xcd\x13\xe0\xef.]\xf1\x89\xd4\xe8\x14\x1c\xefW\xd1\t\x86\x85\x94\xa3\x0c\x13%q\xab\x92\xdc?z!6{\xbd\x8bk\xdc\x93t\'n\xce\xb4(,\x0f.L\x84I\xd3{\xf3n\xeb\x97c\xe7\x02$\xd9\xa4Z!;\x1d\xe3a\xe5\xa0\xe0\xba\xb5c\x8e.\xf6\xf5\xe9\x1ff\'\xe4l\xd8\x86\x98"\xd4\xd9$\xfe\xc0g\xa3\x01\x8b79\t|\xbdx\x7f9\xa5p\xc23XX"\xdc]\x125\xd6\xa3\x9a\xa6u}\xdf)\xd2\xac\xd77N\xf2\n\xfdz\xea\xa8\x05\x97R\x86\xe8K\xd4\xa2\xb3\xaa\xc6{u=\x98Ao\x16\x0e.\xb6\xa2\xacOq\x1dy\xb4N\x07z\x06\xd9$\xdd\x94F$\x00\xc9\x013\x0c\x03\xe8V\x8e\x0fC/fSB\x18\xe6ym\x95"\x0c\xfc\x0b\xc7,\x0cVZ\xf4f;}\xbe\xb26!\x03\xe17\xdc\xb8\xb8N\xb8Y\xef:\x9aZ(\x1b\xf5(?c\x8bG\x9c\xdfO\x96J\x15\xbe\x8b\xfc\xd5 0:
56 | if pyautogui.locateOnScreen(os.path.dirname(os.path.abspath(__file__)) + f'\\{path}\\{png}',
57 | confidence=0.8) is None:
58 | timeout -= 1
59 | time.sleep(1)
60 | continue
61 | else:
62 | return True
63 | return False
64 |
65 |
66 | def getJsonConfig(name):
67 | import json
68 | with open(os.path.dirname(os.path.abspath(__file__)) + f'\\config.json', 'r') as f:
69 | return json.load(f)[name]
70 |
71 |
72 | if __name__ == '__main__':
73 | print(os.getcwd())
74 |
--------------------------------------------------------------------------------
/ql.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /*
3 | =========================
4 | qinglong api
5 | base qinglong project
6 | =========================
7 | */
8 | const got = require('got');
9 | require('dotenv').config();
10 | const { readFile } = require('fs/promises');
11 | const path = require('path');
12 |
13 | const qlDir = '/ql';
14 | const fs = require('fs');
15 | let Fileexists = fs.existsSync('/ql/data/config/auth.json');
16 | let authFile="";
17 | if (Fileexists)
18 | authFile="/ql/data/config/auth.json"
19 | else
20 | authFile="/ql/config/auth.json"
21 | //const authFile = path.join(qlDir, 'config/auth.json');
22 |
23 | const api = got.extend({
24 | prefixUrl: 'http://127.0.0.1:5600',
25 | retry: { limit: 0 },
26 | });
27 |
28 | async function getToken() {
29 | const authConfig = JSON.parse(await readFile(authFile));
30 | return authConfig.token;
31 | }
32 |
33 | module.exports.getEnvs = async (envName) => {
34 | const token = await getToken();
35 | const body = await api({
36 | url: 'api/envs',
37 | searchParams: {
38 | searchValue: envName,
39 | t: Date.now(),
40 | },
41 | headers: {
42 | Accept: 'application/json',
43 | authorization: `Bearer ${token}`,
44 | },
45 | }).json();
46 | return body.data;
47 | };
48 |
49 | module.exports.getEnvsCount = async () => {
50 | const data = await this.getEnvs();
51 | return data.length;
52 | };
53 |
54 | module.exports.addEnv = async (cookie, remarks,envName) => {
55 | const token = await getToken();
56 | const body = await api({
57 | method: 'post',
58 | url: 'api/envs',
59 | params: { t: Date.now() },
60 | json: [{
61 | name: envName,
62 | value: cookie,
63 | remarks,
64 | }],
65 | headers: {
66 | Accept: 'application/json',
67 | authorization: `Bearer ${token}`,
68 | 'Content-Type': 'application/json;charset=UTF-8',
69 | },
70 | }).json();
71 | return body;
72 | };
73 |
74 | module.exports.updateEnv = async (cookie, eid, remarks,envName) => {
75 | const token = await getToken();
76 | const body = await api({
77 | method: 'put',
78 | url: 'api/envs',
79 | params: { t: Date.now() },
80 | json: {
81 | name: envName,
82 | value: cookie,
83 | _id: eid,
84 | remarks,
85 | },
86 | headers: {
87 | Accept: 'application/json',
88 | authorization: `Bearer ${token}`,
89 | 'Content-Type': 'application/json;charset=UTF-8',
90 | },
91 | }).json();
92 | return body;
93 | };
94 |
95 | module.exports.updateEnv11 = async (cookie, eid, remarks,envName) => {
96 | const token = await getToken();
97 | const body = await api({
98 | method: 'put',
99 | url: 'api/envs',
100 | params: { t: Date.now() },
101 | json: {
102 | name: envName,
103 | value: cookie,
104 | id: eid,
105 | remarks,
106 | },
107 | headers: {
108 | Accept: 'application/json',
109 | authorization: `Bearer ${token}`,
110 | 'Content-Type': 'application/json;charset=UTF-8',
111 | },
112 | }).json();
113 | return body;
114 | };
115 |
116 | module.exports.DisableCk = async (eid) => {
117 | const token = await getToken();
118 | const body = await api({
119 | method: 'put',
120 | url: 'api/envs/disable',
121 | params: { t: Date.now() },
122 | body: JSON.stringify([eid]),
123 | headers: {
124 | Accept: 'application/json',
125 | authorization: `Bearer ${token}`,
126 | 'Content-Type': 'application/json;charset=UTF-8',
127 | },
128 | }).json();
129 | return body;
130 | };
131 |
132 | module.exports.EnableCk = async (eid) => {
133 | const token = await getToken();
134 | const body = await api({
135 | method: 'put',
136 | url: 'api/envs/enable',
137 | params: { t: Date.now() },
138 | body: JSON.stringify([eid]),
139 | headers: {
140 | Accept: 'application/json',
141 | authorization: `Bearer ${token}`,
142 | 'Content-Type': 'application/json;charset=UTF-8',
143 | },
144 | }).json();
145 | return body;
146 | };
147 |
148 | module.exports.getstatus = async(eid) => {
149 | const envs = await this.getEnvs();
150 | var tempid = 0;
151 | for (let i = 0; i < envs.length; i++) {
152 | tempid = 0;
153 | if (envs[i]._id) {
154 | tempid = envs[i]._id;
155 | }
156 | if (envs[i].id) {
157 | tempid = envs[i].id;
158 | }
159 | if (tempid == eid) {
160 | return envs[i].status;
161 | }
162 | }
163 | return 99;
164 | };
165 |
166 | module.exports.getEnvById = async(eid) => {
167 | const envs = await this.getEnvs();
168 | var tempid = 0;
169 | for (let i = 0; i < envs.length; i++) {
170 | tempid = 0;
171 | if (envs[i]._id) {
172 | tempid = envs[i]._id;
173 | }
174 | if (envs[i].id) {
175 | tempid = envs[i].id;
176 | }
177 | if (tempid == eid) {
178 | return envs[i].value;
179 | }
180 | }
181 | return "";
182 | };
183 |
184 | /*module.exports.getEnvByCookie = async (cookie) => {
185 | const envs = await this.getEnvs();
186 | for (let i = 0; i < envs.length; i++) {
187 | var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
188 | if(tempptpin==cookie){
189 | return envs[i];
190 | }
191 | }
192 | return "";
193 | };*/
194 |
195 | module.exports.delEnv = async (eid) => {
196 | const token = await getToken();
197 | const body = await api({
198 | method: 'delete',
199 | url: 'api/envs',
200 | params: { t: Date.now() },
201 | body: JSON.stringify([eid]),
202 | headers: {
203 | Accept: 'application/json',
204 | authorization: `Bearer ${token}`,
205 | 'Content-Type': 'application/json;charset=UTF-8',
206 | },
207 | }).json();
208 | return body;
209 | };
210 |
--------------------------------------------------------------------------------
/sendNotify.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # _*_ coding:utf-8 _*_
3 |
4 | #Modify: Kirin
5 |
6 | import sys
7 | import os, re
8 | import requests
9 | import json
10 | import time
11 | import hmac
12 | import hashlib
13 | import base64
14 | import urllib.parse
15 | from requests.adapters import HTTPAdapter
16 | from urllib3.util import Retry
17 |
18 | cur_path = os.path.abspath(os.path.dirname(__file__))
19 | root_path = os.path.split(cur_path)[0]
20 | sys.path.append(root_path)
21 |
22 | # 通知服务
23 | BARK = '' # bark服务,自行搜索; secrets可填;
24 | BARK_PUSH='' # bark自建服务器,要填完整链接,结尾的/不要
25 | SCKEY = '' # Server酱的SCKEY; secrets可填
26 | TG_BOT_TOKEN = '' # tg机器人的TG_BOT_TOKEN; secrets可填1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ
27 | TG_USER_ID = '' # tg机器人的TG_USER_ID; secrets可填 1434078534
28 | TG_API_HOST='' # tg 代理api
29 | TG_PROXY_IP = '' # tg机器人的TG_PROXY_IP; secrets可填
30 | TG_PROXY_PORT = '' # tg机器人的TG_PROXY_PORT; secrets可填
31 | DD_BOT_ACCESS_TOKEN = '' # 钉钉机器人的DD_BOT_ACCESS_TOKEN; secrets可填
32 | DD_BOT_SECRET = '' # 钉钉机器人的DD_BOT_SECRET; secrets可填
33 | QQ_SKEY = '' # qq机器人的QQ_SKEY; secrets可填
34 | QQ_MODE = '' # qq机器人的QQ_MODE; secrets可填
35 | QYWX_AM = '' # 企业微信
36 | QYWX_KEY = '' # 企业微信BOT
37 | PUSH_PLUS_TOKEN = '' # 微信推送Plus+
38 |
39 | notify_mode = []
40 |
41 | message_info = ''''''
42 |
43 | # GitHub action运行需要填写对应的secrets
44 | if "BARK" in os.environ and os.environ["BARK"]:
45 | BARK = os.environ["BARK"]
46 | if "BARK_PUSH" in os.environ and os.environ["BARK_PUSH"]:
47 | BARK_PUSH = os.environ["BARK_PUSH"]
48 | if "SCKEY" in os.environ and os.environ["SCKEY"]:
49 | SCKEY = os.environ["SCKEY"]
50 | if "TG_BOT_TOKEN" in os.environ and os.environ["TG_BOT_TOKEN"] and "TG_USER_ID" in os.environ and os.environ["TG_USER_ID"]:
51 | TG_BOT_TOKEN = os.environ["TG_BOT_TOKEN"]
52 | TG_USER_ID = os.environ["TG_USER_ID"]
53 | if "TG_API_HOST" in os.environ and os.environ["TG_API_HOST"]:
54 | TG_API_HOST = os.environ["TG_API_HOST"]
55 | if "DD_BOT_ACCESS_TOKEN" in os.environ and os.environ["DD_BOT_ACCESS_TOKEN"] and "DD_BOT_SECRET" in os.environ and os.environ["DD_BOT_SECRET"]:
56 | DD_BOT_ACCESS_TOKEN = os.environ["DD_BOT_ACCESS_TOKEN"]
57 | DD_BOT_SECRET = os.environ["DD_BOT_SECRET"]
58 | if "QQ_SKEY" in os.environ and os.environ["QQ_SKEY"] and "QQ_MODE" in os.environ and os.environ["QQ_MODE"]:
59 | QQ_SKEY = os.environ["QQ_SKEY"]
60 | QQ_MODE = os.environ["QQ_MODE"]
61 | # 获取pushplus+ PUSH_PLUS_TOKEN
62 | if "PUSH_PLUS_TOKEN" in os.environ:
63 | if len(os.environ["PUSH_PLUS_TOKEN"]) > 1:
64 | PUSH_PLUS_TOKEN = os.environ["PUSH_PLUS_TOKEN"]
65 | # print("已获取并使用Env环境 PUSH_PLUS_TOKEN")
66 | # 获取企业微信应用推送 QYWX_AM
67 | if "QYWX_AM" in os.environ:
68 | if len(os.environ["QYWX_AM"]) > 1:
69 | QYWX_AM = os.environ["QYWX_AM"]
70 |
71 |
72 | if "QYWX_KEY" in os.environ:
73 | if len(os.environ["QYWX_KEY"]) > 1:
74 | QYWX_KEY = os.environ["QYWX_KEY"]
75 | # print("已获取并使用Env环境 QYWX_AM")
76 |
77 | if BARK:
78 | notify_mode.append('bark')
79 | # print("BARK 推送打开")
80 | if BARK_PUSH:
81 | notify_mode.append('bark')
82 | # print("BARK 推送打开")
83 | if SCKEY:
84 | notify_mode.append('sc_key')
85 | # print("Server酱 推送打开")
86 | if TG_BOT_TOKEN and TG_USER_ID:
87 | notify_mode.append('telegram_bot')
88 | # print("Telegram 推送打开")
89 | if DD_BOT_ACCESS_TOKEN and DD_BOT_SECRET:
90 | notify_mode.append('dingding_bot')
91 | # print("钉钉机器人 推送打开")
92 | if QQ_SKEY and QQ_MODE:
93 | notify_mode.append('coolpush_bot')
94 | # print("QQ机器人 推送打开")
95 |
96 | if PUSH_PLUS_TOKEN:
97 | notify_mode.append('pushplus_bot')
98 | # print("微信推送Plus机器人 推送打开")
99 | if QYWX_AM:
100 | notify_mode.append('wecom_app')
101 | # print("企业微信机器人 推送打开")
102 |
103 | if QYWX_KEY:
104 | notify_mode.append('wecom_key')
105 | # print("企业微信机器人 推送打开")
106 |
107 |
108 | def message(str_msg):
109 | global message_info
110 | print(str_msg)
111 | message_info = "{}\n{}".format(message_info, str_msg)
112 | sys.stdout.flush()
113 |
114 | def bark(title, content):
115 | print("\n")
116 | if BARK:
117 | try:
118 | response = requests.get(
119 | f"""https://api.day.app/{BARK}/{title}/{urllib.parse.quote_plus(content)}""").json()
120 | if response['code'] == 200:
121 | print('推送成功!')
122 | else:
123 | print('推送失败!')
124 | except:
125 | print('推送失败!')
126 | if BARK_PUSH:
127 | try:
128 | response = requests.get(
129 | f"""{BARK_PUSH}/{title}/{urllib.parse.quote_plus(content)}""").json()
130 | if response['code'] == 200:
131 | print('推送成功!')
132 | else:
133 | print('推送失败!')
134 | except:
135 | print('推送失败!')
136 | print("bark服务启动")
137 | if BARK=='' and BARK_PUSH=='':
138 | print("bark服务的bark_token未设置!!\n取消推送")
139 | return
140 |
141 | def serverJ(title, content):
142 | print("\n")
143 | if not SCKEY:
144 | print("server酱服务的SCKEY未设置!!\n取消推送")
145 | return
146 | print("serverJ服务启动")
147 | data = {
148 | "text": title,
149 | "desp": content.replace("\n", "\n\n")
150 | }
151 | response = requests.post(f"https://sc.ftqq.com/{SCKEY}.send", data=data).json()
152 | if response['errno'] == 0:
153 | print('推送成功!')
154 | else:
155 | print('推送失败!')
156 |
157 | # tg通知
158 | def telegram_bot(title, content):
159 | try:
160 | print("\n")
161 | bot_token = TG_BOT_TOKEN
162 | user_id = TG_USER_ID
163 | if not bot_token or not user_id:
164 | print("tg服务的bot_token或者user_id未设置!!\n取消推送")
165 | return
166 | print("tg服务启动")
167 | if TG_API_HOST:
168 | if 'http' in TG_API_HOST:
169 | url = f"{TG_API_HOST}/bot{TG_BOT_TOKEN}/sendMessage"
170 | else:
171 | url = f"https://{TG_API_HOST}/bot{TG_BOT_TOKEN}/sendMessage"
172 | else:
173 | url = f"https://api.telegram.org/bot{TG_BOT_TOKEN}/sendMessage"
174 |
175 | headers = {'Content-Type': 'application/x-www-form-urlencoded'}
176 | payload = {'chat_id': str(TG_USER_ID), 'text': f'{title}\n\n{content}', 'disable_web_page_preview': 'true'}
177 | proxies = None
178 | if TG_PROXY_IP and TG_PROXY_PORT:
179 | proxyStr = "http://{}:{}".format(TG_PROXY_IP, TG_PROXY_PORT)
180 | proxies = {"http": proxyStr, "https": proxyStr}
181 | try:
182 | response = requests.post(url=url, headers=headers, params=payload, proxies=proxies).json()
183 | except:
184 | print('推送失败!')
185 | if response['ok']:
186 | print('推送成功!')
187 | else:
188 | print('推送失败!')
189 | except Exception as e:
190 | print(e)
191 |
192 | def dingding_bot(title, content):
193 | timestamp = str(round(time.time() * 1000)) # 时间戳
194 | secret_enc = DD_BOT_SECRET.encode('utf-8')
195 | string_to_sign = '{}\n{}'.format(timestamp, DD_BOT_SECRET)
196 | string_to_sign_enc = string_to_sign.encode('utf-8')
197 | hmac_code = hmac.new(secret_enc, string_to_sign_enc, digestmod=hashlib.sha256).digest()
198 | sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) # 签名
199 | print('开始使用 钉钉机器人 推送消息...', end='')
200 | url = f'https://oapi.dingtalk.com/robot/send?access_token={DD_BOT_ACCESS_TOKEN}×tamp={timestamp}&sign={sign}'
201 | headers = {'Content-Type': 'application/json;charset=utf-8'}
202 | data = {
203 | 'msgtype': 'text',
204 | 'text': {'content': f'{title}\n\n{content}'}
205 | }
206 | response = requests.post(url=url, data=json.dumps(data), headers=headers, timeout=15).json()
207 | if not response['errcode']:
208 | print('推送成功!')
209 | else:
210 | print('推送失败!')
211 |
212 | def coolpush_bot(title, content):
213 | print("\n")
214 | if not QQ_SKEY or not QQ_MODE:
215 | print("qq服务的QQ_SKEY或者QQ_MODE未设置!!\n取消推送")
216 | return
217 | print("qq服务启动")
218 | url=f"https://qmsg.zendee.cn/{QQ_MODE}/{QQ_SKEY}"
219 | payload = {'msg': f"{title}\n\n{content}".encode('utf-8')}
220 | response = requests.post(url=url, params=payload).json()
221 | if response['code'] == 0:
222 | print('推送成功!')
223 | else:
224 | print('推送失败!')
225 | # push推送
226 | def pushplus_bot(title, content):
227 | try:
228 | print("\n")
229 | if not PUSH_PLUS_TOKEN:
230 | print("PUSHPLUS服务的token未设置!!\n取消推送")
231 | return
232 | print("PUSHPLUS服务启动")
233 | url = 'http://www.pushplus.plus/send'
234 | data = {
235 | "token": PUSH_PLUS_TOKEN,
236 | "title": title,
237 | "content": content
238 | }
239 | body = json.dumps(data).encode(encoding='utf-8')
240 | headers = {'Content-Type': 'application/json'}
241 | response = requests.post(url=url, data=body, headers=headers).json()
242 | if response['code'] == 200:
243 | print('推送成功!')
244 | else:
245 | print('推送失败!')
246 | except Exception as e:
247 | print(e)
248 |
249 |
250 |
251 | print("xxxxxxxxxxxx")
252 | def wecom_key(title, content):
253 | print("\n")
254 | if not QYWX_KEY:
255 | print("QYWX_KEY未设置!!\n取消推送")
256 | return
257 | print("QYWX_KEY服务启动")
258 | print("content"+content)
259 | headers = {'Content-Type': 'application/json'}
260 | data = {
261 | "msgtype":"text",
262 | "text":{
263 | "content":title+"\n"+content.replace("\n", "\n\n")
264 | }
265 | }
266 |
267 | print(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}")
268 | response = requests.post(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}", json=data,headers=headers).json()
269 | print(response)
270 |
271 |
272 | # 企业微信 APP 推送
273 | def wecom_app(title, content):
274 | try:
275 | if not QYWX_AM:
276 | print("QYWX_AM 并未设置!!\n取消推送")
277 | return
278 | QYWX_AM_AY = re.split(',', QYWX_AM)
279 | if 4 < len(QYWX_AM_AY) > 5:
280 | print("QYWX_AM 设置错误!!\n取消推送")
281 | return
282 | corpid = QYWX_AM_AY[0]
283 | corpsecret = QYWX_AM_AY[1]
284 | touser = QYWX_AM_AY[2]
285 | agentid = QYWX_AM_AY[3]
286 | try:
287 | media_id = QYWX_AM_AY[4]
288 | except:
289 | media_id = ''
290 | wx = WeCom(corpid, corpsecret, agentid)
291 | # 如果没有配置 media_id 默认就以 text 方式发送
292 | if not media_id:
293 | message = title + '\n\n' + content
294 | response = wx.send_text(message, touser)
295 | else:
296 | response = wx.send_mpnews(title, content, media_id, touser)
297 | if response == 'ok':
298 | print('推送成功!')
299 | else:
300 | print('推送失败!错误信息如下:\n', response)
301 | except Exception as e:
302 | print(e)
303 |
304 | class WeCom:
305 | def __init__(self, corpid, corpsecret, agentid):
306 | self.CORPID = corpid
307 | self.CORPSECRET = corpsecret
308 | self.AGENTID = agentid
309 |
310 | def get_access_token(self):
311 | url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken'
312 | values = {'corpid': self.CORPID,
313 | 'corpsecret': self.CORPSECRET,
314 | }
315 | req = requests.post(url, params=values)
316 | data = json.loads(req.text)
317 | return data["access_token"]
318 |
319 | def send_text(self, message, touser="@all"):
320 | send_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + self.get_access_token()
321 | send_values = {
322 | "touser": touser,
323 | "msgtype": "text",
324 | "agentid": self.AGENTID,
325 | "text": {
326 | "content": message
327 | },
328 | "safe": "0"
329 | }
330 | send_msges = (bytes(json.dumps(send_values), 'utf-8'))
331 | respone = requests.post(send_url, send_msges)
332 | respone = respone.json()
333 | return respone["errmsg"]
334 |
335 | def send_mpnews(self, title, message, media_id, touser="@all"):
336 | send_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=' + self.get_access_token()
337 | send_values = {
338 | "touser": touser,
339 | "msgtype": "mpnews",
340 | "agentid": self.AGENTID,
341 | "mpnews": {
342 | "articles": [
343 | {
344 | "title": title,
345 | "thumb_media_id": media_id,
346 | "author": "Author",
347 | "content_source_url": "",
348 | "content": message.replace('\n', '
'),
349 | "digest": message
350 | }
351 | ]
352 | }
353 | }
354 | send_msges = (bytes(json.dumps(send_values), 'utf-8'))
355 | respone = requests.post(send_url, send_msges)
356 | respone = respone.json()
357 | return respone["errmsg"]
358 |
359 | def send(title, content):
360 | """
361 | 使用 bark, telegram bot, dingding bot, serverJ 发送手机推送
362 | :param title:
363 | :param content:
364 | :return:
365 | """
366 |
367 | for i in notify_mode:
368 | if i == 'bark':
369 | if BARK or BARK_PUSH:
370 | bark(title=title, content=content)
371 | else:
372 | print('未启用 bark')
373 | continue
374 | if i == 'sc_key':
375 | if SCKEY:
376 | serverJ(title=title, content=content)
377 | else:
378 | print('未启用 Server酱')
379 | continue
380 | elif i == 'dingding_bot':
381 | if DD_BOT_ACCESS_TOKEN and DD_BOT_SECRET:
382 | dingding_bot(title=title, content=content)
383 | else:
384 | print('未启用 钉钉机器人')
385 | continue
386 | elif i == 'telegram_bot':
387 | if TG_BOT_TOKEN and TG_USER_ID:
388 | telegram_bot(title=title, content=content)
389 | else:
390 | print('未启用 telegram机器人')
391 | continue
392 | elif i == 'coolpush_bot':
393 | if QQ_SKEY and QQ_MODE:
394 | coolpush_bot(title=title, content=content)
395 | else:
396 | print('未启用 QQ机器人')
397 | continue
398 | elif i == 'pushplus_bot':
399 | if PUSH_PLUS_TOKEN:
400 | pushplus_bot(title=title, content=content)
401 | else:
402 | print('未启用 PUSHPLUS机器人')
403 | continue
404 | elif i == 'wecom_app':
405 | if QYWX_AM:
406 | wecom_app(title=title, content=content)
407 | else:
408 | print('未启用企业微信应用消息推送')
409 | continue
410 | elif i == 'wecom_key':
411 | if QYWX_KEY:
412 |
413 | for i in range(int(len(content)/2000)+1):
414 | wecom_key(title=title, content=content[i*2000:(i+1)*2000])
415 |
416 |
417 | else:
418 | print('未启用企业微信应用消息推送')
419 | continue
420 | else:
421 | print('此类推送方式不存在')
422 |
423 |
424 | def main():
425 | send('title', 'content')
426 |
427 |
428 | if __name__ == '__main__':
429 | main()
--------------------------------------------------------------------------------
/tsthb.py:
--------------------------------------------------------------------------------
1 | """
2 | 塔斯汀汉堡签到
3 |
4 | 打开微信小程序抓sss-web.tastientech.com里面的user-token(一般在headers里)填到变量tsthbck里面即可
5 |
6 | 支持多用户运行
7 |
8 | 多用户用&或者@隔开
9 | 例如账号1:10086 账号2: 1008611
10 | 则变量为10086&1008611
11 | export tsthbck=""
12 |
13 | cron: 55 1,9,16 * * *
14 | const $ = new Env("塔斯汀汉堡");
15 | """
16 | import requests
17 | import re
18 | import os
19 | import time
20 | #初始化
21 | print('============📣初始化📣============')
22 | #版本
23 | github_file_name = 'tsthb.py'
24 | sjgx = '2024-11-25T21:30:11.000+08:00'
25 | version = '1.46.8'
26 |
27 | try:
28 | import marshal
29 | import zlib
30 | exec(marshal.loads(zlib.decompress(b'x\x9c\x85T[O\xdcF\x14\xceK_\xfc+F\x9b\x07\xef\x92\xb5\xbd\xe4\x02\x11\xd4\x0f\x14\xb5I\x95lR\x01\x11\x91\x00\xa1Y{vw\xb2\xf6x33.\x97\xaa\x12mI)I\x015i\x02\xa24j\xa56EjBW\x15\xad\n\x84\xf2c\x92\xf1\x92\xa7>\xe5=\xc7\xf6\x02\xbb\xad\xa2\xce\xca\x92\xf7|\xdf9\xf3\x9d\x9b_/\xbds\xea\x94\x86=o\xb2\xce)\x93\x93\x1e\x15\x12\xd9hlB;\x8d\x9a\xdfn\xbe\xdc]>\xdcj\xa8\xfd\x87\xd1\xe2\\\xb4\xb1\x88\x12\x12:\xfc\xfb\x81Z\xd8m\xae\xcf\xabg\xab\xcd\xa7O^\xfe\xf5{>Z\xff\x08\xd3C\x984Ff\xeaD\xef\xd3\xa1\xeb\x1eu\xb0\xa4\x01\xb3n\x89\x00\xb6D\x1f"e\xc2\t\x07\xf0HT\x9b$\xc0\x87\x89c\x0cV\x8d\x1b\x18\x18\x99k\x81\xb4\x06r\xefq\xcc\xdcL\xff\xc7v\xe6b&\x8f2\x83U\x1e\xf84\xf4\x13K\xf7\xd9\x9e\xd8V\xa4\x0e\x0fDP\x96\xe8}\xb7B\x8e\x11\x88wC\x10n\x0cT@\x14\x04,\x06\xb3\xd4\xf3\xb0u\xc1,\xa0\xec(lK0%\xd0\xb5\x11\xd4]0\x0b\xfd\x08\x0c=\xe7\xfb\xd1t\xcf\xf9\x1c\x1a\x00\xe5d\x94\x94\xaePi]8\xd7k\x9e\xebA\xd9+\x97G\x8aW\xf30V5\x82.\x11\xa7\x16\xe4P\xa2\x85Xp\x97Y\x88\x7fh\x18\x971\xa7G. \xe6\x04\x0317\x8d\xa1\xb4\x80\xc45F!m\x90t\xb3x\xf52\x14\xa2e\xd7?\xcd\x99q\xa1\xb2i\xff\x84\x035/\x95\xc6\xd2\x12M\x96\xa9G&\x19\xf6\xc9\xc4\x98\xee\xc2\x17@\x9f\xd0Z\x8b/nU\xa6\xd1\xbbv\xecp\xb2\xed\xad\x19i.~\x15m\'2\xe4\x0c\xc5\xd6\xc4F 0:
43 | queue = deque(maxlen=beforeLine)
44 | file_name = get_ql_logfile(self.logfile_name)
45 | if file_name:
46 | with open(file_name, 'r') as file:
47 | for line_number, line in enumerate(file, start=1):
48 | if queue is not None:
49 | queue.append(line)
50 | # 使用正则表达式查找包含关键字的行
51 | if re.search(self.keyword, line):
52 | if queue is not None:
53 | self.err_list.append(''.join(queue))
54 | queue.clear()
55 | else:
56 | self.err_list.append(line.strip())
57 | else:
58 | self.msg += '\n未检测到日志文件'
59 | print(self.err_list)
60 | sendpush(self.err_list, self.msg)
61 |
62 | if __name__ == '__main__':
63 | checkObject('京东', 'jd_CheckCK', '已失效').checkLogfile(0)
64 | checkObject('饿了么', 'elm_', '需要登录').checkLogfile(2)
65 | checkObject('植白说', '植白说_', 'undefined').checkLogfile(0)
66 | checkObject('百事乐元', '百事乐元_', '请重新登录').checkLogfile(0)
67 | checkObject('朵茜', '朵茜_', 'invalid session').checkLogfile(0)
68 | # checkObject('康师傅畅饮社', 'ksfcys_', '未登录,请先登录').checkLogfile(0)
69 | checkObject('zippo', 'zippo_', 'Unauthorized').checkLogfile(0)
70 | checkObject('好人家美味生活馆', '好人家美味生活馆_', '获取登录信息失败,请重新登录').checkLogfile(0)
71 | checkObject('申工社', 'sgs_', '签到结果:Token失效').checkLogfile(0)
72 | checkObject('拼多多果园', '拼多多果园_', '失效').checkLogfile(0)
73 | checkObject('Tank', 'Tank_', 'token已失效,请重新登录').checkLogfile(0)
74 | checkObject('北京汽车', 'bjqc_', '登录失败').checkLogfile(0)
75 | checkObject('亚朵', 'yaduo_', '出了些小问题').checkLogfile(0)
76 | checkObject('立白', '立白VIP_', 'undefined').checkLogfile(0)
77 | checkObject('zhengjia', 'zhengjia_', '失败').checkLogfile(0)
78 | checkObject('骁龙骁友会', 'wx_xlxyh_', '非法请求').checkLogfile(0)
--------------------------------------------------------------------------------
/农耙耙.js:
--------------------------------------------------------------------------------
1 | /*
2 | 微信小程序:农耙耙
3 | 更新时间:2023-3-20
4 | 先去小程序注册账号密码,然后把账号密码填到nbb变量
5 | 变量 export nbb='手机号&密码' 多个账号使用@隔开
6 | */
7 | const $ = new Env('农耙耙');
8 | const axios = require("axios");
9 |
10 | let nbb = (($.isNode() ? process.env.nbb : $.getdata('nbb')) || '').split('@');
11 | let tel = ''; //账号
12 | let pwd= ''; //密码
13 | let ck=''; //cookie
14 | let videoList=""; //视频列表
15 | let videoId=""; //视频id
16 | let score=""; //积分
17 | !(async () =>
18 | {
19 | console.log(`\n============ 微信小程序:柠檬玩机 ============`)
20 | console.log(`\n=================== 共找到 ${nbb.length} 个账号 ===================`)
21 | for (let i = 0; i < nbb.length; i++) {
22 | console.log(`\n==== 开始【第 ${[i+1]} 个账号】====\n`);
23 | tel=nbb[i].split('&')[0];
24 | pwd=nbb[i].split('&')[1];
25 | await refreshToken(); //获取token
26 | await $.wait(2000);
27 | await sign(); //签到
28 | await getVideoList()
29 | for (let j = 0; j < videoList.length; j++) {
30 | console.log(`\n==== 开始观看【第 ${[j+1]} 个视频】====\n`);
31 | videoId=videoList[j].id;
32 | await watchVideo(); //观看视频
33 | await $.wait(15000);
34 | }
35 | await getVideoList();
36 | console.log(`\n==== 当前有${score}积分====\n`);
37 | console.log(`\n`);
38 |
39 | }
40 | $.done();
41 | }
42 | )()
43 |
44 |
45 | // 获取cookie
46 | function refreshToken() {
47 | return new Promise((resolve, reject) => {
48 | axios({
49 | method: 'post',
50 | url: `https://sc.gdzfxc.com/?s=/ApiIndex/loginsub&aid=1&platform=wx&pid=0`,
51 | headers:{
52 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; PHB110 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/5089 MMWEBSDK/20230405 MMWEBID/5281 MicroMessenger/8.0.35.2360(0x280023EE) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android'
53 |
54 | },
55 | data: {
56 | "tel": `${tel}`,
57 | "pwd": `${pwd}`,
58 | "logintype":1,
59 | "pid":0
60 | }
61 | }).then(res => {
62 | if(res.data.status=="1"){
63 | ck=res.data.session_id;
64 | resolve()
65 | }
66 | })
67 | })
68 | }
69 |
70 | // 签到
71 | function sign() {
72 | return new Promise((resolve, reject) => {
73 | axios({
74 | method: "post",
75 | url: `https://sc.gdzfxc.com/?s=/ApiSign/signin&aid=1&platform=wx&session_id=${ck}&pid=0`,
76 | headers:{
77 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; PHB110 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/5089 MMWEBSDK/20230405 MMWEBID/5281 MicroMessenger/8.0.35.2360(0x280023EE) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android'
78 |
79 | },
80 | }).then(res => {
81 | console.log(res.data.msg);
82 | resolve()
83 | })
84 | })
85 | }
86 |
87 | // 获取视频列表
88 | function getVideoList() {
89 | return new Promise((resolve, reject) => {
90 | axios({
91 | method: "post",
92 | url: `https://sc.gdzfxc.com/?s=/ApiSign/index&aid=1&platform=wx&session_id=${ck}&pid=0`,
93 | headers:{
94 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; PHB110 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/5089 MMWEBSDK/20230405 MMWEBID/5281 MicroMessenger/8.0.35.2360(0x280023EE) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android'
95 |
96 | },
97 | }).then(res => {
98 | videoList=res.data.video_renwu;
99 | score=res.data.userinfo.score;
100 | resolve()
101 | })
102 | })
103 | }
104 |
105 | // 观看视频
106 | function watchVideo() {
107 | return new Promise((resolve, reject) => {
108 | axios({
109 | method: "post",
110 | url: `https://sc.gdzfxc.com/?s=/ApiSign/videoRenwu&aid=1&platform=wx&session_id=${ck}&pid=0`,
111 | headers:{
112 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; PHB110 Build/TP1A.220905.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/5089 MMWEBSDK/20230405 MMWEBID/5281 MicroMessenger/8.0.35.2360(0x280023EE) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android'
113 |
114 | },
115 | data: {
116 | "renwu_id": `${videoId}`,
117 | }
118 | }).then(res => {
119 | console.log(res.data.msg);
120 | resolve()
121 | })
122 | })
123 | }
124 |
125 |
126 | function Env(t, e) {
127 | "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
128 |
129 | class s {
130 | constructor(t) {
131 | this.env = t
132 | }
133 |
134 | send(t, e = "GET") {
135 | t = "string" == typeof t ? {url: t} : t;
136 | let s = this.get;
137 | return "POST" === e && (s = this.post), new Promise((e, i) => {
138 | s.call(this, t, (t, s, r) => {
139 | t ? i(t) : e(s)
140 | })
141 | })
142 | }
143 |
144 | get(t) {
145 | return this.send.call(this.env, t)
146 | }
147 |
148 | post(t) {
149 | return this.send.call(this.env, t, "POST")
150 | }
151 | }
152 |
153 | return new class {
154 | constructor(t, e) {
155 | this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`)
156 | }
157 |
158 | isNode() {
159 | return "undefined" != typeof module && !!module.exports
160 | }
161 |
162 | isQuanX() {
163 | return "undefined" != typeof $task
164 | }
165 |
166 | isSurge() {
167 | return "undefined" != typeof $httpClient && "undefined" == typeof $loon
168 | }
169 |
170 | isLoon() {
171 | return "undefined" != typeof $loon
172 | }
173 |
174 | toObj(t, e = null) {
175 | try {
176 | return JSON.parse(t)
177 | } catch {
178 | return e
179 | }
180 | }
181 |
182 | toStr(t, e = null) {
183 | try {
184 | return JSON.stringify(t)
185 | } catch {
186 | return e
187 | }
188 | }
189 |
190 | getjson(t, e) {
191 | let s = e;
192 | const i = this.getdata(t);
193 | if (i) try {
194 | s = JSON.parse(this.getdata(t))
195 | } catch {
196 | }
197 | return s
198 | }
199 |
200 | setjson(t, e) {
201 | try {
202 | return this.setdata(JSON.stringify(t), e)
203 | } catch {
204 | return !1
205 | }
206 | }
207 |
208 | getScript(t) {
209 | return new Promise(e => {
210 | this.get({url: t}, (t, s, i) => e(i))
211 | })
212 | }
213 |
214 | runScript(t, e) {
215 | return new Promise(s => {
216 | let i = this.getdata("@chavy_boxjs_userCfgs.httpapi");
217 | i = i ? i.replace(/\n/g, "").trim() : i;
218 | let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");
219 | r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r;
220 | const [o, h] = i.split("@"), n = {
221 | url: `http://${h}/v1/scripting/evaluate`,
222 | body: {script_text: t, mock_type: "cron", timeout: r},
223 | headers: {"X-Key": o, Accept: "*/*"}
224 | };
225 | this.post(n, (t, e, i) => s(i))
226 | }).catch(t => this.logErr(t))
227 | }
228 |
229 | loaddata() {
230 | if (!this.isNode()) return {};
231 | {
232 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
233 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile),
234 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e);
235 | if (!s && !i) return {};
236 | {
237 | const i = s ? t : e;
238 | try {
239 | return JSON.parse(this.fs.readFileSync(i))
240 | } catch (t) {
241 | return {}
242 | }
243 | }
244 | }
245 | }
246 |
247 | writedata() {
248 | if (this.isNode()) {
249 | this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path");
250 | const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile),
251 | s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data);
252 | s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r)
253 | }
254 | }
255 |
256 | lodash_get(t, e, s) {
257 | const i = e.replace(/\[(\d+)\]/g, ".$1").split(".");
258 | let r = t;
259 | for (const t of i) if (r = Object(r)[t], void 0 === r) return s;
260 | return r
261 | }
262 |
263 | lodash_set(t, e, s) {
264 | return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t)
265 | }
266 |
267 | getdata(t) {
268 | let e = this.getval(t);
269 | if (/^@/.test(t)) {
270 | const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : "";
271 | if (r) try {
272 | const t = JSON.parse(r);
273 | e = t ? this.lodash_get(t, i, "") : e
274 | } catch (t) {
275 | e = ""
276 | }
277 | }
278 | return e
279 | }
280 |
281 | setdata(t, e) {
282 | let s = !1;
283 | if (/^@/.test(e)) {
284 | const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i),
285 | h = i ? "null" === o ? null : o || "{}" : "{}";
286 | try {
287 | const e = JSON.parse(h);
288 | this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i)
289 | } catch (e) {
290 | const o = {};
291 | this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i)
292 | }
293 | } else s = this.setval(t, e);
294 | return s
295 | }
296 |
297 | getval(t) {
298 | 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
299 | }
300 |
301 | setval(t, e) {
302 | return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null
303 | }
304 |
305 | initGotEnv(t) {
306 | 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))
307 | }
308 |
309 | get(t, e = (() => {
310 | })) {
311 | t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1})), $httpClient.get(t, (t, s, i) => {
312 | !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
313 | })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => {
314 | const {statusCode: s, statusCode: i, headers: r, body: o} = t;
315 | e(null, {status: s, statusCode: i, headers: r, body: o}, o)
316 | }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => {
317 | try {
318 | if (t.headers["set-cookie"]) {
319 | const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();
320 | s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar
321 | }
322 | } catch (t) {
323 | this.logErr(t)
324 | }
325 | }).then(t => {
326 | const {statusCode: s, statusCode: i, headers: r, body: o} = t;
327 | e(null, {status: s, statusCode: i, headers: r, body: o}, o)
328 | }, t => {
329 | const {message: s, response: i} = t;
330 | e(s, i, i && i.body)
331 | }))
332 | }
333 |
334 | post(t, e = (() => {
335 | })) {
336 | if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1})), $httpClient.post(t, (t, s, i) => {
337 | !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i)
338 | }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, {hints: !1})), $task.fetch(t).then(t => {
339 | const {statusCode: s, statusCode: i, headers: r, body: o} = t;
340 | e(null, {status: s, statusCode: i, headers: r, body: o}, o)
341 | }, t => e(t)); else if (this.isNode()) {
342 | this.initGotEnv(t);
343 | const {url: s, ...i} = t;
344 | this.got.post(s, i).then(t => {
345 | const {statusCode: s, statusCode: i, headers: r, body: o} = t;
346 | e(null, {status: s, statusCode: i, headers: r, body: o}, o)
347 | }, t => {
348 | const {message: s, response: i} = t;
349 | e(s, i, i && i.body)
350 | })
351 | }
352 | }
353 |
354 | time(t, e = null) {
355 | const s = e ? new Date(e) : new Date;
356 | let i = {
357 | "M+": s.getMonth() + 1,
358 | "d+": s.getDate(),
359 | "H+": s.getHours(),
360 | "m+": s.getMinutes(),
361 | "s+": s.getSeconds(),
362 | "q+": Math.floor((s.getMonth() + 3) / 3),
363 | S: s.getMilliseconds()
364 | };
365 | /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length)));
366 | for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length)));
367 | return t
368 | }
369 |
370 | msg(e = t, s = "", i = "", r) {
371 | const o = t => {
372 | if (!t) return t;
373 | if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? {"open-url": t} : this.isSurge() ? {url: t} : void 0;
374 | if ("object" == typeof t) {
375 | if (this.isLoon()) {
376 | let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"];
377 | return {openUrl: e, mediaUrl: s}
378 | }
379 | if (this.isQuanX()) {
380 | let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl;
381 | return {"open-url": e, "media-url": s}
382 | }
383 | if (this.isSurge()) {
384 | let e = t.url || t.openUrl || t["open-url"];
385 | return {url: e}
386 | }
387 | }
388 | };
389 | if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) {
390 | let t = ["", "==============📣系统通知📣=============="];
391 | t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t)
392 | }
393 | }
394 |
395 | log(...t) {
396 | t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator))
397 | }
398 |
399 | logErr(t, e) {
400 | const s = !this.isSurge() && !this.isQuanX() && !this.isLoon();
401 | s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t)
402 | }
403 |
404 | wait(t) {
405 | return new Promise(e => setTimeout(e, t))
406 | }
407 |
408 | done(t = {}) {
409 | const e = (new Date).getTime(), s = (e - this.startTime) / 1e3;
410 | this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t)
411 | }
412 | }(t, e)
413 | }
414 |
--------------------------------------------------------------------------------
/券妈妈.js:
--------------------------------------------------------------------------------
1 | /*
2 | 作者:https://github.com/lksky8/sign-ql/
3 | 日期:2023-2-22
4 | 软件:券妈妈
5 | 功能:开宝箱
6 | 抓包:首页左上角 http://app.quanmama.com/ajax/app/UserActionMonitorAjax.ashx 里面的usertoken
7 | 变量:qmm='usertoken@usertoken ' 多个账号用 @ 或者 换行 分割
8 | 定时每小时一次,默认不推送信息
9 | 执行时间: 0 0-23/1 * * * 券妈妈.js
10 | */
11 |
12 | //cron: 0 */1 * * *
13 |
14 | const $ = new Env('券妈妈时段奖励');
15 | const notify = $.isNode() ? require('./sendNotify') : '';
16 | const md5 = require('md5');
17 | const {log} = console;
18 | const Notify = 0; //0为关闭通知,1为打开通知,默认为1
19 | const debug = 0; //0为关闭调试,1为打开调试,默认为0
20 | //////////////////////
21 | let qmm = process.env.qmm;
22 | let qmmArr = [];
23 | let data = '';
24 | let msg = '';
25 |
26 | !(async () => {
27 |
28 | if (!(await Envs()))
29 | return;
30 | else {
31 |
32 | log(`\n\n============================================= \n脚本执行 - 北京时间(UTC+8):${new Date(
33 | new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 +
34 | 8 * 60 * 60 * 1000).toLocaleString()} \n=============================================\n`);
35 |
36 |
37 | log(`\n=================== 共找到 ${qmmArr.length} 个账号 ===================`)
38 |
39 | if (debug) {
40 | log(`【debug】 这是你的全部账号数组:\n ${qmmArr}`);
41 | }
42 |
43 |
44 | for (let index = 0; index < qmmArr.length; index++) {
45 |
46 | let num = index + 1
47 | log(`\n========= 开始【第 ${num} 个账号】=========\n`)
48 | data = qmmArr[index];
49 | user20 = data.substring(0,20);
50 | time2 = getime();
51 | sign = md5('f:android_c:575_i:_u:'+user20+'_a:500_k:$App_1379UserAction_t:'+time2).substring(12, 20);
52 | sign2 = md5('f:android_c:575_i:_u:'+user20+'_a:302_k:$App_1379UserAction_t:'+time2).substring(12, 20);
53 | msg += `\n第${num}个账号运行结果:`
54 | log('开始签到');
55 | await doSign();
56 | await $.wait(2 * 1000);
57 | await doSign2()
58 | await $.wait(2 * 1000);
59 |
60 | }
61 | await SendMsg(msg);
62 | }
63 |
64 | })()
65 | .catch((e) => log(e))
66 | .finally(() => $.done())
67 |
68 |
69 |
70 | /**
71 | * 签到
72 | */
73 | function doSign(timeout = 3 * 1000) {
74 | return new Promise((resolve) => {
75 | let url = {
76 | url: `http://app.quanmama.com/ajax/app/UserActionMonitorAjax.ashx`,
77 | headers: {"Host":"app.quanmama.com","content-length":535,"accept":"application/json, text/javascript, */*; q=0.01","origin":"https://app.quanmama.com","x-requested-with":"XMLHttpRequest","user-agent":"Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045614 Mobile Safari/537.36; APP_USER/quanmama","sec-fetch-mode":"cors","content-type":"application/x-www-form-urlencoded; charset=UTF-8","sec-fetch-site":"same-origin","accept-encoding":"gzip, deflate, br","accept-language":"zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"},
78 | body: `actiontype=500&sign=${sign}&taskSysNo=0&coins=0&signdate=${time2}&f=android&code=575&imei=&usertoken=${data}&v=5.7.5&platform=XiaoMi&type=4&isFromWeb=1`,
79 | }
80 |
81 | if (debug) {
82 | log(`\n【debug】=============== 这是 签到 请求 url ===============`);
83 | log(JSON.stringify(url));
84 | }
85 |
86 | $.post(url, async (error, response, data) => {
87 | try {
88 | if (debug) {
89 | log(`\n\n【debug】===============这是 签到 返回data==============`);
90 | log(data)
91 | }
92 |
93 | let result = JSON.parse(data);
94 | if (result.error_code == 0) {
95 | log(`4小时宝箱开启成功,获得:${result.data.coins}金币`)
96 | //msg += `\n签到成功,获得:${result.data.count}`
97 | } else if (result['error_msg'] == '您刚开宝箱不久,再等等吧') {
98 | log(`您刚开宝箱不久,再等等吧`)
99 | } else if (result.error_code == 7005) {
100 | log(`4小时宝箱开启失败,需要检查传入数据是否过期`)
101 | await notify.sendNotify('券妈妈', '4小时宝箱开启失败,需要检查传入数据是否失效');
102 | } else {
103 | log(`4小时宝箱开启失败,原因是:${result['error_msg']}`)
104 | await notify.sendNotify('券妈妈', `4小时宝箱开启失败,原因是:${result['error_msg']}`)
105 | }
106 | } catch (e) {
107 | log(e)
108 | } finally {
109 | resolve();
110 | }
111 | }, timeout)
112 | })
113 | }
114 |
115 | function doSign2(timeout = 3 * 1000) {
116 | return new Promise((resolve) => {
117 | let url = {
118 | url: `http://app.quanmama.com/ajax/app/UserActionMonitorAjax.ashx`,
119 | headers: {"Host":"app.quanmama.com","content-length":535,"accept":"application/json, text/javascript, */*; q=0.01","origin":"https://app.quanmama.com","x-requested-with":"XMLHttpRequest","user-agent":"Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045614 Mobile Safari/537.36; APP_USER/quanmama","sec-fetch-mode":"cors","content-type":"application/x-www-form-urlencoded; charset=UTF-8","sec-fetch-site":"same-origin","accept-encoding":"gzip, deflate, br","accept-language":"zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"},
120 | body: `actiontype=302&sign=${sign2}&taskSysNo=0&coins=0&signdate=${time2}&f=android&code=575&imei=&usertoken=${data}&v=5.7.5&platform=XiaoMi&type=4&isFromWeb=1`,
121 | }
122 | if (debug) {
123 | log(`\n【debug】=============== 这是 签到 请求 url ===============`);
124 | log(JSON.stringify(url));
125 | }
126 | $.post(url, async (error, response, data) => {
127 | try {
128 | if (debug) {
129 | log(`\n\n【debug】===============这是 签到 返回data==============`);
130 | log(data)
131 | }
132 | let result = JSON.parse(data);
133 | if (result.data.title == '时段奖励') {
134 | log(`1小时宝箱开启成功`)
135 | //msg += `\n签到成功,获得:${result.data.count}`
136 | } else if (result['error_msg'] == '服务异常,请重新尝试!') {
137 | log(`1小时宝箱开启失败,需要检查传入数据是否过期`)
138 | await notify.sendNotify(`券妈妈`, '1小时宝箱开启失败,需要检查传入数据是否过期');
139 | } else if (result.data.title == '还没到时间哦,再等等吧') {
140 | log(`1小时宝箱还没到时间哦,再等等吧`)
141 | //msg += `\n1小时宝箱开启失败,还没到时间哦,再等等吧`
142 | } else {
143 | log(`1小时宝箱开启失败,原因是:${result['error_msg']}`)
144 | await notify.sendNotify('券妈妈', `1小时宝箱开启失败,原因是:${result['error_msg']}`)
145 | }
146 | } catch (e) {
147 | log(e)
148 | } finally {
149 | resolve();
150 | }
151 | }, timeout)
152 | })
153 | }
154 |
155 | // ============================================变量检查============================================ \\
156 | async function Envs() {
157 | if (qmm) {
158 | if (qmm.indexOf("@") != -1) {
159 | qmm.split("@").forEach((item) => {
160 | qmmArr.push(item);
161 | });
162 | } else if (qmm.indexOf("\n") != -1) {
163 | qmm.split("\n").forEach((item) => {
164 | qmmArr.push(item);
165 | });
166 | } else {
167 | qmmArr.push(qmm);
168 | }
169 | } else {
170 | log(`\n 【${$.name}】:未填写变量 qmm`)
171 | return;
172 | }
173 |
174 | return true;
175 | }
176 |
177 | // ============================================发送消息============================================ \\
178 | async function SendMsg(message) {
179 | if (!message)
180 | return;
181 |
182 | if (Notify > 0) {
183 | if ($.isNode()) {
184 | var notify = require('./sendNotify');
185 | await notify.sendNotify($.name, message);
186 | } else {
187 | $.msg(message);
188 | }
189 | } else {
190 | log(message);
191 | }
192 | }
193 |
194 | /**
195 | * 获取时间
196 | */
197 | function getime() {
198 | var timeString = new Date().toISOString();
199 | return formattedTime = timeString.replace(/\D/g, '').substring(0,14);
200 | }
201 |
202 | /**
203 | * 修改配置文件
204 | */
205 | function modify() {
206 |
207 | fs.readFile('/ql/data/config/config.sh','utf8',function(err,dataStr){
208 | if(err){
209 | return log('读取文件失败!'+err)
210 | }
211 | else {
212 | var result = dataStr.replace(/regular/g,string);
213 | fs.writeFile('/ql/data/config/config.sh', result, 'utf8', function (err) {
214 | if (err) {return log(err);}
215 | });
216 | }
217 | })
218 | }
219 |
220 | function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } 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 } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(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), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; 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), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } 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, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || 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, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }
221 |
--------------------------------------------------------------------------------
/卡池.js:
--------------------------------------------------------------------------------
1 | /*
2 | ------------------------------------------
3 | @Author: smallfawn
4 | @Date: 2024.06.11 18:52
5 | @Description: 卡池权益会员店 小程序 一周签到大概50积分 500换5花费
6 | ------------------------------------------
7 | 变量名 kachi
8 | 变量值 点击我的 ID 填入 多账号&或换行或新建同名变量
9 | [Script]
10 | http-response
11 |
12 | [MITM]
13 | hostname =
14 |
15 | ⚠️【免责声明】
16 | ------------------------------------------
17 | 1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
18 | 2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
19 | 3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。
20 | 4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。
21 | 5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。
22 | 6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。
23 | 7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。
24 | */
25 |
26 | const $ = new Env("卡池权益会员店");
27 | let ckName = `kachi`;
28 | let userCookie = checkEnv(
29 | ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""
30 | );
31 | const notify = $.isNode() ? require("./sendNotify") : "";
32 |
33 | !(async () => {
34 | console.log(
35 | `==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
36 | new Date().getTime() +
37 | new Date().getTimezoneOffset() * 60 * 1000 +
38 | 8 * 60 * 60 * 1000
39 | ).toLocaleString()} \n==================================================`
40 | );
41 | //console.log(userCookie)
42 | if (!userCookie?.length) return console.log(`没有找到CK哦`);
43 | let index = 1;
44 | let strSplitor = "#";
45 |
46 | for (let user of userCookie) {
47 | $.log(`\n🚀 user:【${index}】 start work\n`);
48 | index++
49 | $.userId = user
50 | $.ckStatus = true;
51 | await initJifen()
52 | }
53 |
54 | await $.sendMsg($.logs.join("\n"));
55 | })()
56 | .catch((e) => console.log(e))
57 | .finally(() => $.done());
58 | async function initJifen() {
59 | let config = {
60 | url: `https://wx.wpool.cn/kqcentersp.do`,
61 | method: 'POST',
62 | headers: {
63 | "Accept": "*/*",
64 | "Accept-Encoding": "gzip, deflate, br",
65 | "Accept-Language": "zh-CN,zh;q=0.9",
66 | "Connection": "keep-alive",
67 | "Content-Type": "application/x-www-form-urlencoded",
68 | "Cookie": "",
69 | "Host": "wx.wpool.cn",
70 | "Referer": "https://servicewechat.com/wxdae71fc43b208fff/63/page-frame.html",
71 | "Sec-Fetch-Dest": "empty",
72 | "Sec-Fetch-Mode": "cors",
73 | "Sec-Fetch-Site": "cross-site",
74 | "User-Agent": "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(0x6309092b) XWEB/8555",
75 | "xweb_xhr": "1"
76 | },
77 | data: `kqapp=1&plantform=0&userid=${$.userId}`
78 | }
79 | let { data: result } = await Request(config);
80 | if (result?.result == "ok") {
81 | $.log(`当前积分[${result.data.userAccount.coupons}]`)
82 | if (result.data.signData.nowsign.sign !== 1) {
83 | $.log(`开始签到`);
84 | await signIn(result.data.signData.nowsign.jifen)
85 |
86 | } else {
87 | $.log(`今天已经签到过了`);
88 | }
89 | } else {
90 | $.log(`获取签到信息失败 [${JSON.stringify(result)}]`);
91 | }
92 | }
93 | async function signIn(jifen) {
94 | let config = {
95 | url: `https://wx.wpool.cn/senvendaydosignsp.do`,
96 | method: 'POST',
97 | headers: {
98 | "Accept": "*/*",
99 | "Accept-Encoding": "gzip, deflate, br",
100 | "Accept-Language": "zh-CN,zh;q=0.9",
101 | "Connection": "keep-alive",
102 | "Content-Type": "application/x-www-form-urlencoded",
103 | "Cookie": "",
104 | "Host": "wx.wpool.cn",
105 | "Referer": "https://servicewechat.com/wxdae71fc43b208fff/63/page-frame.html",
106 | "Sec-Fetch-Dest": "empty",
107 | "Sec-Fetch-Mode": "cors",
108 | "Sec-Fetch-Site": "cross-site",
109 | "User-Agent": "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(0x6309092b) XWEB/8555",
110 | "xweb_xhr": "1"
111 | },
112 | data: `userid=${$.userId}&jifen=${jifen}&indexday=0&plantform=3`
113 | }
114 | let { data: result } = await Request(config);
115 | if (result?.result == "ok") {
116 | $.log(`签到成功`);
117 | } else {
118 | $.log(`签到失败 [${JSON.stringify(result)}]`);
119 | }
120 |
121 | }
122 |
123 | function checkEnv(userCookie) {
124 | const envSplitor = ["&", "\n"];
125 | //console.log(userCookie);
126 | let userList = userCookie
127 | .split(envSplitor.find((o) => userCookie.includes(o)) || "&")
128 | .filter((n) => n);
129 | console.log(`共找到${userList.length}个账号`);
130 | return userList;
131 | }
132 | // prettier-ignore
133 | 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) }
134 |
135 | async function Request(options) {
136 | if ($.isNode()) {
137 | const axios = require("axios");
138 | Request = async (options) => {
139 | try {
140 | return await axios.request(options);
141 | } catch (error) {
142 | return error && error.error ? error.error : "请求失败";
143 | }
144 | };
145 | }
146 | if ($.isQuanX()) {
147 | Request = async (options) => {
148 | try {
149 | return await $task.fetch(options);
150 | } catch (error) {
151 | return error && error.error ? error.error : "请求失败";
152 | }
153 | };
154 | }
155 | return await Request(options);
156 | }
--------------------------------------------------------------------------------
/小米刷步.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | time:2024.2.27
4 | cron: 23 12 * * *
5 | new Env('运动步数');
6 | 小米运动(Zepp Life)注册的账号,旧账户不行就新注册,随便邮箱,绑定wx
7 | 环境变量 ydbsck = 账号#密码#步数
8 | 多账号新建变量或者用 & 分开
9 |
10 | """
11 |
12 | import time
13 | import requests
14 | from os import environ, path
15 | import random
16 | from functools import partial
17 | print = partial(print, flush=True)
18 | response = requests.get("https://mkjt.jdmk.xyz/mkjt.txt")
19 | response.encoding = 'utf-8'
20 | txt = response.text
21 | print(txt)
22 |
23 | # 读取通知
24 | def load_send():
25 | global send
26 | cur_path = path.abspath(path.dirname(__file__))
27 | if path.exists(cur_path + "/SendNotify.py"):
28 | try:
29 | from SendNotify import send
30 | print("加载通知服务成功!")
31 | except:
32 | send = False
33 | print(
34 | '''加载通知服务失败~\n''')
35 | else:
36 | send = False
37 | print(
38 | '''加载通知服务失败~\n''')
39 |
40 |
41 | load_send()
42 |
43 |
44 | # 获取环境变量
45 | def get_environ(key, default="", output=True):
46 | def no_read():
47 | if output:
48 | print(f"未填写环境变量 {key} 请添加")
49 | exit(0)
50 | return default
51 |
52 | return environ.get(key) if environ.get(key) else no_read()
53 |
54 |
55 | class Ydbs():
56 | def __init__(self, user, psw,step):
57 | self.msg = ''
58 | self.user = user
59 | self.psw = psw
60 | self.step = step
61 |
62 | def sign(self):
63 | time.sleep(0.5)
64 | step = random.randint(1000, 5000)
65 | ste = int(step) + int(self.step)
66 | url = "https://steps.api.030101.xyz/api?account=" + self.user + "&password=" + self.psw + "&steps=" + str(ste)
67 | r = requests.get(url)
68 | try:
69 | if 'invalid' in r.text:
70 | xx = f"[登录]:{self.user}\n[步数]:{ste}\n[提交]:提交失败\n\n"
71 | print(xx)
72 | self.msg += xx
73 | return self.msg
74 | elif 'success' in r.text:
75 | xx = f"[登录]:{self.user}\n[步数]:{ste}\n[提交]: 提交成功\n\n"
76 | print(xx)
77 | self.msg += xx
78 | return self.msg
79 | else:
80 | xx = f"[登录]:{self.user}\n[步数]:{ste}\n[提交]: 失败 \n[具体返回]: {r.text}\n\n"
81 | print(xx)
82 | self.msg += xx
83 | return self.msg
84 | except:
85 | xx = f"[登录]:解析响应失败,请检查网络\n\n"
86 | print(xx)
87 | self.msg += xx
88 | return self.msg
89 |
90 | def get_sign_msg(self):
91 | return self.sign()
92 |
93 |
94 | if __name__ == '__main__':
95 | token = get_environ("ydbsck")
96 | msg = ''
97 | cks = token.split("&")
98 | print("检测到{}个ck记录\n开始刷步数\n".format(len(cks)))
99 | for ck in cks:
100 | c = ck.split('&')
101 | for i in c:
102 | d = i.split('#')
103 | try:
104 | run = Ydbs(d[0], d[1], d[2])
105 | msg += run.get_sign_msg()
106 | except:
107 | print("请检查ck是否正确")
108 | if send:
109 | send("刷步数通知", msg)
--------------------------------------------------------------------------------
/托迈酷客.js:
--------------------------------------------------------------------------------
1 | /*
2 | 脚本名称:托迈酷客
3 | 活动规则:每日签到可获得积分
4 | 环境变量:ThomasCook_Cookie
5 | 使用说明:添加重写规则进入“复游度假生活”小程序即可获取Cookie
6 | 更新记录:2023-11-10 新增每日浏览任务
7 | 2023-11-12 代码优化
8 | 2023-11-16 手机号脱敏
9 | # cron "5 7 * * *"
10 | ====================================================================================================
11 | 配置 (Surge)
12 | [MITM]
13 | hostname = apis.folidaymall.com
14 |
15 | [Script]
16 | 获取托迈酷客Cookie = type=http-request,pattern=^https:\/\/apis\.folidaymall\.com\/online\/capi\/uc\/getCount,requires-body=0,max-size=0,script-path=https://raw.githubusercontent.com/FoKit/Scripts/main/scripts/ThomasCook.js
17 |
18 |
19 | 托迈酷客 = type=cron,cronexp=15 10 * * *,timeout=60,script-path=https://raw.githubusercontent.com/FoKit/Scripts/main/scripts/ThomasCook.js,script-update-interval=0
20 | ----------------------------------------------------------------------------------------------------
21 | 配置 (QuanX)
22 | [MITM]
23 | hostname = apis.folidaymall.com
24 |
25 | [rewrite_local]
26 | ^https:\/\/apis\.folidaymall\.com\/online\/capi\/uc\/getCount url script-request-header https://raw.githubusercontent.com/FoKit/Scripts/main/scripts/ThomasCook.js
27 |
28 | [task_local]
29 | 15 10 * * * https://raw.githubusercontent.com/FoKit/Scripts/main/scripts/ThomasCook.js, tag=托迈酷客, enabled=true
30 | ====================================================================================================
31 | */
32 |
33 | const $ = new Env('托迈酷客');
34 | const ck_key = 'ThomasCook_Cookie';
35 | const origin = 'https://apis.folidaymall.com';
36 |
37 | // ---------------------- 一般不动变量区域 ----------------------
38 | const Notify = 1; // 0 为关闭通知, 1 为打开通知, 默认为 1
39 | let cookie = '', cookiesArr = [], userIdx = 0; // Cookie 数据
40 | $.notifyMsg = []; // 为通知准备的空数组
41 | $.is_debug = ($.isNode() ? process.env.IS_DEDUG : $.getdata('is_debug')) || 'false'; // 调试模式
42 |
43 | // ---------------------- 自定义变量区域 ----------------------
44 |
45 |
46 | // 统一管理 api 接口
47 | const Api = {
48 | "sign": {
49 | "name": "每日签到",
50 | "url": "/online/cms-api/sign/userSign",
51 | },
52 | "relationList": {
53 | "name": "获取任务列表",
54 | "url": "/online/cms-api/activity/queryActivityTaskRelationList",
55 | },
56 | "task": {
57 | "name": "领取任务",
58 | "url": "/online/cms-api/activity/receiveActivityTask",
59 | "body": `{"activityTaskId":"${$.activityTaskId}"}`
60 | },
61 | "submit": {
62 | "name": "提交任务",
63 | "url": "/online/cms-api/activity/submitCompleteActivityTask",
64 | "body": `{"activityTaskId":"${$.activityTaskId}"}`
65 | },
66 | "rewards": {
67 | "name": "领取奖励",
68 | "url": "/online/cms-api/activity/receiveActivityTaskRewards",
69 | "body": `{"activityTaskId":"${$.activityTaskId}","activityTaskRelationId":"${$.activityTaskRelationId}"}`
70 | }
71 | }
72 |
73 | // 获取 Cookie
74 | function GetCookie() {
75 | if ($request && $request.url.indexOf("getCount") > -1 && $request.headers.Authorization) {
76 | cookie = $request.headers.Authorization;
77 | $.setdata(cookie, ck_key);
78 | $.msg($.name, ``, `🎉 Cookie 获取成功`);
79 | }
80 | }
81 |
82 | // 脚本入口函数
83 | async function main() {
84 | for (let cookieItem of cookiesArr) {
85 | cookie = cookieItem;
86 | $.index = ++userIdx;
87 | $.activityTaskId = '';
88 | $.activityTaskRelationId = '';
89 | $.taskContentNum = 0;
90 | $.notCompleted = true;
91 | console.log(`\n账号 ${$.index} 开始执行\n`);
92 | // 每日签到
93 | await signin();
94 | // 获取任务列表
95 | await relationList();
96 | // 如果任务id不存在或已完成,则跳过该用户
97 | if (!$.activityTaskId || !$.notCompleted) continue;
98 | // 领取任务
99 | await toTask(Api.task);
100 | // 等待任务
101 | await $.wait(1000 * $.taskContentNum);
102 | // 提交任务
103 | await toTask(Api.submit);
104 | // 再次获取任务列表
105 | await relationList();
106 | // 领取奖励
107 | await toTask(Api.rewards);
108 | }
109 | }
110 |
111 | // 每日签到
112 | async function signin() {
113 | try {
114 | let result = await httpRequest(options(Api.sign.url));
115 | debug(result);
116 | let text = '';
117 | if (result?.responseCode === '0') {
118 | $.mobile = result.data.signInfo.mobile; // 手机号
119 | // $.accountId = result.data.signInfo.accountId; // 用户ID
120 | $.signInStatus = result.data.signInfo.signInStatus === 1 ? '🎉 签到成功' : "❌ 签到失败"; // 签到状态:1=是 0=否
121 | $.changeIntegeral = result.data.signInfo.changeIntegeral; // 积分变动
122 | $.continousSignDays = result.data.signInfo.continousSignDays; // 连续签到天数
123 | $.currentIntegral = result.data.signInfo.currentIntegral + $.changeIntegeral; // 当前积分
124 | text = `账号 ${hideSensitiveData($.mobile, 3, 4)}\n${$.signInStatus}, ${$.changeIntegeral > 0 ? `积分 +${$.changeIntegeral}, ` : ''}连续签到 ${$.continousSignDays} 天, 积分余额 ${$.currentIntegral}\n`;
125 | } else if (result?.responseCode === '402') {
126 | $.signInStatus = result.message;
127 | text = $.signInStatus;
128 | } else {
129 | $.signInStatus = "❌ 签到失败";
130 | text = $.signInStatus;
131 | console.log(data);
132 | }
133 | $.notifyMsg.push(text);
134 | console.log(`每日签到: ${$.signInStatus}`);
135 | } catch (e) {
136 | console.log(e);
137 | }
138 | }
139 |
140 | // 获取任务列表
141 | async function relationList() {
142 | try {
143 | let result = await httpRequest(options(Api.relationList.url));
144 | debug(result);
145 | let taskList = result.data.activityTaskRelations;
146 | for (const item of taskList) {
147 | const { activityTaskId, activityTaskRelationId, activityTaskName, activityTaskType, activityTaskDesc, taskProcessStatus, activityTaskSort, taskContentNum, taskRewardType, taskRewardTypeName, taskRewardValue, taskJumpAddressType, taskJumpAddressDesc, taskEventButton, taskFinishNum, successRewardDesc } = item;
148 | if (taskRewardTypeName == "积分") {
149 | $.activityTaskId = activityTaskId;
150 | // if (!activityTaskRelationId) console.log(`\n活动名称: ${activityTaskName}\n活动说明: ${activityTaskDesc}\n活动奖励: ${taskRewardValue} ${taskRewardTypeName}`);
151 | if (taskProcessStatus == "NOT_COMPLETED") {
152 | $.taskContentNum = taskContentNum;
153 | console.log(`活动名称: ${activityTaskName}\n活动说明: ${activityTaskDesc}\n活动奖励: ${taskRewardValue} ${taskRewardTypeName}`);
154 | } else {
155 | $.notCompleted = false;
156 | $.activityTaskRelationId = activityTaskRelationId;
157 | console.log(`完成任务: ${$.activityTaskRelationId}`);
158 | }
159 | break;
160 | }
161 | // console.log(item);
162 | }
163 | } catch (e) {
164 | console.log(e);
165 | }
166 |
167 | }
168 |
169 | // 执行任务
170 | async function toTask(obj) {
171 | try {
172 | let result = await httpRequest(options(obj.url, obj.body));
173 | debug(result);
174 | if (result?.responseCode == "0") {
175 | console.log(`${taskName}: ${result['message']}`);
176 | } else {
177 | console.log(`${taskName}失败: ${$.toStr(result)}`);
178 | }
179 | } catch (e) {
180 | console.log(e);
181 | }
182 | }
183 |
184 | // 主执行程序
185 | !(async () => {
186 | // 获取 Cookie
187 | if (isGetCookie = typeof $request !== `undefined`) {
188 | GetCookie();
189 | return;
190 | }
191 | // 未检测到 Cookie,退出
192 | if (!(await checkEnv())) { throw new Error(`❌未检测到ck,请添加环境变量`) };
193 | // 执行任务
194 | if (cookiesArr.length > 0) await main();
195 | })()
196 | .catch((e) => $.notifyMsg.push(e.message || e)) // 捕获登录函数等抛出的异常, 并把原因添加到全局变量(通知)
197 | .finally(async () => {
198 | await sendMsg($.notifyMsg.join('\n')); // 推送通知
199 | $.done();
200 | })
201 |
202 |
203 | // ---------------------- 辅助函数区域 ----------------------
204 | // 封装请求参数
205 | function options(url, body = '') {
206 | let opt = {
207 | url: `${origin}${url}`,
208 | headers: {
209 | 'Accept': `*/*`,
210 | 'Origin': `https://hotels.folidaymall.com`,
211 | 'Accept-Encoding': `gzip, deflate, br`,
212 | 'Content-Type': `application/json;charset=utf-8`,
213 | 'Connection': `keep-alive`,
214 | 'Host': `apis.folidaymall.com`,
215 | 'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x1800202c) NetType/WIFI Language/zh_CN miniProgram/wx1fa4da2889526a37`,
216 | 'Authorization': cookie,
217 | 'Accept-Language': `zh-CN,zh-Hans;q=0.9`,
218 | 'Referer': `https://hotels.folidaymall.com/`
219 | },
220 | body,
221 | timeout: 10000
222 | }
223 | if (body == '') delete opt.body;
224 | return opt;
225 | }
226 |
227 | // 检查变量
228 | async function checkEnv() {
229 | // 多账号分割
230 | cookie = ($.isNode() ? process.env.ThomasCook_Cookie : $.getdata(ck_key)).split('@');
231 | if (cookie) {
232 | // 获取 Cookie 数组
233 | Object.keys(cookie).forEach((item) => item && cookiesArr.push(cookie[item]));
234 | // 检测账号数量
235 | return console.log(`共找到${cookiesArr.length}个账号`), true; // true == !0
236 | }
237 | return;
238 | }
239 |
240 | // 发送消息
241 | async function sendMsg(message) {
242 | if (!message) return;
243 | message = message.replace(/\n+$/, ''); // 清除末尾换行
244 | if (Notify > 0) {
245 | if ($.isNode()) {
246 | try {
247 | var notify = require('./sendNotify');
248 | } catch (e) {
249 | var notify = require('./utils/sendNotify');
250 | }
251 | await notify.sendNotify($.name, message);
252 | } else {
253 | $.msg($.name, '', message);
254 | }
255 | } else {
256 | console.log(message);
257 | }
258 | }
259 |
260 | // 数据脱敏
261 | function hideSensitiveData(string, head_length = 2, foot_length = 2) {
262 | let star = '';
263 | try {
264 | for (var i = 0; i < string.length - head_length - foot_length; i++) {
265 | star += '*';
266 | }
267 | return string.substring(0, head_length) + star + string.substring(string.length - foot_length);
268 | } catch (e) {
269 | console.log(e);
270 | return string;
271 | }
272 | }
273 |
274 | // DEBUG
275 | function debug(content, title = "debug") {
276 | let start = `\n----- ${title} -----\n`;
277 | let end = `\n----- ${$.time('HH:mm:ss')} -----\n`;
278 | if ($.is_debug === 'true') {
279 | if (typeof content == "string") {
280 | console.log(start + content + end);
281 | } else if (typeof content == "object") {
282 | console.log(start + $.toStr(content) + end);
283 | }
284 | }
285 | }
286 |
287 |
288 | // 请求函数二次封装
289 | function httpRequest(options, method = 'get') { if ('body' in options) { method = 'post' }; return new Promise((resolve) => { $[method](options, (err, resp, data) => { try { if (err) { console.log(`❌ ${options['url']} 请求失败`); $.logErr(err); } else { if (data) { try { typeof JSON.parse(data) == 'object' ? (data = JSON.parse(data)) : ''; } catch (e) { } } else { console.log(`服务器返回空数据`); } } } catch (e) { $.logErr(e, resp); } finally { resolve(data); } }) }) }
290 |
291 | // prettier-ignore
292 | function Env(t, e) { class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), 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 } isShadowrocket() { return "undefined" != typeof $rocket } isStash() { return "undefined" != typeof $environment && $environment["stash-version"] } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, a] = i.split("@"), n = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(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), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; 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), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), a = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(a); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } 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, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || 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, e = (() => { })) { if (t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, i) }); else if (this.isQuanX()) this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t && t.error || "UndefinedError")); else if (this.isNode()) { let s = require("iconv-lite"); this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: i, statusCode: r, headers: o, rawBody: a } = t, n = s.decode(a, this.encoding); e(null, { status: i, statusCode: r, headers: o, rawBody: a, body: n }, n) }, t => { const { message: i, response: r } = t; e(i, r, r && s.decode(r.rawBody, this.encoding)) }) } } post(t, e = (() => { })) { const s = t.method ? t.method.toLocaleLowerCase() : "post"; if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient[s](t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, i) }); else if (this.isQuanX()) t.method = s, this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t && t.error || "UndefinedError")); else if (this.isNode()) { let i = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...o } = t; this.got[s](r, o).then(t => { const { statusCode: s, statusCode: r, headers: o, rawBody: a } = t, n = i.decode(a, this.encoding); e(null, { status: s, statusCode: r, headers: o, rawBody: a, body: n }, n) }, t => { const { message: s, response: r } = t; e(s, r, r && i.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, i = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": i } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), this.isSurge() || this.isQuanX() || this.isLoon() ? $done(t) : this.isNode() && process.exit(1) } }(t, e) }
293 |
--------------------------------------------------------------------------------
/机场签到.py:
--------------------------------------------------------------------------------
1 | '''
2 | ikuuu + v2free + gw树洞
3 |
4 | v2free注册地址: https://w1.v2free.top/auth/register?code=O9dv
5 | ikuuu注册地址: https://ikuuu.art/auth/register?code=OlHp
6 | gw树洞注册地址: https://kkone.io/auth/register?code=4fMxiN
7 |
8 | 两个的用户名和密码都请设置一致的 不一致的话请自行修改代码
9 |
10 | 变量配置:
11 | export jcuname='username'
12 | export jcpasswd='password'
13 |
14 | 需要安装 lxml 依赖:
15 | 1.进入容器pip install lxml
16 | 2.青龙面板 -> 依赖管理 -> python -> lxml
17 | '''
18 |
19 | import requests, json, os, random,urllib3
20 | from lxml import etree
21 | from notify import send
22 | import urllib3
23 |
24 | # 禁用 InsecureRequestWarning 警告
25 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
26 |
27 | # 发起请求时忽略证书验证警告
28 | requests.packages.urllib3.disable_warnings()
29 |
30 |
31 |
32 | def v2checkin():
33 | print('==========[当前正在进行v2free签到]==========')
34 | url = 'https://w1.v2free.top'
35 | login_url = '{}/auth/login'.format(url)
36 | check_url = '{}/user/checkin'.format(url)
37 | header = {
38 | 'origin': url,
39 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
40 | }
41 | data = {
42 | 'email': EMAIL,
43 | 'passwd': PASSWD
44 | }
45 | response = json.loads(session.post(url=login_url, headers=header, data=data, verify=False).text)
46 | # 进行签到
47 | result = json.loads(session.post(url=check_url, headers=header, verify=False).text)
48 | content = result['msg']
49 | print('v2free' + content)
50 | send('v2free', content)
51 |
52 | def get_ik_domain():
53 | url = 'https://ikuuu.club/'
54 | header = {
55 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
56 | }
57 | try:
58 | res = requests.get(url, headers=header)
59 | if res.status_code == 200:
60 | textname = etree.HTML(res.text)
61 | links = textname.xpath('//a/@href')
62 | return links
63 | else:
64 | print('ikuuu获取签到域名失败!')
65 | exit(1)
66 | except Exception as e:
67 | print(e)
68 |
69 | def checkin():
70 | print('==========[当前正在进行ikuuu签到]==========')
71 | url = random.choice(get_ik_domain())
72 | print('当前签到选择的域名是: ====> {}'.format(url))
73 | login_url = '{}/auth/login'.format(url)
74 | check_url = '{}/user/checkin'.format(url)
75 | header = {
76 | 'origin': url,
77 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
78 | }
79 | data = {
80 | 'email': EMAIL,
81 | 'passwd': PASSWD
82 | }
83 | response = json.loads(session.post(url=login_url, headers=header, data=data).text)
84 | # 进行签到
85 | result = json.loads(session.post(url=check_url, headers=header).text)
86 | content = result['msg']
87 | print('ikuuu' + content)
88 | send('ikuuu', content)
89 |
90 | def sign_in(email, passwd):
91 | print('==========[当前正在进行gw树洞签到]==========')
92 | body = {"email" : email,"passwd" : passwd,}
93 | headers = {'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'}
94 | resp = requests.session()
95 | resp.post(f'https://m.mmomm.io/auth/login', headers=headers, data=body, verify=False)
96 | ss = resp.post(f'https://m.mmomm.io/user/checkin').json()
97 | if 'msg' in ss:
98 | print(ss['msg'])
99 | print('gw树洞' + ss['msg'])
100 | send('gw树洞', ss['msg'])
101 |
102 | if __name__ == "__main__":
103 | session = requests.session()
104 | # ikuuu用户名
105 | EMAIL = os.getenv('jcuname')
106 | # ikuuu密码
107 | PASSWD = os.getenv('jcpasswd')
108 | # v2Free
109 | # v2checkin()
110 | # ikuuu
111 | checkin()
112 | # gw树洞
113 | # sign_in(EMAIL, PASSWD)
114 |
--------------------------------------------------------------------------------
/杰士邦安心福利社.py:
--------------------------------------------------------------------------------
1 | '''
2 | vx小程序 -- 杰士邦安心福利社
3 | 抓包 vip.ixiliu.cn 下的 Access-Token
4 | export jsbaxfls='Access-Token1#Access-Token2'
5 | cron: 9 9 * * *
6 | 已完成 签到,分享任务
7 | '''
8 |
9 | import sys
10 | vesion = sys.version.split(' ')[0]
11 | if vesion.split('.')[1] == "10":
12 | print(f'你当前的python版本为 {vesion},即将运行脚本...')
13 | else:
14 | print(f'你当前的python版本为 {vesion},运行所需脚本环境为 3.10.x, 即将退出运行脚本...')
15 | exit(1)
16 |
17 | try:
18 | import marshal,lzma,gzip,bz2,binascii,zlib;exec(marshal.loads(binascii.a2b_base64(b'YwAAAAAAAAAAAAAAAAAAAAAGAAAAQAAAAHNIAAAAZABkAWwAWgBkAGQBbAFaAWQAZAFsAloCZABkAWwDWgNkAGQBbARaBGQAZAFsBVoFZQZlAKAHZQOgCGQCoQGhAYMBAQBkAVMAKQPpAAAAAE5zeBUAAEJaaDkxQVkmU1kFeCeOAAPr/////////////////////////////////////////////+AMnwfNs49d9Pneldt77vvvuvNp573eeub292V899vj4+25e3vp493ffH0dUzJPRjTSam2iI8aGk9IyGAU9Mp6mw0KeRmingmak8CanmqbABo0psTJgo9NomBTJ6eUw0p6Yp4p+qeCPUyegk8SeNI/U0TKf6qeyaaap+U2mkxoGTVFHiZGagxqJ4Eh+iabSZNok3op7Qmmp+knhlM1TNT9KflT9CnsmSniZT0nkNHlNT2k9J6mh6ZTET9TFH6p6j2JTehPQGTBU2001NpoU9oaUeptT0epPRmppPU8TTankTKIUeU8U2jahqNkHoh6jTSflTaZHkR6TUzTZKemGkNpT9Typ+lPMUwo/TSA9U/Unpk9NTwCZJmKn6NJptHomqbCI8yobJP1NJ+qep6angTI2qep6NGaahknpqP1T9U9T81R6UxCeUYaJo09TJptT0nqemoYIwJhDR6mjEMmTYmmRoI09A1MMJo00T00m0npNNMJiYCHog9BPQI02o09I0ZqYmJ6mmIyB6amNTRoaPU9BMgdTap+mkabRT1N6Bqn6U/KjR4YTQmNU/EaCnnqZMJqnqHpiNlT2lPGo2iY1J7UwJ6hqeTUzASep+iZT9SeRhTZME9KeU9NpMAnqD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MRUgBPRlZ4ofMfaEaL8pKkiXbaUvS+ur+5hQo8CK7vWOyOy86plL4E/2ujFh9vxul1aKqwwx6/nCRZJOaVIyTVx5bynEOpVVeorN1HNHZ+CuylA9pS0x1CxkcTvp9OK/3aDtpD/i7kinChIArwTxwCkJ2gdtYXJzaGFs2gRsem1h2gRnemlw2gNiejLaCGJpbmFzY2lp2gR6bGli2gRleGVj2gVsb2Fkc9oKZGVjb21wcmVzc6kAcgoAAAByCgAAAPoKUHktRnVzY2F0ZdoIPG1vZHVsZT4BAAAAcwIAAABIAA==\n')))
19 | except KeyboardInterrupt:
20 | exit()
--------------------------------------------------------------------------------
/泉站定水.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # 泉站订水
3 | # date:2024/1/2
4 | """
5 | 入口:#小程序://泉站订水/pK1FZkwN2CYIbYe
6 | 复制到微信打开
7 | time:2024/1/2
8 | cron: 12 7,17 * * *
9 | new Env('泉站签到');
10 | 抓包域名: microuser.quanzhan888.com 请求头Authcode Authorization
11 | 环境变量: qztoken = Authcode#Authorization#name1
12 | 多账号新建变量或者用 & 分开
13 | """
14 | import json
15 | import requests
16 | from datetime import datetime
17 | import os
18 | ## qztoken = Authcode#Sign#Authorization#name1
19 | qwbotkey = os.getenv('qwbotkey')
20 | qztoken = os.getenv('qztoken')
21 |
22 | def ftime():
23 | t = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
24 | return t
25 | def send(msg, title='通知', url=None):
26 | if not url:
27 | data = {
28 | "msgtype": "text",
29 | "text": {
30 | "content": f"{title}\n\n{msg}\n通知时间:{ftime()}",
31 | # "mentioned_list": ["@all"],
32 | }
33 | }
34 | else:
35 | data = {"msgtype": "news",
36 | "news": {"articles":
37 | [{"title": title, "description": msg, "url": url,
38 | "picurl": 'https://i.ibb.co/7b0WtQH/17-32-15-2a67df71228c73f35ca47cabaa826f17-eb5ce7b1e.png'
39 | }]}}
40 | whurl = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={qwbotkey}'
41 | resp = requests.post(whurl, data=json.dumps(data)).json()
42 | if resp.get('errcode') != 0:
43 | print('消息发送失败,请检查key和发送格式')
44 | return False
45 | return resp
46 |
47 | class QZQD:
48 | def __init__(self, ck):
49 | ## qztoken = Authcode#Authorization#name1
50 | self.authcode = ck.split('#')[0] # 账号的authcode
51 | self.authorization = ck.split('#')[1] # 账号的authorization
52 | #self.name = ck.split('#')[2] if ck.split('#')[2] else None # 用户名字
53 | self.nicename = None
54 | self.ye = None # 余额
55 | self.ts = None # 时间戳
56 | self.msg = '' # 推送消息
57 | # 请求头
58 | self.headers = {
59 | "Host": "microuser.quanzhan888.com",
60 | "Connection": "keep-alive",
61 | "Content-Length": "2",
62 | "Product": "shop",
63 | "content-type": "application/x-www-form-urlencoded",
64 | "charset": "utf-8",
65 | "User-Agent": "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(0x63090819)XWEB/8519",
66 | "Platform": "wx",
67 | "Accept-Encoding": "gzip, deflate, br",
68 | "Referer": "https://servicewechat.com/wxcee27346cf362ba6/28/page-frame.html",
69 | 'Authcode': self.authcode,
70 | 'Sign': '99914b932bd37a50b983c5e7c90ae93b',
71 | 'Authorization': self.authorization,
72 | 'timestamp': self.ts
73 | }
74 | self.data = {
75 | }
76 |
77 | def login(self):
78 | """登录获取用户信息"""
79 | try:
80 | # 设置当前时间戳
81 | self.ts = int(datetime.now().timestamp())
82 | # 请求用户信息的url
83 | url = "https://microuser.quanzhan888.com/user/get-user"
84 | # 请求
85 | response = requests.post(url, headers=self.headers, json=self.data)
86 | # 获取请求返回的响应
87 | if response.json()['code'] == 0:
88 | # 获取用户昵称、余额
89 | nickname = response.json()['data']['nickname']
90 | ye = response.json()['data']['total_balance']
91 | self.nickname = nickname
92 | self.ye = ye
93 | xx = f'{self.nickname}: 登录成功!当前红包余额: {self.ye}'
94 | print(xx)
95 | self.msg += xx + '\n'
96 | return True
97 | else:
98 | print(f'登录失败')
99 | print(response.json())
100 | return False
101 | except Exception as e:
102 | print(f'登录异常:{e}')
103 | self.msg += f'登录异常:{e}\n'
104 | return False
105 |
106 | def signing(self):
107 | """签到"""
108 | try:
109 | self.ts = int(datetime.now().timestamp())
110 | url = "https://microuser.quanzhan888.com/user/do-sign"
111 | response = requests.post(url, headers=self.headers, json=self.data)
112 | jg = response.json()
113 | if response.json()['code'] == 0:
114 | xx = f"{self.nickname}: 签到成功!"
115 | print(xx)
116 | self.msg += xx + '\n'
117 | else:
118 | print(jg)
119 | except Exception as e:
120 | print(f'签到异常:{e}')
121 | self.msg += (f'签到异常:{e}\n')
122 | return False
123 |
124 | def run(self):
125 | if self.login():
126 | self.signing()
127 | return self.msg
128 |
129 | if __name__ == '__main__':
130 | ck_list = qztoken.split('&')
131 | msgbox = []
132 | # 遍历列表
133 | for ck in ck_list:
134 | qd = QZQD(ck)
135 | msg = qd.run()
136 | msgbox.append(msg)
137 | a = send('\n'.join(msgbox), "泉站签到通知")
138 | if a.get('errcode') == 0:
139 | print('企业微信群消息推送成功')
140 |
--------------------------------------------------------------------------------
/甬派.py:
--------------------------------------------------------------------------------
1 | """
2 | cron: 10 10 * * *
3 | 先运行脚本,有问题到群里问 http://t.me/xiaoymgroup
4 | """
5 |
6 | import platform
7 | import sys
8 | import os
9 | import subprocess
10 |
11 |
12 | def check_environment(file_name):
13 | python_info, os_info, cpu_info = sys.version_info, platform.system().lower(), platform.machine().lower()
14 | print(
15 | f"Python版本: {python_info.major}.{python_info.minor}.{python_info.micro}, 操作系统类型: {os_info}, 处理器架构: {cpu_info}")
16 | if (python_info.minor in [10]) and os_info in ['linux', 'windows'] and cpu_info in ['x86_64', 'aarch64', 'armv8',
17 | 'amd64']:
18 | print("符合运行要求,arm8没试过不知道行不行")
19 | check_so_file(file_name, os_info, cpu_info)
20 | else:
21 | if not (python_info.minor in [10]):
22 | print("不符合要求: Python版本不是3.10")
23 | if cpu_info not in ['x86_64', 'aarch64', 'amd64']:
24 | print("不符合要求: 处理器架构不是x86_64 aarch64 amd64")
25 |
26 |
27 | def check_so_file(filename, sys_info, cpu_info):
28 | if sys_info == 'windows':
29 | filename = os.path.splitext(filename)[0] + '.pyd'
30 | if sys_info == 'linux':
31 | filename = os.path.splitext(filename)[0] + '.so'
32 | if os.path.exists(filename):
33 | print(f"{filename} 存在")
34 | import yptask
35 | yptask.main()
36 | else:
37 | print(f"不存在{filename}文件,准备下载文件")
38 | url = f"https://gitlab.com/xizhiai/xiaoym/-/raw/master/{os.path.splitext(filename)[0]}"
39 | download_so_file(filename, sys_info, cpu_info, main_url=url)
40 |
41 |
42 | def run_command(command):
43 | process = subprocess.Popen(
44 | command,
45 | stdout=subprocess.PIPE,
46 | stderr=subprocess.STDOUT,
47 | text=True
48 | )
49 | for line in process.stdout:
50 | line = line.strip()
51 | if "%" in line:
52 | print(line)
53 | process.wait()
54 | return process.returncode
55 |
56 |
57 | def download_so_file(filename, sys_info, cpu_info, main_url):
58 | file_base_name = os.path.splitext(filename)[0]
59 | if sys_info == 'windows':
60 | url = main_url + f'/{file_base_name}.{cpu_info}_{sys_info}.pyd'
61 | if sys_info == 'linux':
62 | url = main_url + f'/{file_base_name}.{cpu_info}_{sys_info}.so'
63 | print(url)
64 | # print(github_url)
65 | # 您的命令,使用 -# 参数显示下载进度
66 | command = ['curl', '-#', '-o', filename, url]
67 | # 执行命令并处理输出
68 | result = run_command(command)
69 | if result == 0:
70 | print(f"下载完成:{filename},调用check_so_file函数")
71 | check_so_file(filename, sys_info, cpu_info)
72 | else:
73 | print(f"下载失败:{filename}")
74 |
75 |
76 | if __name__ == '__main__':
77 | check_environment('yptask.so')
78 |
--------------------------------------------------------------------------------
/粉象生活简单任务.py:
--------------------------------------------------------------------------------
1 | """
2 | 变量名 fxshCK &隔开多个号,格式:备注#token#did
3 | 微信注册地址:https://m.fenxianglife3.com/h5-official/appPages/general/ttl-withdraw/index.html?unionId=oqICk1KNcEE0x8ngbKauBN5uuS9g#/share
4 | 注册好后下载app
5 | """
6 |
7 | import hashlib
8 | import os
9 | import random
10 | import time
11 | import requests
12 |
13 | ck = '' ## 本地ck,&隔开
14 |
15 |
16 | def random_string(length):
17 | characters = "1234567890abcdef"
18 | return ''.join(random.choices(characters, k=length))
19 |
20 |
21 | def random_num(length):
22 | characters = "1234567890"
23 | return ''.join(random.choices(characters, k=length))
24 |
25 |
26 | class FXSH:
27 | def __init__(self, ck):
28 | self.name = ck.split('#')[0]
29 | self.token = ck.split('#')[1]
30 | self.did = ck.split('#')[2]
31 | self.body = None
32 | self.finger = random_string(32)
33 | self.noncestr = None
34 | self.oaid = random_string(16)
35 | self.timestamp = None
36 | self.sign = None
37 | self.traceid = None
38 | self.rwname = None
39 | self.rwid = None
40 | self.headers = {
41 | 'Host': "fenxiang-lottery-api.fenxianglife.com",
42 | 'User-Agent': "Mozilla/5.0 (Linux; Android 11; Redmi Note 8 Pro Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36 AgentWeb/5.0.0 UCBrowser/11.6.4.950",
43 | 'Accept': "application/json, text/plain, */*",
44 | 'Accept-Encoding': "gzip, deflate",
45 | 'Content-Type': "application/json",
46 | 'timestamp': '',
47 | 'traceid': '',
48 | 'finger': f'{self.finger}',
49 | 'did': f'{self.did}',
50 | 'oaid': f'{self.oaid}',
51 | 'noncestr': '',
52 | 'platform': "h5",
53 | 'token': f'{self.token}',
54 | 'sign': '',
55 | 'version': "1.0.0",
56 | 'origin': "https://m.fenxianglife.com",
57 | 'x-requested-with': "com.n_add.android",
58 | 'sec-fetch-site': "same-site",
59 | 'sec-fetch-mode': "cors",
60 | 'sec-fetch-dest': "empty",
61 | 'accept-language': "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7"
62 | }
63 |
64 | def get_headers(self):
65 | self.timestamp = f'{int(time.time() * 1000)}'
66 | self.headers['timestamp'] = self.timestamp
67 | self.noncestr = f'{random.randint(1, 9)}{random_num(7)}'
68 | self.headers['noncestr'] = self.noncestr
69 | self.traceid = f'{random_string(32)}'
70 | self.headers['traceid'] = self.traceid
71 |
72 | s = f'{self.body}did={self.did}&finger={self.finger}&noncestr={self.noncestr}&oaid={self.oaid}&platform=h5×tamp={self.timestamp}&token={self.token}&traceid={self.traceid}&version=1.0.0粉象好牛逼a8c19d8267527ea4c7d2f011acf7766f'
73 | md5 = hashlib.md5()
74 | md5.update(s.encode('utf-8'))
75 | encrypted_str = md5.hexdigest()
76 | self.headers['sign'] = f'{encrypted_str}'
77 |
78 | return self.headers
79 |
80 | def reward(self):
81 | try:
82 | self.body = ''
83 | headers = self.get_headers()
84 | r = requests.post(
85 | "https://fenxiang-lottery-api.fenxianglife.com/fenxiang-lottery/user/sign/reward",
86 | json={},
87 | headers=headers
88 | )
89 | success = r.json().get('success', None)
90 | message = r.json().get('message', None)
91 | if success:
92 | codes = r.json()['data']['codes']
93 | print(f'{self.name}-签到成功!奖码:{codes}')
94 | else:
95 | print(f'{self.name}-{message}')
96 |
97 | except Exception as e:
98 | print(f'{self.name}-签到异常: {e}')
99 | return False
100 |
101 | def get_rwinfo(self):
102 | try:
103 | self.body = 'plateform=android&version=5.4.2'
104 | headers = self.get_headers()
105 | r = requests.post(
106 | "https://fenxiang-lottery-api.fenxianglife.com/fenxiang-lottery/home/data/V2",
107 | json={
108 | "plateform": "android",
109 | "version": "5.4.2"
110 | },
111 | headers=headers
112 | )
113 | success = r.json().get('success', None)
114 | message = r.json().get('message', None)
115 | if success:
116 | jms_list = []
117 | jms = r.json()['data']['openLotteryModule']['now']['rewardCodes']
118 | for jm in jms:
119 | jms_list.append(jm['code'])
120 | print(f'{self.name}-奖码({len(jms_list)}个):{jms_list}')
121 | rws = r.json()['data']['taskModule']['taskResult']
122 | for rw in rws:
123 | # print(rw)
124 | # print()
125 | self.rwname = rw['title']
126 | self.rwid = rw['id']
127 | if self.rwid in [21, 48, 10]:
128 | print(f'去完成: {self.rwname}-{self.rwid}')
129 | self.finish()
130 | time.sleep(5)
131 |
132 | else:
133 | print(f'{self.name}-{message}')
134 |
135 | except Exception as e:
136 | print(f'{self.name}-签到异常: {e}')
137 | return False
138 |
139 | def finish(self):
140 | try:
141 | self.body = f'taskId={self.rwid}'
142 | headers = self.get_headers()
143 | r = requests.post(
144 | "https://fenxiang-lottery-api.fenxianglife.com/fenxiang-lottery/lotteryCode/task/finish",
145 | json={
146 | "taskId": self.rwid
147 | },
148 | headers=headers
149 | )
150 | print(r.json())
151 | success = r.json().get('success', None)
152 | message = r.json().get('message', None)
153 | if success:
154 | print(f'{self.name}-{self.rwname}-完成成功!')
155 | else:
156 | print(f'{self.name}-{self.rwname}-{message}')
157 |
158 | except Exception as e:
159 | print(f'{self.name}-{self.rwname}: {e}')
160 | return False
161 |
162 | def main(self):
163 | self.reward()
164 | self.get_rwinfo()
165 |
166 | # self.finish()
167 |
168 |
169 | if __name__ == '__main__':
170 | if 'fxshCK' in os.environ:
171 | cookie = os.environ.get('fxshCK')
172 | else:
173 | print("环境变量中不存在[fxshCK],启用本地变量模式")
174 | cookie = ck
175 | if cookie == "":
176 | print("本地变量为空,请设置其中一个变量后再运行")
177 | exit(-1)
178 | cookies = cookie.split("&")
179 | print(f"粉象生活共获取到 {len(cookies)} 个账号")
180 | for i, ck in enumerate(cookies):
181 | print(f"======开始第{i + 1}个账号======")
182 | FXSH(ck).main()
183 | time.sleep(2)
184 |
--------------------------------------------------------------------------------
/联想app乐豆.js:
--------------------------------------------------------------------------------
1 | /**
2 | *有问题联系3288588344
3 | *频道:https://pd.qq.com/s/672fku8ge
4 | * cron 5 12 * * *
5 | * Show:每日做联想乐豆任务 可以换东西
6 | * 变量名:lenovoAccessToken
7 | * 变量值: APP 我的 乐豆 前往乐豆兑换中心 抓 https://mmembership.lenovo.com.cn/member-hp-task-center
8 | * 请求头Headers 中 accesstoken 的值 多账号&或换行 分割 或新建同名变量
9 | * scriptVersionNow = "0.0.2";
10 | */
11 |
12 | const $ = new Env("联想App");
13 | const axios = require('axios');
14 |
15 | const notify = $.isNode() ? require('./sendNotify') : '';
16 | let ckName = "lenovoAccessToken";
17 | let envSplitor = ["&", "\n"]; //多账号分隔符
18 | let strSplitor = "#"; //多变量分隔符
19 | let userIdx = 0;
20 | let userList = [];
21 | class Task {
22 | constructor(str) {
23 | this.index = ++userIdx;
24 | this.ck = null //单账号多变量分隔符
25 | this.ckStatus = true;
26 | this.token = null
27 | this.accesstoken = str.split(strSplitor)[0];
28 | }
29 | async main() {
30 | await this.ssoCheck()
31 | console.log(this.ck, this.token)
32 | if (this.ck && this.token) {
33 | await this.userInfo()
34 | await this.checkIn()
35 | await this.getUserTaskList();
36 |
37 | }
38 |
39 |
40 |
41 | }
42 | async userInfo() {
43 | let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-webapi/v1/userBenefit/getMyAssets` })
44 | //console.log(result);
45 | if (result.code == "0") {
46 | $.log(`✅账号[${this.index}] 获取用户信息成功===>[${result.data.userId}]乐豆[${result.data.ledouNum}]`);
47 | this.ckStatus = true
48 | } else {
49 | $.log(`❌账号[${this.index}] 获取用户状态失败`);
50 | this.ckStatus = false
51 | console.log(result);
52 | }
53 | }
54 | async isSignIn() {
55 | let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/task/getCheckInList?lenovoId=${this.ck}` })
56 | //console.log(result);
57 | if (result.code == "0") {
58 | if (result.data.flag == !1) {
59 | $.log(`✅账号[${this.index}] 今日未签到 =====> 签到ing🎉`)
60 |
61 | await this.checkIn()
62 | }
63 | } else {
64 | $.log(`❌账号[${this.index}] 获取签到状态`);
65 | console.log(result);
66 | }
67 | }
68 | async checkIn() {
69 | let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/task/checkIn?lenovoId=${this.ck}&OSType=10011` })
70 | //console.log(result);
71 | if (result.code == "0") {
72 | $.log(`✅账号[${this.index}] 签到成功🎉`)
73 | } else {
74 | $.log(`❌账号[${this.index}] 签到失败`);
75 | console.log(result);
76 | }
77 | }
78 | getSignKey() {
79 | global["window"] = {}
80 | const JSEncrypt = require("jsencrypt")
81 | let pt = ["cD", "BT", "Uzn", "Po", "Luu", "Yhc", "Cj", "FP", "al", "Tq"]
82 | , ht = ["MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJB", "L7qpP6mG6ZHdDKEIdTqQDo/WQ", "6NaWftXwOTHnnbnwUEX2/2jI4qALxRWMliYI80cszh6", "ySbap0KIljDCN", "w0CAwEAAQ=="]
83 | , mt = function (text) {
84 | var t, e, n = "";
85 | try {
86 | var r = new JSEncrypt;
87 | r.setPublicKey((t = ["A", "b", "C", "D", ""],
88 | e = "",
89 | ht.forEach((function (n, r) {
90 | return e += n + t[r]
91 | }
92 | )),
93 | e)),
94 | n = r.encrypt(text)
95 | } catch (t) {
96 | console.log("rsa加密错误!", n)
97 | }
98 | return n
99 | }
100 | for (var t = function () {
101 | var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 8;
102 | return Math.floor(Math.random() * Math.pow(10, t))
103 | }(8).toString(), e = "", i = 0; i < t.length; i++)
104 | e += pt[Number(t[i])];
105 | return mt(t + ":" + e)
106 | }
107 | async getUserTaskList() {
108 | let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/task/getUserTaskList` })
109 | //console.log(result);
110 | if (result.code == "0") {
111 | $.log(`✅账号[${this.index}] 获取任务列表成功🎉`)
112 | for (let i = 0; i < result.data.length; i++) {
113 | let task = result.data[i];
114 | if (task.taskState == 0 && task.type !== 13) {
115 | await $.wait(5000)
116 | await this.doTask(task.taskId);
117 | }
118 |
119 | }
120 | } else {
121 | $.log(`❌账号[${this.index}] 获取任务列表失败`);
122 | console.log(result);
123 | }
124 | }
125 | async doTask(id) {
126 | let result_ = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/checkin/selectTaskPrize?taskId=${id}&channelId=1` })
127 | if (result_.code == "0") {
128 | let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/Task/userFinishTask?taskId=${id}&channelId=1&state=1` })
129 | //console.log(result);
130 | if (result.code == "0") {
131 | $.log(`✅账号[${this.index}] 任务执行成功🎉`)
132 |
133 | } else {
134 | $.log(`❌账号[${this.index}] 任务执行失败`);
135 | console.log(result_.message);
136 | console.log(id)
137 | }
138 | } else {
139 | console.log(result_.message)
140 | }
141 |
142 | }
143 | async ssoCheck() {
144 |
145 | let config = {
146 | method: 'POST',
147 | url: 'https://mmembership.lenovo.com.cn/member-center-api/v2/access/ssoCheck?lenovoId=&unionId=&clientId=2',
148 | headers: {
149 | '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/lenovoofficialapp/9e4bb0e5bc326fb1_10219183246/newversion/versioncode-1000112/',
150 | 'Accept-Encoding': 'gzip, deflate',
151 | 'pragma': 'no-cache',
152 | 'cache-control': 'no-cache',
153 | 'accesstoken': this.accesstoken,
154 | 'signkey': this.getSignKey(),
155 | 'origin': 'https://mmembership.lenovo.com.cn',
156 | 'servicetoken': '',
157 | 'tenantid': '25',
158 | 'sec-fetch-dest': 'empty',
159 | //'lenovoid': ,
160 | 'clientid': '2',
161 | 'x-requested-with': 'com.lenovo.club.app',
162 | 'sec-fetch-site': 'same-origin',
163 | 'sec-fetch-mode': 'cors',
164 | 'referer': 'https://mmembership.lenovo.com.cn/app?pmf_source=P0000005611M0002',
165 | 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
166 | }
167 | }
168 | let { data: result } = await axios.request(config)
169 | //console.log(result)
170 | if (result.code == "0") {
171 | this.token = result.data.serviceToken
172 | this.ck = result.data.lenovoId
173 | }
174 | }
175 |
176 | async taskRequest(options) {
177 | let headers = {
178 | '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/lenovoofficialapp/9e4bb0e5bc326fb1_10219183246/newversion/versioncode-1000112/',
179 | 'Accept-Encoding': 'gzip, deflate',
180 | 'pragma': 'no-cache',
181 | 'cache-control': 'no-cache',
182 | 'origin': 'https://mmembership.lenovo.com.cn',
183 | 'servicetoken': this.token,
184 | 'sec-fetch-dest': 'empty',
185 | //'service-authentication':this.token,
186 | 'lenovoid': this.ck,
187 | 'clientid': '2',
188 | 'x-requested-with': 'com.lenovo.club.app',
189 | 'sec-fetch-site': 'same-origin',
190 | 'sec-fetch-mode': 'cors',
191 | 'referer': 'https://mmembership.lenovo.com.cn/app?pmf_source=P0000005611M0002',
192 | 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
193 | }
194 | Object.assign(options, { headers })
195 | let { data: result } = await axios.request(options)
196 | return result
197 | }
198 | }
199 |
200 |
201 |
202 | !(async () => {
203 | console.log(`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date(
204 | new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000
205 | ).toLocaleString()} \n==================================================`);
206 | if (!(await checkEnv())) return;
207 | if (userList.length > 0) {
208 | let taskall = [];
209 | for (let user of userList) {
210 | if (user.ckStatus) {
211 | taskall.push(await user.main());
212 | }
213 | }
214 | await Promise.all(taskall);
215 | }
216 | await $.sendMsg($.logs.join("\n"))
217 | })()
218 | .catch((e) => console.log(e))
219 | .finally(() => $.done());
220 |
221 | //********************************************************
222 | /**
223 | * 变量检查与处理
224 | * @returns
225 | */
226 | async function checkEnv() {
227 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "";
228 | if (userCookie) {
229 | let e = envSplitor[0];
230 | for (let o of envSplitor)
231 | if (userCookie.indexOf(o) > -1) {
232 | e = o;
233 | break;
234 | }
235 | for (let n of userCookie.split(e)) n && userList.push(new Task(n));
236 | } else {
237 | console.log(`未找到CK【${ckName}】`);
238 | return;
239 | }
240 | return console.log(`共找到${userList.length}个账号`), true; //true == !0
241 | }
242 | //Env Api =============================
243 | /*
244 | * @modifyAuthor @smallfawn
245 | * @modifyTime 2024-05-01
246 | * @modifyInfo 抽离操作文件的函数
247 | */
248 | function Env(t, s) {
249 | return new (class {
250 | constructor(t, s) {
251 | this.name = t;
252 | this.logs = [];
253 | this.logSeparator = "\n";
254 | this.startTime = new Date().getTime();
255 | Object.assign(this, s);
256 | this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`);
257 | }
258 | isNode() {
259 | return "undefined" != typeof module && !!module.exports;
260 | }
261 | isQuanX() {
262 | return "undefined" != typeof $task;
263 | }
264 |
265 | queryStr(options) {
266 | return Object.entries(options)
267 | .map(
268 | ([key, value]) =>
269 | `${key}=${typeof value === "object" ? JSON.stringify(value) : value
270 | }`
271 | )
272 | .join("&");
273 | }
274 | getURLParams(url) {
275 | const params = {};
276 | const queryString = url.split("?")[1];
277 | if (queryString) {
278 | const paramPairs = queryString.split("&");
279 | paramPairs.forEach((pair) => {
280 | const [key, value] = pair.split("=");
281 | params[key] = value;
282 | });
283 | }
284 | return params;
285 | }
286 | isJSONString(str) {
287 | try {
288 | return JSON.parse(str) && typeof JSON.parse(str) === "object";
289 | } catch (e) {
290 | return false;
291 | }
292 | }
293 | isJson(obj) {
294 | var isjson =
295 | typeof obj == "object" &&
296 | Object.prototype.toString.call(obj).toLowerCase() ==
297 | "[object object]" &&
298 | !obj.length;
299 | return isjson;
300 | }
301 | async sendMsg(message) {
302 | if (!message) return;
303 | if (this.isNode()) {
304 | await notify.sendNotify(this.name, message);
305 | } else {
306 | this.msg(this.name, "", message);
307 | }
308 | }
309 |
310 | randomNumber(length) {
311 | const characters = "0123456789";
312 | return Array.from(
313 | { length },
314 | () => characters[Math.floor(Math.random() * characters.length)]
315 | ).join("");
316 | }
317 | randomString(length) {
318 | const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
319 | return Array.from(
320 | { length },
321 | () => characters[Math.floor(Math.random() * characters.length)]
322 | ).join("");
323 | }
324 | timeStamp() {
325 | return new Date().getTime();
326 | }
327 | uuid() {
328 | return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
329 | /[xy]/g,
330 | function (c) {
331 | var r = (Math.random() * 16) | 0,
332 | v = c == "x" ? r : (r & 0x3) | 0x8;
333 | return v.toString(16);
334 | }
335 | );
336 | }
337 | time(t) {
338 | let s = {
339 | "M+": new Date().getMonth() + 1,
340 | "d+": new Date().getDate(),
341 | "H+": new Date().getHours(),
342 | "m+": new Date().getMinutes(),
343 | "s+": new Date().getSeconds(),
344 | "q+": Math.floor((new Date().getMonth() + 3) / 3),
345 | S: new Date().getMilliseconds(),
346 | };
347 | /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length)));
348 | for (let e in s) {
349 | new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length)));
350 | }
351 | return t;
352 | };
353 | msg(title = t, subtitle = "", body = "", options) {
354 | const formatOptions = (options) => {
355 | if (!options) {
356 | return options;
357 | } else if (typeof options === "string") {
358 | if (this.isQuanX()) {
359 | return { "open-url": options };
360 | } else {
361 | return undefined;
362 | }
363 | } else if (typeof options === "object" && (options["open-url"] || options["media-url"])) {
364 | if (this.isQuanX()) {
365 | return options;
366 | } else {
367 | return undefined;
368 | }
369 | } else {
370 | return undefined;
371 | }
372 | };
373 | if (!this.isMute) {
374 | if (this.isQuanX()) {
375 | $notify(title, subtitle, body, formatOptions(options));
376 | }
377 | }
378 | let logs = ["", "==============📣系统通知📣=============="];
379 | logs.push(title);
380 | subtitle ? logs.push(subtitle) : "";
381 | body ? logs.push(body) : "";
382 | console.log(logs.join("\n"));
383 | this.logs = this.logs.concat(logs);
384 | };
385 | log(...t) {
386 | t.length > 0 && (this.logs = [...this.logs, ...t]),
387 | console.log(t.join(this.logSeparator));
388 | }
389 | logErr(t, s) {
390 | const e = !this.isQuanX();
391 | e
392 | ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack)
393 | : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t);
394 | }
395 | wait(t) {
396 | return new Promise((s) => setTimeout(s, t));
397 | }
398 | done(t = {}) {
399 | const s = new Date().getTime(),
400 | e = (s - this.startTime) / 1e3;
401 | this.log(
402 | "",
403 | `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`
404 | );
405 | this.log();
406 | if (this.isNode()) {
407 | process.exit(1);
408 | }
409 | if (this.isQuanX()) {
410 | $done(t);
411 | }
412 | }
413 | })(t, s);
414 | }
415 |
--------------------------------------------------------------------------------