From 8ba25646bd634bfe082bf7417ed7319dcb6a75a8 Mon Sep 17 00:00:00 2001 From: smallfawn <860562056@QQ.COM> Date: Wed, 1 Apr 2026 19:27:33 +0800 Subject: [PATCH] Initial commit --- .github/ISSUE_TEMPLATE/bug.yml | 45 + .github/ISSUE_TEMPLATE/new.yml | 23 + .github/workflows/checkScriptStatus.yml | 142 + .vscode/settings.json | 3 + 360.py | 148 + 51dalili.py | 145 + README.md | 30 + Tools/env.js | 150 + Tools/sendNotify.js | 1542 ++++++ aima.js | 148 + aliyunpan.py | 80 + alyp.js | 529 ++ babycare.js | 249 + backup/GacmotorCookies.json | 10 + backup/bjev.js | 428 ++ backup/gacmotor.js | 1405 ++++++ backup/hezj.js | 293 ++ backup/mys.js | 706 +++ backup/wangchao.py | 369 ++ backup/wx_hapi.js | 202 + backup/yuebai.js | 558 +++ backup/yyq.js | 438 ++ backup/zhiwuxingqiu.js | 269 ++ backup/zstjjsb.js | 243 + baitianGame.js | 263 + bjxd.py | 641 +++ changhongmeiling.py | 47 + chery.js | 272 ++ cheryev.js | 135 + chinaUnicom.py | 5823 +++++++++++++++++++++++ cookies/gqft.json | 8 + daily/README.md | 1 + daily/hdl.js | 183 + daily/quark.py | 249 + dayuecheng.js | 454 ++ ddsy_songyao.js | 180 + dffx.js | 191 + dfyc.js | 578 +++ didi.js | 821 ++++ dydd.py | 90 + exeedcars.js | 515 ++ fenxiang.js | 225 + fsdlb.js | 188 + ftej.js | 976 ++++ gjzp.js | 424 ++ gqftbz.js | 876 ++++ gujinggongjiu.js | 152 + guolejiangjiu.js | 256 + haitianmeiweiguan.js | 487 ++ haofan.py | 39 + hfzj.js | 404 ++ hqcsh.js | 416 ++ htx.js | 966 ++++ hyjk.js | 405 ++ iqiyi.py | 379 ++ jetta.js | 234 + jlqc.js | 954 ++++ jlyh.js | 344 ++ jlzx.js | 519 ++ kfh/kfh.js | 187 + kfh/kfh_exchange.js | 380 ++ kfw/kfw.js | 408 ++ kfw/kfw_exchange.js | 382 ++ ksjsb.js | 18 + laoyou.py | 292 ++ leidaCar.js | 559 +++ lenovoapp.js | 412 ++ ljfsjlb.js | 583 +++ maisiweier.js | 415 ++ mtf.js | 844 ++++ musi.js | 572 +++ mxbc.js | 303 ++ nhsy.js | 511 ++ notify.py | 1107 +++++ pangguai.py | 610 +++ qiehuang.py | 507 ++ ql.js | 209 + qtx.js | 385 ++ quanzhan.py | 233 + quzanmi.js | 427 ++ ruilanCar.js | 509 ++ sendNofity.js | 1546 ++++++ sf33.py | 854 ++++ sysxc.js | 432 ++ sysxc.py | 215 + sytt.js | 515 ++ tianyi.py | 964 ++++ tools/bucket.js | 13 + utils.js | 314 ++ wxapp/7dian5.py | 113 + wxapp/anmuxi.js | 332 ++ wxapp/bnmdhg_wx.js | 384 ++ wxapp/kangshifu.js | 291 ++ wxapp/miaoyouHome.js | 476 ++ wxapp/ppmt.js | 334 ++ wxapp/qfxsh.js | 1468 ++++++ wxapp/quanmianshidai.py | 838 ++++ wxapp/suboer.js | 542 +++ wxapp/topspace.py | 109 + wxapp/wx_gjjkpro.js | 260 + wxapp/wx_lccd.js | 519 ++ wxapp/wx_midea.js | 241 + wxapp/wx_xlxyh.js | 560 +++ wxapp/xbox.js | 397 ++ wxapp/yeyebupaocha.js | 261 + wxapp/ylnn.js | 519 ++ wxapp/zhanma.js | 957 ++++ wxapp/zippo.js | 516 ++ wxapp/可口可乐吧.js | 294 ++ wxapp/哪吒汽车.js | 23 + wxapp/托迈酷客.js | 9 + wxapp/杰士邦安心福利社.js | 321 ++ wxapp/植白说.js | 481 ++ wxapp/海尔-卡萨帝.js | 570 +++ wxapp/草莓台.js | 516 ++ xiaosatonglu.js | 449 ++ xinxi.js | 651 +++ yidongyunpan.py | 861 ++++ yingsheng.js | 807 ++++ yinxiang.js | 536 +++ ysfqd.js | 170 + 硬声.js | 510 ++ 蔚来.js | 229 + 鸿星尔克.py | 239 + 124 files changed, 57339 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml create mode 100644 .github/ISSUE_TEMPLATE/new.yml create mode 100644 .github/workflows/checkScriptStatus.yml create mode 100644 .vscode/settings.json create mode 100644 360.py create mode 100644 51dalili.py create mode 100644 README.md create mode 100644 Tools/env.js create mode 100644 Tools/sendNotify.js create mode 100644 aima.js create mode 100644 aliyunpan.py create mode 100644 alyp.js create mode 100644 babycare.js create mode 100644 backup/GacmotorCookies.json create mode 100644 backup/bjev.js create mode 100644 backup/gacmotor.js create mode 100644 backup/hezj.js create mode 100644 backup/mys.js create mode 100644 backup/wangchao.py create mode 100644 backup/wx_hapi.js create mode 100644 backup/yuebai.js create mode 100644 backup/yyq.js create mode 100644 backup/zhiwuxingqiu.js create mode 100644 backup/zstjjsb.js create mode 100644 baitianGame.js create mode 100644 bjxd.py create mode 100644 changhongmeiling.py create mode 100644 chery.js create mode 100644 cheryev.js create mode 100644 chinaUnicom.py create mode 100644 cookies/gqft.json create mode 100644 daily/README.md create mode 100644 daily/hdl.js create mode 100644 daily/quark.py create mode 100644 dayuecheng.js create mode 100644 ddsy_songyao.js create mode 100644 dffx.js create mode 100644 dfyc.js create mode 100644 didi.js create mode 100644 dydd.py create mode 100644 exeedcars.js create mode 100644 fenxiang.js create mode 100644 fsdlb.js create mode 100644 ftej.js create mode 100644 gjzp.js create mode 100644 gqftbz.js create mode 100644 gujinggongjiu.js create mode 100644 guolejiangjiu.js create mode 100644 haitianmeiweiguan.js create mode 100644 haofan.py create mode 100644 hfzj.js create mode 100644 hqcsh.js create mode 100644 htx.js create mode 100644 hyjk.js create mode 100644 iqiyi.py create mode 100644 jetta.js create mode 100644 jlqc.js create mode 100644 jlyh.js create mode 100644 jlzx.js create mode 100644 kfh/kfh.js create mode 100644 kfh/kfh_exchange.js create mode 100644 kfw/kfw.js create mode 100644 kfw/kfw_exchange.js create mode 100644 ksjsb.js create mode 100644 laoyou.py create mode 100644 leidaCar.js create mode 100644 lenovoapp.js create mode 100644 ljfsjlb.js create mode 100644 maisiweier.js create mode 100644 mtf.js create mode 100644 musi.js create mode 100644 mxbc.js create mode 100644 nhsy.js create mode 100644 notify.py create mode 100644 pangguai.py create mode 100644 qiehuang.py create mode 100644 ql.js create mode 100644 qtx.js create mode 100644 quanzhan.py create mode 100644 quzanmi.js create mode 100644 ruilanCar.js create mode 100644 sendNofity.js create mode 100644 sf33.py create mode 100644 sysxc.js create mode 100644 sysxc.py create mode 100644 sytt.js create mode 100644 tianyi.py create mode 100644 tools/bucket.js create mode 100644 utils.js create mode 100644 wxapp/7dian5.py create mode 100644 wxapp/anmuxi.js create mode 100644 wxapp/bnmdhg_wx.js create mode 100644 wxapp/kangshifu.js create mode 100644 wxapp/miaoyouHome.js create mode 100644 wxapp/ppmt.js create mode 100644 wxapp/qfxsh.js create mode 100644 wxapp/quanmianshidai.py create mode 100644 wxapp/suboer.js create mode 100644 wxapp/topspace.py create mode 100644 wxapp/wx_gjjkpro.js create mode 100644 wxapp/wx_lccd.js create mode 100644 wxapp/wx_midea.js create mode 100644 wxapp/wx_xlxyh.js create mode 100644 wxapp/xbox.js create mode 100644 wxapp/yeyebupaocha.js create mode 100644 wxapp/ylnn.js create mode 100644 wxapp/zhanma.js create mode 100644 wxapp/zippo.js create mode 100644 wxapp/可口可乐吧.js create mode 100644 wxapp/哪吒汽车.js create mode 100644 wxapp/托迈酷客.js create mode 100644 wxapp/杰士邦安心福利社.js create mode 100644 wxapp/植白说.js create mode 100644 wxapp/海尔-卡萨帝.js create mode 100644 wxapp/草莓台.js create mode 100644 xiaosatonglu.js create mode 100644 xinxi.js create mode 100644 yidongyunpan.py create mode 100644 yingsheng.js create mode 100644 yinxiang.js create mode 100644 ysfqd.js create mode 100644 硬声.js create mode 100644 蔚来.js create mode 100644 鸿星尔克.py diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..0c954ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,45 @@ +name: 反馈脚本BUG +description: 在使用 脚本 的过程中遇到了错误 +title: "[Bug反馈]: " +labels: ["bug?"] + +body: + # User's README and agreement + - type: markdown + attributes: + value: | + ## 以下是一些注意事项,请务必阅读让我们能够更容易处理 + ### ❗ | 确定没有相同问题的ISSUE已被提出. + ### 🌎| 请准确填写环境信息 + ### ❔ | 提供出现问题完整日志内容。请自行删除日志内存在的个人信息及敏感内容。 + ## 如果您不知道如何有效、精准地表述,我们建议您先阅读《提问的智慧》 + 链接: [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md) + --- + + # Input | Expected result + - type: textarea + id: expected + attributes: + label: 脚本名字 + validations: + required: true + + # Input | Actual result + - type: textarea + id: actual + attributes: + label: 实际的结果是什么? 期望的结果是什么? + validations: + required: true + # Optional | Logging + - type: textarea + id: logging + attributes: + label: 日志记录(可选) + render: javascript + + # Optional | Reproduce code + - type: textarea + id: reproduce-code + attributes: + label: 简单的复现代码/链接(可选) diff --git a/.github/ISSUE_TEMPLATE/new.yml b/.github/ISSUE_TEMPLATE/new.yml new file mode 100644 index 0000000..8e8641f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/new.yml @@ -0,0 +1,23 @@ +name: 新功能提议 +title: "[功能提议] " # 默认标题前缀,用户可以修改 +labels: ["enhancement?"] # 标签必须是字符串数组 +description: 描述新功能的实现方法和用户场景。 + +body: + - type: input + id: function_name + attributes: + label: 功能名字 + description: 请说明新功能适用的平台,例如 APP、网页或小程序。 + placeholder: 例如:APP + validations: + required: true + + - type: textarea + id: function_description + attributes: + label: 需要添加的功能内容 + description: 请详细描述新功能的实现方法和用户场景。 + placeholder: 例如:我希望添加一个新功能,能够在APP主界面直接显示用户最近的活动记录,方便用户快速回顾和管理。 + validations: + required: true diff --git a/.github/workflows/checkScriptStatus.yml b/.github/workflows/checkScriptStatus.yml new file mode 100644 index 0000000..72f683c --- /dev/null +++ b/.github/workflows/checkScriptStatus.yml @@ -0,0 +1,142 @@ +#目的是给非backup目录下的触发提交的文件,给相应markdown表格的标签打成绿色,记录更新时间等等:待AI实现 +name: Update README Table + +on: + push: + branches: + - main # 如果你的主分支是 master,请将其改为 master + paths: + - '**/*.js' # 只有在修改或新增 JS 文件时才触发 + +jobs: + update-readme: + runs-on: ubuntu-latest + permissions: + contents: write # 必须赋予写入权限,以便工作流可以推送更改到仓库 + + steps: + - name: 检出代码 + uses: actions/checkout@v4 + with: + fetch-depth: 2 # 必须拉取历史记录以便使用 git diff 查找更改的文件 + + - name: 配置 Python 环境 + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: 运行更新脚本 + env: + TZ: Asia/Shanghai # 确保时间是北京时间 + run: | + # 创建并执行 Python 处理脚本 + cat << 'EOF' > update_readme.py + import os + import re + import datetime + import subprocess + + # 1. 获取本次提交更改的 JS 文件列表 + try: + diff_cmd = ['git', 'diff', '--name-only', 'HEAD~1', 'HEAD'] + result = subprocess.run(diff_cmd, capture_output=True, text=True, check=True) + changed_files = result.stdout.splitlines() + except subprocess.CalledProcessError: + print("无法获取差异文件,跳过...") + changed_files = [] + + js_files = [f for f in changed_files if f.endswith('.js') and os.path.exists(f)] + + if not js_files: + print("没有 JS 文件发生更改。") + exit(0) + + # 2. 提取文件中的脚本名称 (匹配 new Env("XXX")) + now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') + updates = {} + for f in js_files: + with open(f, 'r', encoding='utf-8') as file: + content = file.read() + match = re.search(r'new\s+Env\s*\(\s*["\']([^"\']+)["\']\s*\)', content) + if match: + script_name = match.group(1) + updates[script_name] = now + + if not updates: + print("修改的文件中未找到 new Env 声明。") + exit(0) + + # 3. 读取并修改 README.md 中的表格 + readme_path = 'README.md' + with open(readme_path, 'r', encoding='utf-8') as file: + lines = file.readlines() + + new_lines = [] + in_table = False + updated_scripts_set = set() + + for line in lines: + # 定位表格头部 + if '|' in line and '脚本名称' in line and '更新时间' in line: + in_table = True + new_lines.append(line) + continue + + if in_table: + # 如果遇到空行或非表格格式,说明表格结束 + if not line.strip() or not line.strip().startswith('|'): + in_table = False + # 将新增的脚本(表格中之前没有的)追加在表格末尾 + for script, time in updates.items(): + if script not in updated_scripts_set: + new_lines.append(f"| {script} | {time} | ✅ |\n") + updated_scripts_set.add(script) + new_lines.append(line) + continue + + # 忽略 Markdown 表格分割线 (例如 |:---|:---:|:---:|) + if re.match(r'^\s*\|?[\s\:\-]+\|[\s\:\-]+\|[\s\:\-]+\|?\s*$', line): + new_lines.append(line) + continue + + # 处理现有的表格数据行 + parts = [p.strip() for p in line.split('|')] + if len(parts) >= 4: # | 1:脚本名称 | 2:更新时间 | 3:当前状态 | + script_name = parts[1] + if script_name in updates: + parts[2] = updates[script_name] + parts[3] = "✅" + line = f"| {parts[1]} | {parts[2]} | {parts[3]} |\n" + updated_scripts_set.add(script_name) + + new_lines.append(line) + + # 兜底:如果 README 以表格结尾(后面没有空行) + if in_table: + for script, time in updates.items(): + if script not in updated_scripts_set: + new_lines.append(f"| {script} | {time} | ✅ |\n") + updated_scripts_set.add(script) + + with open(readme_path, 'w', encoding='utf-8') as file: + file.writelines(new_lines) + + print(f"成功更新了以下脚本的状态: {list(updated_scripts_set)}") + EOF + + python update_readme.py + + - name: 提交并推送到仓库 + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add README.md + + # 检查是否有文件更改,如果有则提交。 + # [skip ci] 非常重要!它能防止 Action 无限循环触发自身。 + if ! git diff --staged --quiet; then + git commit -m "docs: 自动更新脚本列表状态 [skip ci]" + git push + else + echo "README.md 无变化,不需要提交。" + fi \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/360.py b/360.py new file mode 100644 index 0000000..7688ed9 --- /dev/null +++ b/360.py @@ -0,0 +1,148 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# 作者: 青龙面板适配 +# 说明: 360社区自动签到脚本(青龙面板专用) +# 依赖: requests +# 用法: 在青龙面板环境变量中设置 BBS360_COOKIE +# 请确保Cookie包含 __cfduid, uid 等必要字段 + +import os +import re +import time +import random +import requests +from dataclasses import dataclass +from typing import Optional, Tuple + +SIGN_PAGE = "https://bbs.360.cn/dsu_paulsign-sign.html" +SIGN_API = "https://bbs.360.cn/plugin.php?id=dsu_paulsign:sign&operation=qiandao&infloat=1&inajax=1" + +@dataclass +class CheckinResult: + ok: bool + status: str + detail: str + +class BBS360Checkin: + """360社区签到客户端(青龙面板适配)""" + def __init__(self, cookie: str, timeout: int = 20): + self.cookie = cookie.strip() + self.timeout = timeout + self.session = requests.Session() + self.session.headers.update({ + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0 Safari/537.36", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "Accept-Language": "zh-CN,zh;q=0.9", + "Connection": "keep-alive", + "Cookie": self.cookie, + "Referer": "https://bbs.360.cn/", + }) + + def fetch_formhash(self) -> Tuple[Optional[str], str]: + """拉取签到页并提取 formhash""" + resp = self.session.get(SIGN_PAGE, timeout=self.timeout, allow_redirects=True) + text = resp.text or "" + + # 青龙面板特殊处理:如果返回403,可能是需要验证 + if resp.status_code == 403: + return None, "403 Forbidden(可能需要绑定手机号)" + + # 未登录/未绑定手机号时提示 + if "您需要先登录才能继续本操作" in text or "请使用手机微信扫码安全登录" in text: + return None, "未登录或账号未绑定手机号(需在360社区绑定手机号)" + + # 提取 formhash + m = re.search(r'formhash=([0-9a-zA-Z]{6,})', text) + if not m: + m = re.search(r'name="formhash"\s+value="([0-9a-zA-Z]{6,})"', text) + + if not m: + return None, "未解析到 formhash(页面结构可能变更)" + + return m.group(1), "OK" + + def submit_checkin(self, formhash: str) -> CheckinResult: + """提交签到请求""" + moods = ["kx", "ym", "tp", "ng", "wl"] + payload = { + "formhash": formhash, + "qdxq": random.choice(moods), + "qdmode": "1", + "todaysay": random.choice([ + "打卡签到,愿一切顺利!", + "新的一天,继续加油~", + "保持热爱,奔赴山海。", + "今日签到,万事胜意。", + "坚持自律,慢慢变强。", + ]), + "fastreply": "0", + } + + resp = self.session.post(SIGN_API, data=payload, timeout=self.timeout) + raw = resp.text or "" + + # 青龙面板特殊处理:返回403或500 + if resp.status_code != 200: + return CheckinResult(False, f"http_{resp.status_code}", f"HTTP {resp.status_code}") + + # 检查签到结果 + if "签到成功" in raw or ("恭喜" in raw and "签到" in raw): + return CheckinResult(True, "success", self._extract_message(raw) or "签到成功") + if "已经签到" in raw or "已签到" in raw or "请勿重复签到" in raw: + return CheckinResult(True, "already", self._extract_message(raw) or "今日已签到") + if ("formhash" in raw and "错误" in raw) or "请求无效" in raw: + return CheckinResult(False, "bad_formhash", self._extract_message(raw) or "formhash无效/过期") + + return CheckinResult(False, "unknown", self._extract_message(raw) or raw[:200]) + + @staticmethod + def _extract_message(text: str) -> str: + """提取提示信息""" + m = re.search(r"showmessage\('([^']+)'\)", text) + if m: + return m.group(1) + + m = re.search(r"([^\n\r]{0,20}(签到|已签到|重复签到)[^\n\r]{0,40})", text) + if m: + return m.group(1) + + return "" + + def run(self) -> CheckinResult: + formhash, info = self.fetch_formhash() + if not formhash: + return CheckinResult(False, "no_login_or_parse_failed", info) + + time.sleep(random.uniform(1.0, 2.5)) + return self.submit_checkin(formhash) + +def main(): + # 青龙面板专用:从环境变量获取Cookie + cookie = os.getenv("BBS360_COOKIE", "").strip() + + if not cookie: + print("❌ 未设置环境变量 BBS360_COOKIE") + print("💡 请在青龙面板 → 环境变量 → 添加以下内容:") + print(" KEY: BBS360_COOKIE") + print(" VALUE: 从浏览器复制的完整Cookie(包含__cfduid, uid等)") + return + + # 青龙面板特殊处理:检测Cookie是否包含必要字段 + if "__cfduid" not in cookie or "uid" not in cookie: + print("❌ Cookie无效:缺少必要字段(需包含__cfduid和uid)") + print("💡 请重新复制Cookie:") + print(" 1. 登录 bbs.360.cn → F12 → Application → Cookies") + print(" 2. 复制 bbs.360.cn 下的所有Cookie字段") + return + + client = BBS360Checkin(cookie=cookie, timeout=20) + result = client.run() + + # 青龙面板专用输出格式 + if result.ok: + print(f"✅ 360签到成功 | {result.status} | {result.detail}") + else: + print(f"❌ 360签到失败 | {result.status} | {result.detail}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/51dalili.py b/51dalili.py new file mode 100644 index 0000000..851605d --- /dev/null +++ b/51dalili.py @@ -0,0 +1,145 @@ +#51代理每日签到 +import requests +from bs4 import BeautifulSoup +import time +import os + +def login_to_51daili(): + # 从环境变量读取账号和密码 + username = os.getenv('dali51user') + password = os.getenv('daili51pass') + + if not username or not password: + print("错误: 请设置环境变量 dali51user 和 daili51pass") + return None + + # 第一次请求获取登录令牌和PHPSESSID + print("正在获取登录令牌和PHPSESSID...") + session = requests.Session() + + try: + # 初始headers,仅包含User-Agent + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' + } + + # 发送GET请求获取登录页面 + response = session.get('https://www.51daili.com', headers=headers, timeout=10) + response.raise_for_status() + + # 从响应头中获取PHPSESSID + phpsessid = None + if 'set-cookie' in response.headers: + cookies = response.headers['set-cookie'].split(';') + for cookie in cookies: + if 'PHPSESSID' in cookie: + phpsessid = cookie.split('=')[1] + break + + # 解析HTML获取令牌 + soup = BeautifulSoup(response.text, 'html.parser') + token_input = soup.find('input', {'name': '__login_token__'}) + + if token_input: + login_token = token_input.get('value') + print(f"成功获取登录令牌: {login_token}") + else: + print("未找到登录令牌,使用默认令牌") + login_token = "14f2877f31842495ff24e3d73036158a" + + if phpsessid: + print(f"成功获取PHPSESSID: {phpsessid}") + else: + print("未能从响应头中获取PHPSESSID,使用默认值") + phpsessid = "qkheban0ocfthart1bk7s861kn" + + # 准备登录数据和更新headers + login_data = { + '__login_token__': login_token, + 'account': username, + 'password': password, + 'ticket': '1', + 'keeplogin': '1', + 'is_read': '1' + } + + # 更新headers,添加Cookie + headers['Cookie'] = f"PHPSESSID={phpsessid};tncode_check=ok" + + print("正在尝试登录...") + time.sleep(1) # 添加短暂延迟 + + # 发送POST请求进行登录 + login_url = 'https://www.51daili.com/index/user/login.html' + login_response = session.post(login_url, data=login_data, headers=headers, timeout=10) + login_response.raise_for_status() + + # 检查登录是否成功 + if login_response.status_code == 200: + print("登录请求已发送,状态码: 200") + + # 尝试从响应头中查找token + print("响应头:", login_response.headers) + + token = None + # 检查Set-Cookie头 + if 'set-cookie' in login_response.headers: + cookies = login_response.headers['set-cookie'].split(';') + for cookie in cookies: + if 'token' in cookie.lower(): + print(f"找到token cookie: {cookie}") + # 提取token值 + token_parts = cookie.split('=') + if len(token_parts) >= 2: + token = token_parts[1].strip() + break + + # 如果没有在Set-Cookie中找到,检查其他头字段 + if not token: + for key, value in login_response.headers.items(): + if 'token' in key.lower(): + print(f"找到token头: {key}: {value}") + token = value + break + + if token: + print(f"成功获取token: {token}") + + # 使用token请求签到页面 + signin_headers = headers.copy() + # 添加token到Cookie + signin_headers['Cookie'] = f"{signin_headers.get('Cookie', '')}; token={token}" + signin_headers['Referer'] = 'https://www.51daili.com/' + + print("正在请求签到页面...") + signin_response = session.get( + 'https://www.51daili.com/index/user/signin.html', + headers=signin_headers, + timeout=10 + ) + signin_response.raise_for_status() + + print("签到页面响应内容:") + print(signin_response.text) + else: + print("未能从登录响应中提取token") + else: + print(f"登录请求返回异常状态码: {login_response.status_code}") + + return session + + except requests.exceptions.RequestException as e: + print(f"请求过程中发生错误: {e}") + return None + +if __name__ == "__main__": + print("51代理登录示例") + print("=" * 30) + + session = login_to_51daili() + + if session: + print("登录流程完成") + # 这里可以继续使用session进行后续操作 + else: + print("登录失败") diff --git a/README.md b/README.md new file mode 100644 index 0000000..0a55c15 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# QLScriptpublic + +| 脚本名称 | 最后一次更新时间 | 当前状态 | +| :--- | :----: | :----: | +| 海底捞签到 | Title | ✅ | +| 夸客网盘签到 | Text | ✅ | + + + +# 青龙面板拉库命令 +`````` +ql repo https://ghproxy.net/https://github.com/smallfawn/QLScriptPublic.git backup main + +这里的脚本只是自己学习 js 的一个实践 仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断. + +仓库内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。 + +smallfawn 对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害. + +间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, smallfawn 对于由此引起的任何隐私泄漏或其他后果概不负责. + +如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本. + +任何以任何方式查看此项目的人或直接或间接使用该Script项目的任何脚本的使用者都应仔细阅读此声明。 smallfawn 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明. + +您必须在下载后的24小时内从计算机或手机中完全删除以上内容.严禁产生利益链! + + + + diff --git a/Tools/env.js b/Tools/env.js new file mode 100644 index 0000000..19d5ba2 --- /dev/null +++ b/Tools/env.js @@ -0,0 +1,150 @@ +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + const envSplitor = ["&", "\n"]; + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + const notify = require("./sendNotify.js") + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + jsonToStr(obj, c = '&', encodeUrl = false) { + let ret = [] + for (let keys of Object.keys(obj).sort()) { + let v = obj[keys] + if (v && encodeUrl) v = encodeURIComponent(v) + ret.push(keys + '=' + v) + } + return ret.join(c); + } + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done() { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} +module.exports = { + Env +} \ No newline at end of file diff --git a/Tools/sendNotify.js b/Tools/sendNotify.js new file mode 100644 index 0000000..139fda0 --- /dev/null +++ b/Tools/sendNotify.js @@ -0,0 +1,1542 @@ +const querystring = require('node:querystring'); +const { request: undiciRequest, ProxyAgent, FormData } = require('undici'); +const timeout = 15000; + +async function request(url, options = {}) { + const { json, form, body, headers = {}, ...rest } = options; + + const finalHeaders = { ...headers }; + let finalBody = body; + + if (json) { + finalHeaders['content-type'] = 'application/json'; + finalBody = JSON.stringify(json); + } else if (form) { + finalBody = form; + delete finalHeaders['content-type']; + } + + return undiciRequest(url, { + headers: finalHeaders, + body: finalBody, + ...rest, + }); +} + +function post(url, options = {}) { + return request(url, { ...options, method: 'POST' }); +} + +function get(url, options = {}) { + return request(url, { ...options, method: 'GET' }); +} + +const httpClient = { + request, + post, + get, +}; + +const push_config = { + HITOKOTO: true, // 启用一言(随机句子) + + BARK_PUSH: '', // bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ + BARK_ARCHIVE: '', // bark 推送是否存档 + BARK_GROUP: '', // bark 推送分组 + BARK_SOUND: '', // bark 推送声音 + BARK_ICON: '', // bark 推送图标 + BARK_LEVEL: '', // bark 推送时效性 + BARK_URL: '', // bark 推送跳转URL + + DD_BOT_SECRET: '', // 钉钉机器人的 DD_BOT_SECRET + DD_BOT_TOKEN: '', // 钉钉机器人的 DD_BOT_TOKEN + + FSKEY: '', // 飞书机器人的 FSKEY + FSSECRET: '', // 飞书机器人的 FSSECRET,对应安全设置里的签名校验密钥 + + // 推送到个人QQ:http://127.0.0.1/send_private_msg + // 群:http://127.0.0.1/send_group_msg + GOBOT_URL: '', // go-cqhttp + // 推送到个人QQ 填入 user_id=个人QQ + // 群 填入 group_id=QQ群 + GOBOT_QQ: '', // go-cqhttp 的推送群或用户 + GOBOT_TOKEN: '', // go-cqhttp 的 access_token + + GOTIFY_URL: '', // gotify地址,如https://push.example.de:8080 + GOTIFY_TOKEN: '', // gotify的消息应用token + GOTIFY_PRIORITY: 0, // 推送消息优先级,默认为0 + + IGOT_PUSH_KEY: '', // iGot 聚合推送的 IGOT_PUSH_KEY,例如:https://push.hellyw.com/XXXXXXXX + + PUSH_KEY: '', // server 酱的 PUSH_KEY,兼容旧版与 Turbo 版 + + DEER_KEY: '', // PushDeer 的 PUSHDEER_KEY + DEER_URL: '', // PushDeer 的 PUSHDEER_URL + + CHAT_URL: '', // synology chat url + CHAT_TOKEN: '', // synology chat token + + // 官方文档:https://www.pushplus.plus/ + PUSH_PLUS_TOKEN: '', // pushplus 推送的用户令牌 + PUSH_PLUS_USER: '', // pushplus 推送的群组编码 + PUSH_PLUS_TEMPLATE: 'html', // pushplus 发送模板,支持html,txt,json,markdown,cloudMonitor,jenkins,route,pay + PUSH_PLUS_CHANNEL: 'wechat', // pushplus 发送渠道,支持wechat,webhook,cp,mail,sms + PUSH_PLUS_WEBHOOK: '', // pushplus webhook编码,可在pushplus公众号上扩展配置出更多渠道 + PUSH_PLUS_CALLBACKURL: '', // pushplus 发送结果回调地址,会把推送最终结果通知到这个地址上 + PUSH_PLUS_TO: '', // pushplus 好友令牌,微信公众号渠道填写好友令牌,企业微信渠道填写企业微信用户id + + // 微加机器人,官方网站:https://www.weplusbot.com/ + WE_PLUS_BOT_TOKEN: '', // 微加机器人的用户令牌 + WE_PLUS_BOT_RECEIVER: '', // 微加机器人的消息接收人 + WE_PLUS_BOT_VERSION: 'pro', //微加机器人调用版本,pro和personal;为空默认使用pro(专业版),个人版填写:personal + + QMSG_KEY: '', // qmsg 酱的 QMSG_KEY + QMSG_TYPE: '', // qmsg 酱的 QMSG_TYPE + + QYWX_ORIGIN: 'https://qyapi.weixin.qq.com', // 企业微信代理地址 + + /* + 此处填你企业微信应用消息的值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236) + 环境变量名 QYWX_AM依次填入 corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) + 注意用,号隔开(英文输入法的逗号),例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat + 可选推送消息类型(推荐使用图文消息(mpnews)): + - 文本卡片消息: 0 (数字零) + - 文本消息: 1 (数字一) + - 图文消息(mpnews): 素材库图片id, 可查看此教程(http://note.youdao.com/s/HMiudGkb)或者(https://note.youdao.com/ynoteshare1/index.html?id=1a0c8aff284ad28cbd011b29b3ad0191&type=note) + */ + QYWX_AM: '', // 企业微信应用 + + QYWX_KEY: '', // 企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa + + TG_BOT_TOKEN: '', // tg 机器人的 TG_BOT_TOKEN,例:1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ + TG_USER_ID: '', // tg 机器人的 TG_USER_ID,例:1434078534 + TG_API_HOST: 'https://api.telegram.org', // tg 代理 api + TG_PROXY_AUTH: '', // tg 代理认证参数 + TG_PROXY_HOST: '', // tg 机器人的 TG_PROXY_HOST + TG_PROXY_PORT: '', // tg 机器人的 TG_PROXY_PORT + + AIBOTK_KEY: '', // 智能微秘书 个人中心的apikey 文档地址:http://wechat.aibotk.com/docs/about + AIBOTK_TYPE: '', // 智能微秘书 发送目标 room 或 contact + AIBOTK_NAME: '', // 智能微秘书 发送群名 或者好友昵称和type要对应好 + + SMTP_SERVICE: '', // 邮箱服务名称,比如 126、163、Gmail、QQ 等,支持列表 https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json + SMTP_EMAIL: '', // SMTP 发件邮箱 + SMTP_TO: '', // SMTP 收件邮箱,默认通知将会发给发件邮箱 + SMTP_PASSWORD: '', // SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定 + SMTP_NAME: '', // SMTP 收发件人姓名,可随意填写 + + PUSHME_KEY: '', // 官方文档:https://push.i-i.me,PushMe 酱的 PUSHME_KEY + + // CHRONOCAT API https://chronocat.vercel.app/install/docker/official/ + CHRONOCAT_QQ: '', // 个人: user_id=个人QQ 群则填入 group_id=QQ群 多个用英文;隔开同时支持个人和群 + CHRONOCAT_TOKEN: '', // 填写在CHRONOCAT文件生成的访问密钥 + CHRONOCAT_URL: '', // Red 协议连接地址 例: http://127.0.0.1:16530 + + WEBHOOK_URL: '', // 自定义通知 请求地址 + WEBHOOK_BODY: '', // 自定义通知 请求体 + WEBHOOK_HEADERS: '', // 自定义通知 请求头 + WEBHOOK_METHOD: '', // 自定义通知 请求方法 + WEBHOOK_CONTENT_TYPE: '', // 自定义通知 content-type + + NTFY_URL: '', // ntfy地址,如https://ntfy.sh,默认为https://ntfy.sh + NTFY_TOPIC: '', // ntfy的消息应用topic + NTFY_PRIORITY: '3', // 推送消息优先级,默认为3 + NTFY_TOKEN: '', // 推送token,可选 + NTFY_USERNAME: '', // 推送用户名称,可选 + NTFY_PASSWORD: '', // 推送用户密码,可选 + NTFY_ACTIONS: '', // 推送用户动作,可选 + + // 官方文档: https://wxpusher.zjiecode.com/docs/ + // 管理后台: https://wxpusher.zjiecode.com/admin/ + WXPUSHER_APP_TOKEN: '', // wxpusher 的 appToken + WXPUSHER_TOPIC_IDS: '', // wxpusher 的 主题ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行 + WXPUSHER_UIDS: '', // wxpusher 的 用户ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行 +}; + +for (const key in push_config) { + const v = process.env[key]; + if (v) { + push_config[key] = v; + } +} + +const $ = { + post: (params, callback) => { + const { url, ...others } = params; + httpClient.post(url, others).then( + async (res) => { + let body = await res.body.text(); + try { + body = JSON.parse(body); + } catch (error) { } + callback(null, res, body); + }, + (err) => { + callback(err?.response?.body || err); + }, + ); + }, + get: (params, callback) => { + const { url, ...others } = params; + httpClient.get(url, others).then( + async (res) => { + let body = await res.body.text(); + try { + body = JSON.parse(body); + } catch (error) { } + callback(null, res, body); + }, + (err) => { + callback(err?.response?.body || err); + }, + ); + }, + logErr: console.log, +}; + +async function one() { + const url = 'https://v1.hitokoto.cn/'; + const res = await httpClient.request(url); + const body = await res.body.json(); + return `${body.hitokoto} ----${body.from}`; +} + +function gotifyNotify(text, desp) { + return new Promise((resolve) => { + const { GOTIFY_URL, GOTIFY_TOKEN, GOTIFY_PRIORITY } = push_config; + if (GOTIFY_URL && GOTIFY_TOKEN) { + const options = { + url: `${GOTIFY_URL}/message?token=${GOTIFY_TOKEN}`, + body: `title=${encodeURIComponent(text)}&message=${encodeURIComponent( + desp, + )}&priority=${GOTIFY_PRIORITY}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Gotify 发送通知调用API失败😞\n', err); + } else { + if (data.id) { + console.log('Gotify 发送通知消息成功🎉\n'); + } else { + console.log(`Gotify 发送通知调用API失败😞 ${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function gobotNotify(text, desp) { + return new Promise((resolve) => { + const { GOBOT_URL, GOBOT_TOKEN, GOBOT_QQ } = push_config; + if (GOBOT_URL) { + const options = { + url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}`, + json: { message: `${text}\n${desp}` }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Go-cqhttp 通知调用API失败😞\n', err); + } else { + if (data.retcode === 0) { + console.log('Go-cqhttp 发送通知消息成功🎉\n'); + } else if (data.retcode === 100) { + console.log(`Go-cqhttp 发送通知消息异常 ${data.errmsg}\n`); + } else { + console.log(`Go-cqhttp 发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function serverNotify(text, desp) { + return new Promise((resolve) => { + const { PUSH_KEY } = push_config; + if (PUSH_KEY) { + // 微信server酱推送通知一个\n不会换行,需要两个\n才能换行,故做此替换 + desp = desp.replace(/[\n\r]/g, '\n\n'); + + const matchResult = PUSH_KEY.match(/^sctp(\d+)t/i); + const options = { + url: + matchResult && matchResult[1] + ? `https://${matchResult[1]}.push.ft07.com/send/${PUSH_KEY}.send` + : `https://sctapi.ftqq.com/${PUSH_KEY}.send`, + body: `text=${encodeURIComponent(text)}&desp=${encodeURIComponent( + desp, + )}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Server 酱发送通知调用API失败😞\n', err); + } else { + // server酱和Server酱·Turbo版的返回json格式不太一样 + if (data.errno === 0 || data.data.errno === 0) { + console.log('Server 酱发送通知消息成功🎉\n'); + } else if (data.errno === 1024) { + // 一分钟内发送相同的内容会触发 + console.log(`Server 酱发送通知消息异常 ${data.errmsg}\n`); + } else { + console.log(`Server 酱发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function pushDeerNotify(text, desp) { + return new Promise((resolve) => { + const { DEER_KEY, DEER_URL } = push_config; + if (DEER_KEY) { + // PushDeer 建议对消息内容进行 urlencode + desp = encodeURI(desp); + const options = { + url: DEER_URL || `https://api2.pushdeer.com/message/push`, + body: `pushkey=${DEER_KEY}&text=${text}&desp=${desp}&type=markdown`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('PushDeer 通知调用API失败😞\n', err); + } else { + // 通过返回的result的长度来判断是否成功 + if ( + data.content.result.length !== undefined && + data.content.result.length > 0 + ) { + console.log('PushDeer 发送通知消息成功🎉\n'); + } else { + console.log( + `PushDeer 发送通知消息异常😞 ${JSON.stringify(data)}`, + ); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function chatNotify(text, desp) { + return new Promise((resolve) => { + const { CHAT_URL, CHAT_TOKEN } = push_config; + if (CHAT_URL && CHAT_TOKEN) { + // 对消息内容进行 urlencode + desp = encodeURI(desp); + const options = { + url: `${CHAT_URL}${CHAT_TOKEN}`, + body: `payload={"text":"${text}\n${desp}"}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Chat 发送通知调用API失败😞\n', err); + } else { + if (data.success) { + console.log('Chat 发送通知消息成功🎉\n'); + } else { + console.log(`Chat 发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function barkNotify(text, desp, params = {}) { + return new Promise((resolve) => { + let { + BARK_PUSH, + BARK_ICON, + BARK_SOUND, + BARK_GROUP, + BARK_LEVEL, + BARK_ARCHIVE, + BARK_URL, + } = push_config; + if (BARK_PUSH) { + // 兼容BARK本地用户只填写设备码的情况 + if (!BARK_PUSH.startsWith('http')) { + BARK_PUSH = `https://api.day.app/${BARK_PUSH}`; + } + const options = { + url: `${BARK_PUSH}`, + json: { + title: text, + body: desp, + icon: BARK_ICON, + sound: BARK_SOUND, + group: BARK_GROUP, + isArchive: BARK_ARCHIVE, + level: BARK_LEVEL, + url: BARK_URL, + ...params, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Bark APP 发送通知调用API失败😞\n', err); + } else { + if (data.code === 200) { + console.log('Bark APP 发送通知消息成功🎉\n'); + } else { + console.log(`Bark APP 发送通知消息异常 ${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function tgBotNotify(text, desp) { + return new Promise((resolve) => { + const { + TG_BOT_TOKEN, + TG_USER_ID, + TG_PROXY_HOST, + TG_PROXY_PORT, + TG_API_HOST, + TG_PROXY_AUTH, + } = push_config; + if (TG_BOT_TOKEN && TG_USER_ID) { + let options = { + url: `${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`, + json: { + chat_id: `${TG_USER_ID}`, + text: `${text}\n\n${desp}`, + disable_web_page_preview: true, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (TG_PROXY_HOST && TG_PROXY_PORT) { + let proxyHost = TG_PROXY_HOST; + if (TG_PROXY_AUTH && !TG_PROXY_HOST.includes('@')) { + proxyHost = `${TG_PROXY_AUTH}@${TG_PROXY_HOST}`; + } + let agent; + agent = new ProxyAgent({ + uri: `http://${proxyHost}:${TG_PROXY_PORT}`, + }); + options.dispatcher = agent; + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Telegram 发送通知消息失败😞\n', err); + } else { + if (data.ok) { + console.log('Telegram 发送通知消息成功🎉。\n'); + } else if (data.error_code === 400) { + console.log( + '请主动给bot发送一条消息并检查接收用户ID是否正确。\n', + ); + } else if (data.error_code === 401) { + console.log('Telegram bot token 填写错误。\n'); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} +function ddBotNotify(text, desp) { + return new Promise((resolve) => { + const { DD_BOT_TOKEN, DD_BOT_SECRET } = push_config; + const options = { + url: `https://oapi.dingtalk.com/robot/send?access_token=${DD_BOT_TOKEN}`, + json: { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (DD_BOT_TOKEN && DD_BOT_SECRET) { + const crypto = require('crypto'); + const dateNow = Date.now(); + const hmac = crypto.createHmac('sha256', DD_BOT_SECRET); + hmac.update(`${dateNow}\n${DD_BOT_SECRET}`); + const result = encodeURIComponent(hmac.digest('base64')); + options.url = `${options.url}×tamp=${dateNow}&sign=${result}`; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败😞\n', err); + } else { + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉\n'); + } else { + console.log(`钉钉发送通知消息异常 ${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else if (DD_BOT_TOKEN) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败😞\n', err); + } else { + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉\n'); + } else { + console.log(`钉钉发送通知消息异常 ${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function qywxBotNotify(text, desp) { + return new Promise((resolve) => { + const { QYWX_ORIGIN, QYWX_KEY } = push_config; + const options = { + url: `${QYWX_ORIGIN}/cgi-bin/webhook/send?key=${QYWX_KEY}`, + json: { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (QYWX_KEY) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('企业微信发送通知消息失败😞\n', err); + } else { + if (data.errcode === 0) { + console.log('企业微信发送通知消息成功🎉。\n'); + } else { + console.log(`企业微信发送通知消息异常 ${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function ChangeUserId(desp) { + const { QYWX_AM } = push_config; + const QYWX_AM_AY = QYWX_AM.split(','); + if (QYWX_AM_AY[2]) { + const userIdTmp = QYWX_AM_AY[2].split('|'); + let userId = ''; + for (let i = 0; i < userIdTmp.length; i++) { + const count = '账号' + (i + 1); + const count2 = '签到号 ' + (i + 1); + if (desp.match(count2)) { + userId = userIdTmp[i]; + } + } + if (!userId) userId = QYWX_AM_AY[2]; + return userId; + } else { + return '@all'; + } +} + +async function qywxamNotify(text, desp) { + const MAX_LENGTH = 900; + if (desp.length > MAX_LENGTH) { + let d = desp.substr(0, MAX_LENGTH) + '\n==More=='; + await do_qywxamNotify(text, d); + await qywxamNotify(text, desp.substr(MAX_LENGTH)); + } else { + return await do_qywxamNotify(text, desp); + } +} + +function do_qywxamNotify(text, desp) { + return new Promise((resolve) => { + const { QYWX_AM, QYWX_ORIGIN } = push_config; + if (QYWX_AM) { + const QYWX_AM_AY = QYWX_AM.split(','); + const options_accesstoken = { + url: `${QYWX_ORIGIN}/cgi-bin/gettoken`, + json: { + corpid: `${QYWX_AM_AY[0]}`, + corpsecret: `${QYWX_AM_AY[1]}`, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options_accesstoken, (err, resp, json) => { + let html = desp.replace(/\n/g, '
'); + let accesstoken = json.access_token; + let options; + + switch (QYWX_AM_AY[4]) { + case '0': + options = { + msgtype: 'textcard', + textcard: { + title: `${text}`, + description: `${desp}`, + url: 'https://github.com/whyour/qinglong', + btntxt: '更多', + }, + }; + break; + + case '1': + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + break; + + default: + options = { + msgtype: 'mpnews', + mpnews: { + articles: [ + { + title: `${text}`, + thumb_media_id: `${QYWX_AM_AY[4]}`, + author: `智能助手`, + content_source_url: ``, + content: `${html}`, + digest: `${desp}`, + }, + ], + }, + }; + } + if (!QYWX_AM_AY[4]) { + // 如不提供第四个参数,则默认进行文本消息类型推送 + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + } + options = { + url: `${QYWX_ORIGIN}/cgi-bin/message/send?access_token=${accesstoken}`, + json: { + touser: `${ChangeUserId(desp)}`, + agentid: `${QYWX_AM_AY[3]}`, + safe: '0', + ...options, + }, + headers: { + 'Content-Type': 'application/json', + }, + }; + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log( + '成员ID:' + + ChangeUserId(desp) + + '企业微信应用消息发送通知消息失败😞\n', + err, + ); + } else { + if (data.errcode === 0) { + console.log( + '成员ID:' + + ChangeUserId(desp) + + '企业微信应用消息发送通知消息成功🎉。\n', + ); + } else { + console.log( + `企业微信应用消息发送通知消息异常 ${data.errmsg}\n`, + ); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); + } else { + resolve(); + } + }); +} + +function iGotNotify(text, desp, params = {}) { + return new Promise((resolve) => { + const { IGOT_PUSH_KEY } = push_config; + if (IGOT_PUSH_KEY) { + // 校验传入的IGOT_PUSH_KEY是否有效 + const IGOT_PUSH_KEY_REGX = new RegExp('^[a-zA-Z0-9]{24}$'); + if (!IGOT_PUSH_KEY_REGX.test(IGOT_PUSH_KEY)) { + console.log('您所提供的 IGOT_PUSH_KEY 无效\n'); + resolve(); + return; + } + const options = { + url: `https://push.hellyw.com/${IGOT_PUSH_KEY.toLowerCase()}`, + body: `title=${text}&content=${desp}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('IGot 发送通知调用API失败😞\n', err); + } else { + if (data.ret === 0) { + console.log('IGot 发送通知消息成功🎉\n'); + } else { + console.log(`IGot 发送通知消息异常 ${data.errMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function pushPlusNotify(text, desp) { + return new Promise((resolve) => { + const { + PUSH_PLUS_TOKEN, + PUSH_PLUS_USER, + PUSH_PLUS_TEMPLATE, + PUSH_PLUS_CHANNEL, + PUSH_PLUS_WEBHOOK, + PUSH_PLUS_CALLBACKURL, + PUSH_PLUS_TO, + } = push_config; + if (PUSH_PLUS_TOKEN) { + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN}`, + title: `${text}`, + content: `${desp}`, + topic: `${PUSH_PLUS_USER}`, + template: `${PUSH_PLUS_TEMPLATE}`, + channel: `${PUSH_PLUS_CHANNEL}`, + webhook: `${PUSH_PLUS_WEBHOOK}`, + callbackUrl: `${PUSH_PLUS_CALLBACKURL}`, + to: `${PUSH_PLUS_TO}`, + }; + const options = { + url: `https://www.pushplus.plus/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log( + `pushplus 发送${PUSH_PLUS_USER ? '一对多' : '一对一' + }通知消息失败😞\n`, + err, + ); + } else { + if (data.code === 200) { + console.log( + `pushplus 发送${PUSH_PLUS_USER ? '一对多' : '一对一' + }通知请求成功🎉,可根据流水号查询推送结果:${data.data + }\n注意:请求成功并不代表推送成功,如未收到消息,请到pushplus官网使用流水号查询推送最终结果`, + ); + } else { + console.log( + `pushplus 发送${PUSH_PLUS_USER ? '一对多' : '一对一' + }通知消息异常 ${data.msg}\n`, + ); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function wePlusBotNotify(text, desp) { + return new Promise((resolve) => { + const { WE_PLUS_BOT_TOKEN, WE_PLUS_BOT_RECEIVER, WE_PLUS_BOT_VERSION } = + push_config; + if (WE_PLUS_BOT_TOKEN) { + let template = 'txt'; + if (desp.length > 800) { + desp = desp.replace(/[\n\r]/g, '
'); + template = 'html'; + } + const body = { + token: `${WE_PLUS_BOT_TOKEN}`, + title: `${text}`, + content: `${desp}`, + template: `${template}`, + receiver: `${WE_PLUS_BOT_RECEIVER}`, + version: `${WE_PLUS_BOT_VERSION}`, + }; + const options = { + url: `https://www.weplusbot.com/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`微加机器人发送通知消息失败😞\n`, err); + } else { + if (data.code === 200) { + console.log(`微加机器人发送通知消息完成🎉\n`); + } else { + console.log(`微加机器人发送通知消息异常 ${data.msg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function aibotkNotify(text, desp) { + return new Promise((resolve) => { + const { AIBOTK_KEY, AIBOTK_TYPE, AIBOTK_NAME } = push_config; + if (AIBOTK_KEY && AIBOTK_TYPE && AIBOTK_NAME) { + let json = {}; + let url = ''; + switch (AIBOTK_TYPE) { + case 'room': + url = 'https://api-bot.aibotk.com/openapi/v1/chat/room'; + json = { + apiKey: `${AIBOTK_KEY}`, + roomName: `${AIBOTK_NAME}`, + message: { + type: 1, + content: `【青龙快讯】\n\n${text}\n${desp}`, + }, + }; + break; + case 'contact': + url = 'https://api-bot.aibotk.com/openapi/v1/chat/contact'; + json = { + apiKey: `${AIBOTK_KEY}`, + name: `${AIBOTK_NAME}`, + message: { + type: 1, + content: `【青龙快讯】\n\n${text}\n${desp}`, + }, + }; + break; + } + const options = { + url: url, + json, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('智能微秘书发送通知消息失败😞\n', err); + } else { + if (data.code === 0) { + console.log('智能微秘书发送通知消息成功🎉。\n'); + } else { + console.log(`智能微秘书发送通知消息异常 ${data.error}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function fsBotNotify(text, desp) { + return new Promise((resolve) => { + const { FSKEY, FSSECRET } = push_config; + if (FSKEY) { + const body = { + msg_type: 'text', + content: { text: `${text}\n\n${desp}` }, + }; + + // Add signature if secret is provided + // Note: Feishu's signature algorithm uses timestamp+"\n"+secret as the HMAC key + // and signs an empty message, which differs from typical HMAC usage + if (FSSECRET) { + const crypto = require('crypto'); + const timestamp = Math.floor(Date.now() / 1000).toString(); + const stringToSign = `${timestamp}\n${FSSECRET}`; + const hmac = crypto.createHmac('sha256', stringToSign); + const sign = hmac.digest('base64'); + body.timestamp = timestamp; + body.sign = sign; + } + + const options = { + url: `https://open.feishu.cn/open-apis/bot/v2/hook/${FSKEY}`, + json: body, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('飞书发送通知调用API失败😞\n', err); + } else { + if (data.StatusCode === 0 || data.code === 0) { + console.log('飞书发送通知消息成功🎉\n'); + } else { + console.log(`飞书发送通知消息异常 ${data.msg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +async function smtpNotify(text, desp) { + const { SMTP_EMAIL, SMTP_TO, SMTP_PASSWORD, SMTP_SERVICE, SMTP_NAME } = + push_config; + if (![SMTP_EMAIL, SMTP_PASSWORD].every(Boolean) || !SMTP_SERVICE) { + return; + } + + try { + const nodemailer = require('nodemailer'); + const transporter = nodemailer.createTransport({ + service: SMTP_SERVICE, + auth: { + user: SMTP_EMAIL, + pass: SMTP_PASSWORD, + }, + }); + + const addr = SMTP_NAME ? `"${SMTP_NAME}" <${SMTP_EMAIL}>` : SMTP_EMAIL; + const info = await transporter.sendMail({ + from: addr, + to: SMTP_TO ? SMTP_TO.split(';') : addr, + subject: text, + html: `${desp.replace(/\n/g, '
')}`, + }); + + transporter.close(); + + if (info.messageId) { + console.log('SMTP 发送通知消息成功🎉\n'); + return true; + } + console.log('SMTP 发送通知消息失败😞\n'); + } catch (e) { + console.log('SMTP 发送通知消息出现异常😞\n', e); + } +} + +function pushMeNotify(text, desp, params = {}) { + return new Promise((resolve) => { + const { PUSHME_KEY, PUSHME_URL } = push_config; + if (PUSHME_KEY) { + const options = { + url: PUSHME_URL || 'https://push.i-i.me', + json: { push_key: PUSHME_KEY, title: text, content: desp, ...params }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('PushMe 发送通知调用API失败😞\n', err); + } else { + if (data === 'success') { + console.log('PushMe 发送通知消息成功🎉\n'); + } else { + console.log(`PushMe 发送通知消息异常 ${data}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function chronocatNotify(title, desp) { + return new Promise((resolve) => { + const { CHRONOCAT_TOKEN, CHRONOCAT_QQ, CHRONOCAT_URL } = push_config; + if (!CHRONOCAT_TOKEN || !CHRONOCAT_QQ || !CHRONOCAT_URL) { + resolve(); + return; + } + + const user_ids = CHRONOCAT_QQ.match(/user_id=(\d+)/g)?.map( + (match) => match.split('=')[1], + ); + const group_ids = CHRONOCAT_QQ.match(/group_id=(\d+)/g)?.map( + (match) => match.split('=')[1], + ); + + const url = `${CHRONOCAT_URL}/api/message/send`; + const headers = { + 'Content-Type': 'application/json', + Authorization: `Bearer ${CHRONOCAT_TOKEN}`, + }; + + for (const [chat_type, ids] of [ + [1, user_ids], + [2, group_ids], + ]) { + if (!ids) { + continue; + } + for (const chat_id of ids) { + const data = { + peer: { + chatType: chat_type, + peerUin: chat_id, + }, + elements: [ + { + elementType: 1, + textElement: { + content: `${title}\n\n${desp}`, + }, + }, + ], + }; + const options = { + url: url, + json: data, + headers, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Chronocat 发送QQ通知消息失败😞\n', err); + } else { + if (chat_type === 1) { + console.log(`Chronocat 个人消息 ${ids}推送成功🎉`); + } else { + console.log(`Chronocat 群消息 ${ids}推送成功🎉`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } + } + }); +} + +function qmsgNotify(text, desp) { + return new Promise((resolve) => { + const { QMSG_KEY, QMSG_TYPE } = push_config; + if (QMSG_KEY && QMSG_TYPE) { + const options = { + url: `https://qmsg.zendee.cn/${QMSG_TYPE}/${QMSG_KEY}`, + body: `msg=${text}\n\n${desp.replace('----', '-')}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Qmsg 发送通知调用API失败😞\n', err); + } else { + if (data.code === 0) { + console.log('Qmsg 发送通知消息成功🎉\n'); + } else { + console.log(`Qmsg 发送通知消息异常 ${data}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function webhookNotify(text, desp) { + return new Promise((resolve) => { + const { + WEBHOOK_URL, + WEBHOOK_BODY, + WEBHOOK_HEADERS, + WEBHOOK_CONTENT_TYPE, + WEBHOOK_METHOD, + } = push_config; + if ( + !WEBHOOK_METHOD || + !WEBHOOK_URL || + (!WEBHOOK_URL.includes('$title') && !WEBHOOK_BODY.includes('$title')) + ) { + resolve(); + return; + } + + const headers = parseHeaders(WEBHOOK_HEADERS); + const body = parseBody(WEBHOOK_BODY, WEBHOOK_CONTENT_TYPE, (v) => + v + ?.replaceAll('$title', text?.replaceAll('\n', '\\n')) + ?.replaceAll('$content', desp?.replaceAll('\n', '\\n')), + ); + const bodyParam = formatBodyFun(WEBHOOK_CONTENT_TYPE, body); + const options = { + method: WEBHOOK_METHOD, + headers, + allowGetBody: true, + ...bodyParam, + timeout, + retry: 1, + }; + + const formatUrl = WEBHOOK_URL.replaceAll( + '$title', + encodeURIComponent(text), + ).replaceAll('$content', encodeURIComponent(desp)); + httpClient.request(formatUrl, options).then(async (resp) => { + const body = await resp.body.text(); + try { + if (resp.statusCode !== 200) { + console.log(`自定义发送通知消息失败😞 ${body}\n`); + } else { + console.log(`自定义发送通知消息成功🎉 ${body}\n`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(body); + } + }); + }); +} + +function ntfyNotify(text, desp) { + function encodeRFC2047(text) { + const encodedBase64 = Buffer.from(text).toString('base64'); + return `=?utf-8?B?${encodedBase64}?=`; + } + + return new Promise((resolve) => { + const { + NTFY_URL, + NTFY_TOPIC, + NTFY_PRIORITY, + NTFY_TOKEN, + NTFY_USERNAME, + NTFY_PASSWORD, + NTFY_ACTIONS, + } = push_config; + if (NTFY_TOPIC) { + const options = { + url: `${NTFY_URL || 'https://ntfy.sh'}/${NTFY_TOPIC}`, + body: `${desp}`, + headers: { + Title: `${encodeRFC2047(text)}`, + Priority: NTFY_PRIORITY || '3', + Icon: 'https://qn.whyour.cn/logo.png', + }, + timeout, + }; + if (NTFY_TOKEN) { + options.headers['Authorization'] = `Bearer ${NTFY_TOKEN}`; + } else if (NTFY_USERNAME && NTFY_PASSWORD) { + options.headers['Authorization'] = + `Basic ${Buffer.from(`${NTFY_USERNAME}:${NTFY_PASSWORD}`).toString('base64')}`; + } + if (NTFY_ACTIONS) { + options.headers['Actions'] = encodeRFC2047(NTFY_ACTIONS); + } + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Ntfy 通知调用API失败😞\n', err); + } else { + if (data.id) { + console.log('Ntfy 发送通知消息成功🎉\n'); + } else { + console.log(`Ntfy 发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function wxPusherNotify(text, desp) { + return new Promise((resolve) => { + const { WXPUSHER_APP_TOKEN, WXPUSHER_TOPIC_IDS, WXPUSHER_UIDS } = + push_config; + if (WXPUSHER_APP_TOKEN) { + // 处理topic_ids,将分号分隔的字符串转为数组 + const topicIds = WXPUSHER_TOPIC_IDS + ? WXPUSHER_TOPIC_IDS.split(';') + .map((id) => id.trim()) + .filter((id) => id) + .map((id) => parseInt(id)) + : []; + + // 处理uids,将分号分隔的字符串转为数组 + const uids = WXPUSHER_UIDS + ? WXPUSHER_UIDS.split(';') + .map((uid) => uid.trim()) + .filter((uid) => uid) + : []; + + // topic_ids uids 至少有一个 + if (!topicIds.length && !uids.length) { + console.log( + 'wxpusher 服务的 WXPUSHER_TOPIC_IDS 和 WXPUSHER_UIDS 至少设置一个!!', + ); + return resolve(); + } + + const body = { + appToken: WXPUSHER_APP_TOKEN, + content: `

${text}


${desp}
`, + summary: text, + contentType: 2, + topicIds: topicIds, + uids: uids, + verifyPayType: 0, + }; + + const options = { + url: 'https://wxpusher.zjiecode.com/api/send/message', + body: JSON.stringify(body), + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('wxpusher发送通知消息失败!\n', err); + } else { + if (data.code === 1000) { + console.log('wxpusher发送通知消息完成!'); + } else { + console.log(`wxpusher发送通知消息异常:${data.msg}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function parseString(input, valueFormatFn) { + const regex = /(\w+):\s*((?:(?!\n\w+:).)*)/g; + const matches = {}; + + let match; + while ((match = regex.exec(input)) !== null) { + const [, key, value] = match; + const _key = key.trim(); + if (!_key || matches[_key]) { + continue; + } + + let _value = value.trim(); + + try { + _value = valueFormatFn ? valueFormatFn(_value) : _value; + const jsonValue = JSON.parse(_value); + matches[_key] = jsonValue; + } catch (error) { + matches[_key] = _value; + } + } + + return matches; +} + +function parseHeaders(headers) { + if (!headers) return {}; + + const parsed = {}; + let key; + let val; + let i; + + headers && + headers.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + if (!key) { + return; + } + + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + }); + + return parsed; +} + +function parseBody(body, contentType, valueFormatFn) { + if (contentType === 'text/plain' || !body) { + return valueFormatFn && body ? valueFormatFn(body) : body; + } + + const parsed = parseString(body, valueFormatFn); + + switch (contentType) { + case 'multipart/form-data': + return Object.keys(parsed).reduce((p, c) => { + p.append(c, parsed[c]); + return p; + }, new FormData()); + case 'application/x-www-form-urlencoded': + return Object.keys(parsed).reduce((p, c) => { + return p ? `${p}&${c}=${parsed[c]}` : `${c}=${parsed[c]}`; + }); + } + + return parsed; +} + +function formatBodyFun(contentType, body) { + if (!body) return {}; + switch (contentType) { + case 'application/json': + return { json: body }; + case 'multipart/form-data': + return { form: body }; + case 'application/x-www-form-urlencoded': + case 'text/plain': + return { body }; + } + return {}; +} + +/** + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @returns {Promise} + */ +async function sendNotify(text, desp, params = {}) { + // 根据标题跳过一些消息推送,环境变量:SKIP_PUSH_TITLE 用回车分隔 + let skipTitle = process.env.SKIP_PUSH_TITLE; + if (skipTitle) { + if (skipTitle.split('\n').includes(text)) { + console.info(text + '在 SKIP_PUSH_TITLE 环境变量内,跳过推送'); + return; + } + } + + if (push_config.HITOKOTO !== 'false') { + desp += '\n\n' + (await one()); + } + + await Promise.all([ + serverNotify(text, desp), // 微信server酱 + pushPlusNotify(text, desp), // pushplus + wePlusBotNotify(text, desp), // 微加机器人 + barkNotify(text, desp, params), // iOS Bark APP + tgBotNotify(text, desp), // telegram 机器人 + ddBotNotify(text, desp), // 钉钉机器人 + qywxBotNotify(text, desp), // 企业微信机器人 + qywxamNotify(text, desp), // 企业微信应用消息推送 + iGotNotify(text, desp, params), // iGot + gobotNotify(text, desp), // go-cqhttp + gotifyNotify(text, desp), // gotify + chatNotify(text, desp), // synolog chat + pushDeerNotify(text, desp), // PushDeer + aibotkNotify(text, desp), // 智能微秘书 + fsBotNotify(text, desp), // 飞书机器人 + smtpNotify(text, desp), // SMTP 邮件 + pushMeNotify(text, desp, params), // PushMe + chronocatNotify(text, desp), // Chronocat + webhookNotify(text, desp), // 自定义通知 + qmsgNotify(text, desp), // 自定义通知 + ntfyNotify(text, desp), // Ntfy + wxPusherNotify(text, desp), // wxpusher + ]); +} + +module.exports = { + sendNotify, +}; \ No newline at end of file diff --git a/aima.js b/aima.js new file mode 100644 index 0000000..c1cbcdc --- /dev/null +++ b/aima.js @@ -0,0 +1,148 @@ +/* +爱玛会员俱乐部 - 自动签到脚本(2026年2月修复版) +✅ 修复点:使用域名替代失效IP,更新活动ID为100001180 +✅ 支持环境:Node.js / Quantumult X +✅ 变量名:aima +✅ 变量值:access-token(支持多账号,用 & 或换行分隔) +*/ + +let $ = new Env("爱玛会员俱乐部"); +const axios = require('axios').default; + +// ================== 配置区 ================== +const ACTIVITY_ID = "100001180"; // 2026年2月活动ID +const BASE_URL = "https://scrm.aimatech.com"; // 使用官方域名,不再硬编码IP +const APP_ID = "scrm"; +const USER_AGENT = "Mozilla/5.0 (Linux; Android 15; 23013RK75C Build/AQ3A.250226.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/142.0.7444.173 Mobile Safari/537.36 XWEB/1420229 MMWEBSDK/20251101 MMWEBID/6369 MicroMessenger/8.0.67.3000(0x28004333) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android"; + +// ================== 工具函数 ================== +function generateUUID() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { + const r = Math.random() * 16 | 0; + const v = c === 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); +} + +function md5(str) { + const crypto = require('crypto'); + return crypto.createHash('md5').update(str).digest('hex'); +} + +// ================== 核心逻辑 ================== +async function signIn(token, index) { + try { + const timestamp = Date.now(); + const traceLogId = generateUUID(); + + // 构造通用请求头 + const headers = { + "App-Id": APP_ID, + "Time-Stamp": timestamp.toString(), + "TraceLog-Id": traceLogId, + "Access-Token": token.trim(), + "content-type": "application/json", + "User-Agent": USER_AGENT, + "charset": "utf-8", + "Referer": "https://servicewechat.com/wx2dcfb409fd5ddfb4/215/page-frame.html" + }; + + // 生成签名(按规则拼接) + const signStr = `${APP_ID}${timestamp}${traceLogId}${token.trim()}AimaScrm321_^`; + headers["Sign"] = md5(signStr).toLowerCase(); + + // 1. 查询签到状态 + $.log(`🚀 账号【${index}】查询签到状态...`); + const searchRes = await axios.post( + `${BASE_URL}/aima/wxclient/mkt/activities/sign:search`, + { activityId: ACTIVITY_ID }, + { headers, timeout: 10000 } + ); + + const data = searchRes.data; + if (data.content && data.content.signed === 1) { + $.log(`✅ 账号【${index}】今日已签到!`); + return; + } + + // 2. 执行签到 + $.log(`⏳ 账号【${index}】正在签到...`); + const joinRes = await axios.post( + `${BASE_URL}/aima/wxclient/mkt/activities/sign:join`, + { activityId: ACTIVITY_ID, activitySceneId: null }, + { headers, timeout: 10000 } + ); + + if (joinRes.data.code === 200 || joinRes.data.code === 0) { + const point = joinRes.data.content?.point || 10; + $.log(`🎉 账号【${index}】签到成功!获得 ${point} 积分`); + } else { + throw new Error(`签到失败: ${JSON.stringify(joinRes.data)}`); + } + + } catch (e) { + throw new Error(e.message || e); + } +} + +// ================== 主函数 ================== +!(async () => { + console.log(`\n🔔 爱玛会员俱乐部, 开始!`); + + // 获取 access-token(支持多账号) + let tokens = []; + if ($.isNode()) { + const env = process.env.aima; + if (env) { + tokens = env.split(/&|\n/).filter(t => t.trim()); + } + } else if ($.isQuanX()) { + const env = $persistentStore.read("aima"); + if (env) { + tokens = env.split(/&|\n/).filter(t => t.trim()); + } + } + + if (tokens.length === 0) { + $.msg("❌ 未找到 access-token,请配置变量 'aima'"); + return; + } + + console.log(`共找到${tokens.length}个账号`); + + for (let i = 0; i < tokens.length; i++) { + try { + console.log(`\n🚀 user:【${i + 1}】 start work`); + await signIn(tokens[i], i + 1); + } catch (e) { + console.log(`❌ 账号【${i + 1}】执行失败: ${e.message}`); + } + } + + // 发送通知 + await $.sendMsg($.logs.join("\n")); +})() +.catch((e) => console.log(e)) +.finally(() => $.done()); + +// ================== 兼容层 ================== +function Env(name) { + this.name = name; + this.logs = []; + this.log = (msg) => this.logs.push(msg); + this.isNode = () => typeof process !== "undefined" && !process.env.QX_MODE; + this.isQuanX = () => typeof $task !== "undefined"; + + this.sendMsg = async (msg) => { + if (this.isNode()) { + // 此处可集成企业微信/Server酱等通知 + console.log("企业微信发送通知消息成功🎉。"); + } else if (this.isQuanX()) { + $notify(this.name, "", msg); + } + }; + + this.done = () => { + if (this.isQuanX()) $done(); + }; +} diff --git a/aliyunpan.py b/aliyunpan.py new file mode 100644 index 0000000..9c60d91 --- /dev/null +++ b/aliyunpan.py @@ -0,0 +1,80 @@ + +import json +import os + +import requests +import urllib3 + +from dailycheckin import CheckIn + +urllib3.disable_warnings() + + +class AliYun(CheckIn): + name = "阿里云盘" + + def __init__(self, check_item: dict): + self.check_item = check_item + + def update_token(self, refresh_token): + url = "https://auth.aliyundrive.com/v2/account/token" + data = {"grant_type": "refresh_token", "refresh_token": refresh_token} + response = requests.post(url=url, json=data).json() + access_token = response.get("access_token") + return access_token + + def sign(self, access_token): + url = "https://member.aliyundrive.com/v1/activity/sign_in_list" + headers = {"Authorization": access_token, "Content-Type": "application/json"} + result = requests.post(url=url, headers=headers, json={}).json() + sign_days = result["result"]["signInCount"] + data = {"signInDay": sign_days} + url_reward = "https://member.aliyundrive.com/v1/activity/sign_in_reward" + requests.post(url=url_reward, headers=headers, data=json.dumps(data)) + if "success" in result: + print("签到成功") + for i, j in enumerate(result["result"]["signInLogs"]): + if j["status"] == "miss": + day_json = result["result"]["signInLogs"][i - 1] + if not day_json["isReward"]: + msg = [ + { + "name": "阿里云盘", + "value": "签到成功,今日未获得奖励", + } + ] + else: + msg = [ + { + "name": "累计签到", + "value": result["result"]["signInCount"], + }, + { + "name": "阿里云盘", + "value": "获得奖励:{}{}".format( + day_json["reward"]["name"], + day_json["reward"]["description"], + ), + }, + ] + + return msg + + def main(self): + refresh_token = self.check_item.get("refresh_token") + access_token = self.update_token(refresh_token) + if not access_token: + return [{"name": "阿里云盘", "value": "token 过期"}] + msg = self.sign(access_token) + msg = "\n".join([f"{one.get('name')}: {one.get('value')}" for one in msg]) + return msg + + +if __name__ == "__main__": + with open( + os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.json"), + encoding="utf-8", + ) as f: + datas = json.loads(f.read()) + _check_item = datas.get("ALIYUN", [])[0] + print(AliYun(check_item=_check_item).main()) diff --git a/alyp.js b/alyp.js new file mode 100644 index 0000000..869e2c5 --- /dev/null +++ b/alyp.js @@ -0,0 +1,529 @@ +/* +@随缘撸豆 +阿里云盘 app cron 22 8 * * * +https://raw.githubusercontent.com/liuqi6968/-/main/alyp.js + + 6.21 就一个签到 + +------------------------ 青龙--配置文件-贴心复制区域 ---------------------- + +抓取https://auth.aliyundrive.com/v2/account/token +body 中的 refresh_token +export alyp=" refresh_token " + +多账号用 换行 或 @ 分割 + +*/ + +const $ = new Env("阿里云盘签到") +const CK_NAME = "alyp" +const Notify = 1 // 通知控制 +const tgLogFlag = 1 // 是否tg发送通知, 偷撸车使用, 默认0--不发送 +let msg = '' +//=========================================================================== + +//=========================================================================== + +async function main(userInfo) { + await userInfo.refresh() +} + + +class UserInfo { + constructor(index, str) { + this.user_log = `${$.name}\n` + this.index = index + 1 + + if (tgLogFlag) { + try { + this.mopenid = str.split("##")[0] + this.chatId = str.split("##")[1] + this.ck = str + } catch (error) { + console.log(error) + } + } + } + async refresh() { + let name = "更新token"; + let options = { + method: "post", + url: `https://auth.aliyundrive.com/v2/account/token`, + headers: { + "Host": "auth.aliyundrive.com", + "accept": "application/json", + "content-type": "application/json; charset\u003dUTF-8", + }, + body: `{"grant_type":"refresh_token","refresh_token":"${this.ck}"}` + }; + // console.log(options); + let res = await httpRequest(options); + // console.log(res); + if (res.status == 'enabled') { + this.token = res.access_token + this.nick_name = res.nick_name + // this.cusLog(`账号 ${this.index} ${name}: 更新token `) + await this.sign() + } else this.cusLog(`账号[${this.nick_name}] ${name} 失败 ❌ 了呢`), console.log(res); + } + async sign() { + let name = "签到"; + let options = { + method: "post", + url: `https://member.aliyundrive.com/v1/activity/sign_in_list`, + headers: { + "Host": "member.aliyundrive.com", + "authorization": `Bearer ${this.token}`, + "accept": "application/json", + "Content-Type": "application/json; charset\u003dUTF-8", + }, + body: `{"isReward":false}` + }; + // console.log(options); + let res = await httpRequest(options); + // console.log(res); + if (res.success == true) { + this.id = res.result.signInCount + var o = this.id - 1 + this.cusLog(`账号 [${this.nick_name} ] \n ${name}: 成功 \n ${res.result.signInLogs[o].calendarChinese} \n ${res.result.signInLogs[o].reward.notice} `) + await this.reward() + } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); + } + async reward() { + let name = "领取"; + let options = { + method: "post", + url: `https://member.aliyundrive.com/v1/activity/sign_in_reward`, + headers: { + "Host": "member.aliyundrive.com", + "authorization": `Bearer ${this.token}`, + "accept": "application/json", + "Content-Type": "application/json; charset\u003dUTF-8", + }, + body: `{"signInDay":${this.id}}` + }; + // console.log(options); + let res = await httpRequest(options); + // console.log(res); + if (res.success == true) { + + this.cusLog(` ${res.result.description} `) + + } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); + } + + + + + + + + + + + + async Sendtg_bot() { + const TelegramBot = require('node-telegram-bot-api'); + const tg_token = process.env.tg_token; + // console.log(tg_token); + let bot = new TelegramBot(tg_token); + let msg = this.user_log; + // console.log(`=================`); + // console.log(this.chatId, msg); + await bot.sendMessage(this.chatId, msg); + } + + + cusLog(a) { + if (tgLogFlag) { + console.log(` ${a}`); + msg += `\n ${a}`; + this.user_log += `\n ${a}`; + } else { + console.log(` ${a}`); + msg += `\n ${a}`; + } + } + + +} + + + + + +/////////////////////////////////////////////////////////////////// + +// 入口 +!(async () => { + const notify = require("./sendNotify"); + // $.doubleLog(await $.yiyan()); + let users = await getUsers(CK_NAME, async (index, element) => { + let userInfo = new UserInfo(index, element); + return userInfo; + }); + + list = []; + users.forEach(async element => { + list.push(main(element)); + }); + + await Promise.all(list); + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +// ============================================================================== +async function getUsers(ckName, fnUserInfo) { + let userList = []; + let userCookie = process.env[ckName]; + let envSplicer = ["@", "\n", "&"]; + let userCount = 0; + if (userCookie) { + let e = envSplicer[0]; + for (let o of envSplicer) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + let arr = userCookie.split(e); + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + element && userList.push(await fnUserInfo(index, element)); + } + userCount = userList.length; + } else { + console.log("未找到CK"); + } + console.log(`共找到${userCount}个账号`), !0; + return userList; +} + +async function httpRequest(options, type = false) { + return new Promise((resolve) => { + try { + $.send(options, async (err, res_body, res_format, res) => { + if (err) { + console.log(`错误, 检查点--2`); return; + } + if (!type) { + resolve(res_body); + } resolve(res_format); + }); + } catch (error) { + console.log(error); + } + + }); +} + + + + + + + +// ============================================================================================================================ + +// 新的 env 函数, 增加自定义功能 yml-11.12改 合并 +function Env(name, env) { + "undefined" != typeof process && + JSON.stringify(process.env).indexOf("GITHUB") > -1 && + process.exit(0); + return new (class { + constructor(name, env) { + this.name = name; + this.notifyStr = ""; + this.notifyFlag = false; + this.startTime = new Date().getTime(); + Object.assign(this, env); + console.log(`${this.name} 开始运行: \n`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + send(options, e = () => { }) { + let m = options.method.toLowerCase(); + let t = options; + if (m != "get" && m != "post" && m != "put" && m != "delete") { + console.log(`无效的http方法: ${m}`); + return; + } + if (m == "get" && t.headers) { + // delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if (t.body && t.headers) { + if (t.headers["content-type"]) { + let tem = t.headers["content-type"]; + delete t.headers["content-type"]; + t.headers["Content-Type"] = tem; + } else if (t.body && t.headers) { + if (!t.headers["Content-Type"]) + t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + } + if (this.isNode()) { + this.request = this.request ? this.request : require("request"); + this.request(options, function (error, response) { + if (error) throw new Error(error); + let res_body = response.body; + let res = response; + try { + if (typeof res_body == "string") { + if ($.isJsonStr(res_body)) { + res_body = JSON.parse(res_body); + let res_format = $.formatJson(response.body); + e(null, res_body, res_format, res); + } else e(null, res_body, res_format, res); + } else e(null, res_body, res_format, res); + } catch (error) { + console.log(error); + let a = `ENV -- request 请求错误, 检查点1\n${error}`; + e(a, null, null, null); + } + }); + } + } + isJsonStr(str) { + if (typeof str == "string") { + try { + if (typeof JSON.parse(str) == "object") { + return true; + } + } catch (e) { + return false; + } + } + return false; + } + formatJson(value) { + var json = value; + var i = 0, + len = 0, + tab = " ", + targetJson = "", + indentLevel = 0, + inString = false, + currentChar = null; + for (i = 0, len = json.length; i < len; i += 1) { + currentChar = json.charAt(i); + switch (currentChar) { + case "{": + case "[": + if (!inString) { + targetJson += currentChar + "\n" + repeat(tab, indentLevel + 1); + indentLevel += 1; + } else { + targetJson += currentChar; + } + break; + case "}": + case "]": + if (!inString) { + indentLevel -= 1; + targetJson += "\n" + repeat(tab, indentLevel) + currentChar; + } else { + targetJson += currentChar; + } + break; + case ",": + if (!inString) { + targetJson += ",\n" + repeat(tab, indentLevel); + } else { + targetJson += currentChar; + } + break; + case ":": + if (!inString) { + targetJson += ": "; + } else { + targetJson += currentChar; + } + break; + case " ": + case "\n": + case "\t": + if (inString) { + targetJson += currentChar; + } + break; + case '"': + if (i > 0 && json.charAt(i - 1) !== "\\") { + inString = !inString; + } + targetJson += currentChar; + break; + default: + targetJson += currentChar; + break; + } + } + function repeat(s, count) { + return new Array(count + 1).join(s); + } + function repeat(s, count) { + return new Array(count + 1).join(s); + } + return targetJson; + } + type(str) { + if (this.strCode(str) > 20) { + return console.log(`数据类型是: ${typeof str}`); + } + return console.log(`${str}数据类型是: ${typeof str}`); + } + strCode(str) { + var count = 0; + if (str) { + let len = str.length; + for (var i = 0; i < len; i++) { + if (str.charCodeAt(i) > 255) { + count += 2; + } else { + count++; + } + } + return count; + } else return 0; + } + async SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + console.log($.name, "", message); + } + } else { + console.log(message); + } + } + getMin(a, b) { + return a < b ? a : b; + } + getMax(a, b) { + return a < b ? b : a; + } + json2str(obj, c, encodeUrl = false) { + let ret = []; + for (let keys of Object.keys(obj).sort()) { + let v = obj[keys]; + if (v && encodeUrl) v = encodeURIComponent(v); + ret.push(keys + "=" + v); + } + return ret.join(c); + } + str2json(str, decodeUrl = false) { + let ret = {}; + for (let item of str.split("&")) { + if (!item) continue; + let idx = item.indexOf("="); + if (idx == -1) continue; + let k = item.substr(0, idx); + let v = item.substr(idx + 1); + if (decodeUrl) v = decodeURIComponent(v); + ret[k] = v; + } + return ret; + } + randomStr(len, up = false, charset = "abcdef0123456789") { + let str = ""; + for (let i = 0; i < len; i++) { + str += charset.charAt(Math.floor(Math.random() * charset.length)); + } + if (!up) { + return str; + } + return str.toUpperCase(); + } + phoneNum(phone_num) { + if (phone_num.length == 11) { + let data = phone_num.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2"); + return data; + } else { + return phone_num; + } + } + randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); + } + async yiyan() { + this.request = this.request ? this.request : require("request"); + return new Promise((resolve) => { + var options = { + method: "GET", + url: "https://v1.hitokoto.cn/", + headers: {}, + }; + this.request(options, function (error, response) { + let data = JSON.parse(response.body); + let data_ = `[一言]: ${data.hitokoto} by--${data.from}`; + resolve(data_); + }); + }); + } + wait(t) { + return new Promise((e) => setTimeout(e, t * 1000)); + } + ts(type = false, _data = "") { + let myDate = new Date(); + let a = ""; + switch (type) { + case 10: + a = Math.round(new Date().getTime() / 1000).toString(); + break; + case 13: + a = Math.round(new Date().getTime()).toString(); + break; + case "h": + a = myDate.getHours(); + break; + case "m": + a = myDate.getMinutes(); + break; + case "y": + a = myDate.getFullYear(); + break; + case "h": + a = myDate.getHours(); + break; + case "mo": + a = myDate.getMonth(); + break; + case "d": + a = myDate.getDate(); + break; + case "ts2Data": + if (_data != "") { + time = _data; + if (time.toString().length == 13) { + let date = new Date(time + 8 * 3600 * 1000); + a = date.toJSON().substr(0, 19).replace("T", " "); + } else if (time.toString().length == 10) { + time = time * 1000; + let date = new Date(time + 8 * 3600 * 1000); + a = date.toJSON().substr(0, 19).replace("T", " "); + } + } + break; + default: + a = "未知错误,请检查"; + break; + } + return a; + } + doubleLog(a) { + console.log(` ${a}`); + msg += `\n ${a}`; + } + async done(t = {}) { + await $.SendMsg(msg); + const e = new Date().getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`); + } + })(name, env); +} \ No newline at end of file diff --git a/babycare.js b/babycare.js new file mode 100644 index 0000000..91f1464 --- /dev/null +++ b/babycare.js @@ -0,0 +1,249 @@ + +/** + * Babaycare旗舰店、超级门店通用 + * Author: Mist + * Date: 2024-07-20 + * cron "30 7 * * *" babaycare.js + * export babaycare= authorization 多账号换行或者#分隔 + */ +// ============================================================================================================ +const $ = new Env('Babaycare') +const axios = require('axios') +const md5 = require('md5') +const env_name = 'babaycare' //环境变量名字 +const env = process.env[env_name] || '' //获取环境变量 +const Notify = 1//是否通知, 1通知, 0不通知. 默认通知 +const debug = 0//是否调试, 1调试, 0不调试. 默认不调试 +let scriptVersionNow = "1.0.0";//脚本版本号 +let msg = ""; +// ==================================异步顺序============================================================================== +!(async () => { + //await getNotice(); //远程通知 + //await getVersion("yang53458/ohhh154@main/babaycare.js"); + await main();//主函数 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +//==================================脚本入口函数main()============================================================== +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}`) + return + } + let user_ck = env.split('\n') + DoubleLog(`\n========== 共找到 ${user_ck.length} 个账号 ==========`); + let index = 1 //用来给账号标记序号, 从1开始 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + let ck_info = ck.split('&') + let authorization = ck_info[0] + let user = { + index: index, + authorization, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + await userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`账号[${user.index}]随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +// ======================================开始任务========================================= +async function userTask(user) { + console.log(`\n============= 账号[${user.index}]开始任务 =============`) + await SignInDailyScore(user) + await wait (1) + await GetUserPoint(user) +} +// ============================================================================================================================= +//签到 +async function SignInDailyScore(user) { + try { + let urlObject = { + method: 'post', + url: `https://api.bckid.com.cn/operation/front/bonus/userSign/v3/sign`, + headers: { + 'Host': 'api.bckid.com.cn', + 'authorization': user.authorization, + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.code == '200') { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊当前已签到${result.body.signDaysCountMod}天🎉`); + }else{ + DoubleLog(`🌸账号[${user.index}]签到-失败:${result.message}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e); + } +} + +//积分查询 +async function GetUserPoint(user) { + try { + let urlObject = { + method: 'post', + url: `https://api.bckid.com.cn/operation/front/bonus/userBonus/getUserBonus`, + headers: { + 'Host': 'api.bckid.com.cn', + 'authorization': user.authorization, + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.code == '200') { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊账户当前积分[${result.body.userBonus}],历史积分[${result.body.sumBonus}]💰`); + }else{ + DoubleLog(`🌸账号[${user.index}]积分查询失败:${result.message}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e.response.data); + } +} +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} +/** +* ======================================================随机等待 1-5 秒============================================ +*/ +function sjwait() { + return new Promise(function (resolve) { + let waitTime = Math.floor(Math.random() * 4000 + 1000); + setTimeout(resolve, waitTime); + }); +} +// ==========================================================13位时间戳===================================================== +function getTimestamp() { + return new Date().getTime(); +} +//===============================================网络请求httpRequest========================================= +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//==============================================Debug模式=============================================== +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "http://tfapi.cn/tl.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +//==============================================获取远程版本================================================= +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n============= 当前版本:${scriptVersionNow} 🌟 最新版本:${scriptVersionLatest} =============`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} + +//=============================================================================================================================================== +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/backup/GacmotorCookies.json b/backup/GacmotorCookies.json new file mode 100644 index 0000000..8f8d6d5 --- /dev/null +++ b/backup/GacmotorCookies.json @@ -0,0 +1,10 @@ +[ + { + "AT": "", + "RT": "" + }, + { + "AT": "", + "RT": "" + } +] diff --git a/backup/bjev.js b/backup/bjev.js new file mode 100644 index 0000000..cab7e48 --- /dev/null +++ b/backup/bjev.js @@ -0,0 +1,428 @@ +/** + * cron 45 21 * * * bjev.js + * Show:北京汽车 点赞每天5次 10分 签到10分 转发2次 20分 7天签到100分 30天1000分 半年5000 1年1W + * 合计1月2300分 商城最低价4900分 平均2个月换一次 + * @author https://github.com/smallfawn/QLScriptPublic + * 变量名:bjevAuth + * 变量值:https://beijing-gateway-customer.app-prod.bjev.com.cn请求头Headers中Authorization 去掉Bearer 去掉Bearer 去掉Bearer + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("北京汽车"); +const notify = $.isNode() ? require('../sendNotify') : ''; +let ckName = "bjevAuth"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.artList = []//文章列表 + this.taskList = []//任务列表 + this.task_num_like = null //待做点赞任务数 + this.task_num_share = null//待做转发任务数 + this.userPoint = null + + } + async main() { + $.log(`===== 开始第[${this.index}]个账号 =====`) + await this.user_info(); + if (this.ckStatus) { + await this.user_point() + $.log(`✅运行前 - 积分[${this.userPoint}]🎉`) + await this.task_list() + if (this.taskList.length > 0) { + for (let task of this.taskList) { + //status == "0" 未完成 + //status == "1" 待领取 + //status == "2" 已完成 + if (task.taskGroupCode == "ENTITY_LIKE") { + if (task.status == "0") { + this.task_num_like = Number(task.progressLimit) - Number(task.progress) + } + $.log(`点赞 ${task.progress} / ${task.progressLimit}`) + //点赞 + } else if (task.taskGroupCode == "DAY_SIGN") { + if (task.status == "0") { + $.log(`检测未签到 执行签到`) + await this.addSign() + } else { + $.log(`签到已完成`) + } + //签到 + } else if (task.taskGroupCode == "GET_TASK_ATTENTION" && task.status == "0") { + //被关注 + } else if (task.taskGroupCode == "ENTITY_SHARE") { + if (task.status == "0") { + this.task_num_share = Number(task.progressLimit) - Number(task.progress) + } + $.log(`转发 ${task.progress} / ${task.progressLimit}`) + //转发 + } else if (task.taskGroupCode == "GET_TASK_LIKE" && task.status == "0") { + //被点赞 + } + } + if (this.task_num_like > 0 || this.task_num_share > 0) { + await this.art_list() + if (this.artList.length > 0) { + //点赞5次 转发2次 + for (let i = 0; i < 5; i++) { + await this.task_like(this.artList[i]) + await this.task_share(this.artList[i]) + } + } + + } + } + await this.task_list() + if (this.taskList.length > 0) { + for (let task of this.taskList) { + if (task.status == "1") { + await this.task_award(task.taskGroupCode) + } + } + } + await this.user_point() + $.log(`✅运行后 - 积分[${this.userPoint}]🎉`) + + } + + + + } + + + async addSign() { + try { + let options = { + fn: "签到", + method: "post", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-asset/exterior/userSignRecord/addSign?uuid_check=${this.get_uuid()}`, + body: JSON.stringify({}), + } + options.headers = this.get_headers(options.method, options.url, options.body) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == 0) { + $.log(`✅[${options.fn}]成功🎉`) + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async user_info() { + try { + let options = { + fn: "信息查询", + method: "get", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-member/userCustomer/getUserInfo?buildVersion=138&uuid_check=${this.get_uuid()}`, + } + options.headers = this.get_headers(options.method, options.url) + //console.log(options); + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + $.log(`✅[${result.data.name}][${result.data.code}][${result.data.id}]🎉`) + this.ckStatus = true; + } else { + console.log(`❌[UserInfo]查询: 失败`); + this.ckStatus = false; + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async user_point() { + try { + let options = { + fn: "积分查询", + method: "get", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-member/userCustomer/getPersonalCenter?uuid_check=${this.get_uuid()}`, + } + options.headers = this.get_headers(options.method, options.url) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + this.userPoint = result.data.availableIntegral + + } else { + console.log(`❌[积分查询]失败`); + this.ckStatus = false; + } + } catch (e) { + console.log(e); + } + } + + async art_list() { + try { + let options = { + fn: "文章列表", + method: "get", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-dynamic/exterior/dynamic/list?isRecommend=1&pageIndex=2&pageSize=10&isHot=1&uuid_check=${this.get_uuid()}`, + } + options.headers = this.get_headers(options.method, options.url) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + //领取成功 + //console.log(`✅[文章列表]成功`) + for (let artId of result.data.dataList) { + console.log(artId.liked) + if (artId.liked == "-1") {//判断未点赞的 + this.artList.push(artId.id) + + } + + } + } else { + console.log(`❌[${options.fn}]失败`) + console.log(JSON.stringify(result)) + } + } catch (e) { + console.log(e); + } + } + async task_like(entityId) { + try { + let options = { + fn: "点赞", + method: "post", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-dynamic/exterior/interact/like?uuid_check=${this.get_uuid()}`, + body: JSON.stringify({ "entityId": entityId, "listUid": "f4a67e8f-525d-4846-b1b4-52c7d6d67dab", "type": 2 }) + } + options.headers = this.get_headers(options.method, options.url, options.body) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + //领取成功 + console.log(`✅[${options.fn}]成功`) + } else { + console.log(`❌[${options.fn}]失败`) + console.log(JSON.stringify(result)) + } + } catch (e) { + console.log(e); + } + } + + async task_share(entityId) { + //number + try { + let options = { + fn: "分享", + method: "post", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-dynamic/exterior/interact/dynamic/share?uuid_check=${this.get_uuid()}`, + body: JSON.stringify({ "entityId": entityId }) + } + options.headers = this.get_headers(options.method, options.url, options.body) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + //领取成功 + console.log(`✅[${options.fn}]成功`) + } else { + console.log(`❌[${options.fn}]失败`) + console.log(JSON.stringify(result)) + } + } catch (e) { + console.log(e); + } + } + async task_award(taskGroupCode) { + try { + let options = { + fn: "领取奖励", + method: "post", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-asset/exterior/userTaskProgress/receiveAward?uuid_check=${this.get_uuid()}`, + body: JSON.stringify({ "taskGroupCode": taskGroupCode }) + } + options.headers = this.get_headers(options.method, options.url, options.body) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + //领取成功 + $.log(`✅领取成功 获得[${result.data}]分`) + } else { + console.log(`❌[${options.fn}]失败`) + console.log(JSON.stringify(result)) + } + } catch (e) { + console.log(e); + } + } + + async task_list() { + try { + let options = { + fn: "任务列表", + method: "get", + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-asset/exterior/userTaskProgress/selectTaskForMemberCenter?uuid_check=${this.get_uuid()}`, + } + options.headers = this.get_headers(options.method, options.url) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + this.taskList = result.data[1].items + + } else { + console.log(`❌[${options.fn}]失败`); + + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + sha256(str) { + const crypto = require("crypto"); + return crypto.createHash("sha256").update(str).digest("hex"); + + } + get_headers(method, url, body = "") { + url = url.replace("https://beijing-gateway-customer.app-prod.bjev.com.cn", "") + let path = url.split('?')[0] + let params = url.split('?')[1].split('&').sort().join("").toLowerCase() + method = method.toUpperCase(); + let timestamp = new Date().getTime() + const key = `162e31f57f928bb34df22f99f04875de` + let str + if (method == "POST") { + str = `${method}${path}ice-auth-appkey:6164883796ice-auth-timestamp:${timestamp}json=${body}${params}${key}` + } else { + str = `${method}${path}ice-auth-appkey:6164883796ice-auth-timestamp:${timestamp}${params}${key}` + + } const sign = this.sha256(encodeURIComponent(str)) + return { + "Content-Type": "application/json;charset=UTF-8", + "User-Agent": "(Android 10; Xiaomi MI 8 Lite Build/V12.0.1.0.QDTCNXM 3.13.1 138 release bjApp baic-app-android)", + "versionInfo": "(Android 10; Xiaomi MI 8 Lite Build/V12.0.1.0.QDTCNXM 3.13.1 138 release bjApp baic-app-android)", + "Cache-Control": "no-cache", + "Authorization": `Bearer ` + this.ck, + //"userId": "", + "appKey": 6164883796, + "ice-auth-appkey": 6164883796, + "ice-auth-timestamp": timestamp, + "ice-auth-sign": sign, + "Content-Type": "application/json;charset=UTF-8", + "Host": "beijing-gateway-customer.app-prod.bjev.com.cn", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip" + } + } + get_uuid() { + return 'xxxxxxxx-xxxx-xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); + $.msg($.name, `任务已完成`) +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + + await SendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options) { + if (!options["method"]) { + return console.log(`请求方法不存在`); + } + if (!options["fn"]) { + console.log(`函数名不存在`); + } + return new Promise((resolve) => { + $[options.method](options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + try { + resp = JSON.parse(resp); + } catch (error) { } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(resp); + } + }); + }); +} +async function SendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/backup/gacmotor.js b/backup/gacmotor.js new file mode 100644 index 0000000..ec4fe7f --- /dev/null +++ b/backup/gacmotor.js @@ -0,0 +1,1405 @@ +/** + * cron 56 8 * * * gacmotor.js + * Show:广汽传祺 评论 分享(转发) 签到 发表文章 + * @author https://github.com/smallfawn/QLScriptPublic + * @tips 本脚本适用于广汽传祺5.0.0以上的版本 + * @update 2024/1/17 新增 广汽传祺年度报告抽奖 + * 文件内基本格式 [{"AT":"","RT":""},{"AT":"","RT":""}] 仓库( https://ghproxy.smallfawn.top/https://raw.githubusercontent.com/smallfawn/QLScriptPublic/main/GacmotorCookies.json )里面有基本模板 使用前必须填写COOKIE + * 提供三种获取变量COOKIE方式 + * 1.手动抓https://next.gacmotor.com/app + * (refreshTokenn和accessToken 在登录时候抓包 https://next.gacmotor.com/app/app-api/sms/sendSmsCodeV2 响应里面) APP有效期都是7天 需要填写refreshToken来刷新COOKIE有效时间 + * 2.通过WoolWeb获取 2w.onecc.cc 里面有APP接口和H5接口 APP接口带刷新CK H5接口不会 + * 3.通过WoolWeb扫码获取 和 APP接口等同 + * 变量示例 AT-11111-ASASASASASASASASASAS填入AT里面 RT-11111-BSBSBSBSBSBSBS填入RT里面 + * 开启发贴 gacmotorPost=false 默认关闭发表文章功能 true为开启(此功能存在风控检测,谨慎开启) 目前没适配 小心扣豆子 + * 开启评论 gacmotorComment=false 默认关闭评论功能 true为开启(此功能存在风控检测,谨慎开启) 目前没适配 小心扣豆子 + * 每日抽奖 gacmotorLuckyDram=1 抽奖次数[1-10] 不写默认抽奖一次(首次免费) 以后每次花费2G豆抽奖 每天上限10次 + * + */ +let GacmotorCookies = './GacmotorCookies.json';//指定文件目录 +const $ = new Env("广汽传祺"); +const notify = $.isNode() ? require('../sendNotify') : ''; +//const { updateEnv11, getEnvs, updateEnv } = require("./ql") +const appVersion = "5.1.22" +//let ckName = "gacmotorToken"; +//let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +const fs = require('fs'); +let TempAccount = []; + + +function ReadFiles(filename) { + let Fileexists = fs.existsSync(filename);//检测文件是否存在 + if (Fileexists) {//如果存在 + console.log("检测到广汽传祺GacmotorCookies.json,载入..."); + TempAccount = fs.readFileSync(filename, 'utf-8'); + if (TempAccount) { + TempAccount = TempAccount.toString(); + TempAccount = JSON.parse(TempAccount); + } + }else{ + console.log("未检测到广汽传祺GacmotorCookies.json..."); + } +} +async function writeFile(fileName, data) { + return new Promise((resolve, reject) => { + fs.writeFile(fileName, data, 'utf8', (err) => { + if (err) { + reject(err); // 如果写入操作出错,将错误传递给调用者 + return; + } + resolve(); // 写入操作成功,没有错误 + }); + }); +} +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.refreshToken = str.split(strSplitor)[1]; //单账号多变量分隔符 + this.ckStatus = true; + this.deviceCode = ""; + this.registrationID = ""; + //this.mallToken = str.split(strSplitor)[2]; + this.signInStatus = false//默认签到状态false + this.userIdStr = "" + this.name = "" + this.GDouNum = "" + this.postList = []//自己 + this.applatestlist = []//最新帖子列表 + this.titleList = []// + this.contentList = []// + this.commentList = [] + this.BeiJingTime = "" + this.powerList = [] + this.mobile = [] + this.accessToken = [] + this.powerId = ""//助力ID + this.questionId = "" + this.userAnswerList = [] + this.answerIdList = [] + this.userAnswer = "" + this.questionTaskId = '' + this.luckyDrawNum = 0 //抽奖次数 + this.postNotFinishedNum = 0//发帖未完成次数 + this.commentNotFinishedNum = 0//评论未完成次数 + this.sharenNotFinishedNum = 0//转发未完成次数 + this.refreshStatus = false + this.commenttext = "" + this.signInCaptchaId = null + this.signInRequestId = null + this.lotteryRequestId = null + this.shareCaptchaId = null + this.shareRequestId = null + + } + async main() { + $.log(`==============开始第${this.index}个账号==============`) + await this._userInfo(); + + if (this.ckStatus == true) { + await this.mainTask() + } else { + if (this.refreshToken !== undefined) { + $.log(`尝试刷新TOKEN`) + await this._refreshToken() + if (this.refreshStatus) { + await this._userInfo(); + await this.mainTask() + } + } + } + + + + } + async mainTask() { + if (process.env["gacmotorLuckyDram"] == undefined) { + await this._luckyDrawNum()//获取抽奖次数 + if (this.luckyDrawNum > 1) { + await this._luckyDraw() + } + } else if (process.env["gacmotorLuckyDram"] && Number(process.env["gacmotorLuckyDram"]) !== NaN) { + if (process.env["gacmotorLuckyDram"] !== 0) { + if (Number(process.env["gacmotorLuckyDram"]) > 10) { + console.log(`每天最高抽10次哦`); + await this._luckyDrawNum()//获取抽奖次数 + if (this.luckyDrawNum < 10) { + for (let i = 0; i < this.luckyDrawNum; i++) { + $.wait(1000) + await this._luckyDraw() + $.wait(2000) + } + } else if (this.luckyDrawNum = 10) { + for (let index = 0; index < 10; index++) { + $.wait(1000) + await this._luckyDraw() + $.wait(2000) + } + } + + } else { + await this._luckyDrawNum()//获取抽奖次数 + if (this.luckyDrawNum < Number(process.env["gacmotorLuckyDram"])) { + for (let i = 0; i < this.luckyDrawNum; i++) { + $.wait(1000) + await this._luckyDraw() + $.wait(2000) + } + } else if (this.luckyDrawNum > Number(process.env["gacmotorLuckyDram"])) { + for (let index = 0; index < Number(process.env["gacmotorLuckyDram"]); index++) { + $.wait(1000) + await this._luckyDraw() + $.wait(2000) + } + } else if (this.luckyDrawNum == Number(process.env["gacmotorLuckyDram"])) { + for (let index = 0; index < Number(process.env["gacmotorLuckyDram"]); index++) { + $.wait(1000) + await this._luckyDraw() + $.wait(2000) + } + } + + } + } else { + + + } + + + } + await this._getGDou() + await this._signInStatus() + await this._signInCounts() + if (this.signInStatus == false) { + await this._signIn() + } + await this._taskList() + /*if (this.postNotFinishedNum !== 0 && this.postNotFinishedNum >= 1 || this.commentNotFinishedNum !== 0 && this.commentNotFinishedNum >= 1) { + if (process.env["gacmotorPost"] == "true" || process.env["gacmotorComment"] == "true") { + console.log(`正在远程获取15条随机评论~请等待15-20秒`) + await this._getText() + } + }*/ + + if (process.env["gacmotorPost"] == "true") { + + if (this.postNotFinishedNum !== 0 && this.postNotFinishedNum >= 1) { + console.log(`正在远程获取15条随机一言~请等待10-15秒`) + await this._getText() + await this._post(this.titleList[0], this.contentList[0])//可能需要图片 + console.log(`等待10s`) + await $.wait(10000) + await this._postlist() + for (let postId of this.postList) { + await this._delete(postId) + } + } + + } + await this._applatestlist() + if (this.sharenNotFinishedNum !== 0 && this.sharenNotFinishedNum >= 1) { + for (let postId of this.applatestlist) { + await this._forward(postId) + } + } + + if (process.env["gacmotorComment"] == "true") { + if (this.commentNotFinishedNum !== 0 && this.commentNotFinishedNum >= 1) { + this._getText1() + for (let postId of this.applatestlist) { + await this._add(postId, this.commenttext) + } + } + + } + + if (process.env["gacmotorComment"] == "true") { + if (this.commentNotFinishedNum !== 0 && this.commentNotFinishedNum >= 1) { + console.log(`等待10s`) + await $.wait(10000) + console.log(`检测评论列表`); + await this._commentlist() + if (this.commentList.length > 0) { + for (let commentId of this.commentList) { + await this._commentdelete(commentId) + } + } + } + + } + + //await this._activity_lotter_common({ "activityId": "531", "channel": "carapp_channel" }) + //await this._getChinaTime() + /*console.log(`11/26截止 Do - 广州车展活动 奖品活动结束后14日内发放`); + if (this.BeiJingTime < 1701014400000) { + //{"activityId":"467","channel":"carapp_channel"} + // await this._activity_lotter_common({ "activityId": "467", "channel": "carapp_channel" }) + }*/ + /*每天助力 gacmotorPower="" (抓这个需要手动做一次任务,我的-超级合伙人-每日任务-分享,微信自己点击自己分享的文章一次) +* 微信抓gmp.spgacmotorsc.com/partner/api-content/base/content/trafficStatistics? +* 后面的openId的值例如:oQzIW0jx-DbassAsaQgpGsasqXqCWI*/ + /*if (process.env["gacmotorPower"]) { + console.log(`已设置开启每日助力`); + await this._power_auth()//登录活动 获取accessToken + await this._power_list()//获取任务列表 + if (this.powerList.length > 0) { + for (let taskId of this.powerList) { + await this._join_power(taskId)//加入任务 + await this._get_power_id(taskId)//获取助力的utid + await $.wait(2000) + await this._share_power(taskId)//分享 + await $.wait(2000) + if (this.powerId !== "") { + await this._power(this.powerId) + } + } + } + }*/ + /*if (this.mallToken == undefined) { + this.mallToken = `DS-${this.ck}` + console.log(`执行答题&抽奖 并且尝试获取mallToken(如果不是WoolWeb获取的变量 可能执行失败)`); + //获取答题活动列表 + await this._question_list({ "activityId": 464 }) + if (this.questionTaskId !== "") { + //获取题目 + await this._question_info({ "activityId": 464, "taskId": this.questionTaskId, "userSubmit": false }) + //答题 + await this._submit_answer({ "activityId": 464, "taskId": this.questionTaskId, "userSubmitAnswerVoList": [{ "questionId": this.questionId, "userAnswer": this.userAnswer, "answerIdList": this.answerIdList }] }) + //抽奖 + let lotterId = "465" + if (this.questionTaskId == 8) { + lotterId = "484" + } else if (this.questionTaskId == 9) { + lotterId = "498" + } else if (this.questionTaskId == 10) { + lotterId = "511" + } else if (this.questionTaskId == 11) { + lotterId = "522" + } else if (this.questionTaskId == 12) { + lotterId = "523" + } + await this._activity_lotter_mall({ "activityId": lotterId, "channel": "wx_channel" }) + //console.log(`目测30天内自动到账`) + console.log(`请微信打开链接截查看中奖规则 https://mall.gacmotor.com/act/turntable?id=${lotterId}`); + console.log(`加客服的地址 https://mall.gacmotor.com/act/answer-activity?id=464`); + } else { + console.log(`本周答题完成或未到活动时间`); + } + }*/ + } + async _refreshToken() { + try { + let options = { + fn: "刷新token", + method: "post", + url: `https://next.gacmotor.com/app/app-api/login/refreshAt`, + headers: this._getHeaders("post"), + body: JSON.stringify({ refreshToken: this.refreshToken }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + $.log(`重置accessToken [${result.data.accessToken}] 重置refeshToken [${result.data.refreshToken}]`) + //调用青龙API + //change:2023/12/27 不再调用青龙API 选择修改文件方式 + //删除原变量 + //let originalValue = this.cookies + //let newValue = [result.data.accessToken, result.data.refreshToken] + TempAccount.forEach((TempAccount) => { + if (TempAccount.AT === this.ck) { + TempAccount.AT = result.data.accessToken; + TempAccount.RT = result.data.refreshToken; + } + }); + await writeFile(GacmotorCookies, JSON.stringify(TempAccount, null, 2)) + this.ck = result.data.accessToken + this.refreshStatus = true + + //console.log(arr); + /*if (this.mallToken !== undefined) { + newValue = `${result.data.accessToken}${strSplitor}${result.data.refreshToken}${strSplitor}${this.mallToken}` + } else { + newValue = `${result.data.accessToken}${strSplitor}${result.data.refreshToken}` + }*/ + /*let env = await getEnvs(ckName) + if (env[0].value.indexOf(originalValue) !== -1) { + let newEnv = env[0].value.replaceAll(originalValue, newValue) + if (process.env["QLVersion"] == "old") { + await updateEnv(newEnv, env[0].id, null, ckName) + } else { + await updateEnv11(newEnv, env[0].id, null, ckName) + } + this.refreshStatus = true + }*/ + + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + this.ckStatus = false + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _getChinaTime() { + try { + let options = { + fn: "获取北京时间", + method: "get", + url: `http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`, + } + let { body: result } = await httpRequest(options) + result = JSON.parse(result) + this.BeiJingTime = result.data.t + } catch (e) { + console.log(e); + } + } + async _activity_lotter_common(body) { + try { + let options = { + fn: "活动抽奖", + method: "post", + url: `https://next.gacmotor.com/mall/activity-app/customer/activityPrize/lotter?notip=true`, + headers: { + "Host": "next.gacmotor.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "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/81.0.4044.138 Mobile Safari/537.36 WindVane/8.5.0 StatusBarHeight/31 channel/GACClient", + "token": this.ck, + "Content-Type": "application/json;charset=UTF-8", + "Origin": "https://next.gacmotor.com", + "X-Requested-With": "com.cloudy.component", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Referer": "https://next.gacmotor.com/mall/act/turntable?id=467", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" + }, + body: JSON.stringify(body) + } + //console.log(options) + let { body: result } = await httpRequest(options) + result = JSON.parse(result) + if (result.code == "0000") { + $.log(`抽奖成功获得[${result.data.name}]`) + } else { + console.log(`抽奖失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _activity_lotter_mall(body) { + try { + let options = { + fn: "活动抽奖(mall)", + method: "post", + url: `https://mall.gacmotor.com/activity-app/customer/activityPrize/lotter?notip=true`, + headers: this._getHeaders_mall("post"), + body: JSON.stringify(body) + } + //console.log(options) + let { body: result } = await httpRequest(options) + result = JSON.parse(result) + if (result.code == "0000") { + $.log(`答题活动抽奖成功 获得[${result.data.name}]`) + } else { + console.log(`抽奖失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _question_list(body) { + try { + let options = { + fn: "获取答题活动列表", + method: "post", + url: `https://mall.gacmotor.com/e-small-bff/fronted/activityAnswer/queryAnswerActivityInfo`, + headers: this._getHeaders_mall("post"), + body: JSON.stringify(body) + } + //console.log(options) + let { body: result } = await httpRequest(options) + result = JSON.parse(result) + if (result.code == "0000") { + for (let id of result.data.taskInfoList) { + if (id.endTime > this.BeiJingTime && this.BeiJingTime > id.startTime && id.userSubmit == false) { + this.questionTaskId = id.id + } + } + } else { + console.log(`获取问题和选项失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + + async _question_info(body) { + try { + let options = { + fn: "获取问题和选项", + method: "post", + url: `https://mall.gacmotor.com/e-small-bff/fronted/activityAnswer/queryQuestionInfo`, + headers: this._getHeaders_mall("post"), + body: JSON.stringify(body) + } + //console.log(options) + let { body: result } = await httpRequest(options) + result = JSON.parse(result) + if (result.code == "0000") { + this.questionId = result.data.questionInfoList[0].id + this.answerIdList = [] + for (let answer of result.data.questionInfoList[0].answerInfoList) { + this.answerIdList.push(answer.id) + this.userAnswerList.push(answer.answerDesc) + } + this.userAnswer = this.userAnswerList.join(';'); + } else { + console.log(`获取问题和选项失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + + async _submit_answer(body) { + try { + let options = { + fn: "回答问题", + method: "post", + url: `https://mall.gacmotor.com/e-small-bff/fronted/activityAnswer/submitAnswer`, + headers: this._getHeaders_mall("post"), + body: JSON.stringify(body) + } + //console.log(options) + let { body: result } = await httpRequest(options) + result = JSON.parse(result) + if (result.code == "0000") { + console.log(`回答问题` + result.success); + } else { + console.log(`回答问题失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _getText() { + try { + let textList = [] + let options = { + fn: "获取随机一言", + method: "get", + url: `https://v1.hitokoto.cn/?c=e`, + } + for (let i = 0; i < 10; i++) { + await $.wait(1000) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.hitokoto["length"] > 10) { + textList.push(result.hitokoto) + } + this.titleList = [textList[0]] + this.contentList = [textList[1]] + } + } catch (e) { + console.log(e); + } + } + _getText1() { + try { + let textList = [ + `好看好用,我也想拥有同款!`, + `好看好开猴赛雷,广汽传祺YYDS!`, + `打破0回复,帮你顶个楼!`, + `人间自有真情在,给个点赞最实在!`, + `实力顶帖,为君打call!`] + + this.commenttext = [textList[Math.floor(Math.random() * 5)]] + + } catch (e) { + console.log(e); + } + } + + async _join_power(taskId) { + try { + let options = { + fn: "加入助力", + method: "post", + url: `https://gmp.spgacmotorsc.com/partner/api-content/app/tasks/joinTask`, + headers: this._getHeaders_gmp("post"), + body: `taskId=${taskId}&companyCode=CHUANQI&phone=${this.mobile}` + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.errorCode == "0") { + console.log(`添加助力任务成功`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _power_list() { + try { + let options = { + fn: "助力任务列表获取", + method: "get", + url: `https://gmp.spgacmotorsc.com/partner/api-content/app/tasks/list?page=0&size=10&channelType=WEIXIN&taskType=SHARE&companyCode=CHUANQI&phone=${this.mobile}`, + headers: this._getHeaders_gmp("get"), + } + //console.log(options); + let { body: result } = await httpRequest(options); + result = JSON.parse(result); + //console.log(result); + if (result.errorCode == "0") { + for (let i of result.body.rows) { + if (i.isFinish == 1) { + this.powerList.push(i.taskId) + } + } + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(`请先手动完成一次任务`); + //console.log(e); + } + } + + async _power_auth() { + try { + let headers = this._getHeaders("get") + headers["Host"] = `gmp.spgacmotorsc.com` + let options = { + fn: "助力任务登录", + method: "get", + url: `https://gmp.spgacmotorsc.com/partner/api-user/app/auth/judge?phone=${this.mobile}&companyCode=CHUANQI`, + headers: headers, + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.body.isAuth == true) { + this.accessToken = result.body.user.accessToken; + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(`请先手动完成一次任务`); + //console.log(e); + } + } + + async _get_power_id(taskId) { + try { + let options = { + fn: "助力任务ID获取", + method: "get", + url: `https://gmp.spgacmotorsc.com/partner/api-content/app/tasks/detail?taskId=${taskId}&companyCode=CHUANQI&phone=${this.mobile}`, + headers: this._getHeaders_gmp("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.errorCode == "0") { + let shareUrl = result.body.shareUrl + var regex = /utId=([^&]+)/; + var match = shareUrl.match(regex); + if (match) { + this.powerId = match[1]; + console.log(`助力ID获取成功${this.powerId}`); + } else { + console.log("未找到utId的值"); + } + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _share_power(taskId) { + try { + let options = { + fn: "助力任务分享", + method: "post", + url: `https://gmp.spgacmotorsc.com/partner/api-content/app/tasks/backFillH5`, + headers: this._getHeaders_gmp("post"), + body: `taskId=${taskId}&companyCode=CHUANQI&phone=${this.mobile}` + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.errorCode == "0") { + console.log(result.body); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _power() { + try { + let options = { + fn: "助力", + method: "get", + url: `https://gmp.spgacmotorsc.com/partner/api-content/base/content/trafficStatistics?id=11131879&openId=` + process.env["gacmotorPower"], + headers: { + "Host": "gmp.spgacmotorsc.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20230405 MMWEBID/2585 MicroMessenger/8.0.35.2360(0x2800235D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", + "X-Requested-With": "com.tencent.mm", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Referer": "https://gmp.spgacmotorsc.com/h5/partner/", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" + }, + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.errorCode == "0") { + $.log(`助力执行成功 可能助力失败 正常情况`) + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _userInfo() { + try { + let options = { + fn: "信息查询", + method: "post", + url: `https://next.gacmotor.com/app/app-api/user/getLoginUser`, + headers: this._getHeaders("post"), + body: `` + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + this.mobile = Buffer.from(result.data.ms, 'base64').toString('utf-8'); + Buffer.from(result.data.ms, 'base64').toString('utf-8'); + $.log(`[${result.data.mobile}][${result.data.nickname}][${result.data.userIdStr}]`) + this.name = `昵称 [${result.data.nickname}]` + this.userIdStr = result.data.userIdStr; + this.ckStatus = true + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + this.ckStatus = false + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _taskList() { + try { + let options = { + fn: "任务情况查询", + method: "get", + url: `https://next.gacmotor.com/app/community-api/user/mission/getUserMissionList?place=1`, + headers: this._getHeaders("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + //result.data[0].total - result.data[0].finishedNum//签到 + this.postNotFinishedNum = Number(result.data[1].total) - Number(result.data[1].finishedNum)//发帖 + this.commentNotFinishedNum = Number(result.data[2].total) - Number(result.data[2].finishedNum)//评论 + this.sharenNotFinishedNum = Number(result.data[3].total) - Number(result.data[3].finishedNum)//分享 + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + this.ckStatus = false + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _luckyDrawNum() { + try { + let options = { + fn: "抽奖次数查询", + method: "get", + url: `https://next.gacmotor.com/app/activity/shopDraw/getchances?activityCode=shop-draw`, + headers: this._getHeaders("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + this.luckyDrawNum = result.data + console.log(`抽奖次数剩余${this.luckyDrawNum}次`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + this.ckStatus = false + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _luckyDraw() { + await this.get_lastReq("lottery") + try { + let options = { + fn: "抽奖", + method: "post", + //https://next.gacmotor.com/app/activity/shopDraw/luckyDraw + url: `https://next.gacmotor.com/app/activity/shopDraw/luckyDrawHc`, + headers: this._getHeaders("post"), + //body: JSON.stringify({ "activityCode": "shop-draw", "repeatcheck": true }) + body: JSON.stringify({ + "activityCode": "shop-draw", + "repeatcheck": true, + "lastReq": this.lotteryRequestId + }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + $.log(`抽奖成功获得[${result.data.medalName}]`) + + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + this.ckStatus = false + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _getGDou() { + try { + let options = { + fn: "G豆查询", + method: "get", + url: `https://next.gacmotor.com/app/app-api/user/getUserGdou`, + headers: this._getHeaders("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + this.GDouNum = `G豆 [${result.data}]` + $.log(`当前G豆数量[${result.data}]`) + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _applatestlist() { + try { + let options = { + fn: "最新帖子列表", + method: "get", + url: `https://next.gacmotor.com/app/community-api/community/api/post/applatestlist?pageNum=1&pageSize=10`, + headers: this._getHeaders("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + this.applatestlist = [result.data.list[0].postVo.postId] + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _signInStatus() { + try { + let options = { + fn: "签到查询", + method: "get", + url: `https://next.gacmotor.com/app/app-api/sign/signStatus`, + headers: this._getHeaders("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + console.log(result); + if (result.resultCode == "0") { + if (result.data == true) { + //已签 + this.signInStatus = true; + } else { + //未签 + this.signInStatus = false + } + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _signInCounts() { + try { + let options = { + fn: "签到信息", + method: "get", + url: `https://next.gacmotor.com/app/app-api/sign/countSignDays`, + headers: this._getHeaders("get"), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + $.log(`已经连续签到${result.data}天`) + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async get_lastReq(event) { + let options = { + fn: "获取参数", + method: "get", + url: `https://next.gacmotor.com/app/app-api/common/hcRiskControl/getRiskLevelCommon?eventId=${event}`, + headers: this._getHeaders("get"), + + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + if (event == "signIn") { + this.signInCaptchaId = result.data.captchaId + this.signInRequestId = result.data.requestId + } + if (event == "lottery") { + this.lotteryRequestId = result.data.requestId + } + if (event == "share") { + this.shareCaptchaId = result.data.captchaId + this.shareRequestId = result.data.requestId + } + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } + async _signIn() { + await this.get_lastReq("signIn") + try { + /*let options = { + fn: "签到执行", + method: "get", + url: `https://next.gacmotor.com/app/app-api/sign/submit`, + headers: this._getHeaders("get"), + }*/ + let options = { + fn: "签到执行", + method: "post", + url: `https://next.gacmotor.com/app/app-api/sign/submitHc`, + headers: this._getHeaders("post"), + body: JSON.stringify({ + "captchaId": this.signInCaptchaId, + "lastReq": this.signInRequestId + }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + $.log(`签到[${result.resultMsg}]`) + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _forward(postId) { + await this.get_lastReq("share") + try { + /*let options = { + fn: "转发", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/post/forward`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "postId": postId }) + }*/ + let options = { + fn: "转发", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/post/forwardHc`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "postId": postId, "captchaId": this.shareCaptchaId, "lastReq": this.shareRequestId }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + console.log(`转发[${result.resultMsg}]`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _add(postId, commentContent) { + try { + let options = { + fn: "评论", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/comment/add`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "commentType": 0, "postId": postId, "commentContent": commentContent, "isReplyComment": 1, "commentImg": "" }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + console.log(`评论[${result.resultMsg}]`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _commentlist() { + try { + let options = { + fn: "获取评论列表", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/comment/post`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "pageNum": 1, "pageSize": 10, "userIdStr": this.userIdStr }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + if (result["data"].length > 0) { + this.commentList = [result.data[0].commentId] + } + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _commentdelete(commentId) { + try { + let options = { + fn: "删除评论", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/comment/delete`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "commentId": `${commentId}` }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + console.log(`删除评论[${result.resultMsg}]`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async _post(postTitle, postContent) { + try { + let options = { + fn: "发表文章", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/post/appsavepost`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "address": "", "channelInfoId": "", "cityId": "", "columnId": "", "commodityId": "", "commodityMainImage": "", "commodityName": "", "commodityType": "", "contentImgNums": 0, "contentWords": postContent, "coverImg": "", "customCover": "https://pic-gsp.gacmotor.com/app/a7b1a896-4f92-449f-859e-5e238d131ea3.jpg", "detailAddress": "", "lat": "", "lng": "", "orderId": "", "orderPrice": "", "orderSn": "", "orderType": "", "postContent": `[{\"text\":\"${postContent}\"}]`, "postTitle": postTitle, "postType": "2", "rankTotal": "", "topicId": "", "vin": "", "weekRank": "" }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + console.log(`发表文章[${result.resultMsg}]`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _delete(postId) { + try { + let options = { + fn: "删除文章", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/post/delete`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "postId": postId.toString() }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + console.log(`删除文章[${result.resultMsg}]`); + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async _postlist() { + try { + let options = { + fn: "文章列表", + method: "post", + url: `https://next.gacmotor.com/app/community-api/community/api/post/querylist`, + headers: this._getHeaders("post"), + body: JSON.stringify({ "pageNum": 1, "pageSize": 10, "userIdStr": this.userIdStr, "userId": this.userIdStr, "myHome": true }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.resultCode == "0") { + //文章ID result.data.list[0].postId + this.postList = [result.data.list[0].postId]; + } else { + console.log(`❌${options.fn}状态[${result.resultMsg}]`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + _MD5(str) { + const crypto = require("crypto"); + return crypto.createHash("md5").update(str).digest("hex"); + } + _getHeaders(method) { + let timestamp1 = new Date().getTime(); + let timestamp2 = new Date().getTime(); + let nonce = Math.floor(100000 + Math.random() * 900000); + let appid = `8c4131ff-e326-43ea-b333-decb23936673` + let key = `46856407-b211-4a10-9cb2-5a9b94361614` + let sig = this._MD5(`${timestamp1}${nonce}${appid}${key}`) + let apiSignKey = `a361588rt20dpol` + let apiSign = (this._MD5(`${timestamp2}${apiSignKey}`)).toUpperCase() + if (method == "get") { + return { + "Accept": "application/json", + "appToken": this.ck, + "deviceCode": this.deviceCode, + "current-time": timestamp2, + "deviceId": this.registrationID, + "version": appVersion, + "nonce": nonce, + "token": this.ck, + "Authorization": `Bearer ${this.ck}`, + "sig": sig, + "platformNo": "Android", + "osVersion": 10, + "operateSystem": "android", + "appId": appid, + "registrationID": this.registrationID, + "api-sign": apiSign, + "deviceModel": "IQOO 10", + "timestamp": timestamp1, + //"Content-Type": "application/json; charset=UTF-8", + //"Content-Length": 24, + "Host": "next.gacmotor.com", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip", + "User-Agent": "okhttp/4.8.1" + } + } else { + return { + "Accept": "application/json", + "appToken": this.ck, + "deviceCode": this.deviceCode, + "current-time": timestamp2, + "deviceId": this.registrationID, + "version": appVersion, + "nonce": nonce, + "token": this.ck, + "Authorization": `Bearer ${this.ck}`, + "sig": sig, + "platformNo": "Android", + "osVersion": 10, + "operateSystem": "android", + "appId": appid, + "registrationID": this.registrationID, + "api-sign": apiSign, + "deviceModel": "IQOO 10", + "timestamp": timestamp1, + "Content-Type": "application/json; charset=UTF-8", + //"Content-Length": 24, + "Host": "next.gacmotor.com", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip", + "User-Agent": "okhttp/4.8.1" + } + } + } + _getHeaders_gmp(method) { + let timestamp2 = new Date().getTime(); + let apiSignKey = `a361588rt20dpol` + let apiSign = (this._MD5(`${timestamp2}${apiSignKey}`)).toUpperCase() + if (method == "get") { + return { + "Host": "gmp.spgacmotorsc.com", + "Connection": "keep-alive", + "accessToken": this.accessToken, + "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/81.0.4044.138 Mobile Safari/537.36 WindVane/8.5.0 StatusBarHeight/31 channel/GACClient", + "client": "app", + "Content-Type": "application/x-www-form-urlencoded", + "current-time": timestamp2, + "companyCode": "CHUANQI", + "api-sign": apiSign, + "ver": "20220513", + "Accept": `*/*`, + "Origin": "https://gmp.spgacmotorsc.com", + "X-Requested-With": "com.cloudy.component", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + } + } else { + return { + "Host": "gmp.spgacmotorsc.com", + "Connection": "keep-alive", + "accessToken": this.accessToken, + "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/81.0.4044.138 Mobile Safari/537.36 WindVane/8.5.0 StatusBarHeight/31 channel/GACClient", + "client": "app", + "Content-Type": "application/x-www-form-urlencoded", + "current-time": timestamp2, + "companyCode": "CHUANQI", + "api-sign": apiSign, + "ver": "20220513", + "Accept": "*/*", + "Origin": "https://gmp.spgacmotorsc.com", + "X-Requested-With": "com.cloudy.component", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + } + } + } + _getHeaders_mall(method) { + if (method == "get") { + return { + "Host": "mall.gacmotor.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20230405 MMWEBID/2585 MicroMessenger/8.0.35.2360(0x2800235D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", + "token": this.mallToken, + "Content-Type": "application/json;charset=UTF-8", + "Origin": "https://mall.gacmotor.com", + "X-Requested-With": "com.tencent.mm", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Referer": "https://mall.gacmotor.com/act/answer-activity-detail?id=464&taskId=7&userSubmit=0", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" + } + } else { + return { + "Host": "mall.gacmotor.com", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20230405 MMWEBID/2585 MicroMessenger/8.0.35.2360(0x2800235D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", + "token": this.mallToken, + "Content-Type": "application/json;charset=UTF-8", + "Origin": "https://mall.gacmotor.com", + "X-Requested-With": "com.tencent.mm", + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Referer": "https://mall.gacmotor.com/act/answer-activity-detail?id=464&taskId=7&userSubmit=0", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" + } + } + } +} + +async function start() { + if (process.env["gacmotorPost"] == "true") { + $.log(`已开启发帖`) + } else { + $.log(`未开启发帖`) + } + if (process.env["gacmotorComment"] == "true") { + $.log(`已开启评论`) + } else { + $.log(`未开启评论`) + } + if (process.env["gacmotorLuckyDram"] && Number(process.env["gacmotorLuckyDram"]) !== NaN) { + $.log(`已设置抽奖次数[${process.env["gacmotorLuckyDram"]}]次`) + } else { + $.log(`未设置抽奖次数 默认抽奖1次`) + } + + let taskall = []; + + for (let user of userList) { + await user.main() + } + await Promise.all(taskall); + $.msg($.name, "广汽传祺任务 Over", "smallfawn 提醒您 天冷加衣") +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + + await SendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + ReadFiles(GacmotorCookies) + if (TempAccount.length <= 0) { + return + } + for (let cookie of TempAccount) { + if (cookie["AT"] && cookie["RT"]) { + let n = `${cookie["AT"]}#${cookie["RT"]}` + userList.push(new UserInfo(n)); + } else { + //不可为空 + } + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options) { + if (!options["method"]) { + return console.log(`请求方法不存在`); + } + if (!options["fn"]) { + console.log(`函数名不存在`); + } + return new Promise((resolve) => { + $[options.method](options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + try { + resp = JSON.parse(resp); + } catch (error) { } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(resp); + } + }); + }); +} +async function SendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/backup/hezj.js b/backup/hezj.js new file mode 100644 index 0000000..21e0bcc --- /dev/null +++ b/backup/hezj.js @@ -0,0 +1,293 @@ +/** + * 海尔智家 + * cron 8 1 * * * hezj.js + * 活动入口 首页 智慧小屋 + * 2023/03/18 修复BUG + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export hezj_data='token&clientId @ token&clientId ' + * + * 多账号用 换行 或 @ 分割 + * 抓包 https://mps.haiersmarthomes.com/api-gw , 找到accounttoken/accesstoken & clientId即可 + * ==================================== + * + */ + + + +const $ = new Env("海尔智家"); +const ckName = "hezj_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let debug = 1; //Debug调试 0关闭 1开启 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + + console.log('\n================== 用户CK ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_userinfo()); + await $.wait(3000); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + console.log('\n================== 用户签到 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + + taskall.push(await user.task_signin()); + await $.wait(3000); //延迟 1秒 可充分利用 $.环境函数 + } + } + await Promise.all(taskall); + console.log('\n================== 获取任务列表 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.task_list()); + await $.wait(3000); //延迟 1秒 可充分利用 $.环境函数 + } + } + await Promise.all(taskall); + console.log('\n================== 执行任务 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + for (let num in user.taskList) { + if (user.taskList[num].taskStatus == 0) { + taskall.push(await user.task_do(user.taskList[num].taskCode)); + } else { + console.log('当前任务已完成'); + } + } + await $.wait(5000); //延迟 1秒 可充分利用 $.环境函数 + } + } + await Promise.all(taskall); + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; //单账号多变量分隔符 + this.clientid = str.split('&')[1]; + //let ck = str.split('&') + //this.data1 = ck[0] + this.ckStatus = true + this.taskList = ''; + this.headersPost = { + 'Host': 'mps.haiersmarthomes.com', + 'accesstoken': this.ck, + 'origin': 'https://zjrs.haier.net', + 'user-agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-CN; MI 8 Lite Build/QKQ1.190910.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 UWS/3.22.2.55 Mobile Safari/537.36 UCBS/3.22.2.55_220929181439 ChannelId(1) NebulaSDK/1.8.100112 Nebula App/Uplus Nebula mPaaSClient', + 'Content-Type': 'application/json;charset=UTF-8', + 'accept': 'application/json, text/plain, */*', + 'clientid': this.clientid, + 'timestamp': ts13(), + 'accounttoken': this.ck, + 'appid': 'MB-UZHSH-0000', + 'appkey': 'f50c76fbc8271d361e1f6b5973f54585', + 'appversion': '7.19.0', + 'referer': 'https://zjrs.haier.net/haierActivitys/intelligentHouse/index.html?container_type=3&hybrid_navbar_hidden=true&needAuthLogin=1&needLogin=1&needShare=1&checkGuestMode=1', + //'accept-encoding: 'gzip, deflate' + //'accept-language': 'zh-CN,en-US;q=0.9' + 'x-requested-with': 'com.haier.uhome.uplus' + } + + } + async task_userinfo() {//userinfo + try { + let options = { + url: `https://mps.haiersmarthomes.com/api-gw/wisdomHouseActivity/activity/index`, + headers: this.headersPost, + body: JSON.stringify({ "sourceClient": 1 }) + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.retCode == '00000') { + DoubleLog(`账号[${this.index}] ck验证成功: [${result.data.nickName}] 当前贝壳 [${result.data.wisdomStarBalance}] `); + this.ckStatus = true + } else { + DoubleLog(`账号[${this.index}] ck验证失效,原因未知!`); + this.ckStatus = false + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_signin() { + try { + let options = { + url: `https://mps.haiersmarthomes.com/api-gw/wisdomHouseActivity/sign/signIn`, + headers: this.headersPost, + body: JSON.stringify({ "sourceClient": 1 }) + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.retCode == '00000') { + DoubleLog(`账号[${this.index}] 签到成功: 累计签到[${result.data.signDays}] `); + } else { + DoubleLog(`账号[${this.index}] 签到失效,原因未知!`); + + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_list() {//任务列表 + try { + let options = { + url: `https://mps.haiersmarthomes.com/api-gw/wisdomHouseActivity/task/queryTask`, + headers: this.headersPost, + body: JSON.stringify({ "publishType": 2, "sourceClient": 1 }) + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.retCode == '00000') { + this.taskList = result.data.taskList + } else { + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_do(taskCode) {//任务列表 + try { + let options = { + url: `https://mps.haiersmarthomes.com/api-gw/wisdomHouseActivity/task/doTask`, + headers: this.headersPost, + body: JSON.stringify({ "taskCode": taskCode, "sourceClient": 1 }) + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.retCode == '00000') { + DoubleLog(`账号[${this.index}] 任务执行成功: [${taskCode}] `); + + } else { + DoubleLog(`账号[${this.index}] 任务执行失效:,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// + +function httpRequest(options, method) { + //options = changeCode(options) + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + //console.log(JSON.parse(err)); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + data = JSON.parse(data); + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function ts13() { + return Math.round(new Date().getTime()).toString(); +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("../sendNotify"); + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +// 完整 Env +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) } diff --git a/backup/mys.js b/backup/mys.js new file mode 100644 index 0000000..e6ef01e --- /dev/null +++ b/backup/mys.js @@ -0,0 +1,706 @@ +/** + * mys 米忽悠 米游社 原神签到 + * scriptVersionNow = "0.0.4" + * cron 12 5 * * * mys.js + * 23-06-13 过渡更新V0.0.4 + * # 青龙面板 -- 配置文件 + * =>配置文件 export mys='cookie1&cookie2' + * =>环境变量 变量名mys 变量值(如下) + * 多账号用 @ 分割 + * ==================================== + * 打开https://www.miyoushe.com/ys/ + * ALook浏览器打开登录后点击下方导航栏最下面三条杠往左滑 点击工具箱-开发者工具-cookie-拷贝 + * 打开http://user.mihoyo.com/ + * ALook浏览器打开登录后点击下方导航栏最下面三条杠往左滑 点击工具箱-开发者工具-cookie-拷贝 + * 两个拷贝下来拼接到一起 拼接字符& 拼接字符& 拼接字符& + * 示例: + * cookie_token_v2=xxx; account_mid_v2=xxx; account_id_v2=xxx; ltoken_v2=xxx; ltmid_v2=xxx; ltuid_v2=xxx & login_uid=xxx; login_ticket=xxx; + * 必要参数 cookie_token_v2 ltoken_v2 login_ticket + * 二选一参数 ltmid_v2或者account_mid_v2 and account_id_v2或者ltuid_v2或者login_id + * 请确保上面5个参数都存在 + */ +const $ = new Env("米游社 原神签到"); +const ckName = "mys"; +//-------------------- 一般不动变量区域 ------------------------------------- +const { log } = require("console"); +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const notify = $.isNode() ? require("./sendNotify") : ""; +let envSplitor = ["@"]; //多账号分隔符 +let msg = ""; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; +let userList = []; +let userIdx = 0; +let userCount = 0; +let scriptVersionLatest; //最新版本 +let scriptVersionNow = "0.0.4"; //现在版本 +///////////////////// +let jiangliArr = []; +const fs = require('fs'); +let strShare = './Mihoyo_Account.json';//指定文件目录 +let Fileexists = fs.existsSync(strShare);//检测文件是否存在 +let TempAccount = []; +if (Fileexists) {//如果存在 + console.log("检测到米哈游缓存文件Mihoyo_Account.json,载入..."); + TempAccount = fs.readFileSync(strShare, 'utf-8'); + if (TempAccount) { + TempAccount = TempAccount.toString(); + TempAccount = JSON.parse(TempAccount); + } +} +//# 米游社的版本 # Salt和Version相互对应 +const mihoyobbs_version = "2.49.1"; +//# 米游社的客户端类型 # 1为ios 2为安卓 +const mihoyobbs_Client_type = "2"; +//# 4为pc web 5为mobile web +const mihoyobbs_Client_type_web = "5"; +//# 云原神版本 +const cloudgenshin_Version = "3.0.0"; +//# 米游社的分区列表 +const mihoyobbs_List = [ + { + id: "1", + forumId: "1", + name: "崩坏3", + url: "https://bbs.mihoyo.com/bh3/", + }, { + id: "2", + forumId: "26", + name: "原神", + url: "https://bbs.mihoyo.com/ys/", + }, { + id: "3", + forumId: "30", + name: "崩坏2", + url: "https://bbs.mihoyo.com/bh2/", + }, { + id: "4", + forumId: "37", + name: "未定事件簿", + url: "https://bbs.mihoyo.com/wd/", + }, { + id: "5", + forumId: "34", + name: "大别野", + url: "https://bbs.mihoyo.com/dby/", + }, { + id: "6", + forumId: "52", + name: "崩坏:星穹铁道", + url: "https://bbs.mihoyo.com/sr/", + }, { + id: "8", + forumId: "57", + name: "绝区零", + url: "https://bbs.mihoyo.com/zzz/", + }, +]; + +const game_id2name = { + bh2_cn: "崩坏2", + bh3_cn: "崩坏3", + nxx_cn: "未定事件簿", + hk4e_cn: "原神", + hkrpg_cn: "崩坏: 星穹铁道", +}; + +const game_id2config = { + bh2_cn: "honkai2", + bh3_cn: "honkai3rd", + nxx_cn: "tears_of_themis", + hk4e_cn: "genshin", + hkrpg_cn: "honkaisr", +}; + +//# 游戏签到的请求头 +const sign_headers = { + Accept: "application/json, text/plain, */*", + DS: "", + "x-rpc-channel": "miyousheluodi", + Origin: "https://webstatic.mihoyo.com", + "x-rpc-app_version": mihoyobbs_version, + "User-Agent": + `Mozilla/5.0 (Linux; Android 12; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) ` + + `Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36 miHoYoBBS/${mihoyobbs_version}`, + "x-rpc-client_type": mihoyobbs_Client_type_web, + Referer: "", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,en-US;q=0.8", + "X-Requested-With": "com.mihoyo.hyperion", + Cookie: "", + "x-rpc-device_id": "", +}; + +//# 通用设置 +const bbs_api = "https://bbs-api.mihoyo.com"; +const web_api = "https://api-takumi.mihoyo.com"; +const account_Info_url = web_api + "/binding/api/getUserGameRolesByCookie?game_biz="; +const act_id_list = { + genshin_Act_id: "e202009291139501", //# 原神自动签到相关的设置 + honkai_sr_Act_id: "e202304121516551", //# 星穹铁道自动签到相关设置 + honkai2_Act_id: "e202203291431091", //# 崩坏2自动签到相关的相关设置 + honkai3rd_Act_id: "e202207181446311", //# 崩坏3自动签到相关的设置 + tearsofthemis_Act_id: "e202202251749321", //# 未定事件簿自动签到相关设置 +} +//# 米游社的API列表 +const bbs_api_list = { + bbs_cookie_url: "https://webapi.account.mihoyo.com/Api/cookie_accountinfo_by_loginticket?login_ticket={}", + bbs_cookie_url2: web_api + "/auth/api/getMultiTokenByLoginTicket?login_ticket={}&token_types=3&uid={}", + bbs_tasks_list: bbs_api + "/apihub/sapi/getUserMissionsState", //# 获取任务列表 + bbs_sign_url: bbs_api + "/apihub/app/api/signIn", //# post + bbs_post_list_url: bbs_api + "/post/api/getForumPostList?forum_id={}&is_good=false&is_hot=false&page_size=20&sort_type=1", + bbs_detail_url: bbs_api + "/post/api/getPostFull?post_id={}", + bbs_share_url: bbs_api + "/apihub/api/getShareConf?entity_id={}&entity_type=1", + bbs_like_url: bbs_api + "/apihub/sapi/upvotePost", //# post json + bbs_get_captcha: bbs_api + "/misc/api/createVerification?is_high=true", + bbs_captcha_verify: bbs_api + "/misc/api/verifyVerification", +}; +//# 通用游戏签到API +const any_checkin_rewards = web_api + "/event/luna/home?lang=zh-cn&act_id={}"; +const any_is_signurl = web_api + "/event/luna/info?lang=zh-cn&act_id={}®ion={}&uid={}"; +const any_sign_url = web_api + "/event/luna/sign"; +//# 原神相关API +const genshin_checkin_rewards = `${web_api}/event/bbs_sign_reward/home?act_id=${act_id_list['genshin_Act_id']}`; +const genshin_Is_signurl = web_api + "/event/bbs_sign_reward/info?act_id={}®ion={}&uid={}"; +const genshin_Signurl = web_api + "/event/bbs_sign_reward/sign"; +//# 云原神相关api +const cloud_genshin_Api = "https://api-cloudgame.mihoyo.com"; +const cloud_genshin_sgin = cloud_genshin_Api + "/hk4e_cg_cn/wallet/wallet/get"; +//# 接下来是国际服的内容 +const os_lang = "zh-cn"; +const os_referer_url = "https://act.hoyolab.com/"; + +// SaltConfig 对象,存储生成 Headers 所用的 salt 值 +const SaltConfig = { + //# 米游社的Salt + mihoyobbs_salt: "egBrFMO1BPBG0UX5XOuuwMRLZKwTVKRV", + mihoyobbs_salt_x4: "xV8v4Qu54lUKrEYFZkJhB8cuOh9Asafs", + mihoyobbs_salt_x6: "t0qEgfub6cvueAPgR5m9aQWWVciEer7v", + mihoyobbs_salt_web: "DG8lqMyc9gquwAUFc7zBS62ijQRX9XF7", +}; + + + +//--------------------------------------------------------- + +async function start() { + //await getVersion("smallfawn/QLScriptPublic/main/mys.js"); + log(`todoList:此次版本更新为过渡版本,以后将增加米游币的任务`) + log(`tips:更新双变量模式,两个网址获取的两个cookie用&分割`) + log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + //await getNotice(); + let taskall; + log("\n==========> 获取当月奖励详情 <==========\n"); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + if (user.index == 1) { + taskall.push(await user.getAwards(act_id_list['genshin_Act_id']))//原神奖励列表 + } + taskall.push(await user.main()); + await $.wait(1000); + await Promise.all(taskall); + } else { + log(`账号[${user.index}] cookie参数不全,停止执行!所有任务`) + } + } + await Promise.all(taskall); + +} +//新接口APP签到COOKIE +//ltuid=296874595; login_ticket=iMBL8bwpaiCiKqjzhbmzLBp9xL5fuGn8uDF0k3Y1; account_id=296874595; ltoken=UJhY0UQQNt0kwagQNGXTZu73WfIjUHLviHPxiliV; cookie_token=kT4pb3rkmMiK0Biaec9KlfKu1zFop2C0Dcv0hCpL; +//ltoken通过verifyToken接口获得 Cookie必须含有account_id和cookie_token 返回Set-Cookie 中包含 ltoken +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.cookieStr = str.split("&")[0]; + this.cookieStr_login = str.split("&")[1]; + this.cookieStr_login = this.cookieStr_login.replace(/\s/g, ''); + this.cookieStr_login += ";" + this.ckStatus = true; + + this.cookie_token_v2 = ""; + this.account_mid_v2 = ""; + this.account_id_v2 = ""; + this.ltoken_v2 = ""; + this.ltmid_v2 = ""; + this.ltuid_v2 = ""; + this.login_uid = ""; + this.login_ticket = ""; + + this.stuid = ""; + this.stoken = ""; + this.device_id = ""; + + this.region = ""; + this.uid_ys = ""; + this.isLoginApp = false + } + async getCookie() { + this.cookieStr = this.cookieStr.replace(/\s/g, ''); + //log(this.cookieStr) + const cookieMustValues1 = ['cookie_token_v2', 'ltoken_v2']; + for (const cookieName of cookieMustValues1) { + const match = new RegExp(`${cookieName}=([^;]+)`).exec(this.cookieStr); + if (match !== null) { + this[cookieName] = match[1]; + } else { + log(`账号[${this.index}] ${cookieName} cookie参数不全,停止执行!所有任务`) + this.ckStatus = false + return + } + } + const cookieMustValues2 = ['account_mid_v2', 'account_id_v2', 'ltmid_v2', 'ltuid_v2']; + for (const cookieName of cookieMustValues2) { + const match = new RegExp(`${cookieName}=([^;]+)`).exec(this.cookieStr); + if (match !== null) { + this[cookieName] = match[1]; + } else { + this[cookieName] = match; + } + } + /*if (/cookie_token_v2=([^;]+)/.exec(this.cookieStr) !== null) { + this.cookie_token_v2 = /cookie_token_v2=([^;]+)/.exec(this.cookieStr)[1]; + } + if (/account_mid_v2=([^;]+)/.exec(this.cookieStr) !== null) { + this.account_mid_v2 = /account_mid_v2=([^;]+)/.exec(this.cookieStr)[1]; + } + + } + this.cookie_token_v2 = /cookie_token_v2=([^;]+)/.exec(this.cookieStr)[1]; + this.account_mid_v2 = /account_mid_v2=([^;]+)/.exec(this.cookieStr)[1];*/ + if (/login_ticket=([^;]+)/.exec(this.cookieStr_login)) { + this.login_ticket = /login_ticket=([^;]+)/.exec(this.cookieStr_login)[1] + this.isLoginApp = true; + } else { + this.login_ticket == ""; + this.isLoginApp = false; + } + //this.stuid = ""; + //this.stoken = ""; + this.setValues('UID')//设置UID和MID + this.setValues('MID')//设置UID和MID + this.checkCookie() + if (this.ckStatus) { + await this.GetCollect() + } + //使用获取到的Cookie + if (this.isLoginApp) { + this.cookieAll = `cookie_token_v2=${this.cookie_token_v2}; account_mid_v2=${this.account_mid_v2}; account_id_v2=${this.account_id_v2}; ltoken_v2=${this.ltoken_v2}; ltmid_v2=${this.ltmid_v2}; ltuid_v2=${this.ltuid_v2}; login_uid=${this.login_uid}; login_ticket=${this.login_ticket};` + } else { + this.cookieAll = `cookie_token_v2=${this.cookie_token_v2}; account_mid_v2=${this.account_mid_v2}; account_id_v2=${this.account_id_v2}; ltoken_v2=${this.ltoken_v2}; ltmid_v2=${this.ltmid_v2}; ltuid_v2=${this.ltuid_v2};` + } + } + checkCookie() { + if (this.cookie_token_v2 && this.account_mid_v2 && this.account_id_v2 && this.ltoken_v2 && this.ltmid_v2 && this.ltuid_v2 && this.login_uid) { + this.ckStatus = true; + } else { + this.ckStatus = false; + log(`缺少参数 设置false`) + } + } + setValues(str) { + if (str == 'UID') { + this.account_id_v2 = this.account_id_v2 || this.ltuid_v2 || this.login_uid; + this.ltuid_v2 = this.ltuid_v2 || this.account_id_v2 || this.login_uid; + //log(`this.ltuid_v2` + this.ltuid_v2) + //log(`this.account_id_v2` + this.account_id_v2) + + this.login_uid = this.login_uid || this.account_id_v2 || this.ltuid_v2; + //log(`this.login_uid` + this.login_uid) + } else if (str == 'MID') { + this.account_mid_v2 = this.account_mid_v2 || this.ltmid_v2 + this.ltmid_v2 = this.ltmid_v2 || this.account_mid_v2 + } + } + async GetCollect() { + let boolneedUpdate = false; + let isIn = false; + if (TempAccount) { + for (let j = 0; j < TempAccount.length; j++) { + if (TempAccount[j]["uid"] == this.account_id_v2 || TempAccount[j]["uid"] == this.ltuid_v2 || TempAccount[j]["uid"] == this.login_uid) { + isIn = true; + this.cookie_token_v2 = TempAccount[j]['cookie_token_v2']; + this.account_mid_v2 = TempAccount[j]['mid']; + this.account_id_v2 = TempAccount[j]['uid']; + this.ltoken_v2 = TempAccount[j]['ltoken_v2']; + this.ltmid_v2 = TempAccount[j]['mid']; + this.ltuid_v2 = TempAccount[j]['uid']; + this.login_uid = TempAccount[j]['uid']; + this.login_ticket = TempAccount[j]['login_ticket']; + this.stuid = TempAccount[j]['stuid'] + this.stoken = TempAccount[j]['stoken']; + this.device_id = TempAccount[j]['device_id']; + } + } + } + if (!isIn) { + console.log(`账号[${this.index}] 该账号无缓存,尝试联网获取stoken.....`); + if (this.isLoginApp) { + await this.task_login(); + } else { + console.log(`账号[${this.index}] 缺少login_ticket参数,不执行米游币任务`); + } + if (this.stoken == "" || this.stoken !== "") { + var tempAddCooKie = {}; + tempAddCooKie = { + "uid": this.account_id_v2, + "mid": this.account_mid_v2, + "cookie_token_v2": this.cookie_token_v2, + "ltoken_v2": this.ltoken_v2, + "login_ticket": this.login_ticket, + "stoken": this.stoken, + "device_id": getUUID() + }; + TempAccount.push(tempAddCooKie); + //标识,需要更新缓存文件 + boolneedUpdate = true; + } else { + boolneedUpdate = true + } + } + if (boolneedUpdate) { + var str = JSON.stringify(TempAccount, null, 2); + //var str = JSON.stringify(TempAccount); + //log(TempAccount) + fs.writeFile(strShare, str, function (err) { + if (err) { + console.log(err); + console.log("\n【缓存文件Mihoyo_Account.json更新失败!】\n"); + } else { + console.log("\n【缓存文件Mihoyo_Account.json更新成功!】\n"); + } + }) + } + } + async getHeaders() { + await this.GetCollect() + const headers = sign_headers; + headers['Cookie'] = this.cookieAll; + headers['DS'] = this.getDS(true) + headers['x-rpc-device_id'] = this.device_id//getUUID(); + headers['User-Agent'] = `Mozilla/5.0 (Linux; Android 12; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) ` + + `Version/4.0 Chrome/103.0.5060.129 Mobile Safari/537.36 miHoYoBBS/${mihoyobbs_version}` + return headers; + } + //# 获取请求Header里的DS 当web为true则生成网页端的DS + getDS(web) { + let salt; + if (web) { + salt = SaltConfig.mihoyobbs_salt_web; + } else { + salt = SaltConfig.mihoyobbs_salt; + } + const timestamp = Math.floor(Date.now() / 1e3); + const random = Math.random().toString(36).slice(-6); + const result = MD5_Encrypt(`salt=${salt}&t=${timestamp}&r=${random}`); + return `${timestamp},${random},${result}`; + } + /** + * # 获取请求Header里的DS(版本2) 这个版本ds之前见到都是查询接口里的 + * @param {*} q + * @param {*} b + * @returns + */ + getDS2(q, b) { + const salt = SaltConfig.mihoyobbs_salt_x6; + const timestamp = Math.floor(Date.now() / 1e3); + const random = Math.floor(Math.random() * (200000 - 100001 + 1) + 100001).toString(); + const add = `&b=${b}&q=${q}`; + const result = MD5_Encrypt(`salt=${salt}&t=${timestamp}&r=${random}${add}`); + return `${timestamp},${random},${result}`; + } + + async getAwards(act_id) { + let options = { + url: `https://api-takumi.mihoyo.com/event/bbs_sign_reward/home?act_id=${act_id}`, + headers: {} + } + let result = await httpRequest(options) + for (let i in result.data.awards) { + jiangliArr.push(`${result.data.awards[i].name} * ${result.data.awards[i].cnt}`); + } + DoubleLog(jiangliArr); + } + async main() { + try { + await this.getCookie()//获取stuid以及stoken 且保存 以JSON格式 mihoyoConfig.json{存放 stuid为键 其他为值} + if (this.ckStatus) { + await this.get_info_ys() + await this.get_sign_info(act_id_list['genshin_Act_id']) + } + + } catch (e) { + console.log(e); + } + } + async task_login() {//获取米哈游的APP stuid以及stoken + try { + let options, result + options = { + url: `https://webapi.account.mihoyo.com/Api/cookie_accountinfo_by_loginticket?login_ticket=${this.login_ticket}`, + headers: {} + }, result = await httpRequest(options); + //log(options) + //log(result) + if (result.data.msg == '成功') { + this.stuid = result.data.cookie_info.account_id + options = { + url: `https://api-takumi.mihoyo.com/auth/api/getMultiTokenByLoginTicket?login_ticket=${this.login_ticket}&token_types=3&uid=${this.stuid}`, + headers: {} + }, result = await httpRequest(options); + if (result.message == 'OK') { + this.stoken = result.data.list[0].token + //log(this.stoken) + //log(result) + //DoubleLog('保存STUID和STOKEN success') + } + } else { + DoubleLog(`账号[${this.index}] login_ticket已失效`); + } + } catch (e) { + console.log(e); + } + } + + async get_info_ys() { + let headers = await this.getHeaders() + try { + let options = { + url: `https://api-takumi.mihoyo.com/binding/api/getUserGameRolesByCookie?game_biz=hk4e_cn`, + headers: headers, + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.retcode == 0) { + //log(`账号[${this.index}] 获取原神信息成功`); + //let game_biz = result.data.list[0].game_biz; + let region = result.data.list[0].region; + let game_uid = result.data.list[0].game_uid; + let nickname = result.data.list[0].nickname; + let region_name = result.data.list[0].region_name; + this.region = region; + this.uid_ys = game_uid; + //log(game_biz, region, game_uid, nickname, region_name); + DoubleLog(`账号[${this.index}] 游戏昵称${nickname},${region_name}`); + } else { + DoubleLog(`账号[${this.index}] 获取原神信息:失败 ❌ ,原因未知!`); + log(result); + } + } catch (e) { + console.log(e); + } + } + + /** + * 签到信息 + */ + async get_sign_info(act_id) { + let tmpHeaders = await this.getHeaders() + tmpHeaders['Referer'] = `https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true&act_id=${act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon` + try { + let options = { + url: `https://api-takumi.mihoyo.com/event/bbs_sign_reward/info?act_id=${act_id}®ion=${this.region}&uid=${this.uid_ys}`, + headers: tmpHeaders + }, result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.retcode == 0) { + //DoubleLog(`账号[${this.index}] 获取签到信息成功`); + DoubleLog(`账号[${this.index}] 签到天数${result.data.total_sign_day},今天${result.data.today},是否签到${result.data.is_sign}`); + if (result.data.is_sign == false) { + DoubleLog(`账号[${this.index}] 执行签到`); + await this.task_sign(act_id); + } + } else { + DoubleLog(`账号[${this.index}] 获取签到信息:失败 ❌ ,原因未知!`); + log(result); + } + } catch (e) { + console.log(e); + } + } + + async task_sign(act_id) { + let tmpHeaders = await this.getHeaders() + tmpHeaders['Referer'] = `https://webstatic.mihoyo.com/bbs/event/signin-ys/index.html?bbs_auth_required=true&act_id=${act_id}&utm_source=bbs&utm_medium=mys&utm_campaign=icon` + try { + let options = { + url: `https://api-takumi.mihoyo.com/event/bbs_sign_reward/sign`, + headers: tmpHeaders, + body: $.toStr({ act_id: act_id, region: this.region, uid: this.uid_ys, }) + }, result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.retcode == 0 && 'gt' in result.data) { + DoubleLog(`账号[${this.index}] 签到:失败,原因有点选验证请手动签到🎉`); + } else if (result.retcode == 0 && !('gt' in result.data)) { + DoubleLog(`账号[${this.index}] 签到:${result.message} ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true; //true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + } else { + if (data) { + typeof JSON.parse(data) == "object" ? (data = JSON.parse(data)) : (data = data); + resolve(data); + } else { + console.log(`请求api返回数据为空,请检查自身原因`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} + +function getUUID() { + return Array.from({ length: 32 }, () => Math.floor(Math.random() * 16).toString(16)).map((value, index) => [7, 11, 15, 19].includes(index) ? `-${value}` : value).join(""); +} +/** + * 获取远程版本 + */ +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + let options = { + url: `https://ghproxy.com/https://raw.githubusercontent.com/${scriptUrl}`, + }; + $.get( + options, + async (err, resp, data) => { + try { + let regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + let match = data.match(regex); + scriptVersionLatest = match ? match[2] : ""; + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +async function getNotice() { + try { + let options = { + url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json`, + headers: { "User-Agent": "" }, + }, + result = await httpRequest(options); + if (!result || !("notice" in result)) { + options.url = `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`; + result = await httpRequest(options); + } + if (result && "notice" in result) { + DoubleLog(`${result.notice}`); + } + } catch (e) { + console.log(e); + } +} +async function hitokoto(timeout = 3 * 1000) { + // 随机一言 + return new Promise((resolve) => { + try { + let options = { + url: "https://v1.hitokoto.cn/", + headers: {}, + }; //, //result = await httpRequest(options); + $.get( + options, + async (err, resp, data) => { + try { + data = JSON.parse(data); + resolve(data.hitokoto); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }, + timeout + ); + //return result.hitokoto + } catch (error) { + console.log(error); + } + }); +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + await notify.sendNotify($.name, message); + } else { + $.msg($.name, "", message); + } + } else { + console.log(message); + } +} + +// 完整 Env +function MD5_Encrypt(a) { function b(a, b) { return (a << b) | (a >>> (32 - b)); } function c(a, b) { var c, d, e, f, g; return ((e = 2147483648 & a), (f = 2147483648 & b), (c = 1073741824 & a), (d = 1073741824 & b), (g = (1073741823 & a) + (1073741823 & b)), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f); } function d(a, b, c) { return (a & b) | (~a & c); } function e(a, b, c) { return (a & c) | (b & ~c); } function f(a, b, c) { return a ^ b ^ c; } function g(a, b, c) { return b ^ (a | ~c); } function h(a, e, f, g, h, i, j) { return (a = c(a, c(c(d(e, f, g), h), j))), c(b(a, i), e); } function i(a, d, f, g, h, i, j) { return (a = c(a, c(c(e(d, f, g), h), j))), c(b(a, i), d); } function j(a, d, e, g, h, i, j) { return (a = c(a, c(c(f(d, e, g), h), j))), c(b(a, i), d); } function k(a, d, e, f, h, i, j) { return (a = c(a, c(c(g(d, e, f), h), j))), c(b(a, i), d); } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - (d % 64)) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;) (b = (i - (i % 4)) / 4), (h = (i % 4) * 8), (g[b] = g[b] | (a.charCodeAt(i) << h)), i++; return ((b = (i - (i % 4)) / 4), (h = (i % 4) * 8), (g[b] = g[b] | (128 << h)), (g[f - 2] = c << 3), (g[f - 1] = c >>> 29), g); } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++) (b = (a >>> (8 * c)) & 255), (e = "0" + b.toString(16)), (d += e.substr(e.length - 2, 2)); return d; } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? (b += String.fromCharCode(d)) : d > 127 && 2048 > d ? ((b += String.fromCharCode((d >> 6) | 192)), (b += String.fromCharCode((63 & d) | 128))) : ((b += String.fromCharCode((d >> 12) | 224)), (b += String.fromCharCode(((d >> 6) & 63) | 128)), (b += String.fromCharCode((63 & d) | 128))); } return b; } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16) (p = t), (q = u), (r = v), (s = w), (t = h(t, u, v, w, x[o + 0], y, 3614090360)), (w = h(w, t, u, v, x[o + 1], z, 3905402710)), (v = h(v, w, t, u, x[o + 2], A, 606105819)), (u = h(u, v, w, t, x[o + 3], B, 3250441966)), (t = h(t, u, v, w, x[o + 4], y, 4118548399)), (w = h(w, t, u, v, x[o + 5], z, 1200080426)), (v = h(v, w, t, u, x[o + 6], A, 2821735955)), (u = h(u, v, w, t, x[o + 7], B, 4249261313)), (t = h(t, u, v, w, x[o + 8], y, 1770035416)), (w = h(w, t, u, v, x[o + 9], z, 2336552879)), (v = h(v, w, t, u, x[o + 10], A, 4294925233)), (u = h(u, v, w, t, x[o + 11], B, 2304563134)), (t = h(t, u, v, w, x[o + 12], y, 1804603682)), (w = h(w, t, u, v, x[o + 13], z, 4254626195)), (v = h(v, w, t, u, x[o + 14], A, 2792965006)), (u = h(u, v, w, t, x[o + 15], B, 1236535329)), (t = i(t, u, v, w, x[o + 1], C, 4129170786)), (w = i(w, t, u, v, x[o + 6], D, 3225465664)), (v = i(v, w, t, u, x[o + 11], E, 643717713)), (u = i(u, v, w, t, x[o + 0], F, 3921069994)), (t = i(t, u, v, w, x[o + 5], C, 3593408605)), (w = i(w, t, u, v, x[o + 10], D, 38016083)), (v = i(v, w, t, u, x[o + 15], E, 3634488961)), (u = i(u, v, w, t, x[o + 4], F, 3889429448)), (t = i(t, u, v, w, x[o + 9], C, 568446438)), (w = i(w, t, u, v, x[o + 14], D, 3275163606)), (v = i(v, w, t, u, x[o + 3], E, 4107603335)), (u = i(u, v, w, t, x[o + 8], F, 1163531501)), (t = i(t, u, v, w, x[o + 13], C, 2850285829)), (w = i(w, t, u, v, x[o + 2], D, 4243563512)), (v = i(v, w, t, u, x[o + 7], E, 1735328473)), (u = i(u, v, w, t, x[o + 12], F, 2368359562)), (t = j(t, u, v, w, x[o + 5], G, 4294588738)), (w = j(w, t, u, v, x[o + 8], H, 2272392833)), (v = j(v, w, t, u, x[o + 11], I, 1839030562)), (u = j(u, v, w, t, x[o + 14], J, 4259657740)), (t = j(t, u, v, w, x[o + 1], G, 2763975236)), (w = j(w, t, u, v, x[o + 4], H, 1272893353)), (v = j(v, w, t, u, x[o + 7], I, 4139469664)), (u = j(u, v, w, t, x[o + 10], J, 3200236656)), (t = j(t, u, v, w, x[o + 13], G, 681279174)), (w = j(w, t, u, v, x[o + 0], H, 3936430074)), (v = j(v, w, t, u, x[o + 3], I, 3572445317)), (u = j(u, v, w, t, x[o + 6], J, 76029189)), (t = j(t, u, v, w, x[o + 9], G, 3654602809)), (w = j(w, t, u, v, x[o + 12], H, 3873151461)), (v = j(v, w, t, u, x[o + 15], I, 530742520)), (u = j(u, v, w, t, x[o + 2], J, 3299628645)), (t = k(t, u, v, w, x[o + 0], K, 4096336452)), (w = k(w, t, u, v, x[o + 7], L, 1126891415)), (v = k(v, w, t, u, x[o + 14], M, 2878612391)), (u = k(u, v, w, t, x[o + 5], N, 4237533241)), (t = k(t, u, v, w, x[o + 12], K, 1700485571)), (w = k(w, t, u, v, x[o + 3], L, 2399980690)), (v = k(v, w, t, u, x[o + 10], M, 4293915773)), (u = k(u, v, w, t, x[o + 1], N, 2240044497)), (t = k(t, u, v, w, x[o + 8], K, 1873313359)), (w = k(w, t, u, v, x[o + 15], L, 4264355552)), (v = k(v, w, t, u, x[o + 6], M, 2734768916)), (u = k(u, v, w, t, x[o + 13], N, 1309151649)), (t = k(t, u, v, w, x[o + 4], K, 4149444226)), (w = k(w, t, u, v, x[o + 11], L, 3174756917)), (v = k(v, w, t, u, x[o + 2], M, 718787259)), (u = k(u, v, w, t, x[o + 9], N, 3951481745)), (t = c(t, p)), (u = c(u, q)), (v = c(v, r)), (w = c(w, s)); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase(); } +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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!`) } 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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise(s => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? "null" === i ? null : i || "{}" : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), a) } catch (e) { const i = {}; this.lodash_set(i, r, t), s = this.setval(JSON.stringify(i), a) } } 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 : {}, 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"]), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, 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: a, statusCode: r, headers: i, rawBody: o } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, t => e(t && t.error || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then(t => { const { statusCode: s, statusCode: r, headers: i, rawBody: o } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), e += `${s}=${a}&`) } return e = e.substring(0, e.length - 1), e } msg(e = t, s = "", a = "", r) { const i = 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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); break; case "Node.js": this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) } } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; switch (this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), 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) } diff --git a/backup/wangchao.py b/backup/wangchao.py new file mode 100644 index 0000000..0be8403 --- /dev/null +++ b/backup/wangchao.py @@ -0,0 +1,369 @@ + + +import hashlib +from gmalg import SM2 + +import math +import time +import requests +import datetime +import os +from urllib.parse import urlparse, parse_qs +import random +from Crypto.PublicKey import RSA +from Crypto.Cipher import PKCS1_v1_5 +import base64 +from requests.adapters import HTTPAdapter +from urllib3.util.retry import Retry +import urllib.parse +import json +debug=0 +account_id = "" +def jm(password): + public_key_base64 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD6XO7e9YeAOs+cFqwa7ETJ+WXizPqQeXv68i5vqw9pFREsrqiBTRcg7wB0RIp3rJkDpaeVJLsZqYm5TW7FWx/iOiXFc+zCPvaKZric2dXCw27EvlH5rq+zwIPDAJHGAfnn1nmQH7wR3PCatEIb8pz5GFlTHMlluw4ZYmnOwg+thwIDAQAB" + public_key_der = base64.b64decode(public_key_base64) + key = RSA.importKey(public_key_der) + cipher = PKCS1_v1_5.new(key) + password_bytes = password.encode('utf-8') + encrypted_password = cipher.encrypt(password_bytes) + encrypted_password_base64 = base64.b64encode(encrypted_password).decode('utf-8') + url_encoded_data = urllib.parse.quote(encrypted_password_base64) + return url_encoded_data + +#生成设备号 +def generate_random_uuid(): + # 设备号其实可以写死,保险起见选择随机生成 + uuid_str = '00000000-{:04x}-{:04x}-0000-0000{:08x}'.format( + random.randint(0, 0xfff) | 0x4000, + random.randint(0, 0x3fff) | 0x8000, + random.getrandbits(32) + ) + return uuid_str + +# 签名并获取认证码 +def sign(phone, password): + url_encoded_data = jm(password) + url = "https://passport.tmuyun.com/web/oauth/credential_auth" + payload = f"client_id=10019&password={url_encoded_data}&phone_number={phone}" + print(payload) + headers = { + 'User-Agent': "ANDROID;13;10019;6.0.2;1.0;null;MEIZU 20", + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + 'Content-Type': "application/x-www-form-urlencoded", + 'Cache-Control': "no-cache", + 'X-SIGNATURE': "185d21c6f3e9ec4af43e0065079b8eb7f1bb054134481e57926fcc45e304b896", + } + + response = requests.post(url, data=payload, headers=headers) + print(response.json()) + code = response.json()['data']['authorization_code']['code'] + + url = "https://vapp.taizhou.com.cn/api/zbtxz/login" + payload = f"check_token=&code={code}&token=&type=-1&union_id=" + headers = { + 'User-Agent': "6.0.2;{deviceid};Meizu MEIZU 20;Android;13;tencent;6.10.0", + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + 'Content-Type': "application/x-www-form-urlencoded", + 'X-SESSION-ID': "66586b383f293a7173e4c8f4", + 'X-REQUEST-ID': "110c1987-1637-4f4e-953e-e35272bb891e", + 'X-TIMESTAMP': "1717072109065", + 'X-SIGNATURE': "a69f171e284594a5ecc4baa1b2299c99167532b9795122bae308f27592e94381", + 'X-TENANT-ID': "64", + 'Cache-Control': "no-cache" + } + response = requests.post(url, data=payload, headers=headers) + message = response.json()['message'] + account_id = response.json()['data']['account']['id'] + session_id = response.json()['data']['session']['id'] + name = response.json()['data']['account']['nick_name'] + + return message, account_id, session_id, name + + +#生成验证码 +def generate_md5(input_str): + md5_obj = hashlib.md5() + input_str_encoded = input_str.encode('utf-8') + md5_obj.update(input_str_encoded) + return md5_obj.hexdigest() + +#获取阅读的JSESSIONID +def get_special_cookie(): + special_cookie_url = f'https://xmt.taizhou.com.cn/prod-api/user-read/app/login?id={account_id}&sessionId={session_id}&deviceId={deviceid}' + + headers = { + 'Host': 'xmt.taizhou.com.cn', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0', + 'Accept': '*/*', + 'X-Requested-With': 'com.shangc.tiennews.taizhou', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', +} + response = requests.get(special_cookie_url, headers=headers) + if debug and response.status_code == 200: + print('执行任务获取阅读jse') + print('下面是访问的url\n',special_cookie_url) + print('下面是访问的headers\n',headers) + print('下面是返回的response\n',response.headers) + if response.status_code == 200 and response.headers['Set-Cookie']: + jsessionid1 =response.headers['Set-Cookie'].split(';')[0]+';' + print('获取特殊cookie成功',jsessionid1) + return response.headers['Set-Cookie'] + else: + print('获取jsesesionid失败',response.headers) + +#获取日期 +def get_current_date(): + now = datetime.datetime.now() + year_str = str(now.year) + month_str = f"0{now.month}" if now.month < 10 else str(now.month) + day_str = f"0{now.day}" if now.day < 10 else str(now.day) + print(f"当前日期{year_str}{month_str}{day_str}") + return year_str + month_str + day_str + +#获取阅读列表 +def fetch_article_list(): + headers = { + 'Host': 'xmt.taizhou.com.cn', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0', + 'Accept': '*/*', + 'X-Requested-With': 'com.shangc.tiennews.taizhou', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'cookie': f'{special_cookie};' +} + url=f'https://xmt.taizhou.com.cn/prod-api/user-read/list/{get_current_date()}' + response = requests.get(url, headers=headers) + if debug and response.status_code == 200: + print('执行任务获取阅读列表') + print('下面是访问的url\n',url) + print('下面是访问的headers\n',headers) + print('下面是返回的response\n',response.headers) + msg = response.json()['msg'] + print(msg) + return response.json() +def encrypt_with_sm2(article_id, account_id): + # 获取当前时间戳 + timestamp = int(time.time() * 1000) + # 构造数据 + data = { + "timestamp": timestamp, + "articleId": article_id, + "accountId": account_id + } + # 将数据序列化为JSON字符串 + data_json = json.dumps(data, separators=(',', ':')) + print("Data to be encrypted:", data_json) + + # SM2公钥,确保公钥以04开头(未压缩格式) + public_key_hex = "04A50803A27F000D6B310607EBA2A1C899E82872C0B538CA41DB6F0183B4C7E164DAFC6946ABF93C8AF1C0AD96D0E770D29264EF9F907DDBAE97A2A0BB1036D4AC" + public_key = bytes.fromhex(public_key_hex) + + # 创建SM2对象 + sm2_crypt = SM2(pk=public_key) + + # 加密数据 + encrypted_data = sm2_crypt.encrypt(data_json.encode('utf-8')) + print(len(encrypted_data.hex())) + + + # 返回加密后的十六进制字符串 + encrypted_data_hex = encrypted_data.hex() + #去掉前面两位 + encrypted_data_hex = encrypted_data_hex[2:] + return encrypted_data_hex +#阅读文章 +def mark_article_as_read(article_id,retry_count=3): + headers = { + 'Host': 'xmt.taizhou.com.cn', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0', + 'Accept': '*/*', + 'X-Requested-With': 'com.shangc.tiennews.taizhou', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'cookie': f'{special_cookie}', +} + timestamp_str = str(math.floor(time.time() * 1000)) + signature = encrypt_with_sm2(article_id,account_id) + url = f'https://xmt.taizhou.com.cn/prod-api/already-read/article/new?signature={signature}' + print(url) + + # 创建一个包含重试策略的会话 + session = requests.Session() + retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504]) + session.mount('https://', HTTPAdapter(max_retries=retries)) + + for attempt in range(retry_count): + try: + response = session.get(url, headers=headers, timeout=10) + if response.status_code == 200: + print(response.text) + return + else: + print(f"请求失败,状态码: {response.status_code}, 响应内容: {response.text}") + except requests.exceptions.RequestException as e: + print(f"请求失败 (尝试 {attempt + 1}/{retry_count}): {e}") + time.sleep(2) # 在重试前增加延迟 + + +# 登录并获取抽奖JSESSIONID +def login(account_id, session_id, retry_count=3): + base_url = 'https://srv-app.taizhou.com.cn' + url = f'{base_url}/tzrb/user/loginWC' + headers = { + 'Host': 'srv-app.taizhou.com.cn', + 'Connection': 'keep-alive', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0', + 'Accept': '*/*', + 'X-Requested-With': 'com.shangc.tiennews.taizhou', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://srv-app.taizhou.com.cn/luckdraw/', + 'Accept-Encoding': 'gzip, deflate', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' + } + params = { + 'accountId': account_id, + 'sessionId': session_id + } + + # 创建一个包含重试策略的会话 + session = requests.Session() + retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504]) + session.mount('https://', HTTPAdapter(max_retries=retries)) + + for attempt in range(retry_count): + try: + response = session.get(url, params=params, headers=headers, timeout=10) + if response.status_code == 200: + cookies_dict = response.cookies.get_dict() + s_JSESSIONID = '; '.join([f'{k}={v}' for k, v in cookies_dict.items()]) + return s_JSESSIONID + else: + print(f"请求失败,状态码: {response.status_code}, 响应内容: {response.text}") + except requests.exceptions.RequestException as e: + print(f"请求失败 (尝试 {attempt + 1}/{retry_count}): {e}") + time.sleep(2) # 在重试前增加延迟 + + return None + +#抽奖 +def cj(jsessionid, retry_count=3): + url = "https://srv-app.taizhou.com.cn/tzrb/userAwardRecordUpgrade/saveUpdate" + payload = "activityId=67&sessionId=undefined&sig=undefined&token=undefined" + headers = { + 'Host': 'srv-app.taizhou.com.cn', + 'Connection': 'keep-alive', + 'Content-Length': '63', + '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/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0', + 'Content-type': 'application/x-www-form-urlencoded', + 'Accept': '*/*', + 'Origin': 'https://srv-app.taizhou.com.cn', + 'X-Requested-With': 'com.shangc.tiennews.taizhou', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://srv-app.taizhou.com.cn/luckdraw-ra-1/', + 'Accept-Encoding': 'gzip, deflate', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cookie': f'{jsessionid}' + } + + # 创建一个包含重试策略的会话 + session = requests.Session() + retries = Retry(total=4, backoff_factor=1, status_forcelist=[502, 503, 504]) + session.mount('https://', HTTPAdapter(max_retries=retries)) + + for attempt in range(retry_count): + try: + response = session.post(url, data=payload, headers=headers, timeout=10) + if response.status_code == 200: + print(response.text) + display_draw_results(jsessionid) + return # 成功则退出函数 + else: + print(f"POST 请求失败,状态码: {response.status_code}, 响应内容: {response.text}") + except requests.exceptions.RequestException as e: + print(f"POST 请求失败 (尝试 {attempt + 1}/{retry_count}): {e}") + time.sleep(2) # 在重试前增加延迟 + +#查询抽奖结果 +def display_draw_results(cookies): + draw_result_headers = { + 'Host': 'srv-app.taizhou.com.cn', + 'Connection': 'keep-alive', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0', + 'Accept': '*/*', + 'X-Requested-With': 'com.shangc.tiennews.taizhou', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://srv-app.taizhou.com.cn/luckdraw-awsc-231023/', + 'Accept-Encoding': 'gzip, deflate', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cookie': f'{cookies}', + } + result_url = 'https://srv-app.taizhou.com.cn/tzrb/userAwardRecordUpgrade/pageList?pageSize=10&pageNum=1&activityId=67' + result_data = requests.get(result_url, headers=draw_result_headers).json()["data"]["records"] + for record in result_data: + create_time_str = str(record["createTime"]) + award_name_str = str(record["awardName"]) + print(f"{create_time_str}---------{award_name_str}") + +# 从环境变量中读取账户和密码 +accounts = os.getenv("wangchaoAccount") +if not accounts: + print("❌未找到环境变量!") +else: + accounts_list = accounts.split("&") + print(f"一共在环境变量中获取到 {len(accounts_list)} 个账号") + for account in accounts_list: + password, phone = account.split("#") + message, account_id, session_id, name = sign(phone, password) + deviceid = generate_random_uuid() + print() + if account_id and session_id: + mobile = phone[:3] + "*" * 4 + phone[7:] + print(f"账号 {mobile} 登录成功") + special_cookie = get_special_cookie() + print(f"账号 {mobile} 获取阅读列表") + article_list = fetch_article_list() + for article in article_list['data']['articleIsReadList']: + article_title = article['title'] + if article['isRead'] == True : + print(f"√文章{article_title}已读") + time.sleep(0.5) + continue + else: + time.sleep(random.uniform(3.5, 4.5)) + article_id = article['id'] + print(f"账号 {mobile} 阅读文章 {article_title}") + mark_article_as_read(article_id) + time.sleep(1) + jsessionid = login(account_id, session_id) + if jsessionid: + print('去抽奖') + cj(jsessionid) + else: + print(f"获取 JSESSIONID 失败") + else: + print(f"账号 {phone} 登录失败") + + # 每个账号登录后延迟... + print("等待 5 秒后继续下一个账号...") + time.sleep(5) + print("所有账号处理完毕") diff --git a/backup/wx_hapi.js b/backup/wx_hapi.js new file mode 100644 index 0000000..492124c --- /dev/null +++ b/backup/wx_hapi.js @@ -0,0 +1,202 @@ +/** + * new Env("HAPI哈啤硬核街") + * cron 20 17 * * * wx_hapi.js + * Show: + * 变量名:wx_hapi_cookie + * 变量值:bg-hardcore.ab-inbev.cn, Headers 中的 openid的值&sign的值×tamp的值 3个值缺一不可 + * scriptVersionNow = "0.0.2"; + */ + +const $ = new Env("HAPI哈啤硬核街"); +const ckName = "wx_hapi_cookie"; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = '&'; //多变量分隔符 +let scriptVersionNow = "0.0.2"; +let jsUrl = "https://originfastly.jsdelivr.net/gh/smallfawn/QLScriptPublic@main/wx_hapi.js" +let noticeUrl = `https://originfastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json` + +class UserInfo { + constructor(str) { + this.index = ++$.userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.sign = str.split(strSplitor)[1] + this.timestamp = str.split(strSplitor)[2] + this.ckStatus = true; + } + async main() { + await this.user_info() + } + creat_headers(){ + return { + "Host": "bg-hardcore.ab-inbev.cn", + "Connection": "keep-alive", + "Content-Length": "35", + "charset": "utf-8", + "openid": this.ck, + "sign": this.sign, + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/5261 MMWEBSDK/20230405 MMWEBID/2585 MicroMessenger/8.0.35.2360(0x2800235D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android", + "content-type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip,compress,br,deflate", + "timestamp": this.timestamp, + "Referer": "https://servicewechat.com/wx3235eff0af1e42d8/199/page-frame.html", + } + + + } + async sign_in() { + try { + let options = { + url: `https://bg-hardcore.ab-inbev.cn/api/checkin/dailyCheckIn`, + headers: this.creat_headers(), + body:`openId=${this.ck}` + }, + result = await httpRequest(options); + //console.log(options); + console.log(JSON.stringify(result)); + if (result.code == 0) { + $.DoubleLog(`✅账号[${this.index}] 签到成功[${result.data.point}]分🎉`); + } else { + $.DoubleLog(`❌账号[${this.index}] 签到失败`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + //https://bg-hardcore.ab-inbev.cn/api/checkin/userIsCheckin + async check_signin() { + try { + let options = { + url: `https://bg-hardcore.ab-inbev.cn/api/checkin/userIsCheckin`, + headers: this.creat_headers(), + body:`openId=${this.ck}` + }, + result = await httpRequest(options); + //console.log(options); + console.log(JSON.stringify(result)); + if (result.code == !-1) { + await this.sign_in() + console.log(`签到 do`) + } else { + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + //https://bg-hardcore.ab-inbev.cn/api/userCenter/getUserCenterInfo + async user_info() { + try { + let options = { + url: `https://bg-hardcore.ab-inbev.cn/api/userCenter/getUserCenterInfo`, + headers: this.creat_headers(), + body:`openId=${this.ck}` + }, + result = await httpRequest(options); + //console.log(options); + console.log(JSON.stringify(result)); + if (result.code == 0) { + $.DoubleLog(`✅账号[${this.index}] 欢迎[${result.data.username}]当前[${result.data.userPoints}]分 累计签到${result.data.joinDays}天🎉`); + await this.check_signin() + } else { + console.log(JSON.stringify(result)); + + } + } catch (e) { + console.log(e); + } + } + +} + +async function start() { + //await _getVersion(jsUrl); + //await _getNotice(noticeUrl); + let taskall = []; + for (let user of $.userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if ($.userList.length > 0) { + await start(); + } await $.SendMsg($.message); +})().catch((e) => console.log(e)).finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + //let userCount = 0; + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && $.userList.push(new UserInfo(n)); + //userCount = $.userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${$.userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +/** + * 获取远程版本 + */ +async function _getVersion(jsUrl) { + const options = { url: jsUrl }; + let httpResult = await httpRequest(options) + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = httpResult.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + $.DoubleLog(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); +} +/** + * 获取远程通知 + */ +async function _getNotice(noticeUrl) { + const options = { url: noticeUrl }; + let httpResult = await httpRequest(options) + const notice = httpResult.notice.replace(/\\n/g, "\n"); + $.DoubleLog(notice); +} +// ==================== API ==================== // +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; this.message = ""; 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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise(s => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? "null" === i ? null : i || "{}" : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), a) } catch (e) { const i = {}; this.lodash_set(i, r, t), s = this.setval(JSON.stringify(i), a) } } 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 : {}, 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)), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, 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: a, statusCode: r, headers: i, rawBody: o } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, t => e(t && t.error || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then(t => { const { statusCode: s, statusCode: r, headers: i, rawBody: o } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), e += `${s}=${a}&`) } return e = e.substring(0, e.length - 1), e } msg(e = t, s = "", a = "", r) { const i = 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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise(e => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); this.message += `\n ${d}` } } else { console.log(`${d}`); this.message += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; switch (this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-07-26 newAdd:DoubleLog & SendMsg & ChangeMessage diff --git a/backup/yuebai.js b/backup/yuebai.js new file mode 100644 index 0000000..6dfc498 --- /dev/null +++ b/backup/yuebai.js @@ -0,0 +1,558 @@ +/** + * cron 17 17 * * * 悦拜APP 左上角活动 金币换红包 实物 + * 邀请码 OEJMUR 下载地址 微信打开 https://yuebuy.top/a.jDybfP + * 变量名:yuepaiToken + * 变量值:https://app.yuebuy.cn/api/checkin/userinfo Headers请求头中的x-auth-token的值 多账号&或换行或新建同名变量 + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("悦拜APP"); +const notify = $.isNode() ? require('../sendNotify') : ''; +let ckName = "yuepaiToken"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class Task { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.signStatus = false + } + async main() { + await this.task_usefinfo() + if (this.ckStatus) { + if (this.signStatus == false) { + await this.task_sign() + } + await this.task_index(); + } + } + + async taskRequest(method, url, body = "") { + // + function md5(str) { + const crypto = require('crypto'); + return crypto.createHash('md5').update(str).digest('hex'); + } + let timestamp = Date.now().toString() + let random = $.uuid() + let md5Str1 = md5(timestamp + random); + let sign = md5(md5Str1 + `YEqQJIyOzUABvTon`); + let headers = { + "push-token": "160a3797c901850e1fc", + "app": "4.2.9", + "system": "10", + "platform": "android", + "channelName": "xiaomi", + "model": "MI 8 Lite", + "x-auth-token": this.ck, + "x-auth-timestamp": timestamp, + "x-auth-random": random, + "x-auth-signature": sign, + "version": "v1", + "Content-Type": "application/x-www-form-urlencoded", + "Content-Length": "0", + "Host": "app.yuebuy.cn", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip", + "User-Agent": "okhttp/4.10.0" + } + const requestOptions = { + method: method, + headers: headers, + url: url + }; + + if (method !== "get") { + requestOptions.body = body; + } + + const { body: result } = await $.httpRequest(requestOptions); + return result; + } + async task_usefinfo() { + let result = await this.taskRequest("post", `https://app.yuebuy.cn/api/checkin/userinfo`, `is_simple=0`) + //console.log(options); + //console.log(result); + if (result) { + if (result.code == 1) { + this.ckStatus = true + $.log(`ID [${result.data.user_id}]当前金币[${result.data.coin}] 今日是否签到[${result.data.today_is_checkin == 1}]`) + if (result.data.today_is_checkin == 1) { + this.signStatus = true + } + } else { + this.ckStatus = false + $.log(JSON.stringify(result)); + } + } + + } + async task_sign() { + let result = await this.taskRequest("post", `https://app.yuebuy.cn/api/checkin/checkin`, ``) + //console.log(options); + //console.log(result); + if (result) { + if (result.code == 0) { + $.log(result.message) + } else { + $.log(result.message); + } + } + + } + async task_index() { + let result = await this.taskRequest("post", `https://app.yuebuy.cn/api/checkin/index`, ``) + //console.log(options); + //console.log(result); + if (result) { + if (result.code == 1) { + $.log(`获取任务列表` + result.message) + if (result.message == "Success") { + for (let index of result.data.task_data) { + if (index.title.indexOf("日常") != -1) { + for (let task of index.task_list) { + if (task.title.indexOf("浏览") != -1 || task.title.indexOf("分享") !== -1) { + $.log(`[${task.title}]任务状态[${task.is_finish == 1}]`) + if (task.is_finish == 0) { + $.log(`正在做任务[${task.title}]`) + await this.task_start(task.id) + } + } + } + } + } + } + } else { + $.log(JSON.stringify(result)); + } + } + } + async task_start(id) { + let result = await this.taskRequest("post", `https://app.yuebuy.cn/api/checkin/getTask`, `task_id=${id}`) + //console.log(options); + //console.log(result); + if (result) { + if (result.code == 1) { + $.log(`任务开始` + result.message) + if (result.message == "Success") { + await $.wait(16000) + await this.task_finish(result.data.task_sn) + } + } else { + $.log(JSON.stringify(result)); + } + } + //console.log(result.data); + + } + + async task_finish(sn) { + let result = await this.taskRequest("post", `https://app.yuebuy.cn/api/checkin/finishTask`, `task_sn=${sn}`) + //console.log(options); + //console.log(result); + if (result) { + if (result.code == 1) { + $.log(`任务完成` + result.message) + } else { + $.log(JSON.stringify(result)); + } + } + //console.log(result.data); + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + //从url获取参数组成json + 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] = decodeURIComponent(value); + }); + } + return params; + } + isJSONString(str) { + try { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t.headers['content-type']; + delete t.headers['content-length']; + delete t["body"] + } + if (t.method === 'post') { + let ContentType; + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + ContentType = 'application/json' + } else { + ContentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + ContentType = 'application/json'; + } + } + if (!t.headers['Content-Type']) { + t.headers['Content-Type'] = ContentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/backup/yyq.js b/backup/yyq.js new file mode 100644 index 0000000..803d32f --- /dev/null +++ b/backup/yyq.js @@ -0,0 +1,438 @@ +/** + * 悦野圈 + * cron 7 8 * * * yyq.js + * 23/04/14 签到 点赞 评论 分享 + * 23/11/26 删除 评论 分享 只做点赞和签到 + * 24/03/24 修复脚本失效问题 + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export yyq_new='Cookie#13111111 & Cookie#13111111' + * 变量名 yyq_new + * 抓包 https://customer.yueyequan.cn/ , 找到 headers中的 Cookie中 usersig的值#userid=后面的值 + * 多账号&或换行 或新建同名变量 + * 例如axxxxxxx#155511111 + * ==================================== + * + */ + + + +const $ = new Env("悦野圈"); +const ckName = "yyq_new"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const notify = $.isNode() ? require('../sendNotify') : ''; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let msg = ''; //let ck,msg +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + + //await notice() + console.log('\n================== 用户信息 ==================\n'); + taskall = []; + for (let user of userList) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.user_info()); + await $.wait(user.getRandomTime()); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + console.log('\n================== 签到 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.task_signIn()); + await $.wait(user.getRandomTime()); + } + } + await Promise.all(taskall); + //获取文章 + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.get_list()); + await $.wait(user.getRandomTime()); + } + //console.log(user.articleIdArr); + + } + console.log('\n================== 点赞 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + for (let o = 0; o < 5; o++) { + taskall.push(await user.task_like(user.articleIdArr[o])); + await $.wait(user.getRandomTime()); + } + } + } + await Promise.all(taskall); + + /*console.log('\n================== 评论 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + for (let o = 0; o < 5; o++) { + taskall.push(await user.task_add(user.articleIdArr[o])); + await $.wait(user.getRandomTime()); + } + } + } + await Promise.all(taskall);*/ + /*console.log('\n================== 分享 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + for (let o = 0; o < 5; o++) { + taskall.push(await user.task_share(user.articleIdArr[o])); + await $.wait(user.getRandomTime()); + } + } + } + await Promise.all(taskall);*/ + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('#')[0]; //单账号多变量分隔符 + //this.data1 = ck[0] + this.ckStatus = true + //this.userId = this.ck.match(/userid=(\S*);Path=\/;usersig=/)[1]; + this.userId = str.split('#')[1]; //单账号多变量分隔符; + this.headers = { + "User-Agent": "okhttp/4.2.0 (Android 10; Xiaomi MI 8 Lite Build/V11.0.2.0.QDTCNXM 2.12.0 21200 release baic-orv-app-android baicorvApp baic-orv-app-android)", + "appInfo": "{\"appVersion\":\"2.12.0\",\"osVersion\":\"Android 10\",\"appType\":\"Android\",\"deviceId\":\"76a9d22fc49aac9af4a7575488935928@1711269006040\",\"deviceName\":\"Xiaomi MI 8 Lite\"}", + "appTheme": "AQUA", + "Cookie": `userid=${this.userId};usersig=${this.ck};`, + "Cache-Control": "no-cache", + "Accept-Encoding": "identity", + "ice-auth-appkey": 9687643962, + + } + this.articleIdArr = [] + + } + getRandomTime() { + return randomInt(3000, 9000) + } + getSign(method, path, timestamp, data) { + let baseData + if (typeof data == 'object' && data !== null) { + data = "json=" + JSON.stringify(data) + } else { + data = data.toLowerCase() + + } + if (method == 'GET') { + + baseData = `${method}${path}ice-auth-appkey:9687643962ice-auth-timestamp:${timestamp}${data}9ee70cb717f382417d1404fca6df80fd` + } else { + baseData = `${method}${path}ice-auth-appkey:9687643962ice-auth-timestamp:${timestamp}${data}9ee70cb717f382417d1404fca6df80fd` + } + baseData = encodeURIComponent(baseData) + //console.log(baseData); + + return SHA256_Encrypt(baseData) + } + async user_info() { + try { + let options = { + url: `https://customer.yueyequan.cn/comu-core/v1.0/common/app/user/getMe?userId=${this.userId}`, + headers: this.headers + } + + options.headers['ice-auth-timestamp'] = ts13() + options.headers['ice-auth-sign'] = this.getSign('GET', '/comu-core/v1.0/common/app/user/getMe', ts13(), `userId=${this.userId}`) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 200) { + DoubleLog(`账号[${this.index}] 欢迎用户: ${result.data.nickName}`); + this.ckStatus = true + } else { + DoubleLog(`账号[${this.index}] 用户查询:失败 ❌ 了呢,原因未知!`); + this.ckStatus = false + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_signIn() { + try { + let options = { + url: `https://customer.yueyequan.cn/comu-mem/member/v1.0/common/app/user/signIn`, + headers: this.headers, + body: `userId=${this.userId}` + } + options.headers['Content-Type'] = 'application/x-www-form-urlencoded' + options.headers['ice-auth-timestamp'] = ts13() + options.headers['ice-auth-sign'] = this.getSign('POST', '/comu-mem/member/v1.0/common/app/user/signIn', ts13(), `userId=${this.userId}`) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 200) { + DoubleLog(`账号[${this.index}] 签到: [${result.msg}]`); + } else { + DoubleLog(`账号[${this.index}] 签到:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async get_list() { + try { + let options = { + url: `https://customer.yueyequan.cn/comu-core/v1/app/newPopular?pageSize=20&pageNum=1`, + headers: this.headers + } + options.headers['ice-auth-timestamp'] = ts13() + options.headers['ice-auth-sign'] = this.getSign('GET', '/comu-core/v1/app/newPopular', ts13(), 'pageSize=20pageNum=1') + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 200) { + for (let i = 0; i < 20; i++) { + this.articleIdArr.push(result.data.records[i].entity.id) + } + } else { + console.log(`获取文章失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_like(articleId) { + try { + let options = { + url: `https://customer.yueyequan.cn/comu-core/v1.0/creation/like`, + headers: this.headers, + body: JSON.stringify({ "entityId": `${articleId}`, "entityType": "002", "userId": `${this.userId}` }) + } + options.headers['Content-Type'] = 'application/json;charset=UTF-8' + options.headers['ice-auth-timestamp'] = ts13() + options.headers['ice-auth-sign'] = this.getSign('POST', '/comu-core/v1.0/creation/like', ts13(), { "entityId": articleId, "entityType": "002", "userId": this.userId }) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 200) { + DoubleLog(`账号[${this.index}] 点赞: [${result.msg}] [${articleId}]`); + } else { + DoubleLog(`账号[${this.index}] 点赞:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_add(articleId) { + try { + let txt = await hitokoto() + let options = { + url: `https://customer.yueyequan.cn/comu-core/v1.0/comment/addComment`, + headers: this.headers, + body: JSON.stringify({ "content": "" + txt + "" + + "", "parentId": "0", "targetName": "", "entityId": `${articleId}`, "entityType": "002", "source": "" }) + } + options.headers['Content-Type'] = 'application/json;charset=UTF-8' + options.headers['ice-auth-timestamp'] = ts13() + options.headers['ice-auth-sign'] = this.getSign('POST', '/comu-core/v1.0/comment/addComment', ts13(), `{"content":"加油","parentId":"0","targetName":"","entityId":${articleId},"entityType":"002","source":""}`) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 200) { + DoubleLog(`账号[${this.index}] 评论:[${result.msg}] [${articleId}]`); + } else { + DoubleLog(`账号[${this.index}] 评论:失败 ❌ 了呢,原因未知!`); console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_share(articleId) { + try { + let options = { + url: `https://customer.yueyequan.cn/comu-mem/member/v2/share`, + headers: this.headers, + body: JSON.stringify({ "id": `${articleId}`, "type": "4" }) + } + options.headers['Content-Type'] = 'application/json;charset=UTF-8' + options.headers['ice-auth-timestamp'] = ts13() + options.headers['ice-auth-sign'] = this.getSign('POST', '/comu-mem/member/v2/share', ts13(), `{"id":${articleId},"type":"4"}`) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 200) { + DoubleLog(`账号[${this.index}] 分享:[${result.msg}] [${articleId}]`); + } else { + DoubleLog(`账号[${this.index}] 分享:失败 ❌ 了呢,原因未知!`); console.log(result); + } + } catch (e) { + console.log(e); + } + } + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method) { + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + typeof JSON.parse(data) == 'object' ? data = JSON.parse(data) : data = data + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +/** + * 时间戳 13位 + */ +function ts13() { + return Math.round(new Date().getTime()).toString(); +} +function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); +} +async function notice() { + try { + let options = { + url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/api/main/notice.json`, + headers: { + 'User-Agent': '' + }, + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result) { + if ('notice' in result) { + DoubleLog(`${result.notice}`); + } else { + options.url = `https://gitee.com/smallfawn/api/raw/master/notice.json` + result = await httpRequest(options); + if ('notice' in result) { + DoubleLog(`${result.notice}`); + } + } + } else { + } + } catch (e) { + console.log(e); + } +} +async function hitokoto() { // 随机一言 + try { + let options = { + url: 'https://v1.hitokoto.cn/', + headers: {} + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + return result.hitokoto + } catch (error) { + console.log(error); + } +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +/** + * SHA256 加密 + */ +function SHA256_Encrypt(data) { + sha256_init(); + sha256_update(data, data.length); + sha256_final(); + return sha256_encode_hex(); +} +/* SHA256 logical functions */ function rotateRight(n, x) { return (x >>> n) | (x << (32 - n)); } function choice(x, y, z) { return (x & y) ^ (~x & z); } function majority(x, y, z) { return (x & y) ^ (x & z) ^ (y & z); } function sha256_Sigma0(x) { return rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x); } function sha256_Sigma1(x) { return rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x); } function sha256_sigma0(x) { return rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3); } function sha256_sigma1(x) { return rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10); } function sha256_expand(W, j) { return (W[j & 0x0f] += sha256_sigma1(W[(j + 14) & 0x0f]) + W[(j + 9) & 0x0f] + sha256_sigma0(W[(j + 1) & 0x0f])); } /* Hash constant words K: */ var K256 = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2); /* global arrays */ var ihash, count, buffer; var sha256_hex_digits = "0123456789abcdef"; /* Add 32-bit integers with 16-bit operations (bug in some JS-interpreters: overflow) */ function safe_add(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xffff); } /* Initialise the SHA256 computation */ function sha256_init() { ihash = new Array(8); count = new Array(2); buffer = new Array(64); count[0] = count[1] = 0; ihash[0] = 0x6a09e667; ihash[1] = 0xbb67ae85; ihash[2] = 0x3c6ef372; ihash[3] = 0xa54ff53a; ihash[4] = 0x510e527f; ihash[5] = 0x9b05688c; ihash[6] = 0x1f83d9ab; ihash[7] = 0x5be0cd19; } /* Transform a 512-bit message block */ function sha256_transform() { var a, b, c, d, e, f, g, h, T1, T2; var W = new Array(16); /* Initialize registers with the previous intermediate value */ a = ihash[0]; b = ihash[1]; c = ihash[2]; d = ihash[3]; e = ihash[4]; f = ihash[5]; g = ihash[6]; h = ihash[7]; /* make 32-bit words */ for (var i = 0; i < 16; i++) W[i] = buffer[(i << 2) + 3] | (buffer[(i << 2) + 2] << 8) | (buffer[(i << 2) + 1] << 16) | (buffer[i << 2] << 24); for (var j = 0; j < 64; j++) { T1 = h + sha256_Sigma1(e) + choice(e, f, g) + K256[j]; if (j < 16) T1 += W[j]; else T1 += sha256_expand(W, j); T2 = sha256_Sigma0(a) + majority(a, b, c); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); } /* Compute the current intermediate hash value */ ihash[0] += a; ihash[1] += b; ihash[2] += c; ihash[3] += d; ihash[4] += e; ihash[5] += f; ihash[6] += g; ihash[7] += h; } /* Read the next chunk of data and update the SHA256 computation */ function sha256_update(data, inputLen) { var i, index, curpos = 0; /* Compute number of bytes mod 64 */ index = (count[0] >> 3) & 0x3f; var remainder = inputLen & 0x3f; /* Update number of bits */ if ((count[0] += inputLen << 3) < inputLen << 3) count[1]++; count[1] += inputLen >> 29; /* Transform as many times as possible */ for (i = 0; i + 63 < inputLen; i += 64) { for (var j = index; j < 64; j++) buffer[j] = data.charCodeAt(curpos++); sha256_transform(); index = 0; } /* Buffer remaining input */ for (var j = 0; j < remainder; j++) buffer[j] = data.charCodeAt(curpos++); } /* Finish the computation by operations such as padding */ function sha256_final() { var index = (count[0] >> 3) & 0x3f; buffer[index++] = 0x80; if (index <= 56) { for (var i = index; i < 56; i++) buffer[i] = 0; } else { for (var i = index; i < 64; i++) buffer[i] = 0; sha256_transform(); for (var i = 0; i < 56; i++) buffer[i] = 0; } buffer[56] = (count[1] >>> 24) & 0xff; buffer[57] = (count[1] >>> 16) & 0xff; buffer[58] = (count[1] >>> 8) & 0xff; buffer[59] = count[1] & 0xff; buffer[60] = (count[0] >>> 24) & 0xff; buffer[61] = (count[0] >>> 16) & 0xff; buffer[62] = (count[0] >>> 8) & 0xff; buffer[63] = count[0] & 0xff; sha256_transform(); } /* Split the internal hash values into an array of bytes */ function sha256_encode_bytes() { var j = 0; var output = new Array(32); for (var i = 0; i < 8; i++) { output[j++] = (ihash[i] >>> 24) & 0xff; output[j++] = (ihash[i] >>> 16) & 0xff; output[j++] = (ihash[i] >>> 8) & 0xff; output[j++] = ihash[i] & 0xff; } return output; } /* Get the internal hash as a hex string */ function sha256_encode_hex() { var output = new String(); for (var i = 0; i < 8; i++) { for (var j = 28; j >= 0; j -= 4) output += sha256_hex_digits.charAt((ihash[i] >>> j) & 0x0f); } return output; } +// 完整 Env +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) } diff --git a/backup/zhiwuxingqiu.js b/backup/zhiwuxingqiu.js new file mode 100644 index 0000000..9b9cbd9 --- /dev/null +++ b/backup/zhiwuxingqiu.js @@ -0,0 +1,269 @@ +/** + * 植物星球 + * cron "30 9 * * *" zwxq.js + * 注册:https://www.pftp2012.com + * export zwxq= 账号&密码 多账号换行或者#分隔 + */ +// ============================================================================================================ +const $ = new Env('植物星球') +const axios = require('axios') +const md5 = require('md5') +const env_name = 'zwxq' //环境变量名字 +const env = process.env[env_name] || '' //获取环境变量 +const Notify = 1//是否通知, 1通知, 0不通知. 默认通知 +const debug = 0//是否调试, 1调试, 0不调试. 默认不调试 +let scriptVersionNow = "1.0.0";//脚本版本号 +let msg = ""; +// ==================================异步顺序============================================================================== +!(async () => { + //await getNotice(); //远程通知 + await main();//主函数 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +//==================================脚本入口函数main()============================================================== +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}`) + return + } + let user_ck = env.split('\n') + DoubleLog(`\n========== 共找到 ${user_ck.length} 个账号 ==========`); + let index = 1 //用来给账号标记序号, 从1开始 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + let ck_info = ck.split('&') + let userName = ck_info[0] + let userPwd = ck_info[1] + let user = { + index: index, + userName, + userPwd, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + await userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`账号[${user.index}]随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +// ======================================开始任务========================================= +async function userTask(user) { + console.log(`\n============= 账号[${user.index}]开始任务 =============`) + let ck = await Login(user) + await wait(1) + //console.log(ck); + await Sign(user, ck) + await wait(1) + await mission(user, '10', ck) + await wait(1) + await mission(user, '60', ck) +} +// ============================================================================================================================= +//登入 +async function Login(user) { + try { + let userPwd = md5(user.userPwd); + let urlObject = { + method: 'post', + url: `https://api.pftp2012.com/api/Member/Login`, + headers: { + 'Host': 'api.pftp2012.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + userName: user.userName, + userPwd: userPwd, + keepAlive: true, + channel: 10, + } + }; + //console.log(urlObject); + let { data: result } = await axios.request(urlObject) + //let Token = result.Data.MemberInfo.Token; + //console.log(result); + if (result?.Data) { + //打印签到结果 + DoubleLog(`🌸账号[${result.Data.MemberInfo.MemberName}]` + `🕊登入成功-当前[${result.Data.MemberInfo.MemberPollen}]积分🎉`); + } else { + DoubleLog(`🌸账号[${user.index}]登入-失败:${result.Msg}❌`) + } + return result.Data.MemberInfo.Token; + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e); + } +} +//签到 +async function Sign(user, Token) { + try { + let urlObject = { + method: 'get', + url: `https://api.pftp2012.com/api/Member/SignIn?channel=10`, + headers: { + 'Host': 'api.pftp2012.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': 'Bearer' + ' ' + Token, + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + } + // + let { data: result } = await axios.request(urlObject) + //console.log(urlObject); + //console.log(result); + if (result.Status == 100) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]🕊签到成功-获得${result.Data.PollenNum}积分-连续签到${result.Data.ContinuouNum}天🎉`); + } else { + DoubleLog(`🌸账号[${user.index}]🕊签到:${result.Msg}❌`) + } + } catch (e) { + //打印错误信息 + console.log(e); + } +} +//任务 +async function mission(user, id, Token) { + try { + let urlObject = { + method: 'post', + url: `https://api.pftp2012.com/api/Member/CompleteMemberMission`, + headers: { + 'Host': 'api.pftp2012.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Authorization': 'Bearer' + ' ' + Token, + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + type: id, + channel: 40, + } + } + // + let { data: result } = await axios.request(urlObject) + //console.log(urlObject); + //console.log(result); + if (result?.Status == '100') { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊浏览任务id:${id}成功,获得${result.Data}积分🎉`); + } else { + DoubleLog(`🌸账号[${user.index}]浏览任务失败:${result.Msg}❌`) + } + } catch (e) { + //打印错误信息 + console.log(e.response.data); + } +} +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("../sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} +/** +* ======================================================随机等待 1-5 秒============================================ +*/ +function sjwait() { + return new Promise(function (resolve) { + let waitTime = Math.floor(Math.random() * 4000 + 1000); + setTimeout(resolve, waitTime); + }); +} +// ==========================================================13位时间戳===================================================== +function getTimestamp() { + return new Date().getTime(); +} +//===============================================网络请求httpRequest========================================= +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//==============================================Debug模式=============================================== +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "https://tfapi.cn/tl.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:24-08-09 newAdd:DoubleLog & SendMsg diff --git a/backup/zstjjsb.js b/backup/zstjjsb.js new file mode 100644 index 0000000..21c3679 --- /dev/null +++ b/backup/zstjjsb.js @@ -0,0 +1,243 @@ +/** + * new Env("掌上天津极速版") + * cron 5 15 * * * zstjjsb.js + * Show: + * 变量名:zstjjsb_data + * 变量值:http://bbs.zaitianjin.net/zstj/v2.8/index.php 请求body(txt)中 => userId的值&salf的值 + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("掌上天津极速版"); +const ckName = "zstjjsb_data"; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = '&'; //多变量分隔符 +const CryptoJS = require("crypto-js") +let scriptVersionNow = "0.0.1"; + + +let msg = ""; + + +async function start() { + //await getVersion("smallfawn/QLScriptPublic@main/zstjjsb.js"); + //await getNotice(); + + let taskall = []; + for (let user of $.userList) { + if (user.ckStatus) { + taskall.push(await user.task()); + $.DoubleLog(`等待10s`) + await $.wait(10000); + } + } + await Promise.all(taskall); +} + +class UserInfo { + constructor(str) { + this.index = ++$.userIdx; + this.userId = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.salf = str.split(strSplitor)[1]; + this.ckStatus = true; + } + async task() { + $.DoubleLog(`------ 第[${this.index}]个账号 ------`) + await this.sign_info() + } + encode(str) { + //var b = new Buffer(str); + var b = Buffer.from(str); + var s = b.toString('base64'); + var s = s.replace(/\//g, '_') + return s + } + getmac() { + var mac = ""; + for (var i = 0; i < 6; i++) { + var randomByte = Math.floor(Math.random() * 256); + var hexString = randomByte.toString(16).toUpperCase(); + mac += (hexString.length === 1 ? "0" + hexString : hexString) + ":"; + } + mac = mac.slice(0, -1); // 去掉最后一个冒号 + return mac; + } + async sign_info() { + let timestamp = Math.round(new Date().getTime() / 1000).toString(); + let macs = this.getmac() + let mac = encodeURIComponent(macs) + let s = 'brand=OPPO&client=android&deviceInfo=OPPO_PCAM00_2021040100_10&interfaceVersion=v2.8&lat=30.1&lng=114.2&mac=' + macs + '&model=PCAM00&privacyStatus=1®ion=天津市&salf=' + this.salf + '×tamp=' + timestamp + '&uid=' + this.userId + '&userId=' + this.userId + '&version=2.8.4&versionCode=154' + s = this.encode(s) + let signs = CryptoJS.HmacSHA1(s, '1s_vsegymTasdgKxiKvRz5vDlyzmc92A_H6A8zg6I').toString().toUpperCase() + try { + let options = { + method: 'POST', + url: 'http://bbs.zaitianjin.net/zstj/v2.8/index.php', + headers: { + 'Content-Yype': 'application/x-www-form-urlencoded', + 'Host': 'bbs.zaitianjin.net', + 'Connection': 'Keep-Alive', + 'Accept-Encoding': 'gzip', + 'User-Agent': 'okhttp/4.9.3' + }, + body: 'c=User&lng=114.2&privacyStatus=1&sign=' + signs + '&interfaceVersion=v2.8&version=2.8.4&userId=' + this.userId + '&m=signInfo&mac=' + mac + '&versionCode=154&deviceInfo=OPPO_PCAM00_2021040100_10&uid=' + this.userId + '&client=android&model=PCAM00®ion=%E5%A4%A9%E6%B4%A5%E5%B8%82&salf=' + this.salf + '&brand=OPPO&lat=30.1×tamp=' + timestamp + }, result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号[${this.index}] 签到天数: ${result["data"]["signDays"]}🎉`); + $.DoubleLog(`账号[${this.index}] 累计签到天数: ${result["data"]["signAllDays"]}`) + $.DoubleLog(`账号[${this.index}] 今日是否签到: ${result["data"]["signStatue"]}`) + $.DoubleLog(`账号[${this.index}] 连续签到7天奖励: ${result["data"]["signData"]}`) + if (result["data"]["signStatue"] == false) { + await this.sign() + } + } else { + $.DoubleLog(`账号[${this.index}] 失败 ❌`); + //console.log(options); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async sign() { + let timestamp = Math.round(new Date().getTime() / 1000).toString(); + let macs = this.getmac() + let mac = encodeURIComponent(macs) + let s = 'brand=OPPO&client=android&deviceInfo=OPPO_PCAM00_2021040100_10&interfaceVersion=v2.8&lat=30.1&lng=114.2&mac=' + macs + '&model=PCAM00&privacyStatus=1®ion=天津市&salf=' + this.salf + '×tamp=' + timestamp + '&uid=' + this.userId + '&userId=' + this.userId + '&version=2.8.4&versionCode=154' + s = this.encode(s) + let signs = CryptoJS.HmacSHA1(s, '1s_vsegymTasdgKxiKvRz5vDlyzmc92A_H6A8zg6I').toString().toUpperCase() + try { + let options = { + method: 'POST', + url: 'http://bbs.zaitianjin.net/zstj/v2.8/index.php', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'Host': 'bbs.zaitianjin.net', + 'Connection': 'Keep-Alive', + 'Accept-Encoding': 'gzip', + 'User-Agent': 'okhttp/4.9.3' + }, + body: 'c=Credit&lng=114.2&privacyStatus=1&sign=' + signs + '&interfaceVersion=v2.8&version=2.8.4&userId=' + this.userId + '&m=sign&mac=' + mac + '&versionCode=154&deviceInfo=OPPO_PCAM00_2021040100_10&uid=' + this.userId + '&client=android&model=PCAM00®ion=%E5%A4%A9%E6%B4%A5%E5%B8%82&salf=' + this.salf + '&brand=OPPO&lat=30.1×tamp=' + timestamp + + }, result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号[${this.index}] 签到成功🎉`); + } else { + $.DoubleLog(`账号[${this.index}] 签到:失败 ❌ `); + //console.log(options); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } +} + +!(async () => { + if (!(await checkEnv())) return; + if ($.userList.length > 0) { + await start(); + } await $.SendMsg(msg); +})().catch((e) => console.log(e)).finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + //let userCount = 0; + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && $.userList.push(new UserInfo(n)); + //userCount = $.userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${$.userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method = null) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + if (err) { + //console.log(resp) + console.log(`${method}请求失败`); + $.logErr(err); + } else { + //console.log(resp) + //console.log(data) + if (data) { + try { data = JSON.parse(data); } catch (error) { } + resolve(data); + } else { + console.log(`请求api返回数据为空,请检查自身原因`); + } + } + resolve(); + }); + }); +} +/** + * 获取远程版本 + */ +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} +/** + * 获取远程通知 + */ +async function getNotice() { + try { + const urls = [ + "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://gcore.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", + "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json", + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +// ==================== API ==================== // +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/baitianGame.js b/baitianGame.js new file mode 100644 index 0000000..34aad3a --- /dev/null +++ b/baitianGame.js @@ -0,0 +1,263 @@ +/** + * cron 44 14 * * * baitianGame.js + * Show:完成每日做任务和积分抢购(兑换) + * //多账号分隔符 换行 或者 @ + * 变量名:baitianGameCookie + * 变量值:http://www.100bt.com/m/creditMall/?gameId=2#home 网页的cookie 随便找个商品兑换抓http://service.100bt.com/creditmall/ + * 请求头Header cookie 全部 + * scriptVersionNow = "0.0.1"; + * + 兑换ID + 配置文件 export baitianExchangeId=0 不用引号 0代表兑换塔罗牌*1套 不写变量默认不兑换 + //时序残响塔罗牌*1套 0 + //奥奇传说餐具盒*1 1 + //奥拉毛绒亚比球(随机款)*1 2 + //1奥币 3 + //小精灵白色毛绒包*1 4 + //奥比岛软糯抱抱熊*1 5 + //赤月毛绒公仔 6 + //奥比岛PU皮潮流挎包 7 + //奥比岛小精灵毛绒公仔 8 + //时序残响天文台套装*1 9 + //奥奇毛绒眼罩(随机款)*1 10 + //奥奇手游小诺捏捏团*1 11 + //"奥比岛幸运按摩捶*1" 12 + //"奥拉星女仆咖啡立牌*1套", 13 + //"时序残响方形炫酷徽章*1" 14 + //"奥比岛爱心抱枕*1" 15 + //"奥比岛多彩明信片*5" 16 + //"奥奇传说手游明信片*3", 17 + //"奥奇阿修公仔*1" 18 + //"时序残响角色立牌*1" 19 + //"奥奇传说束口袋*1" 20 + // "奥拉星手游兑换码", 21 + //"食物语手游精美书签*5" 22 + // "食物语精美贴纸*1" 23 + // "奥拉星页游礼包" 24. + //"奥奇页游礼包", 25 + //"10奥币"26 + //"奥比岛页游礼包" 27 + //"奥拉星战斗卡牌*1" 28 + //"奥雅页游礼包" 29 + //"30奥币" 30 + */ + +const $ = new Env("100bt百田游戏"); +const notify = $.isNode() ? require("./sendNotify") : ""; +let ckName = "baitianGameCookie"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.taskIdList = []; + } + async main() { + $.log(`正在做任务请耐心等待`); + await this.do_list() + if (this.taskIdList.length > 0) { + console.log(this.taskIdList) + for (let taskId of this.taskIdList) { + console.log(`正在做[${taskId.taskName}]任务`) + await $.wait(10000); + await this.do_task(taskId.taskId); + } + } + + if (process.env["baitianExchangeId"]) { + await this.do_exchange(process.env["baitianExchangeId"]); + } + } + async do_list() { + let expando = "jQuery" + ("1.8.3" + Math.random()).replace(/\D/g, ""); + let time1 = new Date().getTime(); + let time2 = new Date().getTime(); + try { + let options = { + fn: "任务列表查询", + method: "get", + url: `http://service.100bt.com/creditmall/activity/daily_task_list.jsonp??callback=${expando}_${time1}&gameId=2&_=${time2}`, + headers: { + Accept: "*/*", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + Cookie: this.ck, + Host: "service.100bt.com", + "Proxy-Connection": "keep-alive", + Referer: "http://www.100bt.com/", + "User-Agent": + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0", + }, + }; + let { body: result } = await httpRequest(options); + //console.log(options); + //result = JSON.parse(result); + result = result.replace(`${expando}_${time1}`, "") + result = result.replace(`(`, "") + result = result.replace(`)`, "") + result = JSON.parse(result) + if (result.jsonResult.code == "0") { + for (let taskId of result.jsonResult.data) { + if (taskId.status == "0") { + this.taskIdList.push({ taskName: taskId.name, taskId: taskId.taskID }) + } + } + } + } catch (e) { + console.log(e); + } + } + async do_task(taskId) { + //taskId=100 签到 + //"taskID": 191, 奥拉星招募 + //"taskID": 187, 预约奥拉星2手游 + //"taskID": 185, 测测你的额外1小时 + // "taskID": 188, 进入亚比概念站 + //"taskID": 22每日查看最新预告 + let expando = "jQuery" + ("1.8.3" + Math.random()).replace(/\D/g, ""); + let time1 = new Date().getTime(); + let time2 = new Date().getTime(); + try { + let options = { + fn: "做任务", + method: "get", + url: `http://service.100bt.com/creditmall/activity/do_task.jsonp?callback=${expando}_${time1}&taskId=${taskId}&gameId=2&_=${time2}`, + headers: { + Accept: "*/*", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + Cookie: this.ck, + Host: "service.100bt.com", + "Proxy-Connection": "keep-alive", + Referer: "http://www.100bt.com/", + "User-Agent": + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0", + }, + }; + let { body: result } = await httpRequest(options); + //console.log(options); + //result = JSON.parse(result); + result = result.replace(`${expando}_${time1}`, "") + result = result.replace(`(`, "") + result = result.replace(`)`, "") + result = JSON.parse(result) + $.log(JSON.stringify(result.jsonResult.message)); + + } catch (e) { + console.log(e); + } + } + + async do_exchange(pageIndex) { + let expando = "jQuery" + ("1.8.3" + Math.random()).replace(/\D/g, ""); + let time1 = new Date().getTime(); + let time2 = new Date().getTime(); + try { + let options = { + fn: "兑换", + method: "get", + url: `http://service.100bt.com/creditmall/mall/page.jsonp?callback=${expando}_${time1}&pageIndex=${pageIndex}&pageSize=1&orderBy=1&_=${time2}`, + headers: { + Accept: "*/*", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6", + Cookie: this.ck, + Host: "service.100bt.com", + "Proxy-Connection": "keep-alive", + Referer: "http://www.100bt.com/", + "User-Agent": + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0", + }, + }; + let { body: result } = await httpRequest(options); + //console.log(options); + //result = JSON.parse(result); + $.log(JSON.stringify(result)); + } catch (e) { + console.log(e); + } + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg($.logs.join("\n")); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options) { + if (!options["method"]) { + return console.log(`请求方法不存在`); + } + if (!options["fn"]) { + console.log(`函数名不存在`); + } + return new Promise((resolve) => { + $[options.method](options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + try { + resp = JSON.parse(resp); + } catch (error) { } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(resp); + } + }); + }); +} +async function SendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message); + } else { + $.msg($.name, "", message); + } +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/bjxd.py b/bjxd.py new file mode 100644 index 0000000..fcaca1a --- /dev/null +++ b/bjxd.py @@ -0,0 +1,641 @@ +""" +北京现代 APP 自动任务脚本 +功能:自动完成签到、浏览文章、每日答题等任务 +new Env("北京现代") +cron: 25 6 * * * + +环境变量: + BJXD_DEVICE 安卓写android 苹果IOS写iOS + BJXD: str - 北京现代 APP api token (多个账号用英文逗号分隔,建议每个账号一个变量) + BJXD1/BJXD2/BJXD3: str - 北京现代 APP api token (每个账号一个变量) + BJXD_ANSWER: str - 预设答案 (可选, ABCD 中的一个) + HUNYUAN_API_KEY: str - 腾讯混元AI APIKey (可选) + +""" + +import os +import random +import time +from datetime import datetime +from typing import List, Dict, Any +import requests +from urllib3.exceptions import InsecureRequestWarning, InsecurePlatformWarning + +# 禁用 SSL 警告 +requests.packages.urllib3.disable_warnings(InsecureRequestWarning) +requests.packages.urllib3.disable_warnings(InsecurePlatformWarning) + + +class BeiJingHyundai: + """北京现代APP自动任务类""" + + # 基础配置 + NAME = "北京现代 APP 自动任务" + BASE_URL = "https://bm2-api.bluemembers.com.cn" + + # API endpoints + API_USER_INFO = "/v1/app/account/users/info" + API_MY_SCORE = "/v1/app/user/my_score" + API_TASK_LIST = "/v1/app/user/task/list" + API_SIGN_LIST = "/v1/app/user/reward_list" + API_SIGN_SUBMIT = "/v1/app/user/reward_report" + API_ARTICLE_LIST = "/v1/app/white/article/list2" + API_ARTICLE_DETAIL = "/v1/app/white/article/detail_app/{}" + API_ARTICLE_SCORE_SUBMIT = "/v1/app/score" + API_QUESTION_INFO = "/v1/app/special/daily/ask_info" + API_QUESTION_SUBMIT = "/v1/app/special/daily/ask_answer" + + # 预设的备用 share_user_hid 列表 + BACKUP_HIDS = [ + "a6688ec1a9ee429fa7b68d50e0c92b1f", + "bb8cd2e44c7b45eeb8cc5f7fa71c3322", + "5f640c50061b400c91be326c8fe0accd", + "55a5d82dacd9417483ae369de9d9b82d", + ] + + def __init__(self): + """初始化实例变量""" + self.token: str = "" # 当前用户token + self.user: Dict[str, Any] = {} # 当前用户信息 + self.users: List[Dict[str, Any]] = [] # 所有用户信息列表 + self.correct_answer: str = "" # 正确答案 + self.preset_answer: str = "" # 预设答案 + self.ai_api_key: str = "" # 腾讯混元AI APIKey + self.wrong_answers: set = set() # 错误答案集合 + self.log_content: str = "" # 日志内容 + + def log(self, content: str, print_to_console: bool = True) -> None: + """添加日志""" + if print_to_console: + print(content) + self.log_content += content + "\n" + + def push_notification(self) -> None: + """推送通知""" + try: + QLAPI.notify(self.NAME, self.log_content) + except NameError: + print(f"\n\n🚀 推送通知\n\n{self.NAME}\n\n{self.log_content}") + + def make_request(self, method: str, endpoint: str, **kwargs) -> Dict[str, Any]: + """ + 发送API请求 + Args: + method: 请求方法 (GET/POST) + endpoint: API端点 + **kwargs: 请求参数 + Returns: + Dict[str, Any]: API响应数据 + """ + url = f"{self.BASE_URL}{endpoint}" + headers = {"token": self.token, "device": os.getenv("BJXD_DEVICE", "android")} + if "headers" not in kwargs: + kwargs["headers"] = headers + else: + kwargs["headers"].update(headers) + try: + response = requests.request(method, url, **kwargs) + response.raise_for_status() + return response.json() + except requests.exceptions.RequestException as e: + self.log(f"❌ API request failed: {str(e)}") + return {"code": -1, "msg": str(e)} + + def get_user_info(self) -> Dict[str, Any]: + """ + 获取用户信息 + Returns: + Dict[str, Any]: 用户信息字典,获取失败返回空字典 + """ + response = self.make_request("GET", self.API_USER_INFO) + print(f"get_user_info API response ——> {response}") + + if response["code"] == 0: + data = response["data"] + # 直接生成掩码后的手机号 + masked_phone = f"{data['phone'][:3]}******{data['phone'][-2:]}" + return { + "token": self.token, + "hid": data["hid"], + "nickname": data["nickname"], + "phone": masked_phone, # 直接存储掩码后的手机号 + "score_value": data["score_value"], + "share_user_hid": "", + "task": {"sign": False, "view": False, "question": False}, + } + + self.log(f"❌ 账号已失效, 请重新获取 token: {self.token}") + return {} + + def get_score_details(self) -> None: + """显示积分详情,包括总积分、今日变动和最近记录""" + params = {"page_no": "1", "page_size": "10"} # 获取最近10条记录 + response = self.make_request("GET", self.API_MY_SCORE, params=params) + print(f"get_score_details API response ——> {response}") + + if response["code"] == 0: + data = response["data"] + # 先获取今日记录 + today = datetime.now().strftime("%Y-%m-%d") + today_records = [ + record + for record in data["points_record"]["list"] + if record["created_at"].startswith(today) + ] + + # 计算今日积分变化 + today_score = sum( + int(record["score_str"].strip("+")) for record in today_records + ) + today_score_str = f"+{today_score}" if today_score > 0 else str(today_score) + self.log(f"🎉 总积分: {data['score']} | 今日积分变动: {today_score_str}") + + # 输出今日积分记录 + if today_records: + self.log("今日积分记录:") + for record in today_records: + self.log( + f"{record['created_at']} {record['desc']} {record['score_str']}" + ) + else: + self.log("今日暂无积分变动") + + # 任务相关 + def check_task_status(self, user: Dict[str, Any]) -> None: + """检查任务状态""" + response = self.make_request("GET", self.API_TASK_LIST) + print(f"get_task_status API response ——> {response}") + + if response["code"] != 0: + self.log(f'❌ 获取任务列表失败: {response["msg"]}') + return + + actions = response.get("data", {}) + + # 检查签到任务 + if "action4" in actions: + user["task"]["sign"] = actions["action4"].get("status") == 1 + else: + self.log("❌ task list action4 签到任务 不存在") + + # 检查浏览文章任务 + if "action12" in actions: + user["task"]["view"] = actions["action12"].get("status") == 1 + else: + self.log("❌ task list action12 浏览文章任务 不存在") + + # 检查答题任务 + if "action39" in actions: + user["task"]["question"] = actions["action39"].get("status") == 1 + else: + self.log("❌ task list action39 答题任务 不存在") + + # 签到相关 + def get_sign_info(self) -> None: + """执行签到任务""" + max_attempts = 5 # 最大尝试次数 + best_score = 0 + best_params = None + + for attempt in range(max_attempts): + response = self.make_request("GET", self.API_SIGN_LIST) + print(f"get_sign_info (attempt {attempt + 1}) API response ——> {response}") + + if response["code"] != 0: + self.log(f'❌ 获取签到列表失败: {response["msg"]}') + break + + data = response["data"] + hid = data["hid"] + reward_hash = data["rewardHash"] + + for item in data["list"]: + if item["hid"] == hid: + current_score = item["score"] + print( + f"第{attempt + 1}次获取签到列表: score={current_score} hid={hid} rewardHash={reward_hash}" + ) + + if current_score > best_score: + best_score = current_score + best_params = (hid, reward_hash, current_score) + print(f"当前可获得签到积分: {best_score}") + break + + if attempt < max_attempts - 1: # 不是最后一次循环 + print(f"继续尝试获取更高积分, 延时5-10s") + time.sleep(random.randint(5, 10)) + else: # 最后一次循环 即将提交签到 + print(f"即将提交签到, 延时3-4s") + time.sleep(random.randint(3, 4)) + + if best_params: + self.submit_sign(*best_params) + else: + self.log("❌ 未能获取到有效的签到参数") + + def submit_sign(self, hid: str, reward_hash: str, score: int) -> None: + """提交签到""" + json_data = { + "hid": hid, + "hash": reward_hash, + "sm_deviceId": "", + "ctu_token": None, + } + response = self.make_request("POST", self.API_SIGN_SUBMIT, json=json_data) + print(f"submit_sign API response ——> {response}") + + if response["code"] == 0: + self.log(f"✅ 签到成功 | 积分 +{score}") + else: + self.log(f'❌ 签到失败: {response["msg"]}') + + # 文章浏览相关 + def get_article_list(self) -> List[str]: + """获取文章列表""" + params = { + "page_no": "1", + "page_size": "20", + "type_hid": "", + } + response = self.make_request("GET", self.API_ARTICLE_LIST, params=params) + print(f"get_article_list API response ——> {response}") + + if response["code"] == 0: + # 从文章列表中随机选择3个ID + article_list = [item["data_id"] for item in response["data"]["list"]] + return random.sample(article_list, min(3, len(article_list))) + + self.log(f'❌ 获取文章列表失败: {response["msg"]}') + return [] + + def get_article_detail(self, article_id: str) -> None: + """浏览文章""" + self.log(f"浏览文章 article_id: {article_id}") + endpoint = self.API_ARTICLE_DETAIL.format(article_id) + self.make_request("GET", endpoint) + + def submit_article_score(self) -> None: + """提交文章积分""" + json_data = { + "ctu_token": "", + "action": 12, + } + response = self.make_request( + "POST", self.API_ARTICLE_SCORE_SUBMIT, json=json_data + ) + print(f"submit_article_score API response ——> {response}") + + if response["code"] == 0: + score = response["data"]["score"] + self.log(f"✅ 浏览文章成功 | 积分 +{score}") + else: + self.log(f'❌ 浏览文章失败: {response["msg"]}') + + # 答题相关 + def get_question_info(self, share_user_hid: str) -> None: + """执行答题任务""" + params = {"date": datetime.now().strftime("%Y%m%d")} + response = self.make_request("GET", self.API_QUESTION_INFO, params=params) + print(f"get_question_info API response ——> {response}") + if response["code"] != 0: + self.log(f'❌ 获取问题失败: {response["msg"]}') + return + # response['data']['state'] 1=表示未答题 2=已答题且正确 3=答错且未有人帮忙答题 4=答错但有人帮忙答题 + if response["data"].get("state") == 3: + self.log("今日已答题但回答错误,当前无人帮助答题,跳过") + return + if response["data"].get("state") != 1: + if response["data"].get("answer"): + answer = response["data"]["answer"][0] + if answer in ["A", "B", "C", "D"]: + self.correct_answer = answer + self.log(f"今日已答题,跳过,答案:{answer}") + return + self.log("今日已答题,但未获取到答案,跳过") + return + + question_info = response["data"]["question_info"] + questions_hid = question_info["questions_hid"] + + # 构建问题字符串,只包含未被标记为错误的选项 + question_str = f"{question_info['content']}\n" + valid_options = [] + for option in question_info["option"]: + if option["option"] not in self.wrong_answers: + valid_options.append(option) + question_str += f'{option["option"]}. {option["option_content"]}\n' + else: + print(f"跳过错误选项 {option['option']}. {option['option_content']}") + + print(f"\n问题详情:\n{question_str}") + + # 如果只剩一个选项,直接使用 + if len(valid_options) == 1: + answer = valid_options[0]["option"] + self.log(f"仅剩一个选项,使用答案: {answer}") + time.sleep(random.randint(3, 5)) + self.submit_question_answer(questions_hid, answer, share_user_hid) + return + + # 获取答案并提交 + answer = self.get_question_answer(question_str) + + time.sleep(random.randint(3, 5)) + self.submit_question_answer(questions_hid, answer, share_user_hid) + + def get_ai_answer(self, question: str) -> str: + """获取AI答案""" + headers = { + "Authorization": f"Bearer {self.ai_api_key}", + "Content-Type": "application/json", + } + prompt = f"你是一个专业的北京现代汽车专家,请直接给出这个单选题的答案,并且不要带'答案'等其他内容。\n{question}" + json_data = { + "model": "hunyuan-turbo", + "messages": [{"role": "user", "content": prompt}], + "enable_enhancement": True, + "force_search_enhancement": True, + "enable_instruction_search": True, + } + + try: + response = requests.post( + "https://api.hunyuan.cloud.tencent.com/v1/chat/completions", + headers=headers, + json=json_data, + ) + response.raise_for_status() + response_json = response.json() + print(f"腾讯混元AI API response ——> {response_json}") + + # 获取AI回答内容并转大写 + ai_response = response_json["choices"][0]["message"]["content"].upper() + + # 使用集合操作找出有效答案 + valid_answers = set("ABCD") - self.wrong_answers + found_answers = set(ai_response) & valid_answers + + # 如果找到答案则返回其中一个 + if found_answers: + return found_answers.pop() + else: + print(f"❌ 没有找到符合的 AI 答案") + return "" + + except Exception as e: + print(f"腾讯混元AI API 请求失败: {str(e)}") + + return "" + + def get_question_answer(self, question: str) -> str: + """获取答题答案""" + # 1. 存在正确答案时,使用正确答案 + if self.correct_answer: + self.log(f"使用历史正确答案: {self.correct_answer}") + return self.correct_answer + + # 2. 存在预设答案时,使用预设答案 + if self.preset_answer: + self.log(f"使用预设答案: {self.preset_answer}") + return self.preset_answer + + # 3. 存在AI APIKey时,使用AI答案 + if self.ai_api_key: + ai_answer = self.get_ai_answer(question) + if ai_answer: + self.log(f"使用AI答案: {ai_answer}") + return ai_answer + + # 4. 随机选择答案(排除错误答案) + answer = self.get_random_answer() + self.log(f"随机答题,答案: {answer}") + return answer + + def get_random_answer(self) -> str: + """获取随机答案,排除已知错误答案""" + available_answers = set(["A", "B", "C", "D"]) - self.wrong_answers + if not available_answers: + self.wrong_answers.clear() + available_answers = set(["A", "B", "C", "D"]) + return random.choice(list(available_answers)) + + def get_answered_question(self) -> None: + """从已答题账号获取答案""" + params = {"date": datetime.now().strftime("%Y%m%d")} + response = self.make_request("GET", self.API_QUESTION_INFO, params=params) + print(f"get_answered_question API response ——> {response}") + if response["code"] != 0: + self.log(f'❌ 从已答题账号获取问题失败: {response["msg"]}') + return + # response['data']['state'] 1=表示未答题 2=已答题且正确 4=已答题但错误 + if response["code"] == 0 and response["data"].get("answer"): + answer = response["data"]["answer"][0] + if answer in ["A", "B", "C", "D"]: + self.correct_answer = answer + self.log(f"从已答题账号获取到答案:{answer}") + return + self.log("从已答题账号获取答案失败") + + def submit_question_answer( + self, question_id: str, answer: str, share_user_hid: str + ) -> None: + """提交答题答案""" + json_data = { + "answer": answer, + "questions_hid": question_id, + "ctu_token": "", + } + if share_user_hid: + json_data["date"] = datetime.now().strftime("%Y%m%d") + json_data["share_user_hid"] = share_user_hid + + response = self.make_request("POST", self.API_QUESTION_SUBMIT, json=json_data) + print(f"submit_question_answer API response ——> {response}") + + if response["code"] == 0: + data = response["data"] + if data["state"] == 3: # 答错 + # 记录错误答案 + self.wrong_answers.add(answer) + # 如果是正确答案,清除它 + if self.correct_answer == answer: + self.correct_answer = "" + # 如果是预设答案,清除它 + if self.preset_answer == answer: + self.preset_answer = "" + self.log("❌ 答题错误") + elif data["state"] == 2: # 答对了 + if self.correct_answer != answer: + self.correct_answer = answer + score = data["answer_score"] + self.log(f"✅ 答题正确 | 积分 +{score}") + else: + self.log(f'❌ 答题失败: {response["msg"]}') + + def get_backup_share_hid(self, user_hid: str) -> str: + """从备用 hid 列表中获取一个不同于用户自身的 hid""" + available_hids = [hid for hid in self.BACKUP_HIDS if hid != user_hid] + return random.choice(available_hids) if available_hids else "" + + def run(self) -> None: + """运行主程序""" + # 使用列表保持顺序,使用集合实现去重 + tokens = [] + tokens_set = set() + + # 方式1: 从BJXD环境变量获取(逗号分隔的多个token) + token_str = os.getenv("BJXD") + if token_str: + # 过滤空值并保持顺序添加 + for token in token_str.split(","): + token = token.strip() + if token and token not in tokens_set: + tokens.append(token) + tokens_set.add(token) + + # 方式2: 从BJXD1/BJXD2/BJXD3等环境变量获取 + i = 1 + empty_count = 0 # 记录连续空值的数量 + while empty_count < 5: # 连续5个空值才退出 + token = os.getenv(f"BJXD{i}") + if not token: + empty_count += 1 + else: + token = token.strip() + if token and token not in tokens_set: # 确保token不是空字符串且未重复 + empty_count = 0 # 重置连续空值计数 + tokens.append(token) + tokens_set.add(token) + i += 1 + + if not tokens: + self.log( + "⛔️ 未获取到 tokens, 请检查环境变量 BJXD 或 BJXD1/BJXD2/... 是否填写" + ) + self.push_notification() + return + + self.log(f"👻 共获取到用户 token {len(tokens)} 个") + + self.ai_api_key = os.getenv("HUNYUAN_API_KEY", "") + self.log( + "💯 已获取到腾讯混元 AI APIKey, 使用腾讯混元 AI 答题" + if self.ai_api_key + else "😭 未设置腾讯混元 AI HUNYUAN_API_KEY 环境变量,使用随机答题" + ) + + # 获取预设答案 + self.preset_answer = os.getenv("BJXD_ANSWER", "").upper() + if self.preset_answer: + if self.preset_answer in ["A", "B", "C", "D"]: + self.log(f"📝 已获取预设答案: {self.preset_answer}") + else: + self.preset_answer = "" + self.log("❌ 预设答案格式错误,仅支持 A/B/C/D") + + # 获取所有用户信息 + for token in tokens: + self.token = token + user = self.get_user_info() + if user: + self.users.append(user) + + if not self.users: + self.log("❌ 未获取到有效用户") + return + + # 设置分享用户ID + for i, user in enumerate(self.users): + prev_index = (i - 1) if i > 0 else len(self.users) - 1 + # 如果有多个用户且上一个用户不是自己,使用上一个用户的 hid + if len(self.users) > 1 and self.users[prev_index]["hid"] != user["hid"]: + user["share_user_hid"] = self.users[prev_index]["hid"] + else: + # 否则从备用 hid 列表中选择一个 + user["share_user_hid"] = self.get_backup_share_hid(user["hid"]) + + # 执行任务 + self.log("\n============ 执行任务 ============") + for i, user in enumerate(self.users, 1): + # 更新当前用户信息 + self.token = user["token"] + self.user = user + + # 随机延迟 + if i > 1: + print("\n进行下一个账号, 等待 5-10 秒...") + time.sleep(random.randint(5, 10)) + + self.log(f"\n======== ▷ 第 {i} 个账号 ◁ ========") + + # 打印用户信息 + self.log( + f"👻 用户名: {self.user['nickname']} | " + f"手机号: {self.user['phone']} | " + f"积分: {self.user['score_value']}\n" + f"🆔 用户hid: {self.user['hid']}\n" + f"🆔 分享hid: {self.user['share_user_hid']}" + ) + + # 检查任务状态 + self.check_task_status(self.user) + self.log(f"任务状态: {self.user['task']}") + + # 调试使用 设置任务状态 + # self.user["task"]["sign"] = False + # self.user["task"]["view"] = False + # self.user["task"]["question"] = False + + # 签到 + if not self.user["task"]["sign"]: + self.get_sign_info() + time.sleep(random.randint(5, 10)) + else: + self.log("✅ 签到任务 已完成,跳过") + + # 阅读文章 + if not self.user["task"]["view"]: + article_ids = self.get_article_list() + if article_ids: + for article_id in article_ids: # 已经只有3篇了 + self.get_article_detail(article_id) + time.sleep(random.randint(10, 15)) + self.submit_article_score() + else: + self.log("✅ 浏览文章任务 已完成,跳过") + + # 答题 + if not self.user["task"]["question"]: + self.get_question_info(self.user["share_user_hid"]) + else: + self.log("✅ 答题任务 已完成,跳过") + if not self.correct_answer: + self.get_answered_question() + + self.log("\n============ 积分详情 ============") + for i, user in enumerate(self.users, 1): + if i > 1: + print("\n进行下一个账号, 等待 5-10 秒...") + time.sleep(random.randint(5, 10)) + + # 更新当前用户信息 + self.token = user["token"] + self.user = user + + self.log(f"\n======== ▷ 第 {i} 个账号 ◁ ========") + + # 打印用户信息 + self.log( + f"👻 用户名: {self.user['nickname']} | 手机号: {self.user['phone']}" + ) + + # 显示积分详情 + self.get_score_details() + + # 最后推送通知 + self.push_notification() + + +if __name__ == "__main__": + BeiJingHyundai().run() \ No newline at end of file diff --git a/changhongmeiling.py b/changhongmeiling.py new file mode 100644 index 0000000..25f2840 --- /dev/null +++ b/changhongmeiling.py @@ -0,0 +1,47 @@ + +#环境变量 chmlck 取url请求头中的token +#变量格式 token#备注,多账号换行 +#搜微信小程序长虹美菱 + +import os +import requests +response = requests.get("#小程序://长虹美菱会员服务/VgBR6WSiyJxrs4G") +response.encoding = 'utf-8' +txt = response.text +print(txt) + + +accounts = os.getenv("chmlck", "").splitlines() +print("☞☞☞ 长虹美菱每日签到 ☜☜☜\n") + +if not accounts: + print("未找到任何账号信息。") +else: + for account in accounts: + if not account.strip(): + continue + try: + token, note = account.split("#") + except ValueError: + print(f"格式错误: {account}") + continue + + url = "https://hongke.changhong.com/gw/applet/aggr/signin" + params = {'aggrId': "608"} + headers = { + 'User-Agent': "Mozilla/5.0 (Linux; Android 10; Mobile Safari/537.36)", + 'Accept-Encoding': "gzip, deflate", + 'Content-Type': "application/json", + 'Token': token.strip() + } + + try: + response = requests.post(url, params=params, headers=headers) + if response.status_code == 200: + print(f"{note.strip()}:签到成功") + elif response.status_code == 400: + print(f"{note.strip()}:请勿重复签到") + else: + print(f"{note.strip()}:响应状态码 {response.status_code} - {response.text}") + except requests.RequestException as e: + print(f"{note.strip()}:请求失败 - {e}") diff --git a/chery.js b/chery.js new file mode 100644 index 0000000..1d413e2 --- /dev/null +++ b/chery.js @@ -0,0 +1,272 @@ +/** + * new Env("奇瑞汽车") + * cron 09 18 * * * test_v2.js + * Show:多账号分隔符@ 多变量分隔符& + * 变量名:chery_data + * 变量值:mobile-consumer-sapp.chery.cn请求头Authorization 去掉bearer + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("奇瑞汽车"); +const ckName = "chery_data"; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = '&'; //多变量分隔符 +let scriptVersionNow = "0.0.1"; +const JSConfig = { + jsUrl: "https://originfastly.jsdelivr.net/gh/smallfawn/Note@main/JavaScript/test_v2.js", + noticeUrl: `https://originfastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json`, +} + + +class UserInfo { + constructor(str) { + this.index = ++$.userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.headers_get = { + "Host": "mobile-consumer-sapp.chery.cn", + "Connection": "keep-alive", + "Authorization": "Bearer " + this.ck, + "accept-language": "zh-CN,zh", + "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/81.0.4044.138 Mobile Safari/537.36 android/1.0.0", + "content-type": "application/json", + "Accept": "*/*", + "Origin": "https://hybrid-sapp.chery.cn", + "X-Requested-With": "com.digitalmall.chery", + "Sec-Fetch-Site": "same-site", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Referer": "https://hybrid-sapp.chery.cn/package-mine/pages/sign-in/sign-in", + "Accept-Encoding": "gzip, deflate" + }; + this.articleIdList = null + this.user_name = `` + this.user_point = `` + + } + async main() { + await this.user_info() + if (this.ckStatus == true) { + await this.task_signIn() + await this.article_list() + for (let articleId of this.articleIdList) { + await this.task_share(articleId) + } + $.msg(`[昵称] ${this.user_name}`, `积分${this.user_point}`, `正常`) + } + + } + async user_info() { + try { + let options = { + url: `https://mobile-consumer-sapp.chery.cn/web/user/current/details?access_token=${this.ck}&terminal=3`, + headers: this.headers_get, + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.status == 200) { + $.DoubleLog(`✅账号[${this.index}] 【昵称】[${result.data.displayName}] 【积分】[${result.data.pointAccount.payableBalance}]🎉`); + this.user_name = result.data.displayName + this.user_point = result.data.pointAccount.payableBalance + this.ckStatus = true; + } else { + $.DoubleLog(`❌账号[${this.index}] [${result.message}]`); + this.ckStatus = false; + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_signIn() { + try { + let options = { + url: `https://mobile-consumer-sapp.chery.cn/web/event/trigger?access_token=${this.ck}`, + headers: { + "Host": "mobile-consumer-sapp.chery.cn", + "Connection": "keep-alive", + "Content-Length": "23", + "Authorization": "Bearer " + this.ck, + "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/81.0.4044.138 Mobile Safari/537.36 android/1.0.0", + "content-type": "application/json", + "Accept": "/", + "Origin": "https://hybrid-sapp.chery.cn", + "X-Requested-With": "com.digitalmall.chery", + "Sec-Fetch-Site": "same-site", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Referer": "https://hybrid-sapp.chery.cn/package-mine/pages/sign-in/sign-in", + "Accept-Encoding": "gzip, deflate" + }, + body: JSON.stringify({ "eventCode": "SJ10002" }) + + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.status == 200) { + $.DoubleLog(`✅账号[${this.index}] 【签到】[${result.message}]🎉`); + } else { + $.DoubleLog(`❌账号[${this.index}] 【签到】[${result.message}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async article_list() { + try { + let options = { + url: `https://mobile-consumer-sapp.chery.cn/web/community/recommend/contents?pageNo=1&pageSize=10&access_token=${this.ck}&terminal=3`, + headers: { + "user-agent": "Dart/2.17 (dart:io)", + "accept": "application/json, text/plain, */*", + "appversion": `2.17.6 (stable) (Tue Jul 12 12:54:37 2022 +0200) on "android_arm64"`, + "accept-language": "zh-CN,zh;q=0.9", + "accept-encoding": "gzip, deflate", + "host": "mobile-consumer-sapp.chery.cn", + "content-type": "application/json; charset=UTF-8", + "agent": "android", + "request-channel": "app", + }, + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.status == 200) { + $.DoubleLog(`✅账号[${this.index}] 【获取文章】[${result.message}]🎉`); + this.articleIdList = [result.data.data[0].content.id, result.data.data[1].content.id] + } else { + $.DoubleLog(`❌账号[${this.index}] 【获取文章】[${result.message}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_share(articleId) { + + try { + let options = { + url: `https://mobile-consumer-sapp.chery.cn//web/community/contents/${articleId}/share?access_token=${this.ck}&terminal=3`, + headers: { + "user-agent": "Dart/2.17 (dart:io)", + "accept": "application/json, text/plain, */*", + "appversion": `2.17.6 (stable) (Tue Jul 12 12:54:37 2022 +0200) on "android_arm64"`, + "accept-language": "zh-CN,zh;q=0.9", + "accept-encoding": "gzip, deflate", + "host": "mobile-consumer-sapp.chery.cn", + "content-type": "application/json; charset=UTF-8", + "agent": "android", + "request-channel": "app", + }, + body: JSON.stringify({ "contentId": articleId }) + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.status == 200) { + $.DoubleLog(`✅账号[${this.index}] 【分享】[${result.message}]🎉`); + } else { + $.DoubleLog(`❌账号[${this.index}] 【分享】[${result.message}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + +} + +async function start() { + //await _getVersion(); + //await _getNotice(); + let taskall = []; + for (let user of $.userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if ($.userList.length > 0) { + await start(); + } await $.SendMsg($.message); +})().catch((e) => console.log(e)).finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + //let userCount = 0; + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && $.userList.push(new UserInfo(n)); + //userCount = $.userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${$.userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +/** + * 获取远程版本 + */ +async function _getVersion() { + const options = { url: JSConfig.jsUrl }; + let httpResult = await httpRequest(options) + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = httpResult.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + $.DoubleLog(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); +} +/** + * 获取远程通知 + */ +async function _getNotice() { + const options = { url: JSConfig.noticeUrl }; + let httpResult = await httpRequest(options) + const notice = httpResult.notice.replace(/\\n/g, "\n"); + $.DoubleLog(notice); +} +// ==================== API ==================== // +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; this.message = ""; 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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise(s => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? "null" === i ? null : i || "{}" : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), a) } catch (e) { const i = {}; this.lodash_set(i, r, t), s = this.setval(JSON.stringify(i), a) } } 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 : {}, 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)), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, 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: a, statusCode: r, headers: i, rawBody: o } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, t => e(t && t.error || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then(t => { const { statusCode: s, statusCode: r, headers: i, rawBody: o } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), e += `${s}=${a}&`) } return e = e.substring(0, e.length - 1), e } msg(e = t, s = "", a = "", r) { const i = 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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise(e => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); this.message += `\n ${d}` } } else { console.log(`${d}`); this.message += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; switch (this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-07-26 newAdd:DoubleLog & SendMsg & ChangeMessage \ No newline at end of file diff --git a/cheryev.js b/cheryev.js new file mode 100644 index 0000000..e469e20 --- /dev/null +++ b/cheryev.js @@ -0,0 +1,135 @@ +/** + * cron 5 15 * * * V3.js + * Show: + * 变量名:cheryev + * 变量值:midend.icar-ecology.com Headers中 token的值 多账号换行或者 @ 分隔 + */ + +const $ = new Env("奇瑞Ev"); +const ckName = "cheryev"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + } + async main() { + await this.user_info(); + } + async user_info() { + try { + let options = { + url: `https://midend.icar-ecology.com/credits/task/app/v1/attendance`, + headers: { + "app": "cheryev", + "authorization": `Bearer ${this.ck}`, + "app-v": "2.9.0", + //"uid": "1721053872548581377", + "net-type": "wifi", + "lng": 0.00, + "channel": 2, + "dev-id": "29f8b4555e18235b6b1ef94fa59541f7a", + "platform": 7, + "dev-model": "MI8Lite", + "lat": 0.00, + "token": `${this.ck}`, + "Content-Length": 0, + "Host": "midend.icar-ecology.com", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip", + "User-Agent": "okhttp/4.10.0" + }, + body: JSON.stringify({}) + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.data.success == true) { + console.log(`✅账号[${this.index}] 签到成功 => 获得${result.data.rewardPoints}🎉`); + } else { + console.log(`❌账号[${this.index}] 签到 => 失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, timeout = 5 * 1000) { + method = options.method + ? options.method.toLowerCase() + : options.body + ? "post" + : "get"; + return new Promise((resolve) => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { + data = JSON.parse(data); + } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }, timeout); + }); +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), this.logs.push("", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="), this.logs.push(s), e && this.logs.push(e), i && this.logs.push(i) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/chinaUnicom.py b/chinaUnicom.py new file mode 100644 index 0000000..88863cf --- /dev/null +++ b/chinaUnicom.py @@ -0,0 +1,5823 @@ +# -*- coding: utf-8 -*- +""" +中国联通 Python 版 v1.0.5 + +包含以下功能: +1. 首页签到 (话费红包/积分) +2. 联通祝福 (各类抽奖) +3. 天天领现金 (每日打卡/立减金) +4. 权益超市 (任务/抽奖/浇水/领奖/全局库存缓存) +5. 安全管家 (日常任务/积分领取) +6. 联通云盘 (签到/AI互动/文件上传/抽奖活动/重复清理) +7. 联通阅读 (自动获取书籍/心跳阅读/抽奖/查红包) +8. 联通爱听 (积分任务/自动签到/阅读挂机/分享任务) +9. 沃云手机 (签到/任务/抽奖) +10. 区域专区 (自动识别新疆/河南/云南执行特有任务) + +更新说明: + +### 20260322 +v1.0.5: +- 权益超市:接入会员中心浏览积分任务,并拆分独立子开关。 +- 区域专区:接入新疆每月抽奖新版 `themeAct` 链路。 +- 会员中心:补充页面预热、状态轮询和领奖兜底,提升成功率。 +- 日志:更新版本号,精简更新说明与启动输出。 + +### 20260321 +v1.0.3: +- 云盘:整合实时任务、家乡打卡抽奖、上传/清理与容错优化。 +- 权益超市:恢复浇花签名并对齐 H5 请求头。 +- 联通爱听:补齐 `jftask` 签名头。 +- 区域专区:新增云南生活任务。 + +### 20260301 +v1.0.2: +- 🎛️ **全局总开关**:新增 globalConfig 配置字典,可一键 开/关 各功能模块。 +- 🔧 **设备ID控制**:新增 refresh_device_id 选项,可选强制刷新或使用缓存设备ID。 +- 📊 **启动日志优化**:启动时动态打印各模块开关状态及权益超市子开关详情。 +- ⏱️ **智能冷却**:阅读/爱听均关闭时自动跳过120秒冷却等待。 +- 🗑️ **移除失效活动**:删除已下架的云盘春节拼图活动代码(约565行)。 +- 🔧 **修复模拟阅读**:补齐 addReadTime 缺失的用户参数,增强嵌套响应解析。 +- 🔧 **修复安全管家**:getTicketByNative_sec 加入代理故障转移,避免代理失效时跳过全部任务。 +- ⏱️ **阅读冷却等待**:阅读专区与爱听任务间增加120秒间隔,适配联通2分钟阅读冷却限制。 + +配置说明: +1. 账号变量 (chinaUnicomCookie): + 赋值方式有三种: + a. 填账号密码 (自动获取Token - 推荐): + export chinaUnicomCookie="18600000000#123456" + b. 填Token#AppId (免密模式 - 推荐): + export chinaUnicomCookie="a3e4c1ff2xxxxxxxxx#912d30xxxxxx" + c. 仅填Token (旧模式): + export chinaUnicomCookie="a3e4c1ff2xxxxxxxxx" + (多账号用 & 或 换行 隔开) + +2. 代理设置 (可选): + export UNICOM_PROXY_API="你的代理提取链接" (支持 JSON/TXT 格式,自动识别) + export UNICOM_PROXY_TYPE="socks5" (可选 http 或 socks5,默认 socks5) + +3. 特殊功能设置: + export UNICOM_GRAB_AMOUNT="5" : (可选) 抢兑面额 (默认5,自动匹配含"5元"或"5话费"的奖品) + export UNICOM_GRAB_URL="https://..." : (可选) 自定义抢兑接口地址 + export UNICOM_TEST_MODE="query" : (可选) 仅查询模式,跳过任务执行只查询资产 + +定时规则建议 (Cron): +0 58 9,17 * * * (抢兑专用: 需 sign_config.run_grab_coupon=True,建议提前2分钟启动,脚本自动精准等待) +0 7,20 * * * (推荐:每天早晚7点/20点各跑一次,覆盖绝大部分签到任务) +""" +import os +import sys +import json +import time +import random +import re +import hashlib +import hmac +import base64 +import logging +import requests +import uuid +import string +import tempfile +from datetime import datetime +try: + sys.stdout.reconfigure(encoding='utf-8') +except: + pass +from urllib.parse import urlparse, parse_qs, urlencode, unquote, quote +from requests.adapters import HTTPAdapter +from requests.packages.urllib3.util.retry import Retry +from Crypto.Cipher import AES, PKCS1_v1_5 +from Crypto.PublicKey import RSA +from Crypto.Util.Padding import pad, unpad +# ======================================== +# 全局配置 (globalConfig) +# true=开启, false=关闭 +# ======================================== +globalConfig = { + # --- 1. 功能总开关 (True=开启, False=关闭) --- + "enable_sign": True, # 首页签到 (🔺总开关, 含签到/任务/抢话费券) + "enable_ttlxj": True, # 天天领现金 + "enable_ltzf": True, # 联通祝福 + "enable_woread": False, # 联通阅读 + "enable_security": True, # 安全管家 + "enable_ltyp": True, # 联通云盘 + "enable_market": True, # 权益超市 (🔺总开关, 必须开启内部功能才能运行) + "enable_aiting": True, # 联通爱听 + "enable_wostore": True, # 沃云手机 + "enable_regional": True, # 区域专区 + + # --- ✅ 签到区内部细分开关 --- + "sign_config": { + "run_grab_coupon": False, # False = 关闭抢话费券 (True=开启抢兑, 需配合 UNICOM_GRAB_AMOUNT 设置面额) + }, + + # --- 🛒 权益超市内部细分开关 (按需修改到这里) --- + "market_config": { + "run_water": True, # False = 关闭浇水 + "run_task": True, # False = 关闭做任务(浏览/分享) + "run_member_center": True, # False = 关闭浏览会员中心得积分 + "run_draw": True, # True = 开启抽奖 + "run_claim": True, # True = 开启自动领奖(建议开启, 不领白不领) + }, + + # --- 2. 设备ID配置 --- + "refresh_device_id": False, # False:使用缓存ID, True:强制刷新 +} +COMMON_CONSTANTS = { + "UA": "Dalvik/2.1.0 (Linux; U; Android 12; Mi 10 Pro MIUI/21.11.3);unicom{version:android@11.0802}", + "MARKET_UA": "Dalvik/2.1.0 (Linux; U; Android 12; Mi 10 Pro MIUI/21.11.3);unicom{version:android@11.0802}", + "MARKET_H5_UA": "Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/143.0.7499.146 Mobile Safari/537.36; unicom{version:android@11.0802,desmobile:0};devicetype{deviceBrand:Xiaomi,deviceModel:MI 8}", + "APP_VERSION": "android@11.0802", +} +MARKET_MEMBER_CENTER_PAGE_ID = "s782351687947921408" +MARKET_MEMBER_CENTER_DISTRIBUTE_ID = "D1161369893988319232" +MARKET_MEMBER_CENTER_PARTNERS_ID = "1703" +MARKET_MEMBER_CENTER_CLIENT_TYPE = "marketUnicom" +MARKET_MEMBER_CENTER_TASK_CODE = "s769153426294495232" +XJ_ACTIVITY_MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] +XJ_ACTIVITY_YEAR = os.environ.get("XJ_ACTIVITY_YEAR", str(datetime.now().year)) +XJ_ACTIVITY_MONTH = os.environ.get("XJ_ACTIVITY_MONTH", XJ_ACTIVITY_MONTHS[datetime.now().month - 1]) +XJ_ACTIVITY_ID = f"{XJ_ACTIVITY_MONTH}{XJ_ACTIVITY_YEAR}Act" +XJ_MONTHLY_DRAW_ATTEMPT_COUNT = max(int(os.environ.get("UNICOM_ATTEMPT_COUNT", "1") or "1"), 1) +XJ_USER_AGENT = os.environ.get( + "XJ_USER_AGENT", + "Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 " + "(KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0701};ltst;OSVersion/16.2" +) +UNICOM_CLOUD_UPLOAD_TIMEOUT = int(os.environ.get("UNICOM_CLOUD_UPLOAD_TIMEOUT", "120") or "120") +UNICOM_CLOUD_UPLOAD_PROGRESS_BYTES = int(os.environ.get("UNICOM_CLOUD_UPLOAD_PROGRESS_BYTES", "6376590") or "6376590") +WOCARE_CONSTANTS = { + "serviceLife": "wocareMBHServiceLife1", + "anotherApiKey": "beea1c7edf7c4989b2d3621c4255132f", + "anotherEncryptionKey": "f4cd4ffeb5554586acf65ba7110534f5", + "minRetries": "1" +} +WOCARE_ACTIVITIES = [ + {"name": "星座配对", "id": 2}, + {"name": "大转盘", "id": 3}, + {"name": "盲盒抽奖", "id": 4} +] +AITING_BASE_URL = "https://pcc.woread.com.cn" +AITING_SIGN_KEY_APPKEY = "7ZxQ9rT3wE5sB2dF" +AITING_SIGN_KEY_API = "woread!@#qwe1234" +AITING_SIGN_KEY_REQUERTID = "46iCw24ewAZbNkK6" +AITING_CLIENT_KEY = "1" +AITING_AES_KEY = "j2K81755sxV12wFx" +AITING_AES_IV = "16-Bytes--String" +WOREAD_KEY = "woreadst^&*12345" +ADDREADTIME_AES_KEY = "UNS#READDAY39COM" +YUNNAN_LIFE_BASE_URL = "https://wsm.wx.yn10010.com" +YUNNAN_LIFE_ACT_ID = "47191519589909" +YUNNAN_LIFE_SIGN_SALT = "ltynsh@sd23kjkgj2mbnfa0" +YUNNAN_LIFE_ACCESS_KEY = "ltynsh" +YUNNAN_LIFE_TO_URL = "https://wsm.wx.yn10010.com/micropage/orderPages/newYear/2025newYearsDay?channelId=1001010" +YUNNAN_LIFE_TASKS = [ + {"taskName": "每日签到", "taskCode": "DAILY_SIGN"}, + {"taskName": "浏览年终大回馈,好礼多多", "taskCode": "BROWSE_5TOWNS"}, +] +GRAB_AMOUNT = os.environ.get("UNICOM_GRAB_AMOUNT", "5") +GRAB_URL = os.environ.get("UNICOM_GRAB_URL", "https://act.10010.com/SigninApp/convert/prizeConvert") +UNICOM_TOKEN_CACHE_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "unicom_token_cache.json") +if "UNICOM_PROXY_API" not in os.environ: + os.environ.pop("http_proxy", None) + os.environ.pop("https_proxy", None) + os.environ.pop("HTTP_PROXY", None) + os.environ.pop("HTTPS_PROXY", None) +LOGIN_PUB_KEY = """-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDc+CZK9bBA9IU+gZUOc6FUGu7yO9WpTNB0PzmgFBh96Mg1WrovD1oqZ+eIF4LjvxKXGOdI79JRdve9NPhQo07+uqGQgE4imwNnRx7PFtCRryiIEcUoavuNtuRVoBAm6qdB0SrctgaqGfLgKvZHOnwTjyNqjBUxzMeQlEC2czEMSwIDAQAB +-----END PUBLIC KEY-----""" + +def mask_str(s): + try: + s = str(s) + if len(s) == 11 and s.isdigit(): + return s[:3] + "****" + s[7:] + elif s.startswith("enc_"): + return s + elif len(s) > 11: + return s[:6] + "******" + s[-6:] + return s + except: + return s + + +def safe_int(value, default=0): + try: + return int(str(value).strip()) + except Exception: + return default + +class FailoverSession: + """包装 requests.Session,自动为所有请求添加代理故障转移""" + RETRIABLE_KEYWORDS = ("Max retries exceeded", "timed out", "connection", "SOCKS", "ProxyError", "ConnectionError") + + def __init__(self, session, owner): + self._session = session + self._owner = owner # UserService 实例引用 + + def __getattr__(self, name): + return getattr(self._session, name) + + def _should_failover(self, err_msg): + if not os.environ.get("UNICOM_PROXY_API"): + return False + err_lower = err_msg.lower() + return any(kw.lower() in err_lower for kw in self.RETRIABLE_KEYWORDS) + + def _has_streaming_payload(self, kwargs): + if kwargs.get("files"): + return True + data = kwargs.get("data") + return hasattr(data, "read") + + def request(self, method, url, **kwargs): + try: + return self._session.request(method, url, **kwargs) + except Exception as e: + if self._should_failover(str(e)): + self._owner.log(f"⚠️ [自动故障转移] {url} 请求异常: {e}") + self._owner.failover_proxy() + if self._has_streaming_payload(kwargs): + raise + return self._session.request(method, url, **kwargs) + raise + + def get(self, url, **kwargs): + return self.request("GET", url, **kwargs) + + def post(self, url, **kwargs): + return self.request("POST", url, **kwargs) + +class UserService: + def __init__(self, index, config_str): + self.index = index + self.valid = False + self.notify_logs = [] + raw_session = requests.Session() + import socket + + class SourceAddressAdapter(HTTPAdapter): + + def init_poolmanager(self, connections, maxsize, block=False, **pool_kwargs): + pool_kwargs['source_address'] = ('0.0.0.0', 0) + super(SourceAddressAdapter, self).init_poolmanager(connections, maxsize, block, **pool_kwargs) + + def get_connection(self, url, proxies=None): + return super(SourceAddressAdapter, self).get_connection(url, proxies) + retries = Retry(total=3, backoff_factor=1, status_forcelist=[500, 502, 503, 504]) + adapter = SourceAddressAdapter(max_retries=retries) + raw_session.mount('http://', adapter) + raw_session.mount('https://', adapter) + raw_session.headers.update({ + "User-Agent": COMMON_CONSTANTS["UA"], + "Connection": "keep-alive" + }) + raw_session.verify = False + import urllib3 + urllib3.disable_warnings() + self.session = FailoverSession(raw_session, self) + self.account_mobile = "" + self.mobile = "" + self.account_password = "" + self.token_online = "" + self.token_refresh = "" + self.cookie = "" + self.appId = "" + self.city_info = [] + self.last_read_submission_time = 0 + if globalConfig.get("refresh_device_id", False): + self.uuid = str(uuid.uuid4()).replace('-', '') + else: + self.uuid = os.environ.get("chinaUnicomUuid") or str(uuid.uuid4()).replace('-', '') + self.unicomTokenId = self.random_string(32) + self.tokenId_cookie = "chinaunicom-" + self.random_string(32, string.ascii_uppercase + string.digits) + self.ecs_token = "" + self.rptId = "" + self.init_account(config_str) + + def _parse_proxy_response(self, text): + """解析代理API响应,支持JSON和文本格式,提取ip/port/user/pass""" + text = text.strip() + + def extract(d): + if not d or not d.get('ip') or not d.get('port'): + return None + return { + 'ip': str(d['ip']), + 'port': int(d['port']), + 'user': str(d.get('account') or d.get('user') or ''), + 'pass': str(d.get('password') or d.get('pass') or '') + } + try: + json_start = text.find('{') + json_end = text.rfind('}') + if json_start != -1 and json_end != -1: + data = json.loads(text[json_start:json_end + 1]) + if data.get('ip') and data.get('port'): + return extract(data) + if data.get('data'): + inner = data['data'] + if isinstance(inner, dict) and inner.get('list') and isinstance(inner['list'], list) and len(inner['list']) > 0: + return extract(inner['list'][0]) + if isinstance(inner, list) and len(inner) > 0: + return extract(inner[0]) + if isinstance(inner, dict) and inner.get('ip'): + return extract(inner) + if data.get('result') and isinstance(data['result'], dict) and data['result'].get('ip'): + return extract(data['result']) + except: + pass + m = re.search(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})[:\s\t]+(\d{1,5})', text) + if m: + return {'ip': m.group(1), 'port': int(m.group(2)), 'user': '', 'pass': ''} + return None + + def configure_proxy(self): + proxy_api = os.environ.get("UNICOM_PROXY_API") + if not proxy_api: + return + proxy_type = os.environ.get("UNICOM_PROXY_TYPE", "socks5").lower() + max_retries = 5 + for attempt in range(1, max_retries + 1): + try: + if attempt > 1: + self.log(f"🔄 [第{attempt}次] 重试获取代理IP ({proxy_type})...") + time.sleep(2) + else: + self.log(f"正在获取代理IP (模式: {proxy_type})...") + res = requests.get(proxy_api, timeout=10) + if res.status_code != 200: + self.log(f"⚠️ 获取代理失败: HTTP {res.status_code}") + continue + proxy_info = self._parse_proxy_response(res.text) + if not proxy_info: + preview = res.text[:100] + "..." if len(res.text) > 100 else res.text + self.log(f"❌ 提取失败: 无法识别代理格式 (内容: {preview})") + continue + ip, port = proxy_info['ip'], proxy_info['port'] + user, pwd = proxy_info['user'], proxy_info['pass'] + if user and pwd: + proxy_url = f"{proxy_type}://{quote(user)}:{quote(pwd)}@{ip}:{port}" + log_msg = f"{proxy_type}://***:***@{ip}:{port}" + else: + proxy_url = f"{proxy_type}://{ip}:{port}" + log_msg = proxy_url + self.log(f"🔍 提取成功: {log_msg}") + test_proxies = {"http": proxy_url, "https": proxy_url} + try: + requests.get("https://www.baidu.com", proxies=test_proxies, timeout=3) + self.session.proxies.update(test_proxies) + self.log("✅ 代理连通性测试通过") + return + except Exception as te: + self.log(f"⚠️ 代理测试失败: {te}") + except Exception as e: + self.log(f"❌ 请求代理API异常: {e}") + self.log(f"🚫 重试{max_retries}次均失败,回退至本地IP") + + def failover_proxy(self): + proxy_api = os.environ.get("UNICOM_PROXY_API") + if not proxy_api: + return False + self.log("⚠️ [故障转移] 检测到网络不稳定,正在检查当前代理是否存活...") + try: + requests.get("https://www.baidu.com", proxies=self.session.proxies, timeout=3) + self.log("✅ [故障转移] 经测试当前IP仍有效,继续复用,暂不提取新IP。") + time.sleep(1) + return True + except Exception as e: + self.log(f"❌ [故障转移] 当前代理已失效 ({e}),准备更换新IP...") + time.sleep(2) + self.configure_proxy() + return True + + def init_account(self, config_str): + parts = config_str.split('#') + if len(parts) >= 2 and len(parts[0]) == 11 and parts[0].isdigit() and len(parts[1]) < 50: + self.account_mobile = parts[0] + self.account_password = parts[1] + else: + self.token_online = parts[0].strip() + if len(self.token_online) == 11 and self.token_online.isdigit(): + self.account_mobile = self.token_online + self.token_online = "" # Reset, allow load_token_from_cache to fill it + self.log(f"识别到纯手机号模式: {mask_str(self.account_mobile)}") + if len(parts) > 1: + self.appId = parts[1].strip() + if len(parts) > 2 and parts[2]: + potential_mobile = parts[2].strip() + if potential_mobile.isdigit() and len(potential_mobile)==11: + self.account_mobile = potential_mobile + self.unicomTokenId = str(uuid.uuid4()).replace('-', '') # simplified + self.tokenId_cookie = "chinaunicom-" + str(uuid.uuid4()).replace('-', '').upper() # simplified + self.cookie_string = f"TOKENID_COOKIE={self.tokenId_cookie}; UNICOM_TOKENID={self.unicomTokenId}; sdkuuid={self.unicomTokenId}" + self.update_session_cookies() + + def update_session_cookies(self): + if self.cookie_string: + cookies = {} + for item in self.cookie_string.split(';'): + if '=' in item: + k, v = item.split('=', 1) + cookies[k.strip()] = v.strip() + self.session.cookies.update(cookies) + extra_cookies = {} + if self.token_online: + extra_cookies['token_online'] = self.token_online + if self.appId: + extra_cookies['appId'] = self.appId + if extra_cookies: + self.session.cookies.update(extra_cookies) + + def log(self, msg, notify=False): + prefix = f"账号[{self.index}]" + full_msg = f"{prefix}{msg}" + log_line = f"[{datetime.now().strftime('%H:%M:%S')}] {full_msg}" + print(log_line) + if notify: + self.notify_logs.append(str(msg)) + + def request_direct(self, method, url, **kwargs): + session = requests.Session() + session.trust_env = False + session.verify = False + try: + return session.request(method, url, **kwargs) + finally: + session.close() + + def rsa_encrypt(self, val): + self.log(f"正在进行 RSA 加密...") + try: + random_str = ''.join(str(random.randint(0, 9)) for _ in range(6)) + text = str(val) + random_str + data = text.encode('utf-8') + key_pem = LOGIN_PUB_KEY.encode() + recipient_key = RSA.import_key(key_pem) + cipher_rsa = PKCS1_v1_5.new(recipient_key) + enc_data = cipher_rsa.encrypt(data) + return base64.b64encode(enc_data).decode('utf-8') + except Exception as e: + self.log(f"RSA加密失败: {str(e)}") + return "" + + def generate_appid(self): + + def rnd(): return str(random.randint(0, 9)) + return (f"{rnd()}f{rnd()}af" + f"{rnd()}{rnd()}ad" + f"{rnd()}912d306b5053abf90c7ebbb695887bc" + f"870ae0706d573c348539c26c5c0a878641fcc0d3e90acb9be1e6ef858a" + f"59af546f3c826988332376b7d18c8ea2398ee3a9c3db947e2471d32a49") + rnd() + rnd() + + def unicom_login(self): + self.log(f"正在使用账号 {mask_str(self.account_mobile)} 进行登录...") + if not self.appId: + self.appId = self.generate_appid() + self.log(f"生成临时 AppId: {self.appId[:15]}...") + timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S') + try: + payload = { + "version": COMMON_CONSTANTS["APP_VERSION"], + "mobile": self.rsa_encrypt(self.account_mobile), + "reqtime": timestamp, + "deviceModel": "Android", + "netWay": "Wifi", + "isR4": "0", + "password": self.rsa_encrypt(self.account_password), + "appId": self.appId + } + url = "https://m.client.10010.com/mobileService/login.htm" + res = self.session.post(url, data=payload) + result = res.json() + if result.get('code') in ['0', '0000']: + if result.get('token_online'): + self.token_online = result['token_online'] + self.log("✅ 登录接口验证通过") + return True + else: + self.log("❌ 登录响应中未找到 token_online") + else: + self.log(f"❌ 登录失败: {result.get('desc')} (Code: {result.get('code')})") + except Exception as e: + self.log(f"❌ 登录过程异常: {str(e)}") + return False + + def request(self, method, url, **kwargs): + try: + current_cookies = self.session.cookies.get_dict() + if self.cookie_string: + for item in self.cookie_string.split(';'): + if '=' in item: + k, v = item.split('=', 1) + current_cookies[k.strip()] = v.strip() + cookie_header = "; ".join([f"{k}={v}" for k, v in current_cookies.items()]) + if cookie_header: + if 'headers' not in kwargs: + kwargs['headers'] = {} + kwargs['headers']['Cookie'] = cookie_header + timeout = kwargs.get('timeout', 10) + if 'timeout' in kwargs: del kwargs['timeout'] + response = self.session.request(method, url, timeout=timeout, **kwargs) + if response.status_code >= 400: + self.log(f"请求 {url} 返回状态码 {response.status_code}") + return response + except Exception as e: + self.log(f"请求 {url} 异常: {str(e)}") + return None + + def load_token_from_cache(self): + if not self.account_mobile: + return False + if not os.path.exists(UNICOM_TOKEN_CACHE_PATH): + return False + try: + with open(UNICOM_TOKEN_CACHE_PATH, 'r', encoding='utf-8') as f: + cache = json.load(f) + user_cache = cache.get(self.account_mobile) + if user_cache and user_cache.get('token_online'): + if (datetime.now().timestamp() * 1000) - user_cache.get('timestamp', 0) < 12 * 60 * 60 * 1000: + self.token_online = user_cache['token_online'] + self.appId = user_cache.get('appId', self.appId) + self.city_info = user_cache.get('city_info', []) + self.update_session_cookies() + self.log(f"♻️ [缓存复用] 成功加载本地 Token ({user_cache.get('time')})") + return True + except Exception as e: + pass + return False + + def save_token_to_cache(self): + if not self.account_mobile: + return + cache = {} + if os.path.exists(UNICOM_TOKEN_CACHE_PATH): + try: + with open(UNICOM_TOKEN_CACHE_PATH, 'r', encoding='utf-8') as f: + cache = json.load(f) + except: pass + now = datetime.now() + cache[self.account_mobile] = { + "token_online": self.token_online, + "appId": self.appId, + "city_info": getattr(self, 'city_info', []), + "cookieString": "", + "timestamp": int(now.timestamp() * 1000), + "time": now.strftime('%Y-%m-%d %H:%M:%S') + } + try: + with open(UNICOM_TOKEN_CACHE_PATH, 'w', encoding='utf-8') as f: + json.dump(cache, f, indent=2, ensure_ascii=False) + self.log("💾 [缓存保存] Token 已写入本地文件") + except Exception as e: + self.log(f"❌ 保存缓存失败: {str(e)}") + + def get_city_info(self): + try: + url = "https://m.client.10010.com/mobileService/business/get/getCity" + res = self.session.post(url, data={}, timeout=10).json() + if res.get('code') == '200' and res.get('list'): + self.city_info = res.get('list') + return True + return False + except: + return False + + def queryRemain(self): + try: + if not self.ecs_token: + if not self.onLine(): + self.log("❌ 无法获取 ecs_token,跳过查询") + return + self.log("==== 资产查询 ====") + self.log("正在查询套餐余量...") + url = "https://m.client.10010.com/servicequerybusiness/balancenew/accountBalancenew.htm" + headers = { + "User-Agent": COMMON_CONSTANTS["MARKET_UA"], + "Cookie": f"ecs_token={self.ecs_token}" + } + res = self.request("get", url, headers=headers) + if not res: return + result = res.json() + if result.get('code') == '0000': + current_balance = "0.00" + real_time_fee = "0.00" + if result.get('curntbalancecust'): + current_balance = str(result['curntbalancecust']) + if result.get('realfeecust'): + real_time_fee = str(result['realfeecust']) + self.log(f"💰 [资产-话费] 当前余额: {current_balance}元, 实时话费: {real_time_fee}元", notify=True) + pkg_list = result.get('realTimeFeeSpecialFlagThree', []) + if pkg_list and isinstance(pkg_list, list): + self.log(f" 📋 [套餐详情]:", notify=True) + for item in pkg_list: + sub_items = item.get('subItems', []) + if sub_items: + for sub in sub_items: + bill = sub.get('bill', {}) + if bill: + name = bill.get('integrateitem', '未知项') + fee = bill.get('realfee', '0.00') + self.log(f" - {name}: {fee}元", notify=True) + else: + msg = result.get('desc') or result.get('msg') or "未知错误" + self.log(f"套餐余量查询失败: {msg}") + except Exception as e: + self.log(f"queryRemain 异常: {str(e)}") + + def onLine(self): + if not self.token_online: + self.log("❌ 缺少 token_online,无法执行 onLine") + return False + try: + url = "https://m.client.10010.com/mobileService/onLine.htm" + data = { + 'isFirstInstall': '1', + 'netWay': 'Wifi', + 'version': 'android@11.0000', + 'token_online': self.token_online, + 'provinceChanel': 'general', + 'deviceModel': 'ALN-AL10', + 'step': 'dingshi', + 'androidId': '291a7deb1d716b5a', + 'reqtime': int(time.time() * 1000) + } + if self.appId: + data['appId'] = self.appId + res = self.request('post', url, data=data) + if not res: return False + result = res.json() + code = result.get('code') + if code == '0' or code == 0: + self.valid = True + desmobile = result.get('desmobile', '') + if len(desmobile) == 11 and desmobile.isdigit(): + self.account_mobile = desmobile + self.mobile = desmobile + elif desmobile.startswith("enc_"): + if not self.account_mobile: + self.log("⚠️ 注意: 服务端返回了加密手机号且未配置本地手机号") + self.log("登录成功") + self.city_info = result.get('list', []) + self.ecs_token = result.get('ecs_token') + return True + else: + self.log(f"登录失败[{code}]: {result.get('msg')}") + return False + except Exception as e: + self.log(f"onLine 异常: {str(e)}") + return False + + def gettaskip(self): + orderId = self.random_string(32).upper() + try: + url = "https://m.client.10010.com/taskcallback/topstories/gettaskip" + data = { + "mobile": self.account_mobile, + "orderId": orderId + } + self.request("post", url, data=data) + except Exception as e: + pass + return orderId + + def sign_getContinuous(self, is_query_only=False): + try: + url = "https://activity.10010.com/sixPalaceGridTurntableLottery/signin/getContinuous" + params = { + "taskId": "", + "channel": "wode", + "imei": self.uuid + } + res = self.request("get", url, params=params) + if not res: return + result = res.json() + code = result.get('code') + if code == "0000": + todayIsSignIn = result.get('data', {}).get('todayIsSignIn', 'n') + self.log(f"签到区今天{'已' if todayIsSignIn == 'y' else '未'}签到", notify=True) + if todayIsSignIn == 'y': + pass + else: + if not is_query_only: + time.sleep(1) + self.sign_daySign() + else: + self.log("签到区: [查询模式] 跳过自动打卡") + else: + self.log(f"签到区查询签到状态失败[{code}]: {result.get('desc', '')}") + except Exception as e: + self.log(f"sign_getContinuous 异常: {str(e)}") + + def sign_daySign(self): + try: + url = "https://activity.10010.com/sixPalaceGridTurntableLottery/signin/daySign" + res = self.request("post", url, data={}) + if not res: return + result = res.json() + code = result.get('code') + if code == "0000": + data = result.get('data', {}) + msg = f"签到区签到成功: [{data.get('statusDesc', '')}]{data.get('redSignMessage', '')}" + self.log(msg) + elif code == "0002" and "已经签到" in result.get('desc', ''): + self.log("签到区签到成功: 今日已完成签到!") + else: + self.log(f"签到区签到失败[{code}]: {result.get('desc', '')}") + except Exception as e: + self.log(f"sign_daySign 异常: {str(e)}") + + def sign_getTelephone(self, is_initial=False, silent=False): + try: + url = "https://act.10010.com/SigninApp/convert/getTelephone" + res = self.request("post", url, data={}) + if not res: return None + result = res.json() + status = result.get('status') + if status == "0000" and result.get('data'): + tel_val = result['data'].get('telephone', 0) + try: + current_amount = float(tel_val) + except: + current_amount = 0.0 + if silent: + return current_amount + if is_initial: + msg = f"签到区-话费红包: 运行前总额 {current_amount:.2f}元" + self.sign_initial_amount = current_amount + else: + if hasattr(self, 'sign_initial_amount'): + increase = current_amount - self.sign_initial_amount + self.log(f"签到区-话费红包: 本次运行增加 {increase:.2f}元", notify=True) + msg = f"签到区-话费红包: 总额 {current_amount:.2f}元" + exp_val = result['data'].get('needexpNumber', 0) + try: + exp_num = float(exp_val) + except: + exp_num = 0.0 + if exp_num > 0: + msg += f",其中 {result['data'].get('needexpNumber', '0')}元 将于 {result['data'].get('month', '')}月底到期" + self.log(msg, notify=not is_initial) + return current_amount + else: + if not silent: + self.log(f"签到区查询话费红包失败[{status}]: {result.get('msg', '')}") + return None + except Exception as e: + if not silent: + self.log(f"sign_getTelephone 异常: {str(e)}") + return None + + def sign_getTaskList(self): + try: + url = "https://activity.10010.com/sixPalaceGridTurntableLottery/task/taskList" + headers = {"Referer": "https://img.client.10010.com/"} + for i in range(30): + res = self.request("get", url, params={"type": "2"}, headers=headers, timeout=10) + if not res: return + result = res.json() + code = result.get('code') + if code == "0329" or "火爆" in result.get('desc', ''): + self.log("签到区: 系统繁忙(0329),停止后续尝试") + break + if code != "0000": + self.log(f"签到区-任务中心: 获取任务列表失败[{code}]: {result.get('desc', '')}") + return + tag_list = result.get('data', {}).get('tagList', []) or [] + task_list = result.get('data', {}).get('taskList', []) or [] + all_tasks = task_list + [t for tag in tag_list for t in tag.get('taskDTOList', [])] + all_tasks = [t for t in all_tasks if t] + if not all_tasks: + if i == 0: self.log("签到区-任务中心: 当前无任何任务。") + break + do_task = next((t for t in all_tasks if t.get('taskState') == '1' and t.get('taskType') == '5'), None) + if do_task: + self.log(f"签到区-任务中心: 开始执行任务 [{do_task.get('taskName')}]") + self.sign_doTaskFromList(do_task) + time.sleep(3) + continue + claim_task = next((t for t in all_tasks if t.get('taskState') == '0'), None) + if claim_task: + self.log(f"签到区-任务中心: 发现可领取奖励的任务 [{claim_task.get('taskName')}]") + self.sign_getTaskReward(claim_task.get('id')) + time.sleep(2) + continue + if i == 0: + self.log("签到区-任务中心: 没有可执行或可领取的任务。") + else: + self.log("签到区-任务中心: 所有任务处理完毕。") + break + except Exception as e: + self.log(f"sign_getTaskList 异常: {str(e)}") + + def sign_doTaskFromList(self, task): + try: + if task.get('url') and task['url'] != '1' and task['url'].startswith('http'): + self.request("get", task['url'], headers={"Referer": "https://img.client.10010.com/"}) + self.log(f"签到区-任务中心: 浏览页面 [{task.get('taskName')}]") + time.sleep(random.uniform(5, 7)) + orderId = self.gettaskip() + url = "https://activity.10010.com/sixPalaceGridTurntableLottery/task/completeTask" + params = { + "taskId": task.get('id'), + "orderId": orderId, + "systemCode": "QDQD" + } + res = self.request("get", url, params=params) + if not res: return + result = res.json() + code = result.get('code') + if code == "0000": + self.log(f"签到区-任务中心: ✅ 任务 [{task.get('taskName')}] 已完成") + else: + self.log(f"签到区-任务中心: ❌ 任务 [{task.get('taskName')}] 完成失败[{code}]: {result.get('desc', '未知错误')}") + except Exception as e: + self.log(f"sign_doTaskFromList 异常: {str(e)}") + + def sign_getTaskReward(self, task_id): + try: + url = "https://activity.10010.com/sixPalaceGridTurntableLottery/task/getTaskReward" + res = self.request("get", url, params={"taskId": task_id}) + if not res: return + result = res.json() + code = result.get('code') + if code == "0000": + data = result.get('data', {}) + if data.get('code') == '0000': + self.log(f"签到区-领取奖励: [{data.get('prizeName', '')}] {data.get('prizeNameRed', '')}") + else: + self.log(f"签到区-领取奖励失败[{data.get('code')}]: {result.get('desc') or data.get('desc')}") + else: + self.log(f"签到区-领取奖励失败[{code}]: {result.get('desc', '')}") + except Exception as e: + self.log(f"sign_getTaskReward 异常: {str(e)}") + + def sign_grabCoupon(self): + sc = globalConfig.get("sign_config", {}) + if not sc.get("run_grab_coupon", False): + return + self.log(f"⚔️ [抢兑阶段] 正在检查目标: {GRAB_AMOUNT}元 话费券...") + candidates = [] + try: + url = "https://act.10010.com/SigninApp/new_convert/prizeList" + headers = {"Origin": "https://img.client.10010.com"} + res = self.request("post", url, headers=headers) + if res: + list_res = res.json() + if list_res.get('status') == "0000": + details = list_res.get('data', {}).get('datails', {}) + tab_items = details.get('tabItems', []) + self.log(f"📋 [调试] 共获取到 {len(tab_items)} 个场次数据") + for tab in tab_items: + products = tab.get('timeLimitQuanListData', []) + round_time_str = tab.get('time', '') + round_date = None + try: + if round_time_str and ":" in round_time_str: + now = datetime.now() + date_str = now.strftime('%Y/%m/%d') + full_time_str = f"{date_str} {round_time_str}" + if len(round_time_str) <= 8: + round_date = datetime.strptime(full_time_str, "%Y/%m/%d %H:%M") + else: + round_date = datetime.strptime(round_time_str, "%Y-%m-%d %H:%M:%S") + except: + pass + for item in products: + p_name = item.get('product_name', '') + if str(GRAB_AMOUNT) in p_name and ("元" in p_name or "话费" in p_name): + self.log(f" ✅ 发现目标: {p_name} (ID: {item.get('product_id')})") + candidates.append({ + "id": item.get('product_id'), + "name": p_name, + "typeCode": item.get('type_code') or '0', + "timeStr": round_time_str, + "startTime": round_date, + "itemData": item + }) + except Exception as e: + self.log(f"❌ 获取奖品列表失败: {str(e)}") + if not candidates: + self.log(f"⚠️ 未在任何场次中匹配到名为 '{GRAB_AMOUNT}元' 的奖品。") + return + now = datetime.now() + best_candidate = None + min_diff = float('inf') + for cand in candidates: + start_time = cand['startTime'] + if not start_time: continue + diff = (start_time - now).total_seconds() + score = 0 + if diff > 0: + score = diff + elif diff > -600: + score = abs(diff) + 10000 + else: + score = abs(diff) + 90000 + if score < min_diff: + min_diff = score + best_candidate = cand + if not best_candidate: + best_candidate = candidates[0] + self.log(f"🎯 最终锁定场次: [{best_candidate['timeStr']}] {best_candidate['name']}") + if best_candidate['startTime']: + start_time = best_candidate['startTime'] + wait_seconds = (start_time - datetime.now()).total_seconds() + if wait_seconds > 0: + if wait_seconds > 300: + self.log(f"⏳ 距离开抢还有 {wait_seconds:.1f} 秒,大于5分钟,暂不等待。建议在临近时间(如提前2分钟)再运行脚本。") + return + self.log(f"⏳ 正在等待开抢... (剩余 {wait_seconds:.1f} 秒)") + while (best_candidate['startTime'] - datetime.now()).total_seconds() > 0.5: + time.sleep(0.5) + else: + self.log(f"⚡ 当前时间已超过场次时间 {abs(wait_seconds):.1f}s,直接抢兑!") + self.sign_grab_execute(best_candidate) + + def sign_grab_execute(self, candidate): + for i in range(1, 6): + self.log(f"🔥 [第{i}次冲击] 发起兑换请求...") + try: + data = { + "product_id": candidate['id'], + "typeCode": candidate['typeCode'] + } + url = GRAB_URL + headers = { + "Origin": "https://img.client.10010.com", + "Referer": "https://img.client.10010.com/", + "X-Requested-With": "com.sinovatech.unicom.ui" + } + res = self.request("post", url, data=data, headers=headers) + if not res: continue + result = res.json() + uuid_val = result.get('data', {}).get('uuid') + status = result.get('status') + if status == "0000" and uuid_val: + self.log(f"📝 [提交成功] 获取到工单号: {uuid_val},正在查询最终结果...") + check_url = "https://act.10010.com/SigninApp/convert/prizeConvertResult" + check_data = { "uuid": uuid_val } + check_res = self.request("post", check_url, data=check_data, headers=headers) + if not check_res: continue + final_res = check_res.json() + final_status = final_res.get('status') + if final_status == "0000": + self.log(f"🎉🎉🎉 [抢兑成功] 恭喜!已成功抢到目标奖品! 🎉🎉🎉", notify=True) + return + else: + err_code = final_res.get('data', {}).get('errorCode', '') + msg = final_res.get('msg', '') or final_res.get('message', '未知原因') + detail_msg = final_res.get('data', {}).get('rightBtn', {}).get('name', '') + log_msg = f"💔 [抢兑失败] 状态: {final_status}" + if err_code: log_msg += f" | 错误码: {err_code}" + if detail_msg: log_msg += f" | 详情: {detail_msg}" + log_msg += f" | 提示: {msg}" + self.log(log_msg, notify=True) + else: + self.log(f"📝 提交结果: {result.get('msg') or result.get('message') or json.dumps(result)}") + time.sleep(0.2) + except Exception as e: + self.log(f"❌ 抢兑异常: {str(e)}") + + def get_wocare_body(self, apiCode, requestData={}): + timestamp = datetime.now().strftime('%Y%m%d%H%M%S') + str(int(datetime.now().microsecond / 1000)).zfill(3) + encodedContent = base64.b64encode(json.dumps(requestData, separators=(',', ':')).encode('utf-8')).decode('utf-8') + body = { + "version": WOCARE_CONSTANTS["minRetries"], + "apiCode": apiCode, + "channelId": WOCARE_CONSTANTS["anotherApiKey"], + "transactionId": timestamp + self.random_string(6, "0123456789"), + "timeStamp": timestamp, + "messageContent": encodedContent + } + params_array = [] + for key in sorted(body.keys()): + params_array.append(f"{key}={body[key]}") + params_array.append(f"sign={WOCARE_CONSTANTS['anotherEncryptionKey']}") + sign_str = "&".join(params_array) + body["sign"] = hashlib.md5(sign_str.encode('utf-8')).hexdigest() + return body + + def wocare_api(self, apiCode, requestData={}): + try: + url = f"https://wocare.unisk.cn/api/v1/{apiCode}" + body = self.get_wocare_body(apiCode, requestData) + res = self.request("post", url, data=body) + if not res: return None + result = res.json() + if result.get("messageContent"): + try: + content = result["messageContent"] + content = content.replace('\n', '').replace('\r', '').replace(' ', '') + content = content.replace('-', '+').replace('_', '/') + missing_padding = len(content) % 4 + if missing_padding: + content += '=' * (4 - missing_padding) + try: + decoded_bytes = base64.b64decode(content) + decoded_str = decoded_bytes.decode('utf-8') + except UnicodeDecodeError: + decoded_str = decoded_bytes.decode('utf-8', errors='replace') + except Exception as e: + decoded_str = "{}" + try: + decoded = json.loads(decoded_str, strict=False) + except: + decoded_str = re.sub(r'[\x00-\x1f\x7f]', '', decoded_str) + try: + decoded = json.loads(decoded_str, strict=False) + except: + decoded = {} + if isinstance(decoded, dict): + if "data" in decoded: + result["data"] = decoded["data"] + else: + result["data"] = decoded + if "resultMsg" in decoded: + result["resultMsg"] = decoded["resultMsg"] + if "resultCode" in decoded: + result["resultCode"] = decoded["resultCode"] + except Exception as e: + self.log(f"联通祝福: 解析返回失败: {str(e)}") + return result + except Exception as e: + self.log(f"wocare_api 异常: {str(e)}") + return None + + def wocare_getToken(self, ticket): + try: + url = "https://wocare.unisk.cn/mbh/getToken" + params = { + "channelType": WOCARE_CONSTANTS["serviceLife"], + "type": "02", + "ticket": ticket, + "version": COMMON_CONSTANTS["APP_VERSION"], + "timestamp": datetime.now().strftime('%Y%m%d%H%M%S') + str(int(datetime.now().microsecond / 1000)).zfill(3), + "desmobile": self.account_mobile, + "num": "0", + "postage": self.random_string(32), + "homePage": "home", + "duanlianjieabc": "qAz2m", + "userNumber": self.account_mobile + } + res = self.session.get(url, params=params, allow_redirects=False, timeout=15) + if res.status_code == 302: + location = res.headers.get("Location", "") + if location: + parsed = urlparse(location) + sid = parse_qs(parsed.query).get("sid", [None])[0] + if not sid: + sid = parse_qs(parsed.query).get("uuid", [None])[0] + if sid: + self.log(f"联通祝福: 未找到sid,使用uuid替代: {sid}") + if sid: + self.wocare_sid = sid + return self.wocare_loginmbh() + else: + self.log(f"联通祝福: 没有获取到sid或uuid, Location: {location}") + else: + self.log("联通祝福: 没有获取到location") + else: + self.log(f"联通祝福: 获取sid失败[{res.status_code}]") + except Exception as e: + self.log(f"wocare_getToken 异常: {str(e)}") + return False + + def wocare_loginmbh(self): + try: + apiCode = "loginmbh" + requestData = { + "sid": self.wocare_sid, + "channelType": WOCARE_CONSTANTS["serviceLife"], + "apiCode": apiCode + } + result = self.wocare_api(apiCode, requestData) + if not result: return False + responseResult = result + resultCode = responseResult.get("resultCode", "-1") + if resultCode == "0000": + self.wocare_token = responseResult.get("data", {}).get("token") + self.log("联通祝福: 登录成功") + return True + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc") or "" + self.log(f"联通祝福: 登录失败[{resultCode}]: {msg}") + except Exception as e: + self.log(f"wocare_loginmbh 异常: {str(e)}") + return False + + def wocare_getDrawTask(self, activity): + try: + apiCode = "getDrawTask" + requestData = { + "token": self.wocare_token, + "channelType": WOCARE_CONSTANTS["serviceLife"], + "type": activity["id"], + "apiCode": apiCode + } + result = self.wocare_api(apiCode, requestData) + responseResult = result if result else {} + resultCode = responseResult.get("resultCode", "-1") + if resultCode == "0000": + taskList = responseResult.get("data", {}).get("taskList", []) or [] + if not taskList: + pass + else: + self.log(f"联通祝福: [{activity['name']}] 查询到 {len(taskList)} 个任务") + for task in taskList: + ts = task.get("taskStatus") + if str(ts) == "0" or not ts: + self.wocare_completeTask(activity, task) + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc") or "" + self.log(f"联通祝福: [{activity['name']}]查询任务失败[{resultCode}]: {msg}") + except Exception as e: + self.log(f"wocare_getDrawTask 异常: {str(e)}") + + def wocare_completeTask(self, activity, task, taskStep="1"): + try: + taskTitle = task.get("title", "") + action = "领取任务" if taskStep == "1" else "完成任务" + apiCode = "completeTask" + requestData = { + "token": self.wocare_token, + "channelType": WOCARE_CONSTANTS["serviceLife"], + "task": task.get("id"), + "taskStep": taskStep, + "type": activity["id"], + "apiCode": apiCode + } + result = self.wocare_api(apiCode, requestData) + responseResult = result if result else {} + resultCode = responseResult.get("resultCode", "-1") + if resultCode == "0000": + self.log(f"联通祝福: {action}[{taskTitle}]成功") + if taskStep == "1": + time.sleep(1) + self.wocare_completeTask(activity, task, "4") + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc") or "" + self.log(f"联通祝福: [{activity['name']}]{action}[{taskTitle}]失败[{resultCode}]: {msg}") + except Exception as e: + self.log(f"wocare_completeTask 异常: {str(e)}") + + def wocare_getSpecificityBanner(self): + try: + apiCode = "getSpecificityBanner" + requestData = { + "token": self.wocare_token, + "apiCode": apiCode + } + result = self.wocare_api(apiCode, requestData) + responseResult = result if result else {} + resultCode = responseResult.get("resultCode", "-1") + if resultCode == "0000": + bannerList = responseResult.get("data", []) or [] + if not bannerList: + self.log(f"联通祝福: 获取动态 Banner 列表为空,接口明细: {responseResult}") + for banner in bannerList: + if str(banner.get("activityStatus")) == "0" and str(banner.get("isDeleted")) == "0": + self.wocare_getDrawTask(banner) + self.wocare_loadInit(banner) + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc", "") + self.log(f"联通祝福: 进入活动失败[{resultCode}]: {msg}") + except Exception as e: + self.log(f"wocare_getSpecificityBanner 异常: {str(e)}") + + def wocare_loadInit(self, activity): + try: + apiCode = "loadInit" + requestData = { + "token": self.wocare_token, + "channelType": WOCARE_CONSTANTS["serviceLife"], + "type": activity["id"], + "apiCode": apiCode + } + result = self.wocare_api(apiCode, requestData) + responseResult = result if result else {} + resultCode = responseResult.get("resultCode", "-1") + if resultCode == "0000": + responseData = responseResult.get("data", {}) or {} + activeModuleGroupId = responseData.get("zActiveModuleGroupId") + drawCount = 0 + aid = activity["id"] + if aid == 2: + isPartake = responseData.get("data", {}).get("isPartake") or 0 + if not isPartake: + drawCount = 1 + elif aid == 3: + drawCount = int(responseData.get("raffleCountValue", 0) or 0) + elif aid == 4: + drawCount = int(responseData.get("mhRaffleCountValue", 0) or 0) + if drawCount > 0: + self.log(f"联通祝福: [{activity['name']}] 可抽奖次数 {drawCount}") + else: + self.log(f"联通祝福: [{activity['name']}] 今日已无抽奖机会") + while drawCount > 0: + time.sleep(2) + self.wocare_luckDraw(activity, activeModuleGroupId) + drawCount -= 1 + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc") or "" + self.log(f"联通祝福: [{activity['name']}]查询活动失败[{resultCode}]: {msg}") + except Exception as e: + self.log(f"wocare_loadInit 异常: {str(e)}") + + def wocare_luckDraw(self, activity, activeModuleGroupId): + try: + apiCode = "luckDraw" + requestData = { + "token": self.wocare_token, + "channelType": WOCARE_CONSTANTS["serviceLife"], + "zActiveModuleGroupId": activeModuleGroupId, + "type": activity["id"], + "apiCode": apiCode + } + result = self.wocare_api(apiCode, requestData) + responseResult = result if result else {} + resultCode = responseResult.get("resultCode", "-1") + if resultCode == "0000": + resultData = responseResult.get("data", {}) or {} + drawResultCode = resultData.get("resultCode", "-1") + if drawResultCode == "0000": + prize = resultData.get("data", {}).get("prize", {}) + prizeName = prize.get("prizeName", "") + prizeDesc = prize.get("prizeDesc", "") + self.log(f"联通祝福: [{activity['name']}]抽奖: {prizeName}[{prizeDesc}]", notify=True) + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc") or "" + if msg.lower() == "success": + self.log(f"联通祝福: [{activity['name']}] 未中奖 (继续努力)") + else: + self.log(f"联通祝福: [{activity['name']}] 抽奖并未中奖: {msg}") + else: + msg = responseResult.get("resultMsg") or responseResult.get("resultDesc") or "" + if msg.lower() == "success": + self.log(f"联通祝福: [{activity['name']}] 未中奖 (继续努力)") + else: + self.log(f"联通祝福: [{activity['name']}] 抽奖异常[{resultCode}]: {msg}") + except Exception as e: + self.log(f"wocare_luckDraw 异常: {str(e)}") + + def parse_jwt_payload(self, token): + try: + payload = token.split('.')[1] + padding = len(payload) % 4 + if padding: + payload += '=' * (4 - padding) + payload = payload.replace('-', '+').replace('_', '/') + decoded_bytes = base64.b64decode(payload) + return json.loads(decoded_bytes.decode('utf-8')) + except Exception as e: + self.log(f"JWT Decode Error: {e}") + return {} + + def generate_market_signature_headers(self, user_token, query_string="", json_body=""): + try: + token = user_token.replace('Bearer ', '') + payload = self.parse_jwt_payload(token) + login_id = payload.get('loginId', '') + app_secret = hashlib.md5(f"al:ak:{login_id}".encode('utf-8')).hexdigest() + nonce = str(uuid.uuid4()) + message = f"{login_id}{app_secret}{nonce}{query_string or ''}{json_body or ''}" + signature = base64.b64encode( + hmac.new( + app_secret.encode('utf-8'), + message.encode('utf-8'), + digestmod=hashlib.sha256 + ).digest() + ).decode('utf-8') + return { + 'X-User-Id': login_id, + 'X-Nonce': nonce, + 'X-Timestamp': str(int(time.time() * 1000)), + 'X-Signature': signature, + 'Content-Type': 'application/json' + } + except Exception as e: + self.log(f"Signature Generation Error: {e}") + return {} + + def generate_market_watering_signature_headers(self, user_token, xbsosjl, login_id): + try: + signature_ts = str(int(time.time() * 1000)) + message = f"td:433:tp{xbsosjl}td:334:et{login_id}td:334:et{signature_ts}td:334:et" + signature = base64.b64encode( + hmac.new( + str(login_id).encode('utf-8'), + message.encode('utf-8'), + digestmod=hashlib.sha256, + ).digest() + ).decode('utf-8') + return {'X-Signature': signature} + except Exception as e: + self.log(f"Market Watering Signature Error: {e}") + return {} + + def get_market_headers(self, user_token): + return { + 'User-Agent': COMMON_CONSTANTS['MARKET_UA'], + 'Authorization': f"Bearer {user_token}", + 'Content-Type': 'application/json', + 'X-Requested-With': 'com.sinovatech.unicom.ui' + } + + def market_get_ticket(self): + self.log("权益超市: 正在获取 ticket...") + target_url = "https://contact.bol.wo.cn/market" + res = self.openPlatLineNew(target_url) + if res and 'ticket' in res: + self.log("权益超市: 获取ticket成功") + return res['ticket'] + self.log("权益超市: 获取ticket失败") + return None + + def market_get_user_token(self, ticket): + url = f"https://backward.bol.wo.cn/prod-api/auth/marketUnicomLogin?ticket={ticket}" + headers = { + 'User-Agent': COMMON_CONSTANTS['MARKET_UA'], + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + } + for attempt in range(1, 4): + try: + self.log(f"权益超市: 正在获取 userToken...{f' (第{attempt}次重试)' if attempt > 1 else ''}") + res = self.session.post(url, headers=headers, timeout=30).json() + if res.get('code') == 200: + user_token = res.get('data', {}).get('token') + if user_token: + self.log("权益超市: 获取userToken成功") + return user_token + self.log(f"权益超市: 获取userToken失败: {res.get('msg')}") + except Exception as e: + self.log(f"权益超市: 获取userToken异常: {e}") + if attempt < 3: + self.log(f"权益超市: 等待5秒后重试...") + time.sleep(5) + return None + + def query_market_watering_status(self, user_token): + try: + status_url = "https://backward.bol.wo.cn/prod-api/promotion/activityTask/getMultiCycleProcess?activityId=13" + headers = self.get_market_headers(user_token) + res = self.session.get(status_url, headers=headers).json() + if res.get('code') == 200: + data = res.get('data', {}) + triggered_time = data.get('triggeredTime', 0) + trigger_time = data.get('triggerTime', 0) + create_date = data.get('createDate', '') + self.log(f"权益超市-浇花当前状况: 进度 {triggered_time}/{trigger_time}", notify=True) + if triggered_time >= trigger_time: + self.log("权益超市-浇花: 🌟 您有鲜花权益待领取! (连续浇花已满) 🌟", notify=True) + else: + today_str = datetime.now().strftime('%Y-%m-%d') + last_watered = create_date.split(' ')[0] if create_date else '' + if today_str == last_watered: + self.log(f"权益超市-浇花: 今日已浇水 (最后: {create_date})", notify=True) + else: + self.log("权益超市-浇花: 今日尚未浇水。") + else: + self.log(f"权益超市-浇花查验: 查询状态失败: {res.get('msg')}") + except Exception as e: + self.log(f"权益超市-浇花查验: 异常: {e}") + + def market_watering_task(self, user_token): + self.log("权益超市: 浇花任务开始...") + try: + status_url = "https://backward.bol.wo.cn/prod-api/promotion/activityTask/getMultiCycleProcess?activityId=13" + headers = self.get_market_headers(user_token) + res = self.session.get(status_url, headers=headers).json() + if res.get('code') != 200: + self.log(f"权益超市-浇花: 获取状态失败: {res.get('msg')}") + return + data = res.get('data', {}) + triggered_time = data.get('triggeredTime', 0) + trigger_time = data.get('triggerTime', 0) + create_date = data.get('createDate', '') + self.log(f"权益超市-浇花: 当前进度 {triggered_time}/{trigger_time}", notify=True) + if triggered_time >= trigger_time: + self.log("权益超市-浇花: 🌟 您有鲜花权益待领取! (连续浇花已满) 🌟", notify=True) + return + today_str = datetime.now().strftime('%Y-%m-%d') + last_watered = create_date.split(' ')[0] if create_date else '' + if today_str == last_watered: + self.log(f"权益超市-浇花: 今日已浇水 (最后: {create_date})", notify=True) + return + self.log("权益超市-浇花: 今日未浇水,执行浇水操作...") + token = user_token.replace('Bearer ', '') + payload = self.parse_jwt_payload(token) + login_id = payload.get('loginId', '') + if not login_id: + self.log("权益超市-浇花: ❌ 无法获取登录标识,跳过") + return + xbsosjl = "Y1mN8fNYktY0" + request_ts = str(int(time.time() * 1000)) + query_string = f"xbsosjl={xbsosjl}&timeVerRan={request_ts}&diceid={login_id}" + watering_url = f"https://backward.bol.wo.cn/prod-api/promotion/activityTaskShare/checkWatering?{query_string}" + req_headers = { + 'Authorization': f"Bearer {user_token.replace('Bearer ', '')}", + 'X-Signature': self.generate_market_watering_signature_headers(user_token, xbsosjl, login_id).get('X-Signature', ''), + 'User-Agent': COMMON_CONSTANTS['MARKET_H5_UA'], + 'Content-Type': 'application/json', + 'Origin': 'https://contact.bol.wo.cn', + 'Referer': 'https://contact.bol.wo.cn/', + 'X-Requested-With': 'com.sinovatech.unicom.ui', + 'Accept': '*/*', + } + res = self.session.post(watering_url, headers=req_headers, data="{}").json() + if res.get('code') == 200: + self.log("权益超市-浇花: ✅ 浇水成功!", notify=True) + return + self.log(f"权益超市-浇花: ❌ 浇水失败: {res.get('msg')}") + except Exception as e: + self.log(f"权益超市-浇花: 异常: {e}") + + def market_get_raffle(self, user_token): + self.log("权益超市: 正在查询奖品池...") + try: + timestamp = int(time.time() * 1000) + query_string = f"id=12&timeVerRan={timestamp}" + json_body = "{}" + sig_headers = self.generate_market_signature_headers(user_token, query_string, json_body) + url = f"https://backward.bol.wo.cn/prod-api/promotion/home/raffleActivity/prizeList?{query_string}" + headers = self.get_market_headers(user_token) + headers.update(sig_headers) + headers['Referer'] = 'https://contact.bol.wo.cn/market' + headers['Origin'] = 'https://contact.bol.wo.cn' + res = self.session.post(url, headers=headers, data=json_body).json() + if res.get('code') == 200 and isinstance(res.get('data'), list): + keywords = ['月卡', '月会员', '月度', 'VIP月', '一个月', '周卡'] + exclude = ['5G宽视界', '沃视频'] + live_prizes = [] + for p in res['data']: + vip_prob = float(p.get('probabilityVip') or p.get('newVipProbability') or 0) + norm_prob = float(p.get('probability') or 0) + name = p.get('name', '') + daily_limit = int(p.get('dailyPrizeLimit') or 0) + match = any(k in name for k in keywords) + not_excluded = not any(e in name for e in exclude) + has_stock = daily_limit > 0 + has_chance = norm_prob > 0 or vip_prob > 0 + if match and not_excluded and has_stock and has_chance: + live_prizes.append(p) + total_limit = int(p.get('quantity') or 0) + self.log(f"权益超市: 【{name}】监测到放水 (日库存:{daily_limit}, 总库存:{total_limit}, 普通概率:{(norm_prob * 100):.4f}%, VIP概率:{(vip_prob * 100):.4f}%)") + if live_prizes: + return True + self.log("权益超市: 📢 未监测到高价值权益放水") + return False + except Exception as e: + self.log(f"权益超市: 查询奖品池异常: {e}") + return False + + def market_get_raffle_count(self, user_token): + try: + timestamp = int(time.time() * 1000) + query_string = f"id=12&channel=unicomTab&timeVerRan={timestamp}" + json_body = "{}" + sig_headers = self.generate_market_signature_headers(user_token, query_string, json_body) + url = f"https://backward.bol.wo.cn/prod-api/promotion/home/raffleActivity/getUserRaffleCountExt?{query_string}" + headers = self.get_market_headers(user_token) + headers.update(sig_headers) + headers['Referer'] = 'https://contact.bol.wo.cn/market' + headers['Origin'] = 'https://contact.bol.wo.cn' + res = self.session.post(url, headers=headers, data=json_body).json() + count = 0 + if res.get('code') == 200: + data = res.get('data') + if isinstance(data, dict): + count = int(data.get('raffleCount') or 0) + else: + count = int(data or 0) + if count > 0: + self.log(f"权益超市: ✅ 当前抽奖次数: {count}") + for i in range(count): + self.log(f"权益超市: 🎯 第 {i+1} 次抽奖...") + if not self.market_user_raffle(user_token): + break + time.sleep(3 + random.random() * 2) + else: + self.log("权益超市: 当前无抽奖次数") + except Exception as e: + self.log(f"权益超市: 查询抽奖次数异常: {e}") + + def market_user_raffle(self, user_token): + try: + timestamp = int(time.time() * 1000) + query_string = f"id=12&channel=unicomTab&timeVerRan={timestamp}" + json_body = "{}" + sig_headers = self.generate_market_signature_headers(user_token, query_string, json_body) + url = f"https://backward.bol.wo.cn/prod-api/promotion/home/raffleActivity/userRaffle?{query_string}" + headers = self.get_market_headers(user_token) + headers.update(sig_headers) + headers['Referer'] = 'https://contact.bol.wo.cn/market' + res = self.session.post(url, headers=headers, data=json_body).json() + if res.get('code') == 200: + data = res.get('data', {}) + prize_name = data.get('prizesName', '') + message = data.get('message') or res.get('msg') or "" + if prize_name and "谢谢参与" not in prize_name: + self.log(f"权益超市: 🎉 抽奖成功: {prize_name}", notify=True) + return True + self.log(f"权益超市: 💨 未中奖: {message}", notify=True) + return True + self.log(f"权益超市: 抽奖失败: {res.get('msg')}") + return False + except Exception as e: + self.log(f"权益超市: 抽奖异常: {e}") + return False + + def market_get_all_tasks(self, ecs_token, user_token): + url = "https://backward.bol.wo.cn/prod-api/promotion/activityTask/getAllActivityTasks?activityId=12" + headers = { + "Authorization": f"Bearer {user_token}", + "User-Agent": COMMON_CONSTANTS["MARKET_UA"], + "Origin": "https://contact.bol.wo.cn", + "Referer": "https://contact.bol.wo.cn/", + "Cookie": f"ecs_token={ecs_token}" + } + for attempt in range(1, 4): + try: + self.log(f"权益超市: 正在获取任务列表...{f' (第{attempt}次重试)' if attempt > 1 else ''}") + res = self.session.get(url, headers=headers, timeout=15).json() + if res.get('code') == 200: + tasks = res.get('data', {}).get('activityTaskUserDetailVOList', []) + self.log(f"权益超市: 成功获取到 {len(tasks)} 个任务") + return tasks + self.log(f"权益超市: 查询任务列表失败: {res.get('msg')}") + except Exception as e: + self.log(f"权益超市: 获取任务列表异常: {e}") + if attempt < 3: + self.log("权益超市: 等待5秒后重试...") + time.sleep(5) + return [] + + def market_do_share_list(self, share_list, user_token): + self.log("权益超市: 开始执行任务...") + for task in share_list: + name = task.get('name', '') + param = task.get('param1', '') + trigger_time = task.get('triggerTime', 0) + triggered_time = task.get('triggeredTime', 0) + if any(k in name for k in ["购买", "秒杀"]): + self.log(f"权益超市: 🚫 {name} [跳过]") + continue + if triggered_time >= trigger_time: + self.log(f"权益超市: ✅ {name} [已完成]") + continue + url = "" + if any(k in name for k in ["浏览", "查看"]): + url = f"https://backward.bol.wo.cn/prod-api/promotion/activityTaskShare/checkView?checkKey={param}" + elif "分享" in name: + url = f"https://backward.bol.wo.cn/prod-api/promotion/activityTaskShare/checkShare?checkKey={param}" + if url: + try: + headers = { + "Authorization": f"Bearer {user_token}", + "User-Agent": COMMON_CONSTANTS["MARKET_UA"], + "Origin": "https://contact.bol.wo.cn", + "Referer": "https://contact.bol.wo.cn/" + } + res = self.session.post(url, json={}, headers=headers, timeout=15).json() + if res.get('code') == 200: + self.log(f"权益超市: ✅ {name} [执行成功]") + else: + self.log(f"权益超市: ❌ {name} [执行失败]: {res.get('msg')}") + except Exception as e: + self.log(f"权益超市: ❌ {name} [执行异常]: {e}") + time.sleep(2) + + def market_get_points_ticket(self, user_token): + try: + res = self.session.get( + "https://backward.bol.wo.cn/prod-api/auth/getTicket?channel=pointsPlatform", + headers={ + "Authorization": f"Bearer {user_token}", + "User-Agent": COMMON_CONSTANTS["MARKET_UA"], + }, + timeout=15, + ).json() + if res.get("code") == 200 and res.get("data"): + return res.get("data") + self.log(f"权益超市-会员中心: 获取 points ticket 失败: {res.get('msg') or res}") + except Exception as e: + self.log(f"权益超市-会员中心: 获取 points ticket 异常: {e}") + return None + + def market_member_center_base_headers(self, points_ticket): + referer = ( + f"https://m.jf.10010.com/ts-mobile/well/{MARKET_MEMBER_CENTER_PAGE_ID}" + f"?distributeId={MARKET_MEMBER_CENTER_DISTRIBUTE_ID}" + f"&partnersId={MARKET_MEMBER_CENTER_PARTNERS_ID}" + f"&clientType={MARKET_MEMBER_CENTER_CLIENT_TYPE}" + f"&ticket={points_ticket}" + ) + return { + "origin": "https://m.jf.10010.com", + "clienttype": MARKET_MEMBER_CENTER_CLIENT_TYPE, + "ticket": points_ticket, + "partnersid": MARKET_MEMBER_CENTER_PARTNERS_ID, + "content-type": "application/json;charset=UTF-8", + "pageid": MARKET_MEMBER_CENTER_PAGE_ID, + "Accept": "application/json, text/plain, */*", + "Referer": referer, + "User-Agent": COMMON_CONSTANTS["MARKET_H5_UA"], + "X-Requested-With": "com.sinovatech.unicom.ui", + } + + def market_get_secret_key_jf(self, points_ticket): + if ( + getattr(self, "market_jf_secretKey", None) + and getattr(self, "market_jf_ticket", None) == points_ticket + ): + return self.market_jf_secretKey + try: + res = self.session.get( + "https://m.jf.10010.com/jf-external-application/jftask/getSecretKey", + headers=self.market_member_center_base_headers(points_ticket), + timeout=10, + ).json() + secret = res.get("data", {}).get("secretKey") + if res.get("code") == "0000" and secret: + self.market_jf_ticket = points_ticket + self.market_jf_secretKey = secret.encode("utf-8") + return self.market_jf_secretKey + self.log(f"权益超市-会员中心: getSecretKey 失败: {res}") + except Exception as e: + self.log(f"权益超市-会员中心: getSecretKey 异常: {e}") + return None + + def market_build_signature_headers_jf(self, points_ticket): + secret_key = self.market_get_secret_key_jf(points_ticket) + if not secret_key: + return {} + request_ts = str(round(time.time() * 1000)) + nonce = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8)) + signature = hmac.new( + secret_key, + f"{nonce}{request_ts}".encode("utf-8"), + hashlib.sha256, + ).hexdigest() + return { + "x-request-timestamp": request_ts, + "x-request-nonce": nonce, + "x-request-signature": signature, + } + + def market_member_center_headers(self, points_ticket, with_sign=False): + headers = self.market_member_center_base_headers(points_ticket) + if with_sign: + headers.update(self.market_build_signature_headers_jf(points_ticket)) + return headers + + def market_prepare_member_center_context(self, points_ticket): + signed_headers = self.market_member_center_headers(points_ticket, with_sign=True) + try: + self.session.post( + "https://m.jf.10010.com/jf-external-application/page/query", + json={ + "activityId": MARKET_MEMBER_CENTER_PAGE_ID, + "distributeId": MARKET_MEMBER_CENTER_DISTRIBUTE_ID, + "partnersId": MARKET_MEMBER_CENTER_PARTNERS_ID, + }, + headers=signed_headers, + timeout=10, + ) + except Exception as e: + self.log(f"权益超市-会员中心: page/query 预热异常: {e}") + try: + self.session.post( + "https://m.jf.10010.com/jf-external-application/jftask/userInfo", + json={}, + headers=self.market_member_center_headers(points_ticket, with_sign=True), + timeout=10, + ) + except Exception as e: + self.log(f"权益超市-会员中心: userInfo 预热异常: {e}") + + def market_member_center_finish_code(self, task): + return safe_int(task.get("finish", task.get("status", 0)), 0) + + def market_member_center_finish_text(self, task): + finish_text = str(task.get("finishText", "")).strip() + if finish_text: + return finish_text + return { + 0: "未完成", + 99: "待领取", + 100: "已领取", + }.get(self.market_member_center_finish_code(task), "未知状态") + + def market_query_member_center_task(self, points_ticket): + try: + res = self.session.post( + "https://m.jf.10010.com/jf-external-application/jftask/taskDetail", + json={}, + headers=self.market_member_center_headers(points_ticket, with_sign=True), + timeout=10, + ).json() + if res.get("code") != "0000": + self.log(f"权益超市-会员中心: 查询任务失败: {res}") + return None + task_list = res.get("data", {}).get("taskDetail", {}).get("taskList", []) + return next( + (task for task in task_list if str(task.get("taskCode")) == MARKET_MEMBER_CENTER_TASK_CODE), + None, + ) + except Exception as e: + self.log(f"权益超市-会员中心: 查询任务异常: {e}") + return None + + def market_wait_member_center_task_state(self, points_ticket, expected_codes, attempts=4, delay=2): + task = None + for idx in range(1, attempts + 1): + task = self.market_query_member_center_task(points_ticket) + if task: + finish_code = self.market_member_center_finish_code(task) + finish_text = self.market_member_center_finish_text(task) + text_matches = ( + (finish_text == "待领取" and 99 in expected_codes) + or (finish_text == "已领取" and 100 in expected_codes) + ) + if finish_code in expected_codes or text_matches: + return task + self.log( + f"权益超市-会员中心: 第{idx}次回查状态 {finish_text}/{finish_code}," + f"本月进度 {safe_int(task.get('finishCount'), 0)}/{safe_int(task.get('needCount'), 0)}" + ) + if idx < attempts: + time.sleep(delay) + self.market_prepare_member_center_context(points_ticket) + return task + + def market_mark_member_center_browse_done(self, user_token, task_fix_id): + try: + headers = { + "Authorization": f"Bearer {user_token}", + "Origin": "https://contact.bol.wo.cn", + "Referer": "https://contact.bol.wo.cn/", + "Content-Type": "application/json", + "Accept": "*/*", + "User-Agent": COMMON_CONSTANTS["MARKET_H5_UA"], + "X-Requested-With": "com.sinovatech.unicom.ui", + } + detail = self.session.get( + f"https://backward.bol.wo.cn/prod-api/promotion/activityTask/getActivityTaskDetailByFixId?taskFixId={task_fix_id}", + headers=headers, + timeout=10, + ).json() + if detail.get("code") != 200: + self.log(f"权益超市-会员中心: 获取任务详情失败: {detail.get('msg') or detail}") + return False + task_data = detail.get("data") or {} + check_key = task_data.get("param1") + wait_seconds = max(safe_int(task_data.get("content"), 17), 15) + if not check_key: + self.log("权益超市-会员中心: 未拿到 checkKey,跳过浏览任务") + return False + self.log(f"权益超市-会员中心: 模拟浏览会员中心 {wait_seconds} 秒") + time.sleep(wait_seconds) + check = self.session.post( + f"https://backward.bol.wo.cn/prod-api/promotion/activityTaskShare/checkView?checkKey={check_key}", + json={}, + headers=headers, + timeout=10, + ).json() + if check.get("code") == 200 and check.get("data") is True: + self.log("权益超市-会员中心: 浏览完成,任务已进入待领取") + return True + self.log(f"权益超市-会员中心: checkView 失败: {check.get('msg') or check}") + except Exception as e: + self.log(f"权益超市-会员中心: 浏览任务异常: {e}") + return False + + def market_receive_member_center_points(self, points_ticket): + try: + res = self.session.post( + "https://m.jf.10010.com/jf-external-application/jfmarkettask/receive", + json={"taskCode": MARKET_MEMBER_CENTER_TASK_CODE}, + headers=self.market_member_center_headers(points_ticket, with_sign=True), + timeout=10, + ).json() + if res.get("code") == "0000": + score = res.get("data", {}).get("score", "未知积分") + title = res.get("data", {}).get("title", "领取成功") + self.log(f"权益超市-会员中心: ✅ {title},获得 {score}", notify=True) + return True + self.log(f"权益超市-会员中心: 领取失败: {res.get('msg') or res}") + except Exception as e: + self.log(f"权益超市-会员中心: 领取异常: {e}") + return False + + def market_member_center_task(self, user_token): + self.log("权益超市-会员中心: 开始检查浏览任务") + points_ticket = self.market_get_points_ticket(user_token) + if not points_ticket: + return + self.market_prepare_member_center_context(points_ticket) + task = self.market_query_member_center_task(points_ticket) + if not task: + self.log("权益超市-会员中心: 未找到目标任务") + return + finish_code = self.market_member_center_finish_code(task) + finish_text = self.market_member_center_finish_text(task) + finish_count = safe_int(task.get("finishCount"), 0) + need_count = safe_int(task.get("needCount"), 0) + self.log( + f"权益超市-会员中心: 当前状态 {finish_text}/{finish_code}," + f"本月进度 {finish_count}/{need_count}" + ) + if finish_count >= need_count: + self.log("权益超市-会员中心: 本月次数已达上限") + return + if finish_code == 100 or finish_text == "已领取": + self.log("权益超市-会员中心: 今日已领取,跳过") + return + if finish_code == 0 or finish_text == "未完成": + jump_url = str(task.get("jumpUrl", "")).strip() + match = re.search(r"taskFixId=(\d+)", jump_url) + task_fix_id = match.group(1) if match else "90" + if not self.market_mark_member_center_browse_done(user_token, task_fix_id): + return + self.market_prepare_member_center_context(points_ticket) + task = self.market_wait_member_center_task_state(points_ticket, {99, 100}, attempts=4, delay=2) + if not task: + return + finish_code = self.market_member_center_finish_code(task) + finish_text = self.market_member_center_finish_text(task) + self.log( + f"权益超市-会员中心: 浏览后状态 {finish_text}/{finish_code}," + f"本月进度 {safe_int(task.get('finishCount'), 0)}/{safe_int(task.get('needCount'), 0)}" + ) + if finish_code == 99 or finish_text == "待领取": + self.market_receive_member_center_points(points_ticket) + elif finish_code != 100: + self.log("权益超市-会员中心: 状态未及时刷新,尝试直接领奖兜底") + if self.market_receive_member_center_points(points_ticket): + return + self.log("权益超市-会员中心: 直接领奖兜底失败,跳过") + + def market_task(self, is_query_only=False): + self.log("==== 权益超市 ====") + ticket = self.market_get_ticket() + if not ticket: + return + user_token = self.market_get_user_token(ticket) + if not user_token: + return + if is_query_only: + self.query_market_watering_status(user_token) + self.query_market_raffle_records(user_token) + self.query_phone_recharge_records(user_token) + return + mc = globalConfig.get("market_config", {}) + if mc.get("run_water", True): + self.market_watering_task(user_token) + time.sleep(2) + else: + self.log("权益超市-浇水: ⏭️ 已被总开关关闭,跳过") + if mc.get("run_task", True): + if hasattr(self, 'ecs_token'): + share_list = self.market_get_all_tasks(self.ecs_token, user_token) + if share_list: + self.market_do_share_list(share_list, user_token) + else: + self.log("权益超市: 缺 ecs_token, 跳过通用任务列表") + else: + self.log("权益超市-做任务: ⏭️ 已被总开关关闭,跳过") + if mc.get("run_member_center", True): + time.sleep(2) + self.market_member_center_task(user_token) + else: + self.log("权益超市-会员中心: ⏭️ 已被子开关关闭,跳过") + if mc.get("run_draw", True): + if self.market_get_raffle(user_token): + self.market_get_raffle_count(user_token) + else: + self.log("权益超市-抽奖: ⏭️ 已被总开关关闭,跳过") + if mc.get("run_claim", False): + self.log("权益超市-领奖: 自动领奖已开启") + self.query_phone_recharge_records(user_token) + else: + self.log("权益超市-领奖: ⏭️ 未开启自动领奖") + self.query_market_raffle_records(user_token) + self.query_phone_recharge_records(user_token) + + def init_cloud_urls(self): + if not hasattr(self, 'cloudDiskUrls'): + self.cloudDiskUrls = { + 'onLine': "https://m.client.10010.com/mobileService/onLine.htm", + 'getTicketByNative': "https://m.client.10010.com/edop_ng/getTicketByNative", + 'userticket': "https://panservice.mail.wo.cn/api-user/api/user/ticket", + 'ltypDispatcher': "https://panservice.mail.wo.cn/wohome/dispatcher", + 'query': "https://m.jf.10010.com/jf-external-application/page/query", + 'taskDetail': "https://m.jf.10010.com/jf-external-application/jftask/taskDetail", + 'taskRecords': "https://m.jf.10010.com/jf-external-application/jftask/taskRecords", + 'dosign': "https://m.jf.10010.com/jf-external-application/jftask/sign", + 'upload2C': "https://tjupload.pan.wo.cn/openapi/client/upload2C", + 'doPopUp': "https://m.jf.10010.com/jf-external-application/jftask/popUp", + 'toFinish': "https://m.jf.10010.com/jf-external-application/jftask/toFinish", + 'lottery': "https://panservice.mail.wo.cn/activity/lottery", + 'openActivity': "https://panservice.mail.wo.cn/activity/openActivity", + 'checkActivityStatus': "https://panservice.mail.wo.cn/activity/checkActivityStatus", + 'userInfo': "https://m.jf.10010.com/jf-external-application/jftask/userInfo", + 'ai_query': "https://panservice.mail.wo.cn/wohome/ai/assistant/query", + 'lottery_times': "https://panservice.mail.wo.cn/activity/lottery/lottery-times", + 'aiMoveFile': "https://panservice.mail.wo.cn/wohome/open/v1/ai/moveFile2SystemFolder", + 'activityUpload2C': "https://du.smartont.net:8443/openapi/client/upload2C", + 'queryPhoneLocation': "https://panservice.mail.wo.cn/api-user/user/info/query", + 'getScanState': "https://s.pan.wo.cn/wohome/intelligentClean/getScanStateAndResult", + 'getCleanData': "https://s.pan.wo.cn/wohome/intelligentClean/getCleanData", + 'batchClean': "https://s.pan.wo.cn/wohome/intelligentClean/batchClean", + 'vote': "https://panservice.mail.wo.cn/activity/activity-task/vote", + 'secretKey': "https://m.jf.10010.com/jf-external-application/jftask/getSecretKey", + 'taskFinish': "https://panservice.mail.wo.cn/activity/member-point/v1/task/finish", + } + + def cloudRequest(self, url_name, payload, is_changer=False, method='post', custom_headers=None): + self.init_cloud_urls() + url = self.cloudDiskUrls.get(url_name) + if not url: + self.log(f"云盘无效的URL名称: {url_name}") + return {'result': None, 'headers': None} + headers = { + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301}", + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + } + if custom_headers: + headers.update(custom_headers) + if url_name in ['dosign', 'userInfo', 'doPopUp', 'toFinish', 'taskDetail', 'taskRecords']: + if not getattr(self.cloudDisk, 'userticket', None): + self.log(f"云盘 [{{url_name}}] userticket 未获取") + return {'result': None, 'headers': None} + headers['ticket'] = self.cloudDisk.userticket + headers['content-type'] = "application/json;charset=UTF-8" + headers['partnersid'] = "1649" + headers['origin'] = "https://m.jf.10010.com" + if getattr(self.cloudDisk, 'jeaId', None): + headers['Cookie'] = f"_jea_id={self.cloudDisk.jeaId};" + if url_name in ['dosign', 'toFinish']: + sig_headers = self.build_signature_headers_cloud() + if sig_headers: + headers.update(sig_headers) + if is_changer: + headers['clienttype'] = "yunpan_unicom_applet" + headers['x-requested-with'] = "com.sinovatech.unicom.ui" + if url_name == 'toFinish': + headers['User-Agent'] = "Mozilla/5.0 (Linux; Android 12; Redmi K30 Pro Build/SKQ1.220303.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.39 Mobile Safari/537.36/woapp LianTongYunPan/4.0.4 (Android 12)" + headers['clienttype'] = "yunpan_android" + headers['x-requested-with'] = "com.chinaunicom.bol.cloudapp" + else: + headers['clienttype'] = "yunpan_android" + headers['x-requested-with'] = "com.sinovatech.unicom.ui" + elif url_name == 'ai_query': + model_id = payload.get('modelId', 1) + headers.update({ + 'accept': 'text/event-stream', + 'X-YP-Access-Token': self.cloudDisk.userToken, + 'X-YP-App-Version': '5.0.12', + 'X-YP-Client-Id': '1001000035', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 9; SM-N9810 Build/PQ3A.190705.11211540; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/91.0.4472.114 Mobile Safari/537.36/woapp LianTongYunPan/5.0.12 (Android 9)', + 'Content-Type': 'application/json', + 'Origin': 'https://panservice.mail.wo.cn', + 'X-Requested-With': 'com.chinaunicom.bol.cloudapp', + 'Referer': f"https://panservice.mail.wo.cn/h5/wocloud_ai/?modelType={model_id}&clientId=1001000035&touchpoint=300300010001&token={self.cloudDisk.userToken}", + }) + elif url_name == 'lottery_times': + method = 'get' + headers.update({ + 'X-YP-Access-Token': self.cloudDisk.userToken, 'source-type': 'woapi', 'clientId': '1001000165', + 'token': self.cloudDisk.userToken, 'X-YP-Client-Id': '1001000165', + }) + elif url_name == 'aiMoveFile': + headers.update({ + 'X-YP-Device-Id': 'yOH1Y2/Ck5tBHRRBEAPCoGRGBOHCob7I', + 'app-type': 'liantongyunpanapp', + 'Access-Token': self.cloudDisk.userToken, + 'Client-Id': '1001000035', + 'App-Version': 'yp-app/5.1.0', + 'Sys-Version': 'Android/15', + 'User-Agent': 'LianTongYunPan/5.1.0 (Android 15)', + 'X-YP-Client-Id': '1001000035', + 'X-YP-Access-Token': self.cloudDisk.userToken, + 'oaid': '00000000', + 'Content-Type': 'application/json;charset=utf-8', + 'Origin': 'https://panservice.mail.wo.cn', + }) + elif url_name.startswith('cloud_') or 'shareCard' in url_name: + current_token = getattr(self.cloudDisk, 'userToken', '') + headers.update({ + 'Host': 'panservice.mail.wo.cn', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 15; PJZ110 Build/AP3A.240617.008; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.109 Mobile Safari/537.36/woapp LianTongYunPan/5.1.0 (Android 15)', + 'client-Id': '1001000035', + 'X-YP-Client-Id': '1001000035', + 'accessToken': current_token, + 'access-token': current_token, + 'X-YP-Access-Token': current_token, + 'Authorization': f'Bearer {current_token}', + 'X-Requested-With': 'com.chinaunicom.bol.cloudapp', + 'Content-Type': 'application/json', + 'Origin': 'https://panservice.mail.wo.cn', + }) + touchpoint = '300300010032' + if 'lightPuzzle' in url_name: touchpoint = '300300010003' + if 'shareCardReceive' in url_name: + headers['User-Agent'] = "Mozilla/5.0 (Linux; Android 15; PJZ110 Build/AP3A.240617.008; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/142.0.7444.173 Mobile Safari/537.36 XWEB/1420229 MMWEBSDK/20250802 MMWEBID/7928 MicroMessenger/8.0.62.2900(0x28003EA0) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64" + headers['X-Requested-With'] = "com.tencent.mm" + headers['X-YP-GRAY-FLAG'] = "undefined" + uniq_key = payload.get('uniqKey', '') if isinstance(payload, dict) else '' + card_code = payload.get('_cardCode', 'LT') if isinstance(payload, dict) else 'LT' + if isinstance(payload, dict) and '_cardCode' in payload: + del payload['_cardCode'] + headers['Referer'] = f"https://panservice.mail.wo.cn/h5/activitymobile/newYears26?uniqKey={uniq_key}&cardCode={card_code}&activityId=SPRING_FESTIVAL_2026&page=1&touchpoint=undefined" + else: + headers['Referer'] = f"https://panservice.mail.wo.cn/h5/activitymobile/newYears26?activityId=SPRING_FESTIVAL_2026&touchpoint={touchpoint}&token={current_token}" + if url_name == 'shareCard': + headers['X-YP-GRAY-FLAG'] = "undefined" + for attempt in range(1, 4): + try: + if method == 'get': + res = self.session.get(url, params=payload, headers=headers, timeout=15) + else: + res = self.session.post(url, json=payload, headers=headers, timeout=15) + if url_name == 'ai_query': + return {'result': None, 'body': res.text, 'headers': res.headers} + try: + res_json = res.json() + return {'result': res_json, 'headers': res.headers, 'status': res.status_code} + except: + return {'result': res.text, 'headers': res.headers, 'status': res.status_code} + except Exception as e: + err_msg = str(e) + if attempt < 3 and os.environ.get("UNICOM_PROXY_API") and ("Max retries exceeded" in err_msg or "timed out" in err_msg.lower() or "connection" in err_msg.lower() or "SOCKS" in err_msg): + self.log(f"cloudRequest [{url_name}] 网络异常触发故障转移({err_msg}), 正在更换代理...") + self.failover_proxy() + continue + if attempt == 3: + self.log(f"cloudRequest Exception [{url_name}]: {e}") + return {'result': None, 'headers': None, 'status': 599} + self.log(f"cloudRequest [{url_name}] 网络异常({e}), 重试第{attempt}次...") + time.sleep(2) + + def encrypt_data_cloud(self, data, key, iv="wNSOYIB1k1DjY5lA"): + key_padded = key.ljust(16)[:16] + cipher = AES.new(key_padded.encode(), AES.MODE_CBC, iv.encode()) + padded = pad(data.encode(), AES.block_size, style="pkcs7") + return base64.b64encode(cipher.encrypt(padded)).decode() + + def getTicketByNative_cloud(self): + for attempt in range(1, 4): + try: + url = f"{self.cloudDiskUrls['getTicketByNative']}?appId=edop_unicom_d67b3e30&token={self.ecs_token}" + headers = { + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301}", + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + } + res = self.session.get(url, headers=headers).json() + if res.get('ticket'): + self.cloudDisk.ticket = res['ticket'] + return res['ticket'] + elif str(res.get('code')) == "9999": + self.log(f"getTicketByNative_cloud 票据失效或被拦截: {res}") + except Exception as e: + err_msg = str(e) + if attempt < 3 and os.environ.get("UNICOM_PROXY_API") and ("Max retries exceeded" in err_msg or "timed out" in err_msg.lower() or "connection" in err_msg.lower() or "SOCKS" in err_msg): + self.log(f"getTicketByNative_cloud 第{attempt}次异常触发故障转移: {err_msg}") + self.failover_proxy() + continue + self.log(f"getTicketByNative_cloud 第{attempt}次重试 - 异常: {e}") + time.sleep(2) + return None + + def get_ltypDispatcher_cloud(self, ticket): + for attempt in range(1, 4): + try: + timestamp = str(int(time.time() * 1000)) + result_rnd = str(random.randint(123456, 199999)) + string_to_hash = "HandheldHallAutoLoginV2" + timestamp + result_rnd + "wohome" + sign = hashlib.md5(string_to_hash.encode()).hexdigest() + payload = { + "header": { + "key": "HandheldHallAutoLoginV2", + "resTime": timestamp, + "reqSeq": result_rnd, + "channel": "wohome", + "version": "", + "sign": sign + }, + "body": { + "clientId": "1001000003", + "ticket": ticket + } + } + url = self.cloudDiskUrls['ltypDispatcher'] + headers = {'User-Agent': "Dalvik/2.1.0 (Linux; U; Android 12; leijun Pro Build/SKQ1.22013.001);unicom{version:android@11.0702}"} + res = self.session.post(url, json=payload, headers=headers).json() + token = res.get('RSP', {}).get('DATA', {}).get('token') + if token: + self.cloudDisk.userToken = token + return token + except Exception as e: + err_msg = str(e) + if attempt < 3 and os.environ.get("UNICOM_PROXY_API") and ("Max retries exceeded" in err_msg or "timed out" in err_msg.lower() or "connection" in err_msg.lower() or "SOCKS" in err_msg): + self.log(f"get_ltypDispatcher_cloud 第{attempt}次异常触发故障转移: {err_msg}") + self.failover_proxy() + continue + self.log(f"get_ltypDispatcher_cloud 第{attempt}次重试 - 异常: {e}") + time.sleep(2) + return None + + def get_userticket_cloud(self, is_changer=False): + if not getattr(self.cloudDisk, 'userToken', None): + self.log("云盘任务: 获取userticket失败, userToken未获取") + return None + headers = {} + if is_changer: + headers = { + 'User-Agent': "LianTongYunPan/4.0.4 (Android 12)", + 'app-type': "liantongyunpanapp", + 'Client-Id': "1001000035", + 'App-Version': "yp-app/4.0.4", + 'Sys-Version': "Android/12", + 'X-YP-Client-Id': "1001000035", + 'X-YP-Access-Token': self.cloudDisk.userToken, + } + else: + headers = { + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301}", + 'Content-Type': 'application/json', + 'X-YP-Access-Token': self.cloudDisk.userToken, + 'accesstoken': self.cloudDisk.userToken, + 'token': self.cloudDisk.userToken, + 'clientId': "1001000003", + 'X-YP-Client-Id': "1001000003", + 'source-type': "woapi", + 'app-type': "unicom" + } + for attempt in range(1, 4): + try: + res = self.session.post(self.cloudDiskUrls['userticket'], json={}, headers=headers, timeout=15).json() + if res and isinstance(res, dict) and res.get('result', {}).get('ticket'): + self.cloudDisk.userticket = res['result']['ticket'] + return self.cloudDisk.userticket + else: + self.log(f"get_userticket_cloud failed: {res}") + return None + except Exception as e: + self.log(f"[get_userticket_cloud] 请求异常[{e}],重试第{attempt}次") + time.sleep(2) + return None + + def get_userInfo_cloud(self): + if not self.get_userticket_cloud(False): return + data = self.cloudRequest('userInfo', {}, False, 'post') + res = data.get('result') + headers = data.get('headers') + if headers: + cookie = headers.get('Set-Cookie', '') + match = re.search(r'_jea_id=([^;]+)', cookie) + if match: + self.cloudDisk.jeaId = match.group(1) + if res and res.get('data'): + avail = res['data'].get('availableScore') + today_earn = res['data'].get('todayEarnScore', 0) + if not hasattr(self.cloudDisk, 'initial_avail'): + self.cloudDisk.initial_avail = avail + self.log(f"云盘任务: 运行前 - 今日已赚: {today_earn}, 可用积分: {avail}") + else: + earned = int(avail) - int(self.cloudDisk.initial_avail) + self.log(f"云盘任务: 运行后 - 今日已赚: {today_earn}, 可用: {avail}, 本次获得: {earned}", notify=True) + + def do_ai_interaction_cloud(self, taskCode, taskName): + self.log(f"云盘任务: 执行AI通通查询请求...") + payload = { + "input": "你好", + "platform": 2, + "modelId": 0, + "tag": 21, + "subTag": 210000, + "conversationId": "", + "knowledgeId": "", + "referFileInfo": [] + } + data = self.cloudRequest('ai_query', payload, False, 'post') + body = data.get('body', '') + if body and ('"finish":1' in body or 'success' in body): + self.log(f"云盘任务: ✅ [{taskName}] 互动成功") + self.doPopUp_cloud(taskCode, taskName, False) + return True + self.log(f"云盘任务: ❌ [{taskName}] 互动失败") + return False + + def get_cloud_upload_file_path(self): + custom_path = os.environ.get("UNICOM_CLOUD_UPLOAD_FILE", "").strip() + if custom_path: + full_path = os.path.abspath(custom_path) + if os.path.isfile(full_path): + return full_path + self.log(f"云盘任务: 上传文件不存在: {full_path}") + return None + seed_path = os.path.join(tempfile.gettempdir(), "unicom_cloud_upload_seed.jpg") + target_size = max(UNICOM_CLOUD_UPLOAD_PROGRESS_BYTES, 1024) + if not os.path.exists(seed_path) or os.path.getsize(seed_path) != target_size: + seed_bytes = base64.b64decode("/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxAQEBAQEBAPEA8PEA8QDw8PDw8QDw8QFREWFhURFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGxAQGy0lICYtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAAEAAgMBIgACEQEDEQH/xAAXAAADAQAAAAAAAAAAAAAAAAAAAQID/8QAFBABAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB6A//xAAXEAEAAwAAAAAAAAAAAAAAAAABAAIR/9oACAEBAAEFAkqf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAwEBPwEf/8QAFBEBAAAAAAAAAAAAAAAAAAAAEP/aAAgBAgEBPwEf/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQAGPwJf/8QAFBABAAAAAAAAAAAAAAAAAAAAEP/aAAgBAQABPyFf/9k=") + with open(seed_path, "wb") as f: + f.write(seed_bytes) + if target_size > len(seed_bytes): + f.seek(target_size - 1) + f.write(b"\0") + return seed_path + + def get_cloud_upload_progress_bytes(self, file_size=0): + progress_bytes = max(int(UNICOM_CLOUD_UPLOAD_PROGRESS_BYTES or 0), 1) + if file_size and int(file_size) > 0: + return min(int(file_size), progress_bytes) + return progress_bytes + + def parse_cloud_size_to_bytes(self, value): + match = re.search(r'(\d+(?:\.\d+)?)\s*([KMGT])', str(value).upper()) + if not match: + return 0 + unit_power = {'K': 1, 'M': 2, 'G': 3, 'T': 4} + return int(float(match.group(1)) * (1024 ** unit_power[match.group(2)])) + + def get_cloud_upload_times(self, task, file_size): + progress_list = task.get('taskExtend', {}).get('taskProgressVOList', []) or [] + targets = [] + for item in progress_list: + size_bytes = self.parse_cloud_size_to_bytes(item.get('progressName')) + if size_bytes > 0: + targets.append(size_bytes) + finished = max(int(task.get('finishCount', 0) or 0), 0) + stage_goal = finished + 1 + progress_bytes = self.get_cloud_upload_progress_bytes(file_size) + if targets: + stage_goal = min(stage_goal, len(targets)) + final_target = targets[stage_goal - 1] + completed_target = targets[min(finished, len(targets)) - 1] if finished > 0 else 0 + remaining_bytes = max(final_target - completed_target, 0) + if remaining_bytes <= 0: + return 0, stage_goal + return max((remaining_bytes + progress_bytes - 1) // progress_bytes, 1), stage_goal + required = max(int(task.get('needCount', 0) or 0), 0) + if required > 0: + stage_goal = min(stage_goal, required) + remaining = max(stage_goal - finished, 0) + return remaining, stage_goal + + def query_cloud_task_list_cloud(self): + if not self.get_userticket_cloud(False): + return [] + data = self.cloudRequest('taskDetail', {}, False, 'post') + if not isinstance(data, dict): + self.log("云盘任务: taskDetail 返回结构异常,已跳过本轮任务列表") + return [] + res = data.get('result') + if not isinstance(res, dict): + body = str(res).replace('\r', ' ').replace('\n', ' ').strip()[:120] + self.log(f"云盘任务: taskDetail 返回异常,已跳过本轮任务列表 (status={data.get('status')}, body={body or 'None'})") + return [] + task_detail = res.get('data', {}).get('taskDetail', {}) + if not isinstance(task_detail, dict): + self.log("云盘任务: taskDetail 数据结构异常,已跳过本轮任务列表") + return [] + return task_detail.get('taskList', []) or [] + + def query_task_records_cloud(self, cursor=""): + if not self.get_userticket_cloud(False): + return [] + data = self.cloudRequest('taskRecords', {"cursor": cursor}, False, 'post') + if not isinstance(data, dict): + self.log("云盘任务: taskRecords 返回结构异常,已跳过积分明细查询") + return [] + res = data.get('result') + if not isinstance(res, dict): + body = str(res).replace('\r', ' ').replace('\n', ' ').strip()[:120] + self.log(f"云盘任务: taskRecords 返回异常,已跳过积分明细查询 (status={data.get('status')}, body={body or 'None'})") + return [] + return res.get('data', []) or [] + + def init_cloud_task_records_state(self): + records = self.query_task_records_cloud("") + self.cloudDisk.knownTaskRecordIds = {str(item.get('id')) for item in records if item.get('id')} + + def match_new_cloud_task_record(self, task_name, before_ids=None): + records = self.query_task_records_cloud("") + known_ids = set(before_ids if before_ids is not None else getattr(self.cloudDisk, 'knownTaskRecordIds', set())) + new_record = None + for item in records: + record_id = str(item.get('id') or '') + if not record_id or record_id in known_ids: + continue + if item.get('taskName') == task_name and not new_record: + new_record = item + known_ids.add(record_id) + self.cloudDisk.knownTaskRecordIds = known_ids + return new_record + + def get_cloud_task_by_code_cloud(self, task_code): + if not task_code: + return None + for task in self.query_cloud_task_list_cloud(): + if task.get('taskCode') == task_code: + return task + return None + + def finalize_generic_task_cloud(self, task_code, task_name): + current_task = self.get_cloud_task_by_code_cloud(task_code) + if not isinstance(current_task, dict): + return + finish_text = current_task.get('finishText') + finished = int(current_task.get('finishCount', 0) or 0) + required = int(current_task.get('needCount', 0) or 0) + if finish_text == "待领取": + self.doPopUp_cloud(task_code, task_name, False) + return + if finish_text in ["已完成", "已领取"] or (required > 0 and finished >= required): + record = self.match_new_cloud_task_record(task_name) + if record: + self.log(f"云盘任务: ✅ [{task_name}] 完成, 获得积分: {record.get('earnScoreDesc')}") + else: + self.log(f"云盘任务: ✅ [{task_name}] 已完成") + + def get_cloud_upload_name_cloud(self): + return os.environ.get("UNICOM_CLOUD_UPLOAD_FILENAME", "8648").strip() or "8648" + + def doUpload_cloud(self, taskCode, taskName, prefix="云盘任务", notify=True): + token = getattr(self.cloudDisk, 'userToken', '') + upload_path = self.get_cloud_upload_file_path() + if not token or not upload_path: + return False + file_size = os.path.getsize(upload_path) + progress_file_size = self.get_cloud_upload_progress_bytes(file_size) + file_name = self.get_cloud_upload_name_cloud() + headers = { + 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0", + 'Accept-Encoding': "gzip, deflate, br, zstd", + 'Origin': "https://pan.wo.cn", + 'Referer': "https://pan.wo.cn/", + 'Accept-Language': "zh-CN,zh;q=0.9", + 'Sec-Fetch-Site': "same-site", + 'Sec-Fetch-Mode': "cors", + 'Sec-Fetch-Dest': "empty", + } + for attempt in range(1, 3): + request_time = str(int(time.time() * 1000)) + file_info = self.encrypt_data_cloud(json.dumps({ + "spaceType": "0", + "directoryId": "0", + "batchNo": datetime.now().strftime("%Y%m%d"), + "fileName": file_name, + "fileSize": progress_file_size, + "fileType": "1", + }, ensure_ascii=False, separators=(',', ':')), token) + try: + with open(upload_path, 'rb') as file_obj: + files = { + "uniqueId": (None, f"{request_time}_{''.join(random.choices('abcdefghijklmnopqrstuvwxyz0123456789', k=6))}"), + "accessToken": (None, token), + "fileName": (None, file_name), + "psToken": (None, "undefined"), + "fileSize": (None, str(file_size)), + "totalPart": (None, "1"), + "partSize": (None, str(file_size)), + "partIndex": (None, "1"), + "channel": (None, "wocloud"), + "directoryId": (None, "0"), + "fileInfo": (None, file_info), + "file": (file_name, file_obj, "image/jpeg"), + } + res = self.request_direct("POST", self.cloudDiskUrls['upload2C'], headers=headers, files=files, timeout=UNICOM_CLOUD_UPLOAD_TIMEOUT) + res_json = {} + try: + res_json = res.json() + except: + pass + meta_code = str(res_json.get('meta', {}).get('code', '')) + code = str(res_json.get('code', '')) + if res.status_code == 200 and (not res_json or meta_code in ('200', '0', '0000') or code in ('200', '0', '0000')): + self.cloudDisk.uploadedFileCount = int(getattr(self.cloudDisk, 'uploadedFileCount', 0) or 0) + 1 + self.log(f"{prefix}: [{taskName}] 上传成功") + if taskCode: + time.sleep(1) + self.doPopUp_cloud(taskCode, taskName, False, notify=notify) + return True + if attempt < 2 and res.status_code >= 500: + self.log(f"{prefix}: [{taskName}] 上传返回 {res.status_code},重建请求重试一次") + time.sleep(2) + continue + self.log(f"{prefix}: ❌ [{taskName}] 上传失败: HTTP {res.status_code} {res_json if res_json else res.text[:200]}") + return False + except Exception as e: + if attempt < 2: + self.log(f"{prefix}: [{taskName}] 上传异常,重建请求重试一次: {e}") + time.sleep(2) + continue + self.log(f"{prefix}: ❌ [{taskName}] 上传异常: {e}") + return False + + def doPopUp_cloud(self, taskCode, taskName, is_changer, notify=True): + if not self.get_userticket_cloud(is_changer): return + known_ids = set(getattr(self.cloudDisk, 'knownTaskRecordIds', set())) + time.sleep(5) + data = self.cloudRequest('doPopUp', {}, is_changer, 'post') + res = data.get('result') + if not isinstance(res, dict): + res = {} + code = res.get('meta', {}).get('code') + code2 = res.get('code') + if str(code) == "0000" or str(code) == "0" or str(code2) == "0000" or str(code2) == "0": + record = self.match_new_cloud_task_record(taskName, known_ids) + if record: + score_desc = record.get('earnScoreDesc') or res.get('data', {}).get('score', 0) + self.log(f"云盘任务: ✅ [{taskName}] 完成, 获得积分: {score_desc}", notify=notify) + return + score = res.get('data', {}).get('score', 0) + if str(score) not in ('', '0', '0积分'): + self.log(f"云盘任务: ✅ [{taskName}] 领取到积分: {score},但未在积分明细匹配到当前任务", notify=notify) + else: + self.log(f"云盘任务: ✅ [{taskName}] 完成", notify=notify) + else: + self.log(f"云盘任务: ❌ [{taskName}] 领取奖励失败: {res}") + + def toFinish_cloud(self, taskCode, taskName, is_changer): + if not self.get_userticket_cloud(is_changer): return False + data = self.cloudRequest('toFinish', {'taskCode': taskCode}, is_changer, 'post') + res = data.get('result') + if not isinstance(res, dict): + res = {} + if res.get('code') == "0000": return True + return False + + def dosign_cloud(self, taskCode, taskName): + if not self.get_userticket_cloud(False): return + data = self.cloudRequest('dosign', {'taskCode': taskCode}, False, 'post') + res = data.get('result') + if not isinstance(res, dict): + res = {} + if "0000" in str(res.get('code')) and res.get('data', {}).get('score'): + self.log(f"云盘任务: ✅ [{taskName}] 完成, 获得积分: {res['data']['score']}", notify=True) + else: + self.log(f"云盘任务: ❌ [{taskName}] 失败: {res}") + + def get_taskDetail_cloud(self): + taskList = self.query_cloud_task_list_cloud() + if taskList: + names = [t.get('taskName', '?') for t in taskList] + self.log(f"云盘任务: 任务列表({len(taskList)}): {', '.join(names)}") + else: + self.log("云盘任务: 任务列表为空") + return + for task in taskList: + time.sleep(0.5) + tName = task.get('taskName', '') + tCode = task.get('taskCode') + finishText = task.get('finishText') + finished = int(task.get('finishCount', 0)) + required = int(task.get('needCount', 0)) + if finishText == "待领取": + self.log(f"云盘任务: [{tName}] 待领取") + self.doPopUp_cloud(tCode, tName, False) + continue + if finishText in ["已完成", "已领取"] or task.get('finishState', False) == True or (required > 0 and finished >= required): + self.log(f"云盘任务: ✅ [{tName}] 已完成") + continue + self.log(f"云盘任务: 开始执行 [{tName}] 进度: {finished}/{required}") + if "签到" in tName: + self.toFinish_cloud(tCode, tName, False) + self.dosign_cloud(tCode, tName) + elif "与AI通通互动" in tName: + self.toFinish_cloud(tCode, tName, False) + self.do_ai_interaction_cloud(tCode, tName) + elif "微信备份" in tName or "通讯录备份" in tName: + self.log(f"云盘任务: [{tName}] 暂未适配,当前缺少该任务专用协议,先跳过") + elif "当月上传容量满1GB" in tName: + upload_path = self.get_cloud_upload_file_path() + if not upload_path: + continue + start_finished = int(task.get('finishCount', 0) or 0) + upload_times, target_stage = self.get_cloud_upload_times(task, os.path.getsize(upload_path)) + if upload_times <= 0: + self.log(f"云盘任务: [{tName}] 当前阶段已完成,跳过上传") + continue + extra_times = max(5, (upload_times + 9) // 10) + max_upload_times = upload_times + extra_times + self.toFinish_cloud(tCode, tName, False) + self.log(f"云盘任务: 开始执行1GB上传任务(本次目标阶段 {target_stage}/{max(int(task.get('needCount', 0) or 0), target_stage)},预计{upload_times}次,最多{max_upload_times}次,达到本阶段即停止)...") + upload_ok = 0 + for upload_i in range(max_upload_times): + self.log(f"云盘任务: 第{upload_i + 1}/{max_upload_times}次上传") + if self.doUpload_cloud(tCode, tName, notify=False): + upload_ok += 1 + should_check = upload_ok > 0 and ((upload_i + 1) >= upload_times or upload_ok % 5 == 0) + if should_check: + current_task = self.get_cloud_task_by_code_cloud(tCode) + if current_task: + current_finished = int(current_task.get('finishCount', 0) or 0) + current_required = int(current_task.get('needCount', 0) or 0) + self.log(f"云盘任务: [{tName}] 当前阶段进度 {current_finished}/{current_required}") + if current_finished >= target_stage or current_task.get('finishText') in ["已完成", "已领取"]: + reached_text = "已达到本阶段目标" if current_finished < current_required else "已达到本月目标" + self.log(f"云盘任务: ✅ [{tName}] {reached_text},停止继续上传", notify=True) + break + time.sleep(2) + current_task = self.get_cloud_task_by_code_cloud(tCode) + current_finished = int(current_task.get('finishCount', 0) or 0) if current_task else start_finished + stage_status = "已完成本阶段" if current_finished >= target_stage else "未完成本阶段" + self.log(f"云盘任务: ✅ [{tName}] 上传完成 {upload_ok}/{max_upload_times} 次,{stage_status}", notify=True) + else: + self.run_generic_cloud_task(tCode, tName) + + def query_all_files_cloud(self, space_type="0", parent_directory_id="0", page_num=0, page_size=500): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return {} + res = self.request_wohome_dispatcher_cloud("QueryAllFiles", { + "clientId": "1001000035", + "spaceType": str(space_type), + "sortRule": "0", + "parentDirectoryId": str(parent_directory_id), + "pageNum": str(page_num), + "pageSize": int(page_size), + }, timeout=15) + rsp = res.get('RSP', {}) + if str(rsp.get('RSP_CODE')) != '0000' or not rsp.get('DATA'): + return {} + try: + key_padded = token.ljust(16)[:16] + cipher = AES.new(key_padded.encode(), AES.MODE_CBC, b"wNSOYIB1k1DjY5lA") + plain = unpad(cipher.decrypt(base64.b64decode(rsp['DATA'])), AES.block_size, style="pkcs7").decode('utf-8', errors='ignore') + return json.loads(plain) + except Exception as e: + self.log(f"云盘任务: 查询根目录文件失败: {e}") + return {} + + def request_wohome_dispatcher_cloud(self, key, param, timeout=15, client_id="1001000035"): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return {} + timestamp = str(int(time.time() * 1000)) + req_seq = str(random.randint(10000, 99999)) + payload = { + "header": { + "key": key, + "resTime": timestamp, + "reqSeq": req_seq, + "channel": "wohome", + "version": "", + "sign": hashlib.md5(f"{key}{timestamp}{req_seq}wohome".encode()).hexdigest().upper(), + }, + "body": { + "param": self.encrypt_data_cloud(json.dumps(param, ensure_ascii=False, separators=(',', ':')), token), + "secret": True, + }, + } + headers = { + 'User-Agent': 'LianTongYunPan/5.1.2 (Android 10)', + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'Access-Token': token, + 'accesstoken': token, + 'Client-Id': str(client_id), + } + try: + return self.session.post(self.cloudDiskUrls['ltypDispatcher'], json=payload, headers=headers, timeout=timeout).json() + except Exception as e: + self.log(f"云盘任务: [{key}] 请求失败: {e}") + return {} + + def list_upload_named_files_cloud(self, max_pages=4): + upload_name = self.get_cloud_upload_name_cloud().strip() + if not upload_name: + return [] + pattern = re.compile(rf"^{re.escape(upload_name)}(?:\(\d+\))?(?:\.[^.]+)?$") + matched = [] + seen = set() + page_num = 0 + while page_num < max_pages: + data = self.query_all_files_cloud("0", "0", page_num, 500) + page_files = data.get('files') or [] + if not page_files: + break + for item in page_files: + file_id = item.get('id') + file_name = str(item.get('name', '')).strip() + if file_id and file_id not in seen and pattern.match(file_name): + seen.add(file_id) + matched.append(item) + if len(page_files) < 500: + break + page_num += 1 + return matched + + def delete_root_files_cloud(self, items, space_type="0"): + targets = [] + for item in items or []: + item_id = str(item.get('id', '')).strip() + if not item_id: + continue + targets.append((item_id, str(item.get('type', '1')) == '0')) + deleted = 0 + for offset in range(0, len(targets), 100): + batch = targets[offset:offset + 100] + dir_list = [item_id for item_id, is_dir in batch if is_dir] + file_list = [item_id for item_id, is_dir in batch if not is_dir] + if not dir_list and not file_list: + continue + res = self.request_wohome_dispatcher_cloud("DeleteFile", { + "spaceType": str(space_type), + "vipLevel": "0", + "dirList": dir_list, + "fileList": file_list, + "clientId": "1001000035", + }, timeout=20) + rsp = res.get('RSP', {}) + batch_idx = offset // 100 + 1 + if str(rsp.get('RSP_CODE')) == '0000': + deleted += len(batch) + self.log(f"云盘任务: 第{batch_idx}批根目录删除成功,共{len(batch)}个文件") + else: + self.log(f"云盘任务: 第{batch_idx}批根目录删除失败: {rsp.get('RSP_DESC') or res}") + time.sleep(1) + return deleted + + def clean_duplicate_files_cloud(self): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return + self.log("云盘任务: 开始清理云盘重复文件") + cloud_headers = { + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) LianTongYunPan/5.1.0 (iPhone; iOS 16.6)", + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'Accept-Encoding': 'br;q=1.0, gzip;q=0.9, deflate;q=0.8', + 'Access-Token': token, 'X-YP-Access-Token': token, + 'Client-Id': '1001000035', 'X-YP-Client-Id': '1001000035', + 'App-Version': 'yp-app/5.1.0', 'app-type': 'liantongyunpanapp', + 'Sys-Version': 'iOS/16.6', + } + uploaded_count = int(getattr(self.cloudDisk, 'uploadedFileCount', 0) or 0) + retry_count = 6 if uploaded_count > 0 else 1 + task_id = "" + file_ids = [] + for attempt in range(1, retry_count + 1): + try: + res = self.session.post( + self.cloudDiskUrls['getScanState'], json={ + "pathLevelList": [{"levelType": "space", "levelName": "个人云", "busId": "0"}] + }, headers=cloud_headers, timeout=10, + ).json() + except Exception as e: + self.log(f"云盘任务: 获取扫描状态失败: {e}") + return + if res.get('meta', {}).get('code') != '200': + self.log("云盘任务: 获取扫描状态失败") + return + task_id = "" + for item in res.get('result', {}).get('subTaskList', []): + if item.get('taskId'): + task_id = item['taskId'] + break + if task_id: + file_ids = [] + page = max_page = 1 + while page <= max_page: + try: + page_res = self.session.post( + self.cloudDiskUrls['getCleanData'], json={ + "pageNum": page, "taskId": task_id, "type": 3, "pageSize": 50, + }, headers=cloud_headers, timeout=10, + ).json() + except Exception as e: + self.log(f"云盘任务: 获取第{page}页清理数据失败: {e}") + return + if page_res.get('meta', {}).get('code') != '200': + break + max_page = page_res.get('result', {}).get('maxPageNum', 1) + for group in page_res.get('result', {}).get('fileGroupList', []): + for fi, file_item in enumerate(group.get('fileList', [])): + if fi <= 0 or not file_item.get('fileId'): + continue + file_ids.append({"fileId": file_item['fileId'], "spaceType": file_item.get('spaceType', '0')}) + page += 1 + if file_ids: + self.log(f"云盘任务: 第{attempt}次重复扫描完成,共{len(file_ids)}个重复文件") + break + if attempt < retry_count: + wait_seconds = min(5 + (attempt - 1) * 2, 12) + self.log(f"云盘任务: 第{attempt}次重复扫描未发现可清理文件,{wait_seconds}秒后重试") + time.sleep(wait_seconds) + if not file_ids: + named_files = self.list_upload_named_files_cloud() if uploaded_count > 0 else [] + if named_files: + preview = "、".join(item.get('name', '') for item in named_files[:6]).strip("、") + more = "..." if len(named_files) > 6 else "" + self.log(f"云盘任务: 智能清理未识别到重复项,但根目录检测到{len(named_files)}个[{self.get_cloud_upload_name_cloud()}]系列文件: {preview}{more}") + deleted = self.delete_root_files_cloud(named_files) + self.cloudDisk.uploadedFileCount = 0 + if deleted: + self.log(f"云盘任务: 已通过官方删除接口清理{deleted}个[{self.get_cloud_upload_name_cloud()}]系列文件") + else: + self.log(f"云盘任务: [{self.get_cloud_upload_name_cloud()}]系列文件删除失败") + else: + self.cloudDisk.uploadedFileCount = 0 + self.log("云盘任务: 无重复文件") + return + for offset in range(0, len(file_ids), 100): + batch = file_ids[offset:offset + 100] + batch_idx = offset // 100 + 1 + try: + batch_res = self.session.post( + self.cloudDiskUrls['batchClean'], json={ + "fileList": batch, "taskType": 3, "taskId": task_id, + }, headers=cloud_headers, timeout=30, + ).json() + code = batch_res.get('meta', {}).get('code') + self.log(f"云盘任务: 第{batch_idx}批清理: {'成功' if code == '200' else '失败'}") + except Exception as e: + self.log(f"云盘任务: 第{batch_idx}批清理失败: {e}") + time.sleep(2) + named_files = self.list_upload_named_files_cloud() if uploaded_count > 0 else [] + if named_files: + preview = "、".join(item.get('name', '') for item in named_files[:6]).strip("、") + more = "..." if len(named_files) > 6 else "" + self.log(f"云盘任务: 智能清理后根目录仍检测到{len(named_files)}个[{self.get_cloud_upload_name_cloud()}]系列文件: {preview}{more}") + deleted = self.delete_root_files_cloud(named_files) + if deleted: + self.log(f"云盘任务: 已通过官方删除接口补充清理{deleted}个[{self.get_cloud_upload_name_cloud()}]系列文件") + self.cloudDisk.uploadedFileCount = 0 + self.log("云盘任务: 云盘重复文件清理完成") + + def vote_cloud(self): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return + ypid_list = getattr(self.cloudDisk, 'ypid_list', []) + if not ypid_list: + return + headers = { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) LianTongYunPan/4.0.2 (iPhone; iOS 16.6)", + 'Sec-Fetch-Mode': 'cors', + 'clientId': '1001000165', + 'Origin': 'https://panservice.mail.wo.cn', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Site': 'same-origin', + 'X-YP-Access-Token': token, 'token': token, + 'X-YP-Client-Id': '1001000165', + 'X-SH-Access-Token': '', + 'source-type': 'woapi', + } + for idx in range(3): + try: + self.session.post( + self.cloudDiskUrls['vote'], json={"activityId": "MjQ=", "id": random.choice(ypid_list)}, + headers=headers, timeout=10, + ) + self.log(f"云盘任务: 第{idx + 1}次投票") + except Exception as e: + self.log(f"云盘任务: 第{idx + 1}次投票失败: {e}") + time.sleep(1) + + def build_cloud_lottery_headers(self): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return {} + return { + '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/143.0.7499.146 Mobile Safari/537.36/woapp LianTongYunPan/5.1.2 (Android 10)", + 'Accept': 'application/json, text/plain, */*', + 'source-type': 'woapi', + 'Sec-Fetch-Site': 'same-origin', + 'clientId': '1001000165', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + 'token': token, + 'X-SH-Access-Token': '', + 'Sec-Fetch-Mode': 'cors', + 'X-YP-Access-Token': token, + 'X-YP-Client-Id': '1001000165', + 'X-Requested-With': 'com.chinaunicom.bol.cloudapp', + 'X-YP-GRAY-FLAG': 'undefined', + 'Sec-Fetch-Dest': 'empty', + } + + def build_cloud_hometown_headers(self, extra=None): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return {} + headers = { + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) LianTongYunPan/5.1.0 (iPhone; iOS 16.6)", + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + 'source-type': 'woapi', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'clientId': '1001000165', + 'X-YP-Client-Id': '1001000165', + 'X-YP-Access-Token': token, + 'token': token, + 'X-SH-Access-Token': '', + 'X-YP-GRAY-FLAG': 'undefined', + 'requestTime': str(int(time.time() * 1000)), + } + if extra: + headers.update(extra) + return headers + + def build_cloud_activity_headers(self, activity_id=""): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return {} + headers = { + '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/143.0.7499.146 Mobile Safari/537.36/woapp LianTongYunPan/5.1.2 (Android 10)", + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'source-type': 'woapi', + 'clientId': '1001000165', + 'client-Id': '1001000165', + 'token': token, + 'accessToken': token, + 'access-token': token, + 'X-YP-Access-Token': token, + 'X-YP-Client-Id': '1001000165', + 'X-SH-Access-Token': '', + 'X-Requested-With': 'com.chinaunicom.bol.cloudapp', + 'X-YP-GRAY-FLAG': 'undefined', + 'Origin': 'https://panservice.mail.wo.cn', + } + if activity_id: + point_ticket = getattr(self.cloudDisk, 'ticket', '') + mobile = getattr(self, 'account_mobile', '') or getattr(self, 'mobile', '') + if activity_id == 'MjU=' and point_ticket and mobile: + headers['Referer'] = ( + "https://panservice.mail.wo.cn/h5/activitymobile/fileUploadActive" + "?touchpoint=300200030001&type=06" + f"&ticket={point_ticket}" + "&version=iphone_c%4012.0801" + f"×tamp={int(time.time() * 1000)}" + f"&desmobile={mobile}" + "&num=0&postage=01addda9786dc7eb5ca0eacd9acd664a" + f"&activityId={quote(activity_id)}&clientid=1001000003" + f"&userNumber={mobile}" + ) + else: + headers['Referer'] = f"https://panservice.mail.wo.cn/h5/activitymobile/fileUploadActive?touchpoint=300300010005&activityId={quote(activity_id)}&token={token}" + return headers + + def get_cloud_lottery_draw_count(self, times_res): + result = times_res.get('result') + if isinstance(result, int): + return result + if not isinstance(result, dict): + return 0 + draw_count = result.get('times') + if draw_count is None: + for key in ['lotteryTimes', 'freeTimes', 'drawTimes', 'count']: + if key in result: + draw_count = result.get(key) + break + try: + return int(draw_count or 0) + except: + return 0 + + def query_cloud_phone_location_cloud(self): + province_code = str(getattr(self.cloudDisk, 'hometownProvinceCode', '') or '') + province_name = str(getattr(self.cloudDisk, 'hometownProvinceName', '') or '') + if province_code and province_name: + return province_code, province_name + token = getattr(self.cloudDisk, 'userToken', '') + mobile = getattr(self, 'account_mobile', '') or getattr(self, 'mobile', '') + headers = self.build_cloud_hometown_headers({"X-SH-Access-Token": ""}) + if not token or not mobile or not headers: + return "", "" + try: + res = self.session.post( + self.cloudDiskUrls['queryPhoneLocation'], + json={"mobile": self.encrypt_data_cloud(mobile, "CBWGjFHjZdhTf7h8")}, + headers=headers, + timeout=10, + ).json() + if str(res.get('meta', {}).get('code')) == '200': + result = res.get('result') or {} + province_code = str(result.get('provinceCode') or '') + province_name = str(result.get('provinceName') or '') + if province_code and province_name: + self.cloudDisk.hometownProvinceCode = province_code + self.cloudDisk.hometownProvinceName = province_name + self.log(f"家乡打卡 - 归属地: {province_name}({province_code})") + return province_code, province_name + self.log(f"云盘任务: 查询号码归属地失败: {res}") + except Exception as e: + self.log(f"云盘任务: 查询号码归属地异常: {e}") + return "", "" + + def get_cloud_activity_province(self): + province_code = str(getattr(self.cloudDisk, 'hometownProvinceCode', '') or '') + province_name = str(getattr(self.cloudDisk, 'hometownProvinceName', '') or '') + if province_code and province_name: + return province_code, province_name + province_code, province_name = self.query_cloud_phone_location_cloud() + if province_code and province_name: + return province_code, province_name + if (not hasattr(self, 'city_info')) or (not self.city_info): + self.get_city_info() + if not isinstance(getattr(self, 'city_info', None), list) or not self.city_info: + return "", "" + city = self.city_info[0] if isinstance(self.city_info[0], dict) else {} + province_code = str(city.get('proCode') or city.get('standardProvinceCode') or "").lstrip('0') + province_name = str(city.get('proName') or city.get('provinceName') or "") + if province_code and province_name: + self.cloudDisk.hometownProvinceCode = province_code + self.cloudDisk.hometownProvinceName = province_name + return province_code, province_name + + def query_cloud_lottery_times_cloud(self, activity_id, headers=None): + if not activity_id: + return None + use_headers = dict(headers or self.build_cloud_lottery_headers()) + if not use_headers: + return None + use_headers['requestTime'] = str(int(time.time() * 1000)) + res = self.session.get(self.cloudDiskUrls['lottery_times'], params={"activityId": activity_id}, headers=use_headers, timeout=10).json() + self.cloudDisk.lotteryTimesResult = res + return res + + def ensure_cloud_lottery_activity_open_cloud(self, activity_id): + headers = self.build_cloud_activity_headers(activity_id) + if not headers: + return False + try: + check_headers = dict(headers) + check_headers['requestTime'] = str(int(time.time() * 1000)) + check_res = self.session.get(self.cloudDiskUrls['checkActivityStatus'], params={"activityId": activity_id}, headers=check_headers, timeout=10).json() + if str(check_res.get('meta', {}).get('code')) == '200' and str(check_res.get('result', {}).get('state')) == '1': + if activity_id == 'MjU=': + self.log("家乡打卡 - 开启结果:开启成功") + return True + except Exception as e: + self.log(f"云盘任务: 查询抽奖活动开启状态失败: {e}") + province_code, province_name = self.get_cloud_activity_province() + if not province_code or not province_name: + self.log("云盘任务: 开启抽奖活动失败,缺少省份信息") + return False + try: + open_headers = dict(headers) + open_headers['requestTime'] = str(int(time.time() * 1000)) + res = self.session.post( + self.cloudDiskUrls['openActivity'], + json={"activityId": activity_id, "provinceCode": province_code, "provinceName": province_name}, + headers=open_headers, + timeout=10, + ).json() + if str(res.get('meta', {}).get('code')) == '200' and str(res.get('result', {}).get('state')) == '1': + if activity_id == 'MjU=': + self.log("家乡打卡 - 开启结果:开启成功") + else: + self.log(f"云盘任务: 抽奖活动[{activity_id}] 已开启") + return True + if activity_id == 'MjU=': + message = res.get('msg') or res.get('meta', {}).get('message') or '开启失败' + self.log(f"家乡打卡 - 开启结果:{message}") + else: + self.log(f"云盘任务: 开启抽奖活动失败: {res}") + except Exception as e: + self.log(f"云盘任务: 开启抽奖活动异常: {e}") + return False + + def query_cloud_lottery_record_cloud(self, activity_id): + if not activity_id: + return None + headers = self.build_cloud_hometown_headers() if activity_id == 'MjU=' else self.build_cloud_lottery_headers() + if not headers: + return None + try: + response = self.session.get( + f"https://panservice.mail.wo.cn/activity/lottery/recordList?activityId={quote(activity_id)}", + headers=headers, + timeout=10, + ) + result = response.json() if response.status_code == 200 else None + if not isinstance(result, dict): + return None + if str(result.get('meta', {}).get('code')) == '200': + record_list = result.get('result') or [] + prize = record_list[0].get('prizeName', '暂无抽奖记录') if record_list else '暂无抽奖记录' + if activity_id == 'MjU=': + self.log(f"家乡打卡 - 上次抽奖:{prize}") + return prize + except Exception as e: + self.log(f"云盘任务: 查询抽奖记录异常: {e}") + return None + + def do_activity_upload_cloud(self, activity_id): + token = getattr(self.cloudDisk, 'userToken', '') + upload_path = self.get_cloud_upload_file_path() + if not token or not upload_path: + return False + file_size = os.path.getsize(upload_path) + file_name = self.get_cloud_upload_name_cloud() + file_info = self.encrypt_data_cloud(json.dumps({ + "batchNo": datetime.now().strftime("%Y%m%d%H%M%S"), + "fileName": file_name, + "fileSize": file_size, + "fileType": 1, + "directoryId": "0", + "spaceType": "0", + }, ensure_ascii=False, separators=(',', ':')), token) + headers = { + '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/143.0.7499.146 Mobile Safari/537.36/woapp LianTongYunPan/5.1.2 (Android 10)", + 'Accept': '*/*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Origin': 'https://panservice.mail.wo.cn', + 'Referer': f"https://panservice.mail.wo.cn/h5/activitymobile/fileUploadActive?touchpoint=300300010005&activityId={quote(activity_id)}&token={token}", + 'X-Requested-With': 'com.chinaunicom.bol.cloudapp', + 'accessToken': token, + 'access-token': token, + 'client_id': '1001000165', + 'X-YP-GRAY-FLAG': 'undefined', + 'requestTime': str(int(time.time() * 1000)), + } + try: + if activity_id == 'MjU=': + self.log("开始家乡打卡文件上传...") + with open(upload_path, 'rb') as file_obj: + files = { + "uniqueId": (None, f"{int(time.time() * 1000)}_{random.random()}"), + "accessToken": (None, token), + "psToken": (None, "undefined"), + "totalPart": (None, "1"), + "partSize": (None, str(file_size)), + "partIndex": (None, "1"), + "channel": (None, "wocloud"), + "directoryId": (None, "0"), + "fileName": (None, file_name), + "fileSize": (None, str(file_size)), + "fileInfo": (None, file_info), + "file": (file_name, file_obj, "image/jpeg"), + } + res = self.request_direct("POST", self.cloudDiskUrls['activityUpload2C'], headers=headers, files=files, timeout=UNICOM_CLOUD_UPLOAD_TIMEOUT) + res_json = {} + try: + res_json = res.json() + except: + pass + code = str(res_json.get('code', '')) + meta_code = str(res_json.get('meta', {}).get('code', '')) + if res.status_code == 200 and (code in ('200', '0', '0000') or meta_code in ('200', '0', '0000')): + self.cloudDisk.uploadedFileCount = int(getattr(self.cloudDisk, 'uploadedFileCount', 0) or 0) + 1 + if activity_id == 'MjU=': + self.log("家乡打卡 - 上传成功") + else: + self.log("云盘任务: 活动上传成功,正在刷新抽奖次数...") + return True + if activity_id == 'MjU=': + self.log(f"家乡打卡 - 上传失败: HTTP {res.status_code}") + else: + self.log(f"云盘任务: 活动上传失败: HTTP {res.status_code} {res_json if res_json else res.text[:200]}") + except Exception as e: + if activity_id == 'MjU=': + self.log(f"家乡打卡 - 上传异常: {e}") + else: + self.log(f"云盘任务: 活动上传异常: {e}") + return False + + def wait_cloud_lottery_times_cloud(self, activity_id, wait_seconds=8): + headers = self.build_cloud_lottery_headers() + if not headers: + return None + for _ in range(wait_seconds): + time.sleep(1) + try: + res = self.query_cloud_lottery_times_cloud(activity_id, headers) + if isinstance(res, dict) and str(res.get('meta', {}).get('code')) == '200' and self.get_cloud_lottery_draw_count(res) > 0: + return res + except Exception: + pass + return getattr(self.cloudDisk, 'lotteryTimesResult', None) + + def get_cloud_lottery_activity_id_cloud(self): + if getattr(self.cloudDisk, 'lotteryActivityId', None): + return self.cloudDisk.lotteryActivityId + headers = self.build_cloud_lottery_headers() + if not headers: + return None + custom_id = os.environ.get("UNICOM_CLOUD_LOTTERY_ACTIVITY_ID", "").strip() + activity_id = custom_id or "MjU=" + try: + check_headers = dict(headers) + check_headers['requestTime'] = str(int(time.time() * 1000)) + res = self.session.get(self.cloudDiskUrls['lottery_times'], params={"activityId": activity_id}, headers=check_headers, timeout=10).json() + meta_code = str(res.get('meta', {}).get('code')) + if meta_code in ('200', '90003603'): + self.cloudDisk.lotteryActivityId = activity_id + self.cloudDisk.lotteryTimesResult = res + self.log("云盘任务: 开始执行抽奖活动") + return activity_id + self.log(f"云盘任务: 抽奖活动[{activity_id}] 无效: {res}") + except Exception as e: + self.log(f"云盘任务: 查询抽奖活动[{activity_id}]失败: {e}") + return None + + def draw_lottery_cloud(self): + headers = self.build_cloud_lottery_headers() + if not headers: + return + activity_id = self.get_cloud_lottery_activity_id_cloud() + if not activity_id: + self.log("云盘任务: 未找到有效抽奖活动") + return + try: + times_res = getattr(self.cloudDisk, 'lotteryTimesResult', None) + if not isinstance(times_res, dict): + times_res = self.query_cloud_lottery_times_cloud(activity_id, headers) + times_code = str(times_res.get('meta', {}).get('code')) + draw_count = self.get_cloud_lottery_draw_count(times_res) if times_code == '200' else 0 + if times_code == '90003603' or draw_count <= 0: + if self.ensure_cloud_lottery_activity_open_cloud(activity_id) and self.do_activity_upload_cloud(activity_id): + refreshed = self.wait_cloud_lottery_times_cloud(activity_id) + if isinstance(refreshed, dict): + times_res = refreshed + times_code = str(times_res.get('meta', {}).get('code')) + draw_count = self.get_cloud_lottery_draw_count(times_res) if times_code == '200' else 0 + if activity_id == 'MjU=': + self.query_cloud_lottery_record_cloud(activity_id) + if times_code == '90003603': + if activity_id == 'MjU=': + self.log("家乡打卡 - 抽奖失败:没有抽奖机会") + else: + self.log(f"云盘任务: 抽奖活动[{activity_id}] 活动上传后仍未获得抽奖次数") + return + if times_code != '200': + self.log(f"云盘任务: 查询抽奖次数失败: {times_res}") + return + if draw_count <= 0: + if activity_id == 'MjU=': + self.log("家乡打卡 - 抽奖失败:没有抽奖机会") + else: + self.log(f"云盘任务: 抽奖活动[{activity_id}] 当前无抽奖次数") + return + for _ in range(draw_count): + draw_headers = dict(headers) + draw_headers['requestTime'] = str(int(time.time() * 1000)) + res = self.session.post(self.cloudDiskUrls['lottery'], json={"activityId": activity_id}, headers=draw_headers, timeout=10).json() + if res.get('meta', {}).get('code') == '92000017': + self.log("云盘任务: 转盘已抽奖") + return + if 'result' in res: + if activity_id == 'MjU=': + self.log(f"家乡打卡 - 抽奖结果:{res['result'].get('prizeName', '')}", notify=True) + else: + self.log(f"云盘任务: 转盘获得: {res['result'].get('prizeName', '')}", notify=True) + continue + self.log(f"云盘任务: 抽奖无结果: {res}") + except Exception as e: + self.log(f"云盘任务: 抽奖失败: {e}") + + def get_secret_key_cloud(self): + if getattr(self.cloudDisk, 'secretKey', None): + return self.cloudDisk.secretKey + if not getattr(self.cloudDisk, 'userticket', None) or not getattr(self.cloudDisk, 'jeaId', None): + return None + headers = { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'Accept-Language': 'zh-CN,zh-Hans;q=0.9', + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) LianTongYunPan/4.0.2 (iPhone; iOS 16.6)", + 'Accept-Encoding': 'gzip, deflate, br', + 'Connection': 'keep-alive', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Origin': 'https://m.jf.10010.com', + 'Host': 'm.jf.10010.com', + 'clienttype': 'yunpan_iOS', + 'partnersid': '1649', + 'ticket': self.cloudDisk.userticket, + 'Cookie': f"_jea_id={self.cloudDisk.jeaId};", + } + try: + res = self.session.get(self.cloudDiskUrls['secretKey'], headers=headers, timeout=10).json() + secret = res.get('data', {}).get('secretKey') + if res.get('code') == '0000' and secret: + self.cloudDisk.secretKey = secret.encode('utf-8') + self.log("云盘任务: secretKey 获取成功") + return self.cloudDisk.secretKey + self.log(f"云盘任务: getSecretKey 失败: {res}") + except Exception as e: + self.log(f"云盘任务: getSecretKey 异常: {e}") + return None + + def build_signature_headers_cloud(self): + secret_key = self.get_secret_key_cloud() + if not secret_key: + return {} + request_ts = str(round(time.time() * 1000)) + nonce = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8)) + signature = hmac.new( + secret_key, f"{nonce}{request_ts}".encode('utf-8'), hashlib.sha256, + ).hexdigest() + return { + 'x-request-timestamp': request_ts, + 'x-request-nonce': nonce, + 'x-request-signature': signature, + } + + def run_generic_cloud_task(self, task_code, task_name): + self.log(f"云盘任务: [{task_name}] 尝试通用完成接口") + self.toFinish_cloud(task_code, task_name, False) + time.sleep(2) + self.handle_unknown_task_cloud(task_code, task_name) + time.sleep(3) + self.finalize_generic_task_cloud(task_code, task_name) + + def handle_unknown_task_cloud(self, task_code, task_name=""): + token = getattr(self.cloudDisk, 'userToken', '') + if not token: + return False + headers = { + 'User-Agent': 'LianTongYunPan/5.0.4 (iOS 16.3)', + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'Accept-Encoding': 'br;q=1.0, gzip;q=0.9, deflate;q=0.8', + 'Access-Token': token, 'X-YP-Access-Token': token, + 'Client-Id': '1001000035', 'X-YP-Client-Id': '1001000035', + 'App-Version': 'yp-app/5.0.4', 'app-type': 'liantongyunpanapp', + 'Sys-Version': 'iOS/16.3', + 'Accept-Language': 'zh-Hans-CN;q=1.0', + } + prefix = f"云盘任务: [{task_name}]" if task_name else "云盘任务: 未知任务" + try: + res = self.session.post( + self.cloudDiskUrls['taskFinish'], + json={"taskCode": task_code, "taskStatus": {"isBackUp": "1"}}, + headers=headers, + timeout=10, + ).json() + meta_code = str(res.get('meta', {}).get('code')) + if meta_code == '90003600': + self.log(f"{prefix} 处理完成") + return True + if meta_code in ('200', '0') or str(res.get('code')) in ('200', '0', '0000'): + self.log(f"{prefix} 处理完成: {res.get('msg', res.get('meta', {}).get('message', '成功'))}") + return True + self.log(f"{prefix} 处理失败: {res}") + except Exception as e: + self.log(f"云盘任务: [{task_name or task_code}] 处理失败: {e}") + return False + + def ltyp_task(self, is_query_only=False): + self.log("==== 联通云盘任务 ====") + self.init_cloud_urls() + class CloudDiskState: pass + self.cloudDisk = CloudDiskState() + if not self.ecs_token: + self.log("云盘任务: 缺少 ecs_token,跳过。") + return + ticket = self.getTicketByNative_cloud() + if not ticket: return + if not hasattr(self, 'city_info') or not self.city_info: + self.get_city_info() + token = self.get_ltypDispatcher_cloud(ticket) + if not token: return + time.sleep(0.5) + self.get_userInfo_cloud() + self.init_cloud_task_records_state() + if is_query_only: + self.log("云盘任务: [查询模式] 跳过任务执行...") + self.get_userInfo_cloud() + return + time.sleep(0.5) + self.get_secret_key_cloud() + self.get_taskDetail_cloud() + time.sleep(0.5) + self.get_userInfo_cloud() + time.sleep(2) + self.draw_lottery_cloud() + time.sleep(2) + self.clean_duplicate_files_cloud() + + def getTicketByNative_sec(self): + for attempt in range(1, 4): + try: + url = f"https://m.client.10010.com/edop_ng/getTicketByNative?token={self.ecs_token}&appId=edop_unicom_3a6cc75a" + city_code = "" + cookie_str = f"PvSessionId={datetime.now().strftime('%Y%m%d%H%M%S')}{self.unicomTokenId};c_mobile={self.account_mobile}; c_version=iphone_c@11.0800; city=036|{city_code}|90063345|-99;devicedId={self.unicomTokenId}; ecs_token={self.ecs_token};t3_token=" + headers = { + "Cookie": cookie_str, + "Accept": "*/*", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "Accept-Language": "zh-Hans-CN;q=1.0" + } + res = self.session.get(url, headers=headers, timeout=10) + if res.status_code != 200: + self.log(f"安全管家: getTicketByNative_sec http请求失败 {res.status_code}") + return + try: + result = res.json() + except: + self.log(f"安全管家: getTicketByNative_sec json解析失败: {res.text[:100]}") + return + self.sec_ticket1 = result.get('ticket') + if self.sec_ticket1: + return + else: + self.log(f"安全管家: getTicketByNative_sec 失败 - {result}") + except Exception as e: + err_msg = str(e) + if attempt < 3 and os.environ.get("UNICOM_PROXY_API") and ("Max retries exceeded" in err_msg or "timed out" in err_msg.lower() or "connection" in err_msg.lower() or "SOCKS" in err_msg): + self.log(f"安全管家: getTicketByNative_sec 第{attempt}次异常触发故障转移: {err_msg}") + self.failover_proxy() + continue + self.log(f"安全管家: getTicketByNative_sec 第{attempt}次重试 - 异常: {e}") + time.sleep(2) + + def getAuthToken_sec(self): + if not getattr(self, 'sec_ticket1', None): + self.log("安全管家 getAuthToken_sec 缺少 ticket1,跳过") + return + try: + url = "https://uca.wo116114.com/api/v1/auth/ticket?product_line=uasp&entry_point=h5&entry_point_id=edop_unicom_3a6cc75a" + headers = { + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "Content-Type": "application/json", + "clientType": "uasp_unicom_applet" + } + data = { "productId": "", "type": 1, "ticket": self.sec_ticket1 } + res = self.session.post(url, json=data, headers=headers).json() + if res.get('data'): + self.sec_token = res['data'].get('access_token') + else: + self.log(f"安全管家: getAuthToken_sec 失败 - {res}") + except Exception as e: + self.log(f"安全管家: getAuthToken_sec 异常: {e}") + + def getTicketForJF_sec(self): + if not getattr(self, 'sec_token', None): + self.log("安全管家 getTicketForJF_sec 缺少 token,跳过") + return + try: + url1 = "https://uca.wo116114.com/api/v1/auth/getTicket?product_line=uasp&entry_point=h5&entry_point_id=edop_unicom_3a6cc75a" + headers1 = { + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "Content-Type": "application/json", + "auth-sa-token": self.sec_token, + "clientType": "uasp_unicom_applet" + } + data1 = { "productId": "91311616", "phone": self.account_mobile } + res1 = self.session.post(url1, json=data1, headers=headers1).json() + if res1.get('data'): + self.sec_ticket = res1['data'].get('ticket') + else: + self.log("安全管家获取积分票据失败") + return + url2 = "https://m.jf.10010.com/jf-external-application/page/query" + headers2 = { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301};ltst;OSVersion/16.6", + "partnersid": "1702", + "ticket": unquote(self.sec_ticket), + "clienttype": "uasp_unicom_applet", + } + if hasattr(self, 'sec_jeaId'): + headers2["Cookie"] = f"_jea_id={self.sec_jeaId}" + res2 = self.session.post(url2, json={"activityId": "s747395186896173056", "partnersId": "1702"}, headers=headers2) + res2 = self.session.post(url2, json={"activityId": "s747395186896173056", "partnersId": "1702"}, headers=headers2) + for cookie in self.session.cookies: + if cookie.name == '_jea_id': + self.sec_jeaId = cookie.value + if 'Set-Cookie' in res2.headers: + match = re.search(r'_jea_id=([^;]+)', res2.headers['Set-Cookie']) + if match: + self.sec_jeaId = match.group(1) + self.log(f"安全管家: 更新 jeaId: {self.sec_jeaId}") + except Exception as e: + self.log(f"安全管家: getTicketForJF_sec 异常: {e}") + + def get_secret_key_sec(self): + if getattr(self, 'sec_secretKey', None): + return self.sec_secretKey + if not getattr(self, 'sec_ticket', None): + return None + headers = { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'User-Agent': "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301};ltst;OSVersion/16.6", + 'Accept-Encoding': 'gzip, deflate, br', + 'Connection': 'keep-alive', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Origin': 'https://m.jf.10010.com', + 'Host': 'm.jf.10010.com', + 'clienttype': 'uasp_unicom_applet', + 'partnersid': '1702', + 'ticket': unquote(self.sec_ticket), + } + if hasattr(self, 'sec_jeaId') and self.sec_jeaId: + headers['Cookie'] = f"_jea_id={self.sec_jeaId};" + try: + res = self.session.get("https://m.jf.10010.com/jf-external-application/jftask/getSecretKey", headers=headers, timeout=10).json() + secret = res.get('data', {}).get('secretKey') + if res.get('code') == '0000' and secret: + self.sec_secretKey = secret.encode('utf-8') + self.log("安全管家: secretKey 获取成功") + return self.sec_secretKey + self.log(f"安全管家: getSecretKey 失败: {res}") + except Exception as e: + self.log(f"安全管家: getSecretKey 异常: {e}") + return None + + def build_signature_headers_sec(self): + secret_key = self.get_secret_key_sec() + if not secret_key: + return {} + request_ts = str(round(time.time() * 1000)) + nonce = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8)) + signature = hmac.new( + secret_key, f"{nonce}{request_ts}".encode('utf-8'), hashlib.sha256, + ).hexdigest() + return { + 'x-request-timestamp': request_ts, + 'x-request-nonce': nonce, + 'x-request-signature': signature, + } + + def operateBlacklist_sec(self, phone_number, type_val): + type_name = "添加" if type_val == 0 else "删除" + self.log(f"安全管家: 正在执行{type_name}黑名单号码: {phone_number}") + try: + url = "https://uca.wo116114.com/sjgj/woAssistant/umm/configs/v1/config?product_line=uasp&entry_point=h5&entry_point_id=wxdefbc1986dc757a6" + headers = { + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "auth-sa-token": self.sec_token, + "clientType": "uasp_unicom_applet", + "token": self.sec_token, + "Cookie": f"devicedId={self.unicomTokenId}" + } + data = { + "productId": "91015539", + "type": 1, + "operationType": type_val, + "contents": [{ "content": phone_number, "contentTag": "", "nickname": None, "configTime": None }] + } + if type_val == 0: + data["blacklistSource"] = 0 + res = self.session.post(url, json=data, headers=headers).json() + return res + except Exception as e: + self.log(f"operateBlacklist_sec error: {e}") + return None + + def addToBlacklist_sec(self): + phone_number = "13088888888" + res = self.operateBlacklist_sec(phone_number, 0) + success_codes = ['0000', 0] + if res and (res.get('code') in success_codes or res.get('msg') == '成功'): + self.log("安全管家: ✅ 添加黑名单成功。") + return + is_duplicate = res and res.get('msg') and "号码已存在" in res.get('msg') + if is_duplicate: + self.log(f"安全管家: ⚠️ 检测到号码 {phone_number} 已存在,执行先删除后添加流程。") + del_res = self.operateBlacklist_sec(phone_number, 1) + is_del_success = del_res and (del_res.get('code') in success_codes or (del_res.get('msg') and ("成功" in del_res.get('msg') or "不在黑名单" in del_res.get('msg')))) + if is_del_success: + self.log("安全管家: ✅ 删除旧记录成功,等待 2 秒后重新添加...") + time.sleep(2) + retry_res = self.operateBlacklist_sec(phone_number, 0) + if retry_res and (retry_res.get('code') in success_codes or retry_res.get('msg') == '成功'): + self.log("安全管家: ✅ 重新添加黑名单成功。") + else: + self.log(f"安全管家: ❌ 重新添加失败: {retry_res.get('msg')}") + else: + self.log("安全管家: ❌ 删除旧记录失败,无法继续添加。") + else: + self.log(f"安全管家: ❌ 添加黑名单失败: {res.get('msg') if res else '无响应'}") + + def markPhoneNumber_sec(self): + try: + url = "https://uca.wo116114.com/sjgj/unicomAssistant/uasp/configs/v1/addressBook/saveTagPhone?product_line=uasp&entry_point=h5&entry_point_id=wxdefbc1986dc757a6" + headers = { + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "auth-sa-token": self.sec_token, + "clientType": "uasp_unicom_applet" + } + data = { "tagPhoneNo": "13088330789", "tagIds": [26], "status": 0, "productId": "91311616" } + self.session.post(url, json=data, headers=headers) + self.log("安全管家: 执行号码标记。") + except Exception as e: + self.log(f"markPhoneNumber_sec error: {e}") + + def syncAddressBook_sec(self): + try: + url = "https://uca.wo116114.com/sjgj/unicomAssistant/uasp/configs/v1/addressBookBatchConfig?product_line=uasp&entry_point=h5&entry_point_id=edop_unicom_3a6cc75a" + headers = { + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "auth-sa-token": self.sec_token, + "clientType": "uasp_unicom_applet" + } + data = { "addressBookDTOList": [{ "addressBookPhoneNo": "13088888888", "addressBookName": "水水" }], "productId": "91311616", "opType": "1" } + self.session.post(url, json=data, headers=headers) + self.log("安全管家: 执行同步通讯录。") + except Exception as e: + self.log(f"syncAddressBook_sec error: {e}") + + def setInterceptionRules_sec(self): + try: + url = "https://uca.wo116114.com/sjgj/woAssistant/umm/configs/v1/config?product_line=uasp&entry_point=h5&entry_point_id=wxdefbc1986dc757a6" + headers = { + "User-Agent": "ChinaUnicom4.x/12.3.1 (com.chinaunicom.mobilebusiness; build:77; iOS 16.6.0) Alamofire/4.7.3 unicom{version:iphone_c@12.0301}", + "auth-sa-token": self.sec_token, + "clientType": "uasp_unicom_applet" + } + data = { "contents": [{ "name": "rings-once", "contentTag": "8", "contentName": "响一声", "content": "0", "icon": "alerting" }], "operationType": 0, "type": 3, "productId": "91311616" } + self.session.post(url, json=data, headers=headers) + self.log("安全管家: 执行设置拦截规则。") + except Exception as e: + self.log(f"setInterceptionRules_sec error: {e}") + + def viewWeeklyStatus_sec(self): + try: + url = "https://uca.wo116114.com/sjgj/unicomAssistant/uasp/configs/v1/weeklySwitchStatus?product_line=uasp&entry_point=h5&entry_point_id=wxdefbc1986dc757a6" + headers = { "auth-sa-token": self.sec_token, "clientType": "uasp_unicom_applet" } + self.session.post(url, json={ "productId": "91311616" }, headers=headers) + except: pass + + def queryKeyData_sec(self): + try: + url = "https://uca.wo116114.com/sjgj/unicomAssistant/uasp/report/v1/queryKeyData?product_line=uasp&entry_point=h5&entry_point_id=wxdefbc1986dc757a6" + headers = { "auth-sa-token": self.sec_token, "clientType": "uasp_unicom_applet" } + self.session.post(url, json={ "productId": "91311616" }, headers=headers) + except: pass + + def viewWeeklySummary_sec(self): + try: + url = "https://uca.wo116114.com/sjgj/unicomAssistant/uasp/report/v1/weeklySummary?product_line=uasp&entry_point=h5&entry_point_id=wxdefbc1986dc757a6" + headers = { "auth-sa-token": self.sec_token, "clientType": "uasp_unicom_applet" } + self.session.post(url, json={ "productId": "91311616" }, headers=headers) + self.log("安全管家: 执行查看周报。") + except: pass + + def receivePoints_sec(self, taskCode): + try: + url = "https://m.jf.10010.com/jf-external-application/jftask/receive" + headers = { + "ticket": unquote(self.sec_ticket), + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301};ltst;OSVersion/16.6", + "partnersid": "1702", + "clienttype": "uasp_unicom_applet", + } + headers.update(self.build_signature_headers_sec()) + if hasattr(self, 'sec_jeaId') and self.sec_jeaId: + headers["Cookie"] = f"_jea_id={self.sec_jeaId};" + res = self.session.post(url, json={ "taskCode": taskCode }, headers=headers).json() + if res.get('data') and res['data'].get('score'): + self.log(f"安全管家: ✅ 领取积分成功: {res['data']['score']} ({res.get('msg')})", notify=True) + elif res: + self.log(f"安全管家: ❌ 领取积分失败: {res.get('msg')}") + else: + self.log("安全管家: ❌ 领取积分API无响应") + except Exception as e: + self.log(f"receivePoints_sec error: {e}") + + def finishTask_sec(self, taskCode, taskName): + try: + url = "https://m.jf.10010.com/jf-external-application/jftask/toFinish" + headers = { + "ticket": unquote(self.sec_ticket), + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301};ltst;OSVersion/16.6", + "partnersid": "1702", + "clienttype": "uasp_unicom_applet", + "token": self.sec_token, + "Cookie": f"devicedId={self.unicomTokenId}" + } + headers.update(self.build_signature_headers_sec()) + if hasattr(self, 'sec_jeaId') and self.sec_jeaId: + headers["Cookie"] = f"_jea_id={self.sec_jeaId};" + self.session.post(url, json={ "taskCode": taskCode }, headers=headers) + self.log(f"安全管家: 开启任务 [{taskName}]") + if taskName == "联通助理-添加黑名单": + self.addToBlacklist_sec() + elif taskName == "联通助理-号码标记": + self.markPhoneNumber_sec() + elif taskName == "联通助理-同步通讯录": + self.syncAddressBook_sec() + elif taskName == "联通助理-骚扰拦截设置": + self.setInterceptionRules_sec() + elif taskName == "联通助理-查看周报": + self.viewWeeklyStatus_sec() + self.queryKeyData_sec() + self.viewWeeklySummary_sec() + except Exception as e: + self.log(f"finishTask_sec error: {e}") + + def signIn_sec(self, taskCode): + try: + url = "https://m.jf.10010.com/jf-external-application/jftask/sign" + headers = { + "ticket": unquote(self.sec_ticket), + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301};ltst;OSVersion/16.6", + "partnersid": "1702", + "clienttype": "uasp_unicom_applet", + } + headers.update(self.build_signature_headers_sec()) + if hasattr(self, 'sec_jeaId') and self.sec_jeaId: + headers["Cookie"] = f"_jea_id={self.sec_jeaId};" + res = self.session.post(url, json={ "taskCode": taskCode }, headers=headers).json() + self.log(f"安全管家: 完成签到: {res.get('msg') if res else '状态未知'}") + except Exception as e: + self.log(f"signIn_sec error: {e}") + + def executeAllTasks_sec(self): + try: + url = "https://m.jf.10010.com/jf-external-application/jftask/taskDetail" + headers = { + "ticket": unquote(self.sec_ticket), + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301};ltst;OSVersion/16.6", + "partnersid": "1702", + "clienttype": "uasp_unicom_applet", + } + if hasattr(self, 'sec_jeaId') and self.sec_jeaId: + headers["Cookie"] = f"_jea_id={self.sec_jeaId}" + res = self.session.post(url, json={}, headers=headers).json() + if not res or not res.get('data') or not res['data'].get('taskDetail'): + self.log("安全管家: 查询任务列表失败或响应格式错误。") + return + taskList = res['data']['taskDetail']['taskList'] + executableTaskNames = [ + "联通助理-添加黑名单", + "联通助理-号码标记", + "联通助理-同步通讯录", + "联通助理-骚扰拦截设置", + "联通助理-查看周报" + ] + executableTasks = [] + skippedTasks = [] + for task in taskList: + isKnown = task['taskName'] in executableTaskNames or "签到" in task['taskName'] + if isKnown: + executableTasks.append(task) + else: + skippedTasks.append(task) + unfinished_skipped = [t for t in skippedTasks if t['finishCount'] != t['needCount']] + if unfinished_skipped: + skipped_names = ", ".join([f"[{t['taskName']}]" for t in unfinished_skipped]) + self.log(f"安全管家: 跳过: {skipped_names}") + for task in executableTasks: + taskName = task['taskName'] + taskCode = task['taskCode'] + finishCount = int(task['finishCount']) + needCount = int(task['needCount']) + finishText = task.get('finishText', '') + self.log(f"安全管家: [{taskName}]: {finishCount}/{needCount} - {finishText}") + if finishCount != needCount: + remaining = needCount - finishCount + self.log(f"安全管家: 任务未完成,需要再执行 {remaining} 次") + for i in range(remaining): + time.sleep(3) + try: + if "签到" in taskName: + self.signIn_sec(taskCode) + else: + self.finishTask_sec(taskCode, taskName) + if "签到" not in taskName: + time.sleep(10) + self.receivePoints_sec(taskCode) + else: + self.receivePoints_sec(taskCode) + break + except Exception as e: + self.log(f"安全管家: 执行 {taskCode} 时出错: {e}") + break + elif finishText == "待领取": + try: + time.sleep(3) + self.receivePoints_sec(taskCode) + except Exception as e: + self.log(f"安全管家: 领取 {taskCode} 奖励时出错: {e}") + else: + self.log(f"安全管家: [{taskName}] 任务已完成且奖励已领取") + self.log("安全管家: ---------------------") + except Exception as e: + self.log(f"executeAllTasks_sec error: {e}") + + def getUserInfo_sec(self): + try: + url = "https://m.jf.10010.com/jf-external-application/jftask/userInfo" + headers = { + "ticket": unquote(self.sec_ticket), + "User-Agent": "Mozilla/5.0 (Linux; Android 9; ONEPLUS A5000 Build/PKQ1.180716.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.179 Mobile Safari/537.36", + "partnersid": "1702", + "clienttype": "uasp_unicom_applet", + } + if hasattr(self, 'sec_jeaId') and self.sec_jeaId: + headers["Cookie"] = f"_jea_id={self.sec_jeaId}" + res = self.session.post(url, json={}, headers=headers).json() + if not res or res.get('code') != '0000' or not res.get('data'): + self.log(f"安全管家: 查询积分失败: {res.get('msg') if res else '无响应'}") + return + currentPoints = int(res['data'].get('availableScore', 0)) + todayPoints = res['data'].get('todayEarnScore', 0) + if not hasattr(self, 'sec_oldJFPoints') or self.sec_oldJFPoints is None: + self.sec_oldJFPoints = currentPoints + self.log(f"安全管家: 运行前积分:{currentPoints} (今日已赚 {todayPoints})") + else: + pointsGained = currentPoints - self.sec_oldJFPoints + self.log(f"安全管家: 运行后积分{currentPoints},本次运行获得{pointsGained}", notify=True) + except Exception as e: + self.log(f"getUserInfo_sec error: {e}") + + def securityButlerTask(self, is_query_only=False): + self.log("==== 联通安全管家 ====") + if not self.ecs_token: + self.log("安全管家: 缺少 ecs_token,跳过") + return + try: + self.getTicketByNative_sec() + if not getattr(self, 'sec_ticket1', None): return + self.getAuthToken_sec() + if not getattr(self, 'sec_token', None): return + self.getTicketForJF_sec() + if not getattr(self, 'sec_ticket', None): return + self.sec_oldJFPoints = None + self.getUserInfo_sec() + if is_query_only: + self.log("安全管家: [查询模式] 跳过任务执行...") + return + self.get_secret_key_sec() + self.executeAllTasks_sec() + self.getUserInfo_sec() + except Exception as e: + self.log(f"安全管家: 异常: {e}") + + def aiting_query_integral(self): + url = "https://m.jf.10010.com/jf-external-application/jftask/userInfo" + response = self.session.post(url, json={}, headers=self.aiting_jf_headers()) + self.update_aiting_jea_id(response) + res = response.json() + if res.get('code') == '0000': + data = res.get('data', {}) + self.log(f"积分概览: 今日已赚 {data.get('todayEarnScore')}, 当前余额 {data.get('availableScore')}", notify=True) + + def aiting_jf_headers(self, with_signature=False): + headers = { + 'ticket': unquote(self.aiting_biz_ticket), + 'pageid': 's789081246969976832', + 'clienttype': 'aiting_android', + 'partnersid': '1706', + 'content-type': 'application/json;charset=UTF-8', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 12; Redmi K30 Pro Build/SKQ1.220303.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.159 Mobile Safari/537.36 WoReaderApp/Android', + 'Origin': 'https://m.jf.10010.com', + 'Host': 'm.jf.10010.com', + } + jea_id = getattr(self, 'aiting_jeaId', '') + if jea_id: + headers['Cookie'] = f"_jea_id={jea_id};" + if with_signature: + headers.update(self.build_signature_headers_aiting()) + return headers + + def update_aiting_jea_id(self, response=None): + jea_id = '' + if response is not None: + cookie = response.headers.get('Set-Cookie', '') + match = re.search(r'_jea_id=([^;]+)', cookie) + if match: + jea_id = match.group(1) + if not jea_id: + for cookie_item in self.session.cookies: + if cookie_item.name == '_jea_id': + jea_id = cookie_item.value + break + if jea_id: + self.aiting_jeaId = jea_id + return jea_id + + def get_secret_key_aiting(self): + if getattr(self, 'aiting_secretKey', None): + return self.aiting_secretKey + try: + self.update_aiting_jea_id() + res = self.session.get( + "https://m.jf.10010.com/jf-external-application/jftask/getSecretKey", + headers=self.aiting_jf_headers(), + timeout=10, + ) + self.update_aiting_jea_id(res) + data = res.json() + secret = data.get('data', {}).get('secretKey') + if data.get('code') == '0000' and secret: + self.aiting_secretKey = secret.encode('utf-8') + return self.aiting_secretKey + self.log(f"爱听任务: getSecretKey 失败: {data}") + except Exception as e: + self.log(f"爱听任务: getSecretKey 异常: {e}") + return None + + def build_signature_headers_aiting(self): + secret_key = self.get_secret_key_aiting() + if not secret_key: + return {} + request_ts = str(round(time.time() * 1000)) + nonce = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8)) + signature = hmac.new( + secret_key, f"{nonce}{request_ts}".encode('utf-8'), hashlib.sha256, + ).hexdigest() + return { + 'x-request-timestamp': request_ts, + 'x-request-nonce': nonce, + 'x-request-signature': signature, + } + + def ltzf_task(self): + self.log("==== 联通祝福 ====") + base_url = "https://wocare.unisk.cn/mbh/getToken" + params = { + "channelType": WOCARE_CONSTANTS["serviceLife"], + "homePage": "home", + "duanlianjieabc": "qAz2m" + } + targetUrl = f"{base_url}?{urlencode(params)}" + res = self.openPlatLineNew(targetUrl) + if not res or 'ticket' not in res: + self.log("联通祝福: 获取Ticket失败") + return + ticket = res['ticket'] + if not self.wocare_getToken(ticket): + self.log("联通祝福: 获取Wocare Token失败") + return + self.wocare_getSpecificityBanner() + wocare_activities = [ + {"name": "星座配对", "id": 2}, + {"name": "大转盘", "id": 3}, + {"name": "盲盒抽奖", "id": 4} + ] + for activity in wocare_activities: + self.wocare_getDrawTask(activity) + self.wocare_loadInit(activity) + + def openPlatLineNew(self, to_url): + try: + base_url = "https://m.client.10010.com/mobileService/openPlatform/openPlatLineNew.htm" + params = {"to_url": to_url} + for attempt in range(1, 4): + try: + res = self.session.get(base_url, params=params, allow_redirects=False, timeout=15) + break + except Exception as e: + err_msg = str(e) + if attempt < 3 and os.environ.get("UNICOM_PROXY_API") and ("Max retries exceeded" in err_msg or "timed out" in err_msg.lower() or "connection" in err_msg.lower() or "SOCKS" in err_msg): + self.log(f"openPlatLineNew 第{attempt}次异常触发故障转移: {err_msg}") + self.failover_proxy() + continue + self.log(f"openPlatLineNew 第{attempt}次重试 - 异常: {e}") + if attempt == 3: + return None + time.sleep(2) + if res.status_code == 302 and 'Location' in res.headers: + loc = res.headers['Location'] + parsed = urlparse(loc) + qs = parse_qs(parsed.query) + ticket = qs.get('ticket', [''])[0] + type_val = qs.get('type', [''])[0] + if ticket: + return {'ticket': ticket, 'type': type_val, 'loc': loc} + else: + self.log("openPlatLineNew: 重定向URL中无ticket") + else: + self.log(f"openPlatLineNew: 状态码{res.status_code} (期望302)") + except Exception as e: + self.log(f"openPlatLineNew 异常: {str(e)}") + return None + + def random_string(self, length, chars=string.ascii_letters + string.digits): + return ''.join(random.choice(chars) for _ in range(length)) + + def get_bizchannelinfo(self): + info = { + "bizChannelCode": "225", + "disriBiz": "party", + "unionSessionId": "", + "stType": "", + "stDesmobile": "", + "source": "", + "rptId": self.rptId, + "ticket": "", + "tongdunTokenId": self.tokenId_cookie, + "xindunTokenId": self.unicomTokenId + } + return json.dumps(info) + + def get_epay_authinfo(self): + info = { + "mobile": "", + "sessionId": getattr(self, 'sessionId', ''), + "tokenId": getattr(self, 'tokenId', ''), + "userId": "" + } + return json.dumps(info) + + def ttlxj_task(self, is_query_only=False): + self.log("==== 天天领现金 ====") + for attempt in range(1, 31): + try: + ticket_res = self.openPlatLineNew("https://epay.10010.com/ci-mps-st-web/ttlxj/") + if not ticket_res or not ticket_res.get('ticket'): + if attempt < 30: + self.log(f"天天领现金: 获取Ticket失败,正在重试 ({attempt}/30)...") + time.sleep(2) + continue + else: + self.log("天天领现金: 获取Ticket失败,已达最大重试次数,跳过任务") + return + ticket = ticket_res['ticket'] + type_val = ticket_res['type'] + if self.ttlxj_authorize(ticket, type_val, ticket_res['loc']): + if self.ttlxj_auth_check(): + if is_query_only: + self.ttlxj_query_available() + return + self.ttlxj_do_tasks() + self.ttlxj_query_available() + break + else: + if attempt < 30: + self.log(f"天天领现金: 授权失败,正在重试 ({attempt}/30)...") + time.sleep(2) + else: + self.log("天天领现金: 授权失败,已达最大重试次数") + except Exception as e: + if attempt < 30: + self.log(f"天天领现金: 任务异常 ({e}),正在重试 ({attempt}/30)...") + time.sleep(2) + else: + self.log(f"天天领现金: 任务异常: {e}") + + def ttlxj_authorize(self, ticket, type_val, referer_url): + try: + url = "https://epay.10010.com/woauth2/v2/authorize" + headers = { + "Origin": "https://epay.10010.com", + "Referer": referer_url + } + payload = { + "response_type": "rptid", + "client_id": "73b138fd-250c-4126-94e2-48cbcc8b9cbe", + "redirect_uri": "https://epay.10010.com/ci-mps-st-web/", + "login_hint": { + "credential_type": "st_ticket", + "credential": ticket, + "st_type": type_val, + "force_logout": True, + "source": "app_sjyyt" + }, + "device_info": { + "token_id": f"chinaunicom-pro-{int(time.time()*1000)}-{self.random_string(13)}", + "trace_id": self.random_string(32) + } + } + res = self.session.post(url, json=payload, headers=headers, timeout=10) + if res.status_code == 200: + return True + else: + self.log(f"天天领现金: Authorize失败[{res.status_code}]: {res.text}") + return False + except Exception as e: + self.log(f"ttlxj_authorize error: {e}") + return False + + def ttlxj_auth_check(self): + try: + url = "https://epay.10010.com/ps-pafs-auth-front/v1/auth/check" + headers = { + "bizchannelinfo": self.get_bizchannelinfo() + } + res = self.session.post(url, headers=headers, json={}, timeout=10) + data = res.json() + code = data.get("code") + if code == "0000": + auth_info = data.get("data", {}).get("authInfo", {}) + self.sessionId = auth_info.get("sessionId", "") + self.tokenId = auth_info.get("tokenId", "") + self.epay_userId = auth_info.get("userId", "") + return True + elif code == "2101000100": + login_url = data.get("data", {}).get("woauth_login_url") + if login_url: + return self.ttlxj_login(login_url) + else: + self.log(f"天天领现金: AuthCheck失败[{code}]: {data.get('msg')}") + return False + except Exception as e: + self.log(f"ttlxj_auth_check error: {e}") + return False + + def ttlxj_login(self, login_url): + try: + full_url = f"{login_url}https://epay.10010.com/ci-mcss-party-web/clockIn/?bizFrom=225&bizChannelCode=225" + res = self.session.get(full_url, allow_redirects=False, timeout=10) + if res.status_code == 302 and 'Location' in res.headers: + loc = res.headers['Location'] + parsed = urlparse(loc) + qs = parse_qs(parsed.query) + rptid = qs.get('rptid', [''])[0] + if rptid: + self.rptId = rptid + return self.ttlxj_auth_check() + else: + self.log("天天领现金: Login跳转后无rptid") + else: + self.log(f"天天领现金: Login失败[{res.status_code}]") + return False + except Exception as e: + self.log(f"ttlxj_login error: {e}") + return False + + def ttlxj_do_tasks(self): + info_url = "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/userDrawInfo" + headers = { + "bizchannelinfo": self.get_bizchannelinfo(), + "authinfo": self.get_epay_authinfo() + } + res = self.request("post", info_url, json={}, headers=headers) + if not res: return + data = res.json() + if data.get('code') == '0000': + day_of_week = data.get("data", {}).get("dayOfWeek", "") + draw_key = f"day{day_of_week}" + has_not_clocked_in = data.get("data", {}).get(draw_key) == "1" + if has_not_clocked_in: + self.log(f"天天领现金: 今天未打卡", notify=True) + today_js = (datetime.now().weekday() + 1) % 7 + draw_type = "C" if today_js == 0 else "B" + self.ttlxj_unifyDrawNew(draw_type) + else: + self.log(f"天天领现金: 今天已打卡", notify=True) + else: + self.log(f"天天领现金: 查询失败: {data.get('msg')}") + + def ttlxj_unifyDrawNew(self, draw_type): + draw_url = "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/unifyDrawNew" + headers = { + "bizchannelinfo": self.get_bizchannelinfo(), + "authinfo": self.get_epay_authinfo() + } + req_data = { + "drawType": draw_type, + "bizFrom": "225", + "activityId": "TTLXJ20210330" + } + res = self.request("post", draw_url, data=req_data, headers=headers) + if not res: return + data = res.json() + if data.get('code') == '0000': + prize = data.get('data', {}).get('prizeName', '未知奖品') + self.log(f"天天领现金: 抽奖成功: {prize}", notify=True) + else: + self.log(f"天天领现金: 抽奖失败: {data.get('msg')}") + + def ttlxj_query_available(self): + avail_url = "https://epay.10010.com/ci-mcss-party-front/v1/ttlxj/queryAvailable" + headers = { + "bizchannelinfo": self.get_bizchannelinfo(), + "authinfo": self.get_epay_authinfo() + } + res = self.request("post", avail_url, json={}, headers=headers) + if not res: return + data = res.json() + if data.get('code') == '0000': + d = data.get('data', {}) + amount_raw = int(d.get('availableAmount', '0')) + amount_yuan = f"{amount_raw / 100:.2f}" + msg = f"天天领现金: 可用立减金: {amount_yuan}元" + seven_day = int(d.get('sevenDayExpireAmount', 0)) + if seven_day > 0: + msg += f", 7天内过期立减金: {seven_day / 100:.2f}元" + min_exp_amt = int(d.get('minExpireAmount', 0)) + min_exp_date = d.get('minExpireDate') + if min_exp_amt > 0 and min_exp_date: + msg += f", 最早过期立减金: {min_exp_amt / 100:.2f}元 -- {min_exp_date}过期" + self.log(msg, notify=True) + else: + self.log(f"天天领现金: 查询余额失败: {data.get('msg')}") + + def aiting_get_aes(self, data, key): + iv_str = "16-Bytes--String" + key_bytes = key[:16].encode('utf-8') + iv_bytes = iv_str[:16].encode('utf-8') + text = json.dumps(data, separators=(',', ':')) if isinstance(data, (dict, list)) else str(data) + padded_data = pad(text.encode('utf-8'), 16) + cipher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes) + ciphertext = cipher.encrypt(padded_data) + hex_str = ciphertext.hex() + return base64.b64encode(hex_str.encode('utf-8')).decode('utf-8') + + def aiting_aes_encrypt(self, data, key, iv): + key_bytes = key.encode('utf-8') + iv_bytes = iv.encode('utf-8') + text = json.dumps(data, separators=(',', ':')) if isinstance(data, (dict, list)) else str(data) + padded_data = pad(text.encode('utf-8'), 16) + cipher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes) + ciphertext = cipher.encrypt(padded_data) + hex_str = ciphertext.hex().upper() + return base64.b64encode(hex_str.encode('utf-8')).decode('utf-8') + + def aiting_md5(self, text): + return hashlib.md5(text.encode('utf-8')).hexdigest() + + def aiting_generate_sign(self, params, key): + sorted_keys = sorted(params.keys()) + sign_str = '&'.join([f"{k}={params[k]}" for k in sorted_keys]) + final_str = f"{sign_str}&key={key}" + return self.aiting_md5(final_str) + + def aiting_timestamp(self): + return str(int(time.time() * 1000)) + + def aiting_nonce(self): + return str(random.randint(100000, 999999)) + + def aiting_generate_woid(self, imei): + random6 = ''.join(random.choices(string.ascii_letters + string.digits, k=6)) + imei8 = imei[:8] if len(imei) >= 8 else imei.ljust(8, '0') + random4 = ''.join(random.choices(string.ascii_letters + string.digits, k=4)) + random2 = ''.join(random.choices(string.ascii_letters + string.digits, k=2)) + return f"WOA{random6}{imei8}LOT{random4}LV{random2}" + + def aiting_calculate_clientconfirm(self, userid, imei): + plaintext = f"android{userid}{imei}" + return self.aiting_aes_encrypt(plaintext, AITING_AES_KEY, AITING_AES_IV) + + def aiting_calculate_passcode(self, timestamp, phone): + return self.aiting_md5(timestamp + phone + AITING_CLIENT_KEY) + + def aiting_build_statisticsinfo(self, userid, useraccount, imei, clientconfirm): + params = { + 'channelid': '28015001', + 'sid': ''.join(random.choices(string.ascii_letters + string.digits + "_-", k=20)), + 'eid': ''.join(random.choices(string.ascii_letters + string.digits + "_", k=20)), + 'osversion': 'Android12', + 'clientallid': '000000100000000000058.0.2.1225', + 'display': '2400_1080', + 'ip': '192.168.3.24', + 'nettypename': 'wifi', + 'version': '802', + 'versionname': '8.0.2', + 'terminalName': 'Redmi', + 'terminalType': 'Redmi_K30_Pro', + 'udid': 'null', + 'woid': self.aiting_generate_woid(imei), + 'useraccount': useraccount, + 'userid': userid, + 'clientconfirm': clientconfirm + } + return '&'.join([f"{k}={params[k]}" for k in params]) + + def generate_random_imei(self): + tac = ''.join([str(random.randint(0, 9)) for _ in range(8)]) + snr = ''.join([str(random.randint(0, 9)) for _ in range(6)]) + imei_raw = tac + snr + digits = [int(d) for d in imei_raw] + for i in range(len(digits) - 1, -1, -2): + digits[i] *= 2 + if digits[i] > 9: digits[i] -= 9 + total = sum(digits) + check_digit = (10 - (total % 10)) % 10 + return imei_raw + str(check_digit) + + def aiting_woread_login(self, phone): + access_token = "ODZERTZCMjA1NTg1MTFFNDNFMThDRDYw" + token_enc = "" + if self.token_online: + token_enc = self.aiting_get_aes(self.token_online, WOREAD_KEY) + else: + self.log("阅读专区: 未找到 token_online,尝试仅使用手机号登录") + phone_enc = self.aiting_get_aes(phone, WOREAD_KEY) + timestamp = datetime.now().strftime("%Y%m%d%H%M%S") + if token_enc: + inner_data = { + "tokenOnline": token_enc, + "phone": phone_enc, + "timestamp": timestamp + } + else: + inner_data = { + "phone": phone_enc, + "timestamp": timestamp + } + sign_result = self.aiting_get_aes(inner_data, WOREAD_KEY) + url = "https://10010.woread.com.cn/ng_woread_service/rest/account/login" + body = {"sign": sign_result} + headers = { + "User-Agent": "Mozilla/5.0 (Linux; Android 11; Redmi Note 10 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.159 Mobile Safari/537.36", + "accesstoken": access_token, + "Content-Type": "application/json;charset=UTF-8", + "Origin": "https://10010.woread.com.cn" + } + res = self.session.post(url, json=body, headers=headers).json() + if res.get("code") == "0000": + return res.get("data", {}).get("token") + self.log(f"爱听登录: 沃阅读登录失败: {res}") + return None + + def aiting_get_jwt_token(self, statisticsinfo): + timestamp = self.aiting_timestamp() + sign_params = { + 'clientSource': '3', + 'clientId': 'android', + 'source': '3', + 'timestamp': timestamp + } + sign_val = self.aiting_generate_sign(sign_params, AITING_SIGN_KEY_APPKEY) + client_id_const = "395DEDE9C1D6FE11B7C9C0D82B353E74" + client_id_b64 = base64.b64encode(client_id_const.encode('utf-8')).decode('utf-8') + body = { + 'clientSource': '3', + 'clientId': client_id_b64, + 'source': '3', + 'timestamp': timestamp, + 'sign': sign_val + } + url = f"{AITING_BASE_URL}/oauth/client/appkey" + headers = { + 'Skip-Authorization-Check': 'true', + 'statisticsinfo': statisticsinfo, + "User-Agent": "Dalvik/2.1.0 (Linux; U; Android 12; Redmi K30 Pro Build/SKQ1.220303.001)" + } + try: + res = self.session.post(url, json=body, headers=headers).json() + if res.get("code") == "0000" and res.get("key"): + return res.get("key") + self.log(f"爱听登录: 获取JWT失败: {res}") + except Exception as e: + self.log(f"爱听登录: 获取JWT异常: {e}") + return None + + def aiting_api_login(self, phone, useraccount, jwt_token, statisticsinfo): + timestamp = datetime.now().strftime("%Y%m%d%H%M%S") + passcode = self.aiting_calculate_passcode(timestamp, phone) + query_params_list = [ + 'networktype=3', 'ua=Redmi+K30+Pro', 'isencode=false', + 'clientversion=8.0.2', 'versionname=Android_1_1080x2356', + 'channelid=28015001', 'userlabelisencode=0', 'validatecode=', 'sid=', + f"timestamp={timestamp}", f"passcode={passcode}" + ] + query_str = '&'.join(query_params_list) + final_account = useraccount + url = f"{AITING_BASE_URL}/mainrest/rest/read/user/ulogin/3/{final_account}/1/1/0?{query_str}" + req_time = self.aiting_timestamp() + nonce = self.aiting_nonce() + sign_params = { + 'jwt': jwt_token, + 'nonestr': nonce, + 'osversion': 'Android12', + 'terminalName': 'Redmi', + 'timestamp': req_time + } + sorted_keys = sorted(sign_params.keys()) + sign_str = '&'.join([f"{k}={sign_params[k]}" for k in sorted_keys]) + requertid = self.aiting_md5(f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}") + headers = { + 'statisticsinfo': statisticsinfo, + 'requerttime': req_time, + 'nonestr': nonce, + 'requertid': requertid, + 'AuthorizationClient': f"Bearer {jwt_token}", + 'User-Agent': 'okhttp/4.9.0' + } + try: + res = self.session.get(url, headers=headers).json() + if res.get("code") == "0000" and res.get("message"): + msg = res.get("message") + token = msg.get("token") + userid = msg.get("userid") + if msg.get("accountinfo"): + token = msg.get("accountinfo", {}).get("token") or token + userid = msg.get("accountinfo", {}).get("userid") or userid + return {"token": token, "userid": userid} + self.log(f"爱听登录: 业务API登录失败: {res}") + except Exception as e: + self.log(f"爱听登录: 业务API异常: {e}") + return None + + def aiting_login_flow(self): + self.log("正在执行爱听登录流程...") + woread_token = self.aiting_woread_login(self.mobile) + if not woread_token: return False + self.aiting_woread_token = woread_token + imei = self.generate_random_imei() + userid = self.mobile + useraccount = self.mobile + clientconfirm = self.aiting_calculate_clientconfirm(userid, imei) + statisticsinfo = self.aiting_build_statisticsinfo(userid, useraccount, imei, clientconfirm) + self.aiting_statisticsinfo = statisticsinfo + jwt = self.aiting_get_jwt_token(statisticsinfo) + if not jwt: return False + self.aiting_jwt = jwt + login_data = self.aiting_api_login(self.mobile, useraccount, jwt, statisticsinfo) + if not login_data: return False + self.aiting_biz_token = login_data.get('token') + self.aiting_base_userid = login_data.get('userid') or self.mobile + self.log(f"✅ 爱听业务登录成功! Token已获取") + biz_ticket = self.aiting_get_ticket() + if biz_ticket: + self.aiting_biz_ticket = biz_ticket + return True + return False + + def aiting_get_ticket(self): + url = f"{AITING_BASE_URL}/activity/rest/unicom/points/getInfoTicket" + timestamp = self.aiting_timestamp() + sign_params = { + "token": self.aiting_biz_token, + "timestamp": timestamp, + "userid": self.aiting_base_userid + } + sign_val = self.aiting_generate_sign(sign_params, AITING_SIGN_KEY_API) + body = { + "sign": sign_val, + "timestamp": timestamp, + "token": self.aiting_biz_token, + "userid": self.aiting_base_userid + } + nonce = self.aiting_nonce() + head_sign_params = { + 'jwt': self.aiting_jwt, + 'nonestr': nonce, + 'osversion': 'Android12', + 'terminalName': 'Redmi', + 'timestamp': timestamp + } + sorted_keys = sorted(head_sign_params.keys()) + sign_str = '&'.join([f"{k}={head_sign_params[k]}" for k in sorted_keys]) + final_sign_str = f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}" + requertid = self.aiting_md5(final_sign_str) + headers = { + "AuthorizationClient": f"Bearer {self.aiting_jwt}", + "statisticsinfo": self.aiting_statisticsinfo, + "requerttime": timestamp, + "nonestr": nonce, + "requertid": requertid + } + try: + res = self.session.post(url, json=body, headers=headers).json() + if res.get("code") == "0000": + msg = res.get("message", "") + if "ticket=" in msg: + match = re.search(r'ticket=([^&]+)', msg) + if match: + return match.group(1) + return msg # Fallback if message is ticket itself? No, standard is URL. + self.log(f"爱听登录: 获取Ticket失败: {res}") + except Exception as e: + self.log(f"爱听登录: 获取Ticket异常: {e}") + return None + + def jf_get_task_detail(self, ticket): + url = "https://m.jf.10010.com/jf-external-application/jftask/taskDetail" + headers = self.aiting_jf_headers() + headers['Referer'] = f"https://m.jf.10010.com/jf-external-application/index.html?ticket={ticket}&pageID=s789081246969976832" + response = self.session.post(url, json={}, headers=headers) + self.update_aiting_jea_id(response) + res = response.json() + return res.get("data", {}).get("taskDetail", {}).get("taskList", []) + + def jf_to_finish(self, ticket, task_code): + url = "https://m.jf.10010.com/jf-external-application/jftask/toFinish" + response = self.session.post( + url, + json={'taskCode': task_code}, + headers=self.aiting_jf_headers(with_signature=True), + ) + self.update_aiting_jea_id(response) + + def jf_pop_up(self, ticket): + url = "https://m.jf.10010.com/jf-external-application/jftask/popUp" + response = self.session.post(url, json={}, headers=self.aiting_jf_headers()) + self.update_aiting_jea_id(response) + res = response.json() + if isinstance(res, dict): + if res.get('code') == "0000" and res.get('data', {}).get('score'): + self.log(f" └─ 🎉 获得 {res['data']['score']} 积分", notify=True) + elif res.get('code') != "0000": + self.log(f" └─ 📝 积分弹窗返回: {res.get('desc', res)}") + return res + + def aiting_complete_task_api(self, type_val): + timestamp = self.aiting_timestamp() + nonce = self.aiting_nonce() + sign_params = {'jwt': self.aiting_jwt, 'nonestr': nonce, 'osversion': 'Android12', 'terminalName': 'Redmi', 'timestamp': timestamp} + sign_str = '&'.join([f"{k}={sign_params[k]}" for k in sorted(sign_params.keys())]) + requertid = self.aiting_md5(f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}") + body_params = {'source': '3', 'timestamp': timestamp, 'token': self.aiting_woread_token, 'type': str(type_val), 'userid': self.aiting_base_userid} + body_str = '&'.join([f"{k}={body_params[k]}" for k in sorted(body_params.keys())]) + sign = self.aiting_md5(f"{body_str}&key={AITING_SIGN_KEY_API}") + url = f"{AITING_BASE_URL}/activity/rest/unicom/points/completiontask" + payload = {**body_params, 'sign': sign} + headers = { + 'AuthorizationClient': f"Bearer {self.aiting_jwt}", + 'requerttime': timestamp, + 'nonestr': nonce, + 'requertid': requertid, + 'statisticsinfo': self.aiting_statisticsinfo + } + self.session.post(url, json=payload, headers=headers) + + def aiting_get_secretkey(self): + timestamp = self.aiting_timestamp() + nonce = self.aiting_nonce() + sign_params = {'jwt': self.aiting_jwt, 'nonestr': nonce, 'osversion': 'Android12', 'terminalName': 'Redmi', 'timestamp': timestamp} + sign_str = '&'.join([f"{k}={sign_params[k]}" for k in sorted(sign_params.keys())]) + requertid = self.aiting_md5(f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}") + url = f"https://woread.com.cn/rest/read/statistics/getsecretkey/3/{self.aiting_base_userid}" + headers = { + 'AuthorizationClient': f"Bearer {self.aiting_jwt}", + 'requerttime': timestamp, 'nonestr': nonce, 'requertid': requertid, + 'statisticsinfo': self.aiting_statisticsinfo, 'User-Agent': 'okhttp/4.9.0' + } + params = {'token': self.aiting_woread_token} + res = self.session.get(url, params=params, headers=headers).json() + if res.get("code") == "0000": + return res.get("message") + return None + + def aiting_add_read_time(self, read_time_seconds): + secretkey = self.aiting_get_secretkey() + if not secretkey: return + timestamp = self.aiting_timestamp() + count_time_str = str(read_time_seconds * 1000) + book_id = "4524960" + data_obj = { + "userid": self.aiting_base_userid, + "counttime": count_time_str, + "timestamp": timestamp, + "secretkey": secretkey, + "cntindex": book_id, + "cnttype": 1, + "readtype": 1 + } + encrypted = self.aiting_aes_encrypt(data_obj, ADDREADTIME_AES_KEY, AITING_AES_IV) + nonce = self.aiting_nonce() + sign_params = {'jwt': self.aiting_jwt, 'nonestr': nonce, 'osversion': 'Android12', 'terminalName': 'Redmi', 'timestamp': timestamp} + sign_str = '&'.join([f"{k}={sign_params[k]}" for k in sorted(sign_params.keys())]) + requertid = self.aiting_md5(f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}") + url = f"https://woread.com.cn/rest/read/statistics/addreadtime/3/{encrypted}" + random_uuid = str(uuid.uuid4()).replace('-', '') + body = { + "channelid": "28015001", "creadertime": datetime.now().strftime("%y%m%d%H%M%S"), + "imei": self.generate_random_imei(), + "list": { "cntindex": book_id, "cnttype": 1, "readtime": count_time_str, "readtype": 1 }, + "list1": [{ "cntindex": book_id, "cnttype": 1, "readtime": count_time_str, "readtype": 1 }], + "listentimes": count_time_str, "uuid": random_uuid + } + headers = { + 'AuthorizationClient': f"Bearer {self.aiting_jwt}", + 'requerttime': timestamp, 'nonestr': nonce, 'requertid': requertid, + 'statisticsinfo': self.aiting_statisticsinfo, 'User-Agent': 'okhttp/4.9.0' + } + res = self.session.post(url, json=body, headers=headers) + if res.status_code == 200: + self.last_read_submission_time = time.time() + self.log(f"✅ 阅读时长上报成功 ({read_time_seconds}s)") + + def aiting_new_read_add(self): + timestamp = self.aiting_timestamp() + nonce = self.aiting_nonce() + sign_params = {'jwt': self.aiting_jwt, 'nonestr': nonce, 'osversion': 'Android12', 'terminalName': 'Redmi', 'timestamp': timestamp} + sign_str = '&'.join([f"{k}={sign_params[k]}" for k in sorted(sign_params.keys())]) + requertid = self.aiting_md5(f"{sign_str}&key={AITING_SIGN_KEY_REQUERTID}") + url = f"https://woread.com.cn/rest/read/new/newreadadd/3/{self.aiting_base_userid}/{self.aiting_woread_token}" + params = {'isfreeLimt': '0', 'isgray': 'true'} + body = {"source": 3, "cntindex": "4524960", "chapterallindex": "100136247350", "readtype": 3} + headers = { + 'AuthorizationClient': f"Bearer {self.aiting_jwt}", 'requerttime': timestamp, 'nonestr': nonce, 'requertid': requertid, 'statisticsinfo': self.aiting_statisticsinfo, 'User-Agent': 'Redmi K30 Pro' + } + self.session.post(url, params=params, json=body, headers=headers) + + def aiting_task(self, is_query_only=False): + self.log("==== 联通爱听任务 ====") + if not self.aiting_login_flow(): + self.log("爱听任务: 登录失败,跳过") + return + self.log("爱听任务: 登录成功,正在获取任务列表...") + try: + self.aiting_query_integral() + except: pass + task_list = self.jf_get_task_detail(self.aiting_biz_ticket) + done_list = [t for t in task_list if t.get('finish') == 1] + printed_names = set() + for t in done_list: + name = t.get('taskName') + if name not in printed_names: + self.log(f" ✅ {name} ({t.get('finishCount')}/{t.get('needCount')})") + printed_names.add(name) + todo_list = [t for t in task_list if t.get('finish') == 0 and "邀请" not in t.get('taskName', '')] + if not todo_list: + self.log("爱听任务: ✅ 所有任务已完成") + if is_query_only: + self.log("爱听任务: [查询模式] 跳过任务执行...") + return + self.log(f"爱听任务: 发现 {len(todo_list)} 个待办任务") + if is_query_only: + self.log("爱听任务: [查询模式] 跳过任务执行...") + return + read_tasks = [t for t in todo_list if ("阅读" in t.get('taskName','') or "听读" in t.get('taskName','')) and "邀请" not in t.get('taskName','')] + for task in read_tasks: + remaining = int(task.get('needCount', 1)) - int(task.get('finishCount', 0)) + if remaining <= 0: continue + self.log(f"执行阅读任务: {task.get('taskName')} (剩余 {remaining} 次)") + for i in range(remaining): + self.jf_to_finish(self.aiting_biz_ticket, task.get('taskCode')) + self.log(f" └─ 第 {i + 1}/{remaining} 次: 极速提交中...") + self.aiting_new_read_add() + time.sleep(5) + self.aiting_add_read_time(120) + time.sleep(2) + self.jf_pop_up(self.aiting_biz_ticket) + other_tasks = [t for t in todo_list if not any(x in t.get('taskName','') for x in ["通知", "阅读", "听读", "邀请", "签到"])] + notify_task = next((t for t in todo_list if "通知" in t.get('taskName','')), None) + if notify_task: + self.log(f"执行通知任务: {notify_task.get('taskName')}") + self.jf_to_finish(self.aiting_biz_ticket, notify_task.get('taskCode')) + time.sleep(1) + self.aiting_complete_task_api(2) + time.sleep(2) + self.jf_pop_up(self.aiting_biz_ticket) + for task in other_tasks: + remaining = int(task.get('needCount', 1)) - int(task.get('finishCount', 0)) + if remaining <= 0: continue + self.log(f"执行通用任务: {task.get('taskName')} (剩余 {remaining} 次)") + for i in range(remaining): + self.jf_to_finish(self.aiting_biz_ticket, task.get('taskCode')) + time.sleep(1.5) + self.aiting_complete_task_api(4) # Type 4 + time.sleep(2) + self.jf_pop_up(self.aiting_biz_ticket) + try: + self.aiting_query_integral() + except: pass + + def wostore_cloud_login(self, ticket): + try: + url1 = "https://member.zlhz.wostore.cn/wcy_member/yunPhone/h5Awake/businessHall" + body1 = { + "cpId": "91002997", "channelId": "ST-Zujian001-gs", "ticket": ticket, + "env": "prod", "transId": "S2ndpage1235+开福袋!+F1+CJDD00D0001+iphone_c@12.0801", + "qkActId": None + } + headers1 = {"Origin": "https://h5forphone.wostore.cn", "Content-Type": "application/json"} + json_data = json.dumps(body1, separators=(',', ':'), ensure_ascii=True) + res1 = self.session.post(url1, data=json_data, headers=headers1, timeout=15).json() + if str(res1.get("code")) != "0": + msg = res1.get("msg", str(res1)) + self.log(f"沃云手机: 登录第一步失败 - {msg}") + return None + redirect_url = res1.get("data", {}).get("url", "") + match = re.search(r'token=([^&]+)', redirect_url) + if not match: + if "protocol" in redirect_url or "sign" in redirect_url: + self.log("沃云手机: 未开通业务 (检测到协议签署跳转),跳过") + else: + self.log(f"沃云手机: 无法提取 Token, 跳转URL: {redirect_url}") + return None + first_token = match.group(1) + time.sleep(1) + url2 = "https://uphone.wostore.cn/h5api/activity-service/user/login" + body2 = { + "identityType": "cloudPhoneLogin", "code": first_token, "channelId": "ST-Zujian001-gs", + "activityId": "Lottery_251201", "device": "device" + } + headers2 = {"Origin": "https://uphone.wostore.cn", "X-USR-TOKEN": first_token} + res2 = self.session.post(url2, json=body2, headers=headers2, timeout=15).json() + if str(res2.get("code")) == "200": + user_token = res2.get("data", {}).get("user_token") + return {"firstToken": first_token, "user_token": user_token} + else: + self.log(f"沃云手机: 登录第二步失败 - {res2.get('msg', str(res2))}") + return None + except Exception as e: + self.log(f"沃云手机: 登录异常 {e}") + return None + + def wostore_cloud_sign(self, user_token): + try: + url = "https://uphone.wostore.cn/h5api/activity-service/points/v1/sign" + body = {"activityCode": "Points_Sign_2507"} + headers = {"X-USR-TOKEN": user_token, "Origin": "https://uphone.wostore.cn"} + res = self.session.post(url, json=body, headers=headers).json() + if res.get("code") == 200: + self.log("沃云手机: 积分签到成功", notify=True) + else: + pass # Fail silently or log if needed context + except Exception: + pass + + def wostore_cloud_task_list(self, user_token): + try: + url = "https://uphone.wostore.cn/h5api/activity-service/user/task/list" + body = {"activityCode": "Lottery_251201"} + headers = {"X-USR-TOKEN": user_token} + self.session.post(url, json=body, headers=headers) + except Exception: + pass + + def wostore_cloud_get_chance(self, user_token, task_code): + try: + url = "https://uphone.wostore.cn/h5api/activity-service/user/task/raffle/get" + body = {"activityCode": "Lottery_251201", "taskCode": task_code} + headers = {"X-USR-TOKEN": user_token} + self.session.post(url, json=body, headers=headers) + except Exception: + pass + + def wostore_cloud_draw(self, user_token): + try: + url = "https://uphone.wostore.cn/h5api/activity-service/lottery" + body = {"activityCode": "Lottery_251201"} + headers = {"X-USR-TOKEN": user_token} + res = self.session.post(url, json=body, headers=headers).json() + if res.get("code") == 200: + prize = res.get("data", {}).get("prizeName", "未中奖") + self.log(f"沃云手机: 抽奖结果 - {prize}", notify=True) + else: + self.log(f"沃云手机: 抽奖失败 - {res.get('msg', str(res))}") + except Exception as e: + self.log(f"沃云手机: 抽奖异常 {e}") + + def wostore_cloud_task(self, is_query_only=False): + self.log("==== 沃云手机 ====") + if is_query_only: + self.log("沃云手机: [查询模式] 此平台暂无资产或余额可供查询", notify=True) + return + target_url = "https://h5forphone.wostore.cn/cloudPhone/dialogCloudPhone.html?channel_id=ST-Zujian001-gs&cp_id=91002997" + ticket_res = self.openPlatLineNew(target_url) + if not ticket_res: + self.log("沃云手机: 获取入口 Ticket 失败") + return + ticket = ticket_res + if isinstance(ticket, dict): + ticket = ticket.get('ticket') + if not ticket: + self.log("沃云手机: 获取入口 Ticket 失败 (为空)") + return + tokens = self.wostore_cloud_login(ticket) + if not tokens: + self.log("沃云手机: 登录失败,跳过后续任务") + return + user_token = tokens['user_token'] + self.wostore_cloud_sign(user_token) + time.sleep(2) + self.wostore_cloud_task_list(user_token) + time.sleep(1) + self.wostore_cloud_get_chance(user_token, "2508-01") + time.sleep(2) + self.wostore_cloud_draw(user_token) + + def regional_task(self, is_query_only=False): + """区域专区任务入口""" + is_xinjiang = False + is_henan = False + is_yunnan = False + if hasattr(self, 'city_info') and self.city_info and isinstance(self.city_info, list): + try: + for city in self.city_info: + pro_name = city.get('proName', '') + if "新疆" in pro_name: is_xinjiang = True + if "河南" in pro_name: is_henan = True + if "云南" in pro_name: is_yunnan = True + except: pass + if is_query_only: + self.log("==== 区域专区 (查询模式) ====") + if is_xinjiang: + self.log("新疆专区: [查询模式] 跳过每日打卡,尝试查询每月抽奖记录") + try: + ticket_res = self.openPlatLineNew("https://zy100.xj169.com/touchpoint/openapi/jumpHandRoom1G?source=155&type=02") + if ticket_res and ticket_res.get("ticket"): + token = self.xj_get_token(ticket_res.get("ticket")) + if token: + self.xj_query_monthly_draw_records(token) + except Exception as e: + self.log(f"新疆专区: [查询模式] 查询每月抽奖记录异常 {e}") + if is_henan: + is_signed = self.shangdu_get_sign_status() + if is_signed is True: + self.log("河南商都: [状态查询] 今日已签到") + elif is_signed is False: + self.log("河南商都: [状态查询] 今日未签到") + else: + self.log("河南商都: [状态查询] 查询失败") + if is_yunnan: + self.yunnan_life_task(is_query_only=True) + return + if is_xinjiang: + self.log("==== 新疆专区 ====") + self.xj_task_main() + if is_henan: + self.log("==== 河南商都 ====") + self.shangdu_task_main() + if is_yunnan: + self.log("==== 云南生活 ====") + self.yunnan_life_task() + + def yunnan_life_base_headers(self, token=None, extra=None): + headers = { + "Referer": "https://wsm.wx.yn10010.com/", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-origin", + "Content-Type": "application/json;charset=UTF-8", + "Accept-Language": "zh-CN,en-US;q=0.8", + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.1001};ltst;OSVersion/16.6", + } + if token: + headers["token"] = token + if extra: + headers.update(extra) + return headers + + def yunnan_life_calc_sign(self, payload): + parts = [] + for key in sorted(payload.keys()): + value = payload[key] + if isinstance(value, dict): + encoded = quote(json.dumps(value, ensure_ascii=False, separators=(',', ':')), safe="") + else: + encoded = quote(str(value), safe="") + parts.append(f"{key}={encoded}") + raw = "&".join(parts).lower() + YUNNAN_LIFE_SIGN_SALT + return hashlib.md5(hashlib.md5(raw.encode('utf-8')).hexdigest().encode('utf-8')).hexdigest() + + def yunnan_life_signed_headers(self, token, payload): + return self.yunnan_life_base_headers(token, { + "Origin": YUNNAN_LIFE_BASE_URL, + "accessKeyId": YUNNAN_LIFE_ACCESS_KEY, + "time": str(round(time.time() * 1000)), + "sign": self.yunnan_life_calc_sign(payload), + }) + + def yunnan_life_get_ticket(self): + if not self.ecs_token: + return None + try: + res = self.session.get( + "https://m.client.10010.com/mobileService/openPlatform/openPlatLineNew.htm", + params={ + "to_url": YUNNAN_LIFE_TO_URL, + "amp;s": "100000425", + "amp;boothCode": "YN-QCQYCS245", + "amp;boothAccessMode": "24", + }, + headers={ + "Cookie": f"ecs_token={self.ecs_token}", + "Referer": "https://wsm.wx.yn10010.com/", + "Accept-Language": "zh-CN,zh-Hans;q=0.9", + "Sec-Fetch-Mode": "navigate", + "Sec-Fetch-Dest": "document", + "Sec-Fetch-Site": "cross-site", + "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + "User-Agent": self.yunnan_life_base_headers().get("User-Agent"), + }, + allow_redirects=False, + timeout=15, + ) + location = res.headers.get("Location", "") + match = re.search(r'ticket=([^&]+)', location) + return match.group(1) if match else None + except Exception as e: + self.log(f"云南生活: 获取 ticket 异常: {e}") + return None + + def yunnan_life_get_token(self, ticket): + if not ticket: + return None + try: + resp = self.session.get( + f"{YUNNAN_LIFE_BASE_URL}/2b2c-mobile/getPhoneNumber", + params={"ticket": ticket}, + headers=self.yunnan_life_base_headers(extra={"Content-Type": "application/json;charset=gb2312"}), + timeout=15, + ) + token = resp.headers.get("token") or resp.headers.get("Token") + if not token: + try: + data = resp.json() + except Exception: + data = {} + token = data.get("token") or data.get("data", {}).get("token") + if not token: + self.log(f"云南生活: 未找到 token,响应: {resp.text[:160]}") + return None + return token if str(token).startswith("Bearer ") else f"Bearer {token}" + except Exception as e: + self.log(f"云南生活: 获取 token 异常: {e}") + return None + + def yunnan_life_login(self): + ticket = self.yunnan_life_get_ticket() + if not ticket: + self.log("云南生活: 获取 ticket 失败") + return None + token = self.yunnan_life_get_token(ticket) + if not token: + self.log("云南生活: 获取 token 失败") + return None + return token + + def yunnan_life_do_task(self, token, payload): + task_name = payload.get("taskName", payload.get("taskCode", "未知任务")) + try: + res = self.session.post( + f"{YUNNAN_LIFE_BASE_URL}/2b2c-mobile/activity/task/addTaskUser", + data=json.dumps(payload, ensure_ascii=False, separators=(',', ':')), + headers=self.yunnan_life_signed_headers(token, payload), + timeout=15, + ).json() + if res.get("resultCode") == "0000": + self.log(f"云南生活: ✅ {task_name}") + else: + self.log(f"云南生活: ❌ {task_name}: {res.get('resultMsg', '')}") + except Exception as e: + self.log(f"云南生活: [{task_name}] 异常: {e}") + + def yunnan_life_do_lottery(self, token, times=2): + payload = {"actId": YUNNAN_LIFE_ACT_ID, "boothCode": ""} + headers = self.yunnan_life_base_headers(token, {"Origin": YUNNAN_LIFE_BASE_URL}) + for i in range(times): + try: + res = self.session.post( + f"{YUNNAN_LIFE_BASE_URL}/2b2c-mobile/acttmpl/lottery/actLuckyDrawy", + data=json.dumps(payload, ensure_ascii=False, separators=(',', ':')), + headers=headers, + timeout=15, + ).json() + if res.get("resultCode") == "0000": + self.log(f"云南生活: ✅ 第{i + 1}次抽奖请求成功") + else: + self.log(f"云南生活: ❌ 第{i + 1}次抽奖失败: {res.get('resultMsg', '')}") + except Exception as e: + self.log(f"云南生活: 第{i + 1}次抽奖异常: {e}") + if i < times - 1: + time.sleep(2) + + def yunnan_life_get_lottery_results(self, token): + try: + resp = self.session.get( + f"{YUNNAN_LIFE_BASE_URL}/2b2c-mobile/acttmpl/lottery/getUserRecordListActInfo", + params={"actId": YUNNAN_LIFE_ACT_ID, "periodId": YUNNAN_LIFE_ACT_ID}, + headers=self.yunnan_life_base_headers(token, {"Content-Type": "application/json;charset=gb2312"}), + timeout=15, + ) + data = resp.json() + today = datetime.now().strftime("%Y-%m-%d") + awards = [] + for item in data.get("data", {}).get("recordList", []): + if str(item.get("createTime", "")).startswith(today): + awards.append(item.get("awardName", "未知")) + if awards: + for award in awards: + self.log(f"云南生活: 🎁 抽奖结果 - {award}", notify=True) + else: + self.log("云南生活: 今日暂无抽奖记录") + except Exception as e: + self.log(f"云南生活: 查询抽奖结果异常: {e}") + + def yunnan_life_get_bean_balance(self, token): + try: + payload = {} + res = self.session.post( + f"{YUNNAN_LIFE_BASE_URL}/user/beans/api/getTotalAvailableBeansByPhone", + data=json.dumps(payload, ensure_ascii=False, separators=(',', ':')), + headers=self.yunnan_life_signed_headers(token, payload), + timeout=15, + ).json() + if res.get("resultCode") == "0000": + self.log(f"云南生活: 💰 当前云豆余额: {res.get('data', 0)}", notify=True) + else: + self.log(f"云南生活: 获取云豆失败: {res.get('resultMsg', '')}") + except Exception as e: + self.log(f"云南生活: 查询云豆异常: {e}") + + def yunnan_life_task(self, is_query_only=False): + token = self.yunnan_life_login() + if not token: + return + if is_query_only: + self.log("云南生活: [查询模式] 查询云豆余额") + self.yunnan_life_get_bean_balance(token) + return + for task in YUNNAN_LIFE_TASKS: + self.yunnan_life_do_task(token, task) + time.sleep(2) + self.yunnan_life_do_lottery(token, times=2) + self.yunnan_life_get_lottery_results(token) + self.yunnan_life_get_bean_balance(token) + + def xj_task_main(self): + ticket_res = self.openPlatLineNew("https://zy100.xj169.com/touchpoint/openapi/jumpHandRoom1G?source=155&type=02") + if not ticket_res or not ticket_res.get("ticket"): + self.log("新疆专区: 获取入口 ticket 失败") + return + token = self.xj_get_token(ticket_res.get("ticket")) + if token: + self.xj_do_draw(token, "Jan2026Act") + day = datetime.now().day + if 19 <= day <= 25: + self.xj_usersday_task(token) + self.xj_monthly_draw_task(token) + + def xj_get_token(self, ticket): + try: + url = "https://zy100.xj169.com/touchpoint/openapi/getTokenAndCity" + if isinstance(ticket, dict): + ticket = ticket.get("ticket") + data = {"ticket": ticket} + headers = { + "Referer": f"https://zy100.xj169.com/touchpoint/openapi/jumpHandRoom1G?source=155&type=02&ticket={ticket}", + "User-Agent": XJ_USER_AGENT, + } + res = self.session.post(url, data=data, headers=headers).json() + result = res.get('result', {}) + if result.get('code') == 0 and result.get('data', {}).get('token'): + return result.get('data', {}).get('token') + token = res.get("data", {}).get("token") + if token: + return token + return None + except Exception as e: + self.log(f"新疆专区: 获取 token 异常 {e}") + return None + + def xj_do_draw(self, token, act_id): + try: + url = f"https://zy100.xj169.com/touchpoint/openapi/marchAct/draw_{act_id}" + data = {"activityId": f"daka{act_id}", "prizeId": ""} + headers = {"userToken": token, "User-Agent": XJ_USER_AGENT} + res = self.session.post(url, data=data, headers=headers).json() + msg = res.get('result', {}).get('msg') or res.get('result', {}).get('data') or "失败" + self.log(f"新疆专区: 每日打卡 - {msg}", notify=True) + except Exception as e: + self.log(f"新疆专区: 打卡异常 {e}") + + def xj_usersday_task(self, token): + try: + url = "https://zy100.xj169.com/touchpoint/openapi/marchAct/draw_UsersDay2025Act" + data = {"activityId": "usersDay2025Act", "prizeId": "hfq_twenty"} + headers = {"userToken": token, "User-Agent": XJ_USER_AGENT} + res = self.session.post(url, data=data, headers=headers).json() + msg = res.get('result', {}).get('msg') or res.get('result', {}).get('data') or "失败" + self.log(f"新疆客户日: 秒杀结果 - {msg}", notify=True) + except Exception as e: + self.log(f"新疆客户日: 秒杀异常 {e}") + + def xj_monthly_draw_once(self, token): + headers = { + "User-Agent": XJ_USER_AGENT, + "userToken": token, + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + } + payload = {"activityId": XJ_ACTIVITY_ID, "prizeId": "", "commHighFlag": "false"} + try: + res = self.session.post( + f"https://zy100.xj169.com/touchpoint/openapi/themeAct/draw_{XJ_ACTIVITY_ID}", + data=payload, + headers=headers, + timeout=10, + ).json() + code = res.get("code") + msg = str(res.get("msg", "")) + msg_type = str(res.get("msgType", "")) + data = res.get("data", "") + if code == "ERROR": + data_str = str(data) + if "已用完" in data_str or "已抽完" in data_str or msg_type == "101": + return "done", f"今日机会已用尽 ({data_str or msg or '无可用次数'})" + if "频率过高" in msg: + return "done", "接口频率限制" + if "缺少参数" in msg: + return "invalid", "token 已失效" + return "done", f"抽奖失败: {data_str or msg or '未知错误'}" + if code == "SUCCESS": + if msg == "thanks1": + return "continue", f"未中奖 ({data or msg})" + return "won", f"中奖: {data or '未知奖品'}" + if str(code) == "401": + return "invalid", "token 已失效" + return "continue", f"未中奖 ({msg or data or code})" + except Exception as e: + return "error", f"请求异常: {e}" + + def xj_query_monthly_draw_records(self, token): + headers = { + "User-Agent": XJ_USER_AGENT, + "userToken": token, + "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", + } + try: + res = self.session.post( + "https://zy100.xj169.com/touchpoint/openapi/drawAct/getPrizesScroll", + data={"activityId": XJ_ACTIVITY_ID}, + headers=headers, + timeout=10, + ).json() + data = res.get("data", []) + if not data: + self.log("新疆专区: 每月抽奖暂无中奖记录") + return + if isinstance(data, dict): + data = [data] + if isinstance(data, list) and data and isinstance(data[0], str): + for item in data[:5]: + self.log(f"新疆专区: 每月抽奖记录 - {item}", notify=True) + return + displayed = 0 + for item in data: + if not isinstance(item, dict): + continue + prize_name = item.get("prizeName") or item.get("prizeId") or "未知奖品" + draw_ts = safe_int(item.get("drawDate"), 0) + draw_date = datetime.fromtimestamp(draw_ts / 1000).strftime("%m-%d") if draw_ts else "未知时间" + self.log(f"新疆专区: 每月抽奖记录 - {prize_name} ({draw_date})", notify=True) + displayed += 1 + if displayed >= 5: + break + if displayed == 0: + self.log("新疆专区: 每月抽奖暂无可展示记录") + except Exception as e: + self.log(f"新疆专区: 查询每月抽奖记录异常 {e}") + + def xj_monthly_draw_task(self, token): + self.log(f"新疆专区: 每月抽奖活动 {XJ_ACTIVITY_ID}") + for i in range(XJ_MONTHLY_DRAW_ATTEMPT_COUNT): + status, msg = self.xj_monthly_draw_once(token) + self.log( + f"新疆专区: 每月抽奖第{i + 1}次 - {msg}", + notify=status == "won", + ) + if status in {"done", "won", "invalid"}: + break + time.sleep(random.uniform(1, 2)) + self.xj_query_monthly_draw_records(token) + + def shangdu_get_sign_status(self): + try: + url = "https://app.shangdu.com/monthlyBenefit/v1/signIn/queryCumulativeSignAxis" + headers = { + "Origin": "https://app.shangdu.com", + "Referer": "https://app.shangdu.com/monthlyBenefit/index.html", + "edop_flag": "0", "Content-Type": "application/json" + } + res = self.session.post(url, json={}, headers=headers).json() + if res.get('result', {}).get('code') == "0000": + return res.get('result', {}).get('data', {}).get('todaySignFlag') == "1" + return None + except: return None + + def shangdu_sign_retry(self): + try: + url = "https://app.shangdu.com/monthlyBenefit/v1/signIn/userSignIn" + headers = { + "Origin": "https://app.shangdu.com", + "Referer": "https://app.shangdu.com/monthlyBenefit/index.html", + "edop_flag": "0", "X-Requested-With": "XMLHttpRequest", + "Content-Type": "application/json" + } + res = self.session.post(url, json={}, headers=headers).json() + code = res.get('result', {}).get('code') + data = res.get('result', {}).get('data', {}) + if code == "0000": + prize = data.get('prizeResp', {}).get('prizeName') + if prize: self.log(f"河南商都: 签到成功(重试) - 获得 {prize}", notify=True) + else: self.log("河南商都: 签到成功(重试)") + elif code == "0019": + self.log("河南商都: 重试仍返回重复签到") + else: + self.log(f"河南商都: A签到重试失败 - {res.get('result', {}).get('msg')}") + except Exception as e: + self.log(f"河南商都: 签到重试异常 {e}") + + def shangdu_task_main(self): + if not self.ecs_token: return + url = f"https://m.client.10010.com/edop_ng/getTicketByNative?appId=edop_unicom_4b80047a&token={self.ecs_token}" + res = self.session.get(url).json() + ticket = res.get('result', {}).get('ticket') + if not ticket: + self.log("河南商都: 获取Ticket失败") + return + login_url = f"https://app.shangdu.com/monthlyBenefit/v1/common/config?ticket={ticket}" + headers_login = { + "Origin": "https://app.shangdu.com", + "Referer": "https://app.shangdu.com/monthlyBenefit/index.html", + "edop_flag": "0", "Accept": "application/json, text/plain, */*" + } + self.session.get(login_url, headers=headers_login) + time.sleep(1.5) + sign_url = "https://app.shangdu.com/monthlyBenefit/v1/signIn/userSignIn" + headers_sign = { + "Origin": "https://app.shangdu.com", + "Referer": "https://app.shangdu.com/monthlyBenefit/index.html", + "edop_flag": "0", "X-Requested-With": "XMLHttpRequest", + "Content-Type": "application/json" + } + res_sign = self.session.post(sign_url, json={}, headers=headers_sign).json() + code = res_sign.get('result', {}).get('code') + data = res_sign.get('result', {}).get('data', {}) + if code == "0000": + if data.get('value') == "0001": + self.log("河南商都: 签到失败 - Cookie无效") + else: + prize = data.get('prizeResp', {}).get('prizeName', '已签到') + self.log(f"河南商都: 签到结果 - {prize}", notify=True) + elif code == "0019": + time.sleep(1) + is_signed = self.shangdu_get_sign_status() + if is_signed is True: + self.log("河南商都: 今日已签到") + elif is_signed is False: + self.log("河南商都: 状态未签到但返回重复,尝试重试...") + time.sleep(2) + self.shangdu_sign_retry() + else: + self.log("河南商都: 今日已签到 (状态未知)") + else: + self.log(f"河南商都: 签到失败 - {code} : {res_sign.get('result', {}).get('msg')}") + + def woread_encrypt(self, data): + try: + key = b'woreadst^&*12345' + iv = b'16-Bytes--String' + cipher = AES.new(key, AES.MODE_CBC, iv) + if isinstance(data, dict): + data_str = json.dumps(data, separators=(',', ':'), ensure_ascii=False) + else: + data_str = str(data) + pad_len = 16 - (len(data_str.encode('utf-8')) % 16) + data_str = data_str + chr(pad_len) * pad_len + ciphertext = cipher.encrypt(data_str.encode('utf-8')) + hex_str = ciphertext.hex() + return base64.b64encode(hex_str.encode('utf-8')).decode('utf-8') + except Exception as e: + self.log(f"woread_encrypt error: {e}") + return "" + + def woread_auth(self): + try: + product_id = "10000002" + secret_key = "7k1HcDL8RKvc" + timestamp = str(round(time.time() * 1000)) + sign_str = f"{product_id}{secret_key}{timestamp}" + md5_hash = hashlib.md5(sign_str.encode('utf-8')).hexdigest() + date_str = datetime.now().strftime('%Y%m%d%H%M%S') + crypt_text_obj = {"timestamp": date_str} + encoded_sign = self.woread_encrypt(crypt_text_obj) + url = f"https://10010.woread.com.cn/ng_woread_service/rest/app/auth/{product_id}/{timestamp}/{md5_hash}" + headers = { + "Content-Type": "application/json", + "User-Agent": COMMON_CONSTANTS['UA'], + } + res = self.session.post(url, json={"sign": encoded_sign}, headers=headers).json() + if res.get('code') == "0000": + self.woread_accesstoken = res.get('data', {}).get('accesstoken') + return True + else: + self.log(f"阅读专区认证失败: {res.get('message')}") + return False + except Exception as e: + self.log(f"woread_auth error: {e}") + return False + + def woread_login(self): + try: + if not hasattr(self, 'woread_accesstoken') or not self.woread_accesstoken: + if not self.woread_auth(): + return False + if not self.token_online: + self.log("阅读专区: 缺少 token_online,无法登录") + return False + token_enc = self.woread_encrypt(self.token_online) + phone_str = self.account_mobile if self.account_mobile else "13800000000" + phone_enc = self.woread_encrypt(phone_str) + timestamp = datetime.now().strftime('%Y%m%d%H%M%S') + inner_json = json.dumps({ + "tokenOnline": token_enc, + "phone": phone_enc, + "timestamp": timestamp + }, separators=(',', ':'), ensure_ascii=False) + encoded_sign = self.woread_encrypt(inner_json) + url = "https://10010.woread.com.cn/ng_woread_service/rest/account/login" + headers = { + "Content-Type": "application/json", + "User-Agent": COMMON_CONSTANTS['UA'], + } + if hasattr(self, 'woread_accesstoken') and self.woread_accesstoken: + headers["accesstoken"] = self.woread_accesstoken + res = self.session.post(url, json={"sign": encoded_sign}, headers=headers, timeout=15).json() + if res.get('code') == "0000": + data = res.get('data', {}) + self.woread_token = data.get('token') + self.woread_userid = data.get('userid') + self.woread_userindex = data.get('userindex') + self.woread_verifycode = data.get('verifycode') + if data.get('phone'): + self.mobile = data['phone'] + self.log("阅读专区: 登录成功") + return True + else: + self.log(f"阅读专区登录失败: {res.get('message')}") + return False + except Exception as e: + self.log(f"woread_login error: {e}") + return False + + def woread_queryTicketAccount(self): + try: + if not hasattr(self, 'woread_token') or not self.woread_token: + if not self.woread_login(): + return + timestamp = datetime.now().strftime('%Y%m%d%H%M%S') + params = { + "timestamp": timestamp, + "phone": self.mobile if self.mobile else "", + "token": self.woread_token + } + sign = self.woread_encrypt(params) + url = "https://10010.woread.com.cn/ng_woread_service/rest/phone/vouchers/queryTicketAccount" + headers = { + "Content-Type": "application/json", + "User-Agent": COMMON_CONSTANTS['UA'], + } + if hasattr(self, 'woread_accesstoken') and self.woread_accesstoken: + headers["accesstoken"] = self.woread_accesstoken + res = self.session.post(url, json={"sign": sign}, headers=headers).json() + if res.get('code') == "0000": + data = res.get('data', {}) + usable_num = int(data.get('usableNum', 0)) + balance_yuan = "{:.2f}".format(usable_num / 100) + self.log(f"💰 [资产-阅读红包] 余额: {balance_yuan}元", notify=True) + else: + self.log(f"阅读红包查询失败: {res.get('message')}") + except Exception as e: + self.log(f"woread_queryTicketAccount error: {e}") + + def woread_get_book_info(self): + try: + url1 = "https://10010.woread.com.cn/ng_woread_service/rest/basics/recommposdetail/14856" + headers = { + "User-Agent": COMMON_CONSTANTS['UA'], + "accesstoken": self.woread_accesstoken + } + res1 = self.session.get(url1, headers=headers) + try: + res1 = res1.json() + except: + self.log(f"阅读专区: 获取书架响应非JSON: {res1.text[:100]}") + return False + if res1.get('code') == '0000': + msg_list = res1.get('data', {}).get('booklist', {}).get('message', []) + if msg_list: + self.wr_catid = msg_list[0].get('catindex') + self.wr_cntindex = msg_list[0].get('cntindex') + bind_info = res1.get('data', {}).get('bindinfo', []) + if bind_info: + self.wr_cardid = bind_info[0].get('recommposiindex') + else: + self.log("阅读专区: 获取书架失败") + return False + if not getattr(self, 'wr_cntindex', None): return False + timestamp = datetime.now().strftime('%Y%m%d%H%M%S') + param = { + "curPage": 1, "limit": 30, "index": self.wr_cntindex, "sort": 0, "finishFlag": 1, + "timestamp": timestamp, + "phone": self.mobile if self.mobile else "", + "token": getattr(self, 'woread_token', ''), + "userid": getattr(self, 'woread_userid', ''), + "userId": getattr(self, 'woread_userid', ''), + "userIndex": getattr(self, 'woread_userindex', ''), + "verifyCode": getattr(self, 'woread_verifycode', '') + } + sign = self.woread_encrypt(param) + url2 = "https://10010.woread.com.cn/ng_woread_service/rest/cnt/chalist" + res2_raw = self.session.post(url2, json={"sign": sign}, headers=headers) + try: + res2 = res2_raw.json() + except: + self.log(f"阅读专区: 获取章节响应非JSON: {res2_raw.text[:100]}") + return False + lst = res2.get('list', []) or res2.get('data', {}).get('list', []) + if lst: + content = lst[0].get('charptercontent', []) + if content: + self.wr_chapterallindex = content[0].get('chapterallindex') + self.wr_chapterid = content[0].get('chapterid') + return True + return False + except Exception as e: + self.log(f"阅读专区: 获取书籍信息异常: {e}") + return False + + def woread_read_process(self): + if not self.woread_get_book_info(): + self.log("阅读专区: 无法获取书籍信息,跳过阅读") + return + headers = { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301}", + "accesstoken": self.woread_accesstoken + } + timestamp = datetime.now().strftime('%Y%m%d%H%M%S') + phone = self.mobile if self.mobile else "" + token = getattr(self, 'woread_token', '') + userid = getattr(self, 'woread_userid', '') + userindex = getattr(self, 'woread_userindex', '') + verifycode = getattr(self, 'woread_verifycode', '') + common_params = { + "timestamp": timestamp, + "phone": phone, + "token": token, + "userid": userid, + "userId": userid, + "userIndex": userindex, + "userAccount": phone, + "verifyCode": verifycode + } + param = { + "chapterAllIndex": self.wr_chapterallindex, + "cntIndex": self.wr_cntindex, + "cntTypeFlag": "1", + **common_params + } + sign = self.woread_encrypt(param) + hb_url = f"https://10010.woread.com.cn/ng_woread_service/rest/cnt/wordsDetail?catid={self.wr_catid}&cardid={self.wr_cardid}&cntindex={self.wr_cntindex}&chapterallindex={self.wr_chapterallindex}&chapterseno=1" + self.session.post(hb_url, json={"sign": sign}, headers=headers) + add_param = { + "readTime": "2", + "cntIndex": self.wr_cntindex, + "cntType": "1", + "catid": "0", + "pageIndex": "", + "cardid": self.wr_cardid, + "cntindex": self.wr_cntindex, + "cnttype": "1", + "chapterallindex": self.wr_chapterallindex, + "chapterseno": "1", + "channelid": "", + "chapterid": self.wr_chapterid, + "readtype": 1, + "isend": "0", + **common_params + } + add_sign = self.woread_encrypt(add_param) + add_url = "https://10010.woread.com.cn/ng_woread_service/rest/history/addReadTime" + res = self.session.post(add_url, json={"sign": add_sign}, headers=headers).json() + res_code = str(res.get('code', '')) + res_msg = str(res.get('message', '')) + if res_code == '0000': + self.log("阅读专区: 模拟阅读成功") + elif res_code == '9999' or '9999' in res_msg or '不存在阅读记录' in res_msg: + # addReadTime 返回9999不影响实际阅读结果 + self.log("阅读专区: 模拟阅读成功(阅读记录已提交)") + else: + self.log(f"阅读专区: 模拟阅读失败: {res_msg or res}") + + + + def woread_draw_new(self): + try: + headers = { + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 unicom{version:iphone_c@12.0301}", + "accesstoken": self.woread_accesstoken + } + timestamp = datetime.now().strftime('%Y%m%d%H%M%S') + param = { + "activeindex": "8051", + "timestamp": timestamp, "phone": self.mobile if self.mobile else "", "token": self.woread_token + } + sign = self.woread_encrypt(param) + url = "https://10010.woread.com.cn/ng_woread_service/rest/basics/doDraw" + res = self.session.post(url, json={"sign": sign}, headers=headers).json() + if res.get('code') == '0000': + prize = res.get('data', {}).get('prizedesc') + if prize: + self.log(f"阅读专区: 抽奖成功: {prize}", notify=True) + else: + self.log("阅读专区: 抽奖完成 (未中奖)") + else: + self.log(f"阅读专区: 抽奖失败: {res.get('message')}") + except Exception as e: + self.log(f"woread_draw_new error: {e}") + + def woread_task(self): + self.log("==== 联通阅读 ====") + if not self.woread_login(): + self.log("阅读专区: 登录失败,跳过任务") + return + self.woread_queryTicketAccount() + self.woread_read_process() + time.sleep(3) + self.woread_draw_new() + + def query_market_raffle_records(self, user_token): + self.log("权益超市: 正在查询抽奖记录...") + try: + url = "https://backward.bol.wo.cn/prod-api/market/contactReceive/queryReceiveRecord" + headers = { + "Authorization": f"Bearer {user_token}", + "User-Agent": COMMON_CONSTANTS["MARKET_UA"], + "Origin": "https://contact.bol.wo.cn", + "Referer": "https://contact.bol.wo.cn/" + } + mobile = getattr(self, "account_mobile", getattr(self, "mobile", "")) + payload = { + "isReceive": None, + "receiveStatus": None, + "limit": 20, + "page": 1, + "mobile": mobile, + "businessSources": ["3", "4", "5", "6", "99"], + "isPromotion": 1, + "returnFormatType": 1 + } + res = self.session.post(url, json=payload, headers=headers).json() + if res.get('code') == 200: + records = res.get('data', {}).get('recordObjs', []) + if records: + display_records = records[:10] + self.log(f"权益超市: 最近 {len(display_records)} 条抽奖记录:", notify=True) + for item in display_records: + self.log(f" - [{item.get('receiveTime')}] {item.get('recordName')}", notify=True) + else: + self.log("权益超市: 无近期抽奖记录。") + else: + self.log(f"权益超市: 查询抽奖记录失败: {res.get('msg')}") + except Exception as e: + self.log(f"query_market_raffle_records error: {e}") + + def query_phone_recharge_records(self, user_token): + self.log("权益超市: 正在查询本月话费抢购记录...") + try: + url = "https://backward.bol.wo.cn/prod-api/market/contactReceive/queryReceiveRecord" + headers = { + "Authorization": f"Bearer {user_token}", + "User-Agent": COMMON_CONSTANTS["MARKET_UA"], + "Origin": "https://contact.bol.wo.cn", + "Referer": "https://contact.bol.wo.cn/" + } + mobile = getattr(self, "account_mobile", getattr(self, "mobile", "")) + payload = { + "isReceive": None, + "receiveStatus": None, + "limit": 50, + "page": 1, + "mobile": mobile, + "businessSources": ["3", "4", "5", "6", "99"], + "isPromotion": 1, + "returnFormatType": 1 + } + res = self.session.post(url, json=payload, headers=headers).json() + if res.get('code') == 200: + records = res.get('data', {}).get('recordObjs', []) + total_amount = 0.0 + current_month = datetime.now().strftime('%Y-%m') + count = 0 + for item in records: + create_time = item.get('receiveTime', '') + name = item.get('recordName', '') + if current_month in create_time and any(k in name for k in ['话费', '充值', '红包']): + match = re.search(r'(\d+(\.\d+)?)元', name) + if match: + amount = float(match.group(1)) + total_amount += amount + count += 1 + if count > 0: + self.log(f"💰 [资产-抢购] 本月权益超市话费累计: {total_amount:.2f}元", notify=True) + else: + self.log("权益超市: 本月暂无话费抢购记录") + else: + self.log(f"权益超市: 查询话费记录失败: {res.get('msg')}") + except Exception as e: + self.log(f"query_phone_recharge_records error: {e}") + + def sign_query_my_prizes(self): + self.log("正在查询账户明细 (抢兑)...") + try: + url = "https://act.10010.com/SigninApp/convert/phoneDetails" + form = { + "log_type": "1", + "number": "1", + "list_num": "" + } + headers = {"Origin": "https://img.client.10010.com"} + res = self.request("post", url, data=form, headers=headers) + if not res: return + result = res.json() + if result.get('status') == '0000': + data = result.get('data', {}).get('detailedBO', []) + if data and isinstance(data, list): + logged_count = 0 + for item in data: + if logged_count >= 5: break + remark = item.get('remark', '') + buss_name = item.get('from_bussname', '') + if "兑换" in remark or "兑换" in buss_name: + if logged_count == 0: + self.log(f"📋 [账户明细] 最近 5 条记录:", notify=True) + order_time = item.get('order_time', '') + amount = item.get('booksNumber') or item.get('books_number') or "0" + self.log(f" 🎁 [抢兑] {order_time} | {remark} (变动:{amount})", notify=True) + logged_count += 1 + if logged_count == 0: + self.log("[账户明细] 暂无兑换记录") + else: + self.log("[账户明细] 暂无兑换记录") + else: + self.log(f"[账户明细] 查询异常: {result.get('msg', 'Result Error')}") + except Exception as e: + self.log(f"sign_query_my_prizes error: {e}") + + def sign_task_main(self): + self.log("==== 签到区 ====") + self.sign_getTelephone(is_initial=True) + self.sign_getContinuous(is_query_only=False) + self.sign_getTaskList() + sc = globalConfig.get("sign_config", {}) + if sc.get("run_grab_coupon", False): + self.sign_grabCoupon() + else: + self.log("签到区-抢话费券: ⏭️ 已被子开关关闭,跳过") + self.sign_getTelephone() + self.sign_query_my_prizes() + + def execute_daily_tasks(self, query_only=False): + if query_only: + self.log("📋 [查询模式] 仅查询资产,跳过任务执行", notify=True) + try: + self.queryRemain() + if globalConfig.get("enable_sign", True): + try: + self.sign_getContinuous(is_query_only=True) + self.sign_getTelephone() + except Exception as e: + self.log(f"首页签到查询异常: {e}") + try: + self.sign_query_my_prizes() + except Exception as e: + self.log(f"抢兑记录查询异常: {e}") + if globalConfig.get("enable_ttlxj", True): + try: + self.ttlxj_task(is_query_only=True) + except Exception as e: + self.log(f"天天领现金查询异常: {e}") + if globalConfig.get("enable_market", True): + try: + self.market_task(is_query_only=True) + except Exception as e: + self.log(f"权益超市查询异常: {e}") + if globalConfig.get("enable_woread", True): + try: + self.woread_queryTicketAccount() + except Exception as e: + self.log(f"联通阅读查询异常: {e}") + if globalConfig.get("enable_aiting", True): + try: + self.aiting_task(is_query_only=True) + except Exception as e: + self.log(f"联通爱听查询异常: {e}") + if globalConfig.get("enable_security", True): + try: + self.securityButlerTask(is_query_only=True) + except Exception as e: + self.log(f"安全管家查询异常: {e}") + if globalConfig.get("enable_ltyp", True): + try: + self.ltyp_task(is_query_only=True) + except Exception as e: + self.log(f"联通云盘查询异常: {e}") + if globalConfig.get("enable_wostore", True): + try: + self.wostore_cloud_task(is_query_only=True) + except Exception as e: + self.log(f"沃云手机查询异常: {e}") + if globalConfig.get("enable_regional", True): + try: + self.regional_task(is_query_only=True) + except Exception as e: + pass + except Exception as e: + self.log(f"查询异常: {e}") + return + if globalConfig.get("enable_sign", True): + self.sign_task_main() + else: + self.log("==== 签到区 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_ltzf", True): + self.ltzf_task() + else: + self.log("==== 联通祝福 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_ttlxj", True): + self.ttlxj_task() + else: + self.log("==== 天天领现金 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_market", True): + self.market_task() + else: + self.log("==== 权益超市 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_woread", True): + self.woread_task() + else: + self.log("==== 联通阅读 ====") + self.log("⏭️ 已被总开关关闭,跳过") + need_cooldown = globalConfig.get("enable_woread", True) and globalConfig.get("enable_aiting", True) + if need_cooldown: + self.log("⏳ 等待120秒(阅读冷却:联通限制两次阅读间隔2分钟)...") + time.sleep(120) + if globalConfig.get("enable_aiting", True): + self.aiting_task() + else: + self.log("==== 联通爱听 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_security", True): + self.securityButlerTask() + else: + self.log("==== 安全管家 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_ltyp", True): + self.ltyp_task() + else: + self.log("==== 联通云盘 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_wostore", True): + self.wostore_cloud_task() + else: + self.log("==== 沃云手机 ====") + self.log("⏭️ 已被总开关关闭,跳过") + if globalConfig.get("enable_regional", True): + self.regional_task() + else: + self.log("==== 区域专区 ====") + self.log("⏭️ 已被总开关关闭,跳过") + +def do_notify(users): + notify_content = [] + for u in users: + if u.notify_logs: + phone = u.mobile or u.account_mobile + phone_str = mask_str(phone) if phone else "" + notify_content.append(f"【账号{u.index}】{phone_str}") + notify_content.extend(u.notify_logs) + notify_content.append("") + if notify_content: + content = "\n".join(notify_content) + try: + from notify import send + send("中国联通", content) + print(f"推送成功 (内容长度: {len(content)})") + except Exception as e: + print(f"推送失败,可能未配置 notify.py: {str(e)}") + else: + print("无推送内容") + +def main(): + global GRAB_AMOUNT + print(f"[{datetime.now().strftime('%H:%M:%S')}] [Script Start] chinaUnicom Python v1.0.5") + cookies = os.environ.get("chinaUnicomCookie", "") + if not cookies: + print("[-] 未在环境变量 chinaUnicomCookie 中找到配置") + sys.exit(1) + accounts = [c for c in re.split(r'[&\n]', cookies) if c.strip()] + print(f"[{datetime.now().strftime('%H:%M:%S')}] 发现 {len(accounts)} 个账号") + print("") + users = [] + for idx, config in enumerate(accounts): + u = UserService(idx + 1, config.strip()) + users.append(u) + if u.appId: + print(f"账号[{idx+1}] 识别到 Token#AppId 模式,使用自定义AppId: {u.appId}") + elif u.account_mobile: + print(f"账号[{idx+1}] 识别到账号密码模式: {mask_str(u.account_mobile)}") + try: + if u.token_online: + u.get_city_info() + except: pass + print(f"共找到{len(accounts)}个账号") + print("") + env_amount = os.environ.get("UNICOM_GRAB_AMOUNT", "") + if env_amount and env_amount.isdigit(): + GRAB_AMOUNT = int(env_amount) + query_only = os.environ.get("UNICOM_TEST_MODE", "").strip().lower() == "query" + if query_only: + print("[Test Mode] 仅查询模式,跳过任务执行") + # 抢兑模式检测 (在打印前判断) + sc = globalConfig.get("sign_config", {}) + mc = globalConfig.get("market_config", {}) + grab_mode = False + if sc.get("run_grab_coupon", False) and globalConfig.get("enable_sign", True) and not query_only: + hour = datetime.now().hour + current_min = datetime.now().minute + if hour in [9, 17] and (58 <= current_min <= 59): + grab_mode = True + print("-" * 36) + # 打印各模块开关状态 + switch_map = [ + ("enable_sign", "首页签到"), + ("enable_ltzf", "联通祝福"), + ("enable_ttlxj", "天天领现金"), + ("enable_market", "权益超市"), + ("enable_woread", "联通阅读"), + ("enable_aiting", "联通爱听"), + ("enable_security", "安全管家"), + ("enable_ltyp", "联通云盘"), + ("enable_wostore", "沃云手机"), + ("enable_regional", "区域专区"), + ] + for key, label in switch_map: + enabled = globalConfig.get(key, True) + if grab_mode: + # 抢兑模式: 仅签到区(抢兑)运行, 其余全部跳过 + if key == "enable_sign": + status = "运行(仅抢兑)" + else: + status = "跳过(抢兑模式)" + elif query_only: + status = "仅查询" if enabled else "关闭" + else: + status = "运行" if enabled else "关闭" + print(f"{label}设置为: {status}") + # 签到区后面紧跟子开关 + if key == "enable_sign" and enabled and not query_only: + print(f" └─ 抢话费券: {'开启' if sc.get('run_grab_coupon', False) else '关闭'}") + # 权益超市后面紧跟子开关 (抢兑模式下不打印, 因为整个权益超市都跳过) + if key == "enable_market" and enabled and not query_only and not grab_mode: + print(f" └─ 浇水: {'开启' if mc.get('run_water', True) else '关闭'}") + print(f" └─ 做任务: {'开启' if mc.get('run_task', True) else '关闭'}") + print(f" └─ 会员中心: {'开启' if mc.get('run_member_center', True) else '关闭'}") + print(f" └─ 抽奖: {'开启' if mc.get('run_draw', True) else '关闭'}") + print(f" └─ 自动领奖: {'开启' if mc.get('run_claim', False) else '关闭'}") + print(f"设备ID刷新: {'强制刷新' if globalConfig.get('refresh_device_id', False) else '使用缓存'}") + print("-" * 36) + print("") + # --- 定时抢兑模式: 仅并发执行抢话费券, 完成后直接退出 --- + if grab_mode: + hour = datetime.now().hour + current_min = datetime.now().minute + print(f"⏰ [自动触发] 检测到抢兑时间点 ({hour}:{current_min:02d}),进入并发抢兑模式") + print(f"🚨🚨🚨 [抢兑模式已启动] 目标: {GRAB_AMOUNT}元话费券 🚨🚨🚨") + print("") + from concurrent.futures import ThreadPoolExecutor + + def run_grab_task(u): + u.configure_proxy() + if not u.token_online and u.account_mobile: + u.load_token_from_cache() + is_valid = u.onLine() + if not is_valid and u.account_mobile and u.account_password: + u.unicom_login() + is_valid = u.onLine() + if is_valid: + u.save_token_to_cache() + u.sign_grabCoupon() + else: + u.log("登录流程失败,跳过该账号") + + print(f"🚀 [并发模式] 启动 {len(accounts)} 个账号同时抢兑...") + with ThreadPoolExecutor(max_workers=len(accounts)) as executor: + futures = [executor.submit(run_grab_task, u) for u in users] + for future in futures: + try: + future.result() + except Exception as e: + print(f"[-] Thread Error: {e}") + do_notify(users) + return + print("🚀 开始串行执行日常任务...") + print("") + for u in users: + print("") + print(f"🔄 正在初始化账号[{u.index}]...") + u.configure_proxy() + if not u.token_online and u.account_mobile: + u.load_token_from_cache() + if not u.token_online and u.account_mobile and u.account_password: + u.unicom_login() + if u.onLine(): + u.save_token_to_cache() + print("") + print(f"------------------ 账号[{u.index}][{mask_str(u.account_mobile)}] ------------------") + print("") + u.execute_daily_tasks(query_only=query_only) + print("⏳ 账号处理完毕,等待 2 秒...") + time.sleep(2) + else: + u.log("登录流程失败,跳过该账号") + do_notify(users) +if __name__ == "__main__": + main() diff --git a/cookies/gqft.json b/cookies/gqft.json new file mode 100644 index 0000000..e958cdb --- /dev/null +++ b/cookies/gqft.json @@ -0,0 +1,8 @@ +[ + { + "acToken": "", + "rtToken": "", + "enData":"", + "enKey":"" + } +] diff --git a/daily/README.md b/daily/README.md new file mode 100644 index 0000000..66cb44d --- /dev/null +++ b/daily/README.md @@ -0,0 +1 @@ +#主要是吃的喝的一些兑换券和实物 日用品之类的 diff --git a/daily/hdl.js b/daily/hdl.js new file mode 100644 index 0000000..2c9b7f8 --- /dev/null +++ b/daily/hdl.js @@ -0,0 +1,183 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 海底捞 +cron: 8 30 * * * +------------------------------------------ +#Notice: +如果微信小程序抓包的写变量值前面加上wx# +例如wx#OPENID_#uid +https://superapp-public.kiwa-tech.com/api/gateway/login/center/login/wechatLogin 接口的请求参数openId#uid +如果是APP抓包的写变量值前面加上app# +抓包https://superapp-public.kiwa-tech.com/api/gateway/login/center/login/wechatLogin 接口的请求参数token +例如app#TOKEN_APP_ + + +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const { Env } = require("../tools/env") +const $ = new Env("海底捞"); +let ckName = `hdl`; +const strSplitor = "#"; +process.env[ckName] = "" +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" + + +class Task { + constructor(env) { + this.index = $.userIdx++ + this.user = env.split(strSplitor); + this.tokenType = this.user[0]; + this.openId = null + this.uid = null + this.token = null + this.valid = false; + this.name = '' + this.signinSource = '' + this.platformname = '' + } + + async run() { + if (this.tokenType == 'wx') { + this.platformname = 'wechat' + this.openId = this.user[1]; + this.uid = this.user[2]; + this.signinSource = 'MiniApp' + await this.wxLogin() + if (!this.valid) return; + + } + if (this.tokenType == 'app') { + this.token = this.user[1]; + this.signinSource = 'APP' + this.platformname = 'app' + } + await this.info() + await this.signIn() + } + async wxLogin() { + try { + let options = { + url: "https://superapp-public.kiwa-tech.com/api/gateway/login/center/login/wechatLogin", + headers: { + "_haidilao_app_token": "", + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "appid": "15", + "appname": "HDLMember", + "appversion": "3.240.0", + "content-type": "application/json", + "platformname": this.platformname, + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "smdeviceid": "", + "xweb_xhr": "1" + }, + method: 'POST', + data: { + "type": 1, + "country": "CN", + "codeType": 1, + "business": "登录", + "terminal": "会员小程序", + "openId": "" + this.openId, + "uid": "" + this.uid + } + } + let { data: result } = await axios.request(options); + if (result.code == 100000) { + this.token = result.data.token + this.name = result.data.nickName + $.log(`账号[${this.index}]【${this.name}】 登录成功`); + this.valid = true; + } else { + $.log(result); + } + + + } catch (e) { + + } finally { } + } + async signIn() { + let options = { + url: 'https://superapp-public.kiwa-tech.com/activity/wxapp/signin/signin', + headers: { + "platformname": this.platformname, + '_haidilao_app_token': this.token, + + }, + method: 'POST', + data: { "signinSource": this.signinSource } + } + let { data: result } = await axios.request(options); + if (result['success']) { + $.log(`账号[${this.index}]【${this.name}】 签到成功`); + } else { + $.log(result); + } + + + + + } + async info() { + let options = { + url: 'https://superapp-public.kiwa-tech.com/activity/wxapp/signin/queryFragment', + headers: { + "platformname": this.platformname, + '_haidilao_app_token': this.token, + }, + method: 'POST', + data: {} + } + let { data: result } = await axios.request(options); + if (result['success']) { + $.log(`账号[${this.index}] 剩余[${result.data.total}]本期碎片将于${result['data']['expireDate']}过期 `) + } else { + $.log(result); + } + } + + + + + + + +} + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + await new Task(user).run(); + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await axios.request(options); + $.log(res) + return res +} \ No newline at end of file diff --git a/daily/quark.py b/daily/quark.py new file mode 100644 index 0000000..761c626 --- /dev/null +++ b/daily/quark.py @@ -0,0 +1,249 @@ +''' +new Env('夸克自动签到') +cron: 0 9 * * * + +V2版-目前有效 +使用移动端接口修复每日自动签到,移除原有的“登录验证”,参数有效期未知 + +V1版-已失效 +受大佬 @Cp0204 的仓库项目启发改编 +源码来自 GitHub 仓库:https://github.com/Cp0204/quark-auto-save +提取“登录验证”“签到”“领取”方法封装到下文中的“Quark”类中 + +Author: BNDou +Date: 2024-03-15 21:43:06 +LastEditTime: 2025-11-18 03:49:26 +FilePath: \Auto_Check_In\checkIn_Quark.py +Description: +抓包流程: + 【手机端】 + ①打开抓包,手机端访问抽奖页 + ②找到url为 https://drive-m.quark.cn/1/clouddrive/act/growth/reward 的请求信息 + ③复制整段url,该链接后面必须要有参数: kps sign vcode,粘贴到环境变量 + 环境变量名为 COOKIE_QUARK 多账户用 回车 或 && 分开 + user字段是用户名 (可是随意填写,多账户方便区分) + 例如: user=张三; url=https://drive-m.quark.cn/1/clouddrive/act/growth/reward?xxxxxx=xxxxxx&kps=abcdefg&sign=hijklmn&vcode=111111111; + 旧版环境变量格式也兼容,例如: user=张三; kps=abcdefg; sign=hijklmn; vcode=111111111; +''' +import os +import re +import sys + +import requests + +# 测试用环境变量 +# os.environ['COOKIE_QUARK'] = '' + +try: # 异常捕捉 + from notify import send # 导入消息通知模块 +except Exception as err: # 异常捕捉 + print('%s\n❌加载通知服务失败~' % err) + + +# 获取环境变量 +def get_env(): + # 判断 COOKIE_QUARK是否存在于环境变量 + if "COOKIE_QUARK" in os.environ: + # 读取系统变量以 \n 或 && 分割变量 + cookie_list = re.split('\n|&&', os.environ.get('COOKIE_QUARK')) + else: + # 标准日志输出 + print('❌未添加COOKIE_QUARK变量') + send('夸克自动签到', '❌未添加COOKIE_QUARK变量') + # 脚本退出 + sys.exit(0) + + return cookie_list + + +class Quark: + ''' + Quark类封装了签到、领取签到奖励的方法 + ''' + def __init__(self, user_data): + ''' + 初始化方法 + :param user_data: 用户信息,用于后续的请求 + ''' + self.param = user_data + + def convert_bytes(self, b): + ''' + 将字节转换为 MB GB TB + :param b: 字节数 + :return: 返回 MB GB TB + ''' + units = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") + i = 0 + while b >= 1024 and i < len(units) - 1: + b /= 1024 + i += 1 + return f"{b:.2f} {units[i]}" + + def get_growth_info(self): + ''' + 获取用户当前的签到信息 + :return: 返回一个字典,包含用户当前的签到信息 + ''' + url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/info" + querystring = { + "pr": "ucpro", + "fr": "android", + "kps": self.param.get('kps'), + "sign": self.param.get('sign'), + "vcode": self.param.get('vcode') + } + response = requests.get(url=url, params=querystring).json() + #print(response) + if response.get("data"): + return response["data"] + else: + return False + + def get_growth_sign(self): + ''' + 获取用户当前的签到信息 + :return: 返回一个字典,包含用户当前的签到信息 + ''' + url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign" + querystring = { + "pr": "ucpro", + "fr": "android", + "kps": self.param.get('kps'), + "sign": self.param.get('sign'), + "vcode": self.param.get('vcode') + } + data = {"sign_cyclic": True} + response = requests.post(url=url, json=data, params=querystring).json() + #print(response) + if response.get("data"): + return True, response["data"]["sign_daily_reward"] + else: + return False, response["message"] + + def queryBalance(self): + ''' + 查询抽奖余额 + ''' + url = "https://coral2.quark.cn/currency/v1/queryBalance" + querystring = { + "moduleCode": "1f3563d38896438db994f118d4ff53cb", + "kps": self.param.get('kps'), + } + response = requests.get(url=url, params=querystring).json() + # print(response) + if response.get("data"): + return response["data"]["balance"] + else: + return response["msg"] + + def do_sign(self): + ''' + 执行签到任务 + :return: 返回一个字符串,包含签到结果 + ''' + log = "" + # 每日领空间 + growth_info = self.get_growth_info() + if growth_info: + log += ( + f" {'88VIP' if growth_info['88VIP'] else '普通用户'} {self.param.get('user')}\n" + f"💾 网盘总容量:{self.convert_bytes(growth_info['total_capacity'])}," + f"签到累计容量:") + if "sign_reward" in growth_info['cap_composition']: + log += f"{self.convert_bytes(growth_info['cap_composition']['sign_reward'])}\n" + else: + log += "0 MB\n" + if growth_info["cap_sign"]["sign_daily"]: + log += ( + f"✅ 签到日志: 今日已签到+{self.convert_bytes(growth_info['cap_sign']['sign_daily_reward'])}," + f"连签进度({growth_info['cap_sign']['sign_progress']}/{growth_info['cap_sign']['sign_target']})\n" + ) + else: + sign, sign_return = self.get_growth_sign() + if sign: + log += ( + f"✅ 执行签到: 今日签到+{self.convert_bytes(sign_return)}," + f"连签进度({growth_info['cap_sign']['sign_progress'] + 1}/{growth_info['cap_sign']['sign_target']})\n" + ) + else: + log += f"❌ 签到异常: {sign_return}\n" + else: + log += f"❌ 签到异常: 获取成长信息失败\n" + + return log + + +def extract_params(url): + ''' + 从URL中提取所需的参数 + :param url: 包含参数的URL + :return: 返回一个字典,包含所需的参数 + ''' + # 提取URL中的查询参数部分(?后面的内容) + query_start = url.find('?') + query_string = url[query_start + 1:] if query_start != -1 else '' + + # 解析查询参数 + params = {} + for param in query_string.split('&'): + if '=' in param: + key, value = param.split('=', 1) + params[key] = value + + # 返回所需的参数 + return { + 'kps': params.get('kps', ''), + 'sign': params.get('sign', ''), + 'vcode': params.get('vcode', '') + } + + +def main(): + ''' + 主函数 + :return: 返回一个字符串,包含签到结果 + ''' + msg = "" + global cookie_quark + cookie_quark = get_env() + + print("✅ 检测到共", len(cookie_quark), "个夸克账号\n") + + i = 0 + while i < len(cookie_quark): + # 获取user_data参数 + user_data = {} # 用户信息 + for a in cookie_quark[i].replace(" ", "").split(';'): + if not a == '': + user_data.update({a[0:a.index('=')]: a[a.index('=') + 1:]}) + + # 从url参数中提取额外信息 + if 'url' in user_data: + url_params = extract_params(user_data['url']) + user_data.update(url_params) + # print(user_data) + + # 开始任务 + log = f"🙍🏻‍♂️ 第{i + 1}个账号" + msg += log + # 登录 + log = Quark(user_data).do_sign() + msg += log + "\n" + + i += 1 + + print(msg) + + try: + send('夸克自动签到', msg) + except Exception as err: + print('%s\n❌ 错误,请查看运行日志!' % err) + + return msg[:-1] + + +if __name__ == "__main__": + print("----------夸克网盘开始签到----------") + main() + print("----------夸克网盘签到完毕----------") \ No newline at end of file diff --git a/dayuecheng.js b/dayuecheng.js new file mode 100644 index 0000000..e90cb46 --- /dev/null +++ b/dayuecheng.js @@ -0,0 +1,454 @@ +/* + * 大悦城自动任务脚本 for 青龙面板 + * 环境变量:dyc + * 格式:MallId#Token#PublicKey#mpOpenId + * 多账号:MallId#Token#PublicKey#mpOpenId&MallId#Token#PublicKey#mpOpenId + * + * 功能说明: + * 1. 检查用户状态 + * 2. 自动签到 + * 3. 获取积分信息 + */ + +const $ = new Env("大悦城自动任务"); +const notify = $.isNode() ? require("./sendNotify") : ""; + +// 环境变量名 +const envName = "dyc"; + +// 固定参数 +const mpAppId = "wxc1f0da607b34c3bd"; +const systemInfo = { + model: "microsoft", + SDKVersion: "3.13.1", + system: "Windows 10 x64", + version: "4.1.6.46", + miniVersion: "1.0.96" +}; + +class Dayuecheng { + constructor(mallId, token, publicKey, mpOpenId) { + this.mallId = mallId; + this.token = token; + this.publicKey = publicKey; + this.mpOpenId = mpOpenId; + this.baseUrl = "https://m-crm.joycity.mobi/api"; + this.headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) UnifiedPCWindowsWechat(0xf254162e) XWEB/18151", + "Content-Type": "application/json", + "Accept": "*/*", + "Referer": "https://servicewechat.com/wxc1f0da607b34c3bd/40/page-frame.html", + "xweb_xhr": "1" + }; + this.retryCount = 3; + this.retryDelay = 2000; + } + + generateSign(timestamp, data) { + const crypto = require("crypto"); + let signStr = timestamp + this.publicKey; + + if (data && data.trim() !== "") { + signStr += data; + } + + return crypto.createHash("md5").update(signStr).digest("hex"); + } + + generateSignAndTimestamp(data = "") { + const timestamp = Date.now().toString(); + const sign = this.generateSign(timestamp, data); + return { sign, timestamp }; + } + + async requestWithRetry(path, data, method = "POST", retry = this.retryCount) { + let lastError; + + for (let i = 0; i < retry; i++) { + try { + if (i > 0) { + $.log(`🔄 第${i + 1}次重试请求: ${path}`); + await $.wait(this.retryDelay); + } + + return await this.request(path, data, method); + } catch (error) { + lastError = error; + $.log(`⚠️ 请求失败 (${i + 1}/${retry}): ${error.message}`); + + if (error.code === 'ECONNABORTED' || error.code === 'ENETUNREACH' || + error.code === 'ETIMEDOUT' || error.message.includes('timeout')) { + continue; + } + + break; + } + } + + throw lastError || new Error(`请求失败,重试${retry}次后仍然失败`); + } + + async request(path, data, method = "POST") { + const { sign, timestamp } = this.generateSignAndTimestamp(JSON.stringify(data)); + + const headers = { + ...this.headers, + "Sign": sign, + "Timestamp": timestamp, + "PublicKey": this.publicKey + }; + + let requestData = {}; + + if (path.includes("getSnsInfo")) { + requestData = { + MallId: this.mallId, + mpAppId: mpAppId, + mpOpenId: this.mpOpenId, + Header: { + Token: this.token, + systemInfo: systemInfo + } + }; + } else { + requestData = { + MallID: this.mallId, + Header: { + Token: this.token, + systemInfo: systemInfo + } + }; + } + + if (data && typeof data === 'object') { + requestData = { ...requestData, ...data }; + } + + try { + const response = await $.httpRequest({ + url: `${this.baseUrl}${path}`, + method: method, + headers: headers, + data: JSON.stringify(requestData), + timeout: 15000 + }); + + const result = typeof response.data === "object" ? response.data : JSON.parse(response.data); + + $.log(`📡 ${method} ${path} -> ${result.m === 1 ? '成功' : '失败'}`); + + return result; + } catch (error) { + $.log(`❌ 请求异常: ${error.message}`); + throw error; + } + } + + async checkUserStatus() { + $.log("🔍 检查用户状态..."); + try { + const result = await this.requestWithRetry("/passport/wx/mp/getSnsInfo", {}); + + if (result.m === 1) { + const authorized = result.d?.authorized; + if (authorized) { + $.log("✅ 用户状态正常"); + return { success: true, data: result.d }; + } else { + $.log("❌ 用户授权已失效"); + return { success: false, message: "用户授权已失效" }; + } + } else if (result.code === 401 || result.status === 401) { + $.log("❌ Token已过期,需要重新获取"); + return { success: false, message: "Token已过期" }; + } else { + $.log(`❌ 检查用户状态失败: ${result.e || "未知错误"}`); + return { success: false, message: result.e || "未知错误" }; + } + } catch (error) { + $.log(`❌ 检查用户状态异常: ${error.message}`); + return { success: false, message: error.message }; + } + } + + async autoCheckin() { + $.log("🔍 开始签到..."); + try { + const result = await this.requestWithRetry("/user/User/CheckinV2", {}); + + if (result.m === 1) { + const data = result.d; + if (data.IsCheckIn) { + $.log(`✅ 签到成功: ${data.Msg || "签到完成"}`); + if (data.NickName) { + $.log(`👤 用户: ${data.NickName}`); + } + if (data.Title) { + $.log(`📝 ${data.Title}`); + } + return { success: true, data: data }; + } else { + $.log(`❌ 签到失败: ${data.Msg || "未知原因"}`); + return { success: false, message: data.Msg || "未知原因" }; + } + } else { + $.log(`❌ 签到接口调用失败: ${result.e || "未知错误"}`); + return { success: false, message: result.e || "未知错误" }; + } + } catch (error) { + $.log(`❌ 签到异常: ${error.message}`); + return { success: false, message: error.message }; + } + } + + async getUserPoints() { + $.log("🔍 获取用户积分..."); + try { + const result = await this.requestWithRetry("/user/user/GetMallCard_Encrypt", {}); + + if (result.m === 1) { + const data = result.d; + const points = data.Bonus; + $.log(`💰 当前积分: ${points}`); + if (data.CardTitle) { + $.log(`🎫 卡片类型: ${data.CardTitle}`); + } + if (data.CardLevel) { + $.log(`⭐ 卡片等级: ${data.CardLevel}`); + } + return { success: true, points: points, data: data }; + } else { + $.log(`❌ 获取积分失败: ${result.e || "未知错误"}`); + return { success: false, message: result.e || "未知错误" }; + } + } catch (error) { + $.log(`❌ 获取积分异常: ${error.message}`); + return { success: false, message: error.message }; + } + } + + async runAllTasks() { + $.log(`🏪 开始处理大悦城账号: ${this.mallId}`); + + const taskResults = []; + + const statusResult = await this.checkUserStatus(); + taskResults.push({ name: "用户状态检查", success: statusResult.success }); + + if (!statusResult.success) { + $.log("❌ 用户状态异常,跳过后续任务"); + return { + success: false, + message: statusResult.message || "用户状态异常", + taskResults: taskResults + }; + } + + const checkinResult = await this.autoCheckin(); + taskResults.push({ name: "自动签到", success: checkinResult.success }); + + const pointsResult = await this.getUserPoints(); + taskResults.push({ name: "获取积分", success: pointsResult.success }); + + const successCount = taskResults.filter(r => r.success).length; + const totalCount = taskResults.length; + + $.log(`\n📊 任务执行汇总: ${successCount}/${totalCount} 成功`); + taskResults.forEach((task, index) => { + $.log(`${task.success ? '✅' : '❌'} ${index + 1}. ${task.name}`); + }); + + return { + success: successCount === totalCount, + taskResults: taskResults, + summary: { + successCount: successCount, + totalCount: totalCount, + mallId: this.mallId, + publicKey: this.publicKey, + mpOpenId: this.mpOpenId + } + }; + } +} + +function Env(name) { + this.name = name; + this.logs = []; + + this.log = (...args) => { + const msg = args.join(" "); + const timestamp = new Date().toLocaleTimeString(); + const logMsg = `[${timestamp}] ${msg}`; + this.logs.push(logMsg); + console.log(logMsg); + }; + + this.isNode = () => { + return typeof process !== "undefined" && process.release && process.release.name === 'node'; + }; + + this.getdata = (key) => { + if (this.isNode()) { + return process.env[key] || ""; + } + return ""; + }; + + this.wait = (ms) => { + return new Promise(resolve => setTimeout(resolve, ms)); + }; + + this.httpRequest = async (config) => { + if (this.isNode()) { + const axios = require('axios'); + try { + const response = await axios({ + ...config, + validateStatus: function (status) { + return status >= 200 && status < 500; + } + }); + return response; + } catch (error) { + throw error; + } + } else { + throw new Error("非Node环境不支持HTTP请求"); + } + }; + + this.done = () => { + if (this.isNode()) { + process.exit(0); + } + }; +} + +async function main() { + const envValue = $.getdata(envName); + if (!envValue) { + $.log(`❌ 未找到环境变量 ${envName}`); + $.log(`💡 请添加环境变量 ${envName},格式: MallId#Token#PublicKey#mpOpenId`); + $.log(`📝 多账号格式: MallId#Token#PublicKey#mpOpenId&MallId#Token#PublicKey#mpOpenId`); + return; + } + + const accounts = []; + const accountStrings = envValue.split('&').filter(Boolean); + + for (const accountStr of accountStrings) { + const parts = accountStr.split('#'); + if (parts.length === 4) { + const mallId = parts[0].trim(); + const token = parts[1].trim(); + const publicKey = parts[2].trim(); + const mpOpenId = parts[3].trim(); + + if (mallId && token && publicKey && mpOpenId) { + accounts.push({ mallId, token, publicKey, mpOpenId }); + } else { + $.log(`⚠️ 忽略无效账号格式: ${accountStr}`); + } + } else { + $.log(`⚠️ 忽略格式错误的账号(需要4个参数): ${accountStr}`); + } + } + + if (accounts.length === 0) { + $.log("❌ 未找到有效的账号配置"); + $.log("💡 正确格式: MallId#Token#PublicKey#mpOpenId"); + $.log("💡 多账号: MallId#Token#PublicKey#mpOpenId&MallId#Token#PublicKey#mpOpenId"); + return; + } + + $.log(`🎯 共找到 ${accounts.length} 个有效账号`); + + const allResults = []; + + for (let i = 0; i < accounts.length; i++) { + const account = accounts[i]; + $.log(`\n📱 开始处理第 ${i + 1} 个账号 (MallId: ${account.mallId})`); + + try { + const dyc = new Dayuecheng(account.mallId, account.token, account.publicKey, account.mpOpenId); + const result = await dyc.runAllTasks(); + + allResults.push({ + mallId: account.mallId, + ...result + }); + + if (i < accounts.length - 1) { + $.log(`⏳ 等待3秒后处理下一个账号...`); + await $.wait(3000); + } + } catch (error) { + $.log(`❌ 处理账号异常: ${error.message}`); + allResults.push({ + mallId: account.mallId, + success: false, + error: error.message, + taskResults: [] + }); + } + } + + $.log("\n" + "=".repeat(60)); + $.log("📈 所有账号任务执行汇总:"); + $.log("=".repeat(60)); + + let totalSuccess = 0; + let totalTasks = 0; + + allResults.forEach((result, index) => { + const successCount = result.taskResults ? result.taskResults.filter(r => r.success).length : 0; + const totalCount = result.taskResults ? result.taskResults.length : 0; + + $.log(`\n账号 ${index + 1} (MallId: ${result.mallId}):`); + $.log(` ${result.success ? '✅ 成功' : '❌ 失败'} (${successCount}/${totalCount} 任务成功)`); + + if (result.taskResults) { + result.taskResults.forEach((task, taskIndex) => { + $.log(` ${task.success ? '✅' : '❌'} ${task.name}`); + }); + } + + if (result.error) { + $.log(` 错误: ${result.error}`); + } + + totalSuccess += successCount; + totalTasks += totalCount; + }); + + $.log("\n" + "=".repeat(60)); + $.log(`📊 总体统计: ${totalSuccess}/${totalTasks} 个任务成功完成`); + $.log("=".repeat(60)); + + if ($.isNode() && notify) { + try { + const summaryText = allResults.map(r => { + const successCount = r.taskResults ? r.taskResults.filter(t => t.success).length : 0; + const totalCount = r.taskResults ? r.taskResults.length : 0; + return `MallId: ${r.mallId} - ${successCount}/${totalCount} 成功`; + }).join('\n'); + + const title = `大悦城自动任务 - ${allResults.filter(r => r.success).length}/${allResults.length} 个账号成功`; + const content = $.logs.join("\n") + "\n\n" + summaryText; + + await notify.sendNotify(title, content); + } catch (error) { + $.log(`⚠️ 发送通知失败: ${error.message}`); + } + } +} + +if (require.main === module) { + main().catch(e => { + $.log(`❌ 脚本执行异常: ${e.message}`); + console.error(e.stack); + }).finally(() => { + $.done(); + }); +} diff --git a/ddsy_songyao.js b/ddsy_songyao.js new file mode 100644 index 0000000..0c02e25 --- /dev/null +++ b/ddsy_songyao.js @@ -0,0 +1,180 @@ +/** + * cron 27 19 * * * ddsy_songyao.js + * Show:叮当快药APP 积分抵钱 我的=>签到有礼 + * 变量名:ddsy_songyao + * 变量值:https://hapi.ddky.com/mcp/weixin/rest.htm?后面的loginToken&userId&uDate 多账户@ + * scriptVersionNow = "0.0.1"; + * / + */ + +const $ = new Env("叮当快药APP"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "ddsy_songyao"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.token = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.userId = str.split(strSplitor)[1]; + this.uDate = str.split(strSplitor)[2]; + } + async main() { + await this.getSignInId() + } + getSign(s) { + const crypto = require("crypto");//SIGN TYPE 1是签到 2是补签 + return crypto.createHash('md5').update(s).digest('hex'); + } + getTime() { + var now = new Date(); + var year = now.getFullYear() + , month = now.getMonth() + 1 + , day = now.getDate() + , hours = now.getHours() + , minutes = now.getMinutes() + , seconds = now.getSeconds(); + return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds; + } + getSignDay() { + var now = new Date(); + var year = now.getFullYear() + , month = now.getMonth() + 1 + , day = now.getDate() + return year + '-' + month + '-' + day + } + async getSignInId() { + const time = this.getTime() + const method = `ddky.promotion.signin.pageinfo` + const signDay = this.getSignDay() + const str = method + + `loginToken${this.token}` + + `method${method}` + + `platH5` + + `platformH5` + + `signDay${signDay}` + + `t${time}` + + `uDate${this.uDate}` + + `userId${this.userId}` + + `v1.0` + + `versionName4.9.0` + + `6C57AB91A1308E26B797F4CD382AC79D` + let sign = (this.getSign(str)).toUpperCase(); + let callbackStr = new Date().getTime() + try { + let options = { + url: `https://hapi.ddky.com/mcp/weixin/rest.htm?sign=${sign}&loginToken=${this.token}&method=${method}&plat=H5&platform=H5&signDay=${signDay}&t=${time}&uDate=${this.uDate}&userId=${this.userId}&v=1.0&versionName=4.9.0&callback=Zepto${callbackStr}`, + headers: {}, + }, + result = await httpRequest(options); + //console.log(options); + result = result.replace(`Zepto${callbackStr}`, "") + result = result.replaceAll("(", "") + result = result.replaceAll(")", "") + result = JSON.parse(result) + if(result.code = "0"){ + console.log(result.result.signDayVo.signinId); + await this.user_info(result.result.signDayVo.signinId) + } + + } catch (e) { + console.log(e); + } + } + async user_info(signInId) { + let callbackStr = new Date().getTime() + + const time = this.getTime() + const str = `ddky.promotion.signin.sign` + `channelH5` + `laterSignType1` + `loginToken${this.token}` + `methodddky.promotion.signin.sign` + + `platH5` + `platformH5` + `signinId${signInId}` + `t${time}` + `uDate${this.uDate}` + `userId${this.userId}` + `v1.0` + `versionName4.9.0` + + `6C57AB91A1308E26B797F4CD382AC79D` + let sign = (this.getSign(str)).toUpperCase(); + try { + let options = { + url: `https://hapi.ddky.com/mcp/weixin/rest.htm?sign=${sign}&channel=H5&laterSignType=1&loginToken=${this.token}&method=ddky.promotion.signin.sign&plat=H5&platform=H5&signinId=${signInId}&t=${time}&uDate=${this.uDate}&userId=${this.userId}&v=1.0&versionName=4.9.0&callback=Zepto${callbackStr}`, + headers: {}, + }, + result = await httpRequest(options); + //console.log(options); + console.log(result); + } catch (e) { + console.log(e); + } + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, timeout = 5 * 1000) { + method = options.method + ? options.method.toLowerCase() + : options.body + ? "post" + : "get"; + return new Promise((resolve) => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { + data = JSON.parse(data); + } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }, timeout); + }); +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), this.logs.push("", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="), this.logs.push(s), e && this.logs.push(e), i && this.logs.push(i) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/dffx.js b/dffx.js new file mode 100644 index 0000000..b8c092d --- /dev/null +++ b/dffx.js @@ -0,0 +1,191 @@ +/** + * cron 45 19 * * * dffx.js + * Show:东方风行 APP + * @author https://github.com/smallfawn/QLScriptPublic + * 变量名:dffxCookie + * 变量值:https://lqdm-app.dflzm.com请求头Headers中Cookie + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("东方风行"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "dffxCookie"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.artList = []//文章列表 + this.taskList = []//任务列表 + this.task_num_like = null //待做点赞任务数 + this.task_num_share = null//待做转发任务数 + this.userPoint = null + + } + async main() { + $.log(`===== 开始第[${this.index}]个账号 =====`) + await this.user_info(); + if (this.ckStatus) { + await this.addSign() + + } + + } + + + async addSign() { + try { + let options = { + fn: "签到", + method: "get", + url: `https://lqdm-app.dflzm.com/customer/app-vip-user/exterior/user/task/signIn?isReSign=0`, + } + options.headers = this.get_headers(options.method, options.url) + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅[${options.fn}]成功🎉`) + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async user_info() { + try { + let options = { + fn: "信息查询", + method: "get", + url: `https://lqdm-app.dflzm.com/customer/app-vip-user/exterior/user/getMe`, + } + options.headers = this.get_headers(options.method, options.url) + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 0) { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + $.log(`✅[${result.data.nickname}][${result.data.phone}][${result.data.id}]当前积分[${result.data.integral}]🎉`) + this.ckStatus = true; + } else { + console.log(`❌[UserInfo]查询: 失败`); + this.ckStatus = false; + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + + + + sha256(str) { + const crypto = require("crypto"); + return crypto.createHash("sha256").update(str).digest("hex"); + + } + get_headers(method, url, body = "") { + url = url.replace("https://lqdm-app.dflzm.com", "") + let path = url.split('?')[0] + let params + if(url.split('?')[1]){ + params = url.split('?')[1].split('&').sort().join("").toLowerCase() + }else{ + params = "" + } + method = method.toUpperCase(); + let timestamp = new Date().getTime() + const key = `3b8379a44daa6ab982c886d8bcdcc82a` + let str + if (method == "POST") { + str = `${method}${path}ice-auth-appkey:9831532554ice-auth-timestamp:${timestamp}json=${body}${params}${key}` + } else { + str = `${method}${path}ice-auth-appkey:9831532554ice-auth-timestamp:${timestamp}${params}${key}` + + } + //console.log(encodeURIComponent(str)) + const sign = this.sha256(encodeURIComponent(str)) + return { + "Content-Type": "application/json;charset=UTF-8", + "User-Agent": "okhttp/3.14.9 (Android 10; Xiaomi MI 8 Lite Build/V11.0.2.0.QDTCNXM 3.2.6 40059 release dflqApp)", + "appInfo": JSON.stringify({ "appVersion": "3.2.6", "osVersion": "Android 10", "appType": "Android", "deviceName": "Xiaomi MI 8 Lite", "deviceId": "7ec3eaf292dc3ead268d7335cc308f88@1703156059659" }), + "Cache-Control": "no-cache", + "platform": 2, + "device": "cAndroid", + "deviceSN": "7ec3eaf292dc3ead268d7335cc308f88@1703156059659", + "Cookie": this.ck, + //"userId": "", + "appKey": 9831532554, + "ice-auth-appkey": 9831532554, + "ice-auth-timestamp": timestamp, + "ice-auth-sign": sign, + "Content-Type": "application/json;charset=UTF-8", + "Host": "lqdm-app.dflzm.com", + "Connection": "Keep-Alive", + "Accept-Encoding": "identity" + } + } + get_uuid() { + return 'xxxxxxxx-xxxx-xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); + $.msg($.name, `任务已完成`) +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "" + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.data = null; this.dataFile = "box.dat"; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { if (this.isSurge() || this.isLoon()) { return $persistentStore.read(t) } else if (this.isQuanX()) { return $prefs.valueForKey(t) } else if (this.isNode()) { this.data = this.loaddata(); return this.data[t] } else { return this.data && this.data[t] || null } } setval(t, s) { if (this.isSurge() || this.isLoon()) { return $persistentStore.write(t, s) } else if (this.isQuanX()) { return $prefs.setValueForKey(t, s) } else if (this.isNode()) { this.data = this.loaddata(); this.data[s] = t; this.writedata(); return true } else { return this.data && this.data[s] || null } } initGotEnv(t) { this.got = this.got ? this.got : require("got"); this.cktough = this.cktough ? this.cktough : require("tough-cookie"); this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); if (t) { t.headers = t.headers ? t.headers : {}; if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { t.cookieJar = this.ckjar } } } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`).join('&') } isJSONString(str) { try { var obj = JSON.parse(str); if (typeof obj == 'object' && obj) { return true } else { return false } } catch (e) { return false } } isJson(obj) { var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if ($.isNode()) { await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } async httpRequest(options) { const t = { ...options }; if (!t.headers) { t.headers = {} } if (t.params) { t.url += '?' + this.queryStr(t.params) } t.method = t.method.toLowerCase(); if (t.method === 'get') { delete t.headers['Content-Type']; delete t.headers['Content-Length']; delete t["body"] } if (t.method === 'post') { let contentType; if (!t.body) { t.body = "" } else { if (typeof t.body == "string") { if (this.isJSONString(t.body)) { contentType = 'application/json' } else { contentType = 'application/x-www-form-urlencoded' } } else if (this.isJson(t.body)) { t.body = JSON.stringify(t.body); contentType = 'application/json' } } if (!t.headers['Content-Type']) { t.headers['Content-Type'] = contentType } delete t.headers['Content-Length'] } if (this.isNode()) { this.initGotEnv(t); let httpResult = await this.got(t); if (this.isJSONString(httpResult.body)) { httpResult.body = JSON.parse(httpResult.body) } return httpResult } } randomNumber(length) { const characters = '0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } randomString(length) { const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } timeStamp() { return new Date().getTime() } uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/dfyc.js b/dfyc.js new file mode 100644 index 0000000..be1b3e2 --- /dev/null +++ b/dfyc.js @@ -0,0 +1,578 @@ +/** + * cron 5 15 * * * + * Show:东方烟草报App 积分换实物 + * 变量名:dfycToken + * 变量值:POST请求任意链接包含https://eapp.eastobacco.com/index.php body中的token 多账号&分割 不是@ 和换行 + * scriptVersionNow = "0.0.1"; + */ + +//Quantumult X 可以在cookies里面写变量 +const cookies = [] + + +const $ = new Env("东方烟草报"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "dfycToken"; +let envSplitor = ["&"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +let msg = "" +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.artList = [] + } + async main() { + await this.user_info(); + if (this.ckStatus) { + await this.task_daka() + await this.art_list() + if (this.artList.length !== 0) { + for (let i = 0; i < 3; i++) { + await this.task_read(this.artList[i].id, this.artList[i].catid) + await this.task_share(this.artList[i].id, this.artList[i].catid) + await this.task_like(this.artList[i].id, this.artList[i].catid) + } + } + } + } + async user_info() { + try { + let options = { + fn: "信息", + method: "post", + url: `https://eapp.eastobacco.com/index.php?m=api&c=user&a=userinfo`, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + body: `platform=android&token=${this.ck}×tamp=${Date.now()}&api_version=4` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 积分[${result.data.point}]🎉`) + this.ckStatus = true; + } else { + console.log(`❌账号[${this.index}] 用户查询: 失败`); + this.ckStatus = false; + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async task_daka() { + try { + let options = { + fn: "打卡", + method: "post", + url: `https://eapp.eastobacco.com/index.php?m=api&c=user&a=daka`, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + body: `platform=android&token=${this.ck}×tamp=${Date.now()}&api_version=4` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + $.log(`✅账号[${this.index}] 打卡[${result.message}]🎉`) + } catch (e) { + console.log(e); + } + } + + async art_list() { + try { + let options = { + fn: "文章列表", + method: "post", + url: `https://eapp.eastobacco.com/index.php?m=api&c=content&a=newsList_pub`, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + body: `catid=1&num=20&page=1&api_version=4&platform=android&token=${this.ck}×tamp=${Date.now()}` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.data.news) { + for (let news of result.data.news) { + this.artList.push( + { + id: news.id, + catid: news.catid, + title: news.title + } + ) + } + console.log(`获取文章成功`); + } else { + console.log(`获取文章失败`); + } + } catch (e) { + console.log(e); + } + } + + async task_read(id, catid) { + try { + let options = { + fn: "阅读", + method: "post", + url: `https://eapp.eastobacco.com/index.php?m=api&c=content&a=addvisite`, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + body: `platform=android&token=${this.ck}×tamp=${Date.now()}&api_version=4&newsid=${id}&catid=${catid}` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 阅读[${id}]成功🎉`) + + } else { + $.log(`❌账号[${this.index}] 阅读[${id}]失败`) + } + } catch (e) { + console.log(e); + } + } + + async task_share(id, catid) { + try { + let options = { + fn: "分享", + method: "post", + url: `https://eapp.eastobacco.com/index.php?m=api&c=user&a=addScoreZf`, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + body: `platform=android&token=${this.ck}×tamp=${Date.now()}&api_version=4&id=${id}&catid=${catid}` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 分享[${id}]成功🎉`) + + } else { + $.log(`❌账号[${this.index}] 分享[${id}]失败`) + } + } catch (e) { + console.log(e); + } + } + + async task_like(id, catid) { + try { + let options = { + fn: "点赞", + method: "post", + url: `https://eapp.eastobacco.com/index.php?m=api&c=content&a=dingcai`, + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + body: `platform=android&token=${this.ck}×tamp=${Date.now()}&api_version=4&newsid=${id}&catid=${catid}` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 点赞[${id}]成功🎉`) + + } else { + $.log(`❌账号[${this.index}] 点赞[${id}]失败`) + } + } catch (e) { + console.log(e); + } + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : cookies) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + isJSONString(str) { + try { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t["body"] + } + if (t.method === 'post') { + let contentType; + + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + contentType = 'application/json' + } else { + contentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + contentType = 'application/json'; + } + } + if (!t.headers['Content-Type']) { + t.headers['Content-Type'] = contentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/didi.js b/didi.js new file mode 100644 index 0000000..b1dc7c9 --- /dev/null +++ b/didi.js @@ -0,0 +1,821 @@ +/** + * cron 20 8 * * * + * Show:滴滴领券&果园 暂时每天一次 + * 变量名:didi + * 注意:微信小程序和APP的token同样可用 搜不到关键词就搜token + * 变量值:https://api.didi.cn 抓域名中 请求体*(body) city_id 中的 和请求头Headers中的Didi-Ticket + * 注意 ut.xiaojukeji.com 请求体中的token和Didi-Ticket是一样的 都可以抓 找不到可以放大镜搜索 + * 有BUG记得反馈 果园入口 微信打开 http://www.yuban.ltd/wx/?id=20240322215239111024747 + * 正确格式 Didi-Ticket # city_id + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("滴滴领券&果园"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "didi"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class Task { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.couponsBindList = [] + this.waterNum = 0; + this.city_id = Number(str.split(strSplitor)[1]); + } + async main() { + await this.productInit(); + await this.sign_do() + await this.doLottery() + for (let i of this.couponsBindList) { + await this.coupon_bind(i.activity_id, i.group_id, i.coupon_conf_id) + } + await this.do_group() + await this.mission_get() + await this.plant_sign() + await this.plant_newEnter() + if (this.waterNum > 10) { + for (let i = 0; i < (this.waterNum / 10); i++) { + await this.plant_newWatering() + + } + } + } + async taskRequest(method, url, body = "") { + // + let headers = { + 'Content-Type': 'application/json', + 'Didi-Ticket': this.ck, + } + const reqeuestOptions = { + url: url, + method: method, + headers: headers, + } + body == "" ? "" : Object.assign(reqeuestOptions, { body: body }) + let { body: result } = await $.httpRequest(reqeuestOptions) + return result + } + + async productInit() { + try { + let result = await this.taskRequest("post", `https://api.didi.cn/webx/v3/productInit`, JSON.stringify({ + "city_id": this.city_id, + "dchn": "YYPDp7e", + "args": { + "runtime_args": { + "Didi-Ticket": this.ck, + } + }, + })) + if (result.errno == 0) { + // + $.log(`✅账号[${this.index}]-初始化活动信息成功🎉`) + let tmpArr = result.data.conf.strategy_data.daily_info.daily_coupon.coupons + let tmpArr2 = result.data.conf.strategy_data.sec_kill_info.seckill + // $.log(`本次共可领取[${tmpArr.length}]张每日精选券`) + for (let i of tmpArr2) { + if (i.status == 3) { + //过去 + } else if (i.status == 1) { + //当前 + for (let j of i.coupons) { + //console.log(j) + if (j.status == 1) { + //console.log(j) + this.couponsBindList.push({ activity_id: j.activity_id, group_id: j.group_id, coupon_conf_id: j.coupon_conf_id }) + } + } + } else if (i.status == 2) { + //将来 + } + } + for (let i of tmpArr) { + if (i.status == 1) { + //console.log(i) + this.couponsBindList.push({ activity_id: i.activity_id, group_id: i.group_id, coupon_conf_id: i.coupon_conf_id }) + } + } + } else { + + } + } catch (e) { + console.log(e); + } + } + async doLottery() { + try { + let result = await this.taskRequest("post", `https://ut.xiaojukeji.com/ut/janitor/api/action/lottery/doLottery`, JSON.stringify({ + "act_id": "217533998314", + "city_id": this.city_id + })) + //console.log(options); + //console.log(JSON.stringify(result)); + if (result.errno == 0) { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + $.log(`✅账号[${this.index}]-抽奖成功-[${result.data.prize_data[0].name}]🎉`) + } else { + $.log(`❌账号[${this.index}]-抽奖失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + + + async coupon_bind(activity_id, group_id, coupon_conf_id) { + try { + let result = await this.taskRequest("post", `https://ut.xiaojukeji.com/ut/janitor/api/action/coupon/bind`, JSON.stringify({ + "activity_id": activity_id, + "group_id": group_id, + "coupon_conf_id": coupon_conf_id, + "city_id": this.city_id + })) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-时间段领券成功-[${result.data.name}]🎉`) + } else { + $.log(`❌账号[${this.index}]-时间段领券失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async do_group() { + try { + let body = { + "prod_key": "integrated-marketing-award", + "token": this.ck, + "xak": "integrated-marketing-award-D5LYBz4SGgg4", + "city_id": this.city_id + } + let result = await this.taskRequest("post", `https://ut.xiaojukeji.com/ut/active_brick/api/v1/award/do_group?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + let awardArr = [] + for (let i of result.data.details) { + for (let j of i.rewards) { + awardArr.push(j.info[0].coupon_name) + } + } + $.log(`✅账号[${this.index}]-每日领券成功-[${awardArr}]🎉`) + } else { + $.log(`❌账号[${this.index}]-每日领券失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + $.log(`❌账号[${this.index}]-领券失败-[501报错 - 测试版]`); + } + } + async sign_do() { + try { + let result = await this.taskRequest("post", `https://ut.xiaojukeji.com/ut/janitor/api/action/sign/do`, JSON.stringify({ + //"activity_id": "217534045313", + })) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + $.log(`✅账号[${this.index}]-签到成功-[]🎉`) + + } else { + $.log(`❌账号[${this.index}]-签到失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async plant_newEnter() { + let body = { + platform: 1, + game_id: 23, + token: + this.ck + }; + try { + let result = await this.taskRequest("post", `https://game.xiaojukeji.com/api/game/plant/newEnter?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-果园信息获取成功-[${result.data.tree_info.pack_water}💧 ${result.data.tree_info.tree_progress}%]🎉`) + this.waterNum = Number(result.data.tree_info.pack_water); + } else { + $.log(`❌账号[${this.index}]-果园信息获取失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async mission_award(mission_id) { + let body = { + mission_id: mission_id, + game_id: 23, + platform: 1, + token: + this.ck, + } + try { + let result = await this.taskRequest("post", `https://game.xiaojukeji.com/api/game/mission/award?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-领取果园奖励成功-[${result.data.reward[0].count}/${result.data.reward[0].name}]🎉`) + + } else { + $.log(`❌账号[${this.index}]-领取果园奖励失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async mission_get() { + try { + let result = await this.taskRequest("get", `https://game.xiaojukeji.com/api/game/mission/get?game_id=23&token=${this.ck}`) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + for (let i of result.data.missions) { + if (i.type == 1) { + if (i.status == 0 && i.target == 1) { + await this.mission_update(i.id) + } + if (i.status == 2) { + await this.mission_award(i.id) + } + } else if (i.type == 2) { + + } else if (i.type == 5) { + await this.mission_subscribe(i.id) + } + + + } + + } else { + $.log(`❌账号[${this.index}]-果园初始化失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async mission_update(mission_id) { + let body = { + mission_id: mission_id, + game_id: 23, + platform: 1, + token: + this.ck, + } + try { + let result = await this.taskRequest("post", `https://game.xiaojukeji.com/api/game/mission/update?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-上传任务状态成功-[${result.errmsg}]🎉`) + await this.mission_award(mission_id) + } else { + $.log(`❌账号[${this.index}]-上传任务状态失败-[${result.errmsg, mission_id}] `); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + async mission_subscribe(id) { + let body = { + status: true, + game_id: 23, + platform: 1, + token: + this.ck, + }; + try { + let result = await this.taskRequest("post", `https://game.xiaojukeji.com/api/game/subscribe?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-上传任务状态成功-[${result.errmsg}]🎉`) + await this.mission_award(id) + } else { + $.log(`❌账号[${this.index}]-上传任务状态失败-[${result.errmsg, mission_id}] `); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async plant_sign() { + try { + let body = { + platform: 1, + game_id: 23, + token: + this.ck, + } + let result = await this.taskRequest("post", `https://game.xiaojukeji.com/api/game/plant/sign?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + // console.log("post", `https://game.xiaojukeji.com/api/game/plant/sign?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-果园签到成功-[${result.errmsg}]🎉`) + + } else { + $.log(`❌账号[${this.index}]-果园签到失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async plant_newWatering() { + let body = { + platform: 1, + game_id: 23, + token: + this.ck, + } + try { + let result = await this.taskRequest("post", `https://game.xiaojukeji.com/api/game/plant/newWatering?wsgsig=${this.get_wsgsig(body)}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.errno == 0) { + $.log(`✅账号[${this.index}]-浇水成功-[${result.data.tree_progress}%]🎉`) + + } else { + $.log(`❌账号[${this.index}]-浇水失败-[${result.errmsg}]`); + //console.log(result); + } + } catch (e) { + console.log(e); + } + } + get_wsgsig(OO) { + OO = JSON.stringify(OO); + function c(t) { + for (var e = t.length, n = t.length - 1; n >= 0; n--) { + var r = t.charCodeAt(n); + r > 127 && r <= 2047 ? e++ : r > 2047 && r <= 65535 && (e += 2), + r >= 56320 && r <= 57343 && n--; + } + return e; + } + + + function r(t) { + for ( + var e = + "ABCDEFG0123456789abcdefgHIJKLMN+/hijklmnOPQRSTopqrstUVWXYZuvwxyz", + n = "" + t, + r = void 0, + o = void 0, + i = 0, + u = ""; + n.charAt(0 | i) || ((e = "="), i % 1); + u += e.charAt(63 & (r >> (8 - (i % 1) * 8))) + ) { + if ((o = n.charCodeAt((i += 0.75))) > 255) + throw new Error( + "'base64' failed: The string to be encoded contains characters outside of the Latin1 range." + ); + r = (r << 8) | o; + } + return u; + } + function o(t, e) { + for (var n = [], r = 0; r < e.length; r++) + n[r] = t[r % 4] ^ e.charCodeAt(r); + return ( + (n = Array.prototype.slice.apply(t).concat(n)), + String.fromCharCode.apply(null, n) + ); + } + + + //D参数为提交的param + function en(T) { + return ( + "dd03-" + + r( + o( + new Uint8Array( + new Uint32Array([ + Math.floor(4294967296 * Math.random()), + ]).buffer + ), + T + ) + ).replace(/=*$/, "") + ); + } + function MD5(data) { + const crypto = require("crypto"); + return crypto.createHash("md5").update(data).digest("hex"); + } + let time = Math.floor(new Date() / 1e3) + return en('ts=' + time + '&v=1&os=web&av=02&kv=0000010001&vl=' + c(OO) + '&sig=' + MD5("R4doMFFeMNlliIWM" + OO)) + } + +} + + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(user.main()); + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log(`未找到CK【${ckName}】`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + //从url获取参数组成json + 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 { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t.headers['content-type']; + delete t.headers['content-length']; + delete t["body"] + } + if (t.method === 'post') { + let ContentType; + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + ContentType = 'application/json' + } else { + ContentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + ContentType = 'application/json'; + } + } + if (!t.headers['Content-Type'] || !t.headers['content-type']) { + t.headers['Content-Type'] = ContentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/dydd.py b/dydd.py new file mode 100644 index 0000000..90af0b3 --- /dev/null +++ b/dydd.py @@ -0,0 +1,90 @@ + +#环境变量 dydd +import os +import requests +import time +import hashlib + +# 获取青龙面板环境变量 dydd +dydd = os.environ.get('dydd', '') + +# 按换行符分割账号,并过滤空行 +accounts = [line.strip() for line in dydd.strip().split('\n') if line.strip()] + +url = "https://app2.d1ev.com/api/user/add-integral" + +# 公共参数 +params_base = { + 'app_id': "d1ev_app", + 'appName': "第一电动", + 'os': "android", + 'osVer': "9", + 'vName': "2.5.6", + 'vCode': "20506" +} + +headers = { + 'User-Agent': "Dalvik/2.1.0 (Linux; U; Android 9; PCRT00 Build/PQ3A.190605.06201646)", + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + 'TE': "gzip, deflate; q=0.5" +} + +# 定义任务列表,每个任务包括任务类型和执行次数 +tasks = [ + {'type': 11, 'name': '签到', 'count': 1}, + {'type': 3, 'name': '分享', 'count': 3}, + {'type': 5, 'name': '点赞', 'count': 5}, + {'type': 2, 'name': '阅读', 'count': 1} +] + +for account in accounts: + # 分割账号为 uid 和 token + parts = account.split('#') + if len(parts) != 2: + print(f"跳过无效格式账号: {account}") + continue + + uid, token = parts + + # 生成当前时间戳 + current_timestamp = str(int(time.time())) + + for task in tasks: + task_type = task['type'] + task_name = task['name'] + task_count = task['count'] + + for _ in range(task_count): + # 构造签名字符串 + sign_str = f"OMKCy2UxZwn8e4Ak{params_base['appName']}{params_base['app_id']}{params_base['os']}{params_base['osVer']}{current_timestamp}{token}{task_type}{uid}{params_base['vCode']}{params_base['vName']}" + + # 计算 MD5 签名 + sign = hashlib.md5(sign_str.encode('utf-8')).hexdigest() + + # 定义带有动态值的参数 + params = { + 'timestamp': current_timestamp, + 'token': token, + 'uid': uid, + 'type': task_type, + 'sign': sign.upper(), + **params_base + } + + try: + # 发送 GET 请求 + response = requests.get(url, params=params, headers=headers) + response.raise_for_status() # 如果请求失败,则抛出异常 + + # 打印任务执行结果 + print(f"账号: {uid}, 任务: {task_name}, 响应: {response.text}") + except requests.exceptions.RequestException as e: + print(f"账号: {uid}, 任务: {task_name}, 请求失败: {e}") + + # 任务间隔5秒 + time.sleep(5) + + # 任务类型间隔10秒 + time.sleep(10) + diff --git a/exeedcars.js b/exeedcars.js new file mode 100644 index 0000000..8a4cd8d --- /dev/null +++ b/exeedcars.js @@ -0,0 +1,515 @@ +/** + * cron 27 16 * * * exeedcars.js + * @author https://github.com/smallfawn/QLScriptPublic + * Show: Hi星途 发帖5分 分享动态5分 回帖2分 签到2分 平均45天积分换一次 + * 变量名: exeedcarsLife + * 变量值: https://starway.exeedcars.com headers中的Authorization 去掉Bearer 去掉Bearer 去掉Bearer + * scriptVersionNow = "0.0.1"; + * export exeedcarsPost=true 无需引号 开启发帖 不填不写 默认不执行 + * export exeedcarsComment=true 开启评论 不填不写 默认不执行 + * 11/27 新增果园任务 和 签到 熟成之后获得200积分 + */ + +const $ = new Env("Hi星途"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "exeedcarsLife"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.titleList = [] + this.contentList = [] + this.commentList = [] + this.treeTaskList = [] + this.treeWaterNum = 0 + } + get_headers() { + return { + "Authorization": "Bearer " + this.ck, + "client_id": "app", + "client_secret": "app", + "Client-Agent": "device:Xiaomi MI 8 Lite;os:Android 10;version:V1.0.55", + "Content-Type": "application/json; charset=utf-8", + //"Content-Length": 619, + "Host": "starway.exeedcars.com", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip", + "User-Agent": "okhttp/4.8.1" + } + + } + async main() { + $.log(`===== 开始执行第[${this.index}]个账号 =====`) + await this.user_info(); + if (this.ckStatus) { + await this.user_point() + await this.signIn_status() + await this.art_list() + if (process.env["exeedcarsPost"] == "true" || process.env["exeedcarsComment"] == "true") { + console.log(`正在远程获取评论!请等待10s左右`); + await this._getText() + } + if (process.env["exeedcarsPost"] == "true") { + await this.submit_common("dync", { "hasVideo": "0", "appId": "star", "title": this.titleList[0], "content": this.contentList[0] }) + } + if (process.env["exeedcarsComment"] == "true") { + await this.submit_common("comment", { "appId": "star", "id": this.artList[0].id, "position": "0", "contentType": "1", "content": this.commentList[0] }) + } + await this.submit_common("share", { "appId": "star", "shareChannel": "1", "id": this.artList[0].id, "contentType": "1" }) + await this.tree_task_common(1) + await this.tree_task_list() + if (this.treeTaskList.length > 0) { + for (let task of this.treeTaskList) { + $.log(`[${task.growName}] - ${task.limit} / ${task.limitTimes}`) + } + for (let task of this.treeTaskList) { + if (task.limitTimes > task.limit) { + if (task.id == 3) { + let tasknum = Number(task.limitTimes) - Number(task.limit) + for (let i = 0; i < tasknum; i++) + await this.tree_task_common(task.id) + } else { + await this.tree_task_common(task.id) + } + + } + } + } + await this.tree_task_water_info() + if (this.treeWaterNum > 0) { + await this.tree_task_water() + } + + } + + } + async _getText() { + try { + let textList = [] + let options = { + fn: "获取随机一言", + method: "get", + url: `https://v1.hitokoto.cn/?c=e`, + } + for (let i = 0; i < 10; i++) { + await $.wait(1000) + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result["length"] > 10) { + textList.push(result.hitokoto) + } + this.titleList = [textList[0]] + this.contentList = [textList[1]] + this.commentList = [textList[2]] + } + } catch (e) { + console.log(e); + } + } + async signIn_status() { + try { + let options = { + fn: "签到状态", + method: "get", + url: `https://starway.exeedcars.com/api-social/ec/personal/query/attendanceStatus`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + if (result.data == true) { + $.log(`今天已签到🎉`) + } else { + $.log(`今天未签到🎉`) + //执行签到 + await this.task_signIn() + } + + + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + // + async task_signIn() { + try { + let options = { + fn: "签到", + method: "get", + url: `https://starway.exeedcars.com/api-social/ec/personal/attendance`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + $.log(`签到成功 获得[${result.data}]分`) + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async user_point() { + try { + let options = { + fn: "积分查询", + method: "get", + url: `https://starway.exeedcars.com/api-user/user/integral/get`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + $.log(`当前积分[${result.data.pointBalance}]分`) + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async tree_task_common(id) { + try { + let options = { + fn: "种树任务通用", + method: "post", + url: `https://starway.exeedcars.com/api-marking/tree/event/trigger/event`, + headers: this.get_headers(), + body: JSON.stringify({ "id": id }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + $.log(`完成任务 获得[${result.data}]💧`) + } else { + if (id == 1) { + + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + + } + } catch (e) { + console.log(e); + } + } + + async tree_task_list() { + try { + let options = { + fn: "种树任务列表", + method: "get", + url: `https://starway.exeedcars.com/api-marking/tree/event/get/effect`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + this.treeTaskList = result.data + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async tree_task_water() { + try { + let options = { + fn: "浇水", + method: "get", + url: `https://starway.exeedcars.com/api-marking/tree/user/water/get/water`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + $.log(`浇水成功`) + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async tree_task_water_info() { + try { + let options = { + fn: "浇水", + method: "get", + url: `https://starway.exeedcars.com/api-marking/tree/user/water/get`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + $.log(`剩余[${result.data.water}]💧`) + this.treeWaterNum = result.data.water + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async user_info() { + try { + let options = { + fn: "信息查询", + method: "get", + url: `https://starway.exeedcars.com/api-user/user/queryById`, + headers: this.get_headers(), + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + $.log(`✅[${result.data.nickName}][${result.data.phone}][${result.data.id}]🎉`) + this.ckStatus = true; + } else { + console.log(`❌[${options.fn}]失败`); + this.ckStatus = false; + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async art_list() { + try { + let nonceStr = this.get_uuid() + let time = new Date().getTime().toString() + let default_options = { "nonceStr": nonceStr, "timestamp": time } + let config_options = { "pageNumber": "1", "pageType": "3", "appId": "star", "pageSize": "10" } + Object.assign(config_options, default_options) + let content = this.creat_content(config_options) + let options = { + fn: "文章列表", + method: "post", + url: `https://starway.exeedcars.com/api-social/ec/social/anon/list`, + headers: this.get_headers(), + body: JSON.stringify({ "appId": "star", "nonceStr": nonceStr, "content": content, "timestamp": time }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + this.artList = result.data.list + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async submit_common(type, config_options) { + try { + let nonceStr = this.get_uuid() + let time = new Date().getTime().toString() + let default_options = { "nonceStr": nonceStr, "timestamp": time } + + Object.assign(config_options, default_options) + let content = this.creat_content(config_options) + let options = { + fn: "提交通用", + method: "post", + url: `https://starway.exeedcars.com/api-social/ec/social/${type}/submit`, + headers: this.get_headers(), + body: JSON.stringify({ "appId": "star", "nonceStr": nonceStr, "content": content, "timestamp": time }) + } + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "200") { + console.log(`[${type}]成功`); + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + creat_content(e) { + function jsencrtpt_result(t) { + let Ie = + "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbFRhFFvYlqIu1fp9Hau9MIIVQFTLXbbEWTays1lB1N50jcOnzzj6oDExyjM8050YgsrM3i8M4B1eCpjetjGqPx6BxvnmUr/FIv1/7DDbtMvADlVpYKc7v7kCftjdwbKDT4GPwl2I2WkjSJaU3LhFiYlmxW+9zA1moz3Tc6yp8OQIDAQAB\n-----END PUBLIC KEY-----" + global["window"] = {} + global["navigator"] = {} + const { JSEncrypt } = require("encryptlong") + const encryptor = new JSEncrypt() + encryptor.setPublicKey(Ie) + return encryptor.encryptLong(t) + + } + function jsrsasign_result(t) { + let Se = + "-----BEGIN PRIVATE KEY-----\nMIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMObKgSn8qZePjTNtRXd+aJywxLzMOM2AgNSXJ5oLMd7miSKCPaXz1sNKIPEYLNgiii04PJg3fNcpHFC5dZeX9iUvtsCUtFvdFsj/WgwsXuIWce2QjpX83TwjhN3essGbJIjAXzouLTTB3Tc8gL3Wd8J36vd3r3I28p8tj74+7ovAgMBAAECgYAA4emqzPEhJ7POneJFb25/xkNvAbXrpvtp8VwEpzVWfROr6gjrp3ZSVbJPT9qrTe9TfDQzU2YT2XZ9iM44ETmYEJ9moHSWLCpWFclJFY2Hy9HxaEw56Zu+iYWrZ9jtbiC2A/XOsOv/198slBpB8+7PCsinEUsKC1CP9YwOuwTLZQJBAPDpcRGBBMVOol/ADGuqCHBqtN3wX5PznKFGJIMi5tFQcghFlhixDsw/43spek1BMht+MhERUXrBvQHyCFE7LK0CQQDP21Tkp4NwOE6h1Q9hAgjOp6emuU7vbJmUU+dHiiNt6yVAYMV5tbdRacN4XS58Dt9K8WyYXQmMdYC8nVtcISHLAkBNi2aYssW9WNVNKr0UvrNetAop0iCBuA13n+NKzqYrQ9Cgtv1cT0mrFvl7AFvcmBqv3Mvy0HdAozHaeXSR6RE1AkByI6sWdLZEpWbojysGxis37/CsKQ4jg6tCPGDAdCbIcVvfYkSOdS7ZUg64xdKE5VXQvYo4kL5xlwS+jlpg2QDJAkEA3BNrYDBleAhrCuslvBB4LlFiyS0JpkqzfzNjYLvD0pd9wIR5JBvrWiYqiX4y4LfcdfF1IpMrKKeR48mpUGDAZg==\n-----END PRIVATE KEY-----" + const jsrsasign = require('jsrsasign') + var r = jsrsasign.KEYUTIL.getKey(Se), + n = new jsrsasign.KJUR.crypto.Signature({ alg: "SHA256withRSA" }); + return n.init(r), n.updateString(t), jsrsasign.hextob64(n.sign()); + } + function Ce(str) { + str = str.replaceAll("‘", ""); + str = str.replaceAll("’", ""); + str = str.replaceAll("“", ""); + str = str.replaceAll("”", ""); + var utf16String = ""; + for (var i = 0; i < str.length; i++) { + var char = str.charAt(i); + if (char.match(/[\u4E00-\u9FA5]/) || char.match(/[\u3000-\u303F]/) || char.match(/[\uFF01-\uFF5E]/)) { // 检测是否是中文字符或中文标点符号 + utf16String += "\\u" + char.charCodeAt(0).toString(16); // 转换为UTF-16编码 + } else { + utf16String += char; // 其他字符直接添加到结果中 + } + } + return utf16String; + + } + + let t = JSON.stringify(e); + t = Ce(t) + //console.log(t) + let r = jsrsasign_result(t) + let n = encodeURI(r) + let s = "body=".concat(t, "&sign=").concat(n) + let content = jsencrtpt_result(s) + //console.log(content); + return content + } + get_uuid() { + return 'xxxxxxxx-xxxx-xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } +} + +async function start() { + if (process.env["exeedcarsPost"] == "true") { + $.log(`您开启了发帖开关---`) + } else { + $.log(`您未开启发帖开关---`) + } + if (process.env["exeedcarsComment"] == "true") { + $.log(`您开启了评论开关---`) + } else { + $.log(`您未开启评论开关---`) + } + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); + $.msg($.name, "任务执行 over", "smallfawn 提醒您 天冷加衣") +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options) { + if (!options["method"]) { + return console.log(`请求方法不存在`); + } + if (!options["fn"]) { + console.log(`函数名不存在`); + } + return new Promise((resolve) => { + $[options.method](options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + try { + resp = JSON.parse(resp); + } catch (error) { } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(resp); + } + }); + }); +} +async function SendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/fenxiang.js b/fenxiang.js new file mode 100644 index 0000000..adc2b09 --- /dev/null +++ b/fenxiang.js @@ -0,0 +1,225 @@ +/** + * cron 31 11 * * * + * Show:自己改定时 防止默认定时 + * 变量名:fenxiang + * 变量值:https://api.fenxianglife.com 或https://fenxiang-lottery-api.fenxianglife.com 请求头Headers中的三个值 + * did#finger#token#oaid 多账号&或换行 或新建同名变量 四个值 + * 中间的分现金 每天开奖 + * 必填邀请码 J5KHD8 + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("粉象生活App"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "fenxiang"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; + + +class Task { + constructor(str) { + this.index = ++userIdx; + this.did = str.split(strSplitor)[0]; + this.finger = str.split(strSplitor)[1]; //单账号多变量分隔符 + this.token = str.split(strSplitor)[2]; //单账号多变量分隔符 + this.oaid = str.split(strSplitor)[3]; //单账号多变量分隔符 + this.ckStatus = true; + this.taskList=[] + + } + async main() { + await this.user_info(); + await this.sign_reward() + await this.special_finish() + await this.task_list() + //console.log(this.taskList) + for(let i of this.taskList){ + await $.wait(5000) + await this.task_finish(i.id) + } + } + + async user_info() { + let result = await this.taskRequest("get", `https://api.fenxianglife.com/njia/users/info`) + //console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 欢迎用户: ${result.data.userInfo.id}🎉`) + this.ckStatus = true; + } else { + $.log(`❌账号[${this.index}] 用户查询: 失败`); + this.ckStatus = false; + //console.log(result); + } + } + async task_finish(id) { + let result = await this.taskRequest("post", `https://fenxiang-lottery-api.fenxianglife.com/fenxiang-lottery/lotteryCode/task/finish`, JSON.stringify({ + "taskId": id + })) + console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 任务${id}完成🎉`) + } else { + $.log(`❌账号[${this.index}] 任务${id}失败`); + //console.log(result); + } + } + + async special_finish() { + let result = await this.taskRequest("post", `https://api.fenxianglife.com/njia/game/task/special/finish`, JSON.stringify({ + })) + console.log(result); + if (result.errcode == 0) { + $.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`) + this.ckStatus = true; + } else { + $.log(`❌账号[${this.index}] 用户查询: 失败`); + this.ckStatus = false; + //console.log(result); + } + } + + async sign_reward() { + let result = await this.taskRequest("post", `https://fenxiang-lottery-api.fenxianglife.com/fenxiang-lottery/user/sign/reward`, JSON.stringify({ + })) + //console.log(result); + if (result.code == 200) { + $.log(`✅账号[${this.index}] 签到成功🎉`) + } else { + $.log(`❌账号[${this.index}] 签到失败`); + console.log(result); + } + } + async task_list() { + let result = await this.taskRequest("post", 'https://fenxiang-lottery-api.fenxianglife.com/fenxiang-lottery/home/data/V2', JSON.stringify({ + "plateform": "android", + "version": "5.4.3" + })); + //console.log(result); + if (result.code == 200) { + for (let i of result.data.taskModule.taskResult) { + if (i.taskStatus == 0) { + this.taskList.push(i) + + } + } + + } else { + $.log(`❌账号[${this.index}] 获取任务失败`); + //console.log(result); + } + } + async taskRequest(method, url, body = "") { + let re = function (e) { + function convertObjectToQueryString(obj) { + let queryString = ""; + if (obj) { + const keys = Object.keys(obj).sort(); + keys.forEach(key => { + const value = obj[key]; + if (value !== null && typeof value !== 'object') { + queryString += `&${key}=${value}`; + } + }); + } + return queryString.slice(1); + } + return convertObjectToQueryString(e) + } + function v(e) { + const crypto = require("crypto") + return crypto.createHash("md5").update(e).digest("hex") + } + const g = { + traceid: v((new Date).getTime().toString() + Math.random().toString()), + noncestr: Math.random().toString().slice(2, 10), + timestamp: Date.now(), + platform: "h5", + did: this.did, + version: "1.0.0", + finger: this.finger, + token: this.token, + oaid: this.oaid, + } + const c = "\u7c89\u8c61\u597d\u725b\u903ca8c19d8267527ea4c7d2f011acf7766f" + let s = method === "get" ? void 0:JSON.parse(body) + let e = void 0 === s ? {} : s + g.sign = v(re(e) + re(g) + c) + let headers = { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36 AgentWeb/5.0.0 UCBrowser/11.6.4.950', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Encoding': 'gzip, deflate', + 'Content-Type': 'application/json', + 'origin': 'https://m.fenxianglife.com', + 'sec-fetch-dest': 'empty', + 'x-requested-with': 'com.n_add.android', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'cors', + 'referer': 'https://m.fenxianglife.com/h5-lottery/index.html?hideBack=1&sourceType=lottery_tab&token=030e7e9158af06dea2b3d0175a471ada&AppToken=96e06ae9f3cab6784de443015b8d9ad8&uid=515226607&v=5.4.3&did=njia992631e6-b9b2-4383-b67c-86b5d0fe818a&level=1&platform=android×tamp=1717426249&channel=xiaomi&traFromId=23192687628924991393323633117947', + 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + "Content-Type":"application/json" + } + Object.assign(headers, g) + //console.log(headers) + const reqeuestOptions = { + url: url, + method: method, + headers: headers, + body:body + } + let { body: result } = await $.httpRequest(reqeuestOptions) + return result + } +} + + + +!(async () => { + console.log(`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date( + new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 + ).toLocaleString()} \n==================================================`); + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(user.main()); + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log(`未找到CK【${ckName}】`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +//Env Api ============================= +/* + * @modifyAuthor @smallfawn + * @modifyTime 2024-05-01 + * @modifyInfo 抽离操作文件的函数 + */ +function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } initRequestEnv(t) { try { require.resolve("got") && ((this.requset = require("got")), (this.requestModule = "got")) } catch (e) { } try { require.resolve("axios") && ((this.requset = require("axios")), (this.requestModule = "axios")) } catch (e) { } this.cktough = this.cktough ? this.cktough : require("tough-cookie"); this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); if (t) { t.headers = t.headers ? t.headers : {}; if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { t.cookieJar = this.ckjar } } } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === "object" ? JSON.stringify(value) : value}`).join("&") } getURLParams(url) { const params = {}; const queryString = url.split("?")[1]; if (queryString) { const paramPairs = queryString.split("&"); paramPairs.forEach((pair) => { const [key, value] = pair.split("="); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === "object" } catch (e) { return false } } isJson(obj) { var isjson = typeof obj == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if (this.isNode()) { await notify.sendNotify(this.name, message) } else { this.msg(this.name, "", message) } } async httpRequest(options) { let t = { ...options }; t.headers = t.headers || {}; if (t.params) { t.url += "?" + this.queryStr(t.params) } t.method = t.method.toLowerCase(); if (t.method === "get") { delete t.headers["Content-Type"]; delete t.headers["Content-Length"]; delete t.headers["content-type"]; delete t.headers["content-length"]; delete t.body } else if (t.method === "post") { let ContentType; if (!t.body) { t.body = "" } else if (typeof t.body === "string") { ContentType = this.isJSONString(t.body) ? "application/json" : "application/x-www-form-urlencoded" } else if (this.isJson(t.body)) { t.body = JSON.stringify(t.body); ContentType = "application/json" } if (!t.headers["Content-Type"] && !t.headers["content-type"]) { t.headers["Content-Type"] = ContentType } } if (this.isNode()) { this.initRequestEnv(t); if (this.requestModule === "axios" && t.method === "post") { t.data = t.body; delete t.body } let httpResult; if (this.requestModule === "got") { httpResult = await this.requset(t); if (this.isJSONString(httpResult.body)) { httpResult.body = JSON.parse(httpResult.body) } } else if (this.requestModule === "axios") { httpResult = await this.requset(t); httpResult.body = httpResult.data } return httpResult } if (this.isQuanX()) { t.method = t.method.toUpperCase(); return new Promise((resolve, reject) => { $task.fetch(t).then((response) => { if (this.isJSONString(response.body)) { response.body = JSON.parse(response.body) } resolve(response) }) }) } } randomNumber(length) { const characters = "0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } randomString(length) { const characters = "abcdefghijklmnopqrstuvwxyz0123456789"; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join("") } timeStamp() { return new Date().getTime() } uuid() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) { var r = (Math.random() * 16) | 0, v = c == "x" ? r : (r & 0x3) | 0x8; return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ["", "==============📣系统通知📣=============="]; logs.push(t); e ? logs.push(e) : ""; i ? logs.push(i) : ""; console.log(logs.join("\n")); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) } +function Bucket() { return new (class { constructor(fileName) { this.fileName = fileName; this.ensureFileExists(); this.data = this.readFile() } ensureFileExists() { this.fs ? this.fs : (this.fs = require("fs")); this.path ? this.path : (this.path = require("path")); this.filePath = this.path.join(__dirname, this.fileName); if (!this.fs.existsSync(this.filePath)) { this.fs.writeFileSync(this.filePath, "{}") } } readFile() { try { const data = this.fs.readFileSync(this.filePath, "utf-8"); return JSON.parse(data) } catch (error) { console.error(`Error reading file:${error}`); return {} } } writeFile() { try { this.fs.writeFileSync(this.filePath, JSON.stringify(this.data, null, 2)) } catch (error) { } } set(key, value) { this.data[key] = value; this.writeFile() } get(key) { return this.data[key] } })() } diff --git a/fsdlb.js b/fsdlb.js new file mode 100644 index 0000000..9b845b7 --- /dev/null +++ b/fsdlb.js @@ -0,0 +1,188 @@ + +/** + * 逢三得利吧 + * Fsdlb + * Date: 2024-07-31 + * cron "58 59 1 * * *" fsdlb.js + * export fsdlb= Authorization 多账号&分开 去掉Bearer + + + */ +// ============================================================================================================ +const $ = new Env('逢三得利吧') +const axios = require('axios') +const env_name = 'fsdlb' //环境变量名字 +const env = process.env[env_name] || '' +const Notify = 1 +const debug = 0 +let scriptVersionNow = "1.0.0"; +let msg = ""; +// ==================================异步顺序============================================================================== + +//==================================脚本入口函数main()============================================================== + + +// ======================================开始任务========================================= +class AAA { + constructor(user) { + let timestamp = Date.now() + this.headers = { + "X-VERSION": "2.1.3", + "Authorization": `${user.Authorization}`, + "HH-VERSION": "0.2.8", + "HH-FROM": "20230130307725", + "HH-APP": "wxb33ed03c6c715482", + "HH-CI": "saas-wechat-app", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", + } + } + async userTask(user) { + console.log(`\n========= 账号[${user.index}]开始任务 =========`) + await this.sign(user) + await this.account(user) + + } + // ============================================================================================================================= + // + async sign(user) { + try { + DoubleLog(`🕊账号[${user.index}] 开始签到...`); + + //console.log(formattedDate); + let urlObject = { + method: 'post', + url: `https://xiaodian.miyatech.com/api/coupon/auth/signIn`, + headers: this.headers, + data: { + "miniappId": 159 + } + } + //console.log(urlObject); + let { data: result } = await axios.request(urlObject) + //console.log(result); + if (result?.code == 200) { + //打印签到结果 + DoubleLog(`🕊账号[${user.index}] 签到成功:[${result.data.integralToastText}]🎉`); + } else { + DoubleLog(`🕊账号[${user.index}] 签到失败:${result.msg}🚫`) + } + } catch (e) { + console.log(e); + } + } + + // + async account(user) { + try { + DoubleLog(`🕊账号[${user.index}] 开始查询...`); + let urlObject = { + method: 'get', + url: `https://xiaodian.miyatech.com/api/user/auth/member/integral/union/flow/list?pageNo=1&pageSize=10&dataType=SCORE`, + headers: this.headers, + + } + //console.log(urlObject); + let { data: result } = await axios.request(urlObject) + //console.log(result); + if (result?.code == 200) { + //打印签到结果 + DoubleLog(`🕊账号[${user.index}] 查询成功:总积分[${result.data.totalScore}]🎉`); + + } else { + DoubleLog(`🕊账号[${user.index}] 查询失败:${result.msg}🚫`) + } + } catch (e) { + console.log(e); + } + } + +} +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}`) + return + } + let user_ck = env.split('&') + DoubleLog(`\n========= 共找到 ${user_ck.length} 个账号 =========`); + let index = 1 //用来给账号标记序号, 从1开始 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + let ck_info = ck.split('#') + let Authorization = 'Bearer ' + ck_info[0] + //let ticket = ck_info[1] + //let deviceCode = ck_info[2] + let user = { + index: index, + Authorization, + //ticket, + //deviceCode, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + let Run = new AAA(user); + await Run.userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +!(async () => { + await main(); + await SendMsg(msg); + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ + +// ==========================================================13位时间戳===================================================== + +//===============================================网络请求httpRequest========================================= + +//==============================================Debug模式=============================================== + +//===============================================获取远程通知======================================== + +//==============================================获取远程版本================================================= + + +//=============================================================================================================================================== +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/ftej.js b/ftej.js new file mode 100644 index 0000000..c699431 --- /dev/null +++ b/ftej.js @@ -0,0 +1,976 @@ + +/* +福田e家 +ftej '账号#密码' +偶尔会报错 多定时两次就好了 +*/ + +const $ = new Env("福田e家"); +//let envSplitor = ['\n','@','#'] +const fs = require('fs') +let httpResult, httpReq, httpResp +const ckFile1 = 'ftej.txt' +const ckName = 'ftej' +let userCookie = [] +try { + userCookie = userCookie.concat(fs.readFileSync(`./${ckFile1}`,'utf-8').split('\n')||[]) + console.log(`ck文件[ ${ckFile1} ]加载成功`) + this.mxr = true +} catch (e) { + console.log(`未发现本地文件 调用青龙环境变量`) + this.mxr = false +} +let mxr=this.mxr +if (this.mxr == false){ + try { + userCookie = userCookie.concat((($.isNode() ? process.env[ckName] : $.getdata(ckName))||'')?.split('\n')||[]) + console.log(`环境变量[ ${ckName} ]加载成功`) + } catch (e) { + //console.log(e) + } +} + +let userList = [] +let userIdx = 0 +let userCount = 0 +let time = Math.round( Date.now()) + +/////////////////////////////////////////////////////////////////// +class UserInfo { + constructor(str) { + this.index = ++userIdx + + this.valid = false + + try { + this.ck = str.split('#') + this.user = phoneNum(`${this.ck[0]}`) + this.ckValid = true + } catch (e) { + + } + } + + + async cashck() { + try { + let url = `https://czyl.foton.com.cn/ehomes-new/homeManager/getLoginMember`; + let body =`{"password":"${this.ck[1]}","version_name":"","version_auth":"","device_id":"","device_model":"","ip":"","name":"${this.ck[0]}","version_code":"180","deviceSystemVersion":"","device_type":"0"}`; +//console.log(body) + let h = { + "Host": "czyl.foton.com.cn", + "Content-Type": "application/json;charset\u003dutf-8", + } + let urlObject = popu(url, h, body) + await httpRequest('post', urlObject) + let result = httpResult; + // console.log(result) + if (result.code == 200) { + console.log(`账号 ${this.user} 登录成功 `) + this.token = result.data.token + this.memberComplexCode = result.data.memberComplexCode + this.uid = result.data.uid + this.memberID = result.data.memberID + if(result.data.signIn== "未签到"){ + await this.sign() + } + // await $.wait(3000); + await this.getTaskList()//每日关注 + // await $.wait(3000); + await this.grxx() + }else{ + console.log(`账号 ${this.user} 登录失败 `) + } + } catch (e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + //任务列表 + async getTaskList() { + let tim = Math.round( Date.now()) + try { + let url = `https://czyl.foton.com.cn/ehomes-new/homeManager/api/Member/getTaskList`; + let body = `{"memberId":"${this.memberID}","userId":"${this.uid}","userType":"61","uid":"${this.uid}","mobile":"${this.ck[0]}","tel":"${this.ck[0]}","brandName":"","seriesName":"","token":"ebf76685e48d4e14a9de6fccc76483e3","safeEnc":${tim-20220000},"businessId":1}`; + + + let h = { + "user-agent": "web", + "Content-Type": "application/json; charset\u003dutf-8", + "token": "", + "host": "czyl.foton.com.cn" + } + //console.log(body) + let urlObject = popu(url, h, body) + await httpRequest('post', urlObject) + let result = httpResult; + // console.log(result) + if (result.code == 200) { + if (result.data[4].completeNum == 0) { + await this.sign()//签到 + }else if (result.data[4].completeNum ==1 ){ + console.log(`账号 ${this.user} ${result.data[4].ruleName} 已完成 `) + } + if (result.data[5].completeNum == 0) { + await this.fx()//分享 + }else if (result.data[5].completeNum ==1 ){ + console.log(`账号 ${this.user} ${result.data[6].ruleName} 已完成 `) + } + if (result.data[6].completeNum == 0) { + await this.topicList()//发帖 + }else if (result.data[6].completeNum ==1 ){ + console.log(`账号 ${this.user} ${result.data[6].ruleName} 已完成 `) + } + if (result.data[8].completeNum == 0) { + await this.follow2nd()//关注 + }else if (result.data[8].completeNum ==1 ){ + console.log(`账号 ${this.user} ${result.data[8].ruleName} 已完成 `) + } + if (result.data[7].completeNum == 0) { + await this.comment2nd()//评论 + }else if (result.data[7].completeNum ==1 ){ + console.log(`账号 ${this.user} ${result.data[7].ruleName} 已完成 `) + } + } + } catch (e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + async sign() { + let time1 = Math.round( Date.now()) + try { + let url = `https://czyl.foton.com.cn/ehomes-new/homeManager/api/bonus/signActivity2nd`; + let body = `{"memberId":"${this.memberComplexCode}","userId":"${this.uid}","userType":"61","uid":"${this.uid}","mobile":"${this.ck[0]}","tel":"${this.ck[0]}","brandName":"","seriesName":"","token":"ebf76685e48d4e14a9de6fccc76483e3","safeEnc":${time1-20220000},"businessId":1}`; + let h = { + "Host": "czyl.foton.com.cn", + "Content-Type": "application/json;charset\u003dutf-8", + "token": ``, + } + //console.log(body) + let urlObject = popu(url, h, body) + await httpRequest('post', urlObject) + let result = httpResult; + //console.log(result) + if (result.code == 200) { + console.log(`账号 ${this.user} 签到成功获得积分 ${result.data.data.integral} `) + } else if (result.code == 500) { + console.log(`账号 ${this.user} 今日已经签到`) + } + } catch (e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + + //关注列表 + async postList() { + let time2 = Math.round( Date.now()) + try { + let url = `https://czyl.foton.com.cn/ehomes-new/ehomesCommunity/api/post/nowPostList`; + let body = ` {"memberId":"${this.memberID}","userId":"${this.uid}","userType":"61","uid":"${this.uid}","mobile":"${this.ck[0]}","tel":"${this.ck[0]}","brandName":"","seriesName":"","token":"ebf76685e48d4e14a9de6fccc76483e3","safeEnc":${time2-20220000},"businessId":1,"pageNumber":1,"pageSize":30,"follow":"1"}`; + let h = { + "user-agent": "web", + "Content-Type": "application/json; charset\u003dutf-8", + "token": "", + "host": "czyl.foton.com.cn" + } + //console.log(body) + let urlObject = popu(url, h, body) + await httpRequest('post', urlObject) + let result = httpResult; + // console.log(result) + if (result.code == 200) { + for (let i=1;i { + if (typeof $request !== "undefined") { + await GetRewrite() + } else { + + if (!(await checkEnv())) return; + + + + if (userList.length > 0) { + console.log('\n------- 福田e家-------\n') + taskall = [] + for (let user of userList) { + taskall.push(user.cashck()) + } + await Promise.all(taskall) + console.log('\n------- 卡车生活-------\n') + taskall = [] + for (let user of userList) { + taskall.push(user.kclogin()) + } + await Promise.all(taskall) + } + + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()) + +/////////////////////////////////////////////////////////////////// +async function GetRewrite() { + +} + + +function checkEnv() { + if(userCookie) { + for(let userCookies of userCookie) { + if(userCookies) userList.push(new UserInfo(userCookies)) + } + userCount = userList.length + } else { + console.log(`未找到CK`) + return false; + } + + console.log(`\n共找到${userCount}个账号`) + return true +} + + + +//////////////////////////////////////////////////////////////////// +function popu(url, h, body = '') { + let host = url.replace('//', '/').split('/')[1] + let urlObject = { + url: url, + headers: h, + timeout: 5000, + } + if (body) { + urlObject.body = body + } + + return urlObject; +} + + +async function httpRequest(method, url) { + httpResult = null, httpReq = null, httpResp = null; + return new Promise((resolve) => { + $.send(method, url, async (err, req, resp) => { + try { + httpReq = req; + httpResp = resp; + if (err) { + } else { + if (resp.body) { + if (typeof resp.body == "object") { + httpResult = resp.body; + } else { + try { + httpResult = JSON.parse(resp.body); + } catch (e) { + httpResult = resp.body; + } + } + } + } + } catch (e) { + console.log(e); + } finally { + resolve(); + } + }); + }); +} +//////////////////////////////////////////////////////////////////// +function randomArr(arr) { + return arr[parseInt(Math.random() * arr.length, 10)]; +} +function phoneNum(phone_num) { + if (phone_num.length == 11) { + let data = phone_num.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2"); + return data; + } else { + return phone_num; + } +} +//MD5加密 +function MD5_Encrypt(a) { + function b(a, b) { + return a << b | a >>> 32 - b + } + + function c(a, b) { + var c, d, e, f, g; + return e = 2147483648 & a, + f = 2147483648 & b, + c = 1073741824 & a, + d = 1073741824 & b, + g = (1073741823 & a) + (1073741823 & b), + c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : + g ^ e ^ f + } + + function d(a, b, c) { + return a & b | ~a & c + } + + function e(a, b, c) { + return a & c | b & ~c + } + + function f(a, b, c) { + return a ^ b ^ c + } + + function g(a, b, c) { + return b ^ (a | ~c) + } + + function h(a, e, f, g, h, i, j) { + return a = c(a, c(c(d(e, f, g), h), j)), + c(b(a, i), e) + } + + function i(a, d, f, g, h, i, j) { + return a = c(a, c(c(e(d, f, g), h), j)), + c(b(a, i), d) + } + + function j(a, d, e, g, h, i, j) { + return a = c(a, c(c(f(d, e, g), h), j)), + c(b(a, i), d) + } + + function k(a, d, e, f, h, i, j) { + return a = c(a, c(c(g(d, e, f), h), j)), + c(b(a, i), d) + } + + function l(a) { + for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = + 0; c > i;) + b = (i - i % 4) / 4, + h = i % 4 * 8, + g[b] = g[b] | a.charCodeAt(i) << h, + i++; + return b = (i - i % 4) / 4, + h = i % 4 * 8, + g[b] = g[b] | 128 << h, + g[f - 2] = c << 3, + g[f - 1] = c >>> 29, + g + } + + function m(a) { + var b, c, d = "", + e = ""; + for (c = 0; 3 >= c; c++) + b = a >>> 8 * c & 255, + e = "0" + b.toString(16), + d += e.substr(e.length - 2, 2); + return d + } + + function n(a) { + a = a.replace(/\r\n/g, "\n"); + for (var b = "", c = 0; c < a.length; c++) { + var d = a.charCodeAt(c); + 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), + b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), + b += String.fromCharCode(d >> 6 & 63 | 128), + b += String.fromCharCode(63 & d | 128)) + } + return b + } + + var o, p, q, r, s, t, u, v, w, x = [], + y = 7, + z = 12, + A = 17, + B = 22, + C = 5, + D = 9, + E = 14, + F = 20, + G = 4, + H = 11, + I = 16, + J = 23, + K = 6, + L = 10, + M = 15, + N = 21; + for (a = n(a), + x = l(a), + t = 1732584193, + u = 4023233417, + v = 2562383102, + w = 271733878, + o = 0; o < x.length; o += 16) + p = t, + q = u, + r = v, + s = w, + t = h(t, u, v, w, x[o + 0], y, 3614090360), + w = h(w, t, u, v, x[o + 1], z, 3905402710), + v = h(v, w, t, u, x[o + 2], A, 606105819), + u = h(u, v, w, t, x[o + 3], B, 3250441966), + t = h(t, u, v, w, x[o + 4], y, 4118548399), + w = h(w, t, u, v, x[o + 5], z, 1200080426), + v = h(v, w, t, u, x[o + 6], A, 2821735955), + u = h(u, v, w, t, x[o + 7], B, 4249261313), + t = h(t, u, v, w, x[o + 8], y, 1770035416), + w = h(w, t, u, v, x[o + 9], z, 2336552879), + v = h(v, w, t, u, x[o + 10], A, 4294925233), + u = h(u, v, w, t, x[o + 11], B, 2304563134), + t = h(t, u, v, w, x[o + 12], y, 1804603682), + w = h(w, t, u, v, x[o + 13], z, 4254626195), + v = h(v, w, t, u, x[o + 14], A, 2792965006), + u = h(u, v, w, t, x[o + 15], B, 1236535329), + t = i(t, u, v, w, x[o + 1], C, 4129170786), + w = i(w, t, u, v, x[o + 6], D, 3225465664), + v = i(v, w, t, u, x[o + 11], E, 643717713), + u = i(u, v, w, t, x[o + 0], F, 3921069994), + t = i(t, u, v, w, x[o + 5], C, 3593408605), + w = i(w, t, u, v, x[o + 10], D, 38016083), + v = i(v, w, t, u, x[o + 15], E, 3634488961), + u = i(u, v, w, t, x[o + 4], F, 3889429448), + t = i(t, u, v, w, x[o + 9], C, 568446438), + w = i(w, t, u, v, x[o + 14], D, 3275163606), + v = i(v, w, t, u, x[o + 3], E, 4107603335), + u = i(u, v, w, t, x[o + 8], F, 1163531501), + t = i(t, u, v, w, x[o + 13], C, 2850285829), + w = i(w, t, u, v, x[o + 2], D, 4243563512), + v = i(v, w, t, u, x[o + 7], E, 1735328473), + u = i(u, v, w, t, x[o + 12], F, 2368359562), + t = j(t, u, v, w, x[o + 5], G, 4294588738), + w = j(w, t, u, v, x[o + 8], H, 2272392833), + v = j(v, w, t, u, x[o + 11], I, 1839030562), + u = j(u, v, w, t, x[o + 14], J, 4259657740), + t = j(t, u, v, w, x[o + 1], G, 2763975236), + w = j(w, t, u, v, x[o + 4], H, 1272893353), + v = j(v, w, t, u, x[o + 7], I, 4139469664), + u = j(u, v, w, t, x[o + 10], J, 3200236656), + t = j(t, u, v, w, x[o + 13], G, 681279174), + w = j(w, t, u, v, x[o + 0], H, 3936430074), + v = j(v, w, t, u, x[o + 3], I, 3572445317), + u = j(u, v, w, t, x[o + 6], J, 76029189), + t = j(t, u, v, w, x[o + 9], G, 3654602809), + w = j(w, t, u, v, x[o + 12], H, 3873151461), + v = j(v, w, t, u, x[o + 15], I, 530742520), + u = j(u, v, w, t, x[o + 2], J, 3299628645), + t = k(t, u, v, w, x[o + 0], K, 4096336452), + w = k(w, t, u, v, x[o + 7], L, 1126891415), + v = k(v, w, t, u, x[o + 14], M, 2878612391), + u = k(u, v, w, t, x[o + 5], N, 4237533241), + t = k(t, u, v, w, x[o + 12], K, 1700485571), + w = k(w, t, u, v, x[o + 3], L, 2399980690), + v = k(v, w, t, u, x[o + 10], M, 4293915773), + u = k(u, v, w, t, x[o + 1], N, 2240044497), + t = k(t, u, v, w, x[o + 8], K, 1873313359), + w = k(w, t, u, v, x[o + 15], L, 4264355552), + v = k(v, w, t, u, x[o + 6], M, 2734768916), + u = k(u, v, w, t, x[o + 13], N, 1309151649), + t = k(t, u, v, w, x[o + 4], K, 4149444226), + w = k(w, t, u, v, x[o + 11], L, 3174756917), + v = k(v, w, t, u, x[o + 2], M, 718787259), + u = k(u, v, w, t, x[o + 9], N, 3951481745), + t = c(t, p), + u = c(u, q), + v = c(v, r), + w = c(w, s); + var O = m(t) + m(u) + m(v) + m(w); + return O.toLowerCase() +} +function Env(a, b) { + return "undefined" != typeof process && JSON.stringify(process.env).indexOf("xxx") > -1 && process.exit(0), new class { + constructor(a, b) { + this.name = a, this.notifyStr = "", this.startTime = (new Date).getTime(), Object.assign(this, b), console.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 } getdata(b) { let a = this.getval(b); if (/^@/.test(b)) { let [, c, f] = /^@(.*?)\.(.*?)$/.exec(b), d = c ? this.getval(c) : ""; if (d) try { let e = JSON.parse(d); a = e ? this.lodash_get(e, f, "") : a } catch (g) { a = "" } } return a } setdata(c, d) { let a = !1; if (/^@/.test(d)) { let [, b, e] = /^@(.*?)\.(.*?)$/.exec(d), f = this.getval(b), i = b ? "null" === f ? null : f || "{}" : "{}"; try { let g = JSON.parse(i); this.lodash_set(g, e, c), a = this.setval(JSON.stringify(g), b) } catch (j) { let h = {}; this.lodash_set(h, e, c), a = this.setval(JSON.stringify(h), b) } } else a = this.setval(c, d); return a } getval(a) { return this.isSurge() || this.isLoon() ? $persistentStore.read(a) : this.isQuanX() ? $prefs.valueForKey(a) : this.isNode() ? (this.data = this.loaddata(), this.data[a]) : this.data && this.data[a] || null } setval(b, a) { return this.isSurge() || this.isLoon() ? $persistentStore.write(b, a) : this.isQuanX() ? $prefs.setValueForKey(b, a) : this.isNode() ? (this.data = this.loaddata(), this.data[a] = b, this.writedata(), !0) : this.data && this.data[a] || null } send(b, a, f = () => { }) { if ("get" != b && "post" != b && "put" != b && "delete" != b) { console.log(`无效的http方法:${b}`); return } if ("get" == b && a.headers ? (delete a.headers["Content-Type"], delete a.headers["Content-Length"]) : a.body && a.headers && (a.headers["Content-Type"] || (a.headers["Content-Type"] = "application/x-www-form-urlencoded")), this.isSurge() || this.isLoon()) { this.isSurge() && this.isNeedRewrite && (a.headers = a.headers || {}, Object.assign(a.headers, { "X-Surge-Skip-Scripting": !1 })); let c = { method: b, url: a.url, headers: a.headers, timeout: a.timeout, data: a.body }; "get" == b && delete c.data, $axios(c).then(a => { let { status: b, request: c, headers: d, data: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }).catch(a => console.log(a)) } else if (this.isQuanX()) a.method = b.toUpperCase(), this.isNeedRewrite && (a.opts = a.opts || {}, Object.assign(a.opts, { hints: !1 })), $task.fetch(a).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, a => f(a)); else if (this.isNode()) { this.got = this.got ? this.got : require("got"); let { url: d, ...e } = a; this.instance = this.got.extend({ followRedirect: !1 }), this.instance[b](d, e).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, b => { let { message: c, response: a } = b; f(c, a, a && a.body) }) } } time(a) { let b = { "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() }; for (let c in /(y+)/.test(a) && (a = a.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))), b) new RegExp("(" + c + ")").test(a) && (a = a.replace(RegExp.$1, 1 == RegExp.$1.length ? b[c] : ("00" + b[c]).substr(("" + b[c]).length))); return a } async showmsg() { if (!this.notifyStr) return; let a = this.name + " \u8FD0\u884C\u901A\u77E5\n\n" + this.notifyStr; if ($.isNode()) { var b = require("./sendNotify"); console.log("\n============== \u63A8\u9001 =============="), await b.sendNotify(this.name, a) } else this.msg(a) } logAndNotify(a) { console.log(a), this.notifyStr += a, this.notifyStr += "\n" } msg(d = t, a = "", b = "", e) { let f = a => { if (!a) return a; if ("string" == typeof a) return this.isLoon() ? a : this.isQuanX() ? { "open-url": a } : this.isSurge() ? { url: a } : void 0; if ("object" == typeof a) { if (this.isLoon()) { let b = a.openUrl || a.url || a["open-url"], c = a.mediaUrl || a["media-url"]; return { openUrl: b, mediaUrl: c } } if (this.isQuanX()) { let d = a["open-url"] || a.url || a.openUrl, e = a["media-url"] || a.mediaUrl; return { "open-url": d, "media-url": e } } if (this.isSurge()) return { url: a.url || a.openUrl || a["open-url"] } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(d, a, b, f(e)) : this.isQuanX() && $notify(d, a, b, f(e))); let c = ["", "============== \u7CFB\u7EDF\u901A\u77E5 =============="]; c.push(d), a && c.push(a), b && c.push(b), console.log(c.join("\n")) } getMin(a, b) { return a < b ? a : b } getMax(a, b) { return a < b ? b : a } padStr(e, b, f = "0") { let a = String(e), g = b > a.length ? b - a.length : 0, c = ""; for (let d = 0; d < g; d++)c += f; return c + a } json2str(b, e, f = !1) { let c = []; for (let d of Object.keys(b).sort()) { let a = b[d]; a && f && (a = encodeURIComponent(a)), c.push(d + "=" + a) } return c.join(e) } str2json(e, f = !1) { let d = {}; for (let a of e.split("#")) { if (!a) continue; let b = a.indexOf("="); if (-1 == b) continue; let g = a.substr(0, b), c = a.substr(b + 1); f && (c = decodeURIComponent(c)), d[g] = c } return d } randomString(d, a = "abcdef0123456789") { let b = ""; for (let c = 0; c < d; c++)b += a.charAt(Math.floor(Math.random() * a.length)); return b } randomList(a) { let b = Math.floor(Math.random() * a.length); return a[b] } wait(a) { return new Promise(b => setTimeout(b, a)) } done(a = {}) { + let b = (new Date).getTime(), c = (b - this.startTime) / 1e3; console.log(` +${this.name} 运行结束,共运行了 ${c} 秒!`), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(a) + } + }(a, b) +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "https://tfapi.cn/tl.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} diff --git a/gjzp.js b/gjzp.js new file mode 100644 index 0000000..1ce40d4 --- /dev/null +++ b/gjzp.js @@ -0,0 +1,424 @@ +/** + * 工匠职聘 + * cron 52 8 * * * gjzp.js + * + * 22/12/10 每日签到 赚工分 + * 22/12/11 每日红包奖励 判定CK是否有效 + * 23/01/23 删除抽奖,修复BUG + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export gjzp_data='authorization&android' + * + * 多账号用 @ 分割 + * 抓包 api-recruitment.yzw.cn , 找到 headers中 authorization 即可 + * 如果你是ios端请在authorization后加上ios如果是android请输入android 必须小写 + * 首次使用请 去本APP => 我的 => 横幅 > 工分夺宝处首抽一次(绑定你的微信小程序) 否则不绑定抽不了奖 + * 如果是先注册小程序后再去APP,就无需绑定了 直接抓CK即可 + * ==================================== + * + */ + + + +const $ = new Env("工匠职聘"); +const ckName = "gjzp_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let debug = 1; //Debug调试 0关闭 1开启 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + console.log('\n================== 用户查询 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.user_info(1)); + await $.wait(3000); //延迟 + } + await Promise.all(taskall); + console.log('\n================== 红包签到 ==================\n'); + taskall = []; + for (let user of userList) { + await user.task_sign('红包签到') + await $.wait(3000); //延迟 + } + await Promise.all(taskall); + console.log('\n================== 日常任务 ==================\n'); + taskall = []; + for (let user of userList) { + await user.task_see(); + await $.wait(3000); //延迟 + } + await Promise.all(taskall); + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.cktest = str.split('&')[0]; //单账号多变量分隔符 + //this.deviceid = str.split('&')[1]; //单账号多变量分隔符 + this.ck = "Bearer " + this.cktest.replace('Bearer', '') + this.PhoneType = str.split('&')[1]; + //let ck = str.split('&') + //this.data1 = ck[0] + //this.host = "echo.apipost.cn"; + //this.hostname = "https://" + this.host; + } + + async user_info(type) { // userinfo + try { + let options = { + method: 'POST', + url: 'https://api-recruitment.yzw.cn/v2/labor/app/user/getUserBaseInfo', + headers: { + Host: 'api-recruitment.yzw.cn', + accept: 'application/json, text/plain, */*', + version: '2.14.0', + authorization: this.ck, + appsourcetype: '1', + //'x-device-id': this.deviceid, + //'x-flow-num': 'f4a3d43f-50c8-4d50-9287-834894e86339', + //'x-device': 'zhipin/android/29/2.14.0/392.72727272727275/829.0909090909091/2.75', + 'content-type': 'application/json', + //'content-length': '11', + //'accept-encoding': 'gzip', + //cookie: 'acw_tc=2f624a4016706498913978918e4b42d68638eccb6145bcc0a89b50a20dab88', + //'user-agent': 'okhttp/4.9.2' + }, + body: {}, + json: true + }; + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (type == 1) { + if (result.code == 20000) { + DoubleLog(`账号[${this.index}] 账号: [${result.data.userId}] 昵称[${result.data.name}] 工分余额[${result.data.totalScore}]`); + //let userId = result.data.userId + //return userId + } else if (result.code == 40005) { + DoubleLog(`账号[${this.index}] 用户信息查询:失败 ❌ 了呢,原因${result.message}`);//没次数 + console.log(result); + } else { + DoubleLog(`账号[${this.index}] 用户信息查询:失败 ❌ 了呢,原因未知`); + console.log(result); + } + } else if (type == 0) { + if (result.code == 20000) { + let userId = result.data.userId + return userId + } else if (result.code == 40005) { + console.log(result); + } else { + } + } + } catch (error) { + console.log(error); + } + } + async task2() { // task2 红包任务列表 + try { + let options = { + method: 'GET', + url: 'https://api-recruitment.yzw.cn/v2/labor/app/sign/tasks', + headers: { + Host: 'api-recruitment.yzw.cn', + accept: 'application/json, text/plain, */*', + version: '2.14.0', + authorization: this.ck, + appsourcetype: '1', + //'x-device-id': this.deviceid, + //'x-flow-num': 'f4a3d43f-50c8-4d50-9287-834894e86339', + //'x-device': 'zhipin/android/29/2.14.0/392.72727272727275/829.0909090909091/2.75', + //'accept-encoding': 'gzip', + //cookie: 'acw_tc=2f624a4016706498913978918e4b42d68638eccb6145bcc0a89b50a20dab88', + //'user-agent': 'okhttp/4.9.2' + } + }; + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 20000) { + //DoubleLog(`账号[${this.index}] 账号: [${result.data.userId}] 昵称[${result.data.name}] 工分余额[${result.data.totalScore}]`); + } else if (result.code == 40005) { + //DoubleLog(`账号[${this.index}] 用户信息查询:失败 ❌ 了呢,原因${result.message}`);//没次数 + //console.log(result); + } else { + //DoubleLog(`账号[${this.index}] 用户信息查询:失败 ❌ 了呢,原因未知`); + //console.log(result); + } + return result + } catch (error) { + console.log(error); + } + } + + async task_sign() { // 红包签到 + //console.log(this.cktest.replace('Bearer', '')) + try { + let options = { + method: 'GET', + url: 'https://api-recruitment.yzw.cn/v2/labor/app/sign/sign', + headers: { + Host: 'api-recruitment.yzw.cn', + accept: 'application/json, text/plain, */*', + version: '2.14.0', + authorization: this.ck, + appsourcetype: '1', + //'x-device-id': this.deviceid, + //'x-flow-num': '71abe6e4-2a7f-4c5a-89db-81a002139135', + //'x-device': 'zhipin/android/29/2.14.0/392.72727272727275/829.0909090909091/2.75', + //cookie: 'acw_tc=2f624a2e16706248652012563e316a3fc1bfc16d803e478a49dfb0ce7727bd', + //'user-agent': 'okhttp/4.9.2', + //'if-modified-since': 'Fri, 09 Dec 2022 05:21:36 GMT' + } + }; + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 20000) { + DoubleLog(`账号[${this.index}] 签到成功获得: ${result.message}`); + } else if (result.code == 40005) { + DoubleLog(`账号[${this.index}] 签到:失败 ❌ 了呢,原因${result.message}!`); + } else { + console.log(result) + } + } catch (error) { + console.log(error); + } + } + + async task_see() { + let t2 = await this.task2() + if (t2.code == 20000) { + for (let o in t2.data) { + let id = await this.user_info(0) + if (t2.data[o].id == "13" && t2.data[o].status == 0) { + await this.task_see3() + await $.wait(10000) + } else if (t2.data[o].id == "13" && t2.data[o].status == 1) { + console.log(`账号[${this.index}]任务红包浏览首页完成`); + } + if (t2.data[o].id == "18" && t2.data[o].status == 0) { + //console.log(t2.data[o]); + for (let i = 0; i < 2; i++) { + await this.task_see4(id) + await $.wait(10000) + } + } else if (t2.data[o].id == "18" && t2.data[o].status == 1) { + //await this.task_see4("红包分享职位",id) + console.log(`账号[${this.index}]任务红包分享职位完成`); + } + } + } + } + + async task_see3() { //红包任务 浏览首页 + try { + let options = { + method: 'POST', + url: 'https://api-recruitment.yzw.cn/v2/labor/app/browseCollectRecord/add', + headers: { + Host: 'api-recruitment.yzw.cn', + accept: 'application/json, text/plain, */*', + version: '2.14.0', + authorization: this.ck, + appsourcetype: '1', + //'x-device-id': 'd310c38476e58308d310c38476e58308d310c38476e58308d310c38476e58308', + //'x-flow-num': 'd019070d-f032-4ffc-9737-188c477cb2ee', + //'x-device': 'zhipin/android/29/2.14.0/392.72727272727275/829.0909090909091/2.75', + 'content-type': 'application/json', + 'user-agent': 'okhttp/4.9.2' + }, + body: { type: 1, recordType: 7 }, + json: true + }; + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 20000) { + DoubleLog(`账号[${this.index}] 红包任务浏览首页成功${result.data}`); + console.log('本次可能获得0.05'); + } else if (result.code == 40005) { + DoubleLog(`账号[${this.index}] 红包任务浏览首页:失败 ❌ 了呢,原因${result.message}`); + //console.log(result); + } else { + DoubleLog(`账号[${this.index}] 红包任务浏览首页:失败 ❌ 了呢,原因未知`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_see4(userId) { // 红包任务 分享职业卡片 + try { + let options = { + method: 'POST', + url: 'https://api-recruitment.yzw.cn/v2/labor/app/userShareRecord/add', + headers: { + Host: 'api-recruitment.yzw.cn', + accept: 'application/json, text/plain, */*', + version: '2.14.0', + authorization: this.ck, + appsourcetype: '1', + 'content-type': 'application/json' + }, + body: { shareTarget: 0, userId: userId, shareType: 1, shareOtherId: 44207 }, + json: true + }; + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 20000) { + DoubleLog(`账号[${this.index}] 红包任务 分享职位 成功${result.data}`); + console.log('本次可能获得0.02'); + } else if (result.code == 40005) { + DoubleLog(`账号[${this.index}] 红包任务 分享职位:失败 ❌ 了呢,原因${result.message}`); + //console.log(result); + } else { + DoubleLog(`账号[${this.index}] 红包任务 分享职位:失败 ❌ 了呢,原因未知`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +function changeCode(oldoptions) { + let newoptions = new Object(), + urlTypeArr = ['qs', 'params'], + bodyTypeArr = ['body', 'data', 'form', 'formData'] + for (let e in urlTypeArr) { + urlTypeArr[e] in oldoptions ? newoptions.url = changeUrl(urlTypeArr[e]) : newoptions.url = oldoptions.url + } + 'content-type' in oldoptions.headers ? newoptions.headers = changeHeaders(oldoptions.headers) : newoptions.headers = oldoptions.headers + function changeUrl(type) { + url = oldoptions.url + '?' + for (let key in oldoptions[type]) { url += key + '=' + oldoptions[type][key] + '&' } + url = url.substring(0, url.length - 1) + return url + } + function changeHeaders(headers) { + let tmp = headers['content-type'] + delete headers['content-type'] + headers['Content-Type'] = tmp + return headers + } + for (let o in bodyTypeArr) { + if (bodyTypeArr[o] in oldoptions) { + (Object.prototype.toString.call(oldoptions[bodyTypeArr[o]]) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions[bodyTypeArr[o]]) : newoptions.body = oldoptions[bodyTypeArr[o]] + } + } + return newoptions +} +function httpRequest(options, method) { + //options = changeCode(options) + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + //console.log(JSON.parse(err)); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + data = JSON.parse(data); + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +// 完整 Env +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) } diff --git a/gqftbz.js b/gqftbz.js new file mode 100644 index 0000000..855cc7e --- /dev/null +++ b/gqftbz.js @@ -0,0 +1,876 @@ +/** + * 广汽丰田bz APP + * scriptVersionNow = "0.0.7" + * cron 17 18 * * * gqft.js + * 23/01/23 积分任务: + * 23/06/07 修复加密 + * 23/06/14 修复CK时效短 and CK失效快 的问题 + * 23/06/15 修复各种问题 适配IOS 修复青龙版本变量自动转换问题 + * 23/08/29 修改变量为请求头的Authorization + * 24/03/25 COOKIES格式改 适应一天过期一次的API CK + * ===== 青龙--配置文件 ===== + * # 项目名称 脚本所需JS依赖 crypto-js jsencrypt 缺一不可 + * 变量文件的名字为 gqft.json 变量文件的名字为 gqft.json 变量文件的名字为 gqft.json + * COOKIE改为文件模式 参考https://github.com/smallfawn/QLScriptPublic/blob/main/cookies/gqft.json + * 只需要填每一项中的 enData和enKey即可 记得必须符合JSON格式 可以自行去验证 + * 本版本为测试版 如有BUG 及时联系 群 1021185005 + * enData和enKey是登录接口返回的响应 其他接口均不可以用 接口地址 + * 怎么抓登录包? 退出账号! 打开抓包 登录账号 完毕后关闭抓包(短信登录) + * https://gw.nevapp.gtmc.com.cn/ha/iam/api/sec/oauth/token + * 例如 + * [ + { + "acToken": "", + "rtToken": "", + "enData":"axi....", + "enKey":"Op9/OAvVPbIbb5reyq2TR0YB2PqvHbwq1nOqI6e2lSfWh5DYPV9dSmthwxak/Wp8utQ+ox01mGHL3G3JqNYxreSrGFe9qPHCsoRhD/ei0Q0mYQfr/LCJuWm+YwJKoemGnho6Pz6VHdxcarkVUxpa1j87wmOGr7clxXEhfXCCdM4lDrD1RSBlwLwKNAaLkId/JjrOZyyKnn43Pzuxbfgu0Kg+/8MpJ05L4gI9hqeTev6M63k7oVtyxVLiBYymzzfa7MZHj4M4SfD7owkpX5oLr2Uaps4t+H5KZjia3+Jy/l5/lFXw7am9DBsLBriKKgs1nV8wUC1gIz9L/jcU6IcDBA==" + }, + { + "acToken": "", + "rtToken": "", + "enData":"axisa....", + "enKey":"Op9/OAvVPbIbb5reyq2TR0YB2PqvHbwq1nOqI6e2lSfWh5DYPV9dSmthwxak/Wp8utQ+ox01mGHL3G3JqNYxreSrGFe9qPHCsoRhD/ei0Q0mYQfr/LCJuWm+YwJKoemGnho6Pz6VHdxcarkVUxpa1j87wmOGr7clxXEhfXCCdM4lDrD1RSBlwLwKNAaLkId/JjrOZyyKnn43Pzuxbfgu0Kg+/8MpJ05L4gI9hqeTev6M63k7oVtyxVLiBYymzzfa7MZHj4M4SfD7owkpX5oLr2Uaps4t+H5KZjia3+Jy/l5/lFXw7am9DBsLBriKKgs1nV8wUC1gIz9L/jcU6IcDBA==" + } +] +* 如果提示 TypeError:Cannot read properties of null (reading 'split') 那么则可以使用默认的enKey + */ + +const $ = new Env("广汽丰田"); +//const ckName = "gqft_data"; + + +//-------------------- 一般不动变量区域 ------------------------------------- +const { log } = require("console"); +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const notify = $.isNode() ? require("./sendNotify") : ""; +let envSplitor = ["&"]; //多账号分隔符 +let msg = ""; +let userList = []; +let userIdx = 0; +let userCount = 0; +let scriptVersionLatest; //最新版本 +let scriptVersionNow = "0.0.6"; //现在版本 +window = {}; +//---------------------- 自定义变量区域 ----------------------------------- +const CryptoJS = require("crypto-js"); +const JSEncrypt = require("jsencrypt"); +let appId_h5 = "a41022a5-ad1e-eb24-4fb4-7d1b7a7958f2"; //appId +let appKey_h5 = "52ae440d-8fec-5a8b-76ee-58eb6bea62f8"; //appSigSecret +let appId_android = "f31a4469-f9b9-4c10-2e97-bf2100a6d5a0"; //appId +let appKey_android = "29012175-8d3c-b89b-a61d-4ecf65ff2e3c"; //appSigSecret +//--------------------------------------------------------- + +async function start() { + //await getVersion("smallfawn/QLScriptPublic/main/gqft.js"); + log('todoList:CK改变了 修复CK时效短 and CK失效快 的问题 修复refreshToken已改变问题\nupdate:IOS适配 尽可能青龙高版本适配') + log("tips:可能有未知的BUG,如果遇到请截图和发送自己的CK给github lssues或者加群发给管理") + log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + //await getNotice(); + taskall = []; + /*for (let user of userList) { + //taskall.push(await user.getToken()); + await $.wait(1000); + } + await Promise.all(taskall);*/ + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.decrypt()); + await $.wait(1000); + } + } + await Promise.all(taskall); + log("\n================== 用户信息 ==================\n"); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.user_info()); + await $.wait(1000); + } + } + await Promise.all(taskall); + + log("\n================== 执行任务 ==================\n"); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.task_signin()); + await $.wait(1000); + } + } + await Promise.all(taskall); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.art_list()); + await $.wait(1000); + } + } + await Promise.all(taskall); +} + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + //this.ck = str.split("&")[0]; + //log(this.ck) + this.ckStatus = true; + this.nickname = null; + this.User_encryptData = "" + this.User_encryptKey = "" + this.deEnData = "" + this.deEnDataKey = "" + this.deEnDataIv = "" + this.User_Data = "" + this.enData = str.split("#")[0] + this.enKey = str.split("#")[1] + this.User_AccessToken = null; + this.User_RefreshToken = null + this.isChange = false + this.headerGet_h5 = {}; + } + getNonce(type) { + return type === "h5" + ? Array.from({ length: 6 }, () => + Math.floor(Math.random() * 36).toString(36) + ).join("") + : type === "android" + ? Math.floor(Math.random() * 900000) + 100000 + : ""; + } + async decrypt() { + let key = getRSADecryptResult_android(this.enKey) + //console.log(key) + let aesDekey = key.split("@DS@")[0]; + let aesDeiv = key.split("@DS@")[1]; + let result = AES_CBC_Decrypt(this.enData, aesDekey, aesDeiv); + if (result && "body" in result) { + this.User_AccessToken = result.body.accessToken + this.User_RefreshToken = result.body.refreshToken + let data = await readFile() + // 假设您有一个名为data的数组 + let modifiedData = data.map(item => { + if (item.enKey == this.enKey) { + return { ...item, acToken: result.body.accessToken, rfToken: result.body.refreshToken }; // 修改属性值 + } else { + return item; // 不需要修改的项直接返回 + } + }); + let res = await writeFile(modifiedData) + } + } + getHeadersPost_android() { + let ts = Date.now() + let nonce = this.getNonce("android"); + return { + //'Connection': 'Keep-Alive', + //'Content-Length': 402, + operateSystem: "android", + appVersion: "1.4.4", + nonce: nonce, + "Content-Type": "application/json", + "User-Agent": "okhttp/4.8.1", + appId: appId_android, + Accept: "application/json", + Referer: + "https://app.nevapp.gtmc.com.cn/h5/pages/mine/task?noAutoSign=true", + //'Accept-Encoding': 'gzip', + "timestamp": ts, + "Authorization": "Bearer " + this.User_AccessToken, + 'sig': CryptoJS.MD5( + ts + + this.User_AccessToken + + nonce + + appId_android + + appKey_android + ).toString() + }; + } + getHeadersGet_android() { + let ts = Date.now() + let nonce = this.getNonce("android"); + return { + //'Connection': 'Keep-Alive', + operateSystem: "android", + appVersion: "1.4.4", + nonce: nonce, + "User-Agent": "okhttp/4.8.1", + appId: appId_android, + Accept: "application/json", + //'Referer': 'https://app.nevapp.gtmc.com.cn/h5/pages/mine/task?noAutoSign=true', + //'Accept-Encoding': 'gzip', + "timestamp": ts, + "Authorization": "Bearer " + this.User_AccessToken, + 'sig': CryptoJS.MD5( + ts + + this.User_AccessToken + + nonce + + appId_android + + appKey_android + ).toString() + } + } + getHeadersPost_h5() { + let ts = Date.now() + let nonce = this.getNonce("h5"); + return { + Connection: "keep-alive", + //'Content-Length': 402, + operateSystem: "h5", + nonce: nonce, + "Content-Type": "application/json", + "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/81.0.4044.138 Mobile Safari/537.36 BundleId/com.gtmc.nevapp DSApp/1.4.4 StatusBarHeight/30 BottomBarHeight/0", + appId: appId_h5, + Accept: "*/*", + Origin: "https://app.nevapp.gtmc.com.cn", + "X-Requested-With": "com.gtmc.nevapp", + "Sec-Fetch-Site": "same-site", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + Referer: + "https://app.nevapp.gtmc.com.cn/h5/pages/mine/task?noAutoSign=true", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "timestamp": ts, + "Authorization": "Bearer " + this.User_AccessToken, + 'sig': CryptoJS.MD5( + ts + + this.User_AccessToken + + nonce + + appId_h5 + + appKey_h5 + ).toString() + } + } + async getToken() { //初次获取token + //log(this.ck) + this.ck = this.ck.replaceAll('/u003d', "="); // 把ASCII码为61的字符替换为等号 + + if ('QL_BRANCH' in process.env) { + //log(`是青龙环境`) + if (!compareVersion(process.env['QL_BRANCH']) || process.env['QL_BRANCH'] == 'master') { //如果小于返回true !true为false !false为 true + //log(`版本大于15.0`) + let regexp = new RegExp('\\\\', 'g'); + this.ck = this.ck.replace(regexp, '/'); + } + } + //log(this.ck) + + try { + this.ck = JSON.parse(this.ck); + } catch (e) { + this.ck = this.ck + } + + this.User_encryptData = this.ck["encryptData"] + this.User_encryptKey = this.ck["encryptKey"] + //log(this.User_encryptKey) + this.deEnData = getRSADecryptResult_android(this.User_encryptKey) + //log( this.deEnData) + if (!this.deEnData) { + this.deEnDataKey = 'ajgekbmgfkasefqk' + this.deEnDataIv = "cd1d955be8e4c11a" + this.User_Data = AES_CBC_Decrypt(this.User_encryptData, this.deEnDataKey, this.deEnDataIv) + this.User_AccessToken = this.User_Data["body"]['accessToken'] + this.User_RefreshToken = this.User_Data["body"]['refreshToken'] + await this.refresh_token() + } else { + //log(this.deEnData) + this.deEnDataKey = this.deEnData.split("@DS@")[0]; + this.deEnDataIv = this.deEnData.split("@DS@")[1]; + this.User_Data = AES_CBC_Decrypt(this.User_encryptData, this.deEnDataKey, this.deEnDataIv) + this.User_AccessToken = this.User_Data["body"]['accessToken'] + this.User_RefreshToken = this.User_Data["body"]['refreshToken'] + await this.refresh_token() + } + + } + + async user_info() { + try { + let options = { + url: `https://gw.nevapp.gtmc.com.cn/main/api/community/lgn/user/getLoginUserInfo`, + headers: this.getHeadersGet_android(), + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.header.code == 10000000) { + DoubleLog(`账号[${this.index}] 欢迎用户: [${result.body.baseInfo.nickname}]🎉`); + this.ckStatus = true; + this.nickname = result.body.baseInfo.nickname + } else if (result.header.code == 10001007) { + DoubleLog(`账号[${this.index}] 用户查询:失败 ❌ 了呢,原因Token过期,现在即将刷新token!`); + await this.refresh_token() + this.ckStatus = false; + console.log(result); + } else if (result.header.code = 10009999) { + DoubleLog(`账号[${this.index}] 用户查询:失败 ❌ 了呢,原因refreshToken已改变,请重新获取CK!`); + this.ckStatus = false; + } else { + DoubleLog(`账号[${this.index}] 用户查询:失败 ❌ 了呢,原因未知!`); + this.ckStatus = false; + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + + /** + * 签到 + */ + async task_signin() { + try { + let YO = `${KO()}@DS@${KO()}`; + let key = YO.split("@DS@")[0]; + let iv = YO.split("@DS@")[1]; + /*console.log(YO); + log(key) + log(iv)*/ + let bodydata = {}; + let options = { + url: `https://gw.nevapp.gtmc.com.cn/main/api/marketing/lgn/task/sec/signin`, + headers: this.getHeadersPost_h5(), + body: JSON.stringify({ + encryptKey: getRSAEncryptResult(YO), + encryptData: AES_CBC_Encrypt(bodydata, key, iv), + }), + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if ("encryptData" in result) { + let rsaDeData = result.encryptKey; + let rsaDeResult = getRSADecryptResult(rsaDeData); + let aesDeData = result.encryptData; + let aesDekey = rsaDeResult.split("@DS@")[0]; + let aesDeiv = rsaDeResult.split("@DS@")[1]; + let deResult = AES_CBC_Decrypt(aesDeData, aesDekey, aesDeiv); + if ((deResult.header.code = "10000000")) { + DoubleLog(`账号[${this.index}] 签到: ${deResult.header.message}🎉`); + } else { + DoubleLog(`账号[${this.index}] 签到: ${deResult.header.message}`); + } + } else { + DoubleLog(`账号[${this.index}] 签到:失败 ❌ 了呢,原因未知!`); + } + } catch (e) { + console.log(e); + } + } + /** + * 阅读 + * @param {*} artId + */ + async task_read(artId) { + try { + let YO = `${KO()}@DS@${KO()}`; + let key = YO.split("@DS@")[0]; + let iv = YO.split("@DS@")[1]; + /*console.log(YO); + log(key) + log(iv)*/ + let bodydata = { postId: artId }; + let options = { + url: `https://gw.nevapp.gtmc.com.cn/main/api/community/sec/post/detail`, + headers: this.getHeadersPost_h5(), + body: JSON.stringify({ + encryptKey: getRSAEncryptResult(YO), + encryptData: AES_CBC_Encrypt(bodydata, key, iv), + }), + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if ("encryptData" in result) { + let rsaDeData = result.encryptKey; + let rsaDeResult = getRSADecryptResult(rsaDeData); + let aesDeData = result.encryptData; + let aesDekey = rsaDeResult.split("@DS@")[0]; + let aesDeiv = rsaDeResult.split("@DS@")[1]; + let deResult = AES_CBC_Decrypt(aesDeData, aesDekey, aesDeiv); + if ((deResult.header.code = "10000000")) { + DoubleLog( + `账号[${this.index}] 阅读文章: ${deResult.header.message}🎉` + ); + } else { + DoubleLog( + `账号[${this.index}] 阅读文章: ${deResult.header.message}` + ); + } + } else { + DoubleLog(`账号[${this.index}] 阅读文章:失败 ❌ 了呢,原因未知!`); + } + } catch (e) { + console.log(e); + } + } + /** + * 点赞帖子 + */ + async task_like(artId) { + + try { + let YO = `${KO()}@DS@${KO()}`; + let key = YO.split("@DS@")[0]; + let iv = YO.split("@DS@")[1]; + /*console.log(YO); + log(key) + log(iv)*/ + let bodydata = { subjectId: artId, subjectType: "POST" }; + let options = { + url: `https://gw.nevapp.gtmc.com.cn/main/api/community/lgn/sec/user/like`, + headers: this.getHeadersPost_android(), + body: JSON.stringify({ + encryptKey: getRSAEncryptResult(YO), + encryptData: AES_CBC_Encrypt(bodydata, key, iv), + }), + }, + result = await httpRequest(options); + //console.log(options); + //console.log('点赞得结果',result); + if ("encryptData" in result) { + let rsaDeData = result.encryptKey; + let rsaDeResult = getRSADecryptResult_android(rsaDeData); + let aesDeData = result.encryptData; + let aesDekey = rsaDeResult.split("@DS@")[0]; + let aesDeiv = rsaDeResult.split("@DS@")[1]; + let deResult = AES_CBC_Decrypt(aesDeData, aesDekey, aesDeiv); + if ((deResult.header.code = "10000000")) { + DoubleLog( + `账号[${this.index}] 点赞文章: ${deResult.header.message}🎉` + ); + } else { + DoubleLog( + `账号[${this.index}] 点赞文章: ${deResult.header.message}` + ); + } + } else { + DoubleLog(`账号[${this.index}] 点赞文章:失败 ❌ 了呢,原因未知!`); + } + } catch (e) { + console.log(e); + } + } + /** + * 分享 + */ + async task_share(artId) { + try { + let YO = `${KO()}@DS@${KO()}`; + let key = YO.split("@DS@")[0]; + let iv = YO.split("@DS@")[1]; + /*console.log(YO); + log(key) + log(iv)*/ + let bodydata = { subjectId: artId, subjectType: "POST" }; + let options = { + url: `https://gw.nevapp.gtmc.com.cn/main/api/community/lgn/sec/user/forward`, + headers: this.getHeadersPost_h5(), + body: JSON.stringify({ + encryptKey: getRSAEncryptResult(YO), + encryptData: AES_CBC_Encrypt(bodydata, key, iv), + }), + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if ("encryptData" in result) { + let rsaDeData = result.encryptKey; + let rsaDeResult = getRSADecryptResult(rsaDeData); + let aesDeData = result.encryptData; + let aesDekey = rsaDeResult.split("@DS@")[0]; + let aesDeiv = rsaDeResult.split("@DS@")[1]; + let deResult = AES_CBC_Decrypt(aesDeData, aesDekey, aesDeiv); + if ((deResult.header.code = "10000000")) { + DoubleLog( + `账号[${this.index}] 分享文章: ${deResult.header.message}🎉` + ); + } else { + DoubleLog( + `账号[${this.index}] 分享文章: ${deResult.header.message}` + ); + } + } else { + DoubleLog(`账号[${this.index}] 分享文章:失败 ❌ 了呢,原因未知!`); + } + } catch (e) { + console.log(e); + } + } + /** + * 帖子列表 + * + */ + async art_list() { + try { + let bodydata = { queryPostType: "NEWEST", pageNo: 1, pageSize: 20 }; + let options = { + url: `https://gw.nevapp.gtmc.com.cn/main/api/community/post/page`, + headers: this.getHeadersPost_h5(), + body: JSON.stringify(bodydata), + }, + result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result.header.code == "10000000") { + for (let i = 0; i < 10; i++) { + DoubleLog(`账号[${this.index}] 文章 [${result.body.list[i].id}]`); + let artId = result.body.list[i].id; + //DoubleLog('开始浏览') + await $.wait(5000); + await this.task_read(artId); + //DoubleLog('开始点赞') + await $.wait(5000); + await this.task_like(artId); + //DoubleLog('开始分享') + await $.wait(5000); + await this.task_share(artId); + } + } else { + DoubleLog(`账号[${this.index}] 获取帖子列表:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async refresh_token() { + let headers = this.getHeadersPost_android() + headers['DeviceId'] = '417d0945-b207-44ea-b185-c5673d268b81' + //headers["RegistrationID"] = '1a0018970bbcc32a71a' + try { + let YO = `${KO()}@DS@${KO()}` + let key = YO.split('@DS@')[0] + let iv = YO.split('@DS@')[1] + //console.log(YO); + //log(key) + //log(iv) + let options = { + url: `https://gw.nevapp.gtmc.com.cn/ha/iam/api/lgn/sec/checkAndUpdateToken`, + headers: headers, + body: JSON.stringify({ "encryptKey": getRSAEncryptResult(YO), "encryptData": AES_CBC_Encrypt({ "refreshToken": this.User_RefreshToken }, key, iv) }) + }, result = await httpRequest(options); + //console.log(options); + //console.log(result); + if ("encryptData" in result) { + let rsaDeData = result.encryptKey; + let rsaDeResult = getRSADecryptResult_android(rsaDeData); + //log(rsaDeResult) + let aesDeData = result.encryptData; + let aesDekey = rsaDeResult.split("@DS@")[0]; + let aesDeiv = rsaDeResult.split("@DS@")[1]; + let deResult = AES_CBC_Decrypt(aesDeData, aesDekey, aesDeiv); + //log(deResult) + if (deResult.header.code == "10000000") { + // 假设您有一个名为data的数组 + let data = await readFile() + let newData = data.filter(item => item.enKey !== this.enKey); + + this.User_AccessToken = deResult["body"]["accessToken"] + this.User_RefreshToken = deResult["body"]["refreshToken"] + + newData.push({ acToken: this.User_AccessToken, rfToken: this.User_RefreshToken, enData: result.encryptData, enKey: result.encryptKey }) + let writeResult = await writeFile(newData) + if (writeResult) { + console.log(`刷新CK && 写入文件成功`) + await this.user_info() + await this.task_signin() + await this.art_list() + } else { + console.log(`刷新CK && 写入文件失败`) + } + this.ckStatus = true + } else { + this.ckStatus = false + } + } else { + this.ckStatus = false + } + } catch (e) { + console.log(e); + } + } +} +function readFile() { + const fs = require('fs'); + let file = fs.existsSync("./gqft.json"); + if (!file) { console.log("./gqft.json" + "文件不存在"); return [] } + return new Promise((resolve, reject) => { + fs.readFile('./gqft.json', 'utf8', function (err, data) { + if (err) { + reject(err); + } else { + try { + data = JSON.parse(data); + } catch (error) { + + } + resolve(data); + } + }); + }); +} +function writeFile(data) { + const fs = require('fs'); + return new Promise((resolve, reject) => { + fs.writeFile("./gqft.json", JSON.stringify(data, null, 2), (err) => { + if (err) { + reject(false); + } else { + resolve(true); + } + }); + }); +} + +!(async () => { + if (!(await checkEnv())) return; + + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + let arr = await readFile() + //console.log(arr) + + if (arr && arr.length <= 0) return console.log("未找到CK") + let tmp = [] + + for (let i of arr) { + + tmp.push(`${i.enData}#${i.enKey}`) + } + let userCookie = tmp.join("&"); + if (userCookie) { + //console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true; //true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method) { + method = options.method + ? options.method.toLowerCase() + : options.body + ? "post" + : "get"; + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + } else { + if (data) { + typeof JSON.parse(data) == "object" + ? (data = JSON.parse(data)) + : (data = data); + resolve(data); + } else { + console.log(`请求api返回数据为空,请检查自身原因`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + }); +} +/** + * 判断版本号是否小于 V2.15.0 小于返回true + * @param {*} version + * @returns + */ +function compareVersion(version) { + const currentVersion = 'v2.12.2'; + const current = currentVersion.substring(1).split('.'); + const target = version.substring(1).split('.'); + for (let i = 0; i < current.length; i++) { + const c = parseInt(current[i]); + const t = parseInt(target[i] || 0); + if (c > t) { + return true; + } else if (c < t) { + return false; + } + } + return false; +} +/** + * 16位随机数 + * @returns + */ +function KO() { + let e = Math.random().toString(36).substr(2); + for (; e.length < 16;) e += Math.random().toString(36).substr(2); + return (e = e.substr(0, 16)), e; +} +function AES_CBC_Encrypt(data, key, iv) { + key = CryptoJS.enc.Utf8.parse(key); + iv = CryptoJS.enc.Utf8.parse(iv); + if ("object" == typeof data) + try { + data = JSON.stringify(data); + } catch (r) { + console.log("encrypt error:", r); + } + data = CryptoJS.enc.Utf8.parse(data); + //console.log(data); + return CryptoJS.AES.encrypt(data, key, { + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7, + }).ciphertext.toString(CryptoJS.enc.Base64); +} + +//逆向参数url https://app.nevapp.gtmc.com.cn/h5/assets/index.a0bf569f.js + + + + +function getRSAEncryptResult(data) { + window = {}; + let crypt = new JSEncrypt(); + let publicKey = + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA49jxpFBAoEslNYrHb0wT8nCpGBn3hvjgToNkp7lFpsSeRS7WbHoFJEvmf1U83cHrbTzRFRowPft/FGBw6/6dZcmMjMgz1n0FWlqk0d7QjEDL+t9Dj9tH9e/qdGfJ3bzR0ZgpgQMpKpx5I5fcEgzMYnHWGLZBY+v+PlPTN/1mz0nnRtIIxb8YuZZFvadfGTC8jeD7tMERpd5zENml5cLbVujENsag9AIpvLdvR6fSewi3l9QmssWpty50UpcAWsvAs+ExRYyUe/s1lwfSdSciW6Lrj4sp4MMaWifdTQUbKKEeuRugEqJSDrxhxoybEbSbl2CYaTR8kifZ1n+lcAh6cQIDAQAB"; + crypt.setPublicKey(publicKey); + // 加密 + //log(`待加密数据${data}`) + var enc = crypt.encrypt(data); + return enc; +} +function getRSADecryptResult(data) { + window = {}; + let crypt = new JSEncrypt(); + let privateKey = + "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCaKMrIwU9els3xVszLtzvCJT+Kc8mosvygguXo0f+IqjSxvfCNbtobxIckxkBK7ipY8CK9k8WjcSsyIUd132CsGvFoUejD+sf+53wEy4z1YOgeoatll5/wMFGGZfDEyRbYd7WGTGPBZ6goENqplN5AJW6fIq8SskWZa59uq1E3Q9rM8iLg3n+955xvEb412vmTPsEWYL2qc6HUpEFxpXAg+CWjthYihZKkeOgQFr9LV3sB5bRAgtoXf/dnuWMK1jg4z7efaAxxNovQfRWXDEcgiRONmuS+l+M2y3YoPt1EFYSOZuU5GepuPPDFMxoLJ1CE2pk20ZUFIrgOisSICnkdAgMBAAECggEAKjVxEHadXLC9wo6ZlE2fNxErzKTXWjFnqiss+ApHhQvVUbVH3/GyFlhBCHifseR0A9X8LRwAyTd7NEaYYlW/CmB2KLIEoWRQziJjeoyhE65s37Y0T6SsTf9s0vembLsCXlKoiRTxW0seZ5n1xOjV0YpuN3Qvq1bUZ6VoCc0ud4rU09gDI8nDEkS0sBZbV8wVxpksoksX7YdpgJtqCMezOdnY9LqWiC0Y1km9szaNRr3X5rGTVJ+ZnTu2votXdKCMzVLXE/hm2eMRAk2droOzwKFLYlijZZg7m1SfNWlSCEelPKPRmv2RnoIGXn6EvqXLLT4zg4iOzh0dRrvT+BLloQKBgQD7b/x8aLfVvv5/dBFDN6exXpSY3gvsXhb3GhE/DO8dHRN1qcJt2ocriJEbZnD5F2DAQIT+DdG1Uihg9bTinDbhtilG1PdWQIqIcxRbMiJjtWIIEkTpFVnShZ4VNe56lseAAxAPG8z5Wzy25HiIUovnH5CiZiKesqRbkILjsrtiowKBgQCc9OpdmS38HSizOZ4Mieg3nkCm+OCZQAuIQqokALUC/Gb8sae2ZO6GGtdr6+Xo8B/WMlkmapNEFqSSE3xepjR9O1J9efvp3BJ2j/1UTO0NPlcm0lyijG3epqx8iaWJWF2wezs9w5qZtFUve/5um88ztbuhMNbgFdVIPGN9BoQxPwKBgQCCaqayvPpFkwicgU6G5/JCLMW0uM/EbVVKHCo/4uyP1EoIqOHhawzbhr2FUdBdU0Pq1ExnHjHc891f1XJabB6HWp30UHhuM5HnjpFLcCioQSe0+gzmPR3W9Vl2tP+adGTMQEpvG8Nov2sxjjX6t547ZoL1yTZBzHU1zTIm+sj5MwKBgAhcV3ui5DswxnE9mXirg+4qhOEgEr63FaYtfuiqDPpavZWqVPe3SqlkFqOODlIpMFj1l6AfPzb6ScvqM87K5bLiDRPYAp5DdcxRATqTWnFBJ91OiVazSkr47+k2X9YAGgWDmvVATSTw4TTFUxlLPW9Qt+zvMBMBtrnBVb9cMIB7AoGALNeRpqZKdjbvklQLMDnKyV7p9wuz669SX4LPODcMqf8q0wsL8/0jWTuyyePr8z+V/BI2SVHcT3CaBsmnNRU739DXLAcQ4R2d6Ak5zmmJrOcWl1QiQIcNZUp+fGEBTOl3YOxIFryGX15MocX6bE9JXj4k2L6P7XlfoLAme4801bI="; + crypt.setPrivateKey(privateKey); + var dec = crypt.decrypt(data); + //console.log(dec) + + //log(`解密数据${data}`) + return dec; +} +function getRSADecryptResult_android(data) { + window = {}; + let crypt = new JSEncrypt(); + let privateKey_android = + "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCvUb36V6lPOB5qmJkPzeThWN1v2+j0OYGxnnb9uaNeiMIWHk+bj0izkEzOsTwFacM9CEOKC5Oteg6dHz+M640nP1iC1aoWWeCIS7/GuKfM1xe1RnJ19gCw+yPpHiIWlltmFaINNdyF7YGh+siHex4/8/YTkQGuCRjJcynCAqfiLRkL8I5uBQUYj7SU8gWsuQSDa2OcH047cjcYRzrPYob/1q4TZgOe/jsj5n7b/a7xz/KwHWBEXeiLCQJCJQiKnvEaJ4LWq5NuKlB5+3EQoPOPw6CNtkT8Nz9B5peB2076TZDeFnjHqiG+Sk5KOpBizBtnifzXCXvFlcRQcWMXgsv/AgMBAAECggEAA1VMhVvxTh5FBcXM8y348gfcfenybeJCAvx+Sqii4IM9HWqKHO0GdtOBglSATaILIjfsAM3jiuLNMFONw8IetuZPan1hdHdU+4JlLQQJvK1COCIUvwVkUfkUX7RA9aj6J+C1agbiIHG5izjXYywGETU0Mn8JRyPJIttbqeKfCn/E8RIddw+TgPixweOjurWQt9hNA9fCe48/0xwadweCG4H+Dmv2kocCsSn6Vf0g3KSp0N0pVsxPHx67BjU3mW9rt4sv8gwt2PoxDJYhxbYWwj8WeRCDSSpYsTlskXLkh71VFKLg2fr/BrZgH9lMMdpSGO79mZcrP45O2pIS0MfkcQKBgQDZ3uiL+GgmhYI3+7pITAloFUVjkJISi9zbHxIlXK9r5sfQRxYIIyC76pmkLFlPD+Z2YnX4krWs1pWu4GhgXpE87VmoUpujj8o1MAxF2iXpLfLW6XB+iEU92n6gAo4VEZKHdzw0rR9hlfW9Q0oXPK2TtcN3iscePZTVt6rlGnIAxQKBgQDOAG9zOCwpqMpbmvw8R1qrWCkcXmW37AsB6MkZvEJIFvukmIh7/9rH63/pEzGN863O/o61XX3s7S/n8K+MGIfrc0uy0HeCU+OYDA3p6Nih8NhyfxZysT9JZvimx1KSiW00jeXgfF78nzUqQJYQIRUW2Ja+tOJzKSxnotuTLjrd8wKBgBmJuXR+v6aUS7lINoO29ftPUvziu1yVLGQ69iOPA7kAKjfNvVVi2LluPGg0Epvj3z3NOMrUV5tU4+LFxzZUn22m3LWQSVIYzrkBUs71TTBSBH8QifErBALGE8WpxwHNN4HNhi8eg+kqbM2sj4i9whLoYWsnx0NSMJoEl3GXcfmJAoGAU2XRuO+w0VzIL7XbD/xDNMMIQbflrkQdYLSBVa3ll5HWZphqCOlYBT/OFOn0UeepIffkhoBHDrgngNrr9uenfya6KrZC67xSk6etqljd+xGqTxAsYlpnqKvLVpmzUCfa0j/wJKW1PsilmWl0VytNgmZFAQfx9XVhyMMh6b/5jQkCgYEAh/xKMPs5j3yukWIhedqobq+AU+EyZ7ZKLBif9FZsWezEnUvtRYyOryH5gt3cgN7Ux0SAFvp1eqyoQnBv0O96LeSLKsyYyvJ8yKQweqpPATAiX5vOX/EfHPshVLlbxabKinG888+qb60eyV6S1E/7GvOU1ILI6l9WQPgOYKVpbGA="; + crypt.setPrivateKey(privateKey_android); + var dec = crypt.decrypt(data); + //log(`解密数据${data}`) + return dec; +} + +function AES_CBC_Decrypt(data, key, iv) { + key = CryptoJS.enc.Utf8.parse(key); + iv = CryptoJS.enc.Utf8.parse(iv); + var decrypted = CryptoJS.AES.decrypt(data, key, { + iv: iv, + mode: CryptoJS.mode.CBC, + padding: CryptoJS.pad.Pkcs7, + }); + var decryptedData = decrypted.toString(CryptoJS.enc.Utf8); + try { + decryptedData = JSON.parse(decryptedData); + } catch (r) { + console.log("decrypt error:", r); + } + //console.log(decryptedData); + return decryptedData; +} + +/** + * 获取远程版本 + */ +async function getVersion(scriptUrl) { + let data = await $.getScript( + `https://ghproxy.com/https://raw.githubusercontent.com/${scriptUrl}` + ); + let regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + let match = data.match(regex); + scriptVersionLatest = match ? match[2] : ""; +} + +async function getNotice() { + try { + let options = { + url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json`, + headers: { "User-Agent": "" }, + }, + result = await httpRequest(options); + if (!result || !("notice" in result)) { + options.url = `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`; + result = await httpRequest(options); + } + if (result && "notice" in result) { + DoubleLog(`${result.notice}`); + } + } catch (e) { + console.log(e); + } +} +async function hitokoto() { + // 随机一言 + try { + let options = { + url: "https://v1.hitokoto.cn/", + headers: {}, + }, + result = await httpRequest(options); + return result.hitokoto; + } catch (error) { + console.log(error); + } +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + await notify.sendNotify($.name, message); + } else { + $.msg($.name, "", message); + } + } else { + console.log(message); + } +} + + +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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!`) } 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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise(s => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? "null" === i ? null : i || "{}" : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), a) } catch (e) { const i = {}; this.lodash_set(i, r, t), s = this.setval(JSON.stringify(i), a) } } 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 : {}, 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"]), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, 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: a, statusCode: r, headers: i, rawBody: o } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && (s.body = a, s.statusCode = s.status ? s.status : s.statusCode, s.status = s.statusCode), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o }, i, o) }, t => e(t && t.error || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then(t => { const { statusCode: s, statusCode: r, headers: i, rawBody: o } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, t => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), e += `${s}=${a}&`) } return e = e.substring(0, e.length - 1), e } msg(e = t, s = "", a = "", r) { const i = 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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); break; case "Node.js": this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) } } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; switch (this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), 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) } diff --git a/gujinggongjiu.js b/gujinggongjiu.js new file mode 100644 index 0000000..a9b9bd9 --- /dev/null +++ b/gujinggongjiu.js @@ -0,0 +1,152 @@ +/* +------------------------------------------ +@Date: 2024.08.01 +@Description: 古井贡酒会员中心小程序 +------------------------------------------ +变量名 gujing +[Script] +http-response + +[MITM] +hostname = + + +const $ = new Env("古井贡酒会员中心小程序"); +let ckName = `gujing`; +let userCookie = checkEnv( + ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "" +); +const notify = $.isNode() ? require("./sendNotify") : ""; + +!(async () => { + console.log( + `==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date( + new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000 + ).toLocaleString()} \n==================================================` + ); + //console.log(userCookie) + if (!userCookie?.length) return console.log(`没有找到CK哦`); + let index = 1; + let strSplitor = "#"; + + for (let user of userCookie) { + $.log(`\n🚀 user:【${index}】 start work\n`); + index++ + $.token = user + $.ckStatus = true; + await search() + } + + await $.sendMsg($.logs.join("\n")); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); +async function search() { + let data = JSON.stringify({ + "activityId": "110001000", + "preview": false + }); + + let config = { + method: 'POST', + url: 'https://scrm.gujing.com/gujing_scrm/wxclient/mkt/activities/sign:search', + headers: { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxba9855bdb1a45c8e', + 'Accept': 'application/json, text/plain, */*', + 'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"', + 'Content-Type': 'application/json;charset=UTF-8', + 'sec-ch-ua-mobile': '?1', + 'Access-Token': $.token, + 'sec-ch-ua-platform': '"Android"', + 'Origin': 'https://scrm.gujing.com', + 'X-Requested-With': 'com.tencent.mm', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + + }, + data: data + }; + let { data: result } = await Request(config) + if (result?.code == 200) { + if (result.content.signed !== 1) { + $.log(`未签到 ===> 签到ing`) + await signIn() + } else { + $.log(`已签到 ===> 什么都不做`) + } + } else { + $.log(`签到查询失败 [${JSON.stringify(result)}]`) + } +} +async function signIn() { + let data = JSON.stringify({ + "activityId": "110001000", + "preview": false + }); + + let config = { + method: 'POST', + url: 'https://scrm.gujing.com/gujing_scrm/wxclient/mkt/activities/sign:search', + headers: { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220089 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxba9855bdb1a45c8e', + 'Accept': 'application/json, text/plain, */*', + 'sec-ch-ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Android WebView";v="122"', + 'Content-Type': 'application/json;charset=UTF-8', + 'sec-ch-ua-mobile': '?1', + 'Access-Token': $.token, + 'sec-ch-ua-platform': '"Android"', + 'Origin': 'https://scrm.gujing.com', + 'X-Requested-With': 'com.tencent.mm', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + }, + data: data + }; + let { data: result } = await Request(config) + if (result?.code == 200) { + $.log(`签到成功 获得积分[${result.content.point}]`) + } else { + $.log(`签到失败 [${result.chnDesc}]`) + } +} + +function checkEnv(userCookie) { + const envSplitor = ["&", "\n"]; + //console.log(userCookie); + let userList = userCookie + .split(envSplitor.find((o) => userCookie.includes(o)) || "&") + .filter((n) => n); + console.log(`共找到${userList.length}个账号`); + return userList; +} +// prettier-ignore +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) } + +async function Request(options) { + if ($.isNode()) { + const axios = require("axios"); + Request = async (options) => { + try { + return await axios.request(options); + } catch (error) { + return error && error.error ? error.error : "请求失败"; + } + }; + } + if ($.isQuanX()) { + Request = async (options) => { + try { + return await $task.fetch(options); + } catch (error) { + return error && error.error ? error.error : "请求失败"; + } + }; + } + return await Request(options); +} diff --git a/guolejiangjiu.js b/guolejiangjiu.js new file mode 100644 index 0000000..d040688 --- /dev/null +++ b/guolejiangjiu.js @@ -0,0 +1,256 @@ + +/** + * 国乐酱酒 签到得酒 + * Gljj + * cron "0 7 * * *" gljj.js + * export gljj= Authorization 多账号换行或者#分隔 + + + */ +// ============================================================================================================ +const $ = new Env('国乐酱酒') +const axios = require('axios') +const env_name = 'gljj' //环境变量名字 +const env = process.env[env_name] || '' +const Notify = 1 +const debug = 0 +let scriptVersionNow = "1.0.0"; +let msg = ""; +// ==================================异步顺序============================================================================== +!(async () => { + //await getNotice(); + //await getVersion("yang7758258/ohhh154@main/gljj.js"); + await main(); + await SendMsg(msg); + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +//==================================脚本入口函数main()============================================================== + +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}🚳`) + return + } + let user_ck = env.split('\n') + DoubleLog(`\n========= 共找到 ${user_ck.length} 个账号 =========`); + let index = 1 //用来给账号标记序号, 从1开始 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + let ck_info = ck.split('&') + let Authorization = ck_info[0] + //let unionid = ck_info[1] + //let deviceCode = ck_info[2] + let user = { + index: index, + Authorization, + //unionid, + //deviceCode, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + let Run = new run(user); + await Run.userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +// ======================================开始任务========================================= +class run { + constructor(user) { + this.headers = { + "Authorization": user.Authorization, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.48(0x18003030) NetType/WIFI Language/zh_CN", + } + + } +async userTask(user) { + console.log(`\n========= 账号[${user.index}]开始任务 =========`) + await this.sign(user) + if (this.mist >= 7) { + DoubleLog(`账号[${user.index}] 签到天数大于等于7天,快去领酒🍺`); + } +} +// ============================================================================================================================= +// + async sign(user) { + try { + DoubleLog(`🕊账号[${user.index}] 开始签到任务...`); + + //console.log(formattedDate); + let urlObject = { + method: 'get', + url: `https://member.guoyuejiu.com/api/sign/daily/sign`, + headers: this.headers, + + } + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + //console.log(result); + if (result?.code == 0) { + //打印签到结果 + DoubleLog(`🕊账号[${user.index}] 签到成功:签到[${result.data.spanSumDays}]天🎉`); + this.mist = result.data.spanSumDays + }else{ + DoubleLog(`🕊账号[${user.index}] 签到失败:${result.message}⛔`) + } + } catch (e) { + console.log(e); + } + } + +// +async account(user) { + try { + DoubleLog(`🕊账号[${user.index}] 开始查询任务...`); + let urlObject = { + method: 'get', + url: `https://apiserver.chinagoods.com/growth/score/record/page?pageNo=1&pageSize=10&month=7&year=2024&userType=BUYER`, + headers: this.headers, + + } + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + //console.log(result); + if (result?.code == '20000') { + //打印签到结果 + DoubleLog(`🕊账号[${user.index}] 查询成功:总积分[${result.data.current}]🎉`); + + }else { + DoubleLog(`🕊账号[${user.index}] 查询失败:${result.msg}🚫`) + } + } catch (e) { + console.log(e); + } + } + +} +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} +/** +* ======================================================随机等待 1-5 秒============================================ +*/ +function sjwait() { + return new Promise(function (resolve) { + let waitTime = Math.floor(Math.random() * 4000 + 1000); + setTimeout(resolve, waitTime); + }); +} +// ==========================================================13位时间戳===================================================== +function getTimestamp() { + return new Date().getTime(); +} +//===============================================网络请求httpRequest========================================= +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//==============================================Debug模式=============================================== +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "https://main/tl.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +//==============================================获取远程版本================================================= +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + DoubleLog(`\n当前版本:[${scriptVersionNow}]>>>>>云端☁️版本:[${scriptVersionLatest}]`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} + +//=============================================================================================================================================== +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/haitianmeiweiguan.js b/haitianmeiweiguan.js new file mode 100644 index 0000000..1b72714 --- /dev/null +++ b/haitianmeiweiguan.js @@ -0,0 +1,487 @@ + +/* +[Script] +http-response + +[MITM] +hostname = + +*/ + +const $ = new Env("海天美味馆小程序"); +let ckName = `haday`; +let userCookie = checkEnv( + ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || "" +); +const notify = $.isNode() ? require("./sendNotify") : ""; + +!(async () => { + console.log( + `==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date( + new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000 +).toLocaleString()} \n==================================================` +); + //console.log(userCookie) + if (!userCookie?.length) return console.log(`没有找到CK哦`); + let index = 1; + let strSplitor = "#"; + + for (let user of userCookie) { + $.log(`\n🚀 user:【${index}】 start work\n`); + index++ + $.token = user.split(strSplitor)[0]; + $.uuid = user.split(strSplitor)[1]; + $.ckStatus = true; + $.activity_code = null + $.canUse = 0 + await getActivityInfo() + await $.wait(3000) + + if ($.activity_code) { + await userInfo() + } + await task_1() + await $.wait(3000) + + await task_2() + await $.wait(3000) + + await lotteryInfo() + await $.wait(3000) + + await getLotteryNum() + for (let i = 0; i < $.canUse; i++) { + await $.wait(3000) + + await lottery() + + } + } + + await $.sendMsg($.logs.join("\n")); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); +async function getActivityInfo() { + let config = { + url: `https://cmallapi.haday.cn/buyer-api/sign/activity/code?activityCode=`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + } + } + let { data: result } = await Request(config) + if (result?.code == 403) { + $.log(`获取活动信息失败,原因:CK可能过期`) + } + if ("activity_code" in result) { + $.log(`获取活动信息成功,活动ID:${result.activity_code}`) + $.activity_code = result.activity_code + } +} +async function signIn() { + let data = { "activity_code": $.activity_code, "fill_date": "" } + let config = { + url: `https://cmallapi.haday.cn/buyer-api/sign/activity/sign`, + method: "POST", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + data: JSON.stringify(data) + } + let { data: result } = await Request(config) + if (result.is_sign == true) { + $.log(`签到成功`) + } else { + $.log(`签到失败 [${result.message}]`) + } + +} + +async function userInfo() { + + let config = { + url: `https://cmallapi.haday.cn/buyer-api/sign/activity/member/info?activityCode=${$.activity_code}`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + } + } + let { data: result } = await Request(config) + if (result?.is_sign !== true) { + $.log(`${result.member_id}未签到,开始签到`) + await signIn() + } else { + + } + $.log(`当前累计签到[${result.sign_day_num}]`) +} +//浏览页面 +async function task_1() { + let data = {} + let config = { + url: `https://cmallapi.haday.cn/buyer-api/members/browsePage`, + method: "POST", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + data: JSON.stringify(data) + } + let { data: result } = await Request(config) + if (result?.code == 200) { + $.log(`浏览界面 操作成功`) + } else { + $.log(`浏览界面 操作失败[${JSON.stringify(result)}]`) + } + +} +//浏览社区 +async function task_2() { + let data = {} + let config = { + url: `https://cmallapi.haday.cn/buyer-api/members/commnity/brosing/duration/add?seconds=100`, + method: "POST", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + data: JSON.stringify(data) + } + let { data: result } = await Request(config) + if (result?.statusCode == 200) { + $.log(`浏览社区 操作成功`) + } else { + $.log(`浏览社区 操作失败 貌似是正常的 [${result}]`) + } + +} +async function getLotteryNum() { + let config = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/activity/opporturnity?activityCode=jfcj0527`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + } + let { data: result } = await Request(config) + if (result.can_use > 0) { + $.canUse = result.can_use + $.log(`当前剩余抽奖次数:${result.can_use}`) + } else { + $.log(`当前剩余抽奖次数0`) + } +} +async function lottery() { + let config = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/activity/extract?activityCode=jfcj0527`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + } + let { data: result } = await Request(config) + if (result.lucky_record_vo) { + $.log(`抽奖获得:${result.lucky_record_vo.prize_name}`) + } else { + $.log(result.message) + } + +} +async function lotteryInfo() { + let config = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/task/package/jfcj0527`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + } + let { data: result } = await Request(config) + if (result?.member_id) { + + for (let i of result.task_list) { + if (i.today_obtained_task_number < i.today_available_task_number) { + if (i.task_key == 'LOGIN') { + await $.wait(3000) + + await lottery_task_login() + } + if (i.task_key == 'POINT_EXCHANGE') { + for (let j = 0; j < i.today_available_task_number; j++) { + await $.wait(3000) + await lottery_task_exchange() + + } + } + if (i.task_key == 'BROWSE_PAGE_TASK') { + await $.wait(3000) + + await lottery_task_see(i.link) + + } + } + + + } + } else { + $.log(`获取抽奖信息 操作失败[${JSON.stringify(result)}]`) + } + +} +//抽奖登录 领取次数 +async function lottery_task_login() { + let data = {} + let config = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/task/getLoginOpporturnity/jfcj0527`, + method: "PUT", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + data: JSON.stringify(data) + } + let { data: result } = await Request(config) + $.log(result) + +} +async function lottery_task_exchange() { + let config = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/activity/redeem?activityCode=jfcj0527`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + } + let { data: result } = await Request(config) + if (result?.member_id) { + $.log(`兑换次数成功`) + + } else { + $.log(`兑换次数失败`) + $.log(result) + } + +} +//浏览页面 +async function lottery_task_see(link) { + let config_start = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/task/browse/page/start/jfcj0527?pageUrl=${link}`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + } + let { data: result_start } = await Request(config_start) + let config_end = { + url: `https://cmallapi.haday.cn/buyer-api/lucky/task/browse/page/start/jfcj0527?pageUrl=${link}`, + method: "GET", + headers: { + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-CN,zh;q=0.9", + "Authorization": $.token, + "Connection": "keep-alive", + "Content-Type": "application/json", + "envVersion": "release", + "Host": "cmallapi.haday.cn", + "Referer": "https://servicewechat.com/wx7a890ea13f50d7b6/597/page-frame.html", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "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", + "uuid": $.uuid, + "xweb_xhr": "1" + }, + } + let { data: result_end } = await Request(config_end) + $.log(`浏览页面完成`) +} + + +function checkEnv(userCookie) { + const envSplitor = ["&", "\n"]; + //console.log(userCookie); + let userList = userCookie + .split(envSplitor.find((o) => userCookie.includes(o)) || "&") + .filter((n) => n); + console.log(`共找到${userList.length}个账号`); + return userList; +} +// prettier-ignore +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) } + +async function Request(options) { + if ($.isNode()) { + const axios = require("axios"); + Request = async (options) => { + try { + return await axios.request(options); + } catch (error) { + return error && error.error ? error.error : "请求失败"; + } + }; + } + if ($.isQuanX()) { + Request = async (options) => { + try { + return await $task.fetch(options); + } catch (error) { + return error && error.error ? error.error : "请求失败"; + } + }; + } + return await Request(options); +} diff --git a/haofan.py b/haofan.py new file mode 100644 index 0000000..f40873b --- /dev/null +++ b/haofan.py @@ -0,0 +1,39 @@ +import requests +import json +import time + +# ====================== 【自行填写】 ====================== +token = "这里填你自己的token" +# ========================================================== + +url = "https://api.haofanhuoban.com/api/v1/activity/draw/draw" + +payload = { + "openid": "MrkPfIgybOsRVIhswiLQmDBvJcSwU1", + "openId": "MrkPfIgybOsRVIhswiLQmDBvJcSwU1", + "activityId": "15" +} + +headers = { + 'User-Agent': "Mozilla/5.0 (Linux; Android 10; MI 8 UD Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36", + 'Content-Type': "application/json", + 'authorization': f"Bearer {token}", + 'appid': "1", + 'os': "1" +} + +# 抽奖次数 +draw_times = 6 + +print("========== 好饭伙伴 抽奖脚本 ==========") +for i in range(1, draw_times + 1): + try: + response = requests.post(url, data=json.dumps(payload), headers=headers, timeout=10) + res = response.json() + print(f"第{i}次抽奖: {res}") + time.sleep(1) + except Exception as e: + print(f"第{i}次抽奖异常: {e}") + time.sleep(2) + +print("脚本执行完成") diff --git a/hfzj.js b/hfzj.js new file mode 100644 index 0000000..7df8633 --- /dev/null +++ b/hfzj.js @@ -0,0 +1,404 @@ +/** + * 哈弗智家 + * cron 14 14 * * * hfzj.js + * 23/01/29 积分查询和点赞文章 + * 23/01/30 更新签到 + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export hfzj_data='accessToken @ accessToken' + * + * 多账号用 换行 或 @ 分割 + * 抓包 https://gw-app.beantechyun.com , 找到 accessToken 即可 + * ==================================== + * + */ + + + +const $ = new Env("哈弗智家"); +const ckName = "hfzj_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let debug = 1; //Debug调试 0关闭 1开启 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + + + console.log('\n================== 用户信息 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.point_info()); + await $.wait(5000); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + console.log('\n================== 用户信息 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.art_list()); + await $.wait(5000); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; //单账号多变量分隔符 + //let ck = str.split('&') + //this.data1 = ck[0] + this.ts = ts13(); + this.nonce = randomszxx(16) + + this.getHeaders = { + 'ip': '192.168.31.223', + 'rs': 2, + 'bt-auth-appkey': 7736975579, + 'terminal': 'GW_APP_Haval', + 'enterpriseId': 'CC01', + 'sys': 'Android', + 'brand': '1', + 'accessToken': this.ck, + 'tokenId': '3177c9de1b5841d39b4dd85cc119edad', + 'sys': 'Android', + 'cVer': '4.4.900', + 'Host': 'gw-app.beantechyun.com', + 'Connection': 'Keep-Alive', + //'Accept-Encoding': 'gzip' + 'User-Agent': 'okhttp/4.2.2', + 'If-Modified-Since': 'Sun, 29 Jan 2023 02:20:01 GMT', + } + this.postHeaders = { + 'ip': '192.168.31.223', + 'rs': 2, + 'bt-auth-appkey': 7736975579, + 'terminal': 'GW_APP_Haval', + 'enterpriseId': 'CC01', + 'sys': 'Android', + 'brand': '1', + 'accessToken': this.ck, + 'tokenId': '3177c9de1b5841d39b4dd85cc119edad', + 'sys': 'Android', + 'cVer': '4.4.900', + 'Host': 'gw-app.beantechyun.com', + 'Connection': 'Keep-Alive', + //'Accept-Encoding': 'gzip' + 'User-Agent': 'okhttp/4.2.2', + 'Content-Type': 'application/json; charset=UTF-8' + } + + } + async getSign(method, url, nonce, ts, data) { + let r = encodeURIComponent(method + url + 'bt-auth-appkey:7736975579' + 'bt-auth-nonce:' + nonce + 'bt-auth-timestamp:' + ts + data + '8a23355d9f6a3a41deaf37a628645c62') + return SHA256_Encrypt(r) + } + async point_info() { + try { + let Headers = this.getHeaders; + let url = `/app-api/api/v1.0/point/querySumPoint` + let data = 'port=HJ0002' + Headers['bt-auth-nonce'] = this.nonce + Headers['bt-auth-timestamp'] = this.ts + Headers['bt-auth-sign'] = await this.getSign('GET', url, this.nonce, this.ts, data) + let options = { + url: `https://gw-app.beantechyun.com` + url + '?' + data, + headers: Headers + } + options = changeCode(options) //把某软件生成的代码(request或axios或jquery)转换为got通用 + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == '000000') { + DoubleLog(`账号[${this.index}] 积分剩余: ${result.data.remindPoint}`); + if (!result.data.signIn) { + //签到 + DoubleLog(`检测到未签到,执行签到`) + await this.task_signin() + } + } else { + DoubleLog(`账号[${this.index}] 积分剩余:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_signin() { + try { + let options = { + url: `https://bt-h5-gateway.beantechyun.com/app-api/api/v1.0/point/sign`, + headers: { + 'Host': 'bt-h5-gateway.beantechyun.com', + 'Connection': 'keep-alive', + //'Content-Length': 17, + 'Cache-Control': 'max-age=0', + 'accessToken': this.ck, + 'rs': '2', + 'terminal': 'GW_APP_Haval', + '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/89.0.4389.72 MQQBrowser/6.2 TBS/046141 Mobile Safari/537.36 fromapp fromapp_Android_havalcVer=4.4.900', + 'Content-Type': 'application/json;charset=UTF-8', + 'cVer': '4.4.900', + //'Accept': 'application/json, textain, */*', + 'bt-auth-appKey': '7849495624', + 'brand': '1', + 'If-Modified-Since': '0', + 'tokenId': '3177c9de1b5841d39b4dd85cc119edad', + 'enterpriseId': 'CC01', + 'os': 'ANDROID', + 'Origin': 'https://haval-restructure-h5.beantechyun.com', + 'X-Requested-With': 'com.navinfo.gw', + 'Sec-Fetch-Site': 'same-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://haval-restructure-h5.beantechyun.com/', + //'Accept-Encoding': 'gzip, deflate, br', + //'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' + }, + body: { "port": "HJ0002" } + } + options = changeCode(options) //把某软件生成的代码(request或axios或jquery)转换为got通用 + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == '000000') { + DoubleLog(`账号[${this.index}] 签到成功: 获得[${result.data.pointResultMessage}]`); + } else { + DoubleLog(`账号[${this.index}] 签到:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async art_list() { + try { + let body = `{"newVersion":"1","pageParam":{"pageNo":1,"pageSize":21},"queryParam":{"firstThreadId":"","homeRecommendation":"0","lastThreadCreateTime":"202301280730000","lastThreadId":"","newVersion":"1","operatingTime":"202301291603577"},"routeRecommendDTO":{"latitude":"37.190615","longitude":"114.551969","startCity":"邢台市","startCityCode":"0319"},"sortParam":{"order":"1","type":"6"}}` + let bodydata = `json=` + body + let Headers = this.postHeaders; + let url = `/app-api/api/v1.0/community/route/queryPostAndActivity` + Headers['bt-auth-nonce'] = this.nonce + Headers['bt-auth-timestamp'] = this.ts + Headers['bt-auth-sign'] = await this.getSign('POST', url, this.nonce, this.ts, bodydata) + let options = {//注意看sign的参数 这里要注意 和url一直一致 + url: `https://gw-app.beantechyun.com` + url, + headers: Headers, + body: body + } + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == '000000') { + let artId, value; + for (let i = 0; i < 5; i++) { + if ('posts' in result.data.list[i]) { + artId = result.data.list[i].posts[0].threadBasic.id + value = result.data.list[i].posts[0].threadBasic.author.beanId + //await $.wait(5000) + //await this.task_like(artId, value) + } else { + artId = result.data.list[i].threadBasic.id + value = result.data.list[i].threadBasic.author.userBasic.beanId + //await $.wait(5000) + //await this.task_like(artId, value) + } + } + + } else { + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_like(artId, value) { + try { + let body = `{"id":${artId},"objs":[{"attr":"masterId","value":${value}},{"attr":"mobile","value":""},{"attr":"objectId","value":${artId}}],"oprType":1,"port":"HJ0013","type":0}` + let bodydata = `json=` + body + let Headers = this.postHeaders; + let url = '/app-api/api/v1.0/community/like' + Headers['bt-auth-nonce'] = this.nonce + Headers['bt-auth-timestamp'] = this.ts + Headers['bt-auth-sign'] = await this.getSign('POST', url, this.nonce, this.ts, bodydata) + let options = { + url: `https://gw-app.beantechyun.com` + url, + headers: Headers, + body: body + } + options = changeCode(options) + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == '000000') { + DoubleLog(`账号[${this.index}] 点赞成功: [${artId}]`); + } else { + DoubleLog(`账号[${this.index}] 点赞:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +function randomszxx(e) { + e = e || 32; + var t = "qwertyuioplkjhgfdsazxcvbnm1234567890", + a = t.length, + n = ""; + + for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); + return n; +} +function ts13() { + return Math.round(new Date().getTime()).toString(); +} + +function changeCode(oldoptions) { + let newoptions = new Object(), + urlTypeArr = ['qs', 'params'], + bodyTypeArr = ['body', 'data', 'form', 'formData'] + for (let e in urlTypeArr) { + urlTypeArr[e] in oldoptions ? newoptions.url = changeUrl(urlTypeArr[e]) : newoptions.url = oldoptions.url + } + 'content-type' in oldoptions.headers ? newoptions.headers = changeHeaders(oldoptions.headers) : newoptions.headers = oldoptions.headers + function changeUrl(type) { + url = oldoptions.url + '?' + for (let key in oldoptions[type]) { url += key + '=' + oldoptions[type][key] + '&' } + url = url.substring(0, url.length - 1) + return url + } + function changeHeaders(headers) { + let tmp = headers['content-type'] + delete headers['content-type'] + headers['Content-Type'] = tmp + return headers + } + for (let o in bodyTypeArr) { + if (bodyTypeArr[o] in oldoptions) { + (Object.prototype.toString.call(oldoptions[bodyTypeArr[o]]) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions[bodyTypeArr[o]]) : newoptions.body = oldoptions[bodyTypeArr[o]] + } + } + return newoptions +} +function httpRequest(options, method) { + //options = changeCode(options) + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + //console.log(JSON.parse(err)); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + data = JSON.parse(data); + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +// 等待 X 秒 +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000) + }) +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +function SHA256_Encrypt(data) { + sha256_init(); + sha256_update(data, data.length); + sha256_final(); + return sha256_encode_hex(); +} +/* SHA256 logical functions */ function rotateRight(n, x) { return (x >>> n) | (x << (32 - n)); } function choice(x, y, z) { return (x & y) ^ (~x & z); } function majority(x, y, z) { return (x & y) ^ (x & z) ^ (y & z); } function sha256_Sigma0(x) { return rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x); } function sha256_Sigma1(x) { return rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x); } function sha256_sigma0(x) { return rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3); } function sha256_sigma1(x) { return rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10); } function sha256_expand(W, j) { return (W[j & 0x0f] += sha256_sigma1(W[(j + 14) & 0x0f]) + W[(j + 9) & 0x0f] + sha256_sigma0(W[(j + 1) & 0x0f])); } /* Hash constant words K: */ var K256 = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2); /* global arrays */ var ihash, count, buffer; var sha256_hex_digits = "0123456789abcdef"; /* Add 32-bit integers with 16-bit operations (bug in some JS-interpreters: overflow) */ function safe_add(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xffff); } /* Initialise the SHA256 computation */ function sha256_init() { ihash = new Array(8); count = new Array(2); buffer = new Array(64); count[0] = count[1] = 0; ihash[0] = 0x6a09e667; ihash[1] = 0xbb67ae85; ihash[2] = 0x3c6ef372; ihash[3] = 0xa54ff53a; ihash[4] = 0x510e527f; ihash[5] = 0x9b05688c; ihash[6] = 0x1f83d9ab; ihash[7] = 0x5be0cd19; } /* Transform a 512-bit message block */ function sha256_transform() { var a, b, c, d, e, f, g, h, T1, T2; var W = new Array(16); /* Initialize registers with the previous intermediate value */ a = ihash[0]; b = ihash[1]; c = ihash[2]; d = ihash[3]; e = ihash[4]; f = ihash[5]; g = ihash[6]; h = ihash[7]; /* make 32-bit words */ for (var i = 0; i < 16; i++) W[i] = buffer[(i << 2) + 3] | (buffer[(i << 2) + 2] << 8) | (buffer[(i << 2) + 1] << 16) | (buffer[i << 2] << 24); for (var j = 0; j < 64; j++) { T1 = h + sha256_Sigma1(e) + choice(e, f, g) + K256[j]; if (j < 16) T1 += W[j]; else T1 += sha256_expand(W, j); T2 = sha256_Sigma0(a) + majority(a, b, c); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); } /* Compute the current intermediate hash value */ ihash[0] += a; ihash[1] += b; ihash[2] += c; ihash[3] += d; ihash[4] += e; ihash[5] += f; ihash[6] += g; ihash[7] += h; } /* Read the next chunk of data and update the SHA256 computation */ function sha256_update(data, inputLen) { var i, index, curpos = 0; /* Compute number of bytes mod 64 */ index = (count[0] >> 3) & 0x3f; var remainder = inputLen & 0x3f; /* Update number of bits */ if ((count[0] += inputLen << 3) < inputLen << 3) count[1]++; count[1] += inputLen >> 29; /* Transform as many times as possible */ for (i = 0; i + 63 < inputLen; i += 64) { for (var j = index; j < 64; j++) buffer[j] = data.charCodeAt(curpos++); sha256_transform(); index = 0; } /* Buffer remaining input */ for (var j = 0; j < remainder; j++) buffer[j] = data.charCodeAt(curpos++); } /* Finish the computation by operations such as padding */ function sha256_final() { var index = (count[0] >> 3) & 0x3f; buffer[index++] = 0x80; if (index <= 56) { for (var i = index; i < 56; i++) buffer[i] = 0; } else { for (var i = index; i < 64; i++) buffer[i] = 0; sha256_transform(); for (var i = 0; i < 56; i++) buffer[i] = 0; } buffer[56] = (count[1] >>> 24) & 0xff; buffer[57] = (count[1] >>> 16) & 0xff; buffer[58] = (count[1] >>> 8) & 0xff; buffer[59] = count[1] & 0xff; buffer[60] = (count[0] >>> 24) & 0xff; buffer[61] = (count[0] >>> 16) & 0xff; buffer[62] = (count[0] >>> 8) & 0xff; buffer[63] = count[0] & 0xff; sha256_transform(); } /* Split the internal hash values into an array of bytes */ function sha256_encode_bytes() { var j = 0; var output = new Array(32); for (var i = 0; i < 8; i++) { output[j++] = (ihash[i] >>> 24) & 0xff; output[j++] = (ihash[i] >>> 16) & 0xff; output[j++] = (ihash[i] >>> 8) & 0xff; output[j++] = ihash[i] & 0xff; } return output; } /* Get the internal hash as a hex string */ function sha256_encode_hex() { var output = new String(); for (var i = 0; i < 8; i++) { for (var j = 28; j >= 0; j -= 4) output += sha256_hex_digits.charAt((ihash[i] >>> j) & 0x0f); } return output; } + +// 完整 Env +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) } diff --git a/hqcsh.js b/hqcsh.js new file mode 100644 index 0000000..4e99ad7 --- /dev/null +++ b/hqcsh.js @@ -0,0 +1,416 @@ +/** + * + *hqcsh + *Author: Mist + *Date: 2024-06-02 + * cron 0 6,18 * * * 好奇车生活.js + * 微信小程序 好奇车生活 ck有效期不清楚 完成签到 抽奖 日常任务 新手任务 + * 抓域名https://channel.cheryfs.cn/下 accountId + * export hqcsh= accountId 多账号换行或者#分隔 + */ +// ============================================================================================================ +const $ = new Env('vx好奇车生活') +//const notify = $.isNode() ? require("./sendNotify") : ""; +const got = require('got') //青龙发包依赖 +const env_name = 'hqcsh' //环境变量名字 +const env = process.env[env_name] || '' //或 process.env.zippoCookie, node读取变量方法. 后面的 || 表示如果前面结果为false或者空字符串或者null或者undifined, 就取后面的值 +const Notify = 1//是否通知, 1通知, 0不通知. 默认通知 +const debug = 0//是否调试, 1调试, 0不调试. 默认不调试 +let scriptVersionNow = "1.0.1";//脚本版本号 +let msg = ""; +//let host = 'channel.cheryfs.cn';//用got时注释 +//let hostname = 'https://' + host; +// ==================================异步顺序============================================================================== +!(async () => { + //await getNotice(); //远程通知 + + //await getVersion("yang7758258/ohhh154@main/好奇车生活.js"); + await main();//主函数 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +//==================================脚本入口函数main()============================================================== +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}`) + return + } + let user_ck = env.split('\n')//多账号分割,这里默认是换行(\n)分割,其他情况自己实现 + let index = 1 //用来给账号标记序号, 从1开始 + //循环遍历每个账号 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + //默认用&分割多变量 + let ck_info = ck.split('&') + let accountId = ck_info[0] + //let aesOpenid = ck_info[2] + //let aesUnionid = ck_info[3] + //let sectoken = ck_info[4] + //用一个对象代表账号, 里面存放账号信息 + let user = { + index: index, + accountId, + //unionid, + //aesOpenid, + //aesUnionid, + //sectoken, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + await userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`账号[${user.index}]随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +// ======================================开始任务=================================================================================== +async function userTask(user) { + //任务逻辑都放这里了, 与脚本入口分开, 方便分类控制并模块化 + console.log(`\n============= 账号[${user.index}]开始任务 =============`) + //debugLog(`【debug】 这是你的账号数组:\n ${user}`); + await SignTask(user) + //await wait(2) + //await drawTask(user) + await wait(2) + await missonTask(user,id) + await wait(2) + await missonTask(user,id1) + await wait(2) + await missonTask(user,id2) + await wait(2) + await missonTask(user,id3) + await wait(2) + await missonTask(user,id4) + await wait(2) + await missonTask(user,id5) + await wait(2) + await missonTask(user,id6) + await wait(2) + await missonTask(user,id7) + await wait(2) + await jifen(user) + +} +// ============================================================================================================================= +//用户签到 +async function SignTask(user) { + //user: 用户参数, 里面存放ck和账户信息啥的. 进阶可以用类(class)的方法的代替, 效率更高 + //养成良好习惯, 每个方法里面都用try catch包起来, 这样出错了也不影响下一个步骤进行 + try { + let urlObject = { + method: 'get', + fn: 'SignTask', + url: 'https://channel.cheryfs.cn/archer/activity-api/signinact/signin', + headers: { + "tenantId": "619669306447261696", + "activityId": "620810406813786113", + "accountId": user.accountId, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) XWEB/9129", + }, + //body: `{"isReward":false}` 请求体,get方法没有请求体 httpRequest + //form: {"isReward":false} Got + }; + //解构返回, 只需要result也可以这样: + // const {result} = await request(urlObject); + //let result = await httpRequest(urlObject) + const { statusCode, headers, result } = await request(urlObject) + //console.log(statusCode, headers, result); + // console.log(urlObject); + // console.log(result); + // ?.语法: 前面的结果为null/undefined的时候不再执行后面操作, 可以简单的防止出错 + if (result?.code == 200) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊今日签到状态为:[${result.message}]🎉`); + } else { + //打印请求错误信息 + DoubleLog(`🌸账号[${user.index}]签到失败,可能是CK失效!`) + } + } catch (e) { + //打印错误信息 + console.log(e) + } +} +// ============================================================================================ +//存放任务taskid +const taskId = [ + "662805299354165248",//逛好物 + "662805189626974208",//维修保养 + "662793252641984512",//本地车服 + "662794321581330432",//选二手车 + "662794237938524160",//选新车 + "662794135429734400",//汽车回收 + "662805119309467648",//附近加油站 + "662805251388100608"//违章 + ]; +const id = taskId[0] +const id1 = taskId[1] +const id2 = taskId[2] +const id3 = taskId[3] +const id4 = taskId[4] +const id5 = taskId[5] +const id6 = taskId[6] +const id7 = taskId[7] +// ============================================================================================ +//每日抽奖接口 +async function drawTask(user) { + try { + let urlObject = { + method: 'get', + fn: 'drawTask', + url: 'https://channel.cheryfs.cn/archer/activity-api/luckydraw/luckydraw/AE22E8BBFEE84ADE9D4A65FF3C5EB038', + headers: { + "tenantId": "619669306447261696", + "activityId": "620821692188483585", + "accountId": user.accountId, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) XWEB/9129", + }, + //body: `{"isReward":false}` 请求体,get方法没有请求体 httpRequest + //form: {"isReward":false} Got + }; + const { statusCode, headers, result } = await request(urlObject) + console.log(statusCode, headers, result); + //解构返回 + if (result?.code == 200) { + DoubleLog(`🌸账号[${user.index}]` + `🕊抽奖状态:[${result.message}]🎉`) + } else { + //打印请求错误信息 + DoubleLog(`🌸账号[${user.index}]抽奖失败`) + } + } catch (e) { + //打印错误信息 + console.log(e) + } +} + +//任务接口 +async function missonTask(user,taskid) { + try { + let urlObject = { + method: 'get', + fn: 'missonTask', + url: `https://channel.cheryfs.cn/archer/activity-api/taskItem/achieve?taskItemId=${taskid}`, + headers: { + "tenantId": "619669306447261696", + "activityId": "661720946758930433", + "accountId": user.accountId, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) XWEB/9129", + }, + //body: `{"isReward":false}` 请求体,get方法没有请求体 httpRequest + //form: {"isReward":false} Got + }; + //解构返回, 只需要result也可以这样: + // const {result} = await request(urlObject); + //let result = await httpRequest(urlObject) + const { statusCode, headers, result } = await request(urlObject) + //console.log(statusCode, headers, result); + if (result?.code == 200) { + DoubleLog(`🌸账号[${user.index}]任务${result.message}` + `\n🕊任务编号:${taskid}🎉`) + } else{ + //打印请求错误信息 + DoubleLog(`🌸账号[${user.index}]任务失败:[${result.message}]`) + } + } catch (e) { + //打印错误信息 + console.log(e) + } +} +//查询接口 +async function jifen(user) { + try { + let urlObject = { + method: 'get', + fn: 'jifen', + url: "https://channel.cheryfs.cn/archer/activity-api/common/accountPointLeft?pointId=620415610219683840&showExpire=true&timeType=day&indexDay", + headers: { + "tenantId": "619669306447261696", + "activityId": "621883730893492225", + "accountId": user.accountId, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) XWEB/9129", + }, + //body: `{"isReward":false}` //请求体,get方法没有请求体 //httpRequest + // form: + // { + // "pointId": "620415610219683840", + // "accountId": "", + // "type": "1", + // "pageNumber": "1", + // "pageSize": "10", + // "startDate": "", + // "endDate": "" + // } + }; + //解构返回, 只需要result也可以这样: + // const {result} = await request(urlObject); + //let result = await httpRequest(urlObject) + const { statusCode, headers, result } = await request(urlObject) + //console.log(statusCode, headers, result); + if (result?.code == 200) { + DoubleLog(`🌸账号[${user.index}]总积分💰:[${result.result}]🎉`) + } else{ + //打印请求错误信息 + DoubleLog(`🌸账号[${user.index}]积分查询失败`) + } + } catch (e) { + //打印错误信息 + console.log(e) + } +} +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + //let text = '仅完成积分签到\n@auth:Mist\n@date:2024-05-29\n注: 本脚本仅用于个人学习和交流请勿用于非法用途。用户应当遵守所有适用的法律和规定。在任何情况下,脚本的开发者或贡献者均不对任何直接或间接使用本脚本而产生的结果负责。' + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} +// ==========================================================时间戳===================================================== +function getTimestamp() { + return new Date().getTime(); +} + +//===============================================网络请求httpRequest========================================= +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//==============================================Debug模式=============================================== +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "https://gitee.com/ohhhooh/jd_haoyangmao/raw/master/Notice.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +//==============================================获取远程版本================================================= +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} +//=================================GOT=========================================================== +async function request(opt) { + const DEFAULT_RETRY = 3 //请求出错重试三次 + var resp = null, count = 0 + var fn = opt.fn || opt.url + opt.method = opt?.method?.toUpperCase() || 'GET' + while (count++ < DEFAULT_RETRY) { + try { + var err = null + const errcodes = ['ECONNRESET', 'EADDRINUSE', 'ENOTFOUND', 'EAI_AGAIN'] + await got(opt).then(t => { + resp = t + }, e => { + err = e + resp = e.response + }) + if (err) { + if (err.name == 'TimeoutError') { + console.log(`[${fn}]请求超时(${err.code}),重试第${count}次`) + } else if (errcodes.includes(err.code)) { + console.log(`[${fn}]请求错误(${err.code}),重试第${count}次`) + } else { + let statusCode = resp?.statusCode || -1 + console.log(`[${fn}]请求错误(${err.message}), 返回[${statusCode}]`) + break + } + } else { + break + } + } catch (e) { + console.log(`[${fn}]请求错误(${e.message}),重试第${count}次`) + }; + } + let { statusCode = -1, headers = null, body = null } = resp + if (body) try { body = JSON.parse(body) } catch { }; + return { statusCode, headers, result: body } +} +//=============================================================================================================================================== +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/htx.js b/htx.js new file mode 100644 index 0000000..bd3a08d --- /dev/null +++ b/htx.js @@ -0,0 +1,966 @@ +/* +@随缘撸豆 + +06.25 加入通知 + +有显示系统异常的自行更新ck +沪碳行app 自行百度下载 +一天一毛数字人民币 小毛 +抓取 htx.lcago.cn body中的 token 和deviceCoding +多账号换行 也可以自建一个htx.txt放到和脚本一个文件夹内 +htx 'token#deviceCoding' +cron 10 7,17 * * * htx.js +https://raw.githubusercontent.com/liuqi6968/-/main/htx.js +*/ +const $ = new Env("沪碳行"); +const fs = require('fs') +let httpResult, httpReq, httpResp +const ckFile1 = 'htx.txt' +const ckName = 'htx' +let userCookie = [] +try { + userCookie = userCookie.concat(fs.readFileSync(`./${ckFile1}`,'utf-8').split('\n')||[]) + console.log(`ck文件[ ${ckFile1} ]加载成功`) + this.mxr = true +} catch (e) { + console.log(`未发现本地文件 调用青龙环境变量`) + this.mxr = false +} +let mxr=this.mxr +if (this.mxr == false){ + try { + userCookie = userCookie.concat((($.isNode() ? process.env[ckName] : $.getdata(ckName))||'')?.split('\n')||[]) + console.log(`环境变量[ ${ckName} ]加载成功`) +} catch (e) { + //console.log(e) +} +} +let userList = [] +let userIdx = 0 +/////////////////////////////////////////////////////////////////// +class UserInfo { + constructor(str) { + this.n=++userIdx,this.index = `账号 [${this.n}]` + this.ck=str.split('#') + } +// + async sign () { + try { + let url = `https://htx.lcago.cn/signIn/sign` + let body = `{"token":"${this.ck[0]}","deviceCoding":"${this.ck[1]}","language": "ZH","appChannel": "htx","systemversion": "9"}` + let h = { + "Content-Type": "application/json; charset\u003dutf-8", + "Host": "htx.lcago.cn", + } + let urlObject = popu(url, h, body) + // console.log(urlObject) + await httpRequest('post', urlObject) + let result = httpResult; + //console.log(result) + if (result.respcod == '01'){ + console.log(`${this.index} ${result.respmsg}`) + }else if (result.respcod == '02'){ + console.log(`${this.index} ${result.respmsg}`) + }else if (result.respcod == '04'){ + console.log(`${this.index} ${result.respmsg}`) + } + } catch (e) {} finally { + return Promise.resolve(1); + } + } + async participate () { + try { + let url = `https://carbon.lcago.cn/community/participate` + let body = `{"token":"${this.ck[0]}","deviceCoding":"${this.ck[1]}","taskId":"EHD8472JSDS_htx"}` + let h = { + "Content-Type": "application/json; charset\u003dutf-8", + "Host": "htx.lcago.cn", + } + let urlObject = popu(url, h, body) + // console.log(urlObject) + await httpRequest('post', urlObject) + let result = httpResult; + // console.log(result) + if (result.respcod == '01'){ + console.log(`${this.index} 答题 ${result.respmsg} `) + await this.dt() + }else if (result.respcod == '02'){ + console.log(result.respmsg) + }else if (result.respcod == '04'){ + console.log(result.respmsg) + } + } catch (e) {} finally { + return Promise.resolve(1); + } + } + //答题 + async dt () { + try { + let url = `https://htx.lcago.cn/community/requestQuestion` + let body = `{"token":"${this.ck[0]}","deviceCoding":"${this.ck[1]}","taskId":"EHD8472JSDS_htx"}` + let h = { + "Content-Type": "application/json; charset\u003dutf-8", + "Host": "htx.lcago.cn", + } + let urlObject = popu(url, h, body) + // console.log(urlObject) + await httpRequest('post', urlObject) + let result = httpResult; + //console.log(result) + if (result.respcod == '01'){ + console.log(`${this.index} 答题 ${result.respmsg}`) + for (let i=0;i { + if(typeof $request !== "undefined") { + await GetRewrite() + } else { + if(!(await checkEnv())) return; + if (userList.length>0){ + taskll = [], console.log(`\n============= 签到 =============`) + for(let user of userList) { + await user.sign() + } + console.log(`\n============= 答题 =============`) + for(let user of userList) { + await user.dt() + } + console.log(`\n============= 收取能量 =============`) + for(let user of userList) { + await user.interact() + } + console.log(`\n============= 个人信息 =============`) + for(let user of userList) { + await user.myData() + } + } + await $.showmsg() + + } +})() +.catch((e) => console.log(e)) + .finally(() => $.done()) +function randomArr(arr){ + return arr[parseInt(Math.random() * arr.length, 10)] + } +/////////////////////////////////////////////////////////////////// +async function GetRewrite () { + +} +function number(d) { var b = parseFloat(d); if (isNaN(b)) return !1; var b = Math.round(100 * d) / 100, a = b.toString(), c = a.indexOf("."); for (c < 0 && (c = a.length, a += "."); a.length <= c + 2;)a += "0"; return a } +function checkEnv() { + if(userCookie) { + for(let userCookies of userCookie) { + if(userCookies) userList.push(new UserInfo(userCookies)) + } + userCount = userList.length + } else { + console.log(`未找到CK`) + return false; + } + + console.log(`\n共找到${userCount}个账号`) + return true +} +//////////////////////////////////////////////////////////////////// +function popu (url, h, body = '') { + let host = url.replace('//', '/').split('/')[1] + let urlObject = { + url: url, + headers: h + } + if(body) { + urlObject.body = body + urlObject.headers['Content-Length'] = body?.length || 0 + } + return urlObject; +} + + + + +async function httpRequest (method, url) { + httpResult = null, httpReq = null, httpResp = null; + return new Promise((resolve) => { + $.send(method, url, async (err, req, resp) => { + try { + httpReq = req; + httpResp = resp; + if(err) { + console.log(`${method}请求失败`); + console.log(JSON.stringify(err)); + } else { + if(resp.body) { + if(typeof resp.body == "object") { + httpResult = resp.body; + } else { + try { + httpResult = JSON.parse(resp.body); + } catch (e) { + httpResult = resp.body; + } + } + } + } + } catch (e) { + console.log(e); + } finally { + resolve(); + } + }); + }); +} + +//////////////////////////////////////////////////////////////////// +//RSA加密,JSEncrypt +function RSA (msg, key) { + let enc = new JSEncrypt(); + enc.setPublicKey(key) + return enc.encrypt(msg).toString(); +} +//AES/DES加解密,CryptoJS +function EncryptCrypto (method, mode, padding, message, key, iv) { + return CryptoJS[method].encrypt( + CryptoJS.enc.Utf8.parse(message), + CryptoJS.enc.Utf8.parse(key), { + mode: CryptoJS.mode[mode], + padding: CryptoJS.pad[padding], + iv: CryptoJS.enc.Utf8.parse(iv) + } + ).ciphertext.toString(CryptoJS.enc.Base64); +} + +function DecryptCrypto (method, mode, padding, message, key, iv) { + return CryptoJS[method].decrypt({ + ciphertext: CryptoJS.enc.Base64.parse(message) + }, + CryptoJS.enc.Utf8.parse(key), { + mode: CryptoJS.mode[mode], + padding: CryptoJS.pad[padding], + iv: CryptoJS.enc.Utf8.parse(iv) + } + ).toString(CryptoJS.enc.Utf8); +} +//Base64加解密 +var Base64 = { + _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + encode: function(e) { + var t = ""; + var n, r, i, s, o, u, a; + var f = 0; + e = Base64._utf8_encode(e); + while(f < e.length) { + n = e.charCodeAt(f++); + r = e.charCodeAt(f++); + i = e.charCodeAt(f++); + s = n >> 2; + o = (n & 3) << 4 | r >> 4; + u = (r & 15) << 2 | i >> 6; + a = i & 63; + if(isNaN(r)) { + u = a = 64 + } else if(isNaN(i)) { + a = 64 + } + t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a) + } + return t + }, + decode: function(e) { + var t = ""; + var n, r, i; + var s, o, u, a; + var f = 0; + e = e.replace(/[^A-Za-z0-9+/=]/g, ""); + while(f < e.length) { + s = this._keyStr.indexOf(e.charAt(f++)); + o = this._keyStr.indexOf(e.charAt(f++)); + u = this._keyStr.indexOf(e.charAt(f++)); + a = this._keyStr.indexOf(e.charAt(f++)); + n = s << 2 | o >> 4; + r = (o & 15) << 4 | u >> 2; + i = (u & 3) << 6 | a; + t = t + String.fromCharCode(n); + if(u != 64) { + t = t + String.fromCharCode(r) + } + if(a != 64) { + t = t + String.fromCharCode(i) + } + } + t = Base64._utf8_decode(t); + return t + }, + _utf8_encode: function(e) { + e = e.replace(/rn/g, "n"); + var t = ""; + for(var n = 0; n < e.length; n++) { + var r = e.charCodeAt(n); + if(r < 128) { + t += String.fromCharCode(r) + } else if(r > 127 && r < 2048) { + t += String.fromCharCode(r >> 6 | 192); + t += String.fromCharCode(r & 63 | 128) + } else { + t += String.fromCharCode(r >> 12 | 224); + t += String.fromCharCode(r >> 6 & 63 | 128); + t += String.fromCharCode(r & 63 | 128) + } + } + return t + }, + _utf8_decode: function(e) { + var t = ""; + var n = 0; + var r = c1 = c2 = 0; + while(n < e.length) { + r = e.charCodeAt(n); + if(r < 128) { + t += String.fromCharCode(r); + n++ + } else if(r > 191 && r < 224) { + c2 = e.charCodeAt(n + 1); + t += String.fromCharCode((r & 31) << 6 | c2 & 63); + n += 2 + } else { + c2 = e.charCodeAt(n + 1); + c3 = e.charCodeAt(n + 2); + t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63); + n += 3 + } + } + return t + } +} +//MD5 +function MD5Encrypt (a) { + function b (a, b) { + return a << b | a >>> 32 - b + } + + function c (a, b) { + var c, d, e, f, g; + return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f + } + + function d (a, b, c) { + return a & b | ~a & c + } + + function e (a, b, c) { + return a & c | b & ~c + } + + function f (a, b, c) { + return a ^ b ^ c + } + + function g (a, b, c) { + return b ^ (a | ~c) + } + + function h (a, e, f, g, h, i, j) { + return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e) + } + + function i (a, d, f, g, h, i, j) { + return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d) + } + + function j (a, d, e, g, h, i, j) { + return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d) + } + + function k (a, d, e, f, h, i, j) { + return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d) + } + + function l (a) { + for(var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;) b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | a.charCodeAt(i) << h, i++; + return b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g + } + + function m (a) { + var b, c, d = "", + e = ""; + for(c = 0; 3 >= c; c++) b = a >>> 8 * c & 255, e = "0" + b.toString(16), d += e.substr(e.length - 2, 2); + return d + } + + function n (a) { + a = a.replace(/\r\n/g, "\n"); + for(var b = "", c = 0; c < a.length; c++) { + var d = a.charCodeAt(c); + 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128), b += String.fromCharCode(63 & d | 128)) + } + return b + } + var o, p, q, r, s, t, u, v, w, x = [], + y = 7, + z = 12, + A = 17, + B = 22, + C = 5, + D = 9, + E = 14, + F = 20, + G = 4, + H = 11, + I = 16, + J = 23, + K = 6, + L = 10, + M = 15, + N = 21; + for(a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16) p = t, q = u, r = v, s = w, t = h(t, u, v, w, x[o + 0], y, 3614090360), w = h(w, t, u, v, x[o + 1], z, 3905402710), v = h(v, w, t, u, x[o + 2], A, 606105819), u = h(u, v, w, t, x[o + 3], B, 3250441966), t = h(t, u, v, w, x[o + 4], y, 4118548399), w = h(w, t, u, v, x[o + 5], z, 1200080426), v = h(v, w, t, u, x[o + 6], A, 2821735955), u = h(u, v, w, t, x[o + 7], B, 4249261313), t = h(t, u, v, w, x[o + 8], y, 1770035416), w = h(w, t, u, v, x[o + 9], z, 2336552879), v = h(v, w, t, u, x[o + 10], A, 4294925233), u = h(u, v, w, t, x[o + 11], B, 2304563134), t = h(t, u, v, w, x[o + 12], y, 1804603682), w = h(w, t, u, v, x[o + 13], z, 4254626195), v = h(v, w, t, u, x[o + 14], A, 2792965006), u = h(u, v, w, t, x[o + 15], B, 1236535329), t = i(t, u, v, w, x[o + 1], C, 4129170786), w = i(w, t, u, v, x[o + 6], D, 3225465664), v = i(v, w, t, u, x[o + 11], E, 643717713), u = i(u, v, w, t, x[o + 0], F, 3921069994), t = i(t, u, v, w, x[o + 5], C, 3593408605), w = i(w, t, u, v, x[o + 10], D, 38016083), v = i(v, w, t, u, x[o + 15], E, 3634488961), u = i(u, v, w, t, x[o + 4], F, 3889429448), t = i(t, u, v, w, x[o + 9], C, 568446438), w = i(w, t, u, v, x[o + 14], D, 3275163606), v = i(v, w, t, u, x[o + 3], E, 4107603335), u = i(u, v, w, t, x[o + 8], F, 1163531501), t = i(t, u, v, w, x[o + 13], C, 2850285829), w = i(w, t, u, v, x[o + 2], D, 4243563512), v = i(v, w, t, u, x[o + 7], E, 1735328473), u = i(u, v, w, t, x[o + 12], F, 2368359562), t = j(t, u, v, w, x[o + 5], G, 4294588738), w = j(w, t, u, v, x[o + 8], H, 2272392833), v = j(v, w, t, u, x[o + 11], I, 1839030562), u = j(u, v, w, t, x[o + 14], J, 4259657740), t = j(t, u, v, w, x[o + 1], G, 2763975236), w = j(w, t, u, v, x[o + 4], H, 1272893353), v = j(v, w, t, u, x[o + 7], I, 4139469664), u = j(u, v, w, t, x[o + 10], J, 3200236656), t = j(t, u, v, w, x[o + 13], G, 681279174), w = j(w, t, u, v, x[o + 0], H, 3936430074), v = j(v, w, t, u, x[o + 3], I, 3572445317), u = j(u, v, w, t, x[o + 6], J, 76029189), t = j(t, u, v, w, x[o + 9], G, 3654602809), w = j(w, t, u, v, x[o + 12], H, 3873151461), v = j(v, w, t, u, x[o + 15], I, 530742520), u = j(u, v, w, t, x[o + 2], J, 3299628645), t = k(t, u, v, w, x[o + 0], K, 4096336452), w = k(w, t, u, v, x[o + 7], L, 1126891415), v = k(v, w, t, u, x[o + 14], M, 2878612391), u = k(u, v, w, t, x[o + 5], N, 4237533241), t = k(t, u, v, w, x[o + 12], K, 1700485571), w = k(w, t, u, v, x[o + 3], L, 2399980690), v = k(v, w, t, u, x[o + 10], M, 4293915773), u = k(u, v, w, t, x[o + 1], N, 2240044497), t = k(t, u, v, w, x[o + 8], K, 1873313359), w = k(w, t, u, v, x[o + 15], L, 4264355552), v = k(v, w, t, u, x[o + 6], M, 2734768916), u = k(u, v, w, t, x[o + 13], N, 1309151649), t = k(t, u, v, w, x[o + 4], K, 4149444226), w = k(w, t, u, v, x[o + 11], L, 3174756917), v = k(v, w, t, u, x[o + 2], M, 718787259), u = k(u, v, w, t, x[o + 9], N, 3951481745), t = c(t, p), u = c(u, q), v = c(v, r), w = c(w, s); + var O = m(t) + m(u) + m(v) + m(w); + return O.toLowerCase() +} +//SHA1 +function SHA1Encrypt (msg) { + function add (x, y) { + return ((x & 0x7FFFFFFF) + (y & 0x7FFFFFFF)) ^ (x & 0x80000000) ^ (y & 0x80000000); + } + + function SHA1hex (num) { + var sHEXChars = "0123456789abcdef"; + var str = ""; + for(var j = 7; j >= 0; j--) str += sHEXChars.charAt((num >> (j * 4)) & 0x0F); + return str; + } + + function AlignSHA1 (sIn) { + var nblk = ((sIn.length + 8) >> 6) + 1, + blks = new Array(nblk * 16); + for(var i = 0; i < nblk * 16; i++) blks[i] = 0; + for(i = 0; i < sIn.length; i++) blks[i >> 2] |= sIn.charCodeAt(i) << (24 - (i & 3) * 8); + blks[i >> 2] |= 0x80 << (24 - (i & 3) * 8); + blks[nblk * 16 - 1] = sIn.length * 8; + return blks; + } + + function rol (num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); + } + + function ft (t, b, c, d) { + if(t < 20) return (b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; + } + + function kt (t) { + return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514; + } + var x = AlignSHA1(msg); + var w = new Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + for(var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + for(var j = 0; j < 80; j++) { + if(j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); + t = add(add(rol(a, 5), ft(j, b, c, d)), add(add(e, w[j]), kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + a = add(a, olda); + b = add(b, oldb); + c = add(c, oldc); + d = add(d, oldd); + e = add(e, olde); + } + SHA1Value = SHA1hex(a) + SHA1hex(b) + SHA1hex(c) + SHA1hex(d) + SHA1hex(e); + return SHA1Value; +} +//SHA256 +function SHA256 (n) { + const r = 8, + t = 0; + + function o (n, r) { + const t = (65535 & n) + (65535 & r); + return (n >> 16) + (r >> 16) + (t >> 16) << 16 | 65535 & t + } + + function e (n, r) { + return n >>> r | n << 32 - r + } + + function u (n, r) { + return n >>> r + } + + function c (n, r, t) { + return n & r ^ ~n & t + } + + function f (n, r, t) { + return n & r ^ n & t ^ r & t + } + + function i (n) { + return e(n, 2) ^ e(n, 13) ^ e(n, 22) + } + + function h (n) { + return e(n, 6) ^ e(n, 11) ^ e(n, 25) + } + + function C (n) { + return e(n, 7) ^ e(n, 18) ^ u(n, 3) + } + return function(n) { + const r = t ? "0123456789ABCDEF" : "0123456789abcdef"; + let o = ""; + for(let t = 0; t < 4 * n.length; t++) o += r.charAt(n[t >> 2] >> 8 * (3 - t % 4) + 4 & 15) + r.charAt(n[t >> 2] >> 8 * (3 - t % 4) & 15); + return o + }(function(n, r) { + const t = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], + a = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], + g = new Array(64); + let l, d, A, S, m, s, b, p, v, w, y, B; + for(n[r >> 5] |= 128 << 24 - r % 32, n[15 + (r + 64 >> 9 << 4)] = r, v = 0; v < n.length; v += 16) { + for(l = a[0], d = a[1], A = a[2], S = a[3], m = a[4], s = a[5], b = a[6], p = a[7], w = 0; w < 64; w++) g[w] = w < 16 ? n[w + v] : o(o(o(e(D = g[w - 2], 17) ^ e(D, 19) ^ u(D, 10), g[w - 7]), C(g[w - 15])), g[w - 16]), y = o(o(o(o(p, h(m)), c(m, s, b)), t[w]), g[w]), B = o(i(l), f(l, d, A)), p = b, b = s, s = m, m = o(S, y), S = A, A = d, d = l, l = o(y, B); + a[0] = o(l, a[0]), a[1] = o(d, a[1]), a[2] = o(A, a[2]), a[3] = o(S, a[3]), a[4] = o(m, a[4]), a[5] = o(s, a[5]), a[6] = o(b, a[6]), a[7] = o(p, a[7]) + } + var D; + return a + }(function(n) { + const t = [], + o = (1 << r) - 1; + for(let e = 0; e < n.length * r; e += r) t[e >> 5] |= (n.charCodeAt(e / r) & o) << 24 - e % 32; + return t + }(n = function(n) { + n = n.replace(/\r\n/g, "\n"); + let r = ""; + for(let t = 0; t < n.length; t++) { + const o = n.charCodeAt(t); + o < 128 ? r += String.fromCharCode(o) : o > 127 && o < 2048 ? (r += String.fromCharCode(o >> 6 | 192), r += String.fromCharCode(63 & o | 128)) : (r += String.fromCharCode(o >> 12 | 224), r += String.fromCharCode(o >> 6 & 63 | 128), r += String.fromCharCode(63 & o | 128)) + } + return r + }(n)), n.length * r)) +} +//////////////////////////////////////////////////////////////////// +function Env (name, env) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); + return new class { + constructor(name, env) { + this.name = name + this.notifyStr = '' + this.startTime = (new Date).getTime() + Object.assign(this, env) + console.log(`${this.name} 开始运行:\n`) + } + 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 + } + 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 + } + send(m, t, e = (() => {})) { + if(m != 'get' && m != 'post' && m != 'put' && m != 'delete') { + console.log(`无效的http方法:${m}`); + return; + } + if(m == 'get' && t.headers) { + delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if(t.body && t.headers) { + if(!t.headers["Content-Type"]) t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + if(this.isSurge() || this.isLoon()) { + if(this.isSurge() && this.isNeedRewrite) { + t.headers = t.headers || {}; + Object.assign(t.headers, { + "X-Surge-Skip-Scripting": !1 + }); + } + let conf = { + method: m, + url: t.url, + headers: t.headers, + timeout: t.timeout, + data: t.body + }; + if(m == 'get') delete conf.data + $axios(conf).then(t => { + const { + status: i, + request: q, + headers: r, + data: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }); + }).catch(err => console.log(err)) + } else if(this.isQuanX()) { + t.method = m.toUpperCase(), this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), + $task.fetch(t).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => e(t)) + } else if(this.isNode()) { + this.got = this.got ? this.got : require("got"); + const { + url: s, + ...i + } = t; + this.instance = this.got.extend({ + followRedirect: false + }); + this.instance[m](s, i).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t) { + let e = { + "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 s in e) + new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); + return t + } + async showmsg () { + if(!this.notifyStr) return; + let notifyBody = this.name + " 运行通知\n\n" + this.notifyStr + if($.isNode()) { + var notify = require('./sendNotify'); + console.log('\n============== 推送 ==============') + await notify.sendNotify(this.name, notifyBody); + } else { + this.msg(notifyBody); + } + } + logAndNotify(str) { + console.log(str) + this.notifyStr += str + this.notifyStr += '\n' + } + 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 + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); + let h = ["", "============== 系统通知 =============="]; + h.push(e), + s && h.push(s), + i && h.push(i), + console.log(h.join("\n")) + } + getMin(a, b) { + return ((a < b) ? a : b) + } + getMax(a, b) { + return ((a < b) ? b : a) + } + padStr(num, length, padding = '0') { + let numStr = String(num) + let numPad = (length > numStr.length) ? (length - numStr.length) : 0 + let retStr = '' + for(let i = 0; i < numPad; i++) { + retStr += padding + } + retStr += numStr + return retStr; + } + json2str(obj, c, encodeUrl = false) { + let ret = [] + for(let keys of Object.keys(obj).sort()) { + let v = obj[keys] + if(v && encodeUrl) v = encodeURIComponent(v) + ret.push(keys + '=' + v) + } + return ret.join(c); + } + str2json(str, decodeUrl = false) { + let ret = {} + for(let item of str.split('&')) { + if(!item) continue; + let idx = item.indexOf('=') + if(idx == -1) continue; + let k = item.substr(0, idx) + let v = item.substr(idx + 1) + if(decodeUrl) v = decodeURIComponent(v) + ret[k] = v + } + return ret; + } + randomString(len, charset = 'abcdef0123456789') { + let str = ''; + for(let i = 0; i < len; i++) { + str += charset.charAt(Math.floor(Math.random() * charset.length)); + } + return str; + } + randomList(a) { + let idx = Math.floor(Math.random() * a.length) + return a[idx] + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`) + if(this.isSurge() || this.isQuanX() || this.isLoon()) $done(t) + } + }(name, env) +} \ No newline at end of file diff --git a/hyjk.js b/hyjk.js new file mode 100644 index 0000000..a731b85 --- /dev/null +++ b/hyjk.js @@ -0,0 +1,405 @@ +/** + * cron 10 15 * * * + * Show:重写请求函数 在got环境或axios环境都可以请求 适用于 20V版本以上node 本地运行 + * 需要的依赖 jsrsasign 和 encryptlong + * 变量名: heyeHealth + * 变量值: https://tuan.api.ybm100.com/ 请求头Headers中的token 多账号& 或换行 或新建同名变量 + * scriptVersionNow = "0.0.1"; + */ +global['window'] = {} +global['navigator'] = {} +const { JSEncrypt } = require("encryptlong") +const JsRsaSign = require("jsrsasign") +const $ = new Env("荷叶健康小程序-果园[免费领水果]"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "heyeHealth"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class Task { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + //定义在这里的headers会被get请求删掉content-type 而不会重置 + this.taskIdList = [] + this.taskVenueIdList = [] + this.userId = '' + this.treeId = '' + } + async main() { + await this.getInfo() + if (this.userId !== "" && this.treeId !== "") { + await this.signInInfo() + await this.getTaskList();//采集任务API + for (let i of this.taskVenueIdList) { + await this.taskList(i.venueId) + } + if (this.taskIdList.length > 0) { + $.log(` 获取到任务列表`) + $.log(JSON.stringify(this.taskIdList)) + } + for (let i of this.taskIdList) { + await this.updateTaskInfo(i.taskId, 0) + await $.wait(20000) + await this.updateTaskInfo(i.taskId, 1) + } + for (let i of this.taskVenueIdList) { + //在执行一次 领取水滴 + await this.taskList(i.venueId) + } + await this.getInfo() + } + + } + async signInInfo() { + try { + let result = await this.taskRequest("post", `https://tuan.api.ybm100.com/miniapp/marketing/signActivity/signRecord`, JSON.stringify({ + "actId": 5712, + "sceneId": 6, + "channelCode": "130" + })) + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 当日签到状态 ${result.result.todaySignStatusDesc == "已签到" ? "✅" : "❌"} 🎉`) + if (result.result.todaySignStatusDesc !== "已签到") { + await this.signIn() + } + } else { + $.log(`❌账号[${this.index}] 获取签到状态失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } + async signIn() { + try { + let result = await this.taskRequest("post", `https://tuan.api.ybm100.com/miniapp/marketing/signActivity/sign`, JSON.stringify({ "actId": 5712, "sceneId": 6, "channelCode": "130" })) + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 签到成功🎉`) + } else { + $.log(`❌账号[${this.index}] 签到失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } + async getInfo() { + try { + let result = await this.taskRequest("get", `https://tuan.api.ybm100.com/api/healthSquare/fruitManor/getMyManorInfo?channelCode=130`) + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 当前水滴[${result.result.kettleWater}]-[${result.result.progressBarTips}]🎉`) + this.treeId = Number(result.result.treeId) + this.userId = result.result.userId + for (let i = 0; i < Math.floor(Number(result.result.kettleWater) / 10); i++) { + await $.wait(3000) + await this.doWater() + } + } else { + $.log(`❌账号[${this.index}] 获取果园信息失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } + async getTaskList() { + try { + let result = await this.taskRequest("get", `https://tuan.api.ybm100.com/api/healthSquare/fruitManor/getVenueInfo?channelCode=130`) + //console.log(options); + //console.log(result); + if (result.code == 0) { + //获得taskList的venueId + for (let i of result.result.list) { + this.taskVenueIdList.push({ venueId: i.venueId, waterNum: i.waterNum, venueName: i.venueName }) + } + + $.log(`✅账号[${this.index}] 采集任务成功🎉`) + } else { + $.log(`❌账号[${this.index}] 采集任务失败`); + } + } catch (e) { + console.log(e); + } + } + async taskList(venueId) { + try { + let result = await this.taskRequest("get", `https://tuan.api.ybm100.com/api/healthSquare/task/getTaskList?channelCode=130&venueId=${venueId}`) + //console.log(options); + //console.log(result); + if (result.code == 0) { + for (let i of result.result) { + if (i.taskStatus == 0) { //2已完成 + //去完成 + //i.reward 奖励水滴 + if (i.subTitle.indexOf("浏览") != -1) { + this.taskIdList.push({ taskId: i.taskId, mainTitle: i.mainTitle }); + + } + } else if (i.taskStatus == 1) { + await this.collectWater(i.taskId) + } + } + //$.log(`✅账号[${this.index}] 获取到任务🎉`) + } else { + $.log(`❌账号[${this.index}] 未获取到失败`); + } + } catch (e) { + console.log(e); + } + } + + encrypt(body) { + + + + const PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCiBksv2xaOJdSWblaTQl93HI393gYHqKFs89EIFBWYSmYSV+z8XXzMO/Xyo8EeWRpAjT5TuBf0wN467aBx3nsDfJd7e3+txBS7nf+S7Nyjnxx2J5AKPWx1gVmr/OF3aWqxg+DPCB7avakhj+p0QjoJ7eMqgJl/HSX2Kfb6/O3J9wIDAQAB"; + const PRIVATE_KEY = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAKIGSy/bFo4l1JZuVpNCX3ccjf3eBgeooWzz0QgUFZhKZhJX7PxdfMw79fKjwR5ZGkCNPlO4F/TA3jrtoHHeewN8l3t7f63EFLud/5Ls3KOfHHYnkAo9bHWBWav84XdparGD4M8IHtq9qSGP6nRCOgnt4yqAmX8dJfYp9vr87cn3AgMBAAECgYEAlwzbB5Bu5LKsEFppZ/wW2ArM7YIRiQ5TACoGFEv1HfcuVaeXDmdxs02rKzwzDEHxUYDcPFyCKPGtvK5QSBgsAUUBHb6uu0fNGUccGX31NRAfLuQ8fj3W0uvkoYlpDARuokDHhWNqWzI6f8bFHkewJwpjXCO8w1WkogTLiX9Gu3ECQQDd5J4jEDS5+7KaohYRoryyX939mzsZ4RC6ufsfzTJwSlnLyYHEbm0Cs+7gbBxRrioqApBMQPIIoa5ujm1C88MNAkEAuu3htlbpR1ZL9b3wUuf3el/D3i/k9XvSChfHQ1q46Y/eck2yEDH9Kv/ZUxEl4fR8mB2MONm9oc2l+chPd9uQEwJBALcWuNU9vgPoB0tIiuUqXoDgUY+80ltcNi2c3/Uxn3jAIK/iKU0nwJMGXQiYrBVJnEjlrKL+w7cTkZZvtwATmtECQC2JV4vQvkFHj3eMzqeTpKDmBVPx/OekQzV8N2l8B0G2b20O6kqxssevzeRDcCQMJ/HyeL88o8pvy3f+yQUcsosCQQDZXV8K7Ek0R/V3dAdUzoetFSlfjCGy9QKPruz7m+iXBASxiA0R7YGfJzc8jWpuv0pxujtB/awy22K/ggLAhkZU"; + + + const JAVA_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNQpS4ZeHRiIPFIdZgupShTHFlGOqFkT6XEqByvWqt2BvLo3a+YfzyJHOXyfX41OvbIkuIaycuxU9w7RHI1e7F3O7Io+XxncjyU3GR+ae2DEtLaG3o/rtpONF5q1jTN/Spu4GKXsjhHrP9xxMThLF6134NKAyQZfvOms0gS0zmxwIDAQAB" + const JAVA_PRIVATE_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM1ClLhl4dGIg8Uh1mC6lKFMcWUY6oWRPpcSoHK9aq3YG8ujdr5h/PIkc5fJ9fjU69siS4hrJy7FT3DtEcjV7sXc7sij5fGdyPJTcZH5p7YMS0tobej+u2k40XmrWNM39Km7gYpeyOEes/3HExOEsXrXfg0oDJBl+86azSBLTObHAgMBAAECgYA08JI5CRX4G/SYeIS5SAYjn/qzL3z1XCO/hS9ayJ3mHpH0sMFkkxNRRLOHl7BYMFpwl2TR14kwl/VIU+y9VugRK6Se/gdJ/jwGiMdVkO6tGD7s8TwLcgNjAVbwpZCq40h8dQazzyIsPxyww4AP9fQlo5x3eY9v8icw+U58fj4FcQJBAPk4PPCy54ZHMqSTl4E1z+QzZ51z07PFIbGsT/oAg9GOwFjrPjOTQDEPp3cBeAlKmWdUVAjdGYExwuCw4EkG/XkCQQDS2Cx09pwNwMWIN+u3CVneECXS3iUiRPGJkbliFczwjByk3DnBMW15wGNVtJfsM7YFOIir+hW+QfbCKSBjxTY/AkEArPam9LZ1kO/g6e+0+mwKeGpkwxYcG2v5UoIwj2XEFrBoNk4twUW1C1e99g4C7Q/lH52bJPuuM8gBZEfdoVFEoQJBALZ4CPlsVx973jeGFcPBHvoURXeZcs+WlOY2rBYbwdHHoB54zK7KZPECM7V/Zh8vnW4lP/p9owWVtsTPrM1LZicCQDhgvSmpBy0QoUI+wPS9l+YYuLc2loGoWU97RiFbgKqXBexnSg4UHfU8Ot6N4VbIWEhOZV27P0ktsI3UfjGNS6s=" + + // 生成随机串 + function generateRandomString(length) { + var chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; // 包含所有字母和数字的字符集合 + var result = ''; + + for (var i = 0; i < length; i++) { + var randomIndex = Math.floor(Math.random() * chars.length); // 获取随机索引值 + var charAtIndex = chars[randomIndex]; // 根据索引值从字符集合中选择对应的字符 + + result += charAtIndex; // 将字符添加到最终结果中 + } + + return result; + } + // 参数字典表排序 + function sortedKeys(obj) { + let keys = Object.keys(obj).sort(); + let res = {} + keys.forEach(key => { + res[key] = obj[key] + }) + return res + } + function generateRsaKeyWithPKCS8() { + const keyPair = JsRsaSign.KEYUTIL.generateKeypair("RSA", 1024); + const privateKey = JsRsaSign.KEYUTIL.getPEM(keyPair.prvKeyObj, "PKCS8PRV"); + const publicKey = JsRsaSign.KEYUTIL.getPEM(keyPair.pubKeyObj); + return { privateKey, publicKey }; + } + const { privateKey, publicKey } = generateRsaKeyWithPKCS8() + + function objToStr(data) { + let str = "" + for (let i in data) { + str += `${i}=${data[i]}&` + } + str = str.slice(0, str.length - 1) + return str + } + // 生成签名 + function getSign(data) { + const signature = new JsRsaSign.KJUR.crypto.Signature({ + alg: "SHA1withRSA", + }); + signature.init("-----BEGIN PRIVATE KEY-----" + PRIVATE_KEY + "-----END PRIVATE KEY-----"); + let sortData = sortedKeys(data) + let str = objToStr(sortData) + signature.updateString(str); + return JsRsaSign.hextob64(signature.sign()); + } + function getKey() { + const encryptor = new JSEncrypt() + encryptor.setPublicKey("-----BEGIN PUBLIC KEY-----" + JAVA_PUBLIC_KEY + "-----END PUBLIC KEY-----") // 设置公钥 + return encryptor + } + + // 生成加密 + function entryData(data) { + let encryptor = getKey(); + let str = objToStr(data) + return encryptor.encryptLong(str); // 调用封装的方法 + } + + // 解密 + function decrypt(data) { + const encryptor = new JSEncrypt() + encryptor.setPrivateKey(PRIVATE_KEY) + return encryptor.decryptLong(data) + } + let sign = getSign(body) + let timestamp = new Date().getTime() + return entryData({ + sign: sign, + timestamp: timestamp + }) + //通过抓包得到加密JS网址https://www.heyejk.com/game/js/app.87d7f243.js 代码很多 慢慢补环境即可 + //不理解为什么弄两个加密 烦死了 + //smallfawn 2024 / 3 / 23 22.11 + /*const t = body + const { KJUR, hextob64 } = require("jsrsasign") + global['window'] = {} + global['navigator'] = {} + const { JSEncrypt } = require("encryptlong") + const te = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAKIGSy/bFo4l1JZuVpNCX3ccjf3eBgeooWzz0QgUFZhKZhJX7PxdfMw79fKjwR5ZGkCNPlO4F/TA3jrtoHHeewN8l3t7f63EFLud/5Ls3KOfHHYnkAo9bHWBWav84XdparGD4M8IHtq9qSGP6nRCOgnt4yqAmX8dJfYp9vr87cn3AgMBAAECgYEAlwzbB5Bu5LKsEFppZ/wW2ArM7YIRiQ5TACoGFEv1HfcuVaeXDmdxs02rKzwzDEHxUYDcPFyCKPGtvK5QSBgsAUUBHb6uu0fNGUccGX31NRAfLuQ8fj3W0uvkoYlpDARuokDHhWNqWzI6f8bFHkewJwpjXCO8w1WkogTLiX9Gu3ECQQDd5J4jEDS5+7KaohYRoryyX939mzsZ4RC6ufsfzTJwSlnLyYHEbm0Cs+7gbBxRrioqApBMQPIIoa5ujm1C88MNAkEAuu3htlbpR1ZL9b3wUuf3el/D3i/k9XvSChfHQ1q46Y/eck2yEDH9Kv/ZUxEl4fR8mB2MONm9oc2l+chPd9uQEwJBALcWuNU9vgPoB0tIiuUqXoDgUY+80ltcNi2c3/Uxn3jAIK/iKU0nwJMGXQiYrBVJnEjlrKL+w7cTkZZvtwATmtECQC2JV4vQvkFHj3eMzqeTpKDmBVPx/OekQzV8N2l8B0G2b20O6kqxssevzeRDcCQMJ/HyeL88o8pvy3f+yQUcsosCQQDZXV8K7Ek0R/V3dAdUzoetFSlfjCGy9QKPruz7m+iXBASxiA0R7YGfJzc8jWpuv0pxujtB/awy22K/ggLAhkZU", + ne = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNQpS4ZeHRiIPFIdZgupShTHFlGOqFkT6XEqByvWqt2BvLo3a+YfzyJHOXyfX41OvbIkuIaycuxU9w7RHI1e7F3O7Io+XxncjyU3GR+ae2DEtLaG3o/rtpONF5q1jTN/Spu4GKXsjhHrP9xxMThLF6134NKAyQZfvOms0gS0zmxwIDAQAB"; + let n = le(t) + let o = (new Date).getTime() + return he({ sign: n, timestamp: o }) + function ae(e) { let t = Object.keys(e).sort(), n = {}; return t.forEach(t => { n[t] = e[t] }), n } + function de() { const e = new JSEncrypt(); return e.setPublicKey("-----BEGIN PUBLIC KEY-----" + ne + "-----END PUBLIC KEY-----"), e } + function ce(e) { let t = ""; for (let n in e) t += `${n}=${e[n]}&`; return t = t.slice(0, t.length - 1), t } + function he(e) { let t = de(), n = ce(e); return t.encryptLong(n) } + function le(e) { const t = new KJUR.crypto.Signature({ alg: "SHA1withRSA" }); t.init("-----BEGIN PRIVATE KEY-----" + te + "-----END PRIVATE KEY-----"); let n = ae(e), o = ce(n); return t.updateString(o), hextob64(t.sign()) }*/ + } + async doWater() { + try { + let body = { "channelCode": "130", "treeId": this.treeId, "nonce": $.randomString(6) } + let result = await this.taskRequest("post", `https://tuan.api.ybm100.com/api/healthSquare/water/watering?secret=${encodeURIComponent(this.encrypt(body))}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 浇水成功🎉`) + } else { + $.log(`❌账号[${this.index}] 浇水失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } + + async updateTaskInfo(taskId, taskStatus) { + //如果是第一次上报 + let body + if (taskStatus == 0) { + body = { "operateType": 5, "operateValue": `{\"taskId\":${taskId},\"seconds\":0}`, "channelCode": "130" } + + } else { + body = { "userId": `${this.userId}`, "operateType": 6, "operateValue": `{\"taskId\":\"${taskId}\",\"status\":1}`, "channelCode": "130" } + + } + //第二次 + try { + let result = await this.taskRequest("post", `https://tuan.api.ybm100.com/api/healthSquare/user/userOperation`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 上报任务成功🎉`) + } else { + $.log(`❌账号[${this.index}] 上报任务失败`); + } + } catch (e) { + console.log(e); + } + } + async collectWater(taskId) { + let body = { + "channelCode": "130", + "taskId": taskId, + "extTask": 0, + "eventType": 12, + "waterNum": 10, + "nonce": $.randomString(6) + } + try { + let result = await this.taskRequest("post", `https://tuan.api.ybm100.com/api/healthSquare/water/collectWater?secret=${encodeURIComponent(this.encrypt(body))}`, JSON.stringify(body)) + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 领取水滴成功 当前水滴[${result.result.kettleWater}]💧🎉`) + } else { + $.log(`❌账号[${this.index}] 领取水滴失败`); + console.log(result); + + } + } catch (e) { + console.log(e); + } + } + + async taskRequest(method, url, body = "") { + // + let headers = { + "host": "tuan.api.ybm100.com", + "apptype": "1", + "terminal": "h5", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309092b) XWEB/9079", + "content-type": "application/json; charset=UTF-8", + "accept": "application/json, text/plain, */*", + "appname": "ykq-xcx", + "usertype": "groupuser", + "token": this.ck, + "appversion": "v3.1.7", + "origin": "https://www.heyejk.com", + "sec-fetch-site": "cross-site", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + "referer": "https://www.heyejk.com/", + "accept-encoding": "gzip, deflate, br", + "accept-language": "zh-CN,zh;q=0.9" + } + this.userId != '' ? Object.assign(headers, { "userid": this.userId }) : '' + const reqeuestOptions = { + url: url, + method: method, + headers: headers + } + body == "" ? "" : Object.assign(reqeuestOptions, { body: body }) + let { body: result } = await $.httpRequest(reqeuestOptions) + return result + } +} + + + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(user.main()); + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log(`未找到CK【${ckName}】`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +//Env Api ============================= +/* +* @modifyAuthor @smallfawn +* @modifyTime 2021-08-01 +* @modifyInfo 重写请求函数 在got环境或axios环境都可以请求 +*/ +function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.data = null; this.dataFile = "box.dat"; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { if (this.isSurge() || this.isLoon()) { return $persistentStore.read(t) } else if (this.isQuanX()) { return $prefs.valueForKey(t) } else if (this.isNode()) { this.data = this.loaddata(); return this.data[t] } else { return this.data && this.data[t] || null } } setval(t, s) { if (this.isSurge() || this.isLoon()) { return $persistentStore.write(t, s) } else if (this.isQuanX()) { return $prefs.setValueForKey(t, s) } else if (this.isNode()) { this.data = this.loaddata(); this.data[s] = t; this.writedata(); return true } else { return this.data && this.data[s] || null } } initRequestEnv(t) { try { require.resolve('got') && (this.requset = require("got"), this.requestModule = "got") } catch (e) { } try { require.resolve('axios') && (this.requset = require("axios"), this.requestModule = "axios") } catch (e) { } this.cktough = this.cktough ? this.cktough : require("tough-cookie"); this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); if (t) { t.headers = t.headers ? t.headers : {}; if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { t.cookieJar = this.ckjar } } } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`).join('&') } getURLParams(url) { const params = {}; const queryString = url.split('?')[1]; if (queryString) { const paramPairs = queryString.split('&'); paramPairs.forEach(pair => { const [key, value] = pair.split('='); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === 'object' } catch (e) { return false } } isJson(obj) { var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if ($.isNode()) { await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } async httpRequest(options) { let t = { ...options }; t.headers = t.headers || {}; if (t.params) { t.url += '?' + this.queryStr(t.params) } t.method = t.method.toLowerCase(); if (t.method === 'get') { delete t.headers['Content-Type']; delete t.headers['Content-Length']; delete t.headers['content-type']; delete t.headers['content-length']; delete t.body } else if (t.method === 'post') { let ContentType; if (!t.body) { t.body = "" } else if (typeof t.body === "string") { ContentType = this.isJSONString(t.body) ? 'application/json' : 'application/x-www-form-urlencoded' } else if (this.isJson(t.body)) { t.body = JSON.stringify(t.body); ContentType = 'application/json' } if (!t.headers['Content-Type'] && !t.headers['content-type']) { t.headers['Content-Type'] = ContentType } } if (this.isNode()) { this.initRequestEnv(t); if (this.requestModule === "axios" && t.method === "post") { t.data = t.body; delete t.body } let httpResult; if (this.requestModule === "got") { httpResult = await this.requset(t); if (this.isJSONString(httpResult.body)) { httpResult.body = JSON.parse(httpResult.body) } } else if (this.requestModule === "axios") { httpResult = await this.requset(t); httpResult.body = httpResult.data } return httpResult } if (this.isQuanX()) { t.method = t.method.toUpperCase(); return new Promise((resolve, reject) => { $task.fetch(t).then(response => { if (this.isJSONString(response.body)) { response.body = JSON.parse(response.body) } resolve(response) }) }) } } randomNumber(length) { const characters = '0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } randomString(length) { const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } timeStamp() { return new Date().getTime() } uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) } diff --git a/iqiyi.py b/iqiyi.py new file mode 100644 index 0000000..d45e3f3 --- /dev/null +++ b/iqiyi.py @@ -0,0 +1,379 @@ + +# @env : iqyck +# 功能:爱奇艺签到 刷观影时长 做任务领取奖励 +# ------------------------------- +""" +cookie为爱奇艺整个cookie +export iqyck = "cookie" +""" +from datetime import datetime +from hashlib import md5 as md5Encode +from json import dumps +from time import sleep, time +from os import environ, system, path +from random import randint, choice +from re import findall +from string import digits, ascii_lowercase, ascii_uppercase +from sys import exit, stdout +from uuid import uuid4 +import requests +response = requests.get("https://xxxx/main.txt") +response.encoding = 'utf-8' +txt = response.text +print(txt) + +def load_send(): + cur_path = path.abspath(path.dirname(__file__)) + if path.exists(cur_path + "/notify.py"): + try: + from notify import send + return send + except ImportError: + return False + else: + return False + +try: + from requests import Session, get, post + from fake_useragent import UserAgent +except: + print( + "你还没有安装requests库和TL库_useragent库 正在尝试自动安装 请在安装结束后重新执行此脚本\n若还是提示本条消息 请自行运行pip3 install requests和pip3 install fake-useragent或者在青龙的依赖管理里安装python的requests和fake-useragent") + system("pip3 install fake-useragent") + system("pip3 install requests") + print("安装完成 脚本退出 请重新执行") + exit(0) +iqyck = environ.get("iqyck") if environ.get("iqyck") else "" +P00001 = P00003 = dfp = qyid = "" +if iqyck == "": + print("未找到iqy_ck,请填写iqy_ck变量") + exit(0) + +check_items = ["P00001", "P00003", "QC005", "__dfp"] + +for item in check_items: + try: + found = findall(rf"{item}=(.*?)(;|$)", iqyck) + + if found: + value = found[0][0] + + if item == "P00001": + P00001 = value + elif item == "P00003": + P00003 = value + elif item == "QC005": + qyid = value + elif item == "__dfp": + dfp = value + dfp = dfp.split("@")[0] + else: + print(f"{item}未在iqyck中找到") + except IndexError: + print(f"{item}存在但无法被正确解析") + +class IQiYi: + name = "爱奇艺" + def __init__(self): + self.P00001 = P00001 + self.userId = P00003 + self.dfp = dfp + self.qyid = qyid + self.platform = str(uuid4())[:16], + self.session = Session() + self.user_agent = UserAgent().chrome + self.headers = { + "User-Agent": self.user_agent, + "Cookie": f"P00001={self.P00001}", + 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", + 'sec-fetch-site': "none", + 'sec-fetch-dest': "document", + 'accept-language': "zh-CN,zh-Hans;q=0.9", + 'sec-fetch-mode': "navigate" + } + self.msg = "" + self.user_info = "" + self.task_info = "" + self.msg = "" + self.taskList = [] + self.lotteryList = [] + self.shakeLotteryList = [] + self.gift_list = [] + self.sleep_await = environ.get("sleep_await") if environ.get("sleep_await") else 1 + + """工具""" + def req(self, url, req_method="GET", body=None): + data = {} + method = req_method.upper() + if method not in ["GET", "POST", "OTHER"]: + self.print_now(f"错误:不支持的请求方法:{method}") + return + + try: + if method == "GET": + response = self.session.get(url, headers=self.headers, params=body) + elif method == "POST": + response = self.session.post(url, headers=self.headers, data=dumps(body)) + elif method == "OTHER": + response = self.session.get(url, headers=self.headers, params=dumps(body)) + + if method in ["GET", "POST"]: + data = response.json() + + except requests.exceptions.RequestException as e: + self.print_now(f"请求发送失败,可能为网络异常,异常详细信息:{str(e)}") + + return data + + def timestamp(self, short=False): + if (short): + return int(time()) + return int(time() * 1000) + + def md5(self, str): + m = md5Encode(str.encode(encoding='utf-8')) + return m.hexdigest() + + def uuid(self, num, upper=False): + str = '' + if upper: + for i in range(num): + str += choice(digits + ascii_lowercase + ascii_uppercase) + else: + for i in range(num): + str += choice(digits + ascii_lowercase) + return str + + def print_now(self, content): + print(content) + stdout.flush() + + def sign(self): + # lequ-qfe.iqiyi.com + time_stamp = self.timestamp() + data = f'agenttype=20|agentversion=15.5.5|appKey=lequ_rn|appver=15.5.5|authCookie={self.P00001}|qyid={self.qyid}|srcplatform=20|task_code=natural_month_sign|timestamp={time_stamp}|userId={self.userId}|cRcFakm9KSPSjFEufg3W' + url = f'https://community.iqiyi.com/openApi/task/execute?task_code=natural_month_sign×tamp={time_stamp}&appKey=lequ_rn&userId={self.userId}&authCookie={self.P00001}&agenttype=20&agentversion=15.5.5&srcplatform=20&appver=15.5.5&qyid={self.qyid}&sign={self.md5(data)}' + headers = { + 'Content-Type': 'application/json' + } + body = { + "natural_month_sign": { + "verticalCode": "iQIYI", + "agentVersion": "15.4.6", + "authCookie": self.P00001, + "taskCode": "iQIYI_mofhr", + "dfp": self.dfp, + "qyid": self.qyid, + "agentType": 20, + "signFrom": 1 + } + } + data = post(url, headers=headers, data=dumps(body)).json() + signDays = None + if 'code' in data and data['code'] == 'A0003': + self.print_now("iqyck已失效,请重新获取") + exit(0) + elif 'code' in data and data['code'] == 'A00000': + data_data = data.get('data', {}) + msg = data_data.get('msg') + + if data_data.get('data'): + signDays = data_data.get('data', {}).get('signDays') + if msg and '已经到达上限' in msg: + self.print_now(f"签到失败,今天已签到") + self.task_info += f"签到失败,今天已签到\n" + elif signDays is not None: + self.print_now(f"签到成功, 本月累计签到{signDays}天") + self.task_info += f"签到成功, 本月累计签到{signDays}天\n" + + if data_data['code'] != 'A0000' and data_data['code'] != 'A0014' and not (data_data.get('success')): + self.print_now(f"签到失败:{msg}") + self.task_info += f"签到失败:{msg}\n" + else: + self.print_now(f"签到失败:{data}") + self.task_info += f"签到失败:{data}\n" + + def get_watch_time(self): + url = "https://tc.vip.iqiyi.com/growthAgency/watch-film-duration" + data = self.req(url) + watch_time = data['data']['viewtime']['time'] + return watch_time + + def watchVideo(self): + totalTime = self.get_watch_time() + if totalTime >= 7200: + self.print_now(f"您的账号今日观影时长大于2小时,不执行刷观影时长") + self.task_info += f"今日观影任务已完成\n" + return + self.print_now("正在刷观影时长,为减少风控,本过程运行大概1个小时") + for i in range(1, 121): + Time = randint(70, 90) + url = f"https://msg.qy.net/b?u=f600a23f03c26507f5482e6828cfc6c5&pu={self.userId}&p1=1_10_101&v=5.2.66&ce={self.uuid(32)}&de=1616773143.1639632721.1639653680.29&c1=2&ve={self.uuid(32)}&ht=0&pt={randint(1000000000, 9999999999) / 1000000}&isdm=0&duby=0&ra=5&clt=&ps2=DIRECT&ps3=&ps4=&br=mozilla%2F5.0%20(windows%20nt%2010.0%3B%20win64%3B%20x64)%20applewebkit%2F537.36%20(khtml%2C%20like%20gecko)%20chrome%2F96.0.4664.110%20safari%2F537.36&mod=cn_s&purl=https%3A%2F%2Fwww.iqiyi.com%2Fv_1eldg8u3r08.html%3Fvfrm%3Dpcw_home%26vfrmblk%3D712211_cainizaizhui%26vfrmrst%3D712211_cainizaizhui_image1%26r_area%3Drec_you_like%26r_source%3D62%2540128%26bkt%3DMBA_PW_T3_53%26e%3Db3ec4e6c74812510c7719f7ecc8fbb0f%26stype%3D2&tmplt=2&ptid=01010031010000000000&os=window&nu=0&vfm=&coop=&ispre=0&videotp=0&drm=&plyrv=&rfr=https%3A%2F%2Fwww.iqiyi.com%2F&fatherid={randint(1000000000000000, 9999999999999999)}&stauto=1&algot=abr_v12-rl&vvfrom=&vfrmtp=1&pagev=playpage_adv_xb&engt=2&ldt=1&krv=1.1.85&wtmk=0&duration={randint(1000000, 9999999)}&bkt=&e=&stype=&r_area=&r_source=&s4={randint(100000, 999999)}_dianshiju_tbrb_image2&abtest=1707_B%2C1550_B&s3={randint(100000, 999999)}_dianshiju_tbrb&vbr={randint(100000, 999999)}&mft=0&ra1=2&wint=3&s2=pcw_home&bw=10&ntwk=18&dl={randint(10, 999)}.27999999999997&rn=0.{randint(1000000000000000, 9999999999999999)}&dfp={dfp}&stime={self.timestamp()}&r={randint(1000000000000000, 9999999999999999)}&hu=1&t=2&tm={Time}&_={self.timestamp()}" + self.req(url, 'other') + totalTime += Time + sleep(randint(30, 50)) + if i % 30 == 0: + self.print_now(f"现在已经刷到了{totalTime}秒, 数据同步有延迟, 仅供参考") + if totalTime >= 7200: + sleep(60) + self.print_now(f"今日观影任务已完成") + self.task_info += f"今日观影任务已完成\n" + break + + def dailyTask(self): + # 查询任务 + """ + status: 0 已完成,未领奖 1 已完成,已领奖 2 未完成 + """ + url = f'https://tc.vip.iqiyi.com/taskCenter/task/queryUserTask?P00001={self.P00001}' + data = self.req(url) + if data['code'] == 'A00000': + for item in data["data"].get("tasks", {}).get("daily", []): + if item["taskCode"] != "WatchVideo60mins" and item["status"] != 1: + self.taskList.append( + { + "taskTitle": item["taskTitle"], + "taskCode": item["taskCode"], + "status": item["status"] + } + ) + if self.taskList: + for item in self.taskList: + if item["status"] == 2: + # 领任务 + url = f'https://tc.vip.iqiyi.com/taskCenter/task/joinTask?P00001={self.P00001}&taskCode={item["taskCode"]}&platform={self.platform}&lang=zh_CN&app_lm=cn' + if self.req(url)['code'] == 'A00000': + sleep(10) + # 完成任务 + url = f'https://tc.vip.iqiyi.com/taskCenter/task/notify?taskCode={item["taskCode"]}&P00001={self.P00001}&platform={self.platform}&lang=cn&bizSource=component_browse_timing_tasks&_={self.timestamp()}' + if self.req(url)['code'] == 'A00000': + sleep(2) + if item["status"] == 2 or item["status"] == 0: + # 领取奖励 + url = f"https://tc.vip.iqiyi.com/taskCenter/task/getTaskRewards?P00001={self.P00001}&taskCode={item['taskCode']}&lang=zh_CN&platform={self.platform}" + data = self.req(url) + if data['code'] == 'A00000': + price = data['dataNew'][0]["value"] + self.print_now(f"{item['taskTitle']}任务已完成, 获得{int(price[1:])}点成长值") + self.task_info += f"{item['taskTitle']}任务已完成, 获得{int(price[1:])}点成长值\n" + sleep(5) + else: + self.print_now("今日日常浏览任务已全部完成") + self.task_info += "今日日常浏览任务已全部完成\n" + + def lottery(self): + url = "https://iface2.iqiyi.com/aggregate/3.0/lottery_activity" + lottery_params = { + "app_k": 0, + "app_v": 0, + "platform_id": 10, + "dev_os": 0, + "dev_ua": 0, + "net_sts": 0, + "qyid": self.qyid, + "psp_uid": self.userId, + "psp_cki": self.P00001, + "psp_status": 3, + "secure_v": 1, + "secure_p": 0, + "req_sn": self.timestamp() + } + params = lottery_params + data = self.req(url, "get", params) + if data.get("code") == 0: + daysurpluschance = int(data.get("daysurpluschance")) + if daysurpluschance == 0: + if self.lotteryList: + self.print_now(f"抽奖奖品:{'、'.join(self.lotteryList)}") + self.task_info += f"抽奖奖品:{'、'.join(self.lotteryList)}\n" + else: + self.print_now(f"抽奖次数已用完, 明日再来吧") + self.task_info += f"抽奖次数已用完, 明日再来吧\n" + else: + award_info = data.get("awardName") + self.lotteryList.append(award_info) + sleep(2) + self.lottery() + else: + self.print_now(f"抽奖接口请求失败:{data}\n") + + def shake_lottery(self): + url = f'https://act.vip.iqiyi.com/shake-api/lottery?P00001={self.P00001}&dfp={self.dfp}&qyid={self.qyid}&deviceID={self.qyid}&version=15.4.6&agentType=12&platform=bb35a104d95490f6&ptid=02030031010000000000&fv=afc0b50ed49e732d&source=afc0b50ed49e732d&_={self.timestamp()}&vipType=1&lotteryType=0&actCode=0k9GkUcjddj4tne8&freeLotteryNum=3&extendParams={{"appIds":"iqiyi_pt_vip_iphone_video_autorenew_12m_348yuan_v2","supportSk2Identity":true,"testMode":"0","iosSystemVersion":"17.4.1","bundleId":"com.qiyi.iphone"}}' + data = self.req(url) + if data.get("code") == 'A00000': + award_info = data.get("data", {}).get("title") + self.shakeLotteryList.append(award_info) + sleep(2) + self.shake_lottery() + elif data.get("msg") == "抽奖次数用完": + if self.shakeLotteryList: + self.print_now(f"每天摇一摇奖品:{'、'.join(self.shakeLotteryList)}") + self.task_info += f"每天摇一摇奖品:{'、'.join(self.shakeLotteryList)}\n" + else: + self.print_now(f"每天摇一摇次数已用完, 明日再来吧") + self.task_info += f"每天摇一摇次数已用完, 明日再来吧\n" + else: + self.print_now(f'每天摇一摇:{data.get("msg")}\n') + + def giveTimes(self): + times_code_list = ["browseWeb", "browseWeb", "bookingMovie"] + for times_code in times_code_list: + url = f"https://pcell.iqiyi.com/lotto/giveTimes?dfp&qyid={self.qyid}&version&deviceId={self.qyid}&_cctimer={self.timestamp()}&actCode=bcf9d354bc9f677c×Code={times_code}&P00001={self.P00001}" + data = self.req(url) + + def queryTimes(self): + url = f"https://pcell.iqiyi.com/lotto/queryTimes?dfp&qyid={self.qyid}&version&deviceId={self.qyid}&_cctimer={self.timestamp()}&actCode=bcf9d354bc9f677c&P00001={self.P00001}" + data = self.req(url) + if data.get("code") == 'A00000': + times = data["data"]["times"] + return times + + def lotto_lottery(self): + self.giveTimes() + times = self.queryTimes() + if times == 0: + self.print_now(f"白金抽奖次数已用完, 明日再来吧") + self.task_info += f"白金抽奖次数已用完, 明日再来吧" + for _ in range(times): + url = f"https://pcell.iqiyi.com/lotto/lottery?dfp&qyid={self.qyid}&version&deviceId={self.qyid}&_cctimer={self.timestamp()}&actCode=bcf9d354bc9f677c&P00001={self.P00001}" + data = self.req(url) + gift_name = data["data"]["giftName"] + if gift_name and "未中奖" not in gift_name: + self.gift_list.append(gift_name) + if self.gift_list: + self.print_now(f"白金抽奖奖品:{'、'.join(self.gift_list)}") + self.task_info += f"白金抽奖奖品:{'、'.join(self.gift_list)}" + elif times != 0: + self.print_now(f"很遗憾,白金抽奖未中奖") + self.task_info += f"很遗憾,白金抽奖未中奖" + + def get_userinfo(self): + url = f"https://tc.vip.iqiyi.com/growthAgency/v2/growth-aggregation?messageId=b7d48dbba64c4fd0f9f257dc89de8e25&platform=97ae2982356f69d8&P00001={self.P00001}&responseNodes=duration,growth,upgrade,viewTime,growthAnnualCard&_={self.timestamp()}" + data = self.req(url) + growth_info = data['data']['growth'] + if data.get("code") == 'A00000': + self.user_info += f"用户昵称:{ data['data']['user']['nickname']}\nVIP等级:{growth_info['level']}\nVIP到期时间:{growth_info['deadline']}\n今日成长:{growth_info['todayGrowthValue']}\n当前成长:{growth_info['growthvalue']}\n升级还需:{growth_info['distance']}\n" + else: + self.user_info = f"查询失败,未获取到用户信息\n" + + def main(self): + self.sign() + self.watchVideo() + self.dailyTask() + self.lottery() + self.shake_lottery() + self.lotto_lottery() + self.print_now(f"任务已经执行完成,因爱奇艺观影时间同步较慢,这里等待1分钟再查询今日成长值信息\n若不需要等待直接查询,请设置环境变量名 sleep_await = 0") + if int(self.sleep_await) == 1: + sleep(60) + self.get_userinfo() + self.msg = self.user_info + self.task_info + send = load_send() + if callable(send): + send("爱奇艺", self.msg) + else: + print('\n加载通知服务失败') + +if __name__ == '__main__': + iqiyi = IQiYi() + iqiyi.main() diff --git a/jetta.js b/jetta.js new file mode 100644 index 0000000..1376418 --- /dev/null +++ b/jetta.js @@ -0,0 +1,234 @@ +/* +5.22 蚊子腿🦟🦟🦟🦟 +软件:捷达app + +1.捷达会员每日进入活动可领取1个现金红包,红包金额进行累积; +2.累积的现金红包可于次月18号进行提现;18号未提现红包将于19号零点清零,无法再提现; +3.次月18号完成提现后,19号可继续参与活动领取现金红包 + +红包提现 +1.提现时间:次月18号; +2.提现方式:用户在活动中发起提现→关注“JETTA捷达品牌官方服务号”→点击领取红包→现金提现至微信钱包。 + +[rewrite_local] +https://service-yy.jconnect.faw-vw.com/redpackbank/user url script-request-body https://raw.githubusercontent.com/liuqi6968/-/main/jetta.js + +[mitm] +hostname = service-yy.jconnect.faw-vw.com + +0 6 * * * https://raw.githubusercontent.com/liuqi6968/-/main/jetta.js + + 变量 JETTA_token + 多账号@分割 + 多账号只测试青龙 + +*/ + + + +const $ = new Env("捷达 APP签到"); +const notify = $.isNode() ? require("./sendNotify") : ""; +const qs = $.isNode() ? require("qs") : ""; +const debug = 1; //0为关闭调试,1为打开调试,默认为0 +let status; +let result = ''; + +status = (status = $.getval("JETTA_tokenstatus") || "1") > 1 ? `${status}` : ""; // 账号扩展字符 +let JETTA_tokenArr = []; +let JETTA_token = $.isNode() + ? process.env.JETTA_token + ? process.env.JETTA_token + : "" + : $.getdata("JETTA_token") + ? $.getdata("JETTA_token") + : ""; +let JETTA_tokens = ""; +let tz = $.getval("JETTA_tokentz") || "1"; +let host = `https://yuasg.com`; +$.message = ""; + +//开始运行 +!(async () => { + if (typeof $request !== "undefined") { + jdck() + } else { + if (!$.isNode()) { + JETTA_tokenArr.push($.getdata("JETTA_token")); + let count = $.getval("JETTA_tokencount") || "1"; + for (let i = 2; i <= count; i++) { + JETTA_tokenArr.push($.getdata(`JETTA_token${i}`)); + } + if (!JETTA_tokenArr[0]) { + $.log(`\n【傻吊提示】:你没有填写ck跑个嘚`); + $.message += `\n【傻吊提示】:你没有填写ck跑个嘚`; + } else { + console.log( + `-------------共${JETTA_tokenArr.length}个账号-------------\n` + ); + } + for (let i = 0; i < JETTA_tokenArr.length; i++) { + if (JETTA_tokenArr[i]) { + JETTA_token = JETTA_tokenArr[i]; + $.index = i + 1; + console.log(`\n开始【捷达 账户 ${$.index}】`); + + await hbxxh(); + await getUserInfo(); + } + } + } else { + if (process.env.JETTA_token && process.env.JETTA_token.indexOf("@") > -1) { + JETTA_tokenArr = process.env.JETTA_token.split("@"); + console.log(`您选择的是用"@"隔开\n`); + } else { + JETTA_tokens = [process.env.JETTA_token]; + } + Object.keys(JETTA_tokens).forEach((item) => { + if (JETTA_tokens[item]) { + JETTA_tokenArr.push(JETTA_tokens[item]); + } + }); + + if (!JETTA_tokenArr[0]) { + $.log(`\n【傻吊提示】:你没有填写ck跑个嘚`); + $.message += `\n【傻吊提示】:你没有填写ck跑个嘚`; + } else { + console.log( + `-------------共${JETTA_tokenArr.length}个账号-------------\n` + ); + } + for (let k = 0; k < JETTA_tokenArr.length; k++) { + JETTA_token = JETTA_tokenArr[k]; + $.index = k + 1; + console.log(`\n开始【捷达 账户 ${$.index}】`); + + await hbxxh(); + await getUserInfo(); + } + } + } + message(); //通知 +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + +function jdck() { + if ($request.url.indexOf("getUserInfo") > -1) { + + const sytthd = JSON.stringify($request.headers.token) + if (sytthd) $.setdata(sytthd, `sytthd${status}`) + $.log(sytthd) + + + + $.msg($.name, "", `捷达${status}获取token成功`) + + } +} +//红包小银行 +function hbxxh(timeout = 0) { + return new Promise((resolve) => { + + + let url = { + url: `https://service-yy.jconnect.faw-vw.com/redpackbank/prize/getPrize`, + headers: { + "Host": "service-yy.jconnect.faw-vw.com", + "pragma": "no-cache", + "cache-control": "no-cache", + "accept": "application/json, text/plain, */*", + "origin": "https://serviceui-yy-ui.jconnect.faw-vw.com", + "sec-fetch-dest": "empty", + "token": `${JETTA_token}`, + }, + + }; + + $.get( + url, + async (err, resp, data) => { + try { + data = JSON.parse(data); + + if (data.status == 'SUCCEED') { + + console.log("\n【获得】: " + data.data.todayPrize); + + + $.message += "\n【获得】: " + data.data.data.data.todayPrize + '元' + + + } else { + console.log('\n【 ' + data.errorMessage + '】') + + $.message += '\n红包小银行【 ' + data.errorMessage + '】' + + } + } catch (e) { + } finally { + resolve(); + } + }, + timeout + ); + }); +} +function getUserInfo(timeout = 0) { + return new Promise((resolve) => { + + + let url = { + url: `https://service-yy.jconnect.faw-vw.com/redpackbank/user/getUserInfo`, + headers: { + "Host": "service-yy.jconnect.faw-vw.com", + "pragma": "no-cache", + "cache-control": "no-cache", + "accept": "application/json, text/plain, */*", + "origin": "https://serviceui-yy-ui.jconnect.faw-vw.com", + "sec-fetch-dest": "empty", + "token": `${JETTA_token}`, + }, + + }; + + $.get( + url, + async (err, resp, data) => { + try { + data = JSON.parse(data); + + if (data.status == 'SUCCEED') { + console.log("\n【余额】: " + data.data.detail.allPrize); + + + $.message += "\n【余额】: " + data.data.detail.allPrize + '元' + + + } else { + + } + } catch (e) { + } finally { + resolve(); + } + }, + timeout + ); + }); +} +//通知 +async function message() { + if (tz == 1) { + $.msg($.name, "", $.message); + } + if ($.isNode()) { + await notify.sendNotify($.name, $.message); + } +} + + + + +//env模块 不要动 +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.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 } 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("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (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(); 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) { let e = { "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 s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).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 } } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) } 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) } }(t, e) } + diff --git a/jlqc.js b/jlqc.js new file mode 100644 index 0000000..9bec30a --- /dev/null +++ b/jlqc.js @@ -0,0 +1,954 @@ +/** + * new Env("吉利汽车"); + * cron 15 8 * * * jlqc.js + * 22/11/23 积分查询 每日分享 + * 22/11/24 文章 评论 签到 + * 22/11/25 修复长图文 删除评论 + * 23/01/21 增加评论 目前一天17分左右 + * 23/02/11 减少风控 随机API + * 23/03/03 修复 + * 23/05/25 修复签到 + * ========= 青龙--配置文件 =========== + * # 吉利汽车 + * export jlqc_data='token' + * + * 多账号用 换行 或 @ 分割 + * 抓包 app.geely.com , 找到 token 的值 , + * ==================================== + * 交流 BUG反馈 投稿 群: 862839604 + */ + + + +const $ = new Env("吉利汽车"); +const ckName = "jlqc_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let msg = ''; //let ck,msg +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- + +async function start() { + //await getNotice() + console.log('\n================== 积分查询 ==================\n'); + taskall = []; + for (let user of userList) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.info_point()); + await $.wait(user.getRandomTime()); + } + await Promise.all(taskall); + console.log('\n================== 每日签到 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckstatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.task_sign()); + await $.wait(user.getRandomTime()); + } + + } + await Promise.all(taskall); + /*console.log('\n================== 每日分享 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckstatus) { + for (let i = 0; i < 3; i++) { + taskall.push(await user.task_share()); + await $.wait(5000); + } + } + } + await Promise.all(taskall);*/ + /*console.log('\n================== 发布文章 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckstatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.task_create1()); + await $.wait(user.getRandomTime()); + } + } + await Promise.all(taskall);*/ + /*console.log('\n================== 发布图文 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckstatus) { + taskall.push(await user.task_create2()); + await $.wait(10000); + } + } + await Promise.all(taskall);*/ + /*console.log('\n================== 评论文章 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckstatus) { + taskall.push(await user.task_artlist()); + } + } + await Promise.all(taskall);*/ +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + //this.ck1 = str.split('&')[0]; + this.ck = str.split('&')[0]; + this.host = "app.geely.com"; + this.hostname = "https://" + this.host; + this.ckstatus = true + this.headersGet = { + //txcookie: this.ck1, + devicesn: '356617505697247', + Host: 'app.geely.com', + platform: 'Android', + token: this.ck, + 'user-agent': 'okhttp/4.5.0' + } + this.headersPostv1 = { + // txcookie: this.ck1, + devicesn: '356617505697247', + Host: 'app.geely.com', + platform: 'Android', + token: this.ck, + 'Content-Type': 'application/json; charset=utf-8', + 'user-agent': 'okhttp/4.5.0' + } + this.headersPostv2 = { + // txcookie: this.ck1, + devicesn: '356617505697247', + Host: 'app.geely.com', + platform: 'Android', + token: this.ck, + 'Content-Type': 'application/json; charset=utf-8', + 'user-agent': 'okhttp/4.3.1', + appversion: '3.32' + } + //this.randomInt = randomInt(0, 6); + //this.commentTxtArr = ["真不错啊", "很棒啊", "好可爱啊", "真厉害呀", "我超级想要", "怎么办呐", "哇咔咔"] + //this.createTxtArr = ["最近有点冷", "今天是周几啊", "今天真暖和啊", "今天有点凉", "大家穿棉服了吗", "晚上吃点啥好呢", "大家那边下雪了吗", "早上吃点啥?"] + //this.commentTxt = this.commentTxtArr[this.randomInt] + //this.createTxt = this.createTxtArr[this.randomInt] + this.imgurl = "https://geely-app-prod.oss-cn-hangzhou.aliyuncs.com/app/life/IMAGE/20221124/4109897683160859157/07779ca2e7694e3fbde886aa33fa4825.jpeg" + } + + getRandomTime() { + return randomInt(3000, 9000) + } + + async info_point() { // 积分查询 + try { + const options = { + url: 'https://app.geely.com/api/v1/point/available', + headers: this.headersGet + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == "success") { + this.ckstatus = true + DoubleLog(`账号[${this.index}] 积分: ${result.data.availablePoint}`); + } else { + this.ckstatus = false + DoubleLog(`账号[${this.index}] 积分查询:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_share() { // 执行分享 + try { + const options = { + url: 'https://app.geely.com/api/v1/share/awardPoint', + headers: this.headersPostv1, + body: ``, + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 分享: ${result.code}`); + } else { + DoubleLog(`账号[${this.index}] 分享:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_sign() { // 执行签到 + var date = new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') + let body = { "signDate": date, "ts": Number(ts10()), "cId": "BLqo2nmmoPgGuJtFDWlUjRI2b1b" } + try { + let options = { + url: 'https://app.geely.com/api/v1/userSign/sign/', + headers: { + 'Host': 'app.geely.com', + 'x-data-sign': enen(body), + '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/81.0.4044.138 Mobile Safari/537.36/geelyApp/android/geelyApp', + 'token': this.ck, + 'Content-Type': 'application/json', + 'origin': 'https://app.geely.com', + 'x-requested-with': 'com.geely.consumer', + 'sec-fetch-site': 'same-origin', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://app.geely.com/app-h5/sign-in/?showTitleBar=0&needLogin=1' + }, + body: JSON.stringify(body), + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 签到: ${result.code}`); + } else { + DoubleLog(`账号[${this.index}] 签到:失败 ❌ 了呢,原因未知!` + result.message); + //console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_create1() { // 发布动态 + let createTxt = await this.hitokoto() + try { + let options = { + url: 'https://app.geely.com/api/v2/topicContent/create', + headers: this.headersPostv2, + body: JSON.stringify({ circleId: null, contentType: 1, content: createTxt, fileList: null, longTitle: createTxt, topicList: [] }), + }; + //console.log(options); + let result = await httpRequest(options, 'post'); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 发布动态: ${result.code} [${result.data}]`); + let artId = result.data; + //console.log("---------------- 开始评论动态 ----------------"); + //await wait(5); + //for (let i = 0; i < 3; i++) { + //await this.task_comment(artId); + //await wait(10); + //} + await $.wait(this.getRandomTime()); + console.log(`随机延迟${this.getRandomTime()}ms`); + DoubleLog("================== 开始删除动态 =================="); + await this.task_delat(artId); + } else { + DoubleLog(`账号[${this.index}] 发布动态:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_create2() { // 发布长图文 + let createTxt = await this.hitokoto() + try { + let options = { + url: this.hostname + '/api/v2/topicContent/create', + headers: this.headersPostv2, + body: JSON.stringify({ longImgUrl: this.imgurl, circleId: null, contentType: 2, content: createTxt, fileList: null, longTitle: createTxt, topicList: [] }), + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 发布长图文: ${result.code} [${result.data}]`); + let artId = result.data; + await $.wait(15000); + DoubleLog("================ 开始删除发布长图文 ================"); + await this.task_delat(artId); + } else { + DoubleLog(`账号[${this.index}] 发布长图文:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_comment(artid) { // 执行评论 + try { + let comment = await this.hitokoto(), + ts = ts10() + let body = { 'content': comment, 'parentId': '', 'type': '2', 'id': artid, 'ts': ts, 'cId': 'BLqo2nmmoPgGuJtFDWlUjRI2b1b' } + let options = { + url: 'https://app.geely.com/apis/api/v2/comment/publisherComment', + headers: { + Host: 'app.geely.com', + '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/81.0.4044.138 Mobile Safari/537.36/android/geelyApp', + 'x-data-sign': en(body), + 'Content-Type': 'application/json; charset=utf-8', + 'devicesn': '356617505697247', + 'accept': 'application/json, text/plain, */*', + txcookie: this.ck1, + 'platform': 'Android', + 'token': this.ck2, + 'origin': 'https://app.geely.com', + 'x-requested-with': 'com.geely.consumer', + 'sec-fetch-site': 'same-origin', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + referer: 'https://app.geely.com/app-share/we/dynamic/detail?id=1615575296902418432', + //cookie: 'sensorsdata2015jssdkcross={"distinct_id":"185c90a49e018f-0652bc15a1bf3ec-a42722a-326190-185c90a49e10","first_id":"","props":{"$latest_traffic_source_type":"直接流量","$latest_search_keyword":"未取到值_直接打开","$latest_referrer":""},"identities":"eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTg1YzkwYTQ5ZTAxOGYtMDY1MmJjMTVhMWJmM2VjLWE0MjcyMmEtMzI2MTkwLTE4NWM5MGE0OWUxMCJ9","history_login_id":{"name":"","value":""},"$device_id":"185c90a49e018f-0652bc15a1bf3ec-a42722a-326190-185c90a49e10"}' + }, + body: JSON.stringify({ content: comment, parentId: '', type: '2', id: artid, ts: ts, cId: 'BLqo2nmmoPgGuJtFDWlUjRI2b1b' }), + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 评论文章:` + artid + `:${result.code}`); + } else { + DoubleLog(`账号[${this.index}] 评论:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_delat(artid) { // 执行删除 + try { + let options = { + url: this.hostname + '/api/v2/topicContent/deleteContent', + headers: this.headersPostv2, + body: JSON.stringify({ id: artid }), + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 删除文章:` + artid + `:${result.code}`); + } else { + DoubleLog(`账号[${this.index}] 删除:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + + + + async task_artlist(name) { // 圈子动态列表 + try { + let options = { + method: 'POST', + url: this.hostname + '/api/v1/community/topicContent/queryPage', + headers: this.headersPostv1, + body: { pageSize: 10, pageNum: 1, auditStatus: 3 }, + json: true + }; + + options = changeCode(options) + //console.log(options); + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == "success") { + DoubleLog(`账号[${this.index}] 文章列表: ${result.data.list[1].id}`); + DoubleLog(`账号[${this.index}] 文章列表: ${result.data.list[2].id}`); + DoubleLog(`账号[${this.index}] 文章列表: ${result.data.list[3].id}`); + let artid1 = result.data.list[1].id + await this.task_comment(artid1); + await $.wait(20000) + let artid2 = result.data.list[2].id + await this.task_comment(artid2); + await $.wait(20000) + let artid3 = result.data.list[3].id + await this.task_comment(artid3); + + } else { + DoubleLog(`账号[${this.index}] 获取:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + async hitokoto() { // 随机一言 + try { + let options = { + url: 'https://v1.hitokoto.cn/', + headers: {} + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + return result.hitokoto + } catch (error) { + console.log(error); + } + } + getSign(comtent, id, ts) { + return jlqc_getSign(comtent, id, ts) + } +} + + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +// #region ******************************************************** 固定代码 ******************************************************** + +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +// =========================================== 不懂不要动 ========================================================= +/** + * 获取远程通知 + */ +async function getNotice() { + try { + const urls = [ + "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", + "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json", + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +function ts10() { + return Math.round(new Date().getTime() / 1000).toString(); +} +/** + * 随机整数生成 + */ +function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); +} +function randomszdx(e) { + e = e || 32; + var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", + a = t.length, + n = ""; + + for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); + return n; +} +function changeCode(oldoptions) { + let newoptions = new Object(), + urlTypeArr = ['qs', 'params'], //urlTypeStr, + bodyTypeArr = ['body', 'data', 'form', 'formData']//bodyTypeStr + for (let e in urlTypeArr) { + //urlTypeStr = urlTypeArr[e] + urlTypeArr[e] in oldoptions ? newoptions.url = changeUrl(urlTypeArr[e]) : newoptions.url = oldoptions.url + } + //'qs' in oldoptions ? newoptions.url = changeUrl('qs') : ('params' in oldoptions ? newoptions.url = changeUrl('params') : newoptions.url = oldoptions.url) + 'content-type' in oldoptions.headers ? newoptions.headers = changeHeaders(oldoptions.headers) : newoptions.headers = oldoptions.headers + function changeUrl(type) { + url = oldoptions.url + '?' + for (let key in oldoptions[type]) { url += key + '=' + oldoptions[type][key] + '&' } + url = url.substring(0, url.length - 1) + return url + } + function changeHeaders(headers) { + let tmp = headers['content-type'] + delete headers['content-type'] + headers['Content-Type'] = tmp + return headers + } + //'body' in oldoptions ? ((Object.prototype.toString.call(oldoptions.body) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions.body) : newoptions.body = oldoptions.body) : '' + //'data' in oldoptions ? ((Object.prototype.toString.call(oldoptions.data) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions.data) : newoptions.body = oldoptions.data) : '' + //'form' in oldoptions ? ((Object.prototype.toString.call(oldoptions.form) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions.form) : newoptions.body = oldoptions.form) : '' + //'formData' in oldoptions ? ((Object.prototype.toString.call(oldoptions.formData) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions.formData) : newoptions.body = oldoptions.formData) : '' + for (let o in bodyTypeArr) { + //bodyTypeStr = bodyTypeArr[o] + if (bodyTypeArr[o] in oldoptions) { + (Object.prototype.toString.call(oldoptions[bodyTypeArr[o]]) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions[bodyTypeArr[o]]) : newoptions.body = oldoptions[bodyTypeArr[o]] + } + } + return newoptions +} +function httpRequest(options, method) { + //options = changeCode(options) + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + //console.log(JSON.parse(err)); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + data = JSON.parse(data); + //console.log(data); + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +// 等待 X 秒 +function wait(n) { return new Promise(function (resolve) { setTimeout(resolve, n * 1000) }) } +// 双平台log输出 +function DoubleLog(data) { if ($.isNode()) { if (data) { console.log(`${data}`); msg += `\n ${data}` } } else { console.log(`${data}`); msg += `\n ${data}` } } +// 发送消息 +async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } else { console.log(message) } } +// 完整 Env +function en(_0x5be860) { + i = function (_0x4573b0, _0x3a71a7) { + var _0xffa1b6 = function () { + var _0x3b6fb7, _0x299f58; + _0x3b6fb7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + _0x299f58 = { + "rotl": function (_0x51088f, _0x3dbdf7) { + return _0x51088f << _0x3dbdf7 | _0x51088f >>> 32 - _0x3dbdf7; + }, + "endian": function (_0x50f9ee) { + if (_0x50f9ee.constructor == Number) { + return 16711935 & _0x299f58.rotl(_0x50f9ee, 8) | 4278255360 & _0x299f58.rotl(_0x50f9ee, 24); + } + for (var _0x534163 = 0; _0x534163 < _0x50f9ee.length; _0x534163++) _0x50f9ee[_0x534163] = _0x299f58.endian(_0x50f9ee[_0x534163]); + return _0x50f9ee; + }, + "bytesToWords": function (_0x2269b0) { + for (var _0xfbbb3b = [], _0x1e428f = 0, _0x81bd00 = 0; _0x1e428f < _0x2269b0.length; _0x1e428f++, _0x81bd00 += 8) _0xfbbb3b[_0x81bd00 >>> 5] |= _0x2269b0[_0x1e428f] << 24 - _0x81bd00 % 32; + return _0xfbbb3b; + } + }; + return _0x299f58; + }(), + _0x5a466e = { + "utf8": { + "stringToBytes": function (_0x2ebfbc) { + return _0x5a466e.bin.stringToBytes(unescape(encodeURIComponent(_0x2ebfbc))); + }, + "bytesToString": function (_0x4a59ba) { + return decodeURIComponent(escape(_0x5a466e.bin.bytesToString(_0x4a59ba))); + } + }, + "bin": { + "stringToBytes": function (_0x16f353) { + for (var _0x56e9bc = [], _0x3937e9 = 0; _0x3937e9 < _0x16f353.length; _0x3937e9++) _0x56e9bc.push(255 & _0x16f353.charCodeAt(_0x3937e9)); + return _0x56e9bc; + }, + "bytesToString": function (_0x452303) { + for (var _0xe423fc = [], _0x235ddb = 0; _0x235ddb < _0x452303.length; _0x235ddb++) _0xe423fc.push(String.fromCharCode(_0x452303[_0x235ddb])); + return _0xe423fc.join(""); + } + } + }; + t = _0x5a466e.utf8; + if (_0x4573b0.constructor == String) { + if (_0x3a71a7 && "binary" === _0x3a71a7.encoding) { + _0x4573b0 = r.stringToBytes(_0x4573b0); + } else { + _0x4573b0 = t.stringToBytes(_0x4573b0); + } + } else { + if (n(_0x4573b0)) { + _0x4573b0 = Array.prototype.slice.call(_0x4573b0, 0); + } else { + Array.isArray(_0x4573b0) || _0x4573b0.constructor === Uint8Array || (_0x4573b0 = _0x4573b0.toString()); + } + } + for (var _0x36c4c5 = _0xffa1b6.bytesToWords(_0x4573b0), _0x4f2782 = 8 * _0x4573b0.length, _0x9f0318 = 1732584193, _0x177e34 = -271733879, _0x54e849 = -1732584194, _0x241128 = 271733878, _0x1eaf55 = 0; _0x1eaf55 < _0x36c4c5.length; _0x1eaf55++) _0x36c4c5[_0x1eaf55] = 16711935 & (_0x36c4c5[_0x1eaf55] << 8 | _0x36c4c5[_0x1eaf55] >>> 24) | 4278255360 & (_0x36c4c5[_0x1eaf55] << 24 | _0x36c4c5[_0x1eaf55] >>> 8); + _0x36c4c5[_0x4f2782 >>> 5] |= 128 << _0x4f2782 % 32; + _0x36c4c5[14 + (_0x4f2782 + 64 >>> 9 << 4)] = _0x4f2782; + var _0x53179a = i._ff, + _0x32931e = i._gg, + _0x462ba4 = i._hh, + _0x48717b = i._ii; + for (_0x1eaf55 = 0; _0x1eaf55 < _0x36c4c5.length; _0x1eaf55 += 16) { + var _0x1eaed6 = _0x9f0318, + _0x63dbb1 = _0x177e34, + _0x19c243 = _0x54e849, + _0x35f0f8 = _0x241128; + _0x9f0318 = _0x53179a(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 0], 7, -680876936); + _0x241128 = _0x53179a(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 1], 12, -389564586); + _0x54e849 = _0x53179a(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 2], 17, 606105819); + _0x177e34 = _0x53179a(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 3], 22, -1044525330); + _0x9f0318 = _0x53179a(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 4], 7, -176418897); + _0x241128 = _0x53179a(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 5], 12, 1200080426); + _0x54e849 = _0x53179a(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 6], 17, -1473231341); + _0x177e34 = _0x53179a(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 7], 22, -45705983); + _0x9f0318 = _0x53179a(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 8], 7, 1770035416); + _0x241128 = _0x53179a(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 9], 12, -1958414417); + _0x54e849 = _0x53179a(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 10], 17, -42063); + _0x177e34 = _0x53179a(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 11], 22, -1990404162); + _0x9f0318 = _0x53179a(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 12], 7, 1804603682); + _0x241128 = _0x53179a(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 13], 12, -40341101); + _0x54e849 = _0x53179a(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 14], 17, -1502002290); + _0x9f0318 = _0x32931e(_0x9f0318, _0x177e34 = _0x53179a(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 15], 22, 1236535329), _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 1], 5, -165796510); + _0x241128 = _0x32931e(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 6], 9, -1069501632); + _0x54e849 = _0x32931e(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 11], 14, 643717713); + _0x177e34 = _0x32931e(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 0], 20, -373897302); + _0x9f0318 = _0x32931e(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 5], 5, -701558691); + _0x241128 = _0x32931e(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 10], 9, 38016083); + _0x54e849 = _0x32931e(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 15], 14, -660478335); + _0x177e34 = _0x32931e(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 4], 20, -405537848); + _0x9f0318 = _0x32931e(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 9], 5, 568446438); + _0x241128 = _0x32931e(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 14], 9, -1019803690); + _0x54e849 = _0x32931e(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 3], 14, -187363961); + _0x177e34 = _0x32931e(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 8], 20, 1163531501); + _0x9f0318 = _0x32931e(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 13], 5, -1444681467); + _0x241128 = _0x32931e(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 2], 9, -51403784); + _0x54e849 = _0x32931e(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 7], 14, 1735328473); + _0x9f0318 = _0x462ba4(_0x9f0318, _0x177e34 = _0x32931e(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 12], 20, -1926607734), _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 5], 4, -378558); + _0x241128 = _0x462ba4(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 8], 11, -2022574463); + _0x54e849 = _0x462ba4(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 11], 16, 1839030562); + _0x177e34 = _0x462ba4(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 14], 23, -35309556); + _0x9f0318 = _0x462ba4(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 1], 4, -1530992060); + _0x241128 = _0x462ba4(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 4], 11, 1272893353); + _0x54e849 = _0x462ba4(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 7], 16, -155497632); + _0x177e34 = _0x462ba4(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 10], 23, -1094730640); + _0x9f0318 = _0x462ba4(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 13], 4, 681279174); + _0x241128 = _0x462ba4(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 0], 11, -358537222); + _0x54e849 = _0x462ba4(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 3], 16, -722521979); + _0x177e34 = _0x462ba4(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 6], 23, 76029189); + _0x9f0318 = _0x462ba4(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 9], 4, -640364487); + _0x241128 = _0x462ba4(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 12], 11, -421815835); + _0x54e849 = _0x462ba4(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 15], 16, 530742520); + _0x9f0318 = _0x48717b(_0x9f0318, _0x177e34 = _0x462ba4(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 2], 23, -995338651), _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 0], 6, -198630844); + _0x241128 = _0x48717b(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 7], 10, 1126891415); + _0x54e849 = _0x48717b(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 14], 15, -1416354905); + _0x177e34 = _0x48717b(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 5], 21, -57434055); + _0x9f0318 = _0x48717b(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 12], 6, 1700485571); + _0x241128 = _0x48717b(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 3], 10, -1894986606); + _0x54e849 = _0x48717b(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 10], 15, -1051523); + _0x177e34 = _0x48717b(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 1], 21, -2054922799); + _0x9f0318 = _0x48717b(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 8], 6, 1873313359); + _0x241128 = _0x48717b(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 15], 10, -30611744); + _0x54e849 = _0x48717b(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 6], 15, -1560198380); + _0x177e34 = _0x48717b(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 13], 21, 1309151649); + _0x9f0318 = _0x48717b(_0x9f0318, _0x177e34, _0x54e849, _0x241128, _0x36c4c5[_0x1eaf55 + 4], 6, -145523070); + _0x241128 = _0x48717b(_0x241128, _0x9f0318, _0x177e34, _0x54e849, _0x36c4c5[_0x1eaf55 + 11], 10, -1120210379); + _0x54e849 = _0x48717b(_0x54e849, _0x241128, _0x9f0318, _0x177e34, _0x36c4c5[_0x1eaf55 + 2], 15, 718787259); + _0x177e34 = _0x48717b(_0x177e34, _0x54e849, _0x241128, _0x9f0318, _0x36c4c5[_0x1eaf55 + 9], 21, -343485551); + _0x9f0318 = _0x9f0318 + _0x1eaed6 >>> 0; + _0x177e34 = _0x177e34 + _0x63dbb1 >>> 0; + _0x54e849 = _0x54e849 + _0x19c243 >>> 0; + _0x241128 = _0x241128 + _0x35f0f8 >>> 0; + } + return _0xffa1b6.endian([_0x9f0318, _0x177e34, _0x54e849, _0x241128]); + }; + i._ff = function (_0x4d18ad, _0x37924f, _0x471101, _0x33a5fa, _0x306699, _0x29dbe4, _0x54a86) { + var _0x5e5cb7 = _0x4d18ad + (_0x37924f & _0x471101 | ~_0x37924f & _0x33a5fa) + (_0x306699 >>> 0) + _0x54a86; + return (_0x5e5cb7 << _0x29dbe4 | _0x5e5cb7 >>> 32 - _0x29dbe4) + _0x37924f; + }; + i._gg = function (_0x1761cb, _0x395b69, _0x2264e7, _0x43740c, _0x27d0b8, _0x39edaf, _0x4018db) { + var _0x5c26fe = _0x1761cb + (_0x395b69 & _0x43740c | _0x2264e7 & ~_0x43740c) + (_0x27d0b8 >>> 0) + _0x4018db; + return (_0x5c26fe << _0x39edaf | _0x5c26fe >>> 32 - _0x39edaf) + _0x395b69; + }; + i._hh = function (_0x3dab40, _0x5551d9, _0x4df181, _0x5df43f, _0x4f41a2, _0x528b1e, _0x2b9231) { + var _0x3c2930 = _0x3dab40 + (_0x5551d9 ^ _0x4df181 ^ _0x5df43f) + (_0x4f41a2 >>> 0) + _0x2b9231; + return (_0x3c2930 << _0x528b1e | _0x3c2930 >>> 32 - _0x528b1e) + _0x5551d9; + }; + i._ii = function (_0x3d3f0c, _0x2cf40e, _0x98772b, _0x21295e, _0x185ddc, _0x1794dd, _0x341852) { + var _0x36f694 = _0x3d3f0c + (_0x98772b ^ (_0x2cf40e | ~_0x21295e)) + (_0x185ddc >>> 0) + _0x341852; + return (_0x36f694 << _0x1794dd | _0x36f694 >>> 32 - _0x1794dd) + _0x2cf40e; + }; + i._blocksize = 16; + i._digestsize = 16; + function _0x29a34c(_0x2de10f) { + for (var _0x3601f8 = [], _0x1bef4f = 0; _0x1bef4f < 32 * _0x2de10f.length; _0x1bef4f += 8) _0x3601f8.push(_0x2de10f[_0x1bef4f >>> 5] >>> 24 - _0x1bef4f % 32 & 255); + return _0x3601f8; + } + function _0x57d473(_0x13381c) { + for (var _0x77c13e = [], _0x15177b = 0; _0x15177b < _0x13381c.length; _0x15177b++) { + _0x77c13e.push((_0x13381c[_0x15177b] >>> 4).toString(16)); + _0x77c13e.push((15 & _0x13381c[_0x15177b]).toString(16)); + } + return _0x77c13e.join(""); + } + function _0x36dc35(_0x1477c4) { + const _0x4ffd6d = {}; + for (const _0x5c92e1 in _0x1477c4) { + if ("" !== _0x1477c4[_0x5c92e1] && null !== _0x1477c4[_0x5c92e1] && undefined !== _0x1477c4[_0x5c92e1]) { + _0x4ffd6d[_0x5c92e1] = _0x1477c4[_0x5c92e1]; + } + } + let _0x57c270 = ""; + _0x57c270 = Object.keys(_0x4ffd6d).join(" "); + let _0x374ba2 = []; + _0x374ba2 = function (_0x495814) { + const _0x4e2ce2 = _0x495814.split(/\s+/gi), + _0x55d3b1 = Array.prototype.sort.call(_0x4e2ce2, function (_0x300171, _0xda27df) { + for (let _0x40539b = 0; _0x40539b < _0x300171.length; _0x40539b++) if (_0x300171.charCodeAt(_0x40539b) !== _0xda27df.charCodeAt(_0x40539b)) { + return _0x300171.charCodeAt(_0x40539b) - _0xda27df.charCodeAt(_0x40539b); + } + }); + return _0x55d3b1; + }(_0x57c270); + let _0x1080ec = ""; + _0x374ba2.forEach(_0x20840c => { + _0x1080ec += _0x20840c + "=" + _0x4ffd6d[_0x20840c] + "&"; + }); + _0x1080ec = _0x1080ec.slice(0, _0x1080ec.length - 1); + _0x1080ec += "0]3K@'9MK+6Jf"; + return _0x1080ec; + } + function _0x13ac86(_0x1264d1) { + return _0x57d473(_0x29a34c(i(_0x36dc35(_0x1264d1)))); + } + return _0x13ac86(_0x5be860); + } + function enen(_0x427d20) { + let _0x2bb948 = _0x427d20; + var _0x587ceb = {}; + for (var _0x175321 in _0x2bb948) if ("" !== _0x2bb948[_0x175321] && null !== _0x2bb948[_0x175321] && undefined !== _0x2bb948[_0x175321]) { + _0x587ceb[_0x175321] = _0x2bb948[_0x175321]; + } + var _0x5e848a = Object.keys(_0x587ceb).join(" ").split(/\s+/gi), + _0x4b5be8 = Array.prototype.sort.call(_0x5e848a, function (_0x115e4e, _0xd97089) { + for (var _0x4f167c = 0; _0x4f167c < _0x115e4e.length; _0x4f167c++) if (_0x115e4e.charCodeAt(_0x4f167c) !== _0xd97089.charCodeAt(_0x4f167c)) { + return _0x115e4e.charCodeAt(_0x4f167c) - _0xd97089.charCodeAt(_0x4f167c); + } + }), + _0x5bef29 = "", + _0xb00b72 = /^(\d{4})-(\d{2})-(\d{2})/, + _0x12b1a4 = /(\d{2}):(\d{2}):(\d{2})$/; + _0x4b5be8.forEach(function (_0x25850c) { + if (_0xb00b72.test(_0x587ceb[_0x25850c]) && _0x12b1a4.test(_0x587ceb[_0x25850c])) { + ""; + _0x5bef29 += _0x25850c + "=" + Date.parse(_0x587ceb[_0x25850c].replace(/-/g, "/")) + "&"; + } else { + _0x5bef29 += _0x25850c + "=" + _0x587ceb[_0x25850c] + "&"; + } + }); + _0x5bef29 = _0x5bef29.slice(0, _0x5bef29.length - 1); + _0x5bef29 += "0]3K@'9MK+6Jf"; + function _0x3d6e53(_0x3c027a) { + function _0x625294(_0x262af1, _0x13aa96) { + return _0x262af1 << _0x13aa96 | _0x262af1 >>> 32 - _0x13aa96; + } + function _0x503769(_0xed1683, _0x3a9f0a) { + var _0x14b62d, _0x60e289, _0x5a838c, _0x3ac74b, _0x514e01; + _0x5a838c = 2147483648 & _0xed1683; + _0x3ac74b = 2147483648 & _0x3a9f0a; + _0x14b62d = 1073741824 & _0xed1683; + _0x60e289 = 1073741824 & _0x3a9f0a; + _0x514e01 = (1073741823 & _0xed1683) + (1073741823 & _0x3a9f0a); + return _0x14b62d & _0x60e289 ? 2147483648 ^ _0x514e01 ^ _0x5a838c ^ _0x3ac74b : _0x14b62d | _0x60e289 ? 1073741824 & _0x514e01 ? 3221225472 ^ _0x514e01 ^ _0x5a838c ^ _0x3ac74b : 1073741824 ^ _0x514e01 ^ _0x5a838c ^ _0x3ac74b : _0x514e01 ^ _0x5a838c ^ _0x3ac74b; + } + function _0x573ba6(_0xa60f71, _0x47db0a, _0x5174b0) { + return _0xa60f71 & _0x47db0a | ~_0xa60f71 & _0x5174b0; + } + function _0xbbc92b(_0xe77b29, _0x4b82b5, _0x200719) { + return _0xe77b29 & _0x200719 | _0x4b82b5 & ~_0x200719; + } + function _0x56a2c5(_0x406396, _0x3e19ba, _0x4b5071) { + return _0x406396 ^ _0x3e19ba ^ _0x4b5071; + } + function _0x3eb299(_0x94b5fb, _0x9d8446, _0x51f6e5) { + return _0x9d8446 ^ (_0x94b5fb | ~_0x51f6e5); + } + function _0x2500e8(_0x19fc59, _0x5b7fff, _0x189026, _0x2f54a7, _0xc38270, _0xd96c87, _0x359c9a) { + _0x19fc59 = _0x503769(_0x19fc59, _0x503769(_0x503769(_0x573ba6(_0x5b7fff, _0x189026, _0x2f54a7), _0xc38270), _0x359c9a)); + return _0x503769(_0x625294(_0x19fc59, _0xd96c87), _0x5b7fff); + } + function _0x37c919(_0x52d2e8, _0x45e060, _0x353c63, _0x27d8e9, _0x25f2d2, _0x546f43, _0x1aa6f9) { + _0x52d2e8 = _0x503769(_0x52d2e8, _0x503769(_0x503769(_0xbbc92b(_0x45e060, _0x353c63, _0x27d8e9), _0x25f2d2), _0x1aa6f9)); + return _0x503769(_0x625294(_0x52d2e8, _0x546f43), _0x45e060); + } + function _0x8c4077(_0x355ab4, _0x1b8f66, _0x37ae44, _0x24fda7, _0xac05e0, _0x255ca8, _0x3f7e62) { + _0x355ab4 = _0x503769(_0x355ab4, _0x503769(_0x503769(_0x56a2c5(_0x1b8f66, _0x37ae44, _0x24fda7), _0xac05e0), _0x3f7e62)); + return _0x503769(_0x625294(_0x355ab4, _0x255ca8), _0x1b8f66); + } + function _0x18c909(_0x59c23a, _0x44a64e, _0x4fdafa, _0x2d7f3b, _0x42ed73, _0x52e095, _0x1277fa) { + _0x59c23a = _0x503769(_0x59c23a, _0x503769(_0x503769(_0x3eb299(_0x44a64e, _0x4fdafa, _0x2d7f3b), _0x42ed73), _0x1277fa)); + return _0x503769(_0x625294(_0x59c23a, _0x52e095), _0x44a64e); + } + function _0x28f791(_0x2e9a8e) { + for (var _0x4a27b0, _0x5948bd = _0x2e9a8e.length, _0xc15a39 = _0x5948bd + 8, _0x652e71 = (_0xc15a39 - _0xc15a39 % 64) / 64, _0x1d86b2 = 16 * (_0x652e71 + 1), _0x5dd4fe = new Array(_0x1d86b2 - 1), _0x56fd1d = 0, _0x25c7aa = 0; _0x5948bd > _0x25c7aa;) { + _0x4a27b0 = (_0x25c7aa - _0x25c7aa % 4) / 4; + _0x56fd1d = _0x25c7aa % 4 * 8; + _0x5dd4fe[_0x4a27b0] = _0x5dd4fe[_0x4a27b0] | _0x2e9a8e.charCodeAt(_0x25c7aa) << _0x56fd1d; + _0x25c7aa++; + } + _0x4a27b0 = (_0x25c7aa - _0x25c7aa % 4) / 4; + _0x56fd1d = _0x25c7aa % 4 * 8; + _0x5dd4fe[_0x4a27b0] = _0x5dd4fe[_0x4a27b0] | 128 << _0x56fd1d; + _0x5dd4fe[_0x1d86b2 - 2] = _0x5948bd << 3; + _0x5dd4fe[_0x1d86b2 - 1] = _0x5948bd >>> 29; + return _0x5dd4fe; + } + function _0x1a1713(_0xa72e45) { + var _0x5da836, + _0x544dc0, + _0x2a249f = "", + _0x2ddade = ""; + for (_0x544dc0 = 0; 3 >= _0x544dc0; _0x544dc0++) { + _0x5da836 = _0xa72e45 >>> 8 * _0x544dc0 & 255; + _0x2ddade = "0" + _0x5da836.toString(16); + _0x2a249f += _0x2ddade.substr(_0x2ddade.length - 2, 2); + } + return _0x2a249f; + } + function _0x54565d(_0x4b35a7) { + _0x4b35a7 = _0x4b35a7.replace(/\r\n/g, "\n"); + for (var _0x454643 = "", _0x199c35 = 0; _0x199c35 < _0x4b35a7.length; _0x199c35++) { + var _0x34dafe = _0x4b35a7.charCodeAt(_0x199c35); + 128 > _0x34dafe ? _0x454643 += String.fromCharCode(_0x34dafe) : _0x34dafe > 127 && 2048 > _0x34dafe ? (_0x454643 += String.fromCharCode(_0x34dafe >> 6 | 192), _0x454643 += String.fromCharCode(63 & _0x34dafe | 128)) : (_0x454643 += String.fromCharCode(_0x34dafe >> 12 | 224), _0x454643 += String.fromCharCode(_0x34dafe >> 6 & 63 | 128), _0x454643 += String.fromCharCode(63 & _0x34dafe | 128)); + } + return _0x454643; + } + var _0x4daa49, + _0x11594b, + _0x4dd961, + _0x2a975f, + _0x3f80f4, + _0x4550e0, + _0x36eeac, + _0x20bd6b, + _0x33b079, + _0x4e8984 = [], + _0x51d351 = 7, + _0x1f1ac8 = 12, + _0xd46af4 = 17, + _0x20d6aa = 22, + _0x36ba91 = 5, + _0x5cd8c9 = 9, + _0x4824cc = 14, + _0x51a2ed = 20, + _0xbbc865 = 4, + _0x509dbe = 11, + _0x4db84d = 16, + _0xb3be61 = 23, + _0x2e1f72 = 6, + _0x2f185d = 10, + _0x4a9a2a = 15, + _0x297e25 = 21; + for (_0x3c027a = _0x54565d(_0x3c027a), _0x4e8984 = _0x28f791(_0x3c027a), _0x4550e0 = 1732584193, _0x36eeac = 4023233417, _0x20bd6b = 2562383102, _0x33b079 = 271733878, _0x4daa49 = 0; _0x4daa49 < _0x4e8984.length; _0x4daa49 += 16) { + _0x11594b = _0x4550e0; + _0x4dd961 = _0x36eeac; + _0x2a975f = _0x20bd6b; + _0x3f80f4 = _0x33b079; + _0x4550e0 = _0x2500e8(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 0], _0x51d351, 3614090360); + _0x33b079 = _0x2500e8(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 1], _0x1f1ac8, 3905402710); + _0x20bd6b = _0x2500e8(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 2], _0xd46af4, 606105819); + _0x36eeac = _0x2500e8(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 3], _0x20d6aa, 3250441966); + _0x4550e0 = _0x2500e8(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 4], _0x51d351, 4118548399); + _0x33b079 = _0x2500e8(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 5], _0x1f1ac8, 1200080426); + _0x20bd6b = _0x2500e8(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 6], _0xd46af4, 2821735955); + _0x36eeac = _0x2500e8(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 7], _0x20d6aa, 4249261313); + _0x4550e0 = _0x2500e8(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 8], _0x51d351, 1770035416); + _0x33b079 = _0x2500e8(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 9], _0x1f1ac8, 2336552879); + _0x20bd6b = _0x2500e8(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 10], _0xd46af4, 4294925233); + _0x36eeac = _0x2500e8(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 11], _0x20d6aa, 2304563134); + _0x4550e0 = _0x2500e8(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 12], _0x51d351, 1804603682); + _0x33b079 = _0x2500e8(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 13], _0x1f1ac8, 4254626195); + _0x20bd6b = _0x2500e8(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 14], _0xd46af4, 2792965006); + _0x36eeac = _0x2500e8(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 15], _0x20d6aa, 1236535329); + _0x4550e0 = _0x37c919(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 1], _0x36ba91, 4129170786); + _0x33b079 = _0x37c919(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 6], _0x5cd8c9, 3225465664); + _0x20bd6b = _0x37c919(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 11], _0x4824cc, 643717713); + _0x36eeac = _0x37c919(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 0], _0x51a2ed, 3921069994); + _0x4550e0 = _0x37c919(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 5], _0x36ba91, 3593408605); + _0x33b079 = _0x37c919(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 10], _0x5cd8c9, 38016083); + _0x20bd6b = _0x37c919(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 15], _0x4824cc, 3634488961); + _0x36eeac = _0x37c919(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 4], _0x51a2ed, 3889429448); + _0x4550e0 = _0x37c919(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 9], _0x36ba91, 568446438); + _0x33b079 = _0x37c919(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 14], _0x5cd8c9, 3275163606); + _0x20bd6b = _0x37c919(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 3], _0x4824cc, 4107603335); + _0x36eeac = _0x37c919(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 8], _0x51a2ed, 1163531501); + _0x4550e0 = _0x37c919(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 13], _0x36ba91, 2850285829); + _0x33b079 = _0x37c919(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 2], _0x5cd8c9, 4243563512); + _0x20bd6b = _0x37c919(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 7], _0x4824cc, 1735328473); + _0x36eeac = _0x37c919(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 12], _0x51a2ed, 2368359562); + _0x4550e0 = _0x8c4077(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 5], _0xbbc865, 4294588738); + _0x33b079 = _0x8c4077(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 8], _0x509dbe, 2272392833); + _0x20bd6b = _0x8c4077(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 11], _0x4db84d, 1839030562); + _0x36eeac = _0x8c4077(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 14], _0xb3be61, 4259657740); + _0x4550e0 = _0x8c4077(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 1], _0xbbc865, 2763975236); + _0x33b079 = _0x8c4077(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 4], _0x509dbe, 1272893353); + _0x20bd6b = _0x8c4077(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 7], _0x4db84d, 4139469664); + _0x36eeac = _0x8c4077(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 10], _0xb3be61, 3200236656); + _0x4550e0 = _0x8c4077(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 13], _0xbbc865, 681279174); + _0x33b079 = _0x8c4077(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 0], _0x509dbe, 3936430074); + _0x20bd6b = _0x8c4077(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 3], _0x4db84d, 3572445317); + _0x36eeac = _0x8c4077(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 6], _0xb3be61, 76029189); + _0x4550e0 = _0x8c4077(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 9], _0xbbc865, 3654602809); + _0x33b079 = _0x8c4077(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 12], _0x509dbe, 3873151461); + _0x20bd6b = _0x8c4077(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 15], _0x4db84d, 530742520); + _0x36eeac = _0x8c4077(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 2], _0xb3be61, 3299628645); + _0x4550e0 = _0x18c909(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 0], _0x2e1f72, 4096336452); + _0x33b079 = _0x18c909(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 7], _0x2f185d, 1126891415); + _0x20bd6b = _0x18c909(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 14], _0x4a9a2a, 2878612391); + _0x36eeac = _0x18c909(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 5], _0x297e25, 4237533241); + _0x4550e0 = _0x18c909(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 12], _0x2e1f72, 1700485571); + _0x33b079 = _0x18c909(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 3], _0x2f185d, 2399980690); + _0x20bd6b = _0x18c909(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 10], _0x4a9a2a, 4293915773); + _0x36eeac = _0x18c909(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 1], _0x297e25, 2240044497); + _0x4550e0 = _0x18c909(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 8], _0x2e1f72, 1873313359); + _0x33b079 = _0x18c909(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 15], _0x2f185d, 4264355552); + _0x20bd6b = _0x18c909(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 6], _0x4a9a2a, 2734768916); + _0x36eeac = _0x18c909(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 13], _0x297e25, 1309151649); + _0x4550e0 = _0x18c909(_0x4550e0, _0x36eeac, _0x20bd6b, _0x33b079, _0x4e8984[_0x4daa49 + 4], _0x2e1f72, 4149444226); + _0x33b079 = _0x18c909(_0x33b079, _0x4550e0, _0x36eeac, _0x20bd6b, _0x4e8984[_0x4daa49 + 11], _0x2f185d, 3174756917); + _0x20bd6b = _0x18c909(_0x20bd6b, _0x33b079, _0x4550e0, _0x36eeac, _0x4e8984[_0x4daa49 + 2], _0x4a9a2a, 718787259); + _0x36eeac = _0x18c909(_0x36eeac, _0x20bd6b, _0x33b079, _0x4550e0, _0x4e8984[_0x4daa49 + 9], _0x297e25, 3951481745); + _0x4550e0 = _0x503769(_0x4550e0, _0x11594b); + _0x36eeac = _0x503769(_0x36eeac, _0x4dd961); + _0x20bd6b = _0x503769(_0x20bd6b, _0x2a975f); + _0x33b079 = _0x503769(_0x33b079, _0x3f80f4); + } + var _0x2a3416 = _0x1a1713(_0x4550e0) + _0x1a1713(_0x36eeac) + _0x1a1713(_0x20bd6b) + _0x1a1713(_0x33b079); + return _0x2a3416.toLowerCase(); + } + return _0x3d6e53(_0x5bef29.toString()); + } +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) } diff --git a/jlyh.js b/jlyh.js new file mode 100644 index 0000000..92b6451 --- /dev/null +++ b/jlyh.js @@ -0,0 +1,344 @@ +/** + * new Env("吉利银河") + * cron 08 15 * * * jlyh.js + * Show: + * 变量名:jlyh + * 变量值:抓域名https://galaxy-user-api.geely.com/api/v1/login/refresh?refreshToken=后面的值&请求头headers中deviceSN的值 + * 抓不到这个域名抓短信登录包 https://galaxy-user-api.geely.com/api/v1/login/mobileCodeLogin 返回体中的refreshToken的值 + * 注意我说的是值 并不是全部 填错的自己看着点 + * 并且变量是两个值 两个值 两个值 一个refreshToke的值一个header请求头中的deviceSN的值 + * scriptVersionNow = "0.0.1"; + */ + +let Notify = 0; +const ckName = "jlyh"; +const $ = new Env("吉利银河"); +let msg = ""; + +class UserInfo { + constructor(str) { + this.ckStatus = true; + this.token = ''; + this.refreshToken = str.split('&')[0]; // 分隔符 + this.deviceSN = str.split('&')[1]; + } + + // 获取UTC时间 + formatDate(date, hourOffset = 0, minuteOffset = 0) { + const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + const adjustedDate = new Date(date); + adjustedDate.setUTCHours(adjustedDate.getUTCHours() + hourOffset); + adjustedDate.setUTCMinutes(adjustedDate.getUTCMinutes() + minuteOffset); + const dayOfWeek = daysOfWeek[adjustedDate.getUTCDay()]; + const day = ('0' + adjustedDate.getUTCDate()).slice(-2); + const month = months[adjustedDate.getUTCMonth()]; + const year = adjustedDate.getUTCFullYear(); + const hours = ('0' + adjustedDate.getUTCHours()).slice(-2); + const minutes = ('0' + adjustedDate.getUTCMinutes()).slice(-2); + const seconds = ('0' + adjustedDate.getUTCSeconds()).slice(-2); + return `${dayOfWeek} ${month} ${day} ${year} ${hours}:${minutes}:${seconds} GMT`; + } + + // 请求头加密参数处理 + calculateHmacSha256(method, accept, content_md5, content_type, date, key, nonce, timestamp, path) { + const crypto = require('crypto'); + let ee = `${method}\n` +// method + `${accept}\n` +// accept + `${content_md5}\n` +// content_md5 + `${content_type}\n` +// content_type + `${date}\n` +// date + `x-ca-key:${key}\n` + + `x-ca-nonce:${nonce}\n` +// nonce + `x-ca-timestamp:${timestamp}\n` +// timestamp + `${path}`// path + let sercetKey + if (key == 204453306) { + sercetKey = `uUwSi6m9m8Nx3Grx7dQghyxMpOXJKDGu` + } else if (key == 204373120) { + sercetKey = `XfH7OiOe07vorWwvGQdCqh6quYda9yGW` + } else if (key == 204167276) { + sercetKey = `5XfsfFBrUEF0fFiAUmAFFQ6lmhje3iMZ` + } else if (key == 204168364) { + sercetKey = `NqYVmMgH5HXol8RB8RkOpl8iLCBakdRo` + } else if (key == 204179735) { + sercetKey = `UhmsX3xStU4vrGHGYtqEXahtkYuQncMf` + } + const hmacSha256 = crypto.createHmac('sha256', sercetKey); + hmacSha256.update(ee); + const encryptedData = hmacSha256.digest(); + return encryptedData.toString('base64'); + } + + // UUID生成 + generateUUID() { + const alphanumeric = "0123456789abcdef"; + const sections = [8, 4, 4, 4, 12]; + let uuid = ""; + for (let i = 0; i < sections.length; i++) { + for (let j = 0; j < sections[i]; j++) { + uuid += alphanumeric[Math.floor(Math.random() * alphanumeric.length)]; + } + if (i !== sections.length - 1) { + uuid += "-"; + } + } + return uuid; + } + + // Post请求构建 + getPostHeader(key, path, body) { + const crypto = require('crypto'); + function calculateContentMD5(requestBody) { + const byteArray = Buffer.from(requestBody, 'utf8'); + const md5Digest = crypto.createHash('md5').update(byteArray).digest(); + const md5Base64 = md5Digest.toString('base64'); + return md5Base64; + } + let currentDate = new Date(); + let formattedDate = this.formatDate(currentDate, 0); + let parts = formattedDate.split(" "); + formattedDate = `${parts[0]}, ${parts[2]} ${parts[1]} ${parts[3]} ${parts[4]} GMT`; + let date = new Date(formattedDate) + let timestamp = date.getTime(); + let content_md5 = calculateContentMD5(body); + let uuid = this.generateUUID(); + let signature = this.calculateHmacSha256("POST", "application/json; charset=utf-8", content_md5, "application/json; charset=utf-8", formattedDate, key, uuid, timestamp, path) + let headers = { + 'date': formattedDate, + 'x-ca-signature': signature, + 'x-ca-appcode': 'SWGeelyCode', + 'x-ca-nonce': uuid, + 'x-ca-key': key, + 'ca_version': 1, + 'accept': 'application/json; charset=utf-8', + 'usetoken': 1, + 'content-md5': content_md5, + 'x-ca-timestamp': timestamp, + 'x-ca-signature-headers': 'x-ca-nonce,x-ca-timestamp,x-ca-key', + 'x-refresh-token': true, + 'user-agent': 'ALIYUN-ANDROID-UA', + 'token': this.token, + 'deviceSN': this.deviceSN, + 'txCookie': '', + 'appId': 'galaxy-app', + 'appVersion': '1.27.0', + 'platform': 'Android', + 'Cache-Control': 'no-cache', + 'sweet_security_info': '{"appVersion":"1.27.0","platform":"android"}' , + 'methodtype': '6', + 'contenttype': 'application/json', + 'Content-Type': 'application/json; charset=utf-8', + 'Content-Length': '87', + 'Connection': 'Keep-Alive', + 'Accept-Encoding': 'gzip', + } + if (key == 204179735) { + headers["usetoken"] = true + headers["host"] = `galaxy-user-api.geely.com` + delete headers["x-refresh-token"] + headers["taenantid"] = 569001701001 + headers["svcsid"] = "" + } else { + headers["usetoken"] = 1 + headers["host"] = `galaxy-app.geely.com` + headers["x-refresh-token"] = true + } + return headers; + } + + // Get请求构建 + getGetHeader(key, path) { + let currentDate = new Date(); + let formattedDate = this.formatDate(currentDate, 0); + let parts = formattedDate.split(" "); + formattedDate = `${parts[0]}, ${parts[2]} ${parts[1]} ${parts[3]} ${parts[4]} GMT`; + let date = new Date(formattedDate) + let timestamp = date.getTime(); + let uuid = this.generateUUID(); + let signature = this.calculateHmacSha256("GET", "application/json; charset=utf-8", "", "application/x-www-form-urlencoded; charset=utf-8", formattedDate, key, uuid, timestamp, path) + let headers = { + 'date': formattedDate, + 'x-ca-signature': signature, + 'x-ca-nonce': uuid, + 'x-ca-key': key, + 'ca_version': 1, + 'accept': 'application/json; charset=utf-8', + 'usetoken': 1, + 'x-ca-timestamp': timestamp, + 'x-ca-signature-headers': 'x-ca-nonce,x-ca-timestamp,x-ca-key', + 'x-refresh-token': true, + 'content-type': 'application/x-www-form-urlencoded; charset=utf-8', + 'user-agent': 'ALIYUN-ANDROID-UA', + 'token': this.token, + 'deviceSN': this.deviceSN, + 'txCookie': '', + 'appId': 'galaxy-app', + 'appVersion': '1.27.0', + 'platform': 'Android', + 'Cache-Control': 'no-cache', + 'Connection': 'Keep-Alive', + 'Accept-Encoding': 'gzip', + } + if (key == 204179735) { + headers["usetoken"] = true + headers["host"] = `galaxy-user-api.geely.com` + delete headers["x-refresh-token"] + headers["taenantid"] = 569001701001 + headers["svcsid"] = "" + } else { + headers["usetoken"] = 1 + headers["host"] = `galaxy-app.geely.com` + headers["x-refresh-token"] = true + } + return headers + } + + // 刷新Key函数 + async refresh_token() { + try { + let options = { + url: `https://galaxy-user-api.geely.com/api/v1/login/refresh?refreshToken=${this.refreshToken}`, + headers: this.getGetHeader(204179735, `/api/v1/login/refresh?refreshToken=${this.refreshToken}`), + }, + result = await httpRequest(options); + if (result.code == 'success') { + console.log(`✅${result.message}: ${result.data.centerTokenDto.token} \n🆗刷新KEY:${result.data.centerTokenDto.refreshToken}`); + this.ckStatus = true; + this.token = result.data.centerTokenDto.token + } else { + $.DoubleLog(`❌ ${result.message}`); + this.ckStatus = false; + console.log(result); + Notify = 1; + } + } catch (e) { + console.log(e) + } + } + + //签到状态查询函数 + async signstate() { + try { + let options = { + url: `https://galaxy-app.geely.com/app/v1/sign/state`, + headers: this.getGetHeader(204453306, `/app/v1/sign/state`), + }; + + let result = await httpRequest(options); + + if (result.code == 0) { + if (result.data === true) { + $.DoubleLog(`✅今日已经签到啦!`); + return true; + } else { + return false; + } + } else { + $.DoubleLog(`❌查询签到状态失败!`); + console.log("⚠️失败原因:", result); + Notify = 1; + return false; + } + } catch (e) { + console.log(e); + return false; + } + } + + //签到函数 + async sign() { + try { + const hasSignedToday = await this.signstate(); + if (hasSignedToday) { + await this.points(); + return; + } + + const body = { + "signType": 0 + }; + + let options = { + url: `https://galaxy-app.geely.com/app/v1/sign/add`, + headers: this.getPostHeader(204453306, `/app/v1/sign/add`, JSON.stringify(body)), + body: JSON.stringify(body) + }; + + let result = await httpRequest(options); + + if (result.code == 0) { + $.DoubleLog(`✅签到成功!`); + await this.points(); + Notify = 1; + } else { + $.DoubleLog(`❌签到失败!`); + console.log("⚠️失败原因:", result); + Notify = 1; + } + } catch (e) { + console.log(e); + } + } + + //查询积分函数 + async points() { + try { + let options = { + url: `https://galaxy-app.geely.com/h5/v1/points/get`, + headers: this.getGetHeader(204453306, `/h5/v1/points/get`), + }, + result = await httpRequest(options); + if (result.code == 0) { + $.DoubleLog(`✅剩余积分: ${result.data.availablePoints}`); + } else { + $.DoubleLog(`❌剩余积分查询: 失败`); + console.log(result); + Notify = 1; + } + } catch (e) { + console.log(e); + } + } +} + +// 变量检查与处理 +!(async () => { + const userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (!userCookie) { + console.log("未找到CK"); + return; + } + const user = new UserInfo(userCookie); + await user.refresh_token(); + if (user.ckStatus) { + await user.sign(); + } else { + $.DoubleLog(`❌账号CK失效`); + } + await $.SendMsg(msg); +})().catch((e) => console.log(e)).finally(() => $.done()); + +// ==================== API ==================== // +function httpRequest(options, method = null) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + } else { + if (data) { + try { data = JSON.parse(data); } catch (error) { } + resolve(data); + } else { + console.log(`请求api返回数据为空,请检查自身原因`); + } + } + resolve(); + }); + }); +} + +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http:// ${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = () => { }) { switch ((t.headers && (delete t.headers[""]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +// Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/jlzx.js b/jlzx.js new file mode 100644 index 0000000..c23c5a7 --- /dev/null +++ b/jlzx.js @@ -0,0 +1,519 @@ +/* +@随缘撸豆 +江铃智行 app cron 22 8,12 * * * jlzx.js + +5.27 就一个签到 随缘玩吧 服务器闲着也是闲着 + +------------------------ 青龙--配置文件-贴心复制区域 ---------------------- +抓取superapp.jmc.com.cn中的Access-Token + +export jlzx="Access-Token " + +多账号用 换行 或 @ 分割 +一天1~5分 挂一年能换点东西 +*/ + +const $ = new Env("江铃智行") +const CK_NAME = "jlzx" +const Notify = 1 // 通知控制 +const tgLogFlag = 1 // 是否tg发送通知, 偷撸车使用, 默认0--不发送 +let msg = '' +//=========================================================================== + +//=========================================================================== + +async function main(userInfo) { + + + await userInfo.sign() + await userInfo.grxx() + // await userInfo.Sendtg_bot() + + + +} + + +class UserInfo { + constructor(index, str) { + this.user_log = `${$.name}\n` + this.index = index + 1 + + if (tgLogFlag) { + try { + this.mopenid = str.split("##")[0] + this.chatId = str.split("##")[1] + + this.ck = str + + //this.ts = ts13() + } catch (error) { + console.log(error) + } + } + + + } + + + + + + async sign() { + let name = "签到"; + let options = { + method: "post", + url: `https://superapp.jmc.com.cn/jmc-zx-app-owner/v1/signIn/add`, + headers: { + "Host": "superapp.jmc.com.cn", + "Content-Length": "33", + "Access-Token": `${this.ck}`, + "Content-Type": "application/json" + }, + body: `{"activityCode":"HD202401010007"}` + }; + // console.log(options); + let res = await httpRequest(options); + //console.log(res); + if (res.resultCode == 0) { + this.token = res.token + this.cusLog(`账号 ${this.index} ${name}: 签到成功 ${res.resultMsg} `) + } else if (res.resultCode == 100000) { + this.cusLog(`账号 ${this.index} ${name}: ${res.resultMsg}`) + } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); + } + async grxx() { + let name = "个人信息"; + let options = { + method: "get", + url: `https://superapp.jmc.com.cn/jmc-zx-app-owner/v1/member/getMemberInfo`, + headers: { + "Host": "superapp.jmc.com.cn", + "Content-Length": "33", + "Access-Token": `${this.ck}`, + "Content-Type": "application/json" + } + }; + // console.log(options); + let res = await httpRequest(options); + //console.log(res); + if (res.resultCode == 0) { + this.token = res.token + this.cusLog(`账号 ${this.index} ${name}: 总积分 ${res.data.integralQuantity} `) + } else if (res.resultCode == 100000) { + this.cusLog(`账号 ${this.index} ${name}: ${res.resultMsg}`) + } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); + } + + + + + + + + + async Sendtg_bot() { + const TelegramBot = require('node-telegram-bot-api'); + const tg_token = process.env.tg_token; + // console.log(tg_token); + let bot = new TelegramBot(tg_token); + let msg = this.user_log; + // console.log(`=================`); + // console.log(this.chatId, msg); + await bot.sendMessage(this.chatId, msg); + } + + + cusLog(a) { + if (tgLogFlag) { + console.log(` ${a}`); + msg += `\n ${a}`; + this.user_log += `\n ${a}`; + } else { + console.log(` ${a}`); + msg += `\n ${a}`; + } + } + + +} + + + + + +/////////////////////////////////////////////////////////////////// + +// 入口 +!(async () => { + const notify = require("./sendNotify"); + $.doubleLog(await $.yiyan()); + let users = await getUsers(CK_NAME, async (index, element) => { + let userInfo = new UserInfo(index, element); + return userInfo; + }); + + list = []; + users.forEach(async element => { + list.push(main(element)); + }); + + await Promise.all(list); + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +// ============================================================================== +async function getUsers(ckName, fnUserInfo) { + let userList = []; + let userCookie = process.env[ckName]; + let envSplicer = ["@", "\n", "&"]; + let userCount = 0; + if (userCookie) { + let e = envSplicer[0]; + for (let o of envSplicer) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + let arr = userCookie.split(e); + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + element && userList.push(await fnUserInfo(index, element)); + } + userCount = userList.length; + } else { + console.log("未找到CK"); + } + console.log(`共找到${userCount}个账号`), !0; + return userList; +} + +async function httpRequest(options, type = false) { + return new Promise((resolve) => { + try { + $.send(options, async (err, res_body, res_format, res) => { + if (err) { + console.log(`错误, 检查点--2`); return; + } + if (!type) { + resolve(res_body); + } resolve(res_format); + }); + } catch (error) { + console.log(error); + } + + }); +} + + + + + + + +// ============================================================================================================================ + +// 新的 env 函数, 增加自定义功能 yml-11.12改 合并 +function Env(name, env) { + "undefined" != typeof process && + JSON.stringify(process.env).indexOf("GITHUB") > -1 && + process.exit(0); + return new (class { + constructor(name, env) { + this.name = name; + this.notifyStr = ""; + this.notifyFlag = false; + this.startTime = new Date().getTime(); + Object.assign(this, env); + console.log(`${this.name} 开始运行: \n`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + send(options, e = () => { }) { + let m = options.method.toLowerCase(); + let t = options; + if (m != "get" && m != "post" && m != "put" && m != "delete") { + console.log(`无效的http方法: ${m}`); + return; + } + if (m == "get" && t.headers) { + // delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if (t.body && t.headers) { + if (t.headers["content-type"]) { + let tem = t.headers["content-type"]; + delete t.headers["content-type"]; + t.headers["Content-Type"] = tem; + } else if (t.body && t.headers) { + if (!t.headers["Content-Type"]) + t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + } + if (this.isNode()) { + this.request = this.request ? this.request : require("request"); + this.request(options, function (error, response) { + if (error) throw new Error(error); + let res_body = response.body; + let res = response; + try { + if (typeof res_body == "string") { + if ($.isJsonStr(res_body)) { + res_body = JSON.parse(res_body); + let res_format = $.formatJson(response.body); + e(null, res_body, res_format, res); + } else e(null, res_body, res_format, res); + } else e(null, res_body, res_format, res); + } catch (error) { + console.log(error); + let a = `ENV -- request 请求错误, 检查点1\n${error}`; + e(a, null, null, null); + } + }); + } + } + isJsonStr(str) { + if (typeof str == "string") { + try { + if (typeof JSON.parse(str) == "object") { + return true; + } + } catch (e) { + return false; + } + } + return false; + } + formatJson(value) { + var json = value; + var i = 0, + len = 0, + tab = " ", + targetJson = "", + indentLevel = 0, + inString = false, + currentChar = null; + for (i = 0, len = json.length; i < len; i += 1) { + currentChar = json.charAt(i); + switch (currentChar) { + case "{": + case "[": + if (!inString) { + targetJson += currentChar + "\n" + repeat(tab, indentLevel + 1); + indentLevel += 1; + } else { + targetJson += currentChar; + } + break; + case "}": + case "]": + if (!inString) { + indentLevel -= 1; + targetJson += "\n" + repeat(tab, indentLevel) + currentChar; + } else { + targetJson += currentChar; + } + break; + case ",": + if (!inString) { + targetJson += ",\n" + repeat(tab, indentLevel); + } else { + targetJson += currentChar; + } + break; + case ":": + if (!inString) { + targetJson += ": "; + } else { + targetJson += currentChar; + } + break; + case " ": + case "\n": + case "\t": + if (inString) { + targetJson += currentChar; + } + break; + case '"': + if (i > 0 && json.charAt(i - 1) !== "\\") { + inString = !inString; + } + targetJson += currentChar; + break; + default: + targetJson += currentChar; + break; + } + } + function repeat(s, count) { + return new Array(count + 1).join(s); + } + function repeat(s, count) { + return new Array(count + 1).join(s); + } + return targetJson; + } + type(str) { + if (this.strCode(str) > 20) { + return console.log(`数据类型是: ${typeof str}`); + } + return console.log(`${str}数据类型是: ${typeof str}`); + } + strCode(str) { + var count = 0; + if (str) { + let len = str.length; + for (var i = 0; i < len; i++) { + if (str.charCodeAt(i) > 255) { + count += 2; + } else { + count++; + } + } + return count; + } else return 0; + } + async SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + console.log($.name, "", message); + } + } else { + console.log(message); + } + } + getMin(a, b) { + return a < b ? a : b; + } + getMax(a, b) { + return a < b ? b : a; + } + json2str(obj, c, encodeUrl = false) { + let ret = []; + for (let keys of Object.keys(obj).sort()) { + let v = obj[keys]; + if (v && encodeUrl) v = encodeURIComponent(v); + ret.push(keys + "=" + v); + } + return ret.join(c); + } + str2json(str, decodeUrl = false) { + let ret = {}; + for (let item of str.split("&")) { + if (!item) continue; + let idx = item.indexOf("="); + if (idx == -1) continue; + let k = item.substr(0, idx); + let v = item.substr(idx + 1); + if (decodeUrl) v = decodeURIComponent(v); + ret[k] = v; + } + return ret; + } + randomStr(len, up = false, charset = "abcdef0123456789") { + let str = ""; + for (let i = 0; i < len; i++) { + str += charset.charAt(Math.floor(Math.random() * charset.length)); + } + if (!up) { + return str; + } + return str.toUpperCase(); + } + phoneNum(phone_num) { + if (phone_num.length == 11) { + let data = phone_num.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2"); + return data; + } else { + return phone_num; + } + } + randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); + } + async yiyan() { + this.request = this.request ? this.request : require("request"); + return new Promise((resolve) => { + var options = { + method: "GET", + url: "https://v1.hitokoto.cn/", + headers: {}, + }; + this.request(options, function (error, response) { + let data = JSON.parse(response.body); + let data_ = `[一言]: ${data.hitokoto} by--${data.from}`; + resolve(data_); + }); + }); + } + wait(t) { + return new Promise((e) => setTimeout(e, t * 1000)); + } + ts(type = false, _data = "") { + let myDate = new Date(); + let a = ""; + switch (type) { + case 10: + a = Math.round(new Date().getTime() / 1000).toString(); + break; + case 13: + a = Math.round(new Date().getTime()).toString(); + break; + case "h": + a = myDate.getHours(); + break; + case "m": + a = myDate.getMinutes(); + break; + case "y": + a = myDate.getFullYear(); + break; + case "h": + a = myDate.getHours(); + break; + case "mo": + a = myDate.getMonth(); + break; + case "d": + a = myDate.getDate(); + break; + case "ts2Data": + if (_data != "") { + time = _data; + if (time.toString().length == 13) { + let date = new Date(time + 8 * 3600 * 1000); + a = date.toJSON().substr(0, 19).replace("T", " "); + } else if (time.toString().length == 10) { + time = time * 1000; + let date = new Date(time + 8 * 3600 * 1000); + a = date.toJSON().substr(0, 19).replace("T", " "); + } + } + break; + default: + a = "未知错误,请检查"; + break; + } + return a; + } + doubleLog(a) { + console.log(` ${a}`); + msg += `\n ${a}`; + } + async done(t = {}) { + await $.SendMsg(msg); + const e = new Date().getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`); + } + })(name, env); +} diff --git a/kfh/kfh.js b/kfh/kfh.js new file mode 100644 index 0000000..3be34bb --- /dev/null +++ b/kfh/kfh.js @@ -0,0 +1,187 @@ +/** + * cron 9 9 * * * + * Show:重写请求函数 在got环境或axios环境都可以请求 + * 卡夫亨 微信网页 https://fscrm.kraftheinz.net.cn/?from=Yk0bMRVg1XmcWpJp6N5OkA== 每日签到分享领积分换卡券 + * + * 变量名:kafufeng + * 变量值:多账号& 或换行 或新建同名变量 fscrm.kraftheinz.net.cn 抓请求头Headers中的token + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("卡夫亨"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "kafufeng"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +let shareList = [] +let msg = "" +class Task { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + //定义在这里的headers会被get请求删掉content-type 而不会重置 + } + async main() { + await this.userInfo(); + await this.signIn() + await this.getShareUrl() + } + async taskRequest(method, url, body = "") { + // + let headers = { + "Host": "fscrm.kraftheinz.net.cn", + "Connection": "keep-alive", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) WindowsWechat(0x6309092b) XWEB/9079 Flue", + "token": this.ck, + "Content-Type": "application/x-www-form-urlencoded", + "Accept": "*/*", + "Origin": "https://fscrm.kraftheinz.net.cn", + "Referer": "https://fscrm.kraftheinz.net.cn/?code=081dcPGa1MYgaH0yI6Ga1Rw39X0dcPGg&state=&appid=wx65da983ae179e97b", + + } + const reqeuestOptions = { + url: url, + method: method, + headers: headers + } + body == "" ? "" : Object.assign(reqeuestOptions, { body: body }) + let { body: result } = await $.httpRequest(reqeuestOptions) + return result + } + async userInfo() { + try { + let result = await this.taskRequest("get", `https://fscrm.kraftheinz.net.cn/crm/public/index.php/api/v1/getUserInfo`) + //console.log(result); + if (result.error_code == 0) { + $.log(`✅账号[${this.index}] 欢迎用户 ${result.data.nickname} 积分 => ${result.data.memberInfo.score}🎉`) + this.ckStatus = true; + } else { + $.log(`❌账号[${this.index}] 用户查询失败[${result.msg}]`); + this.ckStatus = false; + } + } catch (e) { + console.log(e); + } + } + async signIn() { + try { + let result = await this.taskRequest("post", `https://fscrm.kraftheinz.net.cn/crm/public/index.php/api/v1/dailySign`, ``) + //console.log(result); + if (result.error_code == 0) { + $.log(`✅账号[${this.index}] [${result.msg}] 当前积分[${result.data.res}]🎉`) + } else { + $.log(`❌账号[${this.index}] 签到失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } + randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); + } + async getShareUrl() { + try { + let result = await this.taskRequest("post", `https://fscrm.kraftheinz.net.cn/crm/public/index.php/api/v1/getCookbookIndex`, "page=1&pagesize=10") + //console.log(result); + if (result.error_code == 0) { + let shareid = result.data.chineseCookbook.data[this.randomInt(0, 9)].id + let getShareCodeResult = await this.taskRequest("post", `https://fscrm.kraftheinz.net.cn/crm/public/index.php/api/v1/createCookbookCode`, `cookbook_id=${shareid}`) + if (getShareCodeResult?.error_code == 0) { + //console.log(getShareCodeResult) + let code_url = getShareCodeResult?.data.code_url.replace("https://fscrm.kraftheinz.net.cn/?", "") + shareList.push(code_url) + $.log(`✅账号[${this.index}]${code_url}获取分享文章链接成功,添加到内部助力池成功 🎉`); + } + } else { + $.log(`❌账号[${this.index}] 签到失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } + //首账号助力作者?,//得到助力码数组后 账号一助力账号二 .....最后一个账号助力账号1 + async help(params) { + try { + let result = await this.taskRequest("post", `https://fscrm.kraftheinz.net.cn/crm/public/index.php/api/v1/recordScoreShare`, params) + //console.log(result); + if (result.error_code == 0) { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + $.log(`✅账号[${this.index}] 助力情况${result.msg}🎉`) + } else { + $.log(`❌账号[${this.index}] 助力失败[${result.msg}]`); + } + } catch (e) { + console.log(e); + } + } +} + + + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); + taskall = []; + for (let i in userList) { + if (userList[i].ckStatus) { + let sharCode = shareList[Number(i) + 1] + + if (sharCode !== undefined) { + console.log(userList[i].ck + "=>" + sharCode) + taskall.push(await userList[i].help(sharCode)); + } else { + if (userList.length > 1) { + console.log(userList[i].ck + "=>" + shareList[0]) + taskall.push(await userList[i].help(shareList[0])); + } else { + $.log(`账号数目为1 不执行内部助力`) + + } + } + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log(`未找到CK【${ckName}】`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +//Env Api ============================= +/* +* @modifyAuthor @smallfawn +* @modifyTime 2024-03-23 +* @modifyInfo 重写请求函数 在got环境或axios环境都可以请求 +*/ +function Env(t, s) { return new (class { constructor(t, s) { this.name = t; this.data = null; this.dataFile = "box.dat"; this.logs = []; this.logSeparator = "\n"; this.startTime = new Date().getTime(); Object.assign(this, s); this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"); this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { if (this.isSurge() || this.isLoon()) { return $persistentStore.read(t) } else if (this.isQuanX()) { return $prefs.valueForKey(t) } else if (this.isNode()) { this.data = this.loaddata(); return this.data[t] } else { return this.data && this.data[t] || null } } setval(t, s) { if (this.isSurge() || this.isLoon()) { return $persistentStore.write(t, s) } else if (this.isQuanX()) { return $prefs.setValueForKey(t, s) } else if (this.isNode()) { this.data = this.loaddata(); this.data[s] = t; this.writedata(); return true } else { return this.data && this.data[s] || null } } initRequestEnv(t) { try { require.resolve('got') && (this.requset = require("got"), this.requestModule = "got") } catch (e) { } try { require.resolve('axios') && (this.requset = require("axios"), this.requestModule = "axios") } catch (e) { } this.cktough = this.cktough ? this.cktough : require("tough-cookie"); this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); if (t) { t.headers = t.headers ? t.headers : {}; if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { t.cookieJar = this.ckjar } } } queryStr(options) { return Object.entries(options).map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`).join('&') } getURLParams(url) { const params = {}; const queryString = url.split('?')[1]; if (queryString) { const paramPairs = queryString.split('&'); paramPairs.forEach(pair => { const [key, value] = pair.split('='); params[key] = value }) } return params } isJSONString(str) { try { return JSON.parse(str) && typeof JSON.parse(str) === 'object' } catch (e) { return false } } isJson(obj) { var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; return isjson } async sendMsg(message) { if (!message) return; if ($.isNode()) { await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } async httpRequest(options) { let t = { ...options }; t.headers = t.headers || {}; if (t.params) { t.url += '?' + this.queryStr(t.params) } t.method = t.method.toLowerCase(); if (t.method === 'get') { delete t.headers['Content-Type']; delete t.headers['Content-Length']; delete t.headers['content-type']; delete t.headers['content-length']; delete t.body } else if (t.method === 'post') { let ContentType; if (!t.body) { t.body = "" } else if (typeof t.body === "string") { ContentType = this.isJSONString(t.body) ? 'application/json' : 'application/x-www-form-urlencoded' } else if (this.isJson(t.body)) { t.body = JSON.stringify(t.body); ContentType = 'application/json' } if (!t.headers['Content-Type'] && !t.headers['content-type']) { t.headers['Content-Type'] = ContentType } } if (this.isNode()) { this.initRequestEnv(t); if (this.requestModule === "axios" && t.method === "post") { t.data = t.body; delete t.body } let httpResult; if (this.requestModule === "got") { httpResult = await this.requset(t); if (this.isJSONString(httpResult.body)) { httpResult.body = JSON.parse(httpResult.body) } } else if (this.requestModule === "axios") { httpResult = await this.requset(t); httpResult.body = httpResult.data } return httpResult } if (this.isQuanX()) { t.method = t.method.toUpperCase(); return new Promise((resolve, reject) => { $task.fetch(t).then(response => { if (this.isJSONString(response.body)) { response.body = JSON.parse(response.body) } resolve(response) }) }) } } randomNumber(length) { const characters = '0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } randomString(length) { const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join('') } timeStamp() { return new Date().getTime() } uuid() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16) }) } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`); this.log(); if (this.isNode()) { process.exit(1) } if (this.isQuanX()) { $done(t) } } })(t, s) } diff --git a/kfh/kfh_exchange.js b/kfh/kfh_exchange.js new file mode 100644 index 0000000..843a49d --- /dev/null +++ b/kfh/kfh_exchange.js @@ -0,0 +1,380 @@ +/** + * + * 卡夫亨 兑换E卡 + * + * cron 0 0,7 * * * kfh_exchange.js + * 多账号并行执行任务模板 + */ +//=====================================================// +const $ = new Env("卡夫亨兑换E卡"); +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1 +const debug = 0 +let ckStr = ($.isNode() ? process.env.kfh_data : $.getdata('kfh_data')) || ''; //检测CK 外部 +let msg, ck; +let host = 'fscrm.kraftheinz.net.cn'; +let hostname = 'https://' + host; +//---------------------------------------------------// +async function tips(ckArr) { + //DoubleLog(`当前脚本版本${Version}\n📌,如果脚本版本不一致请及时更新`); + console.log(`\n============= 共找到 ${ckArr.length} 个账号 =============`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); +} +!(async () => { + let ckArr = await checkEnv(ckStr, "kfh_data"); //检查CK + await tips(ckArr); //脚本提示 + await start(); //开始任务 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + +//---------------------------------------------------------------------------------封装循环测试 +async function newstart(name, taskname, time) { //任务名 函数名 等待时间 + let ckArr = await checkEnv(ckStr, "kfh_data"); //检查CK + console.log("\n📌📌📌📌📌📌📌📌" + name + "📌📌📌📌📌📌📌📌"); + for (i = 0; i < ckArr.length; i++) { + ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + //let CK = ckArr[i] + await taskname(); + await $.wait(time * 1000); + } +} +//-------------------------------------------------------------------------------封装循环测试 + +async function start() { + //console.log("\n📌📌📌📌📌📌📌📌执行任务1📌📌📌📌📌📌📌📌"); + //for (i = 0; i < ckArr.length; i++) { + // ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + // let CK = ckArr[i] + // await userinfo(); + // await $.wait(2 * 1000); + //} + + await newstart("兑换", userinfo, 10) + +} + + + + +//------------------------------------------------------------------------------------------ +//用户信息查询 +async function userinfo() { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/getUserInfo`, + headers: { + "Host": host, + "token": ck[0] + }, + + }; + let result = await httpGet(url, `用户信息查询`); + + //console.log(result); + if (result?.error_code == 0) { + //console.log(`账号[` + Number(i + 1) + `]` + `用户:${result.data.nickname} 🎉`); + let nickname = result.data.nickname + await exchange(nickname); + } else { + DoubleLog(`账号[` + Number(i + 1) + `]查询失败!可能是CK失效!`); + //console.log(result); + } + } catch (error) { + //console.log(error); + console.log("卡夫亨服务器卡爆啦"); + } + +} + + +//兑换 +async function exchange(nickname) { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/exchangeIntegralNew`, + headers: { + "Host": host, + "token": ck[0], + "Content-Length": 84, + "Content-Type": "application/x-www-form-urlencoded" + }, + body: "value=%E4%BA%AC%E4%B8%9CE%E5%8D%A12%E5%85%83&phone=&type=%E8%A7%86%E9%A2%91%E5%8D%A1" + + }; + let result = await httpPost(url, `兑换`); + + //console.log(result); + if (result?.error_code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `用户为:[` + nickname + `]兑换成功🎉`); + await wait(2); + } else if (result?.error_code == 80005) { + console.log(`账号[` + Number(i + 1) + `]` + `用户为:[` + nickname + `]兑换:${result.msg}`); //兑换一次上限 + } else if (result?.error_code == 30002) { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!${result.msg}`);//积分不足 + //console.log(result); + } else if (result?.error_code == 80007) { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!${result.msg}`);//有兑换在队列中 + } else { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!`) + } + } catch (error) { + //console.log(error); + console.log("卡夫亨服务器卡爆啦"); + } + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// #region ******************************************************** 固定代码 ******************************************************** +/** + * 变量检查 + */ +async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) +} +/** + * 发送消息 + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * 双平台log输出 + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* 等待 X 秒 +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} + +/** + * get请求 + */ +async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + //msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫亨服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * post请求 + */ +async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + //msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫亨服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * 网络请求 (get, post等) + */ +async function httpRequest(postOptionsObject, tip, timeout = 3) { + return new Promise((resolve) => { + + let Options = postOptionsObject; + let request = require('request'); + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); + console.log(Options); + } + + request(Options, async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (!result) return; + resolve(result); + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + //msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫亨服务器卡爆啦"); + } finally { + resolve(); + } + }), timeout + + }); +} + + +/** + * debug调试 + */ +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} + +// 完整 Env +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) } diff --git a/kfw/kfw.js b/kfw/kfw.js new file mode 100644 index 0000000..b67f093 --- /dev/null +++ b/kfw/kfw.js @@ -0,0 +1,408 @@ +/** + * + * 卡夫味 + * + * cron 0 0,7 * * * kfw_v2.js + * 多账号并行执行任务模板 + * 抓域名kraftheinzcrm.kraftheinz.net.cn/crm/public下 请求token + */ + + +//=====================================================// +const $ = new Env("卡夫味"); +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1 +const debug = 0 +let ckStr = ($.isNode() ? process.env.kfw_data : $.getdata('kfw_data')) || ''; //检测CK 外部 +let msg, ck; +let host = 'kraftheinzcrm.kraftheinz.net.cn'; +let hostname = 'https://' + host; +//---------------------------------------------------// +async function tips(ckArr) { + //DoubleLog(`当前脚本版本${Version}\n📌,如果脚本版本不一致请及时更新`); + console.log("日6积分 可换VIP卡等") + DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); +} +!(async () => { + let ckArr = await checkEnv(ckStr, "kfw_data"); //检查CK + await tips(ckArr); //脚本提示 + await start(); //开始任务 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + +//---------------------------------------------------------------------------------封装循环测试 +async function newstart(name, taskname, time) { //任务名 函数名 等待时间 + let ckArr = await checkEnv(ckStr, "kfw_data"); //检查CK + console.log("\n📌📌📌📌📌📌📌📌" + name + "📌📌📌📌📌📌📌📌"); + for (i = 0; i < ckArr.length; i++) { + ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + //let CK = ckArr[i] + await taskname(); + await $.wait(time * 1000); + } +} +//-------------------------------------------------------------------------------封装循环测试 + +async function start() { + //console.log("\n📌📌📌📌📌📌📌📌执行任务1📌📌📌📌📌📌📌📌"); + //for (i = 0; i < ckArr.length; i++) { + // ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + // let CK = ckArr[i] + // await userinfo(); + // await $.wait(2 * 1000); + //} + + await newstart("登录/CK检测", userinfo, 3) + await newstart("签到", dailySign, 5) + await newstart("分享", share, 5) + +} + + + + +//------------------------------------------------------------------------------------------ +//用户信息查询 +async function userinfo() { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/getUserInfo`, + headers: { + "Host": host, + "token": ck[0] + }, + + }; + let result = await httpGet(url, `用户信息查询`); + + //console.log(result); + if (result?.error_code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `当前用户为[${result.data.nickname}] 积分${result?.data.memberInfo.totalScore}🎉`); + //let nickname = result.data.nickname + //let jifen = result?.data.memberInfo.totalScore + } else { + DoubleLog(`账号[` + Number(i + 1) + `]` + `查询失败,可能是CK失效!`); + //console.log(result); + } + } catch (error) { + //console.log(error); + console.log("卡夫味服务器卡爆啦"); + } + +} + +//用户签到 POST +async function dailySign() { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/dailySign`, + headers: { + "Host": host, + "token": ck[0], + }, + }; + let result = await httpPost(url, `签到`); + + //console.log(result); + if (result?.error_code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到成功:${result.msg}🎉`); + await wait(2); + } else if (result?.error_code == 30001) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到失败:${result.msg}`); + //console.log(result); + } + } catch (error) { + //console.log(error); + console.log("卡夫味服务器卡爆啦"); + } + +} + + +//用户分享 POST +async function share() { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/recordScoreShare`, + headers: { + "Host": host, + "token": ck[0], + "Content-Length": 57, //如果没有 length 则判定为 点开自己的分享链接 + "Content-Type": "application/x-www-form-urlencoded" + + }, + body: "invite_id=" + ck[0] + "&cookbook_id=20" + + }; + let result = await httpPost(url, `分享`); + + //console.log(result); + if (result?.error_code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `执行分享成功:${result.msg}🎉`); + await wait(2); + } else { + DoubleLog(`账号[` + Number(i + 1) + `]` + `执行分享失败${result.msg}`); + //console.log(result); + } + } catch (error) { + //console.log(error); + console.log("卡夫味服务器卡爆啦"); + } + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// #region ******************************************************** 固定代码 ******************************************************** +/** + * 变量检查 + */ +async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) +} +/** + * 发送消息 + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * 双平台log输出 + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* 等待 X 秒 +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} + +/** + * get请求 + */ +async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫味服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * post请求 + */ +async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫味服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * 网络请求 (get, post等) + */ +async function httpRequest(postOptionsObject, tip, timeout = 3) { + return new Promise((resolve) => { + + let Options = postOptionsObject; + let request = require('request'); + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); + console.log(Options); + } + + request(Options, async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (!result) return; + resolve(result); + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫味服务器卡爆啦"); + } finally { + resolve(); + } + }), timeout + + }); +} + + +/** + * debug调试 + */ +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} + +// 完整 Env +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) } diff --git a/kfw/kfw_exchange.js b/kfw/kfw_exchange.js new file mode 100644 index 0000000..82be73e --- /dev/null +++ b/kfw/kfw_exchange.js @@ -0,0 +1,382 @@ +/** + * + * 卡夫味 兑换E卡 + * + * cron 0 0,7 * * * kfw_exchange.js + * 多账号并行执行任务模板 + */ +//=====================================================// +const $ = new Env("卡夫味兑换E卡"); +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1 +const debug = 0 +let ckStr = ($.isNode() ? process.env.kfw_data : $.getdata('kfw_data')) || ''; //检测CK 外部 +let msg, ck; +let host = 'kraftheinzcrm.kraftheinz.net.cn'; +let hostname = 'https://' + host; +//---------------------------------------------------// +async function tips(ckArr) { + //DoubleLog(`当前脚本版本${Version}\n📌,如果脚本版本不一致请及时更新`); + console.log(`\n============= 共找到 ${ckArr.length} 个账号 =============`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); +} +!(async () => { + let ckArr = await checkEnv(ckStr, "kfw_data"); //检查CK + await tips(ckArr); //脚本提示 + await start(); //开始任务 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + +//---------------------------------------------------------------------------------封装循环测试 +async function newstart(name, taskname, time) { //任务名 函数名 等待时间 + let ckArr = await checkEnv(ckStr, "kfw_data"); //检查CK + console.log("\n📌📌📌📌📌📌📌📌" + name + "📌📌📌📌📌📌📌📌"); + for (i = 0; i < ckArr.length; i++) { + ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + //let CK = ckArr[i] + await taskname(); + await $.wait(time * 1000); + } +} +//-------------------------------------------------------------------------------封装循环测试 + +async function start() { + //console.log("\n📌📌📌📌📌📌📌📌执行任务1📌📌📌📌📌📌📌📌"); + //for (i = 0; i < ckArr.length; i++) { + // ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + // let CK = ckArr[i] + // await userinfo(); + // await $.wait(2 * 1000); + //} + + await newstart("兑换", userinfo, 10) + +} + + + + +//------------------------------------------------------------------------------------------ +//用户信息查询 +async function userinfo() { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/getUserInfo`, + headers: { + "Host": host, + "token": ck[0] + }, + + }; + let result = await httpGet(url, `用户信息查询`); + + //console.log(result); + if (result?.error_code == 0) { + //console.log(`账号[` + Number(i + 1) + `]` + `用户:${result.data.nickname} 🎉`); + let nickname = result.data.nickname + await exchange(nickname); + } else { + DoubleLog(`账号[` + Number(i + 1) + `]查询失败!可能是CK失效!`); + //console.log(result); + } + } catch (error) { + //console.log(error); + console.log("卡夫味服务器卡爆啦"); + } + +} + + +//兑换 +async function exchange(nickname) { + try { + let url = { + url: `${hostname}/crm/public/index.php/api/v1/exchangeIntegral`, + headers: { + "Host": host, + "token": ck[0], + "Content-Length": 84, + "Content-Type": "application/x-www-form-urlencoded" + }, + body: "value=%E4%BA%AC%E4%B8%9CE%E5%8D%A12%E5%85%83&phone=&type=%E8%A7%86%E9%A2%91%E5%8D%A1" + + }; + let result = await httpPost(url, `兑换`); + + //console.log(result); + if (result?.error_code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `用户为:[` + nickname + `]兑换成功🎉`); + await wait(2); + } else if (result?.error_code == 80005) { + console.log(`账号[` + Number(i + 1) + `]` + `用户为:[` + nickname + `]兑换:${result.msg}`); //兑换一次上限 + } else if (result?.error_code == 30002) { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!${result.msg}`);//积分不足 + //console.log(result); + } else if (result?.error_code == 80007) { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!${result.msg}`);//有兑换在队列中 + } else if (result?.error_code == -1000) { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!,可能目前缺货`) + } else { + console.log(`账号[` + Number(i + 1) + `]用户为:[` + nickname + `]兑换失败!${result.msg},可能目前缺货`) + } + } catch (error) { + //console.log(error); + console.log("卡夫味服务器卡爆啦"); + } + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// #region ******************************************************** 固定代码 ******************************************************** +/** + * 变量检查 + */ +async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) +} +/** + * 发送消息 + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * 双平台log输出 + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* 等待 X 秒 +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} + +/** + * get请求 + */ +async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + //msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫味服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * post请求 + */ +async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + //msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫味服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * 网络请求 (get, post等) + */ +async function httpRequest(postOptionsObject, tip, timeout = 3) { + return new Promise((resolve) => { + + let Options = postOptionsObject; + let request = require('request'); + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); + console.log(Options); + } + + request(Options, async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (!result) return; + resolve(result); + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + //msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("卡夫味服务器卡爆啦"); + } finally { + resolve(); + } + }), timeout + + }); +} + + +/** + * debug调试 + */ +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} + +// 完整 Env +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) } diff --git a/ksjsb.js b/ksjsb.js new file mode 100644 index 0000000..69d4c24 --- /dev/null +++ b/ksjsb.js @@ -0,0 +1,18 @@ +console.log(JSON.stringify([ + "ksnoDelay 是否开启无延迟模式 true开启 可能会导致黑号 谨慎开启", + "ksck 开宝箱ck#salt#代理[可不写] 兼容万安和socks:// 或者socks5:// 群内公告有一键获取CK的方式无需ROOT", + "kstask 默认 food,look,box,search 全开", + "ksmaxtask_look 看广告次数 每次运行 默认50", + "ksmaxtask_search 看搜索广告次数 每次运行 默认25", + "ksmaxtask_food 饭补广次数 每次运行 默认10", + "ksmaxtask_box 宝箱广次数 默认10", + "ksTaskNum 并发变量", + "kssearch 快手搜索广关键词 英文逗号分割 例如 双十一,百度极速版", + "ksdailytask 日常任务 签到 宝箱 打卡 signin,box,huge 需要关闭的 填写变量时候去掉相关的", + "ksextratask 是否开启额外任务 默认true开启,,false关闭 开启可以增加金币 如果提示已领取完毕可以把这个关掉", + "ksmaxreward 每次运行脚本每个账号最多多少金币 默认30000", + "ksispasslive 是否跳过直播 默认跳过 为false时不跳过 ", + "ksisadadd 是否开启追加广告 默认开启 false关闭" +], null, 2)); + +Function("berSED", "var R2YkZth,izD_V32,ezk0Yu,RWe5Wz,qIOqfr8,szoaZL,onPFgpD,J7aaZbe,rWJvcF,mOfCEy,EzW9ZM,Khi9t8,aC0THb,ix6yOs;const IUH9gW=[\"\\x6c\\x65\\x6e\\x67\\x74\\x68\",0x0,\"\\u0061\",0x1,0x3,null,0x20,0x2,0x100,0x6,0x8,0x10,0x4,\"\\x75\\x6e\\x64\\x65\\x66\\x69\\x6e\\x65\\x64\",\"\\u004c\\u005a\\u0053\\u0074\\u0072\\u0069\\u006e\\u0067\",0x31,\"\\x62\",\"\\u0063\",0xff,0x7,0xd,0xe,0xf,0x58,0x5b,0x7f8,0x80,void 0x0,\"\\u0064\",0x7f,0xdf,0x1f,0x3f,0xef,0xc,0x7fe,0x12,0x7f4,0xb9,0x5,\"\\x68\",0x9,\"\\u0067\",0x1fff,0x57,0x90,0x59,0x5a,0x5c,0x5d,0x5e,0x35,0x5f,0x42,0x15,0x45,0xc5,0xb7,\"\\u0066\",0x60,0x61,0x62,0xaa,0xa8,0x96,0x63,0xbd,0x26,\"\\x65\",0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,\"\\u007a\",0x8d,0x8e,0x8f,0x91,0x92,0x93,0x94,0x95,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa9,0xab,0xac,0xad,\"\\u0039\",0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb8,\"\\x32\",0xba,0xbb,0xbc,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,\"\\x33\",0xdc,0xdd,0xde,0x22,0x23,0xe0,0xe1,0x3c,0x11,\"\\u0069\",0xe2,0x43,0xf3,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xf0,0xf1,0xf2,0x52,0x40,0x2c,0x21,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0x101,0x102,0x103,0x104,0x105,0x106,0x107,0x108,0x109,0x10a,0x10b,0x10c,0x10d,0x10e,0x10f,0x110,\"\\u0073\\u0074\",0x111,0x112,\"\\x6e\",0x113,0x114,0x115,0x116,0x117,0x118,0x119,0x11a,0x11b,0x11c,0x17,0x2a,0x11d,0x11e,0x11f,0x120,0x121,0x122,0x123,0x1e,0x4c,0x24,0x124,0x125,0x126,0x127,0x128,0x129,0x12a,0x12b,0x12c,0x12d,\"\\x6e\\x67\",0x12e,0x12f,0x130,0x4f,0x131,0x132,0x133,0x134,0x135,0x136,0x137,0x138,0x139,0x13a,0x13b,0x13c,0x13d,0x13e,0x13f,0x140,0x141,\"\\x58\",0x142,0x143,0x144,0x145,0x146,0x147,0x148,0x30,0x149,0x14a,0x14b,0x14c,0x14d,0x14e,0x2f,0x14f,0x150,0x151,0x152,0x153,0x154,0x155,0x29,0x200,0x156,\"\\x42\",0x157,0x158,0x159,0x15a,0x15b,0x34,0x15c,0x15d,0x15e,0x15f,0xb,0x25,0x160,0x161,\"\\x5a\",0x162,0x1c,0x1b,0x3ff,0xa,0x163,0x7ff,0x164,0x165,0x166,0x18,0x16,0x19,0x13,0x27,0x3d,0x167,0xffff,0x168,0x169,0x16a,0x16b,0x16c,\"\\x79\",0x16d,0x16e,0x16f,0x170,0x171,0x172,0x173,0x174,0x175,0x176,0x177,0x178,\"\\x75\",0x179,0x17a,0x17b,0x17c,0x17d,0x3e8,0x17e,\"\uD83D\uDD14\",0x17f,0x180,\"\\x20\",0x181,0x182,0x183,0x184,0x185,0x186,0x187,0x188,0x189,0x18a,0x18b,!0x1,!0x0,0x18c,0x18d,0x18e,0x18f,0x190,0x191,0x192,0x193,0x194,0x195,0x47,0x196,0x197,0x198,0x199,0x19a,0x19b,0x19c,0x19d,0x19e,0x19f,0x1a0,0x1a1,0x1a2,0x1a3,0x1a4,0x1a5,0x1a6,0x1a7,\"\\u0074\\u0068\",0x1a8,0x1a9,0x1aa,0x1ab,0x1ac,0x1ad,0x1ae,0x1af,0x1b0,0x1b1,0x1b2,\"\\x24\\x31\",0x1b3,\"\\x29\",0x1b4,0x1b5,0x1b6,0x1b7,0x1b8,0x1b9,0x1ba,0x1bb,0x1bc,0x1bd,\"\\x4e\",0x1be,0x46,0x1bf,0x1c0,0x28,0x1c1,0x1c2,0x1c3,\"\\x4d\",0x1c4,\"\\u0038\",0x1c5,0x1c6,0x1c7,0x1c8,0x1c9,0x1ca,0x1cb,0x1cc,0x1cd,0x1ce,0x1cf,0x1d0,0x1d1,0x1d2,0x1d3,0x1d4,0x1d5,0x1d6,0x1d7,0x49,0x1d8,0x1d9,0x1da,0x1db,0x1dc,0x1dd,0x1de,0x1df,0x1e0,0x1e1,0x1e2,0x1e3,0x1e4,0x1e5,0x1e6,0x1e7,0x1e8,0x1e9,0x1ea,0x1eb,0x1ec,0x1ed,0x1ee,0x1ef,0x1f0,0x1f1,0x1f2,0x1f3,0x4b,0x1f4,0x1f5,0x39,0x1f6,0x3e,\"\\x26\",0x1f7,0x1f8,\"\\u003d\",0x1f9,0x1fa,0x1fb,0x1fc,0x1fd,0x1fe,0x1ff,0x201,0x202,0x203,0x204,0x205,\"\\x73\",0x206,0x207,0x208,0x209,0x20a,0x20b,0x20c,0x20d,0x20e,0x20f,0x210,0x211,0x212,0x213,0x214,0x215,0x216,0x217,0x218,\"\\x47\",0x219,0x21a,0x2e,0x21b,0x21c,0x21d,0x21e,0x21f,0x220,0x221,0x222,0x223,0x224,0x225,0x226,0x227,0x228,0x229,0x22a,0x22b,\"\\x54\",0x22c,0x22d,0x22e,0x22f,\"\\u0052\",0x230,0x231,0x232,0x233,0x234,0x235,0x236,0x237,0x238,0x239,0x23a,0x23b,0x23c,0x23d,0x23e,0x23f,0x240,\"\\x74\",0x241,0x242,0x243,0x4d,0x41,0x44,0x244,\"\\x43\",0x245,0x246,0x247,0x248,0x249,0x24a,\"\\u0072\",0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x253,0x254,0x255,0x2000000,0x4000000,0x256,0x38,0x257,0x258,0x259,0x25a,0x25b,0x25c,0x25d,0x25e,0x25f,0x260,0x261,0x262,0x263,0x264,0x265,0x266,0x267,0x268,0x269,0x26a,0x26b,0x26c,0x26d,0x26e,0x26f,0x270,0x271,0x272,0x273,\"\\x5f\",0x274,0x275,0x276,0x277,0x278,0x279,0x27a,0x27b,0x27c,0x27d,0x27e,\"\\x4d\\x49\",0x27f,0x280,0x281,0x282,0x283,0x284,0x285,0x286,0x287,0x288,0x289,\"\\u0030\",0x28a,0x28b,0x28c,0x28d,0x28e,0x28f,0x290,0x291,0x292,0x293,0x294,0x295,0x296,0x297,0x298,0x299,0x29a,0x29b,\"\\u0074\\u0065\",0x29c,0x29d,0x29e,0x29f,0x2a0,0x2a1,0x2a2,0x2a3,0x2a4,0x2a5,0x2a6,0x2a7,0x2a8,0x2a9,0x2aa,0x2ab,0x2ac,0x2ad,0x2ae,0x2af,0x2b0,0x2b1,0x2b2,0x2b3,0x2b4,0x2b5,0x2b6,0x2b7,0x2b8,\"\\x49\",0x2b9,0x2ba,0x2bb,0x2bc,0x2bd,0x2be,0x2bf,0x2c0,0x2c1,0x2c2,0x2c3,0x2c4,0x2c5,0x2c6,0x2c7,0x2c8,0x2c9,0x2ca,0x2cb,0x2cc,0x2cd,0x2ce,0x2cf,0x32,0x2d0,0x2d1,0x2d2,0x2d3,0x2d4,0x2d5,0x2d6,0x2d7,0x2d8,0x2d9,0x2da,0x2db,0x2dc,0x2dd,0x2de,0x2df,0x2e0,0x2e1,0x2e2,0x2e3,0x2e4,0x2e5,0x2e6,0x2e7,0x2e8,0x2e9,0x2ea,0x2eb,0x2ec,0x2ed,0x2ee,0x2ef,0x2f0,\"\\u000a\",0x2f1,0x2f2,0x2f3,0x2f4,0x2f5,0x2f6,0x2f7,0x2f8,0x2f9,0x2fa,0x2fb,0x2fc,0x2fd,0x2fe,0x2ff,\"\\u002d\\u0076\",0x300,0x301,0x302,\"\\u006c\\u0029\",0x303,0x304,\"\\x78\",0x305,0x306,0x307,0x308,0x309,0x30a,0x30b,0x30c,\"\\x65\\x64\",0x30d,0x30e,0x30f,0x310,0x311,0x312,0x313,0xd800,0xdbff,0xdc00,0x10000,0xdfff,0x314,0x315,0x316,0x317,0x318,0x319,0x31a,0x31b,0x31c,0x31d,0x31e,0x31f,0x800,0x320,0x321,0x322,0x323,0x324,0x325,0x326,0x327,0x328,0x329,0x32a,0x32b,0x32c,0x32d,0x32e,0x32f,0x330,0x331,0x332,0x333,0x334,0x335,0x336,0x337,0x338,0x339,0x33a,0x33b,0x33c,0x33d,0x33e,0x33f,0x340,0x341,0x342,0x343,0x2b5d,0x344,0x345,0x346,0x347,0x348,0x5f647ff,\"\uD83D\uDCFA\",0x349,0x34a,0x34b,0x34c,0x34d,0x34e,0x34f,0x350,0x351,0x352,0x353,0x354,0x355,0x356,0x357,0x358,0x359,0x35a,0x35b,0x35c,0x35d,0x35e,0x35f,0x360,0x361,0x362,0x363,0x364,0x365,0x366,0x367,0x368,0x369,0x36a,0x36b,0x36c,0x36d,0x36e,0x36f,0x370,0x371,0x372,0x373,0x374,0x375,0x376,0x377,0x378,0x379,0x37a,0x37b,0x37c,0x37d,0x37e,0x37f,0x380,0x381,0x382,0x383,0x384,0x385,0x386,0x387,0x388,0x389,0x38a,0x38b,\"\\u006d\",0x38c,0x38d,0x38e,0x38f,0x390,0x391,0x392,0x393,0x394,0x395,0x396,0x397,0x398,0x399,0x39a,0x39b,0x39c,0x39d,0x39e,0x39f,0x3a0,0x3a1,0x3a2,0x3a3,0x3a4,0x3a5,0x3a6,0x3a7,0x3a8,0x3a9,0x3aa,0x3ab,0x3ac,0x3ad,0x3ae,0x3af,0x3b0,0x3b1,0x3b2,0x3b3,0x3b4,0x3b5,0x3b6,0x3b7,0x3b8,0x3b9,0x3ba,0x3bb,0x3bc,0x3bd,0x3be,0x3bf,0x3c0,0x3c1,0x3c2,0x3c3,0x3c4,0x3c5,0x3c6,0x3c7,0x3c8,0x3c9,0x3ca,0x3cb,0x3cc,0x3cd,0x3ce,0x3cf,0x3d0,0x3d1,0x3d2,0x3d3,0x3d4,0x3d5,0x3d6,0x3d7,0x3d8,0x3d9,0x3da,0x3db,0x3dc,0x3dd,0x3de,0x3df,0x3e0,0x3e1,0x3e2,0x3e3,0x3e4,0x3e5,\"\\u0067\\u0065\",0x3e6,0x3e7,0x3e9,0x3ea,0x3eb,0x3ec,0x3ed,0x3ee,\"\\u0031\",0x3ef,0x3f0,\"\\u0063\\u006b\",0x3f1,\"\\u003b\",0x3f2,0x3f3,0x3f4,0x3f5,0x3f6,0x3f7,0x3f8,0x3f9,0x3fa,0x3fb,0x3fc,\"\\x74\\x79\",0x3fd,0x3fe,0x400,0x401,0x402,0x403,0x404,0x405,0x406,0x407,0x408,0x409,0x40a,0x40b,0x40c,0x40d,0x40e,0x40f,0x410,0x411,0x412,0x413,0x414,0x415,0x416,0x417,\"\\x65\\x73\",0x418,0x419,0x41a,0x41b,0x41c,0x41d,0x41e,0x41f,0x420,0x421,0x422,0x423,0x424,0x425,0x426,0x427,0x428,0x429,0x42a,0x42b,0x42c,0x42d,0x42e,0x42f,0x430,0x431,0x432,0x433,0x434,0x435,0x436,0x437,0x438,0x439,0x43a,0x43b,0x43c,0x43d,0x43e,0x43f,0x440,\"\\x5d\",0x441,0x442,0x443,0x444,0x445,0x446,0x447,0x448,0x449,0x44a,0x44b,0x44c,0x44d,0x44e,0x44f,0x450,0x451,0x452,0x453,0x454,0x455,0x456,0x457,0x458,0x459,0x45a,0x45b,0x45c,0x45d,0x45e,0x45f,0x460,0x461,0x462,0x463,0x464,0x465,0x466,0x467,0x468,0x469,0x46a,0x46b,0x46c,0x46d,0x46e,0x46f,0x470,0x471,0x472,0x473,0x474,0x475,0x476,0x477,0x478,0x479,0x47a,0x47b,0x47c,0x47d,0x47e,0x47f,0x480,0x481,0x482,0x483,0x484,0x485,0x486,0x487,0x488,0x489,0x48a,0x48b,0x48c,0x48d,0x48e,0x48f,0x490,0x491,0x492,0x493,\"\\u007c\",0x494,0x495,0x496,0x497,0x498,0x499,\"\\u0072\\u0064\",0x49a,0x49b,0x49c,0x49d,0x49e,0x49f,0x4a0,0x4a1,0x4a2,0x4a3,0x4a4,0x4a5,0x4a6,0x4a7,0x4a8,0x4a9,0x4aa,0x4ab,0x4ac,0x4ad,0x4ae,0x4af,0x4b0,0x4b1,0x4b2,0x4b3,0x4b4,0x4b5,0x4b6,0x4b7,0x4b8,0x4b9,0x4ba,0x4bb,0x4bc,0x4bd,0x4be,0x4bf,0x4c0,0x4c1,0x4c2,0x4c3,0x4c4,0x4c5,0x4c6,0x4c7,0x4c8,0x4c9,0x4ca,0x4cb,0x4cc,0x4cd,0x4ce,0x4cf,0x4d0,0x4d1,0x4d2,0x4d3,0x4d4,0x4d5,0x4d6,0x4d7,0x4d8,0x4d9,0x4da,0x4db,0x4dc,0x4dd,0x4de,0x4df,0x4e0,0x4e1,0x4e2,0x4e3,0x4e4,0x4e5,0x4e6,0x4e7,0x4e8,0x4e9,0x4ea,0x4eb,0x4ec,0x4ed,0x4ee,0x4ef,0x4f0,0x4f1,0x4f2,0x4f3,0x4f4,0x4f5,0x4f6,0x4f7,0x4f8,0x4f9,\"\\x75\\x6d\",0x4fa,0x4fb,0x4fc,0x4fd,0x4fe,0x4ff,0x500,0x501,\"\u79D2\",0x502,0x503,\"\u4E2A\",0x504,0x505,0x506,0x507,0x508,0x509,0x50a,0x50b,0x50c,0x50d,0x50e,\"\\x3b\\x20\",0x50f,0x510,0x511,0x512,0x513,0x514,0x515,0x516,0x517,0x518,0x519,0x51a,0x51b,0x51c,\"\\u002f\",0x51d,0x51e,0x51f,0x520,0x521,0x522,0x523,0x524,0x525,0x526,0x527,0x528,0x529,0x52a,0x52b,0x52c,0x52d,0x52e,0x52f,0x530,0x531,0x532,0x533,0x534,0x535,0x536,0x537,0x538,0x539,0x53a,0x53b,0x53c,0x53d,0x53e,0x53f,0x540,0x541,0x542,0x543,0x544,0x545,0x546,0x547,0x548,0x549,0x54a,0x54b,0x54c,0x54d,0x54e,0x54f,0x550,0x551,0x552,0x553,0x554,0x555,0x556,0x557,0x558,0x559,0x55a,0x55b,0x55c,0x55d,0x55e,0x55f,0x560,0x561,0x562,0x563,0x564,0x565,0x566,0x567,0x568,0x569,0x56a,0x56b,0x56c,0x56d,0x56e,0x56f,0x570,0x571,0x572,0x573,0x574,0x575,0x576,0x577,0x578,0x579,0x7d0,0x57a,0x57b,0x57c,0x57d,0x57e,0x57f,0x580,0x581,0x582,0x583,0x584,0x585,0x586,0x587,0x588,0x589,0x58a,0x58b,0x58c,0x58d,0x58e,0x58f,0x590,0x591,0x592,0x593,0x594,0x595,0x596,0x597,0x598,0x599,0x59a,0x59b,0x59c,0x59d,0x59e,0x59f,0x5a0,0x5a1,0x5a2,0x5a3,0x5a4,0x5a5,\"\\u0066\\u006f\",0x4e36,0x5a6,0x5a7,0x5a8,0x5a9,0x5aa,0x5ab,0x5ac,0x5ad,\"\\u0069\\u0064\",0x5ae,0x5af,0x5b0,\"\\x6c\",0x5b1,0x5b2,0x5b3,0x5b4,0x5b5,0x5b6,0x5b7,0x5b8,0x5b9,0x5ba,0x5bb,0x5bc,0x5bd,0x5be,0x5bf,0x5c0,0x5c1,0x5c2,0x5c3,0x5c4,0x5c5,0x5c6,0x5c7,0x5c8,0x5c9,0x5ca,0x5cb,0x5cc,0x5cd,0x5ce,\"\u5931\u8D25\",0x5cf,0x5d0,0x5d1,0x5d2,0x5d3,0x5d4,0x5d5,0x5d6,0x5d7,0x5d8,0x5d9,0x5da,\"\\x72\\x79\",0x5db,0x5dc,0x5dd,0x5de,0x5df,0x5e0,0x5e1,0x5e2,0x5e3,0x5e4,0x5e5,0x5e6,0x5e7,0x5e8,0x5e9,0x5ea,0x5eb,0x5ec,0x5ed,0x5ee,0x5ef,0x5f0,0x5f1,0x5f2,\"\u2550\",0x5f3,0x5f4,0x5f5,0x5f6,0x5f7,0x5f8,0x5f9,0x5fa,0x5fb,0x5fc,0x5fd,0x5fe,0x5ff,0x600,0x601,0x602,0x603,0x604,\"\\x6d\\x65\",0x605,0x606,0x607,0x608,0x609,0x60a,0x60b,0x60c,0x2710,0x60d,0x60e,0x60f,0x610,0x611,0x612,0x613,0x614,0x615,0x616,0x617,0x618,0x619,0x61a,0x61b,0x61c,0x61d,0x61e,0x61f,0x620,0x621,0x622,0x623,0x624,0x625,0x626,0x627,0x628,0x629,0x62a,0x62b,0x62c,\"\\u0049\\u0064\",0x62d,0x62e,0x62f,0x630,0x631,0x632,0x633,0x7dd,0x634,0x635,0x636,0x637,0x638,\"\\u0036\\u0038\",0x639,0x63a,0x63b,0x63c,0x63d,0x63e,0x63f,0x640,0x641,0x642,0x643,0x644,0x645,0x646,0x647,\"\\u0061\\u006d\",0x648,0x649,0x64a,0x64b,0x64c,0x64d,0x64e,0x64f,0x650,0x651,0x652,0x653,0x654,0x655,0x656,0x657,0x658,0x659,0x65a,0x65b,0x65c,0x65d,0x65e,0x65f,0x660,0x661,0x662,0x663,0x664,0x665,0x666,0x667,0x668,0x669,0x66a,0x66b,0x66c,0x66d,0x66e,0x66f,0x670,0x671,0x672,0x673,0x674,0x675,0x676,0x677,0x678,0x679,0x67a,0x67b,0x67c,0x67d,0x67e,0x67f,0x680,0x681,0x682,0x683,0x684,0x685,0x686,0x687,0x688,0x689,0x68a,0x68b,0x68c,0x68d,0x68e,0x68f,0x690,0x691,0x692,0x693,0x694,\"\\u0020\\u0020\",0x695,0x696,0x697,0x698,0x699,0x69a,0x69b,0x69c,0x69d,0x69e,0x69f,0x6a0,0x6a1,0x6a2,0x6a3,0x6a4,0x6a5,0x6a6,0x6a7,0x6a8,0x6a9,0x6aa,0x6ab,0x6ac,0x6ad,0x6ae,0x6af,0x6b0,0x6b1,0x6b2,0x6b3,0x6b4,0x6b5,0x6b6,0x6b7,0x6b8,0x6b9,0x6ba,0x6bb,0x6bc,0x6bd,0x6be,0x6bf,0x6c0,0x6c1,0x6c2,0x6c3,\"\u91D1\u5E01\",0x6c4,0x6c5,0x6c6,0x6c7,0x6c8,0x6c9,0x6ca,0x6cb,0x6cc,0x6cd,0x6ce,0x6cf,0x6d0,0x6d1,0x6d2,\"\\u0035\\u0036\",0x6d3,0x6d4,0x6d5,0x6d6,0x6d7,\"\\x63\\x73\",0x6d8,0x6d9,\"\\u006f\\u0073\",0x6da,0x6db,0x6dc,0x6dd,0x6de,0x6df,0x6e0,0x6e1,0x6e2,0x6e3,0x6e4,0x6e5,0x6e6,0x6e7,0x6e8,0x6e9,0x6ea,0x6eb,\"\\u004a\",0x6ec,0x6ed,0x6ee,0x6ef,0x6f0,0x6f1,0x6f2,0x6f3,0x6f4,0x6f5,0x6f6,0x6f7,0x6f8,0x6f9,0x6fa,0x6fb,0x6fc,0x6fd,0x6fe,0x6ff,0x700,0x701,0x702,\"\\x2e\",0x703,0x704,0x705,0x706,0x707,0x708,0x709,0x70a,0x70b,0x70c,0x70d,0x70e,0x70f,0x710,0x711,0x712,0x713,0x714,0x715,\"\\u0061\\u0067\",0x716,0x717,0x718,0x719,0x71a,0x71b,0x71c,0x71d,\"\\u0036\",\"\\x6f\\x63\",\"\\x73\\x68\",0x71e,0x71f,0x720,0x721,0x722,0x723,\"\\u0073\\u0077\",0x724,0x725,0x726,0x727,0x728,0x729,0x72a,0x72b,\"\\u0064\\u0065\",0x72c,0x72d,0x72e,\"\\x74\\x72\",0x72f,0x730,0x731,0x732,0x733,0x734,0x735,0x736,0x737,0x738,0x739,0x73a,0x73b,0x73c,0x73d,0x73e,0x73f,0x740,0x741,0x742,0x743,0x744,0x745,0x746,0x747,0x748,0x749,0x74a,0x74b,0x74c,0x74d,0x74e,0x74f,0x750,0x751,0x752,0x753,0x754,0x755,0x756,0x757,0x758,0x759,0x75a,0x75b,0x75c,0x75d,0x75e,0x75f,0x760,0x761,0x762,0x763,0x764,0x765,0x766,0x767,0x768,0x769,0x76a,0x76b,0x76c,0x76d,\"\\u0037\",0x76e,0x76f,\"\\u006f\",0x770,0x771,0x772,0x773,0x774,0x775,0x776,0x777,0x778,0x779,0x77a,0x77b,0x77c,0x77d,0x77e,0x77f,0x780,0x781,0x782,0x783,0x784,0x785,0x786,0x787,0x788,0x789,0x78a,0x78b,0x78c,0x78d,0x78e,0x78f,0x790,0x791,0x792,0x793,0x794,0x795,0x796,0x797,0x798,0x799,\"\\x2d\",0x79a,0x79b,0x79c,0x79d,0x79e,0x79f,0x7a0,0x7a1,0x7a2,0x7a3,0x7a4,0x7a5,0x7a6,0x7a7,0x7a8,0x7a9,0x7aa,0x7ab,0x7ac,0x7ad,0x814,\"\\x69\\x70\",0x7ae,0x7af,0x7b0,0x7b1,0x7b2,0x7b3,0x7b4,0x7b5,0x7b6,0x7b7,0x7b8,0x7b9,0x7ba,0x7bb,0x7bc,0x7bd,0x7be,0x7bf,0x7c0,0x7c1,0x7c2,0x7c3,0x7c4,0x7c5,0x7c6,0x7c7,0x7c8,0x7c9,0x7ca,0x7cb,0x7cc,0x7cd,0x7ce,0x7cf,\"\\x36\\x64\",0x7d1,0x7d2,0x7d3,0x7d4,0x7d5,0x7d6,0x7d7,0x7d8,0x7d9,0x7da,0x7db,0x186a0,0x7dc,0x7de,0x7df,0x7e0,0x7e1,0x7e2,\"\\x73\\x67\",0x7e3,\"\\u0061\\u0064\",0x7e4,0x7e5,0x7e6,0x7e7,\"\\u0056\\u0032\",0x7e8,0x7e9,0x7ea,0x7eb,0x7ec,0x7ed,0x7ee,0x7ef,0x7f0,0x7f1,0x7f2,0x7f3,0x7f5,0x7f6,0x7f7,0x7f9,0x7fa,0x7fb,0x7fc,0x7fd,0x801,0x802,0x803,0x804,0x805,0x80a,0x80b,0x806,0x807,0x808,0x809,0x819,0x81a,0x81e,\"\\x45\",\"\u8D25\",0x14,0x82e,\"\\u0070\\u0069\",0x835,0x836,0x816,0x817,0x812,0x83c,0x83d,0x83e,0x83f,0x840,0x841,0x842,\"\\u0065\\u007d\",0x843,0x844,0x845,\"\\x70\\x65\",0x83a,0x83b,0x818,0x81b,\"\\u0034\\u003b\",0x837,\"\\u005d\\u0020\",\"\u6210\u529F\",0x869,0.5,0x872,0x882,\"\u5F00\u542F\",\"\u5173\u95ED\",0x889,\"\\u003a\\u0020\",\"\\x2c\",0x89b,0x89c,\"\u77ED\u5267\",\"\u597D\u8D27\",0x8a3,0x8a7,0x847,0x8b0,0x898,0x8be];jk9aAk8(RH8KLq(LrptE9,IUH9gW[0x4]),RH8KLq(aDf6Q9),RH8KLq(bPpkx2));function RH8KLq(izD_V32,ezk0Yu=IUH9gW[0x3]){Object.defineProperty(izD_V32,IUH9gW[0x0],{value:ezk0Yu,configurable:IUH9gW[0x191]});return izD_V32}jk9aAk8(R2YkZth=function(...izD_V32){izD_V32[IUH9gW[0x0]]=IUH9gW[0x1];var ezk0Yu=String.fromCharCode,RWe5Wz=\"\\x41\\x42\\x43\\x44\\x45\\x46\\x47\\x48\\x49\\x4a\\x4b\\x4c\\x4d\\x4e\\x4f\\x50\\x51\\x52\\x53\\x54\\x55\\x56\\x57\\x58\\x59\\x5a\\x61\\x62\\x63\\x64\\x65\\x66\\x67\\x68\\x69\\x6a\\x6b\\x6c\\x6d\\x6e\\x6f\\x70\\x71\\x72\\x73\\x74\\x75\\x76\\x77\\x78\\x79\\x7a\\x30\\x31\\x32\\x33\\x34\\x35\\x36\\x37\\x38\\x39\\x2b\\x2f\\x3d\",qIOqfr8=\"\\u0041\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048\\u0049\\u004a\\u004b\\u004c\\u004d\\u004e\\u004f\\u0050\\u0051\\u0052\\u0053\\u0054\\u0055\\u0056\\u0057\\u0058\\u0059\\u005a\\u0061\\u0062\\u0063\\u0064\\u0065\\u0066\\u0067\\u0068\\u0069\\u006a\\u006b\\u006c\\u006d\\u006e\\u006f\\u0070\\u0071\\u0072\\u0073\\u0074\\u0075\\u0076\\u0077\\u0078\\u0079\\u007a\\u0030\\u0031\\u0032\\u0033\\u0034\\u0035\\u0036\\u0037\\u0038\\u0039\\u002b\\u002d\\u0024\",szoaZL={};function onPFgpD(izD_V32,onPFgpD){if(!szoaZL[izD_V32]){var J7aaZbe;szoaZL[izD_V32]={};for(J7aaZbe=IUH9gW[0x1];J7aaZbe>>IUH9gW[0xa],rWJvcF[IUH9gW[0x7]*mOfCEy+IUH9gW[0x3]]=ezk0Yu[IUH9gW[0x2]]%IUH9gW[0x8])}return rWJvcF}),decompressFromUint8Array:function(J7aaZbe){var rWJvcF;if(IUH9gW[0x5]==J7aaZbe)return izD_V32[IUH9gW[0x2]].decompress(J7aaZbe);for(var mOfCEy=new Array(J7aaZbe.length/IUH9gW[0x7]),EzW9ZM=IUH9gW[0x1],Khi9t8=mOfCEy.length;EzW9ZM>=IUH9gW[0x3]}else{for(RWe5Wz=IUH9gW[0x3],ezk0Yu=IUH9gW[0x1];ezk0Yu>=IUH9gW[0x3]}jk9aAk8(IUH9gW[0x1]==--aC0THb&&(aC0THb=Math.pow(IUH9gW[0x7],RH8KLq),RH8KLq++),delete rWJvcF[Khi9t8])}else for(RWe5Wz=J7aaZbe[Khi9t8],ezk0Yu=IUH9gW[0x1];ezk0Yu>=IUH9gW[0x3];jk9aAk8(IUH9gW[0x1]==--aC0THb&&(aC0THb=Math.pow(IUH9gW[0x7],RH8KLq),RH8KLq++),J7aaZbe[EzW9ZM]=ix6yOs++,Khi9t8=String(mOfCEy))}if(\"\"!==Khi9t8){if(Object.prototype.hasOwnProperty.call(rWJvcF,Khi9t8)){if(Khi9t8.charCodeAt(IUH9gW[0x1])>=IUH9gW[0x3]}else{for(RWe5Wz=IUH9gW[0x3],ezk0Yu=IUH9gW[0x1];ezk0Yu>=IUH9gW[0x3]}jk9aAk8(IUH9gW[0x1]==--aC0THb&&(aC0THb=Math.pow(IUH9gW[0x7],RH8KLq),RH8KLq++),delete rWJvcF[Khi9t8])}else for(RWe5Wz=J7aaZbe[Khi9t8],ezk0Yu=IUH9gW[0x1];ezk0Yu>=IUH9gW[0x3];IUH9gW[0x1]==--aC0THb&&(aC0THb=Math.pow(IUH9gW[0x7],RH8KLq),RH8KLq++)}for(RWe5Wz=IUH9gW[0x7],ezk0Yu=IUH9gW[0x1];ezk0Yu>=IUH9gW[0x3];for(;;){if(u7abyW<<=IUH9gW[0x3],jZhnmm==izD_V32[IUH9gW[0x3]]-IUH9gW[0x3]){cIULrn.push(izD_V32[IUH9gW[0x7]](u7abyW));break}jZhnmm++}return cIULrn.join(\"\")},IUH9gW[0x4]),decompress:RH8KLq(function(...ezk0Yu){ezk0Yu[IUH9gW[0x0]]=IUH9gW[0x3];return IUH9gW[0x5]==ezk0Yu[IUH9gW[0x1]]?\"\":\"\"==ezk0Yu[IUH9gW[0x1]]?IUH9gW[0x5]:izD_V32[IUH9gW[0x2]]._decompress(ezk0Yu[IUH9gW[0x1]].length,0x8000,RH8KLq(function(...izD_V32){izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];return ezk0Yu[IUH9gW[0x1]].charCodeAt(izD_V32[IUH9gW[0x1]])}))}),_decompress:RH8KLq(function(...izD_V32){izD_V32[IUH9gW[0x0]]=IUH9gW[0x4];var RWe5Wz,qIOqfr8,szoaZL,J7aaZbe,rWJvcF,mOfCEy,EzW9ZM,Khi9t8=[],aC0THb=IUH9gW[0xc],ix6yOs=IUH9gW[0xc],RH8KLq=IUH9gW[0x4],cIULrn=\"\",u7abyW=[],jZhnmm={val:izD_V32[IUH9gW[0x7]](IUH9gW[0x1]),position:izD_V32[IUH9gW[0x3]],index:IUH9gW[0x3]};for(RWe5Wz=IUH9gW[0x1];RWe5Wz>=IUH9gW[0x3],IUH9gW[0x1]==jZhnmm.position&&(jZhnmm.position=izD_V32[IUH9gW[0x3]],jZhnmm.val=izD_V32[IUH9gW[0x7]](jZhnmm.index++)),szoaZL|=(J7aaZbe>IUH9gW[0x1]?IUH9gW[0x3]:IUH9gW[0x1])*mOfCEy,mOfCEy<<=IUH9gW[0x3];switch(szoaZL){case IUH9gW[0x1]:for(szoaZL=IUH9gW[0x1],rWJvcF=Math.pow(IUH9gW[0x7],IUH9gW[0xa]),mOfCEy=IUH9gW[0x3];mOfCEy!=rWJvcF;)J7aaZbe=jZhnmm.val&jZhnmm.position,jZhnmm.position>>=IUH9gW[0x3],IUH9gW[0x1]==jZhnmm.position&&(jZhnmm.position=izD_V32[IUH9gW[0x3]],jZhnmm.val=izD_V32[IUH9gW[0x7]](jZhnmm.index++)),szoaZL|=(J7aaZbe>IUH9gW[0x1]?IUH9gW[0x3]:IUH9gW[0x1])*mOfCEy,mOfCEy<<=IUH9gW[0x3];EzW9ZM=ezk0Yu(szoaZL);break;case IUH9gW[0x3]:for(szoaZL=IUH9gW[0x1],rWJvcF=Math.pow(IUH9gW[0x7],IUH9gW[0xb]),mOfCEy=IUH9gW[0x3];mOfCEy!=rWJvcF;)J7aaZbe=jZhnmm.val&jZhnmm.position,jZhnmm.position>>=IUH9gW[0x3],IUH9gW[0x1]==jZhnmm.position&&(jZhnmm.position=izD_V32[IUH9gW[0x3]],jZhnmm.val=izD_V32[IUH9gW[0x7]](jZhnmm.index++)),szoaZL|=(J7aaZbe>IUH9gW[0x1]?IUH9gW[0x3]:IUH9gW[0x1])*mOfCEy,mOfCEy<<=IUH9gW[0x3];EzW9ZM=ezk0Yu(szoaZL);break;case IUH9gW[0x7]:return \"\"}for(Khi9t8[IUH9gW[0x4]]=EzW9ZM,qIOqfr8=EzW9ZM,u7abyW.push(EzW9ZM);;){if(jZhnmm.index>izD_V32[IUH9gW[0x1]])return \"\";for(szoaZL=IUH9gW[0x1],rWJvcF=Math.pow(IUH9gW[0x7],RH8KLq),mOfCEy=IUH9gW[0x3];mOfCEy!=rWJvcF;)J7aaZbe=jZhnmm.val&jZhnmm.position,jZhnmm.position>>=IUH9gW[0x3],IUH9gW[0x1]==jZhnmm.position&&(jZhnmm.position=izD_V32[IUH9gW[0x3]],jZhnmm.val=izD_V32[IUH9gW[0x7]](jZhnmm.index++)),szoaZL|=(J7aaZbe>IUH9gW[0x1]?IUH9gW[0x3]:IUH9gW[0x1])*mOfCEy,mOfCEy<<=IUH9gW[0x3];switch(EzW9ZM=szoaZL){case IUH9gW[0x1]:for(szoaZL=IUH9gW[0x1],rWJvcF=Math.pow(IUH9gW[0x7],IUH9gW[0xa]),mOfCEy=IUH9gW[0x3];mOfCEy!=rWJvcF;)J7aaZbe=jZhnmm.val&jZhnmm.position,jZhnmm.position>>=IUH9gW[0x3],IUH9gW[0x1]==jZhnmm.position&&(jZhnmm.position=izD_V32[IUH9gW[0x3]],jZhnmm.val=izD_V32[IUH9gW[0x7]](jZhnmm.index++)),szoaZL|=(J7aaZbe>IUH9gW[0x1]?IUH9gW[0x3]:IUH9gW[0x1])*mOfCEy,mOfCEy<<=IUH9gW[0x3];jk9aAk8(Khi9t8[ix6yOs++]=ezk0Yu(szoaZL),EzW9ZM=ix6yOs-IUH9gW[0x3],aC0THb--);break;case IUH9gW[0x3]:for(szoaZL=IUH9gW[0x1],rWJvcF=Math.pow(IUH9gW[0x7],IUH9gW[0xb]),mOfCEy=IUH9gW[0x3];mOfCEy!=rWJvcF;)J7aaZbe=jZhnmm.val&jZhnmm.position,jZhnmm.position>>=IUH9gW[0x3],IUH9gW[0x1]==jZhnmm.position&&(jZhnmm.position=izD_V32[IUH9gW[0x3]],jZhnmm.val=izD_V32[IUH9gW[0x7]](jZhnmm.index++)),szoaZL|=(J7aaZbe>IUH9gW[0x1]?IUH9gW[0x3]:IUH9gW[0x1])*mOfCEy,mOfCEy<<=IUH9gW[0x3];jk9aAk8(Khi9t8[ix6yOs++]=ezk0Yu(szoaZL),EzW9ZM=ix6yOs-IUH9gW[0x3],aC0THb--);break;case IUH9gW[0x7]:return u7abyW.join(\"\")}if(IUH9gW[0x1]==aC0THb&&(aC0THb=Math.pow(IUH9gW[0x7],RH8KLq),RH8KLq++),Khi9t8[EzW9ZM])cIULrn=Khi9t8[EzW9ZM];else{if(EzW9ZM!==ix6yOs)return IUH9gW[0x5];cIULrn=qIOqfr8+qIOqfr8.charAt(IUH9gW[0x1])}jk9aAk8(u7abyW.push(cIULrn),Khi9t8[ix6yOs++]=qIOqfr8+cIULrn.charAt(IUH9gW[0x1]),qIOqfr8=cIULrn,IUH9gW[0x1]==--aC0THb&&(aC0THb=Math.pow(IUH9gW[0x7],RH8KLq),RH8KLq++))}},IUH9gW[0x4])};return izD_V32[IUH9gW[0x2]]}(),\"\\x66\\x75\\x6e\\x63\\x74\\x69\\x6f\\x6e\"==berSED[\"csVzwK\"]&&berSED[\"uFhJlC\"].amd?berSED[\"uFhJlC\"](function(){return R2YkZth}):IUH9gW[0xd]!=berSED[\"XtK2qOW\"]&&IUH9gW[0x5]!=berSED[\"vK1nFuf\"]?berSED[\"vK1nFuf\"].exports=R2YkZth:IUH9gW[0xd]!=berSED[\"k5qRMq\"]&&IUH9gW[0x5]!=berSED[\"qxMoumD\"]&&berSED[\"qxMoumD\"].module(IUH9gW[0xe],[]).factory(IUH9gW[0xe],function(){return R2YkZth}),izD_V32=void 0x0,function(...ezk0Yu){var RWe5Wz,qIOqfr8;function*szoaZL(qIOqfr8,szoaZL,onPFgpD={Cw9HsmY:{}}){while(qIOqfr8+szoaZL!==-0x1e)with(onPFgpD.ven1Ek||onPFgpD)switch(qIOqfr8+szoaZL){case qIOqfr8-0x20:ezk0Yu[IUH9gW[0x11]]=ezk0Yu[IUH9gW[0x10]].split(IUH9gW[qIOqfr8+0x4af]);return RWe5Wz=!0x0,izD_V32=RH8KLq(function(...qIOqfr8){qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];return ezk0Yu[IUH9gW[0x11]][qIOqfr8[IUH9gW[0x1]]]});case qIOqfr8!=0x4a&&qIOqfr8-0xc9:ezk0Yu[IUH9gW[0x11]]=ezk0Yu[IUH9gW[0x10]].split(IUH9gW[0x4d1]);return RWe5Wz=!0x0,izD_V32=RH8KLq(function(...qIOqfr8){qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];return ezk0Yu[IUH9gW[0x11]][qIOqfr8[IUH9gW[0x1]]]});case-0x7b:case 0xa4:jk9aAk8([onPFgpD.Cw9HsmY.ixxSnex,onPFgpD.Cw9HsmY.CySzZ4]=[0x34,0x77],ezk0Yu[IUH9gW[qIOqfr8+0x14c]]=IUH9gW[qIOqfr8+0x14d],ezk0Yu[IUH9gW[qIOqfr8+0x15b]]=\"\u15E1\u6C29\u416C\u0680\u4B30\u5823\u705C\u402A\u0368\u0960\u3AA0\u5220\u782D\u5023\u403F\u4082\u011C\u0165\u6420\u36C0\u37A4\u1021\u0824\u602D\u6041\x8E\\x5c\u5421\u0220\u6A21\u4670\xB4\\x78\u01CC\u018C\u2021\u6820\u69E8\u03BB\u4827\u3AD7\u2021\u57E0\u0580\u0AED\u1026\u6634\u52DC\u6199\u220C\u01B4\u3023\u1CD6\u1283\u0828\u5320\u0EE0\u09C0\u0486\u5268\xA4\u60C8\u5630\u402B\u4220\u0940\u0617\u2021\u75A1\u1C20\u5545\\x20\u565F\u496C\u77E1\u0768\xC8\u2120\u7D20\u1CA0\u187F\u4C2C\u2657\u70CA\u63A0\\x4a\u0778\u4023\u4EA0\u0D6A\u2230\u03F8\xAD\u0820\u595F\u1799\u33F0\u4C58\u6511\u08CA\u511A\\x32\u1963\u3C60\u13E5\u202A\u2664\u70C8\\x69\u7C40\u6365\u404F\u112D\u1025\u54EA\u747D\u41EB\u5289\\x4e\u21A8\u1546\u27F0\u0293\u2F01\u3A20\u1705\u47A0\u2EC3\u1820\u2F92\u0FC1\u3A15\u652F\u47E2\u0144\u7E30\u4024\u2022\u0E18\u47DD\u47C5\u3020\u7196\u4961\u02D1\u586F\\x20\u62AA\u710A\u1EB1\u0247\u550C\u325A\u549B\u646A\u0FB1\u03FB\u30B9\u325D\u4800\xBC\u3A39\u66B3\u7D68\u253A\u6454\u51BA\\x3b\u0C2E\u231D\u468A\\x2f\u2773\u70BB\u33A4\u0691\u68C5\u3638\u330B\u710C\u3B70\u4702\u62BE\u16B8\u3600\u4240\u6222\u0124\u42D8\u0AB1\u3021\u78D4\u4E67\u6EE5\u614A\u433F\u47F3\u24A9\u0831\u17F4\u4A85\u33BD\u022D\u0BFA\u1B88\u5D06\u1A10\u563F\u4DE1\u012C\u3A3F\u25A9\u02E0\u4352\u06D3\u6C3C\u6A55\\x25\u6AAA\x86\u1EA0\u3173\u4A89\u27A9\u23FB\u10B5\u19A9\u2687\u70E0\u2E23\u77E3\u0CE4\u0436\u27AB\u4AAB\u26E4\u0AAB\u2459\u565A\u2781\u7A5E\u3B72\u2367\u011C\u09EF\u0D40\u3E40\u49FE\u1537\u510D\u1E6B\u0C63\u4911\\x31\u6A67\u3170\u4A5B\u27C6\u3553\u1D12\u1524\u604E\u3D2A\u46EF\u2158\u4F28\u1524\u1165\u3359\u2644\u53BA\u5238\u0C82\u0970\u3955\u0D02\u09A0\u114F\u09D6\u0C20\u067E\u0B00\u4A33\u3368\u5122\u0106\u312F\u5280\u4CF2\u22C0\u4E2C\u6188\u7C2C\u0164\u1839\u51C4\u2132\u5274\\x22\u4B43\u084E\u4BE2\u1045\u0C82\u1128\u0CF3\u1892\u0B31\u3A79\u04C1\u206B\u0532\u383C\u6DF0\u4284\u2C60\u6582\u08A3\u5D6D\u4472\u1E72\u0192\u3644\u48A3\u1127\u0C12\u4820\u0643\u01FA\u2F2B\u41BA\u302A\u2026\u21A3\xD1\u16AC\u30A9\u176D\u2202\u262E\u69AC\u18BA\u2168\u336C\u219B\u03AE\u0198\u1FA6\u435C\u03AA\u28C0\u31A7\u5202\u1642\u50F2\u1BAE\u6182\u26E4\u2293\u10E2\u1168\u662E\u7D1C\u03A6\u5864\u23E9\u71FA\u0F2E\u2885\u1EA4\u5148\u1AEF\u1080\u0CCA\u60B9\u2FE8\u03D8\u12AC\u6A10\u2249\u584E\u3021\u78E0\u1269\u4CC0\u26E5\u0A18\u396B\u4184\u232B\u08EC\u19A3\u14B7\u302F\u09E8\u182A\u6210\u296A\u2916\u23ED\u1148\\x26\u2655\u5228\u437C\u275B\u2121\u2BDC\u45B9\u322D\u5600\u58AD\u50A1\u1953\u44B0\u6649\u0639\u7C47\u43C1\u044C\u4210\u1299\u0749\u19C6\u0131\u2C54\u4619\u6A30\u6118\u5D38\u4210\u455A\u6465\u254C\u5121\u1241\x81\u0827\u61ED\u434B\u0131\u0C5C\u21A1\u0F28\u20B2\u4246\u6121\u443F\u2131\u7237\u20A0\u1731\u181D\u2C53\u2464\u504E\u02E5\u124C\u4128\u6244\u4269\u2828\u04E1\u447A\u67E0\u6949\u07B1\u382D\u5640\u034C\u453B\u5C46\u3039\u5242\u01A1\u5842\u60A1\u51CB\u0640\u2A5A\u43C1\u6A41\u0320\u1D6E\u3270\u274E\u0181\u2825\u66B1\u1E53\u4639\u14C0\u0CB1\u3842\u6691\u144C\u45E2\u212A\u4534\u6E27\u2C22\u3E2C\u0131\u19BE\u7440\u30C5\u2130\u6B4F\u0422\u5A5F\x91\u3845\u5510\u5136\u45B1\u22B4\u0378\u502C\u55A9\u0838\u0619\u12F2\u2129\u2451\u0464\u32D1\u41D5\u3828\u03F9\u652E\u6DA8\u7E39\u4465\u5451\xB2\u1F5D\u1441\u0B23\u23F1\u724A\u0158\u223F\u2689\u4480\u0CE0\u5459\u2501\u1B5B\u220B\u6528\u0458\u3447\u0664\u4783\u63F9\u2434\u26E1\u6A48\u4121\u6A4B\u06C0\u44BA\u23F1\u382C\u0501\u5855\u068D\u1B42\u0801\u6A31\u6CED\u4624\u6F61\u4D39\u4404\u7D50\u6409\u5437\u22E5\u185B\u0148\u6928\u0440\u6939\u4245\u1B41\u2E54\u0146\u0771\u4336\u1640\u675C\u4369\u2BD9\u24F9\u6A34\x90\u0974\u2460\u5123\u4209\u3C2E\u3457\u0828\u4091\u4FC6\u2788\u32D3\u4268\u32BA\u6621\u19C1\u4700\u1720\u2119\u6A53\u4171\u2535\u51DD\u7C38\u020C\u3924\u6679\u04E0\u2523\u345E\u0101\u08B0\u0509\u59C0\u5BA9\u60DC\u1307\u0765\u4210\u4046\u5CBB\u0BEC\u7426\u4198\u0673\u194C\u2221\u3240\u4096\u4238\u7E2C\u68C8\u0E70\u5A31\u09A8\u0F3A\u3C49\u0338\u0772\u406C\u42A8\u4461\u783D\u2290\u7B26\u69F0\u0753\u105A\u42B4\u1FA6\u485E\u40A0\u404E\u40C2\u6D00\u212A\u01C4\u1203\u2542\u0320\u1D20\u0C84\u06C0\u1B6D\u50C2\u4DE0\u1EB5\u01F8\u0C60\u2028\u4B80\u2B00\u208E\u0498\u4227\u1023\u0B30\u6B37\u70A9\u0B32\u3240\u0A21\u21A2\u2866\u0378\u5928\u02D2\u0530\u4236\u1060\xC8\u3AB0\u6058\u0841\u133B\u7368\u5928\u20D1\u0861\u383D\u011A\u1FA1\u2225\u609C\u3B04\u0121\u2788\u614B\u40FC\u0320\u4936\u6308\u1351\u7DBD\u0354\u3E61\u1C5A\u14E0\u1826\u303F\u0A48\u222D\u606E\u0443\u4638\u4250\u2A22\u2845\u01B4\u5424\u24C5\u0389\u313C\u5088\u4A22\u282F\u4242\u03A4\u6C99\u0700\u1B64\u24C2\u02C1\u4633\u41F4\u18E0\u7C53\u4358\u2FE1\u4A80\u54EC\u72A2\u08BC\u05A9\u6535\u3861\u0F82\u7025\u131C\u08A4\u2298\u44C8\u4CE8\u3665\u0101\u30A6\u2953\u09D3\u1027\u6380\u2524\u7899\u0640\u1822\u387D\u0B0D\u582B\u0893\u1351\u0A3A\u2177\u2F24\u308D\u268C\u442A\u14F8\u06B0\u0FF3\u4153\u1CEA\xC1\u0414\u23B4\u0195\u0308\u234B\u10B4\u0389\u7C24\u2064\u1123\u6226\u1B58\u20C4\u4884\u27E0\u2562\u387A\u09B9\u6C27\u1860\u0D40\u7282\u60A4\u1EA4\u6C21\u4580\u34A5\u4482\u0A83\u3F2E\u0B3F\u1802\u582A\u4060\u33EB\u7862\u0600\u2BB2\u08ED\u0C10\u2AAB\u21B9\u5CC1\u3A50\u6286\u10A0\u7C31\u0320\u1B60\u7104\u0928\u4A2F\u605E\u0962\u305C\u2358\u3123\u088A\u0688\u4324\u1111\u0291\u5222\\x74\u18A9\u443F\u40BC\u1265\u146E\u0816\u56CB\u10FB\u6861\u48A7\u19F0\u1641\u522A\u42D0\u12AE\u1854\u4580\u562C\u449D\u0620\u6622\xB4\u05B6\u484E\u04A2\u08A1\u1C5F\u0765\u7FE7\u2036\u6A48\u4931\u30EC\u2009\u1449\u2208\u0E85\u1486\u42A0\u3D2A\u40AB\u06B5\u063D\\x61\u5029\u0337\u2390\u2564\u6C27\u22A8\u2B2E\u5036\u6FA1\u393E\u11FA\u1BA1\u3F39\u62F5\u3723\\x39\u27E0\u792A\u5AA0\u2961\u3833\u61F8\u0269\u7454\u69B2\u6662\u146A\u4788\u5C40\u710B\u4423\u2C31\\x26\u38A3\u5A5C\u20DE\u0C26\u2079\u0500\u2823\u7069\u0BA5\u3F29\u202C\u0BC1\u0A31\u13E4\u1D53\u1879\u01EC\u34AE\u5082\u0A6A\u6039\u5089\u59E1\u062B\u1B9A\u4862\u2254\u4504\u58A3\\x4a\u0700\u39AF\u6120\u4622\u245C\u4250\u3176\u3439\u24C8\u01A2\u1056\u4C11\u483C\u50C0\u0502\xCA\u0188\u2325\u6080\u02A0\u2C6B\u084F\u0D6A\u6E21\u556A\u0221\u5641\u03B4\u03A0\u5C78\u45E2\u5C49\u5904\u0D60\u5135\u7195\u5931\u252C\u53B0\u08A3\u6C48\u0130\u722A\u3CA6\u05F0\u5034\u419A\u59C2\u1E3E\u54C0\u1594\u6042\u4230\u082E\u202E\u0824\u4231\u41C4\u186B\u1137\u22C0\u1823\u0853\u7304\u196F\u0864\u4760\u6224\u019E\u0503\u7826\u5157\u09E4\u789B\u2DB0\u7E2E\u029E\u0CF1\u48BB\u4022\u1DA2\u3D46\u23B4\u2662\u287B\u42A0\u5923\xC8\u0C20\u623B\u3DBA\u1122\u625C\u4060\u34A4\u6B16\u1270\u5226\u5864\u4A49\u462F\u3108\u0C22\u59C5\u01B8\u2321\u025D\u1553\u1967\u20B3\u2086\u5BD8\u413E\u1CA1\u28E8\u4262\u1421\u0281\u473C\u68A6\u70B8\u0C10\u1277\u0120\u51A2\u6451\u09C4\u3E24\u5324\u7800\u3729\u7118\u0641\u3831\u08AA\u1723\u113C\u1948\u3925\u1433\u45E2\u4CE7\u20D1\u0955\u143E\u05B1\u0762\u105C\u4CA2\u34A2\u40D3\u04F8\u3CB1\u78E6\u09B0\u2137\u719E\u0A21\u0928\u2358\u1644\u7033\u44EC\u1F2B\u08E5\u69E8\u622F\u08C2\u1930\u5445\u0274\u2526\u6092\xB2\u11B9\u70D1\u0A56\u1026\u6493\u1320\u3ADA\u4250\u1BA1\u029C\u6308\u7E2F\u10CC\u0700\u6B21\u604C\u79E2\u47D1\u4356\u2625\u0A71\u2500\u1B64\u5CB4\u0DE0\u0E25\u2074\u6881\u2024\u5730\u1EA7\u703F\u06B0\u752E\u50DC\u0BE1\u122A\xF2\u1A60\u6D38\u43C8\u0AA1\u786A\u01EC\u0723\u3E0D\u0441\u6430\u4064\u10E3\u1931\u1282\u5464\u0A60\u1460\u2EA4\u1E82\u097C\u4531\xB2\u14A0\u4247\u42C0\u2227\u2842\u2640\u6C6A\u0CC6\u4BE1\u6649\u5D70\u1B21\u043D\u2E86\u3F25\u1A55\u4120\u792C\u5BE4\u0C21\u0824\u0908\u1DC3\u1A30\u629A\u6C65\u6084\u0480\u3D2C\u22AB\u0970\u3FB7\u70F6\u0A43\u5A39\u52AA\u26E4\u3E25\u56E0\u1F24\u5059\u45CD\u0824\u10F7\u0942\u243A\u6342\u3224\u2067\u1158\u798F\u60AB\u0701\u4D28\u5570\u0CD2\u6230\u4272\u04B7\u4474\\x28\u3F2C\u40AB\u0B6F\u6431\u402C\u6B81\u5E0C\u2286\u1760\u4979\u0618\u28A7\u588B\u0B2A\u1AA4\u21F4\u18A2\u243B\u5E84\u2625\u1048\u04C8\u1526\u108E\u7C7B\u4EDB\u697D\u7BAA\u302C\u50A4\u2744\u6053\u0417\u04B1\u35E6\u0EE0\u272F\u6F65\u1A69\u1A52\u1144\u2B25\u47AE\u54E0\u0727\u68F2\u09E0\u77A4\u1068\u5DC2\u1B9E\u0182\u2963\u7BE6\u6B30\u66AD\u410C\u0BA5\u0833\u49F4\u1DC2\u50AA\u4242\u1BDD\u487C\u1CB1\u6027\u589E\u7CF1\u43B3\u119E\u0433\u623F\u5CA2\u24A1\u786C\u4408\u3DA7\u30A8\u0971\u6432\u5A22\u1641\u1642\u031D\u62E0\u4927\u0500\u5E26\u7730\u09A1\u1822\u01EA\u1D21\u2809\xA0\u07E2\u248A\u02B4\u195D\u30C5\u3474\xFA\u1920\u0603\\x5f\u0320\u13E0\u2029\u482E\u521B\u4F81\u462C\u704B\u73C0\u0123\u082E\u684F\u52B4\u13E0\u622C\u4457\u3AC0\u1880\u6028\u6435\u18A4\u0EA1\u0829\u0C9F\u7B68\u1881\u0422\u0879\u0240\u06A0\u66CA\u5A6D\u4410\u1720\u5702\u6C96\u03C0\u1820\u2127\u777D\u589D\u5729\u5C2E\u605F\u3869\u0BC1\u6429\u4044\u42AA\u0F9D\u0824\u1021\u42CE\u148C\u2807\u7794\u029F\u0268\u5E02\u7F64\u02B4\u0894\u222B\u0842\u214B\u5DE1\u3225\u4428\u0270\u1120\u1D62\u6144\u419D\u4620\u7F04\u2883\\x69\u1520\u4924\u1A57\u382D\u0E35\u152E\u403E\u4A40\u0F61\u182A\u554D\u0218\u13B0\u6F0C\u404E\u4380\u0961\u5EAB\u3F7C\u0388\u1F21\\x62\u1082\u0284\x8D\u252C\u7036\u7A40\u17A1\u5005\u716E\u0108\u2C61\u182C\u3F8A\xA2\u15A0\u7F0D\u1039\u2227\u50D5\u2A31\\x6e\u2368\u1F21\u22A2\u0487\u0194\u17DD\u5429\u4072\u4144\u1D21\u7125\u685F\u3988\u1AC5\u062D\u406D\u5A1B\u5931\u1825\u445F\u032C\u0431\u5A08\u4030\xC8\u5DC5\u4E29\u483C\u7A68\u0781\u7182\\x3e\u06C0\u01D9\u33AA\u50E2\u0218\u10E1\u182F\u103B\u2358\u06A3\u082F\u1078\u4A56\u5BA1\u6827\u772D\u689F\u4400\u7D2A\u6392\u0754\u0BC1\u1925\u446E\u223C\u34A1\u08A8\u306F\u0210\u5CC1\u4D27\u211C\u0371\u1838\u2A28\u305F\u3A30\u19C0\u2227\u7028\u0127\u0FFC\u212F\u1489\u02C3\u1880\u6F06\u108E\u2960\u10E1\u62A6\u7790\u2518\u0461\u0B29\u648A\u021B\u4D80\u6B2C\u3F64\u110F\u5E61\u1221\u40AA\u4869\u14D0\u5027\u776C\u40DD\u4403\u0AE7\u7739\u2292\u1201\u0F35\\x5d\u43F3\u1121\u042E\u5080\u03B0\u06F1\u48AC\u1881\u42E7\u5801\u1C25\u0821\u29C6\u0DFD\u2BAF\u082C\u72CE\u0401\u360F\u3A59\u6290\u1201\u3C47\u2F91\u39E6\u57A1\u70BC\u5C80\u4214\u1800\u2A2B\u7857\u3906\u1800\u5A2A\u407C\u031C\u1820\u1D6B\u0F89\u0582\u18C2\u7A2B\u3F69\u0331\u4D81\u0C21\u6A4C\u1240\u1DA0\u620E\u5A95\u0188\u14A3\u0820\u0251\u06CE\u1340\u14EE\u3820\u43C0\u0441\u0C2A\u5C77\u476F\u5AA1\u1041\u1298\u59DB\u55A1\u1829\u6055\u4362\u1822\u32AB\u1072\u27B0\u1120\u1725\u5C72\u41CD\u5823\u0DC9\u683B\u23CF\u5F10\u4AA9\u405F\u3B80\u0BC1\u1CAB\u4092\u4069\u17C2\u6621\u1272\u42E4\u0B30\u4928\u449E\u01F0\u3DC1\u2826\u489E\xA4\u0FE1\u663C\u6E48\u42B2\u3AD3\u3D3E\u4C54\u52B9\u5260\u39B7\u683C\u60A2\u0C08\u56E6\u575E\u43B2\u2D41\u442A\u5995\u0352\u1BD5\u6EA2\u055F\u3A14\u1721\u1EAD\u6067\u79DB\u46F0\u37A1\\x2a\u189A\u2542\u6932\u0449\u7B58\u0621\u522C\u6830\u0347\u0DFD\u0C24\u2738\u0330\u1801\u2A6B\u6F79\\x69\u1BFD\u7C29\u6040\u274E\u1880\u1F8A\u6128\u01DB\u4268\u202F\u4051\u2A92\u16D3\u6A21\u125F\u0219\u4530\u6F08\u5988\u73B4\u13F4\u44AB\u0F39\u2069\u0269\u6C26\u08BC\u24C0\u0420\u7D29\u606C\u0330\u11F3\u6421\u3D88\u41A8\u119D\u082A\u5C52\\x58\u08D2\u6FAC\u6448\u02AA\u0365\u6825\u445F\u38BC\u1601\u1E27\u6864\u421B\u4460\u2022\u0831\\x2c\u09B4\u7F05\x96\u42E4\u4501\u1CA2\u70A9\u1292\u12C0\u6B29\u2080\u02C8\u288D\u5649\u206C\u4106\u0DFD\u5824\u5428\u0338\u2763\u50C4\u1089\u0301\u11A1\u0CC7\u0903\u0218\u1930\u2B3E\u2882\u1286\u15A1\u6D27\u7064\u2380\u1F38\u55AB\u164F\u7024\u0621\u312C\u227C\u105A\u4221\u382E\u2A82\u13E8\u01C1\u6521\u6A2D\u5331\u1DC0\u692A\u4038\u03B0\u0D81\u394A\u70EC\u6058\x81\u5422\u1039\u21B8\u0FC3\u22A1\u1280\u0188\u1DC0\u2DA8\u4055\u43D4\u13E1\u48A4\u2830\u228C\u0268\u6B31\x82\u0157\u4431\u08AA\u3350\u0270\u0F81\u1422\u0467\u4301\u14ED\u2920\u4AF0\u6144\u14ED\u7C21\u122E\u5964\u1BAD\u2684\u7B5F\u024C\u0ECD\u0735\u0133\u40C8\u1820\u172F\u608D\u3B10\u0381\u6A21\u384C\u2221\u0400\u1837\u5029\u12CE\u1FA1\u1928\u044E\u5710\u13B1\u482C\u686A\u5B1C\u1B21\u6828\u4081\u31CC\u1591\u1CA9\u6051\u0368\u0BCB\u5C2E\u2099\xC8\u0301\u1C20\u1854\u416D\u2EA0\u3E2E\u5084\u0234\u1E41\u3508\u0242\u42C0\u11A0\u212D\u6067\u61B8\u1D61\u5222\u086D\u4330\u17A1\u26AF\u6042\u2278\u5F20\u3E23\u4657\u39C4\u1640\u4062\u5030\u03EE\u0665\u5CC6\\x5d\u0194\u11A1\u6B0C\u6895\u0410\u0CF8\u1D6A\u06D5\u47C8\u1520\u3E2D\u202E\u5358\u0CBD\u0F2C\u3360\u124C\u0401\u2426\u276C\u6059\u5D7C\u126E\u4095\u02E7\u5A75\u2C2D\u1253\u18A4\u0861\u3208\u1F42\u4330\u12A1\u1CA8\u5843\u5638\u1205\u152F\u407C\u1095\u090B\u19A2\u088E\u460C\u0F81\u5C28\u4464\u0218\x80\u4929\u2864\xBC\u1591\u582C\u2074\u031C\u13E0\u477F\u108B\u55CC\u0EA0\u4904\u3AC2\u23AC\u4430\u58A2\u3848\u013D\u3CA1\u4828\u7848\u0684\u1609\u0828\u1F6A\u4280\u1120\u1544\u2878\u4400\u13B1\u432B\u405D\u41DB\u4EA0\u4A26\u7E82\u01F4\u22B1\u69CA\u4083\u0268\u10E0\u3E21\u2490\u1790\u1341\u4CA4\u5041\u02B4\u1381\u252F\u602A\u20A8\u14A1\u2A6C\u4749\u55B0\u5FA0\u6305\u552A\u2221\x81\u22A6\u5664\u02AC\u39C0\u4D23\u3430\u2400\u1120\u09FF\u406A\u4188\u1A10\u14A7\u589F\u3474\u1321\\x61\u2495\u0221\u15B1\u650F\u5D01\u43C9\u2080\u14A3\u4C53\u0144\u2D62\u7D24\u247B\u03B0\u19E9\u6424\u2887\u02D8\u3141\u0C20\u088E\u0368\u0C21\u7C28\u4881\u3A68\u086C\u20AD\u0434\u5A92\u1CBD\u6425\u0873\u2278\u3201\u1525\u0881\u43C8\u1320\u39AC\u686A\u01A3\u5DA0\u6025\u4438\u4757\u1E61\u6A28\u785A\u5301\u1201\u4321\u1267\u4106\u1479\u27CC\u3CE2\u68A8\u13A0\u2B48\u6ED4\u4240\u119B\u4BFA\u5F15\u768F\u3B9B\u3BF2\u4EC8\u0298\u1590\u2FFA\u4031\u0410\u1351\u522A\u287E\u7B20\u1071\u542C\u1894\xA8\u17DD\u39AD\u3A6A\u4328\u1D7D\u7729\u4849\u564C\u1181\u5C20\u1887\u011C\u1D7C\u20AE\u6E69\u032B\u57A1\u0B26\u1053\\x2d\u1EA8\u03BE\u6053\u1A4C\u1881\u1A7F\u0886\u43CB\u4F61\u0F23\u1465\u271C\u1095\u0826\u3096\u0160\u0A8B\u7C27\u686E\u2242\u1181\u07BE\u5742\u0CB0\u6089\u35F8\u4086\u43D0\u1380\u44AA\u70F4\u3528\u014C\u4178\u3E3B\u2301\u10E1\u7826\u306D\u23F0\u3A61\u0C2E\u2885\u6368\u1DFB\u402D\u4072\u0187\u2860\u2020\u708D\u0D64\u0966\u2A56\u308C\u63C8\u12C1\u24E8\u4481\u4024\u11A1\u42FB\u7881\u4354\u0B60\u4523\\x5e\u4317\u5CC1\u712F\u0821\u431C\u0ACD\u3E09\u2282\u0280\u0A20\u39AB\u0213\u43B0\u4ACB\u4D27\u5664\u0250\u14C1\u7ECC\u7EB0\u4340\u028C\u0126\u5919\u032C\u0461\u122E\u0AC9\u5819\u1720\u3826\\x77\u6A40\u1350\u7ACF\u2912\u0357\u5121\u0EFB\u0870\u37CB\u0880\u2726\u1087\u0221\u551C\u2028\u4089\u02AA\u1FA1\u3123\u1481\u416C\u3FD4\u2228\u69CD\u03C0\u05A1\u0829\u555E\u18A8\u1DA1\u3C24\u186C\u63E8\u1640\u1D60\u4109\u0117\u33B1\u2424\u2430\u207C\u0D41\u51A5\u364D\xA8\u0401\u7C2A\u2883\xD4\u79BB\u5C27\u7042\u2301\u0960\u2D56\u4A42\u2058\u1894\u0325\\x37\u7458\u1CF0\u2A25\u24E6\u020C\u1130\u7D21\u2838\u02B0\u1A9D\u242D\u78AE\u50E0\u1800\u2D5F\u4ECE\u4144\u10A9\u713E\u3F35\u24A8\u19C1\u1926\u3052\u3BB0\u13A1\\x63\u39B3\u408E\u0BC0\u422A\u6030\\x24\u1B21\u282F\u6038\u0382\u10A1\u2C29\u5856\u4190\u6AF5\u1C23\u26DA\u0280\u08B1\u3226\\x75\u6024\u14E8\u5FCA\u5C76\\x24\u06E9\u5828\u5AB5\u72D0\u0500\u36A1\u128B\u15AC\u53A1\u1423\u0219\x94\u3BA1\u707A\u405F\u03B4\u1DA1\u1225\u62B0\u40E0\u1687\u6D2C\u4054\u4D01\u0A40\u39A8\u1EFF\u6240\u0225\u2528\u307E\u0274\u05A5\u643F\u3B76\u01F0\u1260\u5125\u6AB9\u2221\u1A7C\u1D69\u561C\u2397\u30A1\u7C28\u4065\u4218\u1F8A\u44AB\u4067\u4242\u0C21\u0982\u0484\u23E8\u14A1\u3F2D\u608E\u030F\u1887\u5428\u784C\u21A0\u0268\u0321\u1231\u0309\u1B21\u5A65\u449E\u0301\u1720\u20A6\u49A9\u1380\u1B35\u12F6\u586E\u0C58\u0CE1\u2521\u784D\u028C\u06F1\u1424\u5ACC\u3869\u0560\u012B\u2D7C\u1164\u0921\u1C27\u587C\u1259\u3820\u2727\u689E\u6AB6\u7CD6\u1D6C\u0205\u6221\u1A13\u6647\u2071\u2272\u1260\u3023\u5D7F\u7A90\u1121\u4E2F\u1067\u4284\u15A1\u6421\u788E\u6F6B\u0621\u67F2\u108E\u032B\u4FC1\u122D\u6031\u5B65\u3BD7\u4823\u1463\u1268\u06F0\u6B2D\u6DD3\u0390\u1354\u2121\u6A42\u21B3\u4400\u36A8\u71A7\u4E4A\u1BA1\u700E\u70C1\u42CF\u1865\u042A\u2881\u412C\u1D36\u7E21\u3821\u4338\u1CA0\u432B\u7383\u3A18\u1520\u1428\u2043\u075B\u0F60\u4CB5\u449E\u310A\u5080\u7135\u4427\u6E0C\u08E3\u3B7B\u0663\u02A6\u32C6\u32AA\u5C36\u4C24\u0C06\u20A7\u705E\u465C\u1508\u7D23\u145E\u40D4\u6221\u2823\u0499\u0358\u06F0\u2D5E\u7D82\u556C\u7007\u4DEE\u2088\u345C\u7351\u55E4\u54E7\u4060\u187C\u58A3\u12C4\u4095\u0671\u482C\u1779\u02CE\u1F20\u3EEA\u045E\u6934\u0AA1\u6B09\u3D16\u40FC\u7821\\x69\u11AF\u4EAA\u0301\u152D\u6095\u0242\u1BF0\u202E\u288E\xC8\u0501\u1928\u7C82\u0358\u131D\u2BA4\u104C\u534E\u0654\u5A29\u206F\u664C\xBD\u22A5\u685A\u024C\u12A7\u4E26\x84\u2354\u08B1\u398B\u7304\u03C0\u1DA0\u2E88\u4020\u4F20\u1CC0\u5843\u4C9D\u560C\u0DBB\u542E\u61EC\u02E4\u0268\u288F\u408F\u1E68\u1351\u1E29\u286A\u0E18\u1201\u3246\u442E\u5319\u2344\u742C\u7083\u3738\u19E2\u58A8\u789E\x95\u187D\u0621\u783B\u6CA2\u13E1\u442A\u347B\u06E8\u1809\u766C\u178C\u0232\u1F38\u692F\u087A\u6242\u1104\u4925\u442C\u7A90\u14F0\u2CAF\u0854\u4049\u2B31\u430B\u405A\u2D64\u1C44\u6722\u5E64\u2338\u17E3\u1198\u404F\u7988\u0421\u712B\u426A\u5DE4\u21E1\u4424\u2892\u42F9\u3FD5\u48A3\\x2e\u4640\u1D21\u2822\u0824\u5700\u1591\u446B\u607C\u120C\u0F9C\u6676\u7059\u5B4A\u48C1\u6A28\u331B\u5400\u1A60\u2A2C\u7096\u403D\u0A9D\u3F21\u3528\u0188\u1E60\u0126\u7054\u4277\u27E1\u2BAA\u2879\u1668\u1181\u59B3\u584A\u0B00\u5B20\u4D62\u0A3B\u2208\u0301\u082D\u4091\u0A50\u126B\u122A\u3338\u01C4\u1905\u3089\u5C1E\u6B2C\u0F80\u602E\u6C6A\u4317\u5340\u492D\u0939\u23D4\u1CC3\u4913\\x2f\u4208\u0219\u3E05\u3CE2\u3F58\u1381\u22AA\u27B4\u3DA0\u1D61\u69CB\u6F39\u21A2\\x69\u4914\u4821\u6242\u1471\u7227\u504D\u03C4\u4FD5\u1CA6\u5864\u20A0\u1BC5\u2B32\u7A68\u2338\u0461\u4305\u3CF4\u3DF3\u7D0A\u29F7\u2042\u230F\u3D21\u142B\u6F33\u40E4\u0BCA\u1A4F\u276D\u4274\u166C\u2FF4\u2838\u7595\u326C\u2229\u7063\u0144\u01E1\u3E0E\u5802\u028B\u635A\u3755\u3CCE\u4300\u03D8\u3313\u708A\u0614\u1380\u2C6B\u6F72\u02E8\u1131\u5220\u32E7\u4250\u08FC\u1F2B\u1076\u02E4\u15FD\u3F19\u2054\u4358\u07E0\u3B99\u5060\u1301\u201A\u0C08\u6053\xFA\u13E0\u692D\u19AD\u1CAB\u38A1\u7219\u406A\u032C\u055E\u6F09\u647C\u2250\u1470\u0128\u598F\u1ECE\u1DA0\u74EA\u2028\u119E\u7BA1\u7821\u6584\u0309\u7801\u082C\u3083\u025A\u7255\u3827\u702E\u5191\u1260\u5D2A\u146B\u4B58\u0269\u446E\u2042\u20A4\u5320\u6027\u205A\u0582\u0705\u1C2B\u088C\u0366\u6480\u1F21\u387B\u3E42\u2EA3\u5829\u2B5A\xA4\u1341\u442D\u1072\u0189\u2081\u2828\u0290\u4860\u0919\u08AE\u09EE\u03D0\u0B26\u3E2A\u2860\u1218\u10D6\u25B1\u3165\u4342\u0B31\u42EA\u3E62\u49FF\u5D37\u2C2C\u186C\u4132\u1148\u7D20\u0864\u21C4\u7BE2\u3135\u1426\u188E\u01FE\u20B2\u0B00\u76A0\u77E3\u3441\u1CE8\u4208\u0240\u1748\u6E24\u1038\u316A\u4206\u1498\u0A21\u4F23\u5429\u7522\u6264\u4160\u107C\u08CC\u6954\u603F\\x7d\u5D3E\u04EC\u061E\u4CD9\u6828\u3049\u4CB8\u0342\u060E\u0860\u68C2\u2033\u675D\u359D\u51B4\x80\u7E21\u022C\u3638\u1EC2\u22CE\u0DE0\u28C0\u3072\u3223\u6E8A\xCA\u40B2\u0F96\u3E21\u5229\u1038\\x21\u0152\u0910\u0EE0\u1625\u482D\u3046\u217D\u0560\u37FA\u5C21\u142C\u4024\u010C\u02CE\u6C64\u28C1\u48A3\u303F\u572D\u304F\u4028\u18A0\u3F91\u682D\u2B41\u4064\u41D3\u2B35\u2AD4\u7E25\u2E27\u5D83\u029C\u04F9\u18A0\u393A\u5C47\u2027\u60E8\u4370\u0435\u2C75\u6C23\u6777\\x6c\u6199\u25AA\u5520\u13F9\u08CA\u605F\u2080\u01CC\u0CF0\u2C74\u58A7\u52ED\u3034\u161B\u7136\u5FC8\u0E81\u7C8D\u1AC7\u40E0\\x69\u09B8\u1C3C\u3D04\u2020\u6479\u0164\u103A\u5990\u15BB\u5BEB\u4224\u4887\u0250\u0DA0\u3240\u7AE6\u24E9\u2067\u6213\u2788\u5D60\u5C22\u362C\u225A\u4CE6\u020D\u4960\u22E0\u2A22\u5630\u045A\u0180\u55A8\u12A0\u3F20\u3064\u4847\u1112\u03D6\u4C80\u3021\u2BA1\u4267\u6084\u01B0\u0780\u1130\u429B\u282C\u444D\u6063\u05AE\u66E0\u0C21\u2BA4\u0139\u6098\u413E\u0664\u1FE2\u59C8\u5CED\u6824\\x6c\u4054\u14F0\u5820\u6E27\u3453\u510E\u4356\u02CC\u14A0\u6023\u1121\u303F\u1035\u1240\u0760\u3C61\u3825\u702B\u7479\u0216\u2293\u4A1C\u3321\u5725\u504B\u220C\u1AB5\u49B0\u12E5\u3126\u1DBA\u3E27\u01B0\u0230\u0A20\u1441\u2947\u70A4\xE8\u71FA\u024D\u3F21\u6FE1\u0432\u4071\u10A0\u14E8\u18E0\u2A52\u3C23\u3444\u149B\u68A2\u09E8\u0860\u0FC6\u4837\u4458\u3202\u0124\u0400\u3321\u1224\u284B\u36B8\u0338\u0A92\u19B9\u6424\u73AC\\x7b\u29E4\u3427\u4FE0\u7223\u0C2F\u386B\u7ABC\u4208\u0970\u2511\u4263\u0836\u2034\u094D\u33C0\u03E2\u395B\u08A5\u4428\u40CE\u2C10\u06B0\u2681\u3820\u0428\u2081\u421D\u4460\u1BA0\u5C40\u732C\u175B\u20B5\u032C\u0AD8\u3489\u4822\u1237\u7050\u1D16\u4170\u1DA0\u6211\u202B\u5D51\u5AF2\u69A5\u6E60\u0FA0\u5026\u1023\u6255\u4558\u0268\u0EA0\u05DB\u1C2C\u06C9\u4CC4\u0301\u0960\u1760\u6925\u702C\u205D\u415C\u40E0\u4201\u1962\u4AEA\u09D5\u51B8\u0250\u03D7\u3118\u0124\u3E2A\u248E\\x79\u3270\u01AC\u4420\u0628\u6036\u2879\u6A92\u0F30\u3CD9\u0422\u7423\u5442\u7578\x8F\u5EC8\u5273\u2B09\u2034\xAF\u022B\u0B6E\u1760\u4A20\u0BA6\u285F\u015C\u0688\u0620\u2D09\u75CE\u1F20\u6067\u4860\u0F30\u2721\u3EF7\u213D\\x57\u0244\u4688\u045C\u28A3\u753C\u76C9\xBC\u4253\u64E0\u1BD9\u7825\u3D3D\u4061\u04C2\u0650\u10E2\u6473\u1022\u3856\u6C94\u0331\u04B0\\x61\u4827\u1031\u58B4\u58F6\u1580\u1260\u3510\u0B34\u1846\xBB\xAD\u4B27\u1AE1\u46D4\u4629\u0460\u11FA\u06B6\u09EE\u6271\u5787\u684A\u719A\u02B4\u09F1\u2560\u292B\u5073\u4874\u0139\u7038\u1D60\u6463\u8005\u7750\u602E\u02AA\u0940\u1A6C\u5021\u1AB6\u30C1\u0205\u648F\u4040\u3321\u7B67\u5852\u149D\u5199\u2590\u4FAD\u52A2\u7138\u604E\u4116\u0690\u03C8\u0823\u0626\u704C\u4061\u20F2\u424D\\x61\u3C65\u2E32\u4021\u41BD\u2690\u1D20\u545A\u7823\u7053\u2078\u4250\u6AE0\u0421\u4827\u572B\u4492\u41CA\u76C0\u12C0\u4CA2\u7028\u65D4\u48B8\u03E2\u2BA0\u0CC0\u1464\u303B\u209B\u4314\u0284\u0C60\u5FA0\u5D61\u1242\u109A\u024C\u0438\u3C6C\u2A53\u0833\u4831\xEC\u0410\u0D80\u62E0\u6D2A\u2052\u0E7F\u7BB4\u0290\u0D59\u1523\u3E7A\u4064\u2452\u03A8\u58A6\u13A0\u4E29\u204A\u7075\u42E8\u0EE0\u21A1\u0EC0\u5439\u076B\u55A8\u4FDA\u1681\u5C22\u452A\u4039\u40E4\u2250\u0B03\u2421\u7125\u2E5C\u762D\u63F3\u62F0\u0DE0\u6EA3\u2BA8\u5144\u408E\u0134\u02C0\u2EE1\u3C90\u752D\u6025\u5457\u0A8E\u1CC0\u3F20\u18CA\u649D\u5C2A\u4608\u0ACA\u3533\u0422\u282F\u6C29\u10E0\u0480\u0D00\u4CE0\u3FA6\u302A\u4111\u0148\u0855\u28C0\u06E3\u1C32\u2093\u6855\u4118\u1920\u1123\u58AE\u265E\xAF\xFA\u29E8\u3720\u6B20\u7C32\u204A\u61D8\u0408\u1590\u7491\u4AB9\u4C43\u3EF3\u025A\u4579\u0F73\u1B26\u5858\u608E\x85\u0765\u1120\u47A3\u0FCF\u4021\u0975\u4270\u0210\u2621\u2C24\u3031\u406B\u252F\u4664\u090E\u0FEA\u082C\u1248\u7EA3\u7B43\u4834\u6221\u03E7\u442C\u2C3B\u2204\u0642\u03B8\u1399\u6E31\u3546\u3E9B\u13D8\u0D40\u2030\u79E5\u2E35\\x41\u4026\u05E2\u1B0A\u6420\u2244\u1844\\x6b\u621C\u104D\u2C48\u1023\u7833\u675D\x80\u0238\u0750\u0BA0\u4E05\u0834\\x7f\u3416\u48A8\u05E1\u0F25\u0A25\u2341\u4136\u03CC\u18E0\u76A1\u7A2C\u4452\u1052\u1320\u0BD8\u2221\u3862\u5479\\x4f\u22C1\u36E0\u0A40\u4323\u2AB5\u3750\\x64\u4102\u1C80\u2680\u2916\u2029\u204E\u405C\u53FE\u0560\u6922\u4167\u584A\u7089\u01A0\u04AB\u3AA1\u1923\u366B\u2078\u4165\u0368\u1720\u3791\u0429\u6031\u10B8\u03E3\u4D00\u2F21\u6522\u0836\u2083\u0138\u06C0\u12E4\u5532\u7725\u4636\u10C4\xFF\u0210\u3FF8\u0125\u4928\u486E\xA4\u027C\u03C8\u76A1\u34C0\u7A90\u6042\u65EB\u1EF0\u3FA1\u0B21\u6624\u1022\u459E\u01A0\u1E60\u45A1\u3A29\u4040\u16EE\u222B\u2470\u332C\u0127\u7326\u2972\u0105\u6504\u0E90\u28A3\u0F2B\u14D6\u49DE\u67A0\u4AE0\u2680\u20A2\u743D\u2099\u01AC\u0124\u1B14\u22A0\u24AC\u4032\u20B4\u6555\u4F40\u3C90\u4424\u1C43\u016E\u11D0\u04F8\u0F40\u5D18\u3E2D\u1029\u60E4\u0286\u0328\u6120\u6343\u7839\u608E\xBC\u4B62\u4F60\u10A2\u206D\u783B\u4114\u484C\u25AE\u2321\u3104\u6024\u0894\u1CFC\\x28\\x40\u6923\u60C4\u105A\u3EB5\u01F0\u26D0\u19F8\u1020\u64E8\u3096\u735B\u4907\u196A\u4422\u64E5\u0A43\u3163\u03D0\u04C0\u05C8\u7585\u6BEC\u7035\\x33\u6108\u5A48\u6240\u7C2F\u1047\u091C\u22C0\u0BE0\u30B1\u4326\u35E2\\x45\u5377\u0D40\u0C60\u1962\u3DC8\u3E23\u40BE\u01BC\u0880\u3CA1\u2AC3\u1974\u775E\u41A1\u5702\u2F61\u2F4B\u440D\u5147\u0112\u7250\u0C12\u1950\u39A7\u3353\u725E\u0130\x90\u0599\u3D21\u4606\u7028\u40DF\u0301\u08F3\u0DC0\u3F81\u023D\u5071\u48B2\u4390\u0620\u1CE3\u59A1\u6130\u6069\u0208\u0CAB\u3E72\u276D\u057F\u4042\u296C\u63C0\u0F60\u4AA9\u3A34\u1845\u207D\u0286\u0A60\u2561\u0666\u3955\u64E6\u632F\u17ED\u5520\u76A2\u7707\u5A46\u608E\u025C\u08DF\u0A03\u5823\xDD\u0B83\u01E0\u2638\u1A1A\u0BA1\u442B\u79BF\u1B18\u0396\u4470\u1221\u3227\u7428\u504E\u40A7\u269E\u5F11\u4622\u5828\u193C\u1E86\u4067\u6AE0\u240D\u1B26\u3F61\u6027\u017D\u549D\u4FA5\u1143\u482F\u6046\xFC\u0216\u1A35\u3921\u08A2\u2833\u6090\u3C85\u0368\u01E0\u13A1\u26C6\u3037\u40A4\xBC\u0C80\u0F91\u07E0\u3D26\u4E95\u0190\u4540\u06BC\u6460\u618E\u0159\u20C8\u0117\u2F05\u0820\u07A9\u6626\u3D5A\u38A4\u0766\u3174\u4A22\u5825\u084C\u1291\u44FC\u4520\u12A0\u1D22\u5668\u6141\u331C\u2B1C\u0F65\u4621\u142A\u1435\u205D\u6BEA\u4777\u3120\u2025\u68C3\u5454\u4BA8\u01DF\u1A1A\u2262\u45A1\u6F56\u1982\u01F0\u07FA\u2EE3\u3C67\u482D\u24BE\u74C0\u033A\u0706\u06B5\u0A24\u6986\u305D\u69CC\u0228\u2560\u44A7\xA6\u3D98\u40B2\u0391\u1645\u4835\u624B\u2BC2\u25D1\u02C8\u4244\u1254\u2A27\u7324\\x7c\u108C\u480D\u0400\u3AD9\u4CEB\u423A\u6585\u6834\u5472\u7414\u48D2\u0829\u202E\u5177\u0654\u5640\u1F21\u54E3\u1EAA\u4034\u6160\u0652\u4F95\u6CEC\u2C26\u732E\u50E4\u49D9\u58B2\u0E8B\u2824\u54D3\u7A5E\u1690\u0802\u656A\u7A4E\u222D\u303B\u21EA\u0719\u27E5\u5FB7\u7E7C\\x52\u65B2\u0178\u5382\u54F4\u46AB\u713C\u5056\u2DBF\u55FE\u3280\u7422\u4829\u1053\u7A8B\u4B10\u0393\u0C18\u2126\\x20\u6E89\x87\u53F5\u545E\u6C51\u7429\u704F\u3CDB\u0698\u0EE4\u6FE1\u38CC\u2033\u1030\u217D\u5498\u0B56\u21B6\u2A27\\x4b\u51B4\u57D9\u24C0\u1A83\u1186\u3F72\u5D55\u4A74\u0579\u2A20\u2AF9\u5746\u5964\u0108\u01D8\u4D5E\u0E84\u574C\u2C3C\u32DD\u40E4\u03A3\u47E0\u5FA3\u5D2B\u2727\u60B3\u0330\u0BA4\u3020\u3DF7\u2030\u4832\u0190\u4329\u37B5\u7012\u5578\u3E38\u40D8\u21A8\u5D55\u2E31\u73B4\u173D\u22E8\u6542\u6603\u4300\u1A0B\u446D\u1028\u59A0\u23CE\u4E9E\u2681\u3C67\u3441\u6087\u7440\u4DBD\u1CC0\u6320\u022C\u7EC6\xB5\u27A6\u4A71\u0F94\u2226\u3DAD\u5087\u2C9B\u5566\u5CC0\u3FC0\u2FA0\u0624\\x55\u0639\u2400\u07E1\u4023\u2421\u72E4\u2125\u0B90\u07E0\u7ABB\u5FE0\u487E\u403F\u6194\u0C20\u0F63\u4460\u414E\u02CE\u436E\u7780\u0A40\u5621\u3C62\u4BC3\xEE\u022F\u0EF0\u3F90\u1064\u2C34\u3686\u7136\u057C\u0670\u22E1\u77C5\u6821\u44F8\u0144\u0C44\u0861\u2C20\u7533\u548F\u4485\u04F2\u0CFE\u5FA1\u1229\u202F\u469B\u03A1\u0307\u2541\u4E26\\x37\u676A\\x3c\u0792\u5520\u61E9\u5C3B\u6046\x86\u2BB7\u0D9E\u0C19\u63A7\u03EE\u407F\u40B9\u0130\u0CAC\u3570\u3C83\u1638\u40F2\u72D7\u2100\u3131\u7C23\u66D3\\x30\u4116\xCC\u134E\u4040\u24AF\u4032\u22E3\u0207\u2E98\u5A61\u17AE\u382A\u1053\u408F\u2FBD\u3F15\u3D27\u482E\u4C97\u1711\u01EE\u1CFC\u2E0B\u77CC\u3EC3\u7087\u6ABB\u5626\u022D\\x54\u1F76\u3033\u75EA\u08D6\u53B8\u2CB9\u1523\u76A6\u7B09\u39A0\u07E0\u150E\u01A2\u6BE4\u6449\u2082\u03D3\u0D5C\u423A\u77CB\u6C30\u6287\u53B0\u02A0\u1C6C\u0855\u7622\u502E\u22C8\u61C8\u276F\u163A\u5D24\u1D58\u4071\u20CF\u2FDA\u1908\u0EA9\u280D\u3D9B\u0DB4\x83\u0AD8\u4AA0\u4E25\u7966\u7AD5\u755E\u26E1\u2715\u2442\u3828\u6056\u05F2\u0410\u036D\u02FC\u4320\u6C43\u7CF2\x93\u0640\u0DE0\u5220\u3F4F\u0847\u6441\\x29\u51D8\u533A\u028D\u2ABF\u604D\u011B\u7118\u0808\u3E68\u20F7\u2D43\u31F8\u16AF\u6B25\u28C1\u6672\u35A4\u209E\u32E5\u23C8\u25ED\u3755\u7C22\u01DB\u19D8\u0160\u0450\u0632\u5E8D\u7037\u4A5E\u696E\u2924\u12A0\u17C0\u6135\u0848\u0965\xBC\u0F40\u07BB\u4E24\u5431\u2E30\u41F0\u02B6\u24C5\u4E22\u4BA1\u385C\u29A0\u2278\u0DE0\u3620\u108F\u05C2\u483E\u513E\xCD\u34A0\u7055\u3A2E\u0E45\u4C72\u086A\u4DD6\u1AA2\u4220\u5770\u7C3C\u1378\u0761\u1A60\u5F04\u3237\u2037\u54F8\u0280\u01DC\u7021\u3E75\u4833\u107C\u308D\u035E\u2990\u12D4\u65B0\u085C\u408C\u2155\u4F21\u08A1\u4922\u2829\u3866\u6BD0\u0749\u1720\u3382\u09E2\u10DD\u3191\u414E\u0451\u34E1\u7CEB\u1829\u384A\u3C44\u47B3\u2B30\u2709\u0C4A\u1438\u0832\u2102\u4A70\u2D58\u1D66\u223C\u4484\u514E\u6EA6\u2040\u56FB\u5A28\u782A\u408F\u2AB7\u03B8\u2220\u1266\u5C33\\x75\u6150\u0504\u040D\u67D6\u76E9\u5844\u40D7\u113B\u4348\u1EE1\u6826\u55E6\u738C\u0120\u474C\u0A40\u58A1\u66FE\u07CC\u1DB5\u02B9\u4C5E\u01FB\u1227\u6026\u734D\u011E\u069F\u1BA8\u4CA1\u402F\u1042\u285E\\x33\u51A6\u2961\u2BA3\u7568\u3760\u1177\u5638\u1F20\u3A82\u322B\u425B\u20EA\u5594\u028D\u2030\u7226\u6531\u0EEE\u2159\u05D1\u1FA0\u5222\u5EE8\u4036\u40A8\u67C0\u0FA0\u3A99\u5403\u682C\u202C\xB2\u0660\u1DC0\u7BE0\u3AAB\u4047\\x6b\u068B\u6D1A\u48B0\u5D23\u7EB7\u1432\u2962\u55A8\u1590\u61E9\u312D\u144C\u20B2\u3C10\u0900\u5AE1\u3126\u3824\u5CF6\xF9\u0702\u15CD\u3E1B\u5825\u2064\u69CC\u01AD\u5F40\u2241\u1EAC\u7DD8\u3166\u010D\u0E5C\u4520\u40B0\u402E\u16AA\u406B\u43C0\u09E8\u3C6D\u1920\u11B1\\x2b\u515C\u02E1\u4420\u1CE2\u3B6C\u2927\u60F4\u028C\u0806\u1421\u3460\u0C30\u688C\u68C2\u05E2\u1015\u2EBB\u640F\u1059\u0A13\u3ACD\u27C0\u0820\u2722\u2E24\u1078\u1D38\u069C\u4B5D\u67E4\u3AA2\u1028\u5A19\u77ED\u62C0\u3A20\u350D\u6DD8\u1EF2\u40F7\u3688\u0940\u59FB\u6700\u7036\u407E\u1B21\u40C8\u6652\u7A24\u2EE0\u3094\u32D4\u357E\u530D\u1CE0\u1D02\u0848\u5064\u40FC\u6D64\u1A60\u0326\u5269\u2039\u75BF\u0753\u397D\u5595\u6D30\u3A39\u4087\xA4\u0FD8\u3CA1\u5887\u1BD3\u3F5D\u7C26\u01F1\u1D39\u6422\u4AC2\\x58\u1431\u2BD0\u6B7A\u09AD\u22A4\u0129\u3872\u40B9\u21B0\u5EA9\u7484\u75FD\u203E\u5DFC\u0187\u5601\u1B0C\u1721\u47C9\u3862\u0158\u0210\u11A0\u0C53\u5DFB\u4038\x9E\u03E4\u60E8\u1300\u3024\u46D3\u4073\u1A1E\u0640\u13A0\u4323\u4A2F\u2F68\u40A0\u22D0\u059F\u38AC\u7A25\u0532\u770E\u59D7\u1284\u08BC\u6131\u3EC8\u476D\u4252\u667D\u55A8\u0DE1\u7157\u08FF\\x3c\u3190\u41B4\u1D20\u8016\u4A21\u79B1\u209A\u0164\u101E\u4F04\u4223\u0D62\u2478\u41F1\u4FF0\u0A40\u5CF3\u5AAA\u6A42\u4EC6\u4950\u48E0\u2FE0\u7E89\u33CE\u203C\u72E2\u549C\u091C\u3DA2\u502A\u1446\u1D42\u72C9\u2322\u3520\u3757\u5C2E\u4069\u35C4\u0120\u1D39\u242C\u652D\u6DB6\u03EA\u4338\u0393\u1A71\u143E\u5096\u4215\xB2\u01D9\u41A3\u262C\u30EF\u2F8E\u084B\u05A8\u0996\u5726\u3C3F\u3429\u3896\\x31\u563C\u4563\u352E\u3229\u70CE\u08E2\u6B10\u01DF\u2721\u178B\u6FEC\u2209\u0131\u6D48\u1340\u22B9\u7629\u6441\\x66\u6AB0\u0400\u1301\u1B27\u3DF8\u395E\u4211\u6FB0\u13B0\u0B8B\u51BB\u6043\u2090\u6AF4\u14D8\u1AF3\u2165\u19B8\u3026\u3AC0\u196E\u56C1\u10A2\u2A29\u055A\u1A06\u6160\u1004\u2320\u3750\u74EC\u1E71\u3BE5\u6E68\u1791\u62E6\u4FE7\u2027\u28ED\u0DBF\u1EC0\u378C\u193E\u203E\u1179\u50B7\xA8\u7BBD\u5E95\u1724\u3F45\u7EA8\u4390\u057E\u47D1\u220A\u52C1\u692C\u7A8E\u34EC\u127D\u3EAF\u6BFB\u50E9\u105E\u7568\u28E0\u3C70\u662B\u73D0\u5ECE\u46E1\u6DA5\u5748\u35AD\u1256\u5DC3\u3EB9\u038E\u2268\u1E24\u2FB6\u1034\u0489\u40D3\u371A\u57A4\u7A2A\u3225\u579F\u1DAB\u02A4\u2B0E\u62E0\u4BA7\u47CC\u6030\u0182\u0498\u0FC6\u0A97\u625E\u405C\u4112\u02F3\u54D8\u2B21\u2457\u7899\u5AC8\u01DB\u34E8\u0560\u3020\u2157\u3751\u63C5\u0292\u0CA8\u0771\u2ED1\u5CF9\u6039\u2204\u0348\u63C8\u2D17\u4FC3\u3451\u2135\u414E\u0E6C\u4B45\u58ED\u443B\u3945\u0210\u044D\u0824\u3D23\u0D67\u478B\u2E0C\u03D5\u04D8\u31A1\u3395\u5EF9\u0F18\u07D5\u4A77\u0268\u4C3A\u1F39\u36AB\u49C4\u03F7\u51F4\u10A3\u6822\u3237\\x60\u494A\u05B0\u7D60\u25E2\u70A6\u2512\u40CA\u194E\u0CF0\u3D32\u0326\u2432\u3F14\u0641\u1988\u2323\u1420\u23E5\u41CB\xF5\u21C8\u29E8\u04C4\u2567\u57CF\u3F87\u59E9\u6320\u1CD0\u4205\u5654\u4513\u7707\u011C\u4450\xDA\u26BD\u0499\u7B9A\u09A8\u03D9\u0B0C\u0193\u0627\u733C\u5848\u0CC9\u19E8\u2CA0\u4326\u342F\u74B0\u0171\u6CE8\u0A43\u6E22\u702A\u2025\u23E6\u3880\xA1\u1300\u3B0D\u5731\\x49\u0684\u1FE0\u144E\u4781\u222F\u0848\u492F\u1BE8\u0842\u778D\u6824\u6435\u21EF\u7B7B\u6E8E\u3CD0\u7C36\u3926\u4BC7\u4E3D\u0D18\u0AA0\u1AF5\u7824\u4C9C\u5075\u75B6\u7170\u1448\u7523\u3025\u2F90\u08F3\u0D91\u49E0\u0771\u5A17\u57DF\u458A\u4CE0\u725F\u05B2\u66ED\u79F9\u703E\u407F\u0EC9\u2949\u7694\u3E20\u5C39\u3503\u48B7\u0308\u07E0\u6B6E\u1827\u6943\\x6c\u420F\u68D6\u03A0\u5F12\u2E36\u3462\\x60\u04C8\u1200\u66AF\u6D5C\u4E49\u3A72\u5787\u29E0\u1466\u6F3A\u2E2F\u0334\u06D6\u41D9\u574C\u78EF\u4FC3\u5CE1\u56DA\u4D4E\u5885\u1BD8\u030A\u243A\u59CA\u7AB1\u1DA0\u6670\u6923\u5E50\u5468\u2E63\u03FC\u0D1B\u3007\u7FBE\u0863\u2A08\u086B\u3690\u1470\u7796\u1829\u4851\u6323\u02F0\u161C\u34A0\u4E3D\u1A78\u48CE\u40ED\u124A\u1930\u0233\u082C\u6942\u25F8\u2FC3\u15C0\\x45\u6530\u39FC\u24EE\xD4\u05BA\u13C8\u1B61\u32C4\u4152\u289E\u01B4\u3474\u1421\u7A4E\u103A\u406F\\x4e\u0350\u0B33\u58C9\u4424\u735C\u40CB\u2A8C\u074C\u4619\u0420\u6931\u6841\u0153\u0766\u2C60\u2443\u502A\u3AD5\xCA\u30CB\u0230\u1591\u2F54\u6626\u30E2\u3942\u64C0\u112A\u0360\u7B88\u792A\u4113\u2B91\u55C0\u25E9\u2425\u6FB5\u3853\\x46\u65AF\u1DE6\u2822\u18EC\u1841\u40DA\u678A\u201D\u1161\u3B17\u7BEC\u5C97\\x61\u0230\u06E0\u5119\u1722\u3856\u4136\u1780\u0860\u0F4A\u5027\u1229\u383C\u3531\u04CA\u59B0\u2D65\u6777\u469D\u2A0A\u2B49\u1555\u18A0\u6022\u173B\u2110\u28DA\u0752\u2FE0\u4243\u3021\u5843\u6231\u709F\u6C3E\u7200\u0FA2\u4437\u408E\u412C\u04E8\u01E0\u5C33\u2977\u703A\u20A4\u02CE\u0CA8\u382A\u6222\u0C2D\u4C32\u5BC8\u4F1E\u2129\u2446\u782F\u0B91\u087D\u02C9\u38A5\u28C1\u2524\u76C4\u0862\u01B3\u0DA8\u025D\u742F\u1C25\u6899\u387C\u2221\u07FB\u1F88\u637A\u12A5\u1D64\u13BC\u039C\u3591\u4806\u5CCC\u2023\u7516\u67E4\u0DA2\u413B\u5307\u323B\u46BC\u537C\u549E\u20E2\u4A20\u78B7\u4745\u108E\u2382\u08A0\u154C\u1932\u2E2A\u104C\u09BC\u0701\u1C99\u05CA\u76E9\u1030\u6BE4\u2134\u0240\u0480\u5704\u14B9\\x28\u292E\u4664\u04C8\u32C2\u4F0B\u5F43\u216B\u43DF\u063F\u1F2B\u5FE9\u1633\u305E\u68DB\u7262\u3340\u0EBB\u08A3\u4D87\u7C6E\u3599\u0F9D\x84\u36A5\u7375\u028A\u0128\u0390\u2011\u3835\u58EE\u2E99\u2096\u7118\u0666\u7CA1\u6D41\u1D82\u685C\u207E\u4622\u30E0\u21D1\u45F3\u4981\u35ED\u0368\u1002\u5F50\u6E23\u682F\u2030\u2197\u3208\u0DE0\u28FB\u642F\u082B\u0263\u0353\u336D\u010A\u6A21\u6A22\u352B\u41F1\u2DF4\u47A6\u5DA7\u27E6\u7C79\u403C\u13A1\u5B66\u5160\u5026\u60FB\u46E7\u79FA\u1498\u0420\u7055\u5C30\u6248\u7863\u03CC\u139A\u47E1\u44E3\u747D\u2076\u0CB4\u4A44\u0DE0\u195A\u2B20\u2756\u567A\u01CD\u1084\u0CD0\u1D62\u02E9\u24D4\u6CCD\u62EC\u720C\u4621\u0627\u4DDB\u2297\u3A74\u0C64\u3690\u5020\u402B\u0E86\u5363\u4C03\u1C19\u0EC1\u4429\u3437\x9D\\x2f\u6DC0\u5533\u2B7E\u1127\u6999\u59DC\u708A\u5049\u6A23\u4A28\u6521\u7877\u7AA5\u64B0\\x48\u6870\u187C\u4084\u221E\u6A68\u1F20\u6422\u7E87\u71DF\u304A\u6350\u154A\u19A0\u50BC\u59F9\\x46\u515A\u4245\u0C40\u0887\u7826\u305F\u751C\u02A4\u2979\u5804\u5B20\u107D\u076C\u40FB\u299E\u520E\u7021\u777E\u5C53\u209E\xAD\u3FED\u3BE5\u3F24\u542D\u3E9F\u78CD\u4434\u2220\u45A1\u7624\u0303\xBC\u0214\u08A8\u1641\u0623\u4268\u507F\u41B1\u0210\u1073\u4623\u5A67\u6891\u40A6\u72B4\u0530\u2661\u19A7\u282D\u58B8\x80\u0642\u1B20\u3A21\u07D7\u7049\u6E9A\u2F42\u631D\\x60\u243A\u63BD\u6DD8\u597E\u7740\u0AD0\u3D4F\u79B6\u3130\u602E\u259F\u0CA0\u1F60\u1784\u2032\u4DA7\u01BC\xA0\u1300\u27CE\u3923\u594C\u2052\u466C\u6ABB\u3364\u7DA7\u1EEB\u4DE5\u6B0C\u2642\u104D\u5C21\u787E\u1E69\u0E00\u6D4E\u0864\u2FE1\u1425\u2C2C\u34CA\u2A5E\u0958\u12C0\u78A2\u4F01\u60E3\u082E\u0299\u5BA0\u07B9\u0787\u1C39\u0855\u7550\u0221\u617C\u2EA2\u76AC\u715E\xE4\u2280\\x30\u097B\u2D51\u043F\u43D6\u57A6\u0372\u6620\u67DB\u38AB\u7FBA\u5511\u0250\u7ED0\u6FD7\\x61\u5A27\u1882\u1066\u0DA7\u3B66\u0234\u2325\u1556\u05DC\x97\u515E\u4EBA\u6E25\u0A39\u5044\u4BBA\u036F\u0420\u3AF2\u21E2\u084A\\x7d\u01CC\xB4\u4840\u7D72\u5675\u3893\u6C6E\xAC\u0206\u2D3C\u0C75\u687E\u4208\u54D3\u0C5C\u04B0\u1026\u3830\u607D\u22D2\u334F\u1A78\u61F7\u2829\u2030\u408E\u0188\u7A10\u12A0\u1EBC\u6424\u786C\u405E\u0440\u1FD6\u22C9\u5C2D\u61FE\u6050\u0934\u05F4\u1ACD\u7CF0\u64F6\u104D\u08D8\u5038\u1130\u7D52\u7829\u3755\\x3b\u6058\u0EA0\u2B71\u1700\u7C30\u6064\u21B7\u0FDA\u1AC7\u7AC0\u6DA9\u3751\u4059\u41CC\u0EA0\u2FE1\u4E34\u5BBD\u142E\u54E0\u0109\u7DE0\u66A0\u3AAA\u242C\\x67\u2AD0\u3970\u25D1\u3F51\u3140\u22CC\u209C\\x5e\u1F7C\u4CA3\u4A85\u4431\u6ADE\u719F\u67A4\u4B31\u4D21\u5A33\u302E\u4500\u0498\u1180\u4B90\u7C2C\u7078\xB9\u02A7\u02D8\u2E68\u6927\u1420\u3086\u40E4\u010A\\x40\u5621\u420C\u4D8E\u3AA4\u010E\u698E\u3179\u72D1\u1368\u486B\u393E\u0368\u10E0\u76A1\u6944\u3AA5\u0847\u47D0\u6860\u0774\u4516\u70A9\u6780\u0212\u3F40\u1581\u4ABB\u502C\u3A82\u30B5\u25FF\u4D60\u39AF\u51C2\u1D68\u3483\u0841\u3EF8\u16BC\u5920\u3E20\u0987\u10E0\u027B\u4C0E\u1E69\u1520\u7C31\u086E\u0218\u1620\u132D\\x49\u70C7\u7735\u67A5\u16DE\u4495\u2764\u3024\u542A\u68C9\u03EE\u0389\u049E\u022A\u2DEE\u504C\u408D\u7378\u2495\u3178\u1D65\u2021\u7604\u4D60\u3AB8\u2560\u6DB0\u4029\u373C\u50DB\u0162\u118E\u2485\u18E5\u4437\u5E2F\u4F68\u05A8\u0EA0\u34A1\u6196\u224F\u1AFD\u5BBE\u27D0\u3B20\u7E21\u662D\u5F97\u4F05\u3975\u7026\u6015\u2BB7\u774A\x94\u0218\u0A28\u707C\u5D24\u222C\u20D3\u71F0\u057C\xF8\u4B90\u5A21\\x42\u1069\u031C\u0473\u554B\u36C3\u036D\u143E\u2B4E\u36BA\u4750\u5F8D\u0267\u5080\u66A2\u12B3\u0470\u18A0\u6214\u602D\u1057\u0332\u4E6A\u3920\u0D4D\u2984\u422F\u50F8\u160C\u0210\u2E68\u5123\u2423\u6704\u6AB3\u05C1\u78BD\u35A1\u4C29\u4DE7\u4DFE\u557C\u1279\u2E21\u4427\u0366\u46D0\xA6\u6340\u596C\u113D\u16B0\u732C\xA0\u21B8\u0320\u16A0\u1914\u5432\u0E04\u35FB\u2113\u18B5\u1B2E\u1624\u3CA8\u07EB\u644F\u054A\u372F\u58EE\u0889\u2F31\u71FA\u02F0\u13E0\u4623\u382D\u194B\u2DE8\u2214\u215D\u5BB2\u5BC0\u403A\u7558\u0A62\u010F\u0960\u3721\u43B6\u5ED3\u4480\xA2\u0D72\u3F21\u0D0D\u7030\u6048\u40FC\u35A8\u3DC2\u74CA\u4792\u505D\u75C3\u12B4\u0B70\u0810\u59F2\u684D\u4081\u416A\u0238\u1E18\u70D4\u5EA2\u7FA5\u2E13\u5771\u1344\u3EF3\u556F\u5E26\u1E05\u5CE4\u05F7\u1990\xC3\u2E34\u185A\xC7\u6552\u0D24\u703F\u52A0\u49B1\u3093\u08EE\u0548\u0639\u7F6B\u6221\u0F14\u6ADF\u01B7\u6AE0\u28C1\u2792\u2D99\u0B92\u6409\u6463\u0A62\u09CA\u2823\u1478\\x50\u0194\u098C\u1AB0\u4868\u70A3\u1446\u6F3B\u71BA\u6529\u2FE9\u1B91\u743B\u4088\u3CB5\u0CAE\u1FF6\u2123\u139C\u5264\u2022\u2478\u0959\u0E49\u0A2F\u4D22\u6363\u38BA\u0295\u54E8\u785D\u34E0\u13D3\u0165\u02AB\u264D\u5282\u3B9D\u51C7\u77B4\\x72\u0A5F\u2CF1\u3785\u2E5D\u27B7\u5174\u41BE\u7B6F\u066F\u2427\u5045\u589A\u3CD9\u1C74\u33A1\u4D02\u6828\u122E\u09B8\u6E83\u0BF1\u633A\u4A2F\u3923\u7794\u0D4C\u4F78\u2F21\u098D\u3871\u7A84\u6D3E\u0238\u17A0\u794A\u14C8\u2040\u08F4\u025E\u0F5F\u3A21\u3822\u682F\u303F\u1302\u3653\u1EF4\u7620\u6313\u4D8E\u590D\u3AD2\u45E4\u09E0\u386A\u142F\u04A2\u129C\u3E42\u2880\u56BF\u7024\u1040\u4937\u02B8\u6A74\u2BD6\u29F6\u0C35\u4355\u4093\u01A0\u10DE\u6723\u2425\u52C9\u6C08\u0314\u3620\u3764\u483B\u483A\u02A8\u1F3C\u7920\u19EF\u24A0\u4FD4\u4BC7\u10B0\u2859\u738D\u377F\u19A7\u7FA5\u7E78\u41F9\u6633\u7947\u5E21\u4C2C\u182C\\x37\xBC\u0D5D\u4420\u0123\u1F45\u294C\u214F\u5847\u01E6\u24A0\u7C20\u79C7\u37A8\u6791\u5084\u65C0\u0326\u39AB\u3740\u55F2\u725B\u2EF8\u1060\u5FED\u30AC\u5108\u1953\u3EE6\u3B20\u2C77\u3036\u7672\u40B4\u04B0\u0784\u2949\u7423\u7401\u7903\u0324\u2D78\u51B5\u0383\u42A8\u1C69\u3977\u0638\u18C9\u6F00\u022B\u7841\u4040\u4410\u0550\u47B9\u342C\u1AE9\u2060\u5529\u63F0\u1017\u37C4\u57A7\u08B9\u6FE0\\x7d\u7288\u35FF\u4FAE\u2C32\u4582\u24A6\u40B2\u145E\u4CE0\u542E\u55B8\u60E5\u2928\u08D0\u2535\u5225\u3025\u448E\u68F0\u4E8E\u0D40\u113E\u1387\u5090\u60AC\u1994\u0A11\u1EA2\u39A7\u702A\u1425\u5D67\u3B7F\u32F0\u7E20\u1D6C\u2257\x9A\x8E\u1940\u0FC3\u6318\u6E4E\u4083\xA6\u02B5\u27F8\u4CFE\u4793\u3D85\x94\u62F4\u1C64\u27C8\u16C1\u2A68\u3039\u6EA4\u01D1\\x40\u4FEB\u48E5\u014E\u6008\u01B0\u09D0\u3D91\u2BA0\u03A3\u5493\u0C10\xD8\u0649\u7D86\u502E\u4FC3\u6047\u0390\u0202\u3DDF\u0B24\u4CAD\u2148\u3C2D\u7A57\u74A0\u139C\u4DC5\u1222\u6B09\u128A\u4C80\u5761\u4824\u722C\\x5f\u1FE2\u3AD4\u43C8\u10A1\u5F29\u6039\u5364\u6FCD\u763D\u12C5\u2D53\u1890\u0C17\u0540\u0EC8\u1820\u76A0\u18E5\u5038\u743F\u0179\u7EBA\u668A\u23DE\u1134\u26A6\u1B10\u7F4E\u1AA0\u2BF7\u4824\u1EDC\u3F40\u1FDF\u0F5A\u5300\u5A5C\u4822\u706C\u61F0\u0450\u1F92\u1CE0\u3E27\u203B\u7CB2\u4D60\u19B8\u145D\u22A0\u357F\u6348\u0219\u608B\u0300\u78A2\u24CD\u5528\u0945\u2072\u07BB\u1B21\u31B8\u042D\u7CBE\u5100\u2BC9\u1829\u08D0\u1645\u4438\u58E4\u2374\u06E0\u36AC\u5A5F\u343D\u6FD6\u60EC\u2700\u0546\u6DBF\u3028\u771B\u7F05\u03C8\u0230\u3DAE\u06F4\u1C2C\u6EB8\u37B7\u0308\u0368\u380C\u1C29\u301E\u0FE4\u2115\u0A22\u3CAF\u0A5C\u0809\u1038\u1FA5\u6773\u06A8\u0164\u69EB\u64D4\u04AF\u1473\u1A12\u38A8\u2723\u1C14\u466C\u4020\u3050\u6055\u5CC8\u014C\u62C3\u0690\u0610\u03EC\u3E20\u6221\u4260\u4127\u302F\u57E9\u2041\u5F78\u531E\u7D31\u012C\u01AE\\x45\u0670\u3434\u7301\u2521\u2317\u5B44\u2420\u213C\u563E\u386A\u014A\u01A8\u0272\u2A6C\u0F20\u4121\u2222\u1043\u04A4\u2C06\u3034\u0328\u5B85\u3B0E\u2144\u03A7\u5642\u0AA0\u085F\u2D6A\u1023\u4263\u402C\u0DA0\u167D\u5040\u086F\\x36\u584E\u0240\u0E60\u114D\u0D20\u67BE\u4C23\u0C23\u302E\u37C8\u7FED\u4054\u1B92\u6EB9\u39C1\u010E\u778A\u6E81\u0DE0\u101C\u3AB5\u4B19\u4615\u3028\u302A\u1B24\u7578\u3621\xF8\u0331\u745A\u64C0\u2920\u5AFC\u72A0\u6CC0\u6027\u2865\u4966\u6856\u087C\u108C\u2C5A\u4286\u0729\u6226\u1914\u041E\u6604\u34F3\u3862\u620D\u7564\u5451\u6E8E\u1AB5\u0905\u7134\u0660\\x20\u349E\u1832\u1A0D\u2C21\u5AD7\u442D\u637D\u7C5F\u076A\u44D5\u69A7\u5899\u50E2\u2EF1\u1D5C\u10E0\u6D01\u0768\u3E26\u7C80\u1FAF\u4FC2\u1151\u6CD1\u3067\u514B\u65E0\u0450\u127A\u06B0\u6490\u1FDB\u142B\u2DEC\u452E\u6076\u7E56\u18ED\u027C\u06C8\u0824\u4EC0\u20D7\u26A1\u0AFC\u4922\u7CC2\u6908\u6830\u2233\u1B45\u16ED\u015C\u0134\u0333\u0FC1\u1728\u16B4\u33A1\u3052\u6CE4\u3645\u43ED\u3EDB\u2875\u608C\u1D0E\u0AAE\u3722\u29CA\u17EA\u3312\u75E1\u3F23\u5F91\u683A\u603B\u2324\\x33\u2064\u1E02\u031C\u07B4\u2A60\u1DF1\u0D64\u6C21\u2BAB\u2163\u8000\u51F8\u4455\u60CF\u48BF\u1217\u1976\u0124\u08E0\xA6\u1760\u081C\u31E0\u2876\u1828\u2D23\u545F\u439C\u5916\u64C2\u027D\u22E4\u0F4A\u0C20\u43A0\u2BA5\u6A01\u5626\u482A\u5C3B\u6748\u4D38\u219C\u5564\u07A8\u092F\u6880\u14C0\u34A0\u78A0\u42E1\u5F17\u0D27\u4334\u03C3\\x7d\u6CCB\u6C74\x81\u3368\u0DD8\u0750\u17C4\u7621\u2742\u4694\u6027\u682D\u603E\u4B3E\u40DB\u7020\u2BCC\u1592\u445F\u5750\u34A0\u2381\u3F22\u53A7\u2864\u103B\u6843\u745E\u408E\u7C26\\x7c\u0390\u0440\u0750\u0970\u783D\u0219\u70E5\u552B\\x75\u48C5\\x60\u105B\u1080\u02E7\u40CD\u4E2D\u4206\u33A1\u1523\u2825\u21E1\u5125\u5029\u204A\u705D\u4050\u01AC\u028C\u01E8\u0CAF\u4271\u2CF0\u7600\u5898\u30B3\u4BEE\u2C6B\u07C3\u5156\u0AF4\u24A6\xE4\u047B\u5000\u0270\u278A\u6FA9\u2920\u0221\u7A26\u76FB\u652F\u403C\u6065\\x54\u5106\u04DE\u4FA0\u1D78\u1492\u6B6C\u26A4\u38D0\u7A25\u0832\u4038\u40AA\u68AC\u546F\u612C\u040D\u2534\u0A40\u1140\u37FD\u0512\u4132\u4421\u47B9\u49B1\u242C\u5E79\u3D28\u4B31\u1210\u0A64\u59C0\u3360\u4234\u7EC9\u7624\u1825\u502A\u1050\u618D\u02BF\u1440\u61D8\u03D6\u29E3\u5460\u08E8\u6A20\u1F52\u1627\u202E\u1E3C\u2E58\u4071\u20D8\u5948\\x37\u01DD\u06FB\u49B8\u2A20\u1623\u6218\u7A94\u1F8D\u545D\u5036\u1539\u7850\u01E3\u43C0\\x38\u0970\u16AD\u0FA0\u2D21\u7F4B\u5433\u242A\u5EEB\u4423\u696E\xEE\xB2\u63FA\u6408\u0C60\u5438\u0666\u61A5\u304A\u7020\u0ECB\u66A3\u5869\u129E\xBC\u1120\u4178\u5660\u0620\u1AA0\x80\u20C8\u5320\u53B7\u4809\u2971\u2547\u6441\u405B\u4136\u0193\u64EC\u09B0\u0E90\u3E00\u7479\u6C21\u3D74\u6C2E\u1B68\u0D51\u4074\u530C\u6524\u72AA\u03F0\u0880\u1AE4\u0530\u5220\u5CB1\u12B2\u05A8\u2037\u0447\x83\xCB\u4113\u51F0\u0473\u4144\u1320\u1E7E\u6C20\u36A0\u2AE5\u296A\u2824\u0E43\u6A8A\u7823\u046E\u0208\u03F8\u025D\u55D9\u0EC0\u6F63\\x60\u4E26\u2F28\u0233\u4841\u407A\u287C\u7C74\xB5\u558E\u4240\u18E0\u3A8C\u6020\u0121\u73B2\u2940\u57E0\u19A4\u2123\u2026\u588C\u29EA\u0780\u0240\u0B34\u1760\u6921\u0E61\u4AE0\u542B\u5B62\u0F22\u507D\u58A5\u7582\u1BB2\x90\u0DD7\u5CC0\u0A96\u3020\u1E03\u3820\u2CA1\u2C7F\u2DAE\u3532\u5A72\u50D0\u7ACA\u27BA\u27A7\u40AF\u1DA0\u1D6D\u7478\u8011\u5439\u342C\u203B\u408E\x8F\u7D32\u5B6F\u4688\u0186\u19E4\u29FC\u4A8D\u6C8B\u2426\u202D\u7E67\u1AA9\u032F\u4064\u6DA8\u43CD\u35E0\u0AD0\u04A4\u28A2\u30E2\u24A2\u2328\u0425\u20F9\u283D\\x59\u4200\u6D7C\u10DF\u3308\u0E04\u3D60\u0DC0\u6159\u1421\u50A3\u1C2C\u683E\u0C41\u456C\xEA\u09CA\u23C7\u0390\u0CD7\u4B9E\u1A60\u65A9\u1BB3\u4BE2\u4F08\u7FF2\u5038\x9A\u1890\u441C\u2C00\u081D\u0389\u11E6\u19A0\u0EC0\u36A1\u0982\u6E3A\u2024\u546C\u2E25\u4455\u0577\u0375\u64FD\u4220\u1748\u4060\u0335\u2BA0\u61E6\u382A\u23FD\u17CE\u099C\u12A4\u2449\u03B0\u06E0\u059D\u516A\u3A9C\xB1\u3E03\u1B2C\u0705\u757A\u16CC\u4F7A\u5674\u248B\u58B9\u7118\u0A28\u50A0\u32F2\u6F74\u4D72\u2D81\u3632\\x2d\u5878\u402E\u61B9\u65DB\u058B\u0304\u2E30\x90\u6601\u7421\u43A5\u1425\u0E3C\\x3c\u3884\u7109\u61D3\u4407\u072A\u61D4\u04D8\u2598\u3020\u5149\u40F0\u4986\u5FAF\u2D20\u1060\u5D9E\u72F1\u4158\u03DA\u0F48\u0F6B\u0500\u3A31\u1ADC\u0321\u3A24\u71C7\u2930\u1F59\u7B7E\u369C\u1C50\u796E\u5357\u698B\u4FB1\u2D2E\u4E60\u0E66\u1002\u0822\u5BEB\u4436\u407C\u10CE\u59CA\u7AE8\u0350\u0FA0\u0EA2\u27B1\u2EA1\u7DFA\u0517\u1AA2\u36F4\u75C4\u4740\u48BE\u4328\u12C9\u62DF\u2411\u4920\u33CC\u3F21\u1199\u5661\u4026\u656D\u1331\u2053\u708B\u2508\u7182\u080E\u24A0\u1350\u2FE0\u0BA1\u28E3\u6420\u7C22\u5022\u2439\u4052\u04DC\xEA\u4148\\x39\u0F05\u0CE0\u2120\u58C8\u3A22\u27C1\u7A68\u12AF\u0450\u729C\u6875\u64E8\u6AE4\u0118\x81\u19C0\u3C60\u4321\u03E2\u1E20\u0E02\u3820\u3222\u0943\u749D\u5198\u38B5\u54ED\u65D8\u27E7\u07AA\u4A23\u3F20\u3385\u3029\u4370\u7C2E\u6182\u40A0\u21E8\u0329\u60D8\u0A60\u1AA0\u1F60\u0759\u0A8B\u61E6\u614A\u1A40\x9F\u70BE\u1862\u0118\u4025\u51EC\u0F04\u170C\u2CB4\u05C2\u5021\u3D71\u0229\u0330\u0CC5\u2893\u7842\u7CEC\u016A\u4238\u0A04\u5E1C\u06E1\u6605\u16A2\u6EE6\u60C1\u78B3\u5CDC\u20DD\u030D\u04C8\u0183\u4038\u0A00\u0929\u1B38\u1D6D\u5541\u0884\u5034\u2833\u1838\u4020\u4060\u616A\u0A30\u0351\u2620\u3626\u2E20\u5BD1\u52A2\u232E\u61E3\u5EA5\u244A\u7456\x91\u448B\u479E\u0423\u0700\u0DB8\u387A\u6490\u589B\u39E7\u740E\u79A1\u6E28\u405C\u3823\u0C86\u6066\u311B\u01A3\u55A8\u59A0\u0E91\u2793\xF2\u6FE8\u6C7C\u7C2A\u1596\u18D4\u1CAB\u48E0\u0ED8\u16CF\u59E4\u1130\u263C\u16C3\u5437\u01C4\u26EF\u3023\u7853\u11C0\u3C7E\u4A9C\u2723\u2908\u5540\u71C8\u2C5D\u55E6\u6BAF\u48C9\u622D\u38D9\u083A\u4311\u01D0\u4816\u45A8\u0190\u1930\u28B8\u7054\u112A\u1BF1\u2168\u1EAA\u5824\u2729\u28F1\u1C6F\u0185\u2321\u210C\u451F\u27DE\u7851\u5C23\u1C24\u7829\u31E2\u4C9E\u68F6\u613F\u09AE\u4696\u0B5A\u1BF8\u3308\u4844\u6BC3\u3767\u6EAC\u3D3F\u102A\u386C\u70A3\u6ACF\u2337\u074E\u0B1A\u1112\u58EE\u2F2E\u6991\u1E20\u01AC\u2C24\u0647\u3948\u1910\u31B0\u6365\u0363\u0DA6\u1388\u1E38\u5790\u7620\u1A8B\u18A2\u2121\u383B\u3470\u618B\u08A4\\x40\u0230\u07E6\u0B7E\u5E60\u2D5C\u5FD5\u08A3\u4C92\u6766\u43F7\u249C\u2034\u31E4\\x21\u23C3\u0CC9\u4284\u38AF\u3120\u1001\u2823\u7844\u7027\u5A33\u107F\u344D\u0EBE\u387D\u01F0\u06BA\u02B7\u1728\u3AA0\u3EA0\u2A21\u4294\u1805\u33ED\u5823\u2046\u1C52\u415C\u0363\u32A8\u09D0\u0E75\u2B00\u7AE9\u7E99\u2310\u7523\u314E\u6292\u04AB\u70C8\u12A5\u06BF\u7244\u0CDC\u4FC0\u20BC\u5C41\u0EF9\u3F12\u498D\u67B6\u7BA8\u2081\u10BB\x9B\u4483\u064D\u6030\u0B01\u3ACA\u55E5\u3F21\u5182\u322F\u014A\u13CD\u44A0\u4111\u01C6\u02C0\u0698\u0402\u56D9\u2660\u52A0\u0A90\u4C63\u75A3\\x2f\u305B\u2072\u408B\u10A4\u0301\u0800\u6971\u1C3B\u36AC\u2D24\u225B\u6427\u302B\u0E29\u673A\u3900\u7B0E\u392C\u2C19\u5378\u47C0\u162A\u2350\u3D25\u4BE9\u7126\u1AAA\u5C6B\u23A4\u58BE\u448D\u403A\u217A\u150D\u2D2D\u5130\u1BA0\u0671\u4421\u1D20\u5C28\u6A34\u653F\u2A4E\u2E69\u021B\u5097\xBB\u62BC\u2341\u15E8\u35A0\u5F63\u38F6\u6723\u26B1\u0531\u2116\u10C2\u1CB9\u7876\u661E\u64B8\u2849\u2A01\u4B50\u092A\u54C7\u2969\u52B9\u0FC2\u64AF\u40BC\u41A6\u20A0\u0786\u1BC8\u268F\u04B0\u1475\u3964\u5964\u0F4E\u1954\u26CB\\x25\u31AC\u0124\u536E\u7119\u47C5\u4391\u33A8\u7204\u4848\u18F4\u2229\u2034\u773E\u60D7\u2CC5\u01EB\u4834\u4F09\u28F8\u4025\u3951\u45A0\u5139\u4C20\u7F21\u35BD\u5CA6\u7182\u0A6E\u38D4\u267A\u471F\u6A23\u5329\u3E8A\u1261\u4822\u6784\u102A\u2026\u1C46\u1F29\u31D4\u056A\u2675\u6300\u501A\u0400\u108C\u7F39\u4F73\u7D42\u14B3\u7278\u306F\u496E\u20C2\u34B2\u01CC\u0410\u0F9A\u0D80\u10B8\u55E1\u1C70\u6411\u72B2\u382F\u4A88\u1F94\u108F\u4432\u78FA\u22B7\u6AAC\u4940\u2AC8\u7220\u51D1\u01B3\u1A26\u3855\u3048\u779F\u49DC\u5352\u01B4\u4E20\\x4a\u2B60\u3EE4\u3720\u5BC3\u2826\u1826\u5BB4\u37D0\u4881\u0EC2\u1CF2\u4A96\u5118\u0118\u0CAA\u01E1\u0BA0\u0E25\u0E84\u1D8A\u2830\u1BDE\u6B52\u5EE7\u6D28\u0214\u04BE\u6800\u0D7A\u0D52\u04D9\\x61\u30A7\u0B2D\u067D\u5025\u043E\u6CB8\u40DA\u017A\u0F16\u6737\u5350\u2960\u0325\u1992\u7EC3\u3820\u455A\u6097\\x71\u3E4E\u35F8\xE0\u075B\u2DA2\u418A\u1AE0\u1C20\u53E3\u08A0\u10C9\u28BC\u4DB6\u3510\u3659\u5342\u7ADF\u703D\u2DC3\u0755\u2089\u2C5C\u5E1A\u10D1\u5C02\u502C\u0246\u6097\u4D14\u6156\u47FA\u2382\u6C50\u0B6D\u04E9\u6991\u2EC3\u3073\u3B29\u4038\u302A\u0255\u40D1\u52B4\u03E6\u4C7A\u2BD0\u50F6\u37F6\u6F61\u1011\u2F2C\u2225\u1DE3\u704B\\x29\u1034\u142C\u13C7\u61B8\u0702\u01A8\u3DC9\u6E20\u2222\u6033\u2685\u082D\u755B\u0682\u489A\u6128\u0208\u17C9\u0243\u5B66\u3E88\u1A88\u3E52\u0610\u3EBB\u783E\u4051\u088A\xEE\u6D85\u62BD\u6378\u05F0\u0739\u2AD6\u53D8\u39C9\u2334\u6742\u432E\u287A\u7B96\u6890\u20D8\u625E\u06A5\u02B1\u048C\u29FC\u68D4\u3700\u7C86\u60C3\u186E\u46B2\u056F\u58B1\u50A6\u0268\u0330\u0DF0\u42AB\u35AE\u4445\u62C0\u292C\u720A\u4032\u7882\u1033\u2A8E\u0109\u3182\u0664\u06B6\u15D7\u0BBA\u6735\u74AA\u4791\u06BC\u6929\u34D9\u3934\u29B8\u01BC\u22B4\u0640\u0874\u4D7C\u0738\u69C9\u1920\u4E22\u0828\u78F4\u405D\u08DF\\x5f\u3480\u03B6\u0CE7\u6CBA\u4300\u124A\u7A89\u1DB1\u1427\u7E32\u0426\u6822\u7E76\u3AC3\u5352\u03AE\u4E40\u0328\xDF\u347A\u7620\u7B20\u0A50\u51A6\u5823\u5868\\x42\u40ED\\x78\u43C8\u53A4\u66C8\u416A\u321E\u28B3\u6845\u6815\u602E\u1C68\u3048\u5156\\x4a\u5DB3\u32CE\u056B\u455A\u3961\u01BA\u44B5\u191A\u3D03\u4DC9\u2039\u3DB6\u106D\u4038\u6CE7\u5B7D\u67DF\u6432\u3E6C\u7A20\u4921\u707B\u1A27\u4435\u7232\u1267\u5F53\u085D\u20C8\u787C\u53C4\u179E\u0670\u2609\u57B5\u6C21\u7016\u092C\u2951\u027E\u407D\u219D\u58A4\u69A2\u1281\u6EF0\u1A71\u10A0\u0D4D\u185B\u562F\u0F42\u292A\u2660\u758E\u1B1A\u18B4\u02D7\u0270\u0750\u33F0\u1ED2\u14F9\u3F8A\u3217\u59B2\u4B4C\u60C2\u552B\u4C96\u7D84\u0354\u0500\u02AB\u0858\u186E\u6F03\u0D2A\u3E63\u684B\u4038\u3139\u2775\u605D\u556B\u61B3\u7120\u0435\u5CC2\u0D84\u3B22\u2439\u496B\u6848\u5366\x9B\u6359\u2D1B\u6442\u0265\u73A9\u0246\u2C6C\u6B00\u01C1\u5C22\u2424\u3022\u5330\u5750\u0D67\u2970\u0167\u42E4\u05B0\u0E70\u05F4\u22C0\u7620\u6A1B\u76EC\u3D29\u7735\u403B\u34D9\u59F0\u6CA4\u02CE\u0478\u04D3\u0560\u133C\u7C80\u0102\u70A3\u382E\u15AF\u7134\u2CB1\u387F\u038D\u24C6\u17DE\u4038\u13B0\u31B6\u0988\u5E1A\u0C26\u0BAE\u3635\u3836\u7B23\u296C\u3190\u0106\u0440\u0388\u1DCC\u50A0\u2A65\u0725\u66E9\u4100\u0740\u3426\u3432\u5994\u5551\u69D8\u0466\u0A54\u5E60\u121A\u0760\u4942\u5700\u4EAA\u1645\u5091\\x54\u1EEE\u796A\u5144\u2788\u039E\u12EC\u6CA6\u78A1\u33D3\u2F28\u0220\u505C\u5050\u5C68\u41D8\u01AE\u7188\u06C0\u0568\u2C48\u4F14\u2520\u389B\u4D60\u5CC6\u4839\u7345\u60B4\u7425\u29B1\u4953\u501F\u01F0\u0C00\u37BC\u7818\u44A0\u72B1\u782B\u114A\u0FA5\u6097\u598D\u6422\u0298\u0811\u27D0\u150E\u0B79\u7521\u0B22\u7E22\u5047\u0328\u5052\u1063\x86\u021F\u520C\u05EA\u6FCA\u37F6\u09E0\u69E5\u4E22\u3869\u1DE1\u425B\u4441\u30E7\u1898\u61C6\u5941\u139C\u25A7\u4F56\u17E8\u620C\u39E7\u5733\u71C3\u6868\u5052\u4641\u689A\u0148\x9A\u086C\u6E5C\u30E0\u2720\u4165\u4F6B\u0825\u65A7\u6828\u7942\u772A\u717D\u4244\u435C\u6029\u0998\u2400\u1AFC\u3C10\u20A0\u1644\u2C23\u5231\u0837\u4CAE\u50AF\\x3e\u2982\u02A8\\x66\u4BF4\u2B39\u6240\u0DC1\u3A20\u52E4\u2430\u602A\u6274\x82\u0178\u2208\u058F\u1066\u5DAC\u14BA\u6241\u7822\u4D17\u5109\u1020\u33BE\u7C6A\u40B1\u2860\\x69\u0740\u2230\u12CC\u6AE0\u07D8\u2460\u0A6B\u682B\u76F9\u0E4E\u74D0\x9F\u6956\u4B3B\u250D\u6100\u0465\u2519\u168D\u1420\u6A37\u2E04\u63EF\u7020\u208D\u7962\u548A\u598F\u4E16\u6558\u20FA\u3A19\u1AA5\u5C8B\u0FEA\u1027\u45A0\u4E36\u4758\u2437\u044D\u64F2\u48C3\u6700\u182D\u3BD1\u6C21\u27DB\u0C22\u37A8\u3557\\x49\u208A\u6E69\u0108\u1123\u2801\u6120\u1AC9\u3FD9\u2CE9\u752A\u3A82\u322D\u2541\u3AC7\u2B72\u313F\u1A05\u3923\u0486\u0E5C\u5EA0\u1829\u5002\u2A70\u0227\u1539\u2231\u0842\u1069\u6029\u5D28\u51E1\u0291\u2722\u4EEB\u2798\u5921\u1E21\u57D1\u14E6\u743D\u50B7\u5453\u2021\u0207\u2A17\u634F\u1B30\u02DC\u591A\u3A21\u408A\u4AC6\u0C6A\u4E21\u6031\u3F96\u408A\u3188\u68FF\u30B3\u631B\u5E4F\u17D6\u149C\u3EE1\u4D20\u4EE9\u6C50\u4046\u607C\xA3\u723A\u61AF\u3585\u095D\u44AD\u266E\u42D3\u3644\u4F23\u6C25\u316C\u7538\x92\u598A\u437C\u06EE\u44EE\u2A98\u4F80\u1670\u4514\u17E3\u5130\u1469\u5AA8\u6E3D\\x44\u40BF\u12A2\u25D5\u2230\u0D72\u13F9\u3D44\u0331\u0F20\u4FE9\u5039\u35A3\u4642\u6093\u76E8\u4056\u64A9\u0330\u02C3\u4819\u3B50\u7754\u22A9\u4533\u1827\u3BA0\u66D8\u3D13\u1C80\u016E\u7249\u57FE\u1422\u35A5\u0AB8\u3EF0\u4319\u1666\u2E27\u202C\u029B\u4E38\u4175\u0A04\u4839\u2642\u09FB\u5520\u2489\u6240\u4B79\u4FB5\u3107\u5067\u1168\u2067\u0AB5\u6C9D\u7028\u27FF\u1CDC\u5320\u1232\u2C91\u6536\u0820\u0208\u782E\u36DD\u2282\u58E4\u216E\u052D\u4810\u03DC\u4F42\u4E61\u02F4\u2E8B\u3717\u422A\u1DF0\u4192\u1052\u299F\u2CD2\u31B8\u054E\u2DA2\u4AB6\u1D88\u3348\u4322\u104C\u41B8\u5D70\u3192\u78E4\u3B0F\u60D7\u71F4\u455B\u46EC\xDF\u2F9A\u38C1\u68D3\xC7\u498C\u1620\u1246\u5F65\u452F\u199E\u037D\u40A0\u04FC\u14BB\u2225\u015C\u0140\u32B6\u342E\u41B3\u1E37\u50BF\u2163\u01D2\\x2c\u0392\u2223\u084C\u0D3A\u07C9\u0C38\u30B3\u2C0B\u4224\\x30\u6049\u79F4\u010A\u059C\u0CED\u4AA0\u06C4\u18A0\u3D20\u5508\u3205\u4D24\u2ABA\u07C3\u6850\u10EA\u5209\u02E8\u0368\u04C8\u57A0\u23E0\u5920\u4530\u6033\u75A4\u3936\u285E\\x57\u0218\u01FA\xA8\u0714\u1894\u5F49\u0CD1\u77F9\u0DE6\u2A27\u0BBE\u4BE0\u19BE\u097E\u347F\u6074\u0330\xDF\u0388\u1AA0\u1EE0\u7CC1\u1421\u6826\u4864\u5DEF\u503C\u50E6\xC9\u3604\u06A2\u109A\u47F2\u4B12\u12B0\u4DA1\u6522\u4B34\u7822\u6DF2\u202B\u599C\u2264\u4167\xC1\u2123\u1DD0\u06E6\u17F4\u01B1\u5221\u7803\u5B66\\x36\u7630\u4099\u0169\u0127\u733E\u44C8\u053B\u1CD4\u58A0\u4541\u6501\u1772\u242F\u6F24\u035C\u7063\xBB\u2460\xE9\u153F\u4371\u5BA4\u19E5\u5421\u1822\u1124\u6021\u6D25\u6189\u4987\\x3c\u1164\u1595\u4032\u02B1\u22B0\u42F2\u6920\u5D28\u7A35\u1339\u35FA\u4021\u1488\u1043\u612C\u0266\u45D0\u014C\u0898\u03CC\u4861\u09EB\u1F11\u2829\u0A48\u1229\u769D\u5678\u4026\u0332\u13C0\u04F2\u43EC\u20B4\u0E40\u1DD0\u2E23\u36C8\u0237\u5636\u255F\u68CA\u1086\u0122\u019D\u0F20\u0E70\u5059\u2EA4\u1720\u1F64\u6868\u1E61\u5428\u6C42\u2077\u0528\u0860\u052B\u61E0\u19E0\u2B48\u0740\u69C4\u6CAC\u1BB1\u6A31\u5852\u4946\u7C82\u24E3\u629C\u7170\u0E39\u44F8\u5AE0\u11EC\u67E3\u7024\u4D23\u2530\u4136\u458A\u6907\u2954\u1095\xA4\u033C\u0B18\u2520\u1961\u1D61\u16D3\u1821\u3826\u6347\u6533\u7914\u2040\u0274\\x3e\u061D\u50A0\u1D78\u2034\u1382\u4D6A\u0DAE\u3232\u775F\\x22\u390B\u0511\u0183\u47C6\u0590\u494C\u3032\u0941\u7C21\u616B\u49C3\u046D\u166D\u5737\u7E7B\u3DA6\u208F\u0942\u0B0F\u4FD4\u36B8\u22A1\u1821\u4AA1\u082D\u2031\u2127\u607D\u6C4A\u5074\u01CF\u50FC\u2674\u1B78\u2400\u6D01\u0B90\u7291\u5A24\u2E33\u0D3E\u2386\u71F0\u4BEB\u38B7\u145A\u6BEF\u53D9\u3D42\u0FE1\u0622\u6222\u4025\u7846\u4987\u3C9B\u746D\u20A9\u01B4\u42CC\u0CA0\u021E\u1760\u6123\u5442\u10E0\u30C5\u443D\u2B53\u229E\xDE\u6DEB\u0840\u32CC\u0176\u4368\u2560\u7650\u6006\u6F67\u342B\u0C33\u3622\u6E72\u74BC\u4022\u6AD9\u5670\u2E06\u48C2\u3832\u47B2\u3E52\u3725\u372F\u7129\u2023\u7870\u0E45\u1202\u01D9\u0D7B\u1BC6\u375D\u10D2\u4E50\u0E21\u4AAB\u49C0\u3DFA\u522F\u4080\u68B7\u704E\u2813\u1217\u479C\u1E60\u4B71\u1DE8\u5C63\u3134\u6627\u7021\u0C3F\u2699\u01AE\u610A\u3186\u0B3A\u13B7\u44A9\u1932\u42E3\u1530\u3E21\u1636\u2C42\u586E\u7265\u3937\u3134\u71A4\u42BC\u4440\u0A24\u102E\u13C4\u4268\u4422\u2E46\u3746\\x2d\u5093\u0E42\u0156\u0279\u6231\u0471\u1799\u32CE\u2D55\u3D8B\u312E\u4E7D\u1038\\x33\u02E2\\x44\u19D1\u4893\u45FA\u0CCA\u1EBB\u13DE\\x71\u17A2\u0D60\u7C24\u1D27\u6047\u609A\u70B5\u5149\u1772\u2DC4\u56CF\u5E40\u0345\u1E05\u0B20\u5F67\u0BB9\u59B2\u5690\u7B46\u0106\u0193\u0710\\x52\u6F30\u15FC\u7BA4\u78A0\u7C99\u7221\u1E3D\u424A\u0345\u0CD0\xE2\u7093\u0400\u0733\u0DD8\u15B2\u0E08\u6F3D\u6771\u1860\u402F\u4029\u103C\u2D97\u042E\u01A1\u0310\u0534\u0EAA\u5ECA\u0274\u2440\u2021\u2223\u5F22\u083D\u0C23\u1D91\u3C23\u415C\u10C8\\x38\u0490\u1218\u3140\u1F70\u6EB3\u17C0\u7E2B\u1928\u5DB3\u3041\u44AF\u0217\u3342\u2CC8\u02CE\u16C1\u0624\u24F0\u7D22\u7C95\u354F\u0723\u5D3F\u0F42\u2860\u4A02\u01B1\u05D1\u41AC\u132F\u022A\u4A54\u4920\u7342\u7E0A\u78A9\u203D\u5A5D\\x65\xCF\u0290\u4D8D\u6D68\u129A\u2D70\u6899\u2A51\u7D4D\u1DA3\u0D37\u4043\u798D\u30ED\u019D\u64E5\u06E2\u0E23\u5EF0\u09F0\u6F03\u43DB\u6224\u05A0\u405B\u508A\u0102\\x56\u40EC\u0223\u4640\u081E\u4833\u2774\u4AA1\u2BA1\u5C25\u4E02\u1B41\u5528\u1099\u6956\u40B9\u4C06\u2710\u1190\xB8\u310C\u45FC\u3934\u5EA2\u0C23\u48C4\u2FCA\u7165\u1A95\u51D4\u3031\u4A43\u1C18\u57E9\u190A\u2510\u1439\u5C21\u5F8E\u0B68\u5C91\u089A\u4868\u2597\u6028\u0A38\u5E4C\u51B2\u5CB9\u0EC0\u0A86\u4822\u29B2\u042D\u4AC4\u017C\xB8\u0920\u4312\u404F\u69AB\u4AEF\u3A14\u113C\u1D62\u06E9\u1FBA\u702F\u3ADD\u5AE7\x86\u0204\u06AA\u058F\u1C1A\u1880\u3EAA\u47E1\u4BE9\u2531\u4A47\u506D\u07A7\u20D2\u5E85\u6036\u1093\u43BE\u44FB\u54F0\u33E5\u17C1\u2821\u29AD\u1A24\u4BFF\u6492\u168A\xA1\u616D\u02A9\u03D2\u58E0\u01EA\u464C\u4420\u39A2\u484C\u6022\u3838\u54A8\u0A23\u3142\u7159\u0219\u282A\u5ED8\u39A2\u6891\u4CDC\u6175\u08B0\u4570\u2C48\u586C\u2AF2\u6205\u424A\u5845\u28A3\u0CB5\u34B0\u0F68\u74CA\u7D22\u32CC\u2073\u4ADC\u5A9E\u2AE0\u0C65\u2A23\u1AD3\u5701\u64B0\u1CCA\u56A0\u4ACB\u3406\u4C25\u5579\u1824\u4E56\\x31\u3661\u31CD\u685C\u5507\u4A32\u0E10\u7A48\u4FE3\u6823\u3F29\u324F\u0C3B\\x4f\u607E\u461C\u0105\u5654\u60AA\u4DA0\u18E0\u34BC\u1CE1\u6DF7\u6ACD\u0E32\u5BFA\u0829\u450E\xBC\u01BB\u026D\u0EA0\u02C0\u073C\u0399\u0FC0\u12E2\u3620\u4139\u1A49\u2045\u4028\u7A94\u019A\u694E\u0350\u025E\u2620\u242E\u5725\u1C44\u2655\u4BAF\u6023\u452B\u5279\u1197\u55A6\u6A49\u0E72\u1AC4\u3D68\u66B1\u7632\u6369\u4AD6\u1223\u44ED\u3050\u6050\u3142\xC8\u1278\u02F0\u0EF3\u1709\u21A0\u0364\u498A\u1CA2\u362C\u3A30\u0C90\x84\u6078\u41F3\u22D4\u71A5\u42EC\u0925\u08AE\u3DA1\u57D1\u4786\u2529\u1AB4\u7BDE\u298E\xB7\u2A26\u0286\u02F6\u09B0\u1820\u0399\u6CA8\u3575\u7A25\u40C7\u7024\u02CE\u5784\u2D0C\u0173\u65A8\u02A8\u66D0\u1B20\u3978\u72CD\u78A8\u1050\u0D61\u28DE\u552B\u0196\u3605\u2C52\u5A30\u0186\u4852\u245A\u05E0\u1B84\u6CC0\u6523\u0820\u517A\u569B\\x3d\u3A3F\u1E0A\u428F\u2638\u1008\u5B9E\u1820\u5FC8\u7F60\u2355\u4922\u17F7\u0442\u1072\u3219\u1848\u4410\u06DD\u0CE0\u3000\u4015\u1773\u0E73\u45CB\u676A\u677E\u2058\u2D42\u211C\u01AC\xE0\u0127\u0A84\u0268\u20E8\u1E81\u5A31\u7B22\u142E\u603E\u2023\u7869\xE6\u0182\u03F5\u057E\u416A\u4A31\u12B2\u1060\u1C60\u4E60\u7BA2\u5232\u5046\u3D48\u10C5\u01E8\\x56\u47DF\u6A48\u1352\u7C80\u78A0\u7C40\u3B66\u7022\u71C4\u2020\u2051\u54DF\u017E\u60EC\u411A\u6F9A\u584A\u2408\u3D20\u32A1\u05C4\u1029\u4C3B\u71BF\xA5\u12AB\\x5b\u409C\u07A8\u041A\u0440\u085A\u22A1\u3164\u6D21\u5689\u582F\u7130\u52B9\u20AE\u7360\u310F\u0788\u0F9F\u06F0\u0C20\u4F21\u1E22\u7827\u603A\u31DB\u52D2\u1082\u109D\u01F9\u612A\u54D0\u4E60\u096C\u39B6\u4DA1\u2A51\u7A27\u4E0E\u3B59\\x5d\u671B\u4DE2\u1B03\u23E7\u723E\u4100\u1660\u3CF8\u6851\u60E9\u7D27\u1029\u082D\u103F\u2020\u4824\u1034\u4BF9\u228C\u5BBA\u167A\u4DA8\u3D20\u55E3\u4A25\u142A\u28BA\u6144\\x22\u019A\u0987\u0136\u4594\u42E1\xD2\u5040\u5320\u3133\u6771\u782F\u6030\u7F50\u2F95\u750B\u1D70\u0286\u0652\u4F54\u4FA5\u3A40\u6982\u4A21\u4CB3\u0A27\u5026\u4DA0\u3286\u0D61\u31F5\u4397\u0450\u04F8\u0B14\u7A20\u5A61\u7153\u0823\\x2d\u2A7C\u5054\u6C28\u50E4\u4038\u510A\u0248\xAB\u2860\u1DE0\u5579\u1B21\u2027\u1B65\u683D\u3C4E\u5774\\x4f\u0582\u18A0\u0700\u0EFD\u3B9C\u45D1\u5EB5\u4421\u2AB1\u4CF2\u3A6F\u084B\u6067\u60CD\u7C4E\u03A2\u55A7\u2682\u1930\u2FA5\u7F2B\u36F4\u5597\u5F00\u1044\u22A1\u379A\u2263\\x4b\u2A67\u049F\u6D70\u5720\u36C0\u69FD\u3E00\u236A\u46BC\u13A4\u624D\u049D\u330C\u3903\u0A7C\u444D\u09E3\u0790\u04FE\u5C41\u0B21\u6121\u453B\u5631\u2A59\u3860\u7081\u4D4A\u02FA\u13AE\u57B0\u015A\u7CA1\u10A0\u12E0\u4025\u60AB\u3646\u12AA\u16FA\u1CDE\u1D7D\u1700\u4788\u2674\u31D1\u3220\u4460\u1380\u4124\u6425\u04DA\u3E79\u4079\u7989\u4D35\u624F\u4E7F\u196D\u4D9C\u5D64\u703C\u5A61\u0920\u7C76\u5828\u5022\u178E\u4A11\u019D\u1BC8\u2911\u2998\u36A7\u16AE\u79DC\u01E2\u656C\u68AC\u633B\u4036\u702C\u308E\u01B0\u03C1\u2230\u0969\u4262\u6F5C\u0990\u4521\u054D\u2E49\u464D\u3D2E\u7F5D\u02FF\u6247\u47F7\u0B3A\u54FC\u3350\u27E0\u3835\u0421\u4283\u050B\u212E\u7E37\u2AB5\u4504\u3205\u5635\u640D\u047C\u4182\u0AC4\u773C\u5A21\u1788\u492B\u1550\u64D5\u6D1A\u38FC\u015C\u011A\u4160\u0F89\xF1\u0820\u7D64\u0E91\u3A26\u2229\u2B32\u6270\u2115\u22C8\xD1\u0312\u67E7\u1470\u1660\u03A0\u0319\u79D1\u1A25\u163E\u61A5\u0F51\u4066\u4034\u5365\u0206\u61A6\u1EF0\u072E\u619C\u4379\u4255\u5C20\u5621\u5C3E\u37BB\u0B73\u02E7\u09D5\u0701\u0789\u1255\u08EA\u04B0\u5D41\u1822\u4B2B\u6423\u1861\u57C2\u76AB\u40EB\u5AF6\xA1\u6E64\u0627\u222E\u403D\u54D1\u48A2\u2AE9\u4A4E\u2E64\u0A52\u20E2\xBC\u7D0D\u05C8\u22A8\u093A\u329B\u21CC\u55EA\u2D65\u6E29\u4025\u4A72\u5050\u4831\u51C3\u6BD2\u7BAF\u2BEC\u1664\u4038\u1700\u4B60\u3E23\u3695\u19BA\u667A\u24DB\u3876\u3682\u2402\u02D0\u051B\u4A86\u19BA\u1640\u67E9\u3F23\u4D67\u6FBC\u3DE3\u0B55\\x66\u747A\u01DD\u60E7\u6482\u4F15\u2811\u03CC\u791D\u3C23\u2164\u502D\u7522\u4172\u16AC\u428F\u449A\u53D1\u15DD\u64B0\u1680\u2030\u50A9\u2483\u2B11\u60A7\u7039\u2143\u6086\u0E0D\u01A0\u0166\u4891\u4242\u2C64\u4E80\u2440\u66A2\u73C4\u182E\u5023\u3D4D\u5922\u6ED7\u41B1\u172C\u02A0\u6988\u11D1\u0940\u26FD\u1222\u70A0\u0DCA\u2832\u503C\u654E\u7565\\x5a\u615F\u35AA\u6158\u32B1\u03A0\u6BD8\u0BAA\u730B\u2C22\u0822\u7051\u1974\xA5\u5189\u02FC\u6F3D\u29F2\u0684\u39AC\u6FC8\u6972\u4A20\u5775\u62BF\u2271\u0F43\u4D1C\u3271\u7889\u07C3\u0714\u18A8\u3E51\u01A1\u7127\u6224\u7827\u7E56\u46D9\u2072\xB9\u6572\u6976\u01ED\u2ACA\u1D5C\u2F92\u1D48\u6222\u2AEC\u3649\u7026\\x43\u7099\u1904\u10A7\u4B26\u6BBA\u0EE0\u02F4\u6C9E\u558B\u7C62\u0565\u70A9\u6031\u3025\u1828\u39EC\u40E1\u053E\u5495\u607C\u0560\u27A0\u7221\u1521\u2B24\u7BB9\u3D47\u7060\u6821\u4056\u6550\u531C\u67FD\u087A\u5C3E\u4FE1\u4A10\u06A7\u3823\u0A0B\u1020\u0E58\u4741\u29D5\u1B73\u6398\u1548\u0521\u0480\u0AFE\u1DDC\u2A95\u550E\u46FC\u4CEB\u279E\u4C7D\u1DD8\u0318\u78DC\u28CE\u5711\u2794\u27E5\u6605\u152A\u0427\u4423\u5E2E\u3036\u70AF\u0A41\u012C\xDB\u60E2\u2918\u0C59\u2564\u563C\u53CB\\x27\u436C\u72D5\u383D\\x49\u2AAF\u402C\u7786\u0F2A\u5287\u2402\u0490\u5AA3\u1696\u386D\u0A23\u33DF\u5D84\u392D\u1078\u42BC\u77DC\u22D5\u03B1\u06F0\u2AF0\u1CE1\u0768\u2923\u4E3A\u3C31\u4030\u4507\u1DC5\u019D\u0588\u0780\u0E6E\u59FB\u05E0\u45A0\u2B99\u42E8\u6175\u3931\u0846\u4981\u4063\u69CE\u5A34\u43DA\u1658\u3D60\u0501\u6A33\u53A6\u7067\u062B\u4B30\u40A7\u0B70\u1312\u1D97\u5372\u5694\u4EA0\u59EC\u3FF6\u7728\u4521\u42C5\u6BE1\u1AB4\u0A3B\u5024\u2E3F\u53AD\u4544\u6D10\u0940\u1D74\u6400\u2E15\u076B\u7372\u6200\u47C2\u0F80\u505E\u64EB\u64D4\u02CF\u070E\u1097\u3916\u69FE\u0B80\u3D59\u4B71\u6627\u02E3\u6026\u08CF\u0483\u6D4C\u711C\u0A38\u0DDB\u3340\u0C3D\u385B\u5D22\u110C\u6625\u4428\u2037\u206C\u1D1C\u5CAC\u62E1\u44B0\u032F\u2066\u32E4\u1839\u15B0\u0FA5\u4E04\u40A4\u4783\u6D92\u1DA3\u50C8\u7601\u6E31\u5EFA\u1714\u1960\u6321\u6A33\u3824\u182B\u102C\u2023\u409D\u728D\u0D90\u4329\\x48\u2DE7\u37AE\u4D8A\u0DA5\u35E0\u59A6\u10E5\u0C7E\u7A90\u5F7A\u20B9\u40E0\u02E8\x81\u2818\u121F\u24FD\u1E01\u0621\u0AC3\u6B89\u62CF\u6A92\u4C67\u60E0\u0204\x89\u027A\u27E7\u534E\u0BC5\u6220\u6B23\u7B2B\u6986\u0BF5\u4047\u409E\u14D8\u2061\u08A3\u4124\u0220\u04C6\u12A0\u3E64\u7204\u3731\u0DAE\u1E74\u405C\u2035\u720E\u0118\u7B14\u03FE\u6C64\u113C\u08AE\u1520\u6F69\u5C22\u78BA\u7259\\x25\u4AC2\u3C40\xC7\u22BA\u2167\u4D00\u1156\u11BD\u2C61\u7F13\u04A5\u04A2\u11FD\u3094\u409E\u0386\u01F1\u5B00\u0358\u07AE\u2857\u3E78\u4611\u1E21\u590A\u0549\u0DE1\u1749\u7499\u2C24\u70EB\u56DC\u2DA8\u0C47\u5028\u28BE\u7CF1\u0FA3\xF3\u2F61\u04C2\u106E\u24FF\u304F\u7C61\u018F\u57E8\u0948\u58A8\u1D8E\u30F3\u0DD8\u72F1\u0B68\u6C36\u4D56\u4257\u7E1E\u1162\u5355\u5658\u12B8\u451C\u6CA0\u0FB9\u37D9\u10B0\u1C39\u6175\u5346\u390A\u5A98\u41C0\u6084\u0C3B\u59E4\u4FE0\u3DE1\u3120\u225B\u28B2\u6204\u1755\u0399\\x54\u128E\u0128\u7AB9\u0FC7\u0C82\u3256\u19E0\u48FC\u5CF9\u2317\u5CF4\u7C66\u6431\u1053\u4063\u3AA1\u633B\u0B1C\u0B7A\u4EAD\u3A84\u0DE4\u30C2\u67B7\u4F4A\u52AD\u5CCA\\x4b\u74D4\u1D1C\u47D2\u064E\u506E\u178B\u2520\u7DCC\u1924\u7D73\u7326\u4B38\u11B2\u2308\u3705\u608B\u2AB8\u6E80\u3D2A\u162A\u0BF8\u53D8\u78E8\u0350\u5225\u46E2\u3C64\\x39\u20F9\u2153\u121E\u3320\u0470\xA1\u4056\u6660\u6223\u3714\u2639\u014E\u303F\u4051\u15C7\u39CE\u055F\u3244\u24A4\u53B0\u36E5\u2B91\u31C3\u4A23\u5065\u0C60\u7AA2\u5199\u2034\u04F6\u7616\u4114\u6722\u5402\u07BA\u4555\u0769\u0F11\u3F62\u103B\u37D2\u6E9B\u7047\u016C\u604A\u6ED0\u1DC3\u0241\u040D\u56B4\u6E20\u08F7\u2E2D\u227B\u02D3\u0C9F\u6A9D\xB2\u03A4\u7650\u0F0C\u3B0E\u6923\u7B55\u1CA1\u70B3\u2C5E\u2099\u409D\u2520\u410B\u4213\u2AE9\u267B\u54A4\u5B66\u3D63\u5828\u7A2A\u7942\u20F5\u6827\u1828\u0762\xF8\u01F4\u6A89\u5390\u0CC3\u5920\u1BB1\u2C5C\u0449\u2C21\u61F3\u5B52\u794F\u4A48\u2300\u6CDB\u3608\u1783\u2320\u2F6B\u2B20\u1DA1\u1420\u3C81\u56C3\u692D\u602B\u3880\u0959\u5443\u0196\u6820\u1C7E\u1A7C\u19A8\u7305\u3FD9\u4BE6\u05EC\u2224\u6B71\u4057\u20C0\u47D3\u5342\u074B\u0B63\u5DDC\u2362\u0A61\u5727\u3A77\u1DCF\u10DF\u07C5\u2CFB\u5878\u3DEC\u354A\u1F58\u3B13\\x60\u472E\u3834\u1A5B\u08A0\u6075\u6863\u25A3\u20DF\u40A7\u0314\x9C\u0733\u0BA2\u0B45\u3BD1\u05C9\u1587\u3A27\u01CA\u3844\u2038\u34DB\u707B\u43F1\u49D8\u1FDD\u64E6\u2FF1\u41E1\u7C65\u4022\u2DA4\u722A\u5872\u405D\u1909\u7893\u5437\u294E\u52CC\u0C16\u1758\u2320\u39E4\u5C62\u1D36\u243B\u72DF\u656D\u6882\u10E4\u35F9\u4072\u1E42\u0272\u0B61\u798D\u23D1\u7DF5\u0E87\u31A3\u56B0\u042B\\x32\u4CD4\u1C6A\u2413\u1192\u4A97\u14EA\u6520\u4BEC\u45AC\u11A5\u0F0A\u14FC\u4039\u6067\u22F4\u47A4\u645F\u06F7\u5146\u2560\u14B9\u55E0\u3286\u0880\u77C0\u4140\u617E\u4036\x8E\u013D\u0923\u057E\u69E0\u13AE\u2520\u0A4D\u6523\u572B\u3967\u56E9\u5E4E\u0D92\u3DC5\u5A07\u0E14\u074A\u0124\u2400\u093A\u3721\u3122\u2425\u7C8A\u5C24\u24BB\u1466\u3473\u5DB2\u53D0\u0587\u4B53\u0481\u27CD\u70D5\u3926\u064E\u5166\u0D5B\u02C8\u7309\u3862\u4B32\u154B\u6B3E\u5F55\u2CA9\u0532\u7E3D\u0623\u1F06\u2025\u306D\u6447\u4065\u29B2\xE1\u63FF\u3268\u0558\u023B\u12A0\u4FD0\u4E89\u6626\u63C0\u183F\u3B2D\u509A\u5517\u30E0\u23A3\u611E\u54C0\u0C1A\u79BA\u19A0\u1B2B\u7FCE\u1FE4\u01D1\u7828\\x53\xC4\u15D8\u23BD\u6750\u0614\u0C3C\u3231\u2671\u6583\u79F3\u4E49\u4EE0\u1276\u4D6F\\x54\u346A\u3298\u050A\u5995\u2F95\u189C\u03A3\u1CA2\u3622\u2202\u43FF\u228F\u5B3B\u3D61\u1342\u3B64\u7349\u1C68\u4B84\u4920\u5DB2\u0123\u5C16\u4827\u66BF\u2195\u54C2\u22A9\u542B\u651E\u490B\u29D6\u1E76\u143C\u08D8\u0952\u5704\u3C28\u1222\u315A\u01B1\u18B8\u011C\u60BF\u103B\u2F68\u4856\u3765\u5011\u0F05\u7421\u4F63\u45EE\u2F4E\u51BF\u7E5D\u63A7\u5BA1\u581B\u2D80\u26D1\u7130\u06C0\u6E33\u3270\\x3b\u67E9\u0446\u307F\u6992\u3D4D\xED\u2C23\u03C9\u3815\u1BF6\u7753\u4A13\u1E2A\u6374\u5BA7\u542F\u49DF\\x6c\xCB\u02D7\u094A\u0FB4\u45AB\u19E0\u3151\u48D1\u3128\u7E25\u2C39\u6506\\x5f\u6E06\u46CB\u1033\u3068\u28E0\u0402\u5340\u7D35\u3AE4\u1234\u3F46\u5EBF\u7FB4\u4F16\x86\u01D8\u23F9\u512E\u447E\u1D27\u38AC\u3FA9\u0BE2\u4556\u1124\u3A27\u603E\u0287\u1A8C\u607F\u459E\u22C8\u513C\u4AA1\u06FC\u2EC7\u0D2A\u31F2\u0C29\u26FB\u52B6\u10E1\u496E\u14CE\u0B83\u103D\u4DDB\u0960\u0C20\u54B1\u6209\u2626\u39A8\u3B33\u450C\u2190\u5B0B\u605C\u68FF\u3590\u55A8\u3138\u4E0A\u6ADC\x99\u6CA1\u5475\u177A\u42B2\u0964\u6C20\u03BE\u5B6D\u2D0A\u3B6E\u01E1\u4FAC\u0485\u0868\u196D\u1DEB\u6899\u0DB4\u5D4F\u65D6\u75FA\u1118\u6156\u1E60\u1337\u0971\u1109\u3940\u41A2\u0C25\u72B0\u74CB\u3A5D\u02C7\u03B1\u3275\u1E42\u069A\u083C\u5133\u3B22\u732E\u4537\u734F\u6BBB\u02D6\\x45\u1DA8\u0276\u2B94\u49AA\u1494\u1949\u66E0\u55EB\u50A1\u188E\u0C27\u1C45\u66A2\u6272\u4268\u7828\u688E\u1293\u2BD4\u7008\u7E8A\u0FE1\u0B22\u5025\u47AF\u2924\u5766\u0932\u5A38\u32AC\u516A\u020A\u34AF\xE9\u1050\u12F3\u2BAA\u4E2E\u0222\u55E4\u0343\u4078\u783C\u6685\u4586\u7642\u01EF\u5162\u413A\u3405\u6820\u6010\u7C62\u20EA\u2A33\u1F3C\u5299\u6AA6\xEE\u4488\u2C39\u2F61\u3829\u28C4\u36B1\u588C\u0F46\u483B\u202F\u369E\\x3b\u20EC\u5391\u5533\u266F\u596E\u459E\u4803\u2791\u7AAB\xB1\u0158\u4456\u4C7A\u2CAF\u5B84\u5218\u0520\u5319\u10B4\u3791\u70D5\u25BA\u0CC4\u6920\u1B3A\u2547\u4664\u0601\u783E\u3389\u4295\u0A04\u7CED\u3B3E\u2260\u1103\u5166\u2848\u3835\u3846\u6087\u21C4\u4920\u329C\u6CEC\u06BB\u4C04\u1820\u4C39\u0D88\u2CE3\u614E\u2E20\u662D\u2432\u4CBE\u1998\u62C3\u1A21\u118C\u0CA9\u0C20\u0641\u17C7\u0C26\u6029\u2B54\u2631\u20BC\u60A2\u10ED\u6518\u51CD\u2CD3\u2419\u3578\u08F0\u0321\u4426\u204E\u4A2B\u667E\u3D85\u76C9\u54E4\u63B4\u05EC\u5C49\u2481\u0702\u0F03\u08A3\u4722\u2729\u5838\u6039\u7741\u5100\u072E\u6269\u43F7\u2F57\u5101\u102A\xBD\u7E21\u0623\u2643\u4675\u1E6A\u6F33\u4A5E\x8D\u01F0\u072E\u3750\u0750\u29E0\u6BCD\u20AE\u0B66\u6234\u2339\u0995\u2999\\x29\u40F4\u5787\u27DE\u4680\u1D75\u27A3\u3BF4\u01B9\u59BE\u112C\u253E\u3AB9\u7A79\u14B5\u45E0\u4550\u02DE\u19D0\u0400\u3C9C\u18C3\u5B6C\u6026\u133F\u5F56\u3BA7\u62F6\u5AC2\u4598\u470C\u1D5A\u3744\u1249\u566A\u68F4\u7D2F\u4045\u692F\u04B4\u0F69\u2D37\u53B8\u3DA8\u439A\u51E3\u2F44\u49E9\u7BE2\u24AA\u6FA8\u3661\u56CE\u11A1\u4938\u34CB\u1163\u385F\u411D\u57C9\u0C64\u087C\u571C\u55A1\u29E9\u55A5\u3965\u3331\u50C1\\x6c\xC9\u3555\u78D3\u6F4E\u55FC\u2BAC\u3F52\u2382\u07D9\u38A4\u7CC2\u11E7\u6F3C\u284A\u6108\u0120\u4129\u1448\u1B30\u4838\u1EE0\u2231\u2A46\u29BE\u320F\u3521\u0C3B\u34AF\u1DA1\u70F2\u6153\u77E4\u0CA4\u7AF8\u0769\u3830\u67AA\u07A5\u6C2B\u603A\u34D2\u6E8A\u65F4\u7BCD\u43BE\u1F4C\u228C\u7FA0\u3C53\u7C87\u276A\u2F4D\u792D\u402A\u2F86\u1A34\\x46\u2A17\u2998\u4E50\u0DB7\u2AB5\u27DD\u05D9\u3861\u6823\u6F8C\u3029\u2B45\\x23\u0A30\u4A6E\u0276\u0498\u101D\u0AC1\u2620\u20B0\u0563\u50F5\u1327\u36C4\u285F\u4B10\u0BB1\u5B47\u5A17\u72FC\u1707\u23BB\u2C60\u4AA8\u53AC\u673C\u50E3\u3EF6\u343D\u6E5D\u030F\u630C\u4746\u5548\u0EB0\u3B25\u7D8E\u4620\u7323\u4C24\u2C2F\u5674\u33D9\u018B\u4F09\u276B\u328C\u0211\u6D74\u4DE0\u332B\u3940\u4E2D\u38A7\u0AAD\u7899\xB5\u3065\u4089\xB0\u4334\u0570\u5578\u05B9\u4420\u6137\u7235\u1395\u7967\u5839\u504D\u7480\u386C\u7D74\u0A27\u4544\u490D\u498B\u0926\u2382\u319A\u623C\u18B0\u4882\u036A\u666C\u2F00\u3CA4\u03B1\u74C3\u6D67\u5EC6\u6A20\u64E4\u2CE1\u7A7F\u13A1\u6636\u46B1\u1083\x8D\u5526\u6495\u06C4\u4B6A\u0100\u48A3\u1336\u4221\u4C7C\u6C2D\u4A2B\u0826\u1C5E\u4056\u40C1\\x23\u0139\u5ADC\u7CDF\u382A\u35A0\u2623\u7DC2\u370F\u1125\u7C25\u60BE\u7E93\u3210\u02DB\u4F3C\u3EBA\u23DA\u2234\u55E1\u3120\u0716\u264C\u6E48\u48A2\u6362\x8D\u736F\u4D41\u04C2\u070D\u5874\u0970\u3226\u7BCB\u0B76\u62BC\u7275\u46DF\u7B10\u1AA5\u4380\u50D7\u723C\u3272\u2669\u6520\u5FA1\u4DF9\u0A27\u6EB8\u18CD\u3045\u2096\u7A94\u01EF\u1163\u7708\u05AB\u5BE0\u5909\u0BA0\u13C4\u5CA6\u67AC\u7A3C\u7507\u3780\\x25\u7BFD\u65F8\u5F22\u429F\u2D1E\u7454\u7F71\u632A\u3927\u2867\u4446\u0A3C\u74A5\u6921\u20D1\u01C4\u0744\u35F0\u08DE\u1640\u3DA1\u5420\u2E62\u77FF\u123D\u3030\u10FE\u4D8D\u109C\u01C4\u0627\u5228\u5F34\u0CC0\u7241\u1E23\u043D\u1836\u4A38\u1171\u102D\u60AA\u4622\u0238\u01F9\u032F\u31FE\u0DC0\u7BEA\u7A83\u6891\u0C2A\u797B\u402F\u7075\u76DE\u72F8\u42B0\u02EA\u444C\u5E93\u3CF2\u2411\u3861\u5221\u7900\u072B\u4424\u5149\u231B\u2D07\u5176\u05D9\u1A43\u5497\u291C\u3405\u43FA\u0C66\u602C\\x36\u2854\u60B1\u011C\u619C\u62CA\u4251\u377F\u2916\u64B4\u6921\u52A3\u1379\\x2a\u4D99\u4FD8\u1B9E\u55E4\u20B0\u28B5\u014D\u15A7\u4600\u5260\u4FB1\u2BA8\u2537\u2E21\u462D\u5A90\u0D5A\u4A70\u4295\u4D4D\u1650\u050A\u7122\u6B8B\u6E54\u1F31\u4015\u1DEF\u795B\u0A67\u65F0\u6C35\u12CA\u268B\u1C11\u3A12\u1C19\u3C50\u4AA9\u3C21\u4A29\u276E\u408E\u6ED2\\x26\u3A2D\u3544\u01EE\u600B\u4E7C\u4BB5\u64A0\u7204\u1A40\u2321\u55AD\u6365\u115B\u206E\u73FC\u35AC\u5228\u4352\u4E5C\u5A0B\u1123\u5873\u70C6\u4824\u41AF\u752C\u44BF\u4074\u6E82\u0189\u2286\u5B3D\u36EC\u4B36\u361A\u0293\u2C05\u6820\u1A04\u4441\u43CA\u42AC\u3351\u2BF4\u0359\u475F\u06E4\u0395\u2320\u7B79\u6B05\u2571\u382E\u3220\\x71\u2869\u50BB\u26B2\u1792\u5A08\u2E1D\u4500\u2A49\u0108\u3824\u6C15\u2548\u5836\u43CC\u35FB\u6B29\u57A0\\x66\u7286\u07B7\u2AFF\u3C21\u2D3C\u1E35\u3C49\u5BFC\u1D90\u6052\u102D\u1ED7\u1100\u02B4\u0780\u0F4D\u0F28\u50D0\u6456\u6C03\u36A3\u4701\\x39\u2787\u1E9C\u2BE5\u1867\u658A\u17B3\u2C64\u1180\u57EC\u2D32\u1D43\xE1\u1C27\u79B8\u1D0C\u208D\u3860\u4028\u0BAC\u4A5A\u0460\u7444\u20A8\u594A\u4322\u1BB3\u2F62\u7B2D\u5A80\u7932\u5D67\u576C\u5184\u52B4\u21C1\u2DE0\u0669\u5571\u6BE1\u5B6C\u5D87\u483B\u4242\u0DBC\u4B81\u5314\\x58\u04E0\u0D00\u1AC9\u1CA9\u6920\u2CCD\u24F8\u73AB\u66B7\u267C\u7937\u70C9\u5489\u7566\u6C77\u19A7\u1B70\u0B38\u0651\u2383\u6220\u5C2B\u7828\u5056\u4D4E\u4068\u078E\u6250\u0422\u09FA\u46AB\u216B\u3A21\u6DEB\u3E26\u0BAA\u136D\u789C\u7B86\u6DB9\u3826\u7A8D\u4613\u0A20\u6368\u0643\u0FA0\u5FCA\u1C97\u1749\u583C\u1C31\u309E\u26C0\u67D1\u28C6\u6148\u2330\u60E4\u46FD\u79B6\u0D92\u35CB\u26E1\u0FEE\u2282\u108C\u5053\u01F4\u037A\u5C08\u0232\u6C6A\u4A38\u5DC9\u3F22\u52C4\u6868\u1460\u13C2\u1095\x94\u105B\u7388\u65E0\u0992\u7B05\u6DEB\u7BB7\u0F4E\u3DA2\u7387\u2938\u779A\u4311\u083B\u113E\u2F13\u704F\u6348\u4A88\u69E1\u7751\u27FB\u6825\u0A84\u2172\u4035\u7D8B\u78A5\u1640\u3759\u45E2\u0EE0\u0536\u29B8\u2DF7\u0211\u6D22\u3029\u703D\\x42\u54D4\u748B\u7A05\u7758\u06F1\u499B\u273B\u2B76\u549C\u4B91\u2664\u55B6\u313B\u46AF\u2896\u1909\u29E0\u68B1\u58D8\u0A01\u2416\u393B\u72B0\u23CE\u7938\u75FB\u10ED\u5C91\u7219\u191A\u302E\u687C\u02A8\u0C44\u1338\u7EE1\u5CF2\u6E22\u29D1\u15C0\u79AC\u1132\u083B\u73EF\u7AC5\u65FF\u7600\u0748\u2664\u09E0\u57B3\u1AEF\u2427\u4824\u2085\u728A\u5242\u206C\u32F7\u6923\u05AC\u6A40\u49B9\u45D3\u3446\u3C85\u0427\u22B1\u0F74\u2BD9\u1ED7\xD8\u2178\u0308\u44C2\u0351\u28B0\u37AE\u2EA4\u2B1B\u69FC\u66D4\u1DEB\u1AB6\u7435\u6A77\u38BC\u54D4\u1773\u3C05\u0742\u71FC\u44AA\u150D\u4C62\u56A6\u5877\u013B\u4049\u4887\u6449\u024B\u5DC9\u0228\u0CB0\u3172\xC6\u6965\u57C1\u544E\u2E3A\u084A\u5DDD\u6AD9\u11A8\u0399\u54BF\u15F0\u0290\u46BA\u7851\u5B98\u6A60\u51A0\u454F\u5038\u4067\u4049\u0B08\\x39\u34AC\u1800\u0BFD\u6470\u5924\u5D21\u14A2\u2F21\u2932\u2038\u1362\u0311\xD4\u0221\u0548\u0FA0\u05D3\u057E\u44B4\u58A2\u5022\u3721\u78B5\u0457\u4145\u5607\u09C7\u2EE8\u0518\u0824\u0D48\u4A4C\u2601\u65E1\u0EA0\u1040\u0E50\u496C\u1D91\u5D71\u0653\u5342\u06F5\u4972\u4670\u2EEC\u1725\u422C\u4C23\u0D4A\u0262\u4850\u604F\x95\u29DA\u63EA\u0F41\u0FA7\u58B8\u29B2\u2821\u6581\u3D73\u0D4A\u6023\u7B4D\u0D61\u2879\u40E4\u02BE\u7511\u474C\u2420\u3B62\u15B7\u3E20\u7221\u43C2\\x22\u7034\\x4d\u6A86\u01F1\u4B57\u4279\u049B\u298A\u6DB8\u6730\u7ED1\u1379\u7E2D\u5536\u3F15\u6CC1\u58A1\u495C\u4CE0\u02EC\u0C58\u592D\u3D60\u4380\u19B1\u3152\u7761\u6166\u38DE\x81\u40C0\u46A9\u2183\u47F3\u3ECC\u70B2\u538E\u5A10\u6E22\u4533\u635B\u6A85\u7E82\u431D\u33D4\u510C\u7162\u2E5D\u68F3\u11A0\u173D\u2F53\u3203\u1376\u782B\u21FA\u16B3\u5482\u4060\u3460\u6A4A\u455B\u4132\u7A56\u6B05\u3807\u18FB\u32ED\u217B\u783E\u5567\u40CA\u0382\\x2c\u4DC4\u010C\u2BA2\x85\u50EB\u7520\u072C\u7AD0\u17F8\u3C27\u65B8\u4B4E\u540B\u3C02\u0D82\u7551\u1C44\u0863\u047E\u28DC\u6921\u2FC3\u7275\u3C3D\u715F\u1D47\u18E1\u4A8D\u0251\u71EB\u29E0\u15A8\u6D2E\u110D\u0F95\u0F09\u402A\u38FC\u551A\\x3a\u7DB6\u16E3\u3945\u65C5\u2B3E\u0F60\u28FE\u314C\u2921\u1AA0\u53FB\u4540\u7068\u116E\u6A9E\u3556\u60DB\u6246\u6918\u1CE2\u4274\u7C20\u2AB6\u3C77\u102B\u78E0\u4F64\u6114\u7E57\u41A7\u4404\u0747\u5187\u0B60\u151E\u1A1D\u6291\u1863\u3FD9\u4733\u1F56\u7021\u0908\u6DBB\u40E0\u0800\u08FC\u445F\u1804\u6EA0\u1219\u2413\u5873\u510A\u10B7\u7236\u1CC4\u0212\u31D0\u1D01\u2D4A\u2968\u7DB8\u8008\u3A3F\u1160\u3823\u7D34\u3977\u3360\u1056\u1C6C\u0393\u6498\u2FB3\u488B\u0D62\u33EC\u441B\u5CBB\u7A80\u30B5\u3848\u7094\u010C\u127C\u25A7\u2E44\u2758\u291D\u154C\u2AE0\u0529\u7C4B\u7429\u4DE2\\x31\u55C5\u45BC\u01C1\u0128\\x21\u0F2E\u58AC\u304B\u54A3\u0F92\u5825\u3824\u2322\u5250\u4897\u70FB\u3C3E\u319D\u7410\u0470\u0940\u3960\u19C7\u0B10\u0424\u149D\u183A\u53C1\u5626\u5094\u013D\u7815\u0932\u23C4\u1F28\u0CD8\u2D89\u4701\u0A23\u6134\u1B6E\u425E\\x40\u7937\u0556\u0323\u682B\u30AA\u0A40\u0BD2\u2121\u246A\u61E8\u10E4\u243B\\x46\u309D\u3288\u3CBC\u12B6\u3788\u050A\u25F4\u52F6\u2216\u2461\u7627\u37A9\u391A\u71E5\u46A9\u1CC9\u3044\u43E7\u7069\u3800\u12A0\u252C\u5C2F\u721B\u6710\u0C28\u1E64\u3C4A\u6E27\\x65\u01EB\u10DD\u60B2\u0530\u1840\u50E0\u0CB3\u16A0\u31A1\xE5\u2C34\u585B\u3C41\u4EBE\u4610\u0228\u2E13\u0ABE\u433D\u3D20\u5A3D\u2C21\u7624\u7028\u0AB6\u7DC7\u7C4A\u464F\u4106\u6A0A\u0D84\u2956\u1660\u2A5B\u4620\u0F04\u52F0\u0422\u1023\u5457\x99\xBD\u4685\u038B\u6C07\u077A\u08BB\u153E\u3670\u30AA\u1732\u0B68\u4438\u5527\u7B1F\u52D8\u40B1\u52E4\u022F\u1816\u2B4C\u2892\u60B4\u36A0\u28FE\u54B4\u16C5\u207B\u410B\u326C\u6431\u2024\u42B4\u74E2\u1FA0\u0B52\u1060\u6298\u79A7\u5525\u185F\u4A32\u6C54\u2080\u4590\u42D2\u10DF\u04DB\u1E44\u0FD5\u02A0\u3107\u255C\u1CC5\u5662\u0963\u5062\u5304\u5778\u0272\u5EC5\u34CD\u257A\u5352\u52C1\u0B6B\u43B6\u6837\u1B59\u082C\u5965\u5969\xE0\u01A9\u4410\u054D\u05F3\u69F2\u79D2\u0ED8\u2EEA\u5DB3\u3B44\\x3d\u6D01\u1946\u012E\u2923\u4DF6\u0416\u4B9B\u3B79\u327C\u0F62\u2A21\\x26\u177E\u0E50\u5A59\u59C2\u333E\u1AF0\u470C\u232F\u20A4\u0687\u427D\u0270\u4023\u7FAA\u646E\u796C\u485F\u6AFF\u66CB\u0B55\u6186\u0B9D\u4BC0\u1FDA\u7922\u36A2\u03F1\u15E7\u5599\u3391\x83\u68E2\u20DB\u7997\u02E0\u0141\u38E0\u3A6E\u0E6F\u5B15\u01EC\u5542\u1028\u76B2\u4090\u292F\u2989\u60F5\u286A\u2002\u4E40\u3220\u4ABA\u6A19\u66ED\u23A8\u3967\u183E\u0830\xF7\u3265\u7BD5\u4A68\u0C64\u070A\u3122\u79DC\u1D63\u2420\u2940\u3CD7\\x47\u1054\u6D94\\x5e\u3BD5\u64E8\u04B9\u7AE1\u0BC5\u3521\u1F82\u4317\u4820\u6BBF\u5F70\u017D\u691C\u25A5\u520E\u1E18\u6459\u6040\u0907\u6378\u25A0\u6028\u7AB8\u42B3\u2D1B\u7E4F\u72AD\u0148\\x60\u0697\u4348\u07BD\u3214\x93\u5A84\u597C\u4EBD\u362B\u0A6A\u0891\u0EF8\u51CE\u0518\u078D\u49E7\u4A40\u22CB\u7C20\u0122\u3926\u61E9\u6ECA\u7740\u0894\u7D01\u6523\u71BE\u76F3\u2C20\u1F83\u52EC\u7987\u2520\u5901\u7C94\u4052\u130B\u6CA8\u66F6\u0FC7\u7B07\u168F\u19D0\u10FC\u0DAE\u6021\u28A8\u4E24\u5F72\u1D13\u4823\u2F83\u76C7\u6D1D\\x60\u0177\u253C\u5AFD\u5EE0\u2261\u1A25\u58AB\u76A3\u7FB7\u124B\u1690\u1A95\u0184\u43E4\u0E83\u2BFA\u2A89\u4109\u1553\u668A\u5A31\u4A29\u5C20\u1040\u3737\u50F0\u351C\u1208\u05E2\u0D5B\u0DDA\u1CC4\u0450\u6299\u21E2\u5893\u3117\u1CBA\u1C8A\u1239\u2209\u6098\u5450\u0530\u4FC0\u19A1\u3EF1\u383F\u18DD\u48AA\u7B4F\u503E\u1204\u20EE\u163D\u41D1\u314C\u0700\u0874\u6231\u2711\u4AA0\u14B1\u73C4\u2EE0\u155B\u6430\xB1\u308A\u1CEA\u2037\u4FAE\u253E\u33AB\u74F9\u2898\u4FD4\u662E\u1312\u25EE\u3089\u17D2\u2E3B\u0314\u3044\u17FA\u3560\u2109\u5D4E\u5540\u0CDA\u199E\u3AA6\u558C\u1D43\u2547\u017D\u6356\u4356\u4790\u1C3C\u12E8\u38BD\u6787\u4B58\u3D20\u6F48\u304E\u02A8\\x6b\u4066\u1F06\u06D2\u71AC\u1269\u6A58\u24A0\u6352\u1121\u3B77\u6F50\u7E2A\u0C81\u34BA\u301B\u25B5\u3F1E\u0175\u6BFC\u1577\u22A3\u59C7\u5B0E\u60F9\u362F\u1D4C\u612A\u69A9\u2DF4\u0114\u158A\u0A78\u5180\u0410\u2F64\u6021\u77E6\u198B\u1D70\u74B0\u2494\u7D14\u70CD\u60CF\u7210\u0543\x87\u133E\u4EFD\u4B30\u4316\u5FA7\u12B0\u74A0\u28B9\u091E\u0A09\u40A4\u469C\u0970\\x30\u7B60\u1265\u5372\u0C26\u6565\u0DBC\u24E8\u062E\u502D\u3D6E\u07EE\u510E\u479C\u0BA8\u3520\u5318\u5BA7\u1A26\u5266\u4947\u7CCB\u6B51\u0198\u3210\xDD\u2FD6\u2760\u18A0\u3992\u7F42\u5522\u5E77\u402D\u7D2A\u0D80\u5481\u1096\u722B\u66C0\u06F3\u05A8\u0675\u7026\u7AE0\u31E1\u2027\u68EF\u082B\u3AFD\x86\u48D9\u5251\u6A80\u0378\u0772\u3D1B\u0207\u2E60\u535B\u6A81\u39E7\u122A\u3443\u786D\u33BF\u332E\u65A2\u3633\u14FF\u18D2\u5707\u1520\u20A2\u7862\u3759\u6708\u763C\u0E27\\x2d\u2864\u01FE\u5300\u2A00\u4FB4\u3A8E\u3721\u7A53\u5A21\u3940\u672E\u4045\u2028\u690C\u3516\u0214\u0222\u26FA\u1640\u1DE0\u7A95\u4421\u34E4\u6365\u64C0\u6D33\u616A\u40A4\u6FE9\u1EB5\u2774\u7949\u6A32\u6F20\u10B0\u1036\u71EE\u1C6F\u0431\u633A\u5F35\u4DF9\u68EC\u0182\u57BB\u7018\u3B3F\u2120\u347A\u3499\u03EC\u25C4\u2D28\u0B28\u1F34\u47DB\u282E\u4159\u6028\u01D8\u5A95\u6265\u6AA0\u4F2F\u46A4\u31C5\u0DA6\u3E43\u702D\u08CF\u12A6\\x56\u487D\u2020\u2811\u6564\u25E1\u4D68\u6562\u2D45\u4DE7\u409B\u1AD7\u2092\u5AFC\u0355\u635B\u5B4E\u0608\u1580\u7534\u30E6\u017E\u0140\u44D9\u0E40\u083F\u208E\u01ED\u3A73\u05BF\u3BC7\u5A6E\u4FA0\u3CB2\u1AC1\u33E0\u6727\u0586\u2C2C\u1942\u38EA\u1B30\u2A0E\u0282\u113E\u58A8\u1B50\u7740\u4C22\u464C\u0721\u542D\u1028\u203A\u31BB\u0113\u3093\u39D0\u5C64\u0E46\u4199\u0941\u4581\u7C22\u5622\u0EBC\u4645\u349E\u087C\u21F7\u2AA9\u429F\u07C0\u5CB8\u0330\u5280\u0B59\u2BB7\u7F6D\u6931\u1853\u4241\xA4\\x40\u45FC\u032A\u789F\u1B48\u0820\\x20\u0471\u01CD\u4917\u25EB\u5A52\u0D62\u3AA4\u7DA8\u5122\u5E84\u5DC3\u0239\u283E\u5643\u1870\u1EDA\u5088\u30D3\u0EE3\u05A0\u3AA0\u203F\u6253\u4ECF\u16C1\\x26\u0444\\x4e\u5489\u0100\u0164\x90\u2210\u05E1\u2C98\u2C74\u5022\u7DD2\u7560\u702F\u2B3C\x81\u64BA\u6F9E\u2ADE\u6D7E\u5F99\u3220\u02E0\u423F\u0C5D\u3152\u6F81\u7839\u43F6\u4493\u1290\xCD\u4100\u7C95\u05C2\u180C\u2B15\u4400\u7D23\u289F\u270A\u2E26\u2258\u1920\xD4\u6220\u4020\\x20\",ezk0Yu[IUH9gW[qIOqfr8+0x15c]]=R2YkZth.decompressFromUTF16(ezk0Yu[IUH9gW[0xf]]),onPFgpD.ven1Ek=onPFgpD.Cw9HsmY,qIOqfr8+=0x16e,szoaZL+=-0xf1);break;default:jk9aAk8([onPFgpD.Cw9HsmY.ixxSnex,onPFgpD.Cw9HsmY.CySzZ4]=[0xb8,0xd6],onPFgpD.ven1Ek=onPFgpD.a6DSf7W,qIOqfr8+=-0x28,szoaZL+=0x89);break;case szoaZL- -0xf2:ezk0Yu[IUH9gW[0x11]]=ezk0Yu[IUH9gW[0x10]].split(IUH9gW[qIOqfr8+0x3df]);return RWe5Wz=!0x0,izD_V32=RH8KLq(function(...qIOqfr8){qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];return ezk0Yu[IUH9gW[0x11]][qIOqfr8[IUH9gW[0x1]]]})}}jk9aAk8(RWe5Wz=void 0x0,qIOqfr8=szoaZL(-0x14c,0xd1).next().value);if(RWe5Wz){return qIOqfr8}}());function cIULrn(izD_V32){var ezk0Yu,RWe5Wz;function*qIOqfr8(RWe5Wz,qIOqfr8,szoaZL={g1K9D9:{}}){while(RWe5Wz+qIOqfr8!==-0x85)with(szoaZL.LmOarb||szoaZL)switch(RWe5Wz+qIOqfr8){case 0x14:case 0x1e:case-0xf8:case 0xb2:default:for(szoaZL.g1K9D9.QhR7BJJ=IUH9gW[RWe5Wz+-0xbd];QhR7BJJIUH9gW[RWe5Wz+-0xa7]?IUH9gW[RWe5Wz+-0xaa]:IUH9gW[RWe5Wz+-0xa9]);do{jk9aAk8(IPlstK.push(rqmsrR5&IUH9gW[0x12]),rqmsrR5>>=IUH9gW[RWe5Wz+-0xb4],JpHzr0-=IUH9gW[RWe5Wz+-0xb4])}while(JpHzr0>IUH9gW[RWe5Wz+-0xab]);Z3HAu9w=-IUH9gW[0x3]}}if(Z3HAu9w>-IUH9gW[0x3]){jk9aAk8(szoaZL.LmOarb=szoaZL.g1K9D9,qIOqfr8+=-0x4d);break}else{jk9aAk8(szoaZL.LmOarb=szoaZL.g1K9D9,RWe5Wz+=-0xa6,qIOqfr8+=0x60);break}case RWe5Wz-0x42:case-0x2a:case-0x93:jk9aAk8(szoaZL.g1K9D9.atUMfl=-0xd5,szoaZL.LmOarb=szoaZL.g1K9D9,RWe5Wz+=0x4e,qIOqfr8+=-0x4d);break;case 0xb9:case 0xeb:case RWe5Wz- -0xa2:jk9aAk8(szoaZL.g1K9D9.JpHzr0=IUH9gW[RWe5Wz+0xd8],szoaZL.g1K9D9.Z3HAu9w=-IUH9gW[0x3],szoaZL.LmOarb=szoaZL.g1K9D9,RWe5Wz+=0x195,qIOqfr8+=-0x131);break;case qIOqfr8!=-0x8f&&qIOqfr8- -0xbe:jk9aAk8(IPlstK.push((rqmsrR5|Z3HAu9w<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(IPlstK.push(rqmsrR5&IUH9gW[0x12]),rqmsrR5>>=IUH9gW[0xa],JpHzr0-=IUH9gW[0xa])}while(JpHzr0>IUH9gW[0x13]);Z3HAu9w=-IUH9gW[RWe5Wz+-0x8f]}}if(Z3HAu9w>-IUH9gW[0x3]){jk9aAk8(szoaZL.LmOarb=szoaZL.g1K9D9,RWe5Wz+=0x2c,qIOqfr8+=-0xb6);break}else{jk9aAk8(szoaZL.LmOarb=szoaZL.g1K9D9,RWe5Wz+=-0x7a,qIOqfr8+=-0x9);break}case RWe5Wz!=0x26&&RWe5Wz-0x12:}}jk9aAk8(ezk0Yu=void 0x0,RWe5Wz=qIOqfr8(-0x26,0x110).next().value);if(ezk0Yu){return RWe5Wz}}function u7abyW(qIOqfr8){if(typeof ezk0Yu[qIOqfr8]===izD_V32(IUH9gW[0x1])){return ezk0Yu[qIOqfr8]=cIULrn(RWe5Wz[qIOqfr8])}return ezk0Yu[qIOqfr8]}jk9aAk8(ezk0Yu={},RWe5Wz=[izD_V32(IUH9gW[0x3]),izD_V32(IUH9gW[0x7]),izD_V32(IUH9gW[0x4]),izD_V32(IUH9gW[0xc]),\"\\u007c\\u0049\\u002c\\u0038\\u0036\\u003e\\u0026\\u0035\\u0030\\u0050\\u0041\\u0056\\u007b\\u0041\\u0070\\u0060\\u0065\\u0063\\u004c\\u004f\\u0070\\u006e\\u003a\\u006d\\u0043\\u007c\\u0055\\u0073\\u006c\\u0056\\u003d\\u006f\\u002f\\u0029\\u003d\\u004a\\u007e\\u004d\\u003a\\u005b\\u0057\\u007c\\u002a\\u0063\\u0046\\u006a\\u0079\\u0060\\u005d\\u0053\\u0055\\u0058\\u0045\",izD_V32(IUH9gW[0x27]),izD_V32(IUH9gW[0x9]),izD_V32(IUH9gW[0x13]),\"\\u005f\\u0065\\u005f\\u0079\\u0032\\u0079\\u005f\\u004c\\u004c\\u0044\\u0029\\u003f\\u0044\\u005d\\u004c\\u0060\\u007c\\u0053\\u0062\\u004f\\u002e\\u0073\\u0070\\u006d\\u0057\\u0067\\u0025\",izD_V32(IUH9gW[0xa]),izD_V32(IUH9gW[0x29]),izD_V32(IUH9gW[0x15a]),izD_V32(IUH9gW[0x151]),\"\\x44\\x51\\x54\\x65\\x67\\x66\\x58\\x59\\x65\\x56\\x32\\x42\\x53\\x7d\\x62\\x5a\\x28\\x78\\x71\\x4e\\x6e\\x59\\x3f\\x5b\\x5b\\x72\\x61\\x6b\\x3a\\x63\\x6e\\x6b\\x5a\\x61\\x4e\\x2c\\x7c\\x70\\x3d\\x6b\\x72\\x42\\x39\\x2c\\x75\\x32\\x41\\x60\",izD_V32(IUH9gW[0x22]),izD_V32(IUH9gW[0x14]),izD_V32(IUH9gW[0x15]),izD_V32(IUH9gW[0x16]),\"\\x30\\x65\\x41\\x2b\\x3d\\x5d\\x21\\x6d\\x3f\\x75\\x23\\x4e\\x48\\x5d\\x5e\\x45\\x7a\\x2e\\x67\\x29\\x7c\\x5f\\x5f\\x74\\x46\\x72\\x30\\x47\\x5b\\x2f\\x6c\",izD_V32(IUH9gW[0xb]),izD_V32(IUH9gW[0xbf]),\"\\u0024\\u0049\\u0050\\u007e\\u0047\\u003c\\u0043\\u0070\\u002e\\u002f\\u0033\\u0054\\u0052\\u0066\\u0072\\u007a\\u002e\\u0051\\u0029\\u0061\\u006b\\u004f\\u0036\\u0074\\u003b\\u002b\\u0063\\u006a\\u0072\\u003d\\u0051\\u005a\\u002b\\u007d\\u007c\\u007e\\u005b\\u004a\\u0026\\u002c\\u0079\\u002b\\u0053\\u006e\\u0062\",izD_V32(IUH9gW[0x24]),izD_V32(IUH9gW[0x163]),\"\\u0061\\u0061\\u0066\\u0038\\u003e\\u0078\\u006a\\u002c\\u0066\\u003a\\u007c\\u002f\\u003d\\u0056\\u0057\\u006f\\u0022\\u0072\\u0063\\u0059\\u0063\\u006e\\u0048\\u0074\\u0050\\u0075\\u006f\\u004e\\u002b\\u0047\\u0078\\u006a\\u006c\\u002c\\u007e\\u003d\\u002a\\u0070\\u003d\\u006c\\u0046\\u0054\\u0066\\u0041\\u0021\\u003d\",izD_V32(IUH9gW[0x874]),izD_V32(IUH9gW[0x36]),\"\\x39\\x49\\x71\\x3d\\x6f\\x5f\\x2f\\x51\\x45\\x45\\x28\\x4e\\x5d\\x6a\\x78\\x58\\x57\\x55\\x6d\\x65\\x66\\x73\\x7d\\x61\\x69\\x72\\x21\\x21\\x77\\x6e\\x3c\\x2c\\x32\\x33\\x78\\x30\\x40\\x4f\\x36\\x51\\x2a\\x51\\x64\\x7c\\x55\\x76\\x39\\x43\",izD_V32(IUH9gW[0x161]),\"\\u006a\\u0049\\u006e\\u002b\\u0047\\u007d\\u0024\\u0033\\u0049\\u002f\\u0077\\u004f\\u0075\\u007d\\u005b\\u0074\\u0060\\u0050\\u0046\\u002c\\u002a\\u0055\\u0046\\u0053\\u002f\\u007c\\u0029\\u0067\\u0040\\u0078\\u002c\\u004c\",izD_V32(IUH9gW[0x100]),izD_V32(IUH9gW[0x160]),\"\\x5f\\x57\\x7d\\x2e\\x6a\\x60\\x69\\x38\\x5a\\x4c\\x24\\x5e\\x6a\\x3b\\x3a\\x7a\\x34\\x56\\x71\\x38\\x40\\x70\\x59\\x2e\\x50\\x6c\\x4e\\x61\\x3e\\x3d\\x30\\x4d\\x49\\x61\\x71\\x4e\\x76\\x7d\\x24\\x5b\\x56\\x7c\\x6e\\x52\\x62\",izD_V32(IUH9gW[0x162]),izD_V32(0x1a),\"\\x68\\x3c\\x34\\x3d\\x23\\x32\\x3b\\x34\\x34\\x7c\\x7c\\x33\\x77\",izD_V32(IUH9gW[0x158]),izD_V32(IUH9gW[0x157]),izD_V32(0x1d),izD_V32(IUH9gW[0x109]),\"\\u0046\\u003c\\u0068\\u004e\\u0063\\u0073\\u0028\\u002e\\u003a\\u0053\\u0068\\u0038\\u0042\\u0076\\u0051\\u0034\\u0034\\u002c\\u0030\\u002b\\u0072\\u007b\\u0064\\u0035\\u0046\\u007c\\u0079\\u0035\\u0066\\u0047\\u0050\\u002c\\u0046\\u0053\\u003c\\u002e\\u0022\\u005f\\u0064\\u0077\",izD_V32(IUH9gW[0x1f]),izD_V32(IUH9gW[0x6]),izD_V32(IUH9gW[0xd6]),\"\\u0037\\u0058\\u0047\\u002b\\u0046\\u0055\\u003a\\u0055\\u002f\\u007c\\u0066\\u004a\\u0072\\u002f\\u0035\\u0047\\u0077\\u002b\\u0064\\u0061\\u0035\\u0041\\u006c\\u003a\\u0023\\u007c\\u0057\\u0050\\u0029\\u0063\\u006c\\u0045\\u0065\\u0056\\u005f\\u007d\\u0075\\u007e\\u0037\\u0022\\u0035\\u003c\\u0048\\u006b\\u0049\\u0063\\u006d\\u006a\",izD_V32(IUH9gW[0xba]),izD_V32(IUH9gW[0xbb]),izD_V32(IUH9gW[0x10b]),izD_V32(IUH9gW[0x152]),izD_V32(IUH9gW[0x43]),\"\\u003a\\u0060\\u0048\\u0038\\u006d\\u004a\\u002b\\u0055\\u005b\\u0050\\u0045\\u0036\\u0055\\u0025\\u0050\\u005a\\u0035\\u0044\\u0036\\u0064\\u0032\\u003c\\u0055\\u006b\\u0033\\u003c\\u0029\\u006e\\u0065\\u003b\\u0025\\u0033\\u007e\\u002b\\u007c\\u004e\\u0032\\u007b\\u002e\\u006c\\u005b\\u0054\\u0030\\u006c\\u0065\\u003b\",izD_V32(IUH9gW[0x164]),izD_V32(IUH9gW[0x1ce]),izD_V32(IUH9gW[0x143]),izD_V32(IUH9gW[0x101]),izD_V32(0x2b),\"\\u004d\\u0050\\u0040\\u0061\\u0032\\u003e\\u0069\\u0061\\u006d\\u007c\\u003c\\u0070\\u0030\\u0025\\u0046\\u006f\\u0037\\u006b\\u0078\\u0030\\u0036\\u005d\\u0059\\u0025\\u0064\\u0042\\u0068\\u0065\\u004f\\u003e\\u0060\\u0065\\u007d\\u0057\\u006c\\u0061\\u006d\\u0032\\u0026\\u0074\\u0067\\u0049\\u003e\\u0066\\u0052\\u0063\",izD_V32(IUH9gW[0xd5]),izD_V32(0x2d),izD_V32(IUH9gW[0x232]),izD_V32(IUH9gW[0x13b]),\"\\u003e\\u0061\\u005b\\u0073\\u0031\\u0068\\u0059\\u0034\\u006d\\u007c\\u004e\",\"\\x56\\x29\\x61\\x4a\\x47\\x3c\\x4c\\x47\\x3d\\x44\\x7d\\x6b\\x64\\x78\\x62\\x25\\x3e\\x55\\x41\\x30\\x30\\x7b\\x59\\x25\\x56\\x56\\x6d\\x54\\x70\\x63\\x4d\\x68\\x6d\\x55\\x34\\x30\\x69\\x79\\x46\\x70\\x75\\x67\\x3c\\x70\\x7c\\x5d\\x50\\x34\\x3c\\x67\\x79\\x29\\x25\\x4f\\x29\\x3b\",\"\\u0062\\u0056\\u0029\\u002b\\u0054\\u007b\\u0032\\u0025\\u0068\\u002f\\u003b\\u0061\\u007e\\u0066\\u005e\\u0065\\u0058\\u0042\\u005e\\u0079\\u0048\\u005b\\u0030\\u003c\\u0065\\u007c\\u0022\\u006b\\u003e\\u0078\\u0023\\u006a\\u002a\\u003c\\u007e\\u002e\\u0028\\u006e\\u005e\\u002f\\u0049\\u002b\\u0079\\u003e\\u0025\\u003d\",\"\\u003c\\u0060\\u0034\\u007e\\u0074\\u0021\\u0066\\u0025\\u0068\\u002b\\u0049\\u0033\\u0056\\u003b\\u002c\\u005a\\u002b\\u0061\\u007c\\u0059\\u0055\\u0059\\u002f\\u0077\\u0072\\u002b\\u0021\\u004e\\u006b\\u005e\\u0029\\u007a\\u003a\\u0078\\u0055\\u002c\\u0069\\u0076\\u005d\\u006b\\u0066\\u0045\\u007c\\u0033\\u0077\",izD_V32(IUH9gW[0x134]),izD_V32(IUH9gW[0xf]),izD_V32(IUH9gW[0x2f8]),izD_V32(0x33),izD_V32(IUH9gW[0x14c]),izD_V32(IUH9gW[0x33]),izD_V32(0x36),izD_V32(0x37),izD_V32(IUH9gW[0x279]),\"\\x77\\x7c\\x2b\\x7e\\x7d\\x36\\x7c\\x74\\x28\\x45\\x49\\x63\\x6c\\x63\\x3c\\x5a\\x49\\x44\\x25\\x2e\\x44\\x7e\\x3e\\x74\\x6d\\x56\\x41\\x6d\\x5f\\x25\\x76\\x74\\x52\\x50\\x35\\x29\\x64\\x55\\x7e\\x77\\x38\",\"\\u0049\\u0042\\u004f\\u0065\\u004d\\u0068\\u002a\\u0069\\u0035\\u0045\\u0050\\u0051\\u0050\\u0068\\u0054\\u0058\\u007c\\u0077\",izD_V32(IUH9gW[0x208]),izD_V32(0x3a),izD_V32(0x3b),izD_V32(IUH9gW[0xbe]),izD_V32(IUH9gW[0x165]),izD_V32(IUH9gW[0x20a]),izD_V32(IUH9gW[0x20]),\"\\u007e\\u003c\\u003f\\u0079\\u0079\\u005b\\u0065\\u003c\\u0074\\u004c\\u0029\\u0063\\u0028\\u0068\\u007c\\u004e\\u007c\\u007a\\u002b\\u0070\\u006f\\u0068\\u007c\\u0077\\u004c\\u0028\\u0078\\u0050\\u0070\\u0076\\u0024\\u004e\\u0060\\u0061\\u0065\\u004e\\u0078\\u0069\\u006a\\u0045\\u003d\\u0045\\u0055\\u0041\\u0047\\u005e\\u0043\\u0033\\u0057\\u007a\\u006a\\u006e\\u002c\",\"\\u004c\\u003c\\u0029\\u0069\\u0073\\u004a\\u0079\\u0070\\u0067\\u0075\\u0036\\u0042\\u0077\\u0078\\u0022\\u0033\\u0076\\u0030\\u006f\\u0070\\u0078\\u0032\\u005e\\u0045\\u005b\\u0067\\u0056\\u0072\\u004a\\u006e\\u0022\\u0060\\u007e\\u0033\\u007c\\u0037\",izD_V32(IUH9gW[0xd4]),\"\\x59\\x78\\x7c\\x70\\x4b\\x5f\\x56\\x47\\x22\\x3a\\x3e\\x66\\x5e\\x7b\\x4b\\x43\\x43\\x6b\\x4e\\x2c\\x61\\x51\\x58\\x41\\x39\\x49\\x33\\x7c\\x2f\\x43\\x5d\\x6f\\x40\\x75\\x33\\x61\\x2a\\x41\\x62\",izD_V32(IUH9gW[0x260]),izD_V32(IUH9gW[0x35]),izD_V32(IUH9gW[0xc2]),izD_V32(IUH9gW[0x261]),izD_V32(IUH9gW[0x37]),izD_V32(IUH9gW[0x1cb]),izD_V32(IUH9gW[0x19d]),izD_V32(0x48),izD_V32(IUH9gW[0x1e8]),izD_V32(0x4a),izD_V32(IUH9gW[0x205]),izD_V32(IUH9gW[0x10a]),izD_V32(IUH9gW[0x25f]),izD_V32(0x4e),izD_V32(IUH9gW[0x11a]),izD_V32(0x50),izD_V32(0x51),izD_V32(IUH9gW[0xd3]),izD_V32(0x53),izD_V32(0x54),izD_V32(0x55),izD_V32(0x56),izD_V32(IUH9gW[0x2c]),izD_V32(IUH9gW[0x17]),izD_V32(IUH9gW[0x2e]),izD_V32(IUH9gW[0x2f]),izD_V32(IUH9gW[0x18]),izD_V32(IUH9gW[0x30]),izD_V32(IUH9gW[0x31]),izD_V32(IUH9gW[0x32]),izD_V32(IUH9gW[0x34]),izD_V32(IUH9gW[0x3b]),izD_V32(IUH9gW[0x3c]),\"\\u0064\\u0073\\u0062\\u006f\\u003a\\u0076\\u007c\\u0048\",izD_V32(IUH9gW[0x3d]),izD_V32(IUH9gW[0x41]),izD_V32(IUH9gW[0x45]),izD_V32(IUH9gW[0x46]),\"\\x7c\\x35\\x3a\\x78\",izD_V32(IUH9gW[0x47]),izD_V32(IUH9gW[0x48]),izD_V32(IUH9gW[0x49]),izD_V32(IUH9gW[0x4a]),izD_V32(IUH9gW[0x4b]),\"\\x4c\\x46\\x7c\\x29\\x6c\",\"\\x6e\\x64\\x71\\x23\\x54\\x75\\x7c\\x5b\\x4a\",izD_V32(IUH9gW[0x4c]),izD_V32(IUH9gW[0x4d]),izD_V32(IUH9gW[0x4e]),izD_V32(IUH9gW[0x4f]),izD_V32(IUH9gW[0x50]),izD_V32(IUH9gW[0x51]),izD_V32(IUH9gW[0x52]),izD_V32(IUH9gW[0x53]),izD_V32(IUH9gW[0x54]),izD_V32(IUH9gW[0x55]),izD_V32(IUH9gW[0x56]),izD_V32(IUH9gW[0x57]),izD_V32(IUH9gW[0x58]),izD_V32(IUH9gW[0x59]),izD_V32(IUH9gW[0x5a]),izD_V32(IUH9gW[0x5b]),izD_V32(IUH9gW[0x5c]),izD_V32(IUH9gW[0x5d]),izD_V32(IUH9gW[0x5e]),izD_V32(IUH9gW[0x5f]),izD_V32(IUH9gW[0x1d]),izD_V32(IUH9gW[0x1a]),izD_V32(IUH9gW[0x60]),izD_V32(IUH9gW[0x61]),izD_V32(IUH9gW[0x62]),izD_V32(IUH9gW[0x63]),izD_V32(IUH9gW[0x64]),izD_V32(IUH9gW[0x65]),izD_V32(IUH9gW[0x66]),izD_V32(IUH9gW[0x67]),izD_V32(IUH9gW[0x68]),izD_V32(IUH9gW[0x69]),izD_V32(IUH9gW[0x6a]),izD_V32(IUH9gW[0x6b]),\"\\x54\\x59\\x43\\x42\\x39\\x21\\x7c\\x48\",izD_V32(IUH9gW[0x6d]),izD_V32(IUH9gW[0x6e]),izD_V32(IUH9gW[0x6f]),izD_V32(IUH9gW[0x2d]),izD_V32(IUH9gW[0x70]),izD_V32(IUH9gW[0x71]),izD_V32(IUH9gW[0x72]),izD_V32(IUH9gW[0x73]),izD_V32(IUH9gW[0x74]),\"\\x26\\x57\\x7c\\x46\\x29\\x3e\\x49\\x41\",izD_V32(IUH9gW[0x40]),izD_V32(IUH9gW[0x75]),izD_V32(IUH9gW[0x76]),izD_V32(IUH9gW[0x77]),izD_V32(IUH9gW[0x78]),izD_V32(IUH9gW[0x79]),izD_V32(IUH9gW[0x7a]),izD_V32(IUH9gW[0x7b]),izD_V32(IUH9gW[0x7c]),izD_V32(IUH9gW[0x7d]),izD_V32(IUH9gW[0x7e]),izD_V32(IUH9gW[0x7f]),izD_V32(IUH9gW[0x80]),izD_V32(IUH9gW[0x81]),izD_V32(IUH9gW[0x82]),izD_V32(IUH9gW[0x83]),izD_V32(IUH9gW[0x84]),izD_V32(IUH9gW[0x85]),izD_V32(IUH9gW[0x3f]),izD_V32(IUH9gW[0x86]),izD_V32(IUH9gW[0x3e]),izD_V32(IUH9gW[0x87]),izD_V32(IUH9gW[0x88]),izD_V32(IUH9gW[0x89]),izD_V32(IUH9gW[0x8b]),izD_V32(IUH9gW[0x8c]),izD_V32(IUH9gW[0x8d]),izD_V32(IUH9gW[0x8e]),izD_V32(IUH9gW[0x8f]),izD_V32(IUH9gW[0x90]),izD_V32(IUH9gW[0x91]),izD_V32(IUH9gW[0x92]),izD_V32(IUH9gW[0x93]),izD_V32(IUH9gW[0x39]),izD_V32(IUH9gW[0x94]),izD_V32(IUH9gW[0x26]),izD_V32(IUH9gW[0x96]),izD_V32(IUH9gW[0x97]),izD_V32(IUH9gW[0x98]),izD_V32(IUH9gW[0x42]),izD_V32(IUH9gW[0x99]),izD_V32(IUH9gW[0x9a]),izD_V32(IUH9gW[0x9b]),izD_V32(IUH9gW[0x9c]),izD_V32(IUH9gW[0x9d]),izD_V32(IUH9gW[0x9e]),izD_V32(IUH9gW[0x9f]),izD_V32(IUH9gW[0x38]),izD_V32(IUH9gW[0xa0]),izD_V32(IUH9gW[0xa1]),izD_V32(IUH9gW[0xa2]),\"\\x3c\\x46\\x22\\x3f\\x7c\\x7e\\x44\\x54\",izD_V32(IUH9gW[0xa3]),izD_V32(IUH9gW[0xa4]),izD_V32(IUH9gW[0xa5]),izD_V32(IUH9gW[0xa6]),\"\\u006c\\u004f\\u0032\\u0061\\u005f\\u007c\\u0030\\u0054\",izD_V32(IUH9gW[0xa7]),izD_V32(IUH9gW[0xa8]),izD_V32(IUH9gW[0xa9]),izD_V32(IUH9gW[0xaa]),izD_V32(IUH9gW[0xab]),izD_V32(IUH9gW[0xac]),izD_V32(IUH9gW[0xad]),izD_V32(IUH9gW[0xae]),izD_V32(IUH9gW[0xaf]),izD_V32(IUH9gW[0xb0]),izD_V32(IUH9gW[0xb1]),izD_V32(IUH9gW[0xb2]),izD_V32(IUH9gW[0xb3]),izD_V32(IUH9gW[0xb4]),izD_V32(IUH9gW[0xb5]),izD_V32(IUH9gW[0xb7]),\"\\x7c\\x4f\\x77\\x7a\\x3a\\x55\\x54\\x23\\x60\",\"\\x7c\\x4f\\x77\\x7a\\x75\\x7a\\x45\\x7d\",\"\\x7c\\x4f\\x77\\x7a\\x64\\x23\\x4b\\x7d\",izD_V32(IUH9gW[0xb8]),izD_V32(IUH9gW[0xb9]),\"\\u0062\\u0047\\u007c\\u0069\\u007d\\u0040\\u0056\\u007d\",izD_V32(IUH9gW[0x1e]),izD_V32(IUH9gW[0xbc]),izD_V32(IUH9gW[0xbd]),izD_V32(IUH9gW[0xc1]),izD_V32(IUH9gW[0xc4]),izD_V32(IUH9gW[0xc5]),izD_V32(IUH9gW[0xc6]),izD_V32(IUH9gW[0xc7]),izD_V32(IUH9gW[0xc8]),izD_V32(IUH9gW[0xc9]),izD_V32(IUH9gW[0xca]),\"\\x72\\x40\\x4e\\x24\\x2f\\x43\\x3e\\x44\\x7c\\x75\",izD_V32(IUH9gW[0xcb]),izD_V32(IUH9gW[0xcc]),izD_V32(IUH9gW[0xcd]),izD_V32(IUH9gW[0xce]),izD_V32(IUH9gW[0xcf]),izD_V32(IUH9gW[0x21]),izD_V32(IUH9gW[0xd0]),izD_V32(IUH9gW[0xd1]),izD_V32(IUH9gW[0xd2]),izD_V32(IUH9gW[0xc3]),izD_V32(IUH9gW[0xd7]),izD_V32(IUH9gW[0xd8]),izD_V32(IUH9gW[0xd9]),izD_V32(IUH9gW[0xda]),izD_V32(IUH9gW[0xdb]),izD_V32(IUH9gW[0xdc]),izD_V32(IUH9gW[0xdd]),izD_V32(IUH9gW[0xde]),izD_V32(IUH9gW[0xdf]),izD_V32(IUH9gW[0xe0]),\"\\x38\\x4d\\x24\\x49\\x42\\x7c\\x6a\\x42\",izD_V32(IUH9gW[0xe1]),izD_V32(IUH9gW[0x12]),izD_V32(IUH9gW[0x8]),izD_V32(IUH9gW[0xe2]),izD_V32(IUH9gW[0xe3]),izD_V32(IUH9gW[0xe4]),izD_V32(IUH9gW[0xe5]),izD_V32(IUH9gW[0xe6]),izD_V32(IUH9gW[0xe7]),izD_V32(IUH9gW[0xe8]),izD_V32(IUH9gW[0xe9]),izD_V32(IUH9gW[0xea]),izD_V32(IUH9gW[0xeb]),izD_V32(IUH9gW[0xec]),izD_V32(IUH9gW[0xed]),izD_V32(IUH9gW[0xee]),izD_V32(IUH9gW[0xef]),\"\\u0026\\u003e\\u0060\\u006d\\u0041\\u007c\\u0038\\u0065\\u002e\",izD_V32(IUH9gW[0xf0]),izD_V32(IUH9gW[0xf1]),izD_V32(IUH9gW[0xf3]),izD_V32(IUH9gW[0xf4]),izD_V32(IUH9gW[0xf6]),izD_V32(IUH9gW[0xf7]),izD_V32(IUH9gW[0xf8]),izD_V32(IUH9gW[0xf9]),izD_V32(IUH9gW[0xfa]),izD_V32(IUH9gW[0xfb]),\"\\x25\\x72\\x57\\x7c\\x56\\x46\\x75\\x6e\",izD_V32(IUH9gW[0xfc]),izD_V32(IUH9gW[0xfd]),izD_V32(IUH9gW[0xfe]),izD_V32(IUH9gW[0xff]),izD_V32(IUH9gW[0x102]),izD_V32(IUH9gW[0x103]),\"\\u0025\\u0072\\u0022\\u007c\\u005f\\u0025\\u0034\\u0062\",izD_V32(IUH9gW[0x104]),izD_V32(IUH9gW[0x105]),\"\\x25\\x72\\x22\\x7c\\x28\\x55\\x60\\x6e\",izD_V32(IUH9gW[0x106]),izD_V32(IUH9gW[0x107]),izD_V32(IUH9gW[0x108]),izD_V32(IUH9gW[0x10c]),izD_V32(IUH9gW[0x10d]),izD_V32(IUH9gW[0x10e]),izD_V32(IUH9gW[0x10f]),izD_V32(IUH9gW[0x110]),izD_V32(IUH9gW[0x111]),izD_V32(IUH9gW[0x112]),izD_V32(IUH9gW[0x113]),izD_V32(IUH9gW[0x114]),\"\\u0030\\u005d\\u0021\\u005e\\u007c\\u0070\\u0078\\u005a\",izD_V32(IUH9gW[0x115]),izD_V32(IUH9gW[0x117]),izD_V32(IUH9gW[0x118]),izD_V32(IUH9gW[0x119]),izD_V32(IUH9gW[0x11b]),\"\\u007c\\u007e\\u005f\\u002e\\u005d\",\"\\u0047\\u007b\\u0055\\u007c\\u002f\\u0075\\u0026\\u0062\\u002f\\u0046\\u0030\\u0066\\u0021\\u0075\\u0035\\u007d\\u007c\\u0025\\u007c\\u0038\",izD_V32(IUH9gW[0x11c]),izD_V32(IUH9gW[0x11d]),izD_V32(IUH9gW[0x11e]),izD_V32(IUH9gW[0x11f]),izD_V32(IUH9gW[0x120]),izD_V32(IUH9gW[0x121]),\"\\u0054\\u002b\\u0079\\u003a\\u007a\\u007c\\u0023\\u0049\",izD_V32(IUH9gW[0x122]),izD_V32(IUH9gW[0x123]),izD_V32(IUH9gW[0x124]),izD_V32(IUH9gW[0x125]),izD_V32(IUH9gW[0x126]),izD_V32(IUH9gW[0x127]),izD_V32(IUH9gW[0x128]),izD_V32(IUH9gW[0x129]),izD_V32(IUH9gW[0x12a]),izD_V32(IUH9gW[0x12b]),izD_V32(IUH9gW[0x12d]),izD_V32(IUH9gW[0x12e]),izD_V32(IUH9gW[0x12f]),izD_V32(IUH9gW[0x130]),izD_V32(IUH9gW[0x131]),izD_V32(IUH9gW[0x132]),izD_V32(IUH9gW[0x133]),izD_V32(IUH9gW[0x135]),izD_V32(IUH9gW[0x136]),izD_V32(IUH9gW[0x137]),izD_V32(IUH9gW[0x138]),izD_V32(IUH9gW[0x139]),izD_V32(IUH9gW[0x13a]),izD_V32(IUH9gW[0x13c]),izD_V32(IUH9gW[0x13d]),izD_V32(IUH9gW[0x13e]),izD_V32(IUH9gW[0x13f]),izD_V32(IUH9gW[0x140]),izD_V32(IUH9gW[0x141]),izD_V32(IUH9gW[0x142]),izD_V32(IUH9gW[0x145]),izD_V32(IUH9gW[0x147]),izD_V32(IUH9gW[0x148]),izD_V32(IUH9gW[0x149]),izD_V32(IUH9gW[0x14a]),izD_V32(IUH9gW[0x14b]),izD_V32(IUH9gW[0x14d]),izD_V32(IUH9gW[0x14e]),izD_V32(IUH9gW[0x14f]),izD_V32(IUH9gW[0x150]),izD_V32(IUH9gW[0x153]),izD_V32(IUH9gW[0x154]),izD_V32(IUH9gW[0x156]),izD_V32(IUH9gW[0x15b]),izD_V32(IUH9gW[0x15d]),izD_V32(IUH9gW[0x15e]),izD_V32(IUH9gW[0x15f]),izD_V32(IUH9gW[0x166]),izD_V32(IUH9gW[0x168]),izD_V32(IUH9gW[0x169]),izD_V32(IUH9gW[0x16a]),izD_V32(IUH9gW[0x16b]),izD_V32(IUH9gW[0x16c]),izD_V32(IUH9gW[0x16e]),izD_V32(IUH9gW[0x16f]),izD_V32(IUH9gW[0x170]),izD_V32(IUH9gW[0x171]),izD_V32(IUH9gW[0x172]),izD_V32(IUH9gW[0x173]),izD_V32(IUH9gW[0x174]),izD_V32(IUH9gW[0x175]),izD_V32(IUH9gW[0x176]),izD_V32(IUH9gW[0x177]),izD_V32(IUH9gW[0x178]),izD_V32(IUH9gW[0x179]),izD_V32(IUH9gW[0x17b]),izD_V32(IUH9gW[0x17c]),izD_V32(IUH9gW[0x17d]),izD_V32(IUH9gW[0x17e]),izD_V32(IUH9gW[0x17f]),izD_V32(IUH9gW[0x181]),izD_V32(IUH9gW[0x183]),izD_V32(IUH9gW[0x184]),\"\\u007c\\u004d\\u0065\\u0072\\u003c\",izD_V32(IUH9gW[0x186]),izD_V32(IUH9gW[0x187]),izD_V32(IUH9gW[0x188]),\"\\x6a\\x22\\x58\\x7c\\x3f\\x56\\x75\",\"\\u007c\\u0071\\u004d\\u007e\\u0033\\u0033\\u0052\\u0042\",izD_V32(IUH9gW[0x189]),izD_V32(IUH9gW[0x18a]),izD_V32(IUH9gW[0x18b]),izD_V32(IUH9gW[0x18c]),izD_V32(IUH9gW[0x18d]),izD_V32(IUH9gW[0x18e]),\"\\u002c\\u0022\\u007b\\u006c\\u0029\\u003f\\u002e\\u007c\\u0049\\u0071\\u0041\",\"\\x52\\x48\\x21\\x4e\\x7c\\x22\\x49\\x5b\",izD_V32(IUH9gW[0x18f]),\"\\x7c\\x22\\x49\\x24\\x79\",izD_V32(IUH9gW[0x190]),izD_V32(IUH9gW[0x193]),\"\\u006b\\u0054\\u003f\\u0055\\u007c\\u0043\\u006f\\u0063\",izD_V32(IUH9gW[0x194]),izD_V32(IUH9gW[0x195]),izD_V32(IUH9gW[0x196]),izD_V32(IUH9gW[0x197]),izD_V32(IUH9gW[0x198]),izD_V32(IUH9gW[0x199]),izD_V32(IUH9gW[0x19a]),izD_V32(IUH9gW[0x19b]),izD_V32(IUH9gW[0x19c]),izD_V32(IUH9gW[0x19e]),izD_V32(IUH9gW[0x19f]),izD_V32(IUH9gW[0x1a0]),izD_V32(IUH9gW[0x1a1]),izD_V32(IUH9gW[0x1a2]),izD_V32(IUH9gW[0x1a3]),izD_V32(IUH9gW[0x1a4]),izD_V32(IUH9gW[0x1a5]),izD_V32(IUH9gW[0x1a6]),izD_V32(IUH9gW[0x1a7]),izD_V32(IUH9gW[0x1a8]),izD_V32(IUH9gW[0x1a9]),izD_V32(IUH9gW[0x1aa]),izD_V32(IUH9gW[0x1ab]),izD_V32(IUH9gW[0x1ac]),izD_V32(IUH9gW[0x1ad]),izD_V32(IUH9gW[0x1ae]),izD_V32(IUH9gW[0x1af]),izD_V32(IUH9gW[0x1b1]),izD_V32(IUH9gW[0x1b2]),izD_V32(IUH9gW[0x1b3]),\"\\x4b\\x71\\x65\\x24\\x56\\x77\\x7c\",izD_V32(IUH9gW[0x1b4]),izD_V32(IUH9gW[0x1b5]),izD_V32(IUH9gW[0x1b6]),izD_V32(IUH9gW[0x1b7]),izD_V32(IUH9gW[0x1b8]),izD_V32(IUH9gW[0x1b9]),izD_V32(IUH9gW[0x1ba]),izD_V32(IUH9gW[0x1bb]),izD_V32(IUH9gW[0x1bd]),izD_V32(IUH9gW[0x1bf]),izD_V32(IUH9gW[0x1c0]),izD_V32(IUH9gW[0x1c1]),izD_V32(IUH9gW[0x1c2]),izD_V32(IUH9gW[0x1c3]),izD_V32(IUH9gW[0x1c4]),izD_V32(IUH9gW[0x1c5]),izD_V32(IUH9gW[0x1c6]),izD_V32(IUH9gW[0x1c7]),izD_V32(IUH9gW[0x1c8]),izD_V32(IUH9gW[0x1ca]),izD_V32(IUH9gW[0x1cc]),izD_V32(IUH9gW[0x1cd]),izD_V32(IUH9gW[0x1cf]),izD_V32(IUH9gW[0x1d0]),izD_V32(IUH9gW[0x1d1]),izD_V32(IUH9gW[0x1d3]),izD_V32(IUH9gW[0x1d5]),izD_V32(IUH9gW[0x1d6]),izD_V32(IUH9gW[0x1d7]),izD_V32(IUH9gW[0x1d8]),izD_V32(IUH9gW[0x1d9]),izD_V32(IUH9gW[0x1da]),izD_V32(IUH9gW[0x1db]),izD_V32(IUH9gW[0x1dc]),izD_V32(IUH9gW[0x1dd]),izD_V32(IUH9gW[0x1de]),izD_V32(IUH9gW[0x1df]),\"\\x60\\x5e\\x24\\x45\\x7b\\x66\\x29\\x66\\x7c\",izD_V32(IUH9gW[0x1e0]),izD_V32(IUH9gW[0x1e1]),izD_V32(IUH9gW[0x1e2]),izD_V32(IUH9gW[0x1e3]),izD_V32(IUH9gW[0x1e4]),\"\\u0038\\u0069\\u004b\\u0023\\u0068\\u0036\\u0057\\u007c\\u007d\\u0024\\u0040\",izD_V32(IUH9gW[0x1e5]),\"\\u003e\\u002c\\u0048\\u0039\\u0061\\u005f\\u0057\\u007c\\u002c\\u0029\\u0079\",izD_V32(IUH9gW[0x1e6]),izD_V32(IUH9gW[0x1e7]),izD_V32(IUH9gW[0x1e9]),izD_V32(IUH9gW[0x1ea]),izD_V32(IUH9gW[0x1eb]),izD_V32(IUH9gW[0x1ec]),izD_V32(IUH9gW[0x1ed]),izD_V32(IUH9gW[0x1ee]),\"\\u003d\\u003d\\u007c\\u0037\\u006e\\u0071\\u005a\\u003b\",izD_V32(IUH9gW[0x1ef]),izD_V32(IUH9gW[0x1f0]),izD_V32(IUH9gW[0x1f1]),izD_V32(IUH9gW[0x1f2]),\"\\u0059\\u006c\\u007c\\u0025\",izD_V32(IUH9gW[0x1f3]),\"\\x33\\x22\\x7c\\x4d\\x74\\x4d\\x73\\x31\",izD_V32(IUH9gW[0x1f4]),izD_V32(IUH9gW[0x1f5]),izD_V32(IUH9gW[0x1f6]),\"\\u005f\\u0074\\u005b\\u006f\\u0043\\u0075\\u0060\\u0065\\u0062\\u0059\\u007c\\u003c\\u0045\\u003a\\u0031\\u0075\\u0057\\u0062\",\"\\x7e\\x75\\x3e\\x6f\\x6f\\x7d\\x65\\x29\\x3a\\x60\\x7c\\x44\\x5e\\x7e\\x68\\x2b\",izD_V32(IUH9gW[0x1f7]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x7c\\x5b\\x33\\x48\\x67\\x35\\x22\\x6c\\x6a\\x29\\x29\\x2a\\x48\\x69\\x75\\x4c\\x46\\x50\\x55\\x56\\x40\\x74\\x68\\x31\\x35\\x59\\x41\\x7b\\x21\\x22\\x38\\x72\\x7b\\x4a\\x65\\x5b\\x7a\\x33\\x64\\x60\\x43\\x64\\x47\\x4f\\x4c\\x73\\x46\\x50\\x7a\\x72\\x6f\\x6f\\x4c\\x4d\\x45\\x77\",izD_V32(IUH9gW[0x1f8]),izD_V32(IUH9gW[0x1f9]),izD_V32(IUH9gW[0x1fa]),izD_V32(IUH9gW[0x1fb]),izD_V32(IUH9gW[0x1fc]),izD_V32(IUH9gW[0x1fd]),izD_V32(IUH9gW[0x1fe]),izD_V32(IUH9gW[0x1ff]),izD_V32(IUH9gW[0x200]),izD_V32(IUH9gW[0x201]),izD_V32(IUH9gW[0x202]),izD_V32(IUH9gW[0x203]),izD_V32(IUH9gW[0x204]),izD_V32(IUH9gW[0x206]),izD_V32(IUH9gW[0x207]),\"\\x5f\\x74\\x5b\\x6f\\x43\\x75\\x22\\x73\\x42\\x71\\x3a\\x7e\\x58\\x51\\x55\\x41\\x3c\\x64\\x74\\x49\\x23\\x58\\x4f\\x30\\x67\\x5e\\x3b\\x41\\x46\\x50\\x31\\x52\\x54\\x7c\\x55\\x3c\\x51\\x66\\x68\\x42\\x44\",izD_V32(IUH9gW[0x209]),izD_V32(IUH9gW[0x20c]),izD_V32(IUH9gW[0x20d]),\"\\u006b\\u0056\\u007c\\u0037\",\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x58\\x6c\\x7e\\x3f\\x63\\x3b\",izD_V32(IUH9gW[0x20f]),izD_V32(IUH9gW[0x210]),izD_V32(IUH9gW[0x211]),izD_V32(IUH9gW[0x212]),izD_V32(IUH9gW[0x213]),izD_V32(IUH9gW[0x214]),izD_V32(IUH9gW[0x215]),izD_V32(IUH9gW[0x144]),izD_V32(IUH9gW[0x216]),izD_V32(IUH9gW[0x217]),izD_V32(IUH9gW[0x218]),izD_V32(IUH9gW[0x219]),izD_V32(IUH9gW[0x21a]),izD_V32(IUH9gW[0x21c]),izD_V32(IUH9gW[0x21d]),izD_V32(IUH9gW[0x21e]),izD_V32(IUH9gW[0x21f]),izD_V32(IUH9gW[0x220]),izD_V32(IUH9gW[0x221]),izD_V32(IUH9gW[0x222]),izD_V32(IUH9gW[0x223]),izD_V32(IUH9gW[0x224]),izD_V32(IUH9gW[0x225]),izD_V32(IUH9gW[0x226]),izD_V32(IUH9gW[0x227]),izD_V32(IUH9gW[0x228]),izD_V32(IUH9gW[0x229]),\"\\u007c\\u0075\\u0069\\u006f\\u002c\",izD_V32(IUH9gW[0x22a]),izD_V32(IUH9gW[0x22b]),izD_V32(IUH9gW[0x22c]),izD_V32(IUH9gW[0x22d]),izD_V32(IUH9gW[0x22e]),izD_V32(IUH9gW[0x230]),izD_V32(IUH9gW[0x231]),izD_V32(IUH9gW[0x233]),izD_V32(IUH9gW[0x234]),izD_V32(IUH9gW[0x235]),\"\\u0031\\u0031\\u007c\\u0059\\u004b\\u0076\\u0049\\u003b\",izD_V32(IUH9gW[0x236]),izD_V32(IUH9gW[0x237]),izD_V32(IUH9gW[0x238]),izD_V32(IUH9gW[0x239]),izD_V32(IUH9gW[0x23a]),izD_V32(IUH9gW[0x23b]),izD_V32(IUH9gW[0x23c]),izD_V32(IUH9gW[0x23d]),izD_V32(IUH9gW[0x23e]),izD_V32(IUH9gW[0x23f]),izD_V32(IUH9gW[0x240]),izD_V32(IUH9gW[0x241]),izD_V32(IUH9gW[0x242]),izD_V32(IUH9gW[0x243]),izD_V32(IUH9gW[0x245]),izD_V32(IUH9gW[0x246]),izD_V32(IUH9gW[0x247]),izD_V32(IUH9gW[0x248]),izD_V32(IUH9gW[0x24a]),izD_V32(IUH9gW[0x24b]),izD_V32(IUH9gW[0x24c]),izD_V32(IUH9gW[0x24d]),izD_V32(IUH9gW[0x24e]),izD_V32(IUH9gW[0x24f]),izD_V32(IUH9gW[0x250]),izD_V32(IUH9gW[0x251]),izD_V32(IUH9gW[0x252]),izD_V32(IUH9gW[0x253]),izD_V32(IUH9gW[0x254]),izD_V32(IUH9gW[0x255]),izD_V32(IUH9gW[0x256]),\"\\x52\\x2f\\x2b\\x37\\x7c\\x46\\x79\\x73\",izD_V32(IUH9gW[0x257]),izD_V32(IUH9gW[0x258]),izD_V32(IUH9gW[0x259]),izD_V32(IUH9gW[0x25a]),izD_V32(IUH9gW[0x25c]),izD_V32(IUH9gW[0x25d]),izD_V32(IUH9gW[0x25e]),izD_V32(IUH9gW[0x262]),izD_V32(IUH9gW[0x264]),izD_V32(IUH9gW[0x265]),izD_V32(IUH9gW[0x266]),izD_V32(IUH9gW[0x267]),izD_V32(IUH9gW[0x268]),izD_V32(IUH9gW[0x269]),\"\\x45\\x46\\x56\\x35\\x33\\x7c\\x34\\x39\",izD_V32(IUH9gW[0x26b]),izD_V32(IUH9gW[0x26c]),\"\\x44\\x53\\x34\\x30\\x3e\\x4e\\x7c\\x73\",izD_V32(IUH9gW[0x26d]),izD_V32(IUH9gW[0x26e]),izD_V32(IUH9gW[0x26f]),izD_V32(IUH9gW[0x270]),izD_V32(IUH9gW[0x271]),izD_V32(IUH9gW[0x272]),izD_V32(IUH9gW[0x273]),izD_V32(IUH9gW[0x274]),izD_V32(IUH9gW[0x275]),izD_V32(IUH9gW[0x278]),izD_V32(IUH9gW[0x27a]),izD_V32(IUH9gW[0x27b]),izD_V32(IUH9gW[0x27c]),izD_V32(IUH9gW[0x27d]),izD_V32(IUH9gW[0x27e]),izD_V32(IUH9gW[0x27f]),\"\\x6c\\x2f\\x7e\\x72\\x7c\\x46\\x43\\x73\",izD_V32(IUH9gW[0x280]),izD_V32(IUH9gW[0x281]),izD_V32(IUH9gW[0x282]),izD_V32(IUH9gW[0x283]),izD_V32(IUH9gW[0x284]),izD_V32(IUH9gW[0x285]),izD_V32(IUH9gW[0x286]),izD_V32(IUH9gW[0x287]),izD_V32(IUH9gW[0x288]),\"\\x50\\x23\\x43\\x35\\x6d\\x4e\\x7c\\x73\",izD_V32(IUH9gW[0x289]),izD_V32(IUH9gW[0x28a]),izD_V32(IUH9gW[0x28b]),izD_V32(IUH9gW[0x28c]),izD_V32(IUH9gW[0x28d]),izD_V32(IUH9gW[0x28e]),izD_V32(IUH9gW[0x28f]),izD_V32(IUH9gW[0x290]),izD_V32(IUH9gW[0x291]),izD_V32(IUH9gW[0x292]),izD_V32(IUH9gW[0x293]),izD_V32(IUH9gW[0x294]),izD_V32(IUH9gW[0x295]),izD_V32(IUH9gW[0x296]),izD_V32(IUH9gW[0x298]),izD_V32(IUH9gW[0x299]),izD_V32(IUH9gW[0x29a]),izD_V32(IUH9gW[0x29b]),izD_V32(IUH9gW[0x29c]),izD_V32(IUH9gW[0x29d]),izD_V32(IUH9gW[0x29e]),izD_V32(IUH9gW[0x29f]),izD_V32(IUH9gW[0x2a0]),izD_V32(IUH9gW[0x2a1]),izD_V32(IUH9gW[0x2a2]),izD_V32(IUH9gW[0x2a4]),izD_V32(IUH9gW[0x2a5]),izD_V32(IUH9gW[0x2a6]),izD_V32(IUH9gW[0x2a7]),izD_V32(IUH9gW[0x2a8]),izD_V32(IUH9gW[0x2a9]),izD_V32(IUH9gW[0x2aa]),izD_V32(IUH9gW[0x2ab]),izD_V32(IUH9gW[0x2ac]),izD_V32(IUH9gW[0x2ad]),izD_V32(IUH9gW[0x2ae]),izD_V32(IUH9gW[0x2b0]),izD_V32(IUH9gW[0x2b1]),izD_V32(IUH9gW[0x2b2]),izD_V32(IUH9gW[0x2b3]),izD_V32(IUH9gW[0x2b4]),izD_V32(IUH9gW[0x2b5]),izD_V32(IUH9gW[0x2b6]),izD_V32(IUH9gW[0x2b7]),izD_V32(IUH9gW[0x2b8]),izD_V32(IUH9gW[0x2b9]),izD_V32(IUH9gW[0x2ba]),izD_V32(IUH9gW[0x2bb]),izD_V32(IUH9gW[0x2bc]),izD_V32(IUH9gW[0x2bd]),izD_V32(IUH9gW[0x2be]),izD_V32(IUH9gW[0x2bf]),izD_V32(IUH9gW[0x2c0]),izD_V32(IUH9gW[0x2c1]),izD_V32(IUH9gW[0x2c3]),izD_V32(IUH9gW[0x2c4]),\"\\x35\\x31\\x4e\\x4a\\x7c\\x65\\x79\\x22\\x56\\x7c\\x40\\x7d\\x3a\\x56\\x49\\x60\\x2b\\x7a\\x63\",izD_V32(IUH9gW[0x2c5]),izD_V32(IUH9gW[0x2c6]),izD_V32(IUH9gW[0x2c7]),izD_V32(IUH9gW[0x2c8]),izD_V32(IUH9gW[0x2c9]),izD_V32(IUH9gW[0x2ca]),izD_V32(IUH9gW[0x2cb]),izD_V32(IUH9gW[0x2cc]),\"\\x57\\x60\\x7c\\x37\",izD_V32(IUH9gW[0x2cd]),izD_V32(IUH9gW[0x2ce]),izD_V32(IUH9gW[0x2cf]),izD_V32(IUH9gW[0x2d0]),izD_V32(IUH9gW[0x2d1]),izD_V32(IUH9gW[0x2d2]),izD_V32(IUH9gW[0x2d3]),izD_V32(IUH9gW[0x2d4]),izD_V32(IUH9gW[0x2d5]),izD_V32(IUH9gW[0x2d6]),izD_V32(IUH9gW[0x2d7]),izD_V32(IUH9gW[0x2d8]),izD_V32(IUH9gW[0x2d9]),izD_V32(IUH9gW[0x2da]),izD_V32(IUH9gW[0x2db]),izD_V32(IUH9gW[0x2dc]),izD_V32(IUH9gW[0x2dd]),izD_V32(IUH9gW[0x2de]),izD_V32(IUH9gW[0x2df]),izD_V32(IUH9gW[0x2e1]),izD_V32(IUH9gW[0x2e2]),izD_V32(IUH9gW[0x2e3]),izD_V32(IUH9gW[0x2e4]),izD_V32(IUH9gW[0x2e5]),izD_V32(IUH9gW[0x2e6]),izD_V32(IUH9gW[0x2e7]),izD_V32(IUH9gW[0x2e8]),izD_V32(IUH9gW[0x2e9]),izD_V32(IUH9gW[0x2ea]),izD_V32(IUH9gW[0x2eb]),izD_V32(IUH9gW[0x2ec]),izD_V32(IUH9gW[0x2ed]),izD_V32(IUH9gW[0x2ee]),izD_V32(IUH9gW[0x2ef]),izD_V32(IUH9gW[0x2f0]),izD_V32(IUH9gW[0x2f1]),izD_V32(IUH9gW[0x2f2]),izD_V32(IUH9gW[0x2f3]),izD_V32(IUH9gW[0x2f4]),izD_V32(IUH9gW[0x2f5]),izD_V32(IUH9gW[0x2f6]),izD_V32(IUH9gW[0x2f7]),\"\\u003c\\u002f\\u004d\\u007b\\u006c\\u006d\\u0045\\u0070\\u007c\\u006b\\u0028\\u0036\\u003e\\u0022\\u0035\\u005a\\u0042\\u002f\\u0024\\u004b\\u0022\\u004f\\u0066\",izD_V32(IUH9gW[0x2f9]),izD_V32(IUH9gW[0x2fa]),izD_V32(IUH9gW[0x2fb]),izD_V32(IUH9gW[0x2fc]),izD_V32(IUH9gW[0x2fd]),izD_V32(IUH9gW[0x2fe]),izD_V32(IUH9gW[0x2ff]),izD_V32(IUH9gW[0x300]),izD_V32(IUH9gW[0x301]),izD_V32(IUH9gW[0x302]),izD_V32(IUH9gW[0x303]),izD_V32(IUH9gW[0x304]),izD_V32(IUH9gW[0x305]),izD_V32(IUH9gW[0x306]),izD_V32(IUH9gW[0x307]),izD_V32(IUH9gW[0x308]),izD_V32(IUH9gW[0x309]),\"\\x75\\x4b\\x5f\\x71\\x4c\\x7c\\x6c\\x47\",izD_V32(IUH9gW[0x30a]),izD_V32(IUH9gW[0x30b]),izD_V32(IUH9gW[0x30c]),izD_V32(IUH9gW[0x30d]),izD_V32(IUH9gW[0x30e]),izD_V32(IUH9gW[0x30f]),izD_V32(IUH9gW[0x310]),izD_V32(IUH9gW[0x311]),izD_V32(IUH9gW[0x312]),\"\\u003b\\u002c\\u002f\\u0044\\u0058\\u006e\\u0036\\u005b\\u003c\\u007c\\u004e\",izD_V32(IUH9gW[0x313]),izD_V32(IUH9gW[0x314]),izD_V32(IUH9gW[0x315]),izD_V32(IUH9gW[0x316]),izD_V32(IUH9gW[0x317]),izD_V32(IUH9gW[0x318]),izD_V32(IUH9gW[0x319]),izD_V32(IUH9gW[0x31b]),izD_V32(IUH9gW[0x31c]),izD_V32(IUH9gW[0x31d]),izD_V32(IUH9gW[0x31e]),izD_V32(IUH9gW[0x31f]),izD_V32(IUH9gW[0x320]),izD_V32(IUH9gW[0x321]),izD_V32(IUH9gW[0x322]),izD_V32(IUH9gW[0x323]),izD_V32(IUH9gW[0x324]),izD_V32(IUH9gW[0x325]),izD_V32(IUH9gW[0x326]),izD_V32(IUH9gW[0x327]),izD_V32(IUH9gW[0x328]),\"\\x4e\\x69\\x70\\x39\\x6e\\x64\\x4a\\x4b\\x7c\\x6e\\x67\\x43\\x4d\\x54\\x3c\",izD_V32(IUH9gW[0x329]),izD_V32(IUH9gW[0x32b]),\"\\u003a\\u0073\\u003e\\u0078\\u006a\\u007b\\u0046\\u007b\\u007c\\u006e\\u0067\\u0043\\u004d\\u0054\\u003c\",izD_V32(IUH9gW[0x32c]),\"\\u0042\\u0056\\u005f\\u0078\\u002e\\u005d\\u0079\\u004b\\u007c\\u006e\\u0067\\u0043\\u004d\\u0054\\u003c\",izD_V32(IUH9gW[0x32d]),izD_V32(IUH9gW[0x32f]),izD_V32(IUH9gW[0x330]),izD_V32(IUH9gW[0x332]),izD_V32(IUH9gW[0x333]),izD_V32(IUH9gW[0x334]),izD_V32(IUH9gW[0x335]),izD_V32(IUH9gW[0x336]),izD_V32(IUH9gW[0x337]),izD_V32(IUH9gW[0x338]),izD_V32(IUH9gW[0x339]),izD_V32(IUH9gW[0x33b]),izD_V32(IUH9gW[0x33c]),izD_V32(IUH9gW[0x33d]),izD_V32(IUH9gW[0x33e]),izD_V32(IUH9gW[0x33f]),izD_V32(IUH9gW[0x340]),izD_V32(IUH9gW[0x341]),izD_V32(IUH9gW[0x347]),izD_V32(IUH9gW[0x348]),izD_V32(IUH9gW[0x349]),izD_V32(IUH9gW[0x34a]),izD_V32(IUH9gW[0x34b]),izD_V32(IUH9gW[0x34c]),izD_V32(IUH9gW[0x34d]),izD_V32(IUH9gW[0x34e]),izD_V32(IUH9gW[0x34f]),izD_V32(IUH9gW[0x350]),izD_V32(IUH9gW[0x351]),izD_V32(IUH9gW[0x352]),izD_V32(IUH9gW[0x354]),izD_V32(IUH9gW[0x355]),izD_V32(IUH9gW[0x356]),izD_V32(IUH9gW[0x357]),izD_V32(IUH9gW[0x358]),izD_V32(IUH9gW[0x359]),izD_V32(IUH9gW[0x35a]),izD_V32(IUH9gW[0x35b]),\"\\x7c\\x63\\x70\\x76\",izD_V32(IUH9gW[0x35c]),izD_V32(IUH9gW[0x35d]),izD_V32(IUH9gW[0x35e]),izD_V32(IUH9gW[0x35f]),izD_V32(IUH9gW[0x360]),izD_V32(IUH9gW[0x361]),izD_V32(IUH9gW[0x362]),izD_V32(IUH9gW[0x363]),izD_V32(IUH9gW[0x364]),izD_V32(IUH9gW[0x365]),izD_V32(IUH9gW[0x366]),izD_V32(IUH9gW[0x367]),izD_V32(IUH9gW[0x368]),izD_V32(IUH9gW[0x369]),izD_V32(IUH9gW[0x36a]),izD_V32(IUH9gW[0x36b]),izD_V32(IUH9gW[0x36c]),izD_V32(IUH9gW[0x36d]),izD_V32(IUH9gW[0x36e]),izD_V32(IUH9gW[0x36f]),izD_V32(IUH9gW[0x370]),izD_V32(IUH9gW[0x371]),izD_V32(IUH9gW[0x372]),izD_V32(IUH9gW[0x373]),izD_V32(IUH9gW[0x374]),\"\\u0025\\u0037\\u004b\\u006d\\u007c\\u0038\\u003d\\u0047\",izD_V32(IUH9gW[0x375]),izD_V32(IUH9gW[0x376]),izD_V32(IUH9gW[0x377]),izD_V32(IUH9gW[0x379]),izD_V32(IUH9gW[0x37a]),izD_V32(IUH9gW[0x37b]),izD_V32(IUH9gW[0x37c]),izD_V32(IUH9gW[0x37d]),izD_V32(IUH9gW[0x380]),izD_V32(IUH9gW[0x381]),izD_V32(IUH9gW[0x382]),izD_V32(IUH9gW[0x383]),izD_V32(IUH9gW[0x384]),izD_V32(IUH9gW[0x385]),izD_V32(IUH9gW[0x386]),izD_V32(IUH9gW[0x387]),\"\\u0040\\u0040\\u0057\\u007b\\u006c\\u006d\\u007c\\u0061\",izD_V32(IUH9gW[0x388]),izD_V32(IUH9gW[0x389]),izD_V32(IUH9gW[0x38a]),izD_V32(IUH9gW[0x38b]),izD_V32(IUH9gW[0x38c]),izD_V32(IUH9gW[0x38d]),izD_V32(IUH9gW[0x38e]),izD_V32(IUH9gW[0x38f]),izD_V32(IUH9gW[0x390]),izD_V32(IUH9gW[0x391]),izD_V32(IUH9gW[0x392]),izD_V32(IUH9gW[0x393]),izD_V32(IUH9gW[0x394]),izD_V32(IUH9gW[0x395]),izD_V32(IUH9gW[0x396]),izD_V32(IUH9gW[0x397]),izD_V32(IUH9gW[0x398]),izD_V32(IUH9gW[0x399]),izD_V32(IUH9gW[0x39a]),izD_V32(IUH9gW[0x39b]),izD_V32(IUH9gW[0x39c]),izD_V32(IUH9gW[0x39d]),izD_V32(IUH9gW[0x39e]),izD_V32(IUH9gW[0x39f]),izD_V32(IUH9gW[0x3a0]),izD_V32(IUH9gW[0x3a1]),izD_V32(IUH9gW[0x3a2]),izD_V32(IUH9gW[0x3a3]),izD_V32(IUH9gW[0x3a4]),izD_V32(IUH9gW[0x3a5]),izD_V32(IUH9gW[0x3a6]),izD_V32(IUH9gW[0x3a7]),izD_V32(IUH9gW[0x3a8]),izD_V32(IUH9gW[0x3a9]),\"\\x77\\x56\\x7c\\x65\\x4a\\x59\\x70\\x3a\\x2e\",izD_V32(IUH9gW[0x3aa]),izD_V32(IUH9gW[0x3ab]),izD_V32(IUH9gW[0x3ac]),izD_V32(IUH9gW[0x3ad]),izD_V32(IUH9gW[0x3ae]),izD_V32(IUH9gW[0x3af]),izD_V32(IUH9gW[0x3b0]),izD_V32(IUH9gW[0x3b1]),izD_V32(IUH9gW[0x3b2]),izD_V32(IUH9gW[0x3b3]),izD_V32(IUH9gW[0x3b4]),izD_V32(IUH9gW[0x3b5]),izD_V32(IUH9gW[0x3b6]),izD_V32(IUH9gW[0x3b7]),izD_V32(IUH9gW[0x3b8]),izD_V32(IUH9gW[0x3b9]),izD_V32(IUH9gW[0x3ba]),izD_V32(IUH9gW[0x3bb]),\"\\x35\\x3c\\x7c\\x37\",izD_V32(IUH9gW[0x3bc]),izD_V32(IUH9gW[0x3bd]),izD_V32(IUH9gW[0x3be]),izD_V32(IUH9gW[0x3bf]),izD_V32(IUH9gW[0x3c0]),izD_V32(IUH9gW[0x3c1]),\"\\x7c\\x42\\x25\\x44\\x47\",izD_V32(IUH9gW[0x3c2]),izD_V32(IUH9gW[0x3c4]),izD_V32(IUH9gW[0x3c5]),\"\\x57\\x2b\\x7c\\x37\",izD_V32(IUH9gW[0x3c6]),izD_V32(IUH9gW[0x3c7]),izD_V32(IUH9gW[0x3c8]),izD_V32(IUH9gW[0x3c9]),izD_V32(IUH9gW[0x3ca]),izD_V32(IUH9gW[0x3cb]),izD_V32(IUH9gW[0x3cc]),izD_V32(IUH9gW[0x3cd]),izD_V32(IUH9gW[0x3ce]),izD_V32(IUH9gW[0x3cf]),izD_V32(IUH9gW[0x3d0]),izD_V32(IUH9gW[0x3d1]),izD_V32(IUH9gW[0x3d2]),izD_V32(IUH9gW[0x3d3]),izD_V32(IUH9gW[0x3d4]),izD_V32(IUH9gW[0x3d5]),izD_V32(IUH9gW[0x3d6]),izD_V32(IUH9gW[0x3d7]),izD_V32(IUH9gW[0x3d8]),izD_V32(IUH9gW[0x3d9]),izD_V32(IUH9gW[0x3da]),izD_V32(IUH9gW[0x3db]),izD_V32(IUH9gW[0x3dc]),izD_V32(IUH9gW[0x3dd]),izD_V32(IUH9gW[0x3de]),izD_V32(IUH9gW[0x3df]),izD_V32(IUH9gW[0x3e0]),izD_V32(IUH9gW[0x3e1]),izD_V32(IUH9gW[0x3e2]),izD_V32(IUH9gW[0x3e3]),izD_V32(IUH9gW[0x3e4]),izD_V32(IUH9gW[0x3e5]),izD_V32(IUH9gW[0x3e6]),izD_V32(IUH9gW[0x3e7]),izD_V32(IUH9gW[0x3e8]),izD_V32(IUH9gW[0x3e9]),izD_V32(IUH9gW[0x3ea]),izD_V32(IUH9gW[0x3eb]),izD_V32(IUH9gW[0x3ec]),izD_V32(IUH9gW[0x3ed]),izD_V32(IUH9gW[0x3ee]),izD_V32(IUH9gW[0x3ef]),izD_V32(IUH9gW[0x3f0]),izD_V32(IUH9gW[0x3f1]),izD_V32(IUH9gW[0x3f2]),izD_V32(IUH9gW[0x3f3]),izD_V32(IUH9gW[0x3f4]),izD_V32(IUH9gW[0x3f5]),izD_V32(IUH9gW[0x3f6]),izD_V32(IUH9gW[0x3f7]),izD_V32(IUH9gW[0x3f8]),izD_V32(IUH9gW[0x3f9]),izD_V32(IUH9gW[0x3fa]),izD_V32(IUH9gW[0x3fb]),izD_V32(IUH9gW[0x3fc]),izD_V32(IUH9gW[0x3fd]),izD_V32(IUH9gW[0x3fe]),izD_V32(IUH9gW[0x3ff]),izD_V32(IUH9gW[0x400]),izD_V32(IUH9gW[0x401]),izD_V32(IUH9gW[0x402]),izD_V32(IUH9gW[0x403]),izD_V32(IUH9gW[0x404]),izD_V32(IUH9gW[0x405]),\"\\u0061\\u006b\\u006c\\u0070\\u005b\\u007c\\u0042\\u004f\",\"\\x55\\x26\\x3f\\x53\\x3b\\x7c\\x3b\\x4f\",izD_V32(IUH9gW[0x406]),izD_V32(IUH9gW[0x407]),\"\\x2e\\x33\\x78\\x43\\x4c\\x7c\\x40\\x40\\x75\\x72\",izD_V32(IUH9gW[0x408]),izD_V32(IUH9gW[0x409]),izD_V32(IUH9gW[0x40a]),izD_V32(IUH9gW[0x40b]),izD_V32(IUH9gW[0x40c]),izD_V32(IUH9gW[0x40d]),izD_V32(IUH9gW[0x40e]),izD_V32(IUH9gW[0x40f]),izD_V32(IUH9gW[0x410]),izD_V32(IUH9gW[0x411]),\"\\x3a\\x35\\x73\\x44\\x5d\\x7a\\x47\\x4c\\x7c\\x26\\x72\\x22\\x55\\x71\\x63\\x39\\x7b\\x22\\x5a\\x72\\x7c\\x59\\x48\",izD_V32(IUH9gW[0x412]),izD_V32(IUH9gW[0x413]),izD_V32(IUH9gW[0x414]),\"\\x2e\\x33\\x78\\x43\\x4c\\x7c\\x61\\x4f\",izD_V32(IUH9gW[0x415]),izD_V32(IUH9gW[0x416]),izD_V32(IUH9gW[0x417]),izD_V32(IUH9gW[0x418]),izD_V32(IUH9gW[0x419]),izD_V32(IUH9gW[0x41a]),izD_V32(IUH9gW[0x41b]),izD_V32(IUH9gW[0x41c]),izD_V32(IUH9gW[0x41d]),izD_V32(IUH9gW[0x41f]),izD_V32(IUH9gW[0x420]),izD_V32(IUH9gW[0x180]),izD_V32(IUH9gW[0x421]),izD_V32(IUH9gW[0x422]),izD_V32(IUH9gW[0x423]),izD_V32(IUH9gW[0x424]),izD_V32(IUH9gW[0x425]),izD_V32(IUH9gW[0x426]),izD_V32(IUH9gW[0x428]),izD_V32(IUH9gW[0x429]),izD_V32(IUH9gW[0x42b]),\"\\u0064\\u0040\\u0062\\u0025\\u0060\\u002c\\u0050\\u0025\\u0071\\u004d\\u007c\\u0051\\u003b\\u004e\\u005a\",izD_V32(IUH9gW[0x42d]),izD_V32(IUH9gW[0x42e]),izD_V32(IUH9gW[0x42f]),\"\\u006b\\u0056\\u007c\\u0037\\u006d\\u0032\\u0059\\u0025\\u002e\",izD_V32(IUH9gW[0x430]),izD_V32(IUH9gW[0x431]),izD_V32(IUH9gW[0x432]),izD_V32(IUH9gW[0x433]),izD_V32(IUH9gW[0x434]),izD_V32(IUH9gW[0x435]),izD_V32(IUH9gW[0x436]),izD_V32(IUH9gW[0x437]),izD_V32(IUH9gW[0x439]),izD_V32(IUH9gW[0x43a]),izD_V32(IUH9gW[0x159]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x37\\x32\\x4d\\x5b\\x56\\x33\\x7c\\x77\",izD_V32(IUH9gW[0x43b]),izD_V32(IUH9gW[0x43c]),izD_V32(IUH9gW[0x43d]),izD_V32(IUH9gW[0x43e]),izD_V32(IUH9gW[0x43f]),izD_V32(IUH9gW[0x440]),\"\\u0068\\u003c\\u007c\\u0037\\u003b\\u006d\\u0025\\u003b\",izD_V32(IUH9gW[0x441]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x59\\x60\\x69\\x4c\\x55\\x30\\x77\",\"\\x25\\x56\\x7c\\x37\\x29\\x4f\\x6b\\x3b\",\"\\u0038\\u0031\\u002c\\u0038\\u007c\",izD_V32(IUH9gW[0x442]),izD_V32(IUH9gW[0x443]),izD_V32(IUH9gW[0x444]),izD_V32(IUH9gW[0x445]),izD_V32(IUH9gW[0x446]),izD_V32(IUH9gW[0x447]),izD_V32(IUH9gW[0x448]),izD_V32(IUH9gW[0x449]),izD_V32(IUH9gW[0x44a]),\"\\u0029\\u0031\\u0049\\u004a\\u0023\\u0024\\u0033\\u0060\\u0062\\u007c\",izD_V32(IUH9gW[0x44b]),izD_V32(IUH9gW[0x44c]),izD_V32(IUH9gW[0x44d]),izD_V32(IUH9gW[0x44e]),izD_V32(IUH9gW[0x44f]),izD_V32(IUH9gW[0x450]),izD_V32(IUH9gW[0x451]),izD_V32(IUH9gW[0x452]),izD_V32(IUH9gW[0x454]),izD_V32(IUH9gW[0x455]),izD_V32(IUH9gW[0x456]),izD_V32(IUH9gW[0x457]),izD_V32(IUH9gW[0x458]),izD_V32(IUH9gW[0x459]),izD_V32(IUH9gW[0x45a]),izD_V32(IUH9gW[0x45b]),izD_V32(IUH9gW[0x45c]),izD_V32(IUH9gW[0x45d]),izD_V32(IUH9gW[0x45e]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x47\\x77\",izD_V32(IUH9gW[0x45f]),izD_V32(IUH9gW[0x460]),izD_V32(IUH9gW[0x461]),izD_V32(IUH9gW[0x462]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u004d\\u0077\",izD_V32(IUH9gW[0x463]),izD_V32(IUH9gW[0x464]),izD_V32(IUH9gW[0x465]),\"\\u0047\\u0058\\u0072\\u002b\\u0072\\u005d\\u006a\\u0077\\u0075\\u007c\\u0060\\u0030\\u0062\",izD_V32(IUH9gW[0x466]),\"\\x2f\\x58\\x55\\x4a\\x5d\\x68\\x6d\\x60\\x53\\x73\\x7c\\x3f\\x62\",\"\\u003b\\u0077\\u0070\\u0026\\u0075\\u0047\\u006c\\u005e\\u0042\\u007a\\u0057\\u0079\\u0056\\u0030\\u0026\\u0051\\u0078\\u0077\\u007c\\u0049\\u003c\\u0075\\u004e\\u0048\\u003d\\u004e\\u0043\",izD_V32(IUH9gW[0x467]),izD_V32(IUH9gW[0x468]),izD_V32(IUH9gW[0x469]),izD_V32(IUH9gW[0x46a]),izD_V32(IUH9gW[0x46b]),izD_V32(IUH9gW[0x46c]),izD_V32(IUH9gW[0x46d]),izD_V32(IUH9gW[0x46e]),izD_V32(IUH9gW[0x46f]),izD_V32(IUH9gW[0x470]),izD_V32(IUH9gW[0x471]),izD_V32(IUH9gW[0x472]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x77\\x4f\\x3e\\x6e\\x23\\x33\\x35\\x58\\x34\\x65\\x48\\x29\\x70\\x22\\x71\\x3a\\x7a\",izD_V32(IUH9gW[0x473]),izD_V32(IUH9gW[0x474]),izD_V32(IUH9gW[0x475]),izD_V32(IUH9gW[0x476]),izD_V32(IUH9gW[0x477]),izD_V32(IUH9gW[0x478]),izD_V32(IUH9gW[0x479]),izD_V32(IUH9gW[0x47a]),izD_V32(IUH9gW[0x47b]),izD_V32(IUH9gW[0x47c]),izD_V32(IUH9gW[0x47e]),izD_V32(IUH9gW[0x47f]),izD_V32(IUH9gW[0x480]),izD_V32(IUH9gW[0x481]),izD_V32(IUH9gW[0x482]),izD_V32(IUH9gW[0x483]),\"\\u0066\\u002f\\u0071\\u0068\\u0061\\u005e\\u0034\\u0065\\u0023\\u004a\\u0033\\u005b\\u003e\\u002e\\u0028\\u0041\\u0035\\u0051\\u002e\\u007c\\u0026\\u006c\\u0077\",izD_V32(IUH9gW[0x484]),izD_V32(IUH9gW[0x485]),izD_V32(IUH9gW[0x486]),izD_V32(IUH9gW[0x487]),\"\\u002e\\u0024\\u0029\\u0053\\u007c\\u0030\\u0028\\u0068\\u0035\\u005f\\u002f\\u004f\\u003b\\u003d\",izD_V32(IUH9gW[0x488]),\"\\x2a\\x79\\x62\\x4d\\x28\\x7c\\x3a\\x73\\x6b\\x55\\x38\\x73\\x73\\x34\\x66\\x41\\x4c\\x41\\x66\\x5a\\x35\\x25\\x77\",izD_V32(IUH9gW[0x489]),izD_V32(IUH9gW[0x48a]),izD_V32(IUH9gW[0x48b]),izD_V32(IUH9gW[0x48c]),izD_V32(IUH9gW[0x48d]),izD_V32(IUH9gW[0x48e]),izD_V32(IUH9gW[0x48f]),izD_V32(IUH9gW[0x490]),izD_V32(IUH9gW[0x491]),izD_V32(IUH9gW[0x492]),izD_V32(IUH9gW[0x493]),izD_V32(IUH9gW[0x494]),izD_V32(IUH9gW[0x495]),\"\\x3c\\x55\\x4d\\x3f\\x79\\x32\\x50\\x34\\x57\\x75\\x50\\x4e\\x34\\x5e\\x48\\x35\\x7c\\x58\\x49\\x4a\\x7c\\x3f\\x49\\x3b\",izD_V32(IUH9gW[0x496]),izD_V32(IUH9gW[0x497]),izD_V32(IUH9gW[0x498]),izD_V32(IUH9gW[0x499]),izD_V32(IUH9gW[0x49a]),izD_V32(IUH9gW[0x49b]),izD_V32(IUH9gW[0x49c]),izD_V32(IUH9gW[0x49d]),izD_V32(IUH9gW[0x49e]),izD_V32(IUH9gW[0x49f]),izD_V32(IUH9gW[0x4a0]),izD_V32(IUH9gW[0x4a1]),izD_V32(IUH9gW[0x4a2]),izD_V32(IUH9gW[0x4a3]),izD_V32(IUH9gW[0x4a4]),izD_V32(IUH9gW[0x4a5]),izD_V32(IUH9gW[0x4a6]),izD_V32(IUH9gW[0x4a7]),izD_V32(IUH9gW[0x4a8]),izD_V32(IUH9gW[0x4a9]),izD_V32(IUH9gW[0x4aa]),izD_V32(IUH9gW[0x4ab]),izD_V32(IUH9gW[0x4ac]),izD_V32(IUH9gW[0x4ad]),izD_V32(IUH9gW[0x4ae]),izD_V32(IUH9gW[0x4af]),izD_V32(IUH9gW[0x4b0]),izD_V32(IUH9gW[0x4b1]),izD_V32(IUH9gW[0x4b2]),izD_V32(IUH9gW[0x4b3]),izD_V32(IUH9gW[0x4b4]),izD_V32(IUH9gW[0x4b5]),\"\\u006f\\u0054\\u007e\\u0043\\u0035\\u007d\\u0070\\u0072\\u0064\\u005f\\u007e\\u007e\\u0031\\u007c\\u0074\\u0064\",izD_V32(IUH9gW[0x4b6]),izD_V32(IUH9gW[0x4b7]),izD_V32(IUH9gW[0x4b8]),izD_V32(IUH9gW[0x4b9]),izD_V32(IUH9gW[0x4ba]),izD_V32(IUH9gW[0x4bb]),izD_V32(IUH9gW[0x4bc]),izD_V32(IUH9gW[0x4bd]),izD_V32(IUH9gW[0x4be]),izD_V32(IUH9gW[0x4bf]),izD_V32(IUH9gW[0x4c0]),izD_V32(IUH9gW[0x4c1]),izD_V32(IUH9gW[0x4c2]),izD_V32(IUH9gW[0x4c3]),izD_V32(IUH9gW[0x4c4]),izD_V32(IUH9gW[0x4c5]),izD_V32(IUH9gW[0x4c6]),izD_V32(IUH9gW[0x4c7]),izD_V32(IUH9gW[0x4c8]),izD_V32(IUH9gW[0x4c9]),izD_V32(IUH9gW[0x4ca]),izD_V32(IUH9gW[0x4cb]),izD_V32(IUH9gW[0x4cc]),izD_V32(IUH9gW[0x4cd]),izD_V32(IUH9gW[0x4ce]),izD_V32(IUH9gW[0x4cf]),\"\\u0058\\u005d\\u0028\\u007b\\u002c\\u0049\\u006b\\u0065\\u0051\\u004a\\u006c\\u0073\\u0076\\u004e\\u007c\\u0024\\u0069\\u0035\\u006c\\u0049\\u0031\\u0053\\u0077\",izD_V32(IUH9gW[0x4d0]),izD_V32(IUH9gW[0x4d2]),izD_V32(IUH9gW[0x4d3]),izD_V32(IUH9gW[0x4d4]),izD_V32(IUH9gW[0x4d5]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u002e\\u0077\",izD_V32(IUH9gW[0x4d6]),izD_V32(IUH9gW[0x4d7]),izD_V32(IUH9gW[0x4d9]),izD_V32(IUH9gW[0x4da]),\"\\u0068\\u003c\\u007c\\u0037\\u003b\\u006d\\u005d\\u0034\\u0068\\u0045\\u005b\",izD_V32(IUH9gW[0x4db]),izD_V32(IUH9gW[0x4dc]),izD_V32(IUH9gW[0x4dd]),izD_V32(IUH9gW[0x4de]),izD_V32(IUH9gW[0x4df]),izD_V32(IUH9gW[0x4e0]),izD_V32(IUH9gW[0x4e1]),\"\\x2b\\x4b\\x51\\x67\\x24\\x60\\x7a\\x7d\\x35\\x29\\x34\\x2a\\x79\\x70\\x2a\\x3c\\x68\\x57\\x39\\x5d\\x3f\\x58\\x38\\x31\\x7c\\x3d\\x4d\\x61\\x34\\x25\\x2b\\x5b\\x66\\x52\\x42\\x53\\x58\\x2c\\x5a\\x2e\\x54\\x3d\\x5b\\x71\\x66\\x22\\x46\\x50\\x6f\\x50\\x49\\x76\\x26\\x5a\",\"\\x72\\x68\\x28\\x73\\x30\\x71\\x3f\\x6d\\x75\\x67\\x73\\x66\\x3c\\x3e\\x3e\\x45\\x30\\x73\\x48\\x38\\x47\\x2a\\x38\\x77\\x41\\x44\\x47\\x57\\x42\\x78\\x21\\x43\\x5f\\x4d\\x29\\x6a\\x67\\x71\\x40\\x7a\\x2c\\x6c\\x47\\x57\\x39\\x5d\\x3f\\x58\\x3d\\x31\\x7c\\x3d\",izD_V32(IUH9gW[0x4e2]),izD_V32(IUH9gW[0x4e3]),izD_V32(IUH9gW[0x4e4]),izD_V32(IUH9gW[0x4e5]),izD_V32(IUH9gW[0x4e6]),izD_V32(IUH9gW[0x4e7]),izD_V32(IUH9gW[0x4e8]),izD_V32(IUH9gW[0x4e9]),izD_V32(IUH9gW[0x4ea]),izD_V32(IUH9gW[0x4eb]),izD_V32(IUH9gW[0x4ec]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x58\\x6c\\x67\\x70\\x77\",izD_V32(IUH9gW[0x4ed]),izD_V32(IUH9gW[0x4ee]),izD_V32(IUH9gW[0x4ef]),izD_V32(IUH9gW[0x4f0]),izD_V32(IUH9gW[0x4f1]),izD_V32(IUH9gW[0x4f2]),izD_V32(IUH9gW[0x4f3]),izD_V32(IUH9gW[0x4f4]),izD_V32(IUH9gW[0x4f5]),izD_V32(IUH9gW[0x4f6]),izD_V32(IUH9gW[0x4f7]),\"\\x3d\\x31\\x54\\x65\\x71\\x3f\\x49\\x3b\\x3c\\x67\\x40\\x73\\x7d\\x58\\x38\\x68\\x2b\\x67\\x77\\x6e\\x57\\x29\\x41\\x33\\x48\\x79\\x2b\\x28\\x42\\x56\\x42\\x43\\x22\\x4d\\x6f\\x64\\x73\\x33\\x34\\x59\\x38\\x72\\x36\\x66\\x54\\x3b\\x48\\x68\\x67\\x60\\x76\\x73\\x79\\x32\\x62\\x6c\\x65\\x73\\x62\\x6e\\x47\\x2f\\x7a\\x43\\x79\\x57\\x61\\x58\\x7b\\x2a\\x6b\\x6d\\x43\\x44\\x47\\x7c\\x4d\\x32\\x7a\\x4e\\x44\\x31\\x35\\x73\\x23\\x61\\x71\\x22\\x23\\x44\\x6a\\x57\\x5b\\x54\\x6c\",\"\\u0043\\u0039\\u005e\\u0038\\u006e\\u0050\\u007c\\u0069\\u004c\\u003c\\u0078\\u0028\\u0044\\u007b\\u0067\\u004c\\u002b\\u004b\\u004e\\u0078\\u003c\\u002c\\u0078\\u0057\\u0036\\u0030\\u002e\\u007e\\u0023\\u0077\\u0074\\u0075\\u0062\\u007a\\u0041\\u0067\\u003a\\u0025\\u002c\\u0055\\u0042\\u0058\\u002e\\u0022\\u0075\\u0077\\u0036\\u003c\\u0030\\u006c\\u007a\\u0032\\u005f\\u0043\\u0030\\u0073\\u0028\\u0029\\u004a\\u007b\\u0074\\u0045\\u0052\\u0053\\u0070\\u0028\\u0074\\u002f\\u0034\\u0075\\u0071\\u0058\\u007c\\u0037\\u0034\\u007d\\u006c\\u0025\\u002c\\u006c\\u004d\\u0030\\u0024\\u0055\\u0021\\u0035\\u0064\\u003c\\u0042\\u0037\\u0065\\u007d\\u006f\\u0060\\u005e\",\"\\x50\\x4c\\x60\\x2e\\x4d\\x61\\x65\\x3e\\x75\\x67\\x66\\x52\\x42\\x53\\x58\\x2c\\x2c\\x68\\x54\\x3d\\x5b\\x71\\x46\\x6b\\x6f\\x2f\\x31\\x28\\x37\\x3b\\x3b\\x6f\\x42\\x44\\x61\\x6c\\x34\\x7d\\x6a\\x3c\\x33\\x51\\x31\\x64\\x4a\\x3d\\x7c\\x2c\\x30\\x57\\x56\\x64\\x7b\\x2a\\x6b\\x6d\\x48\\x79\\x30\\x29\\x6a\\x32\\x58\\x4c\\x3d\\x55\\x7c\\x3d\\x5a\\x5b\\x7b\\x5f\\x59\\x6c\\x21\\x4a\\x34\\x3b\\x7e\\x7a\\x75\\x31\\x7c\\x3d\\x4d\\x61\\x65\\x3e\\x2b\\x5b\\x66\\x52\\x62\",izD_V32(IUH9gW[0x4f8]),izD_V32(IUH9gW[0x4f9]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\",izD_V32(IUH9gW[0x4fa]),\"\\x66\\x7a\\x6a\\x29\\x48\\x29\\x70\\x22\\x7c\\x45\",izD_V32(IUH9gW[0x4fb]),izD_V32(IUH9gW[0x4fc]),izD_V32(IUH9gW[0x4fd]),izD_V32(IUH9gW[0x4fe]),izD_V32(IUH9gW[0x4ff]),izD_V32(IUH9gW[0x500]),izD_V32(IUH9gW[0x501]),izD_V32(IUH9gW[0x502]),izD_V32(IUH9gW[0x503]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u0074\\u0060\\u006f\\u0044\",\"\\u0044\\u003d\\u007d\\u003f\\u0074\\u0030\\u0070\\u0034\\u0043\\u0073\\u0067\\u0028\\u0070\\u0076\\u002f\\u0060\\u0061\\u002b\\u007c\\u0037\",izD_V32(IUH9gW[0x504]),izD_V32(IUH9gW[0x505]),izD_V32(IUH9gW[0x506]),izD_V32(IUH9gW[0x507]),izD_V32(IUH9gW[0x508]),izD_V32(IUH9gW[0x509]),izD_V32(IUH9gW[0x50a]),izD_V32(IUH9gW[0x50b]),\"\\x48\\x4b\\x55\\x6e\\x70\\x54\\x56\\x63\\x36\\x44\\x25\\x3f\\x7e\\x74\\x59\\x4c\\x77\\x43\\x5b\\x64\\x50\\x43\\x63\\x2b\\x4f\\x64\\x4b\\x35\\x4c\\x77\\x2e\\x70\\x42\\x75\\x39\\x67\\x69\\x58\\x6d\\x4b\\x62\\x43\\x66\\x68\\x37\\x77\\x3e\\x4e\\x32\\x3e\\x55\\x22\\x47\\x38\\x75\\x65\\x26\\x58\\x2b\\x60\\x29\\x31\\x49\\x4a\\x51\\x5d\\x77\\x77\\x48\\x79\\x3c\\x21\\x6e\\x76\\x31\\x6f\\x4e\\x31\\x5f\\x3d\\x46\\x29\\x69\\x36\\x62\\x2b\\x38\\x36\\x5f\\x3e\\x44\\x49\\x67\\x4b\\x54\\x32\\x7e\\x33\\x76\\x33\\x76\\x6c\\x5a\\x5b\\x7b\\x35\\x75\\x4c\\x6a\\x5b\\x65\\x5b\\x62\\x6b\\x4b\\x4d\\x6d\\x64\\x67\\x71\\x29\\x22\\x42\\x50\\x5b\\x28\\x3e\\x3e\\x5b\\x4c\\x34\\x78\\x25\\x6a\\x6a\\x41\\x4d\\x2f\\x67\\x6c\\x42\\x42\\x73\\x6e\\x21\\x35\\x54\\x42\\x63\\x29\\x2c\\x2a\\x26\\x4c\\x53\\x73\\x77\\x72\\x54\\x3b\\x71\\x43\\x79\\x57\\x3e\\x3d\\x28\\x5d\\x44\\x5f\\x67\\x67\\x3b\\x7a\\x35\\x32\\x6d\\x2a\\x3d\\x58\\x24\\x59\\x44\\x6f\\x2f\\x77\\x70\\x5b\\x37\\x33\\x4c\\x3d\\x4d\\x47\\x4c\\x39\\x6a\\x2c\\x65\\x2b\\x56\\x2c\\x3a\\x44\\x6f\\x30\\x56\\x35\\x77\\x25\\x75\\x31\\x3d\\x38\\x3e\\x7e\\x4a\\x2c\\x50\\x79\\x24\\x5d\\x63\\x58\\x33\\x25\\x6c\\x58\\x47\\x69\\x65\\x55\\x61\\x45\\x48\\x79\\x21\\x3d\\x4f\\x7b\\x3c\\x43\\x79\\x4b\\x42\\x78\\x25\\x33\\x29\\x42\\x2f\\x37\\x47\\x67\\x58\\x53\\x5e\\x37\\x4e\\x4e\\x5b\\x64\\x53\\x6f\\x21\\x7a\\x24\\x59\\x51\\x5d\\x2f\\x77\\x55\\x5b\\x51\\x30\\x26\\x54\\x79\\x4d\\x4e\\x31\\x56\\x34\\x4d\\x64\\x7e\\x77\\x36\\x3c\\x34\\x4c\\x6a\\x32\\x5f\\x43\\x48\\x47\\x2c\\x38\\x65\\x2b\\x63\\x77\\x48\\x79\\x75\\x6a\\x4f\\x47\\x21\\x43\\x79\\x4b\\x23\\x76\\x26\\x33\\x69\\x33\\x4d\\x3f\\x24\\x5f\\x4d\\x69\\x4d\\x4c\\x21\\x57\\x67\\x63\\x7c\\x4e\\x54\\x61\\x71\\x64\\x78\\x4d\\x73\\x4c\\x29\\x56\\x79\\x28\\x54\\x3b\\x3e\\x45\\x79\\x4b\\x42\\x78\\x21\\x43\\x5f\\x4d\\x29\\x6a\\x67\\x71\\x40\\x7a\\x2c\\x6c\\x47\\x57\\x39\\x5d\\x3f\\x58\\x3d\\x31\\x7c\\x3d\",izD_V32(IUH9gW[0x50c]),izD_V32(IUH9gW[0x50d]),izD_V32(IUH9gW[0x50e]),izD_V32(IUH9gW[0x50f]),izD_V32(IUH9gW[0x510]),izD_V32(IUH9gW[0x511]),\"\\u007c\\u006d\\u0024\\u0073\\u0049\\u003e\\u0060\\u003b\",\"\\x6d\\x44\\x52\\x29\\x29\\x4f\\x24\\x25\\x34\\x7c\\x42\\x70\\x77\",izD_V32(IUH9gW[0x512]),izD_V32(IUH9gW[0x513]),izD_V32(IUH9gW[0x514]),izD_V32(IUH9gW[0x515]),izD_V32(IUH9gW[0x516]),izD_V32(IUH9gW[0x517]),izD_V32(IUH9gW[0x518]),izD_V32(IUH9gW[0x519]),izD_V32(IUH9gW[0x51a]),\"\\u003c\\u0055\\u007c\\u0037\\u0060\\u0055\\u006d\\u003b\",izD_V32(IUH9gW[0x51b]),izD_V32(IUH9gW[0x51c]),izD_V32(IUH9gW[0x51d]),izD_V32(IUH9gW[0x51e]),izD_V32(IUH9gW[0x51f]),izD_V32(IUH9gW[0x520]),izD_V32(IUH9gW[0x521]),izD_V32(IUH9gW[0x522]),izD_V32(IUH9gW[0x523]),izD_V32(IUH9gW[0x524]),izD_V32(IUH9gW[0x525]),izD_V32(IUH9gW[0x526]),\"\\x37\\x4d\\x25\\x4d\\x41\\x75\\x71\\x65\\x62\\x59\\x7c\\x3c\\x45\\x3a\\x49\",\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x58\\x6c\\x67\\x70\\x73\\x42\\x53\\x6f\\x74\\x60\\x24\\x65\\x64\\x55\\x4c\\x45\\x33\\x51\\x54\\x69\\x6e\\x35\\x56\\x4d\\x5d\\x31\\x64\\x29\\x54\\x7b\\x22\\x22\\x22\\x49\\x42\\x28\\x32\\x6f\\x48\\x35\\x22\\x49\\x70\\x4a\\x4b\\x76\\x61\\x23\\x65\\x73\\x7a\\x72\\x53\\x76\\x58\\x74\\x2e\\x3d\\x2b\\x65\\x34\\x2a\\x3b\\x6c\\x5a\\x49\\x6a\\x5b\\x5e\\x24\\x2f\\x60\\x61\\x2b\\x6a\\x29\\x57\\x41\\x4e\\x34\\x65\\x73\\x3e\\x64\\x2a\\x43\\x43\\x4d\\x6f\\x39\\x77\",izD_V32(IUH9gW[0x527]),\"\\x39\\x73\\x2e\\x64\\x46\\x29\\x3f\\x33\\x22\\x38\\x4f\\x64\\x5a\\x2f\\x2c\\x75\\x3c\\x2b\\x5d\\x2c\\x6b\\x3e\\x6c\\x66\\x53\\x50\\x43\\x3e\\x3e\\x3e\\x44\\x49\\x34\\x78\\x71\\x64\\x73\\x33\\x59\\x33\\x41\\x44\\x6a\\x57\\x7c\\x68\\x23\\x2a\\x23\\x61\\x46\\x59\\x48\\x6d\\x37\\x25\\x2c\\x6c\\x60\\x30\\x48\\x3c\\x26\\x71\\x43\\x39\\x5e\\x38\\x6e\\x50\\x7c\\x69\\x4c\\x3c\\x78\\x28\\x44\\x7b\\x67\\x4c\\x2b\\x4b\\x4e\\x78\\x3c\\x2c\\x78\\x57\\x36\\x30\\x2e\\x7e\\x23\\x77\\x74\\x75\\x62\\x7a\\x41\\x67\\x3a\\x25\\x2c\\x55\\x42\\x58\\x2e\\x22\\x75\\x77\\x36\\x3c\\x30\\x6c\\x7a\\x32\\x5f\\x43\\x30\\x73\\x28\\x29\\x4a\\x7b\\x70\\x3b\",\"\\x66\\x7a\\x24\\x59\\x58\\x35\\x7a\\x77\\x30\\x67\\x72\\x30\\x3b\\x48\\x74\\x47\\x75\\x31\\x73\\x3d\\x67\\x71\\x4a\\x2c\\x5a\\x49\\x5b\\x41\\x6b\\x48\\x42\\x43\\x47\\x58\\x50\\x4e\\x3a\\x71\\x46\\x6b\\x6f\\x2f\\x79\\x28\\x37\\x3b\\x72\\x47\\x56\\x53\\x4e\\x59\\x41\\x2a\\x65\\x61\\x5b\\x54\\x7c\\x63\\x38\\x3b\\x2c\\x75\\x35\\x31\\x71\\x65\\x49\\x3f\\x21\\x22\\x31\\x7c\\x36\\x51\\x36\\x7d\\x5d\\x75\\x6f\\x7a\\x70\\x59\\x58\\x35\\x59\\x33\\x41\\x44\\x32\\x58\\x3f\\x63\\x5b\\x43\\x79\\x57\\x5f\\x3d\\x5b\\x71\\x34\\x25\\x4e\\x6c\\x40\\x3a\\x50\\x5b\\x2c\\x75\\x62\\x3c\\x54\\x3d\\x5b\\x71\\x46\\x6b\\x4d\\x5b\\x78\\x28\\x37\\x3b\",izD_V32(IUH9gW[0x528]),izD_V32(IUH9gW[0x529]),izD_V32(IUH9gW[0x52a]),\"\\u006a\\u007b\\u006d\\u0032\\u004d\\u0071\\u0047\\u002b\\u004c\\u007d\\u0044\\u003c\\u0057\\u0022\\u007c\",izD_V32(IUH9gW[0x52b]),izD_V32(IUH9gW[0x52c]),izD_V32(IUH9gW[0x52d]),izD_V32(IUH9gW[0x52e]),izD_V32(IUH9gW[0x52f]),izD_V32(IUH9gW[0x530]),izD_V32(IUH9gW[0x531]),\"\\u0072\\u0040\\u0049\\u0067\\u0034\\u0077\\u004b\\u0065\\u0062\\u0059\\u007c\\u003c\\u0045\\u003a\\u0025\\u0024\\u0069\\u0035\\u0026\\u0026\\u002a\\u005d\\u0077\",izD_V32(IUH9gW[0x532]),izD_V32(IUH9gW[0x533]),izD_V32(IUH9gW[0x534]),izD_V32(IUH9gW[0x535]),izD_V32(IUH9gW[0x536]),izD_V32(IUH9gW[0x537]),izD_V32(IUH9gW[0x538]),izD_V32(IUH9gW[0x53a]),izD_V32(IUH9gW[0x53b]),\"\\x6b\\x51\\x28\\x4a\\x7c\\x7d\\x40\\x77\",izD_V32(IUH9gW[0x53c]),izD_V32(IUH9gW[0x53d]),izD_V32(IUH9gW[0x53e]),izD_V32(IUH9gW[0x53f]),izD_V32(IUH9gW[0x540]),izD_V32(IUH9gW[0x541]),izD_V32(IUH9gW[0x543]),izD_V32(IUH9gW[0x544]),izD_V32(IUH9gW[0x546]),izD_V32(IUH9gW[0x547]),izD_V32(IUH9gW[0x548]),\"\\x6d\\x58\\x76\\x29\\x67\\x5b\\x30\\x2f\\x4a\\x50\\x69\\x51\\x7c\\x78\\x53\",izD_V32(IUH9gW[0x549]),izD_V32(IUH9gW[0x54a]),izD_V32(IUH9gW[0x54b]),izD_V32(IUH9gW[0x54c]),izD_V32(IUH9gW[0x54d]),izD_V32(IUH9gW[0x54e]),izD_V32(IUH9gW[0x54f]),izD_V32(IUH9gW[0x550]),\"\\x65\\x58\\x74\\x33\\x4d\\x7d\\x50\\x44\\x2e\\x22\\x73\\x49\\x67\\x4a\\x76\\x5b\\x7c\\x4c\\x3c\\x5b\\x35\\x7d\\x2a\\x66\\x2e\\x74\\x34\\x44\\x4f\\x39\\x5f\\x70\",izD_V32(IUH9gW[0x552]),\"\\u007c\\u004c\\u003c\\u005b\\u0035\\u007d\\u002a\\u0066\\u002e\\u0074\\u0034\\u0044\\u004f\\u0039\\u005f\\u0070\",\"\\u007a\\u007b\\u0052\\u0075\\u007c\\u0030\\u0028\\u0068\\u0035\\u005f\\u002f\\u004f\\u003b\\u003d\",izD_V32(IUH9gW[0x553]),izD_V32(IUH9gW[0x554]),izD_V32(IUH9gW[0x555]),izD_V32(IUH9gW[0x556]),izD_V32(IUH9gW[0x557]),izD_V32(IUH9gW[0x558]),\"\\x6b\\x56\\x7c\\x37\\x74\\x55\\x78\\x3b\",izD_V32(IUH9gW[0x559]),izD_V32(IUH9gW[0x55a]),izD_V32(IUH9gW[0x55b]),izD_V32(IUH9gW[0x55c]),izD_V32(IUH9gW[0x55d]),izD_V32(IUH9gW[0x55e]),izD_V32(IUH9gW[0x55f]),\"\\u003c\\u0055\\u007c\\u0037\\u0060\\u0055\\u0053\\u006c\\u0071\\u003a\\u003c\",izD_V32(IUH9gW[0x561]),\"\\u003b\\u0077\\u007c\\u0049\\u0039\\u002c\\u0059\\u0076\\u0028\\u0025\\u0023\\u0053\\u0075\\u005f\\u002f\\u0048\\u006c\\u003b\",\"\\u003b\\u0047\\u0023\\u0056\\u0075\\u005a\\u007a\\u0029\\u004d\\u003e\\u007b\\u0057\\u002a\\u007c\\u0076\\u005b\\u002a\\u005e\\u002a\\u0053\",izD_V32(IUH9gW[0x562]),izD_V32(IUH9gW[0x563]),izD_V32(IUH9gW[0x564]),izD_V32(IUH9gW[0x565]),izD_V32(IUH9gW[0x566]),izD_V32(IUH9gW[0x567]),izD_V32(IUH9gW[0x568]),izD_V32(IUH9gW[0x569]),izD_V32(IUH9gW[0x56a]),izD_V32(IUH9gW[0x56b]),izD_V32(IUH9gW[0x56c]),izD_V32(IUH9gW[0x56d]),izD_V32(IUH9gW[0x56e]),izD_V32(IUH9gW[0x56f]),izD_V32(IUH9gW[0x570]),izD_V32(IUH9gW[0x571]),izD_V32(IUH9gW[0x572]),izD_V32(IUH9gW[0x573]),izD_V32(IUH9gW[0x574]),izD_V32(IUH9gW[0x575]),izD_V32(IUH9gW[0x576]),\"\\u007c\\u0058\\u005d\\u0059\\u004c\",izD_V32(IUH9gW[0x577]),izD_V32(IUH9gW[0x578]),\"\\u007e\\u002b\\u003f\\u002c\\u0074\\u0041\\u0028\\u0034\\u0037\\u0049\\u0057\\u0070\\u0053\\u0076\\u007c\\u0060\\u0064\\u0044\\u003b\\u0029\\u0076\\u003e\\u0040\\u0038\\u0074\\u004c\\u004e\\u005b\\u0068\\u006e\\u002f\",izD_V32(IUH9gW[0x579]),izD_V32(IUH9gW[0x57a]),izD_V32(IUH9gW[0x57b]),izD_V32(IUH9gW[0x57c]),izD_V32(IUH9gW[0x57d]),izD_V32(IUH9gW[0x57e]),izD_V32(IUH9gW[0x57f]),\"\\x54\\x29\\x23\\x70\\x25\\x3f\\x64\\x6a\\x7c\\x65\",izD_V32(IUH9gW[0x580]),\"\\u0071\\u0071\\u005d\\u0067\\u0028\\u007c\\u0050\\u0047\\u003d\\u004f\\u002e\\u0073\\u0029\\u004c\\u0055\\u0041\\u006b\\u0038\\u0066\\u005a\\u0056\\u0033\\u0077\",izD_V32(IUH9gW[0x581]),izD_V32(IUH9gW[0x582]),izD_V32(IUH9gW[0x583]),\"\\x39\\x37\\x2c\\x21\\x4d\\x71\\x2f\\x58\\x3d\\x4f\\x2e\\x73\\x29\\x4c\\x74\\x7b\\x68\\x51\\x47\\x49\\x5e\\x77\\x79\\x6a\\x7c\\x65\\x6f\\x59\\x47\\x38\",\"\\x6b\\x56\\x7c\\x37\\x74\\x55\\x6f\\x3a\\x60\\x5b\\x4e\\x6e\\x37\\x5e\",\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x58\\x6c\\x67\\x70\\x73\\x42\\x53\\x6f\\x74\\x60\\x24\\x65\\x64\\x55\\x4c\\x45\\x33\\x51\\x54\\x69\\x6e\\x35\\x56\\x4d\\x5d\\x31\\x64\\x29\\x54\\x7b\\x22\\x22\\x33\\x3a\\x26\\x3a\\x26\\x58\\x47\\x74\\x62\\x3d\\x48\\x58\\x7b\\x3e\\x4c\\x73\\x69\\x72\\x72\\x30\\x44\\x24\\x70\\x35\\x3a\\x61\\x49\\x4a\\x4c\\x4f\\x28\\x34\\x37\\x49\\x2c\\x5b\\x49\\x76\\x50\\x43\\x6c\\x3d\\x42\\x4a\\x56\\x7b\\x62\",izD_V32(IUH9gW[0x584]),\"\\x3b\\x47\\x2c\\x2f\\x4a\\x7a\\x3f\\x65\\x62\\x59\\x7c\\x3c\\x45\\x3a\\x21\\x49\\x29\\x62\",izD_V32(IUH9gW[0x585]),\"\\x3b\\x77\\x24\\x26\\x54\\x4d\\x51\\x37\\x40\\x71\\x71\\x24\\x6d\\x3a\\x3f\\x78\\x3f\\x56\\x79\\x36\\x79\\x30\\x61\\x78\\x33\\x60\\x69\\x3e\\x7c\\x7e\\x25\\x5b\\x42\\x4b\\x62\",izD_V32(IUH9gW[0x586]),izD_V32(IUH9gW[0x587]),izD_V32(IUH9gW[0x588]),izD_V32(IUH9gW[0x589]),izD_V32(IUH9gW[0x58a]),izD_V32(IUH9gW[0x58b]),izD_V32(IUH9gW[0x58c]),izD_V32(IUH9gW[0x58d]),izD_V32(IUH9gW[0x58e]),izD_V32(IUH9gW[0x58f]),izD_V32(IUH9gW[0x590]),izD_V32(IUH9gW[0x591]),izD_V32(IUH9gW[0x592]),izD_V32(IUH9gW[0x593]),izD_V32(IUH9gW[0x594]),izD_V32(IUH9gW[0x595]),izD_V32(IUH9gW[0x596]),\"\\x2a\\x79\\x62\\x4d\\x28\\x7c\\x74\\x5a\\x3d\\x4f\\x53\\x3c\\x5f\\x6b\\x21\\x49\\x37\\x62\",izD_V32(IUH9gW[0x597]),izD_V32(IUH9gW[0x598]),izD_V32(IUH9gW[0x599]),izD_V32(IUH9gW[0x59a]),izD_V32(IUH9gW[0x59b]),izD_V32(IUH9gW[0x59c]),izD_V32(IUH9gW[0x59d]),izD_V32(IUH9gW[0x59e]),izD_V32(IUH9gW[0x59f]),izD_V32(IUH9gW[0x5a0]),izD_V32(IUH9gW[0x5a1]),izD_V32(IUH9gW[0x5a2]),izD_V32(IUH9gW[0x5a3]),\"\\x3d\\x31\\x25\\x2a\\x71\\x3f\\x62\\x6c\\x65\\x73\\x4b\\x3a\\x37\\x3b\\x37\\x54\\x56\\x6d\\x50\\x3f\\x42\\x4a\\x37\\x3a\\x48\\x79\\x36\\x71\\x55\\x63\\x39\\x5d\\x35\\x7a\\x30\\x2b\\x34\\x7d\\x44\\x5f\\x5b\\x54\\x44\\x3e\\x2f\\x7b\\x3e\\x6b\\x37\\x33\\x7d\\x3f\\x2c\\x7d\\x4a\\x30\\x37\\x50\\x79\\x57\\x7c\\x68\\x2a\\x75\\x58\\x58\\x34\\x47\\x22\\x4f\\x40\\x3e\\x3f\\x50\\x23\\x70\\x38\\x6f\\x3b\\x68\\x31\\x31\\x3e\\x3d\\x68\\x68\\x5b\\x2e\\x53\\x73\\x59\\x59\\x68\\x77\\x4d\\x58\\x5e\\x3c\\x6e\\x2e\\x54\\x65\\x49\\x55\\x64\\x51\\x3c\\x70\\x4c\\x41\\x7e\\x35\\x63\\x29\\x6a\\x29\\x21\\x71\\x6c\\x22\\x4e\\x50\\x5a\\x50\\x49\\x76\\x58\\x4c\\x67\\x54\\x34\\x3d\\x78\\x4d\\x4a\\x30\\x23\\x51\\x36\\x66\\x54\\x48\\x21\\x35\\x72\\x2b\\x24\\x73\\x52\\x6e\\x31\\x2f\\x65\\x6c\\x77\\x72\\x3c\\x3e\\x4b\\x4c\\x3d\\x7a\\x7c\\x3d\\x6e\\x33\\x7c\\x77\\x46\\x73\\x6a\\x38\\x49\\x23\\x6d\\x54\\x52\\x4d\\x32\\x6c\\x5d\\x67\\x42\\x3b\\x4a\\x50\\x7e\\x29\\x52\\x66\\x3e\\x47\\x37\\x33\\x61\\x73\\x52\\x6e\\x6b\\x6c\\x4c\\x51\\x42\\x28\\x2a\\x5e\\x79\\x2a\\x75\\x60\\x3b\",\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x58\\x6c\\x67\\x70\\x73\\x42\\x53\\x6f\\x74\\x60\\x24\\x65\\x64\\x55\\x4e\\x3b\",izD_V32(IUH9gW[0x5a4]),\"\\x33\\x31\\x5d\\x65\\x60\\x41\\x5e\\x73\\x6f\\x3a\\x43\\x40\\x62\\x43\\x50\\x5a\\x6a\\x42\\x7c\\x37\\x34\\x5f\\x5a\\x3b\",izD_V32(IUH9gW[0x5a5]),izD_V32(IUH9gW[0x5a6]),\"\\u0047\\u0031\\u007c\\u0037\\u0035\\u004f\\u006e\\u0022\\u0043\\u0051\\u004e\\u005b\\u0048\\u0042\\u0064\\u002a\\u0034\\u0056\\u007a\\u003f\\u0042\\u004a\\u006b\\u003b\",izD_V32(IUH9gW[0x5a7]),izD_V32(IUH9gW[0x5a8]),izD_V32(IUH9gW[0x5a9]),izD_V32(IUH9gW[0x5aa]),izD_V32(IUH9gW[0x5ab]),izD_V32(IUH9gW[0x5ac]),izD_V32(IUH9gW[0x5ad]),izD_V32(IUH9gW[0x5ae]),izD_V32(IUH9gW[0x5af]),izD_V32(IUH9gW[0x5b0]),izD_V32(IUH9gW[0x5b1]),izD_V32(IUH9gW[0x5b2]),izD_V32(IUH9gW[0x5b3]),izD_V32(IUH9gW[0x5b4]),izD_V32(IUH9gW[0x5b5]),izD_V32(IUH9gW[0x5b6]),izD_V32(IUH9gW[0x5b7]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u006a\\u0073\\u007a\\u0072\\u0053\\u0076\\u0058\\u0074\\u002e\\u003d\\u002b\\u0065\\u003c\\u0029\\u0046\\u0034\\u002f\\u0050\\u004e\\u006e\\u0029\\u0076\\u0058\\u0074\\u0022\\u006c\\u006e\\u0044\",izD_V32(IUH9gW[0x5b8]),izD_V32(IUH9gW[0x5b9]),izD_V32(IUH9gW[0x5ba]),izD_V32(IUH9gW[0x5bb]),izD_V32(IUH9gW[0x5bc]),izD_V32(IUH9gW[0x5bd]),izD_V32(IUH9gW[0x5bf]),izD_V32(IUH9gW[0x5c0]),izD_V32(IUH9gW[0x5c1]),izD_V32(IUH9gW[0x5c2]),izD_V32(IUH9gW[0x5c3]),izD_V32(IUH9gW[0x5c4]),izD_V32(IUH9gW[0x5c5]),izD_V32(IUH9gW[0x5c6]),izD_V32(IUH9gW[0x5c7]),izD_V32(IUH9gW[0x5c8]),izD_V32(IUH9gW[0x5c9]),izD_V32(IUH9gW[0x5ca]),izD_V32(IUH9gW[0x5cb]),izD_V32(IUH9gW[0x5cc]),izD_V32(IUH9gW[0x5cd]),izD_V32(IUH9gW[0x5ce]),izD_V32(IUH9gW[0x5cf]),\"\\u0047\\u0055\\u007c\\u0037\\u0060\\u0055\\u006d\\u003b\",izD_V32(IUH9gW[0x5d0]),izD_V32(IUH9gW[0x5d1]),izD_V32(IUH9gW[0x5d2]),izD_V32(IUH9gW[0x5d3]),izD_V32(IUH9gW[0x5d4]),izD_V32(IUH9gW[0x5d5]),izD_V32(IUH9gW[0x5d6]),izD_V32(IUH9gW[0x5d7]),izD_V32(IUH9gW[0x5d8]),izD_V32(IUH9gW[0x5d9]),izD_V32(IUH9gW[0x5da]),izD_V32(IUH9gW[0x5db]),izD_V32(IUH9gW[0x5dc]),izD_V32(IUH9gW[0x5dd]),izD_V32(IUH9gW[0x5de]),izD_V32(IUH9gW[0x5df]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x7a\\x72\\x53\\x76\\x58\\x74\\x2e\\x3d\\x2b\\x65\\x3c\\x29\\x62\",izD_V32(IUH9gW[0x5e0]),izD_V32(IUH9gW[0x5e1]),izD_V32(IUH9gW[0x5e2]),\"\\u003d\\u0031\\u0025\\u002a\\u0071\\u003f\\u0062\\u006c\\u0065\\u0073\\u004b\\u003a\\u0037\\u003b\\u0037\\u0054\\u0056\\u006d\\u0050\\u003f\\u0042\\u004a\\u0037\\u003a\\u0048\\u0079\\u0036\\u0071\\u0055\\u0063\\u0039\\u005d\\u0035\\u007a\\u0030\\u002b\\u0034\\u007d\\u0044\\u005f\\u005b\\u0054\\u0044\\u003e\\u002f\\u007b\\u003e\\u006b\\u0037\\u0033\\u007d\\u003f\\u002c\\u007d\\u004a\\u0030\\u0037\\u0050\\u0079\\u0057\\u007c\\u0068\\u002a\\u0075\\u0058\\u0058\\u0034\\u0047\\u0022\\u004f\\u0062\",izD_V32(IUH9gW[0x5e3]),izD_V32(IUH9gW[0x5e4]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u006a\\u0073\\u007a\\u0072\\u0053\\u0076\\u0058\\u0074\\u002e\\u003d\\u002b\\u0065\\u003c\\u0029\\u0046\\u0034\\u002f\\u0050\\u004e\\u006e\\u0029\\u0076\\u0058\\u0074\\u0022\\u006c\\u006a\\u0029\\u0029\\u002a\\u006f\\u0034\\u006b\\u0051\\u004a\\u0051\\u004e\\u0043\\u002a\\u005d\\u007d\\u0068\\u007a\\u002b\\u0029\\u002a\\u0050\\u0022\\u0071\\u003a\\u0056\\u0040\\u0062\\u0043\\u0050\\u005a\\u006a\\u0042\\u007c\\u0037\\u0034\\u005f\\u002b\\u0034\\u006e\\u0037\\u0052\\u0073\\u0061\\u0056\\u003d\\u0031\",izD_V32(IUH9gW[0x5e5]),izD_V32(IUH9gW[0x5e6]),izD_V32(IUH9gW[0x5e7]),izD_V32(IUH9gW[0x5e8]),izD_V32(IUH9gW[0x5e9]),izD_V32(IUH9gW[0x5ea]),izD_V32(IUH9gW[0x5ed]),izD_V32(IUH9gW[0x5ee]),izD_V32(IUH9gW[0x5ef]),izD_V32(IUH9gW[0x5f0]),izD_V32(IUH9gW[0x5f1]),izD_V32(IUH9gW[0x5f2]),izD_V32(IUH9gW[0x5f3]),izD_V32(IUH9gW[0x5f4]),izD_V32(IUH9gW[0x5f6]),izD_V32(IUH9gW[0x5f7]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x7a\\x72\\x53\\x76\\x2f\",izD_V32(IUH9gW[0x5f8]),izD_V32(IUH9gW[0x5fa]),izD_V32(IUH9gW[0x5fb]),izD_V32(IUH9gW[0x5fc]),izD_V32(IUH9gW[0x5fd]),izD_V32(IUH9gW[0x5fe]),izD_V32(IUH9gW[0x5ff]),izD_V32(IUH9gW[0x600]),izD_V32(IUH9gW[0x601]),\"\\x39\\x54\\x50\\x4e\\x6c\\x50\\x42\\x2e\\x78\\x28\\x58\\x57\\x39\\x5d\\x3a\\x25\\x2e\\x31\\x7c\\x3d\\x5a\\x5b\\x43\\x6c\\x31\\x72\\x33\\x6e\\x4c\\x78\\x5b\\x43\\x41\\x66\\x69\\x3b\\x38\\x59\\x2e\\x66\\x69\\x4c\\x78\\x4e\\x6c\\x23\\x29\\x6b\\x52\\x4d\\x32\\x6c\\x5d\\x67\\x42\\x3b\\x4a\\x50\\x7e\\x29\\x52\\x66\\x3e\\x47\\x48\\x47\\x2c\\x38\\x31\\x21\\x63\\x77\\x48\\x79\\x75\\x6a\\x25\\x67\\x3c\\x43\\x79\\x4b\\x39\\x5d\\x37\",\"\\x5a\\x2e\\x54\\x3d\\x5b\\x71\\x66\\x22\\x46\\x50\\x6f\\x50\\x49\\x76\\x26\\x5a\\x72\\x68\\x28\\x73\\x30\\x71\\x57\\x77\\x42\\x67\\x5d\\x30\\x3b\\x3b\\x62\\x6b\\x21\\x4b\\x4b\\x3b\\x71\\x4e\\x4a\\x66\\x65\\x66\\x4f\\x79\\x54\\x22\\x59\\x6c\\x49\\x3f\\x5a\\x3b\\x7c\\x2c\\x39\\x57\\x42\\x58\\x7b\\x2a\\x7c\\x77\\x48\\x79\\x38\\x2e\\x73\\x25\\x71\\x43\\x50\\x67\\x65\\x66\\x7a\\x67\\x63\\x77\\x48\\x79\\x75\\x6a\\x21\\x67\\x44\",\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u006a\\u0073\\u007a\\u0072\\u0053\\u0076\\u0058\\u0074\\u002e\\u003d\\u002b\\u0065\\u003c\\u0029\\u0046\\u0034\\u002f\\u0050\\u004e\\u006e\\u0029\\u0076\\u0058\\u0074\\u0022\\u006c\\u006a\\u0029\\u0029\\u002a\\u006f\\u0034\\u006b\\u0051\\u004a\\u0051\\u004e\\u0043\\u002a\\u005d\\u007d\\u0068\\u007a\\u002b\\u0029\\u002a\\u0050\\u0022\\u0071\\u003a\\u0056\\u0040\\u0062\\u0043\\u0050\\u005a\\u006a\\u0042\\u007c\\u0037\\u0034\\u005f\\u002b\\u0034\\u006e\\u0037\\u0052\\u0073\\u0061\\u0056\\u003d\\u0031\\u005e\\u0053\\u005d\\u005e\\u0070\\u0032\\u005d\\u0034\\u004b\\u0070\\u006a\\u005b\\u005e\\u006e\\u0039\\u0056\\u0064\\u0060\\u007b\\u0066\\u0033\\u004f\\u0069\\u002f\\u0057\\u0050\\u0029\\u0022\\u0029\\u0043\\u0070\\u0060\\u005e\\u006b\\u0032\\u0073\\u0024\\u003e\\u0070\\u0034\\u0053\\u0072\\u0035\\u007e\\u005a\\u0064\\u0049\\u0033\\u0045\\u0029\\u0044\\u0034\\u0049\\u003f\\u0059\\u0025\\u0078\\u006b\\u0059\\u0041\\u0045\\u0058\\u0025\\u0033\\u0063\\u0029\\u0032\\u006a\\u0033\\u005f\\u005b\\u006d\\u0028\\u0042\\u002b\\u0047\\u0022\\u0064\\u005a\\u006f\\u006b\\u006d\\u0032\\u0073\\u002c\\u0060\\u0028\\u005b\\u004a\\u0021\\u0029\\u003f\\u007b\\u0047\\u0062\\u007a\\u0072\\u0060\\u006d\\u004e\\u006c\\u007b\\u0033\\u0041\\u0038\\u002f\\u0069\\u0064\\u005a\\u002f\\u004e\\u004c\\u0042\\u0068\\u007b\\u002e\\u004c\\u0050\\u0021\\u0055\\u007b\\u0051\\u0031\\u0067\\u002f\\u0043\\u006e\\u0065\\u003f\\u004c\\u0048\\u007e\\u0049\\u003f\\u005a\\u006d\\u007b\\u0056\\u0049\\u0065\\u006d\\u0064\\u0044\\u0047\\u0076\\u0030\\u0061\\u006c\\u0078\\u0024\\u0065\\u0045\\u0063\\u0044\\u0032\\u0073\\u0054\\u0068\\u007d\\u0047\\u0073\\u0058\\u0021\\u002b\\u0030\\u005d\\u0026\\u0035\\u0038\\u007e\\u0059\\u0035\\u0035\\u0058\\u0048\\u005d\\u002b\\u0055\\u006a\\u002c\\u004a\\u007e\\u006a\\u0045\\u0079\\u0051\\u0058\\u0033\\u0074\\u0078\\u003e\\u0065\\u0044\\u002c\\u004d\\u0064\\u0053\\u0050\\u006d\\u006b\\u007b\\u0042\\u0056\\u0049\\u0026\\u006f\\u005a\\u006f\\u0054\\u0053\\u0054\\u003f\\u002f\\u003f\\u0026\\u0038\\u006d\\u006c\\u005a\\u0067\\u0043\\u0076\\u002e\\u006f\\u0024\\u002e\\u0066\\u0065\\u0043\\u006f\\u0045\\u0023\\u002e\\u005b\\u003f\\u005d\\u0053\\u0056\\u0037\\u0049\\u0046\\u0054\\u0049\\u004a\\u0034\\u004f\\u0069\\u002f\\u002f\\u0050\\u007e\\u0070\\u0061\\u0066\\u0048\\u0035\\u0031\\u003c\\u004d\\u0070\\u0078\\u0055\\u002e\\u003a\\u0078\\u006b\\u005a\\u007e\\u005a\\u007b\\u003d\\u006b\\u0073\\u0058\\u005a\\u0069\\u006d\\u0068\\u0073\\u002f\\u0063\\u0044\\u0067\\u0041\\u0051\\u0032\\u0047\\u0035\\u003a\\u0055\\u0023\\u0064\\u002a\\u0030\\u004d\\u002f\\u004d\\u0049\\u0040\\u006d\\u006c\\u0056\\u0063\\u0068\\u0062\\u002c\\u0039\\u0030\\u0031\\u002b\\u0026\\u0038\\u006d\\u007c\\u005b\\u003d\\u0025\\u0063\\u002a\\u0065\\u0029\\u0060\\u003d\\u0037\\u0068\\u0035\\u0025\\u003a\\u0032\\u0053\\u0051\\u0028\\u002b\\u0048\\u0077\\u0025\\u0059\\u0057\\u0058\\u002c\\u003b\\u0024\\u0070\\u005b\\u002a\\u0042\\u002a\\u0067\\u0038\\u006f\\u004e\\u0034\\u0042\\u007d\\u0048\\u0038\\u007c\\u003f\\u0059\\u006b\\u003d\\u002f\\u0069\\u0064\\u005a\\u002f\\u004e\\u004c\\u0042\\u0068\\u007b\\u002e\\u004c\\u0050\\u0021\\u0055\\u007b\\u0051\\u0031\\u0067\\u002f\\u0043\\u006e\\u0065\\u003f\\u004c\\u0048\\u007e\\u0049\\u003f\\u005a\\u006d\\u007b\\u0056\\u0049\\u0065\\u006d\\u0064\\u0044\\u0047\\u0076\\u0030\\u0061\\u006c\\u0078\\u0024\\u0065\\u0045\\u0063\\u0044\\u0032\\u0073\\u0054\\u0068\\u007d\\u0047\\u0073\\u0058\\u0021\\u002b\\u005d\\u0035\\u002a\\u0074\\u0033\\u0044\\u0045\\u0065\\u0050\\u0047\\u0048\\u005d\\u0021\\u0061\\u0045\\u0037\\u007c\\u003e\\u0032\\u0025\\u007e\\u002f\\u0036\\u0066\\u0032\\u0058\\u0061\\u0033\\u0065\\u0059\\u0032\\u0029\\u0055\\u0059\\u0072\\u002f\\u003f\\u0050\\u0028\\u0054\\u0049\\u006a\\u0072\\u0034\\u0034\\u006d\\u0034\\u0065\\u007d\\u0042\\u0056\\u0047\\u003b\\u0044\\u007b\\u0042\\u0039\\u0063\\u002f\\u0058\\u0026\\u0030\\u006f\\u004e\\u0043\\u006f\\u0036\\u003c\\u0031\\u004c\\u0022\\u006b\\u0045\\u0054\\u0064\\u0060\\u0033\\u0068\\u0065\\u003d\\u0021\\u0066\\u002c\\u0035\\u0065\\u0028\\u0041\\u0029\\u004a\\u005d\\u0065\\u002c\\u0060\\u0050\\u004c\\u006a\\u0055\\u0059\\u0038\\u0073\\u006b\\u0042\\u0059\\u006c\\u005a\\u0068\\u0065\\u004c\\u006b\\u0068\\u0034\\u0070\\u006c\\u007e\\u0041\\u006d\\u0023\\u0028\\u003e\\u004a\\u0032\\u0047\\u003c\\u004e\\u004f\\u0055\\u0071\\u003d\\u0066\\u0042\\u0030\\u0077\\u0054\\u0056\\u0044\\u0034\\u0053\\u0023\\u005a\\u0047\\u0050\\u0033\\u005e\\u0079\\u0047\\u0067\\u0077\\u0073\\u0024\\u002f\\u005d\\u0065\\u0021\\u0056\\u0036\\u0058\\u0036\\u004e\\u0023\\u0044\\u005f\\u003f\\u003b\\u0034\\u0042\\u004c\\u003a\\u0047\\u0073\\u0043\\u0072\\u0034\\u0057\\u0061\\u0038\\u003f\\u006d\\u0068\\u0043\\u005d\\u0064\\u0053\\u0039\\u007b\\u0047\\u003d\\u003d\\u006f\\u0057\\u0058\\u004f\\u003f\\u005d\\u005f\\u006b\\u0025\\u0041\\u0053\\u0079\\u006b\\u0044\\u0024\\u0038\\u0068\\u0042\\u0068\\u007e\\u0070\\u007a\\u003e\\u0041\\u0033\\u0065\\u0028\\u0059\\u0066\\u0058\\u0058\\u0055\\u0065\\u005e\\u0058\\u0047\\u006a\\u004f\\u003f\\u0032\\u006d\\u0046\\u0050\\u002f\\u0069\\u0059\\u0054\\u0072\\u0034\\u004f\\u0033\\u0058\\u0069\\u0030\\u003c\\u0056\\u0045\\u004f\\u006c\\u0024\\u006b\\u0047\\u003d\\u0079\\u006a\\u003d\\u0055\\u007a\\u002a\\u0063\\u0059\\u0079\\u006b\\u005e\\u002f\\u005b\\u0070\\u0050\\u0047\\u002b\\u004e\\u0057\\u0055\\u0078\\u002e\\u0045\\u003e\\u0038\\u0069\\u0023\\u0051\\u0053\\u0072\\u002c\\u0043\\u007a\\u0033\\u0029\\u0060\\u006f\\u0070\\u0053\\u0050\\u0041\\u0053\\u004f\\u0056\\u0079\\u0054\\u0056\\u0058\\u0072\\u0034\\u0055\\u0050\\u0071\\u0065\\u0039\\u003c\\u0055\\u0053\\u0079\\u0053\\u0048\\u0067\\u0047\\u003d\\u0050\\u0025\\u006f\\u0053\\u0047\\u002e\\u0058\\u0076\\u006e\\u0070\\u0032\\u0053\\u005f\\u0079\\u0050\\u0047\\u0034\\u004c\\u006d\\u0055\\u003f\\u0058\\u003d\\u0050\\u0061\\u0038\\u0021\\u004c\",izD_V32(IUH9gW[0x602]),izD_V32(IUH9gW[0x603]),\"\\u007c\\u004c\\u0030\\u0032\\u0031\\u007d\\u0074\\u0078\\u0061\\u005f\\u007b\\u0062\\u006b\\u002a\\u0061\\u0025\\u0024\\u002f\\u0046\\u002e\",izD_V32(IUH9gW[0x604]),izD_V32(IUH9gW[0x605]),izD_V32(IUH9gW[0x606]),izD_V32(IUH9gW[0x607]),izD_V32(IUH9gW[0x608]),izD_V32(IUH9gW[0x609]),izD_V32(IUH9gW[0x60a]),izD_V32(IUH9gW[0x60b]),\"\\x4f\\x61\\x7c\\x37\",izD_V32(IUH9gW[0x60c]),izD_V32(IUH9gW[0x60d]),izD_V32(IUH9gW[0x60e]),izD_V32(IUH9gW[0x60f]),izD_V32(IUH9gW[0x610]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x79\",izD_V32(IUH9gW[0x611]),izD_V32(IUH9gW[0x612]),izD_V32(IUH9gW[0x613]),izD_V32(IUH9gW[0x614]),izD_V32(IUH9gW[0x615]),izD_V32(IUH9gW[0x616]),izD_V32(IUH9gW[0x617]),\"\\u0043\\u0061\\u0065\\u0066\\u0038\\u007b\\u003d\\u0034\\u006a\\u004c\\u002f\\u005b\\u0049\\u0076\\u0050\\u0043\\u0024\\u004d\\u0022\\u0064\\u0073\\u0033\\u0028\\u002e\\u0075\\u006c\\u0046\\u0041\\u0033\\u003b\\u0037\\u0054\\u002c\\u0056\\u003d\\u004a\\u0034\\u0041\\u0032\\u0062\\u006a\\u0059\\u0049\\u003e\\u0069\\u003e\\u0069\\u004c\\u0032\\u0058\\u006e\\u007d\\u0071\\u0033\\u0070\\u0058\\u0048\\u0058\\u0077\\u005d\\u0040\\u0036\\u004b\\u006c\\u004e\\u0057\\u0050\\u0032\\u004e\\u0035\\u0025\\u0031\\u006d\\u0064\\u0058\\u0035\\u005b\\u002e\\u0072\\u002b\\u0070\\u0066\\u0036\\u0058\\u002c\\u0075\\u003c\\u002b\\u005d\\u002c\\u006b\\u003e\\u006c\\u0066\\u0053\\u0050\\u0043\\u003e\\u003e\\u003e\\u0044\\u0049\\u0026\\u0073\\u0071\\u0064\\u0073\\u0033\\u0060\\u0060\\u0029\\u0044\\u004e\\u0057\\u007c\\u0068\\u0023\\u002a\\u0023\\u0061\\u0046\\u0059\\u0048\\u006d\\u0037\\u0025\\u002c\\u006c\\u0060\\u0030\\u0048\\u003c\\u0026\\u0071\\u0043\\u0039\\u005e\\u0038\\u006e\\u0050\\u007c\\u0069\\u004c\\u003c\\u0078\\u0028\\u0044\\u007b\\u0067\\u004c\\u002b\\u004b\\u004e\\u0078\\u003c\\u002c\\u0078\\u0057\\u0036\\u0030\\u002e\\u007e\\u0023\\u0077\\u0074\\u0075\\u0062\\u007a\\u0041\\u0067\\u006c\",izD_V32(IUH9gW[0x619]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u006a\\u0073\\u007a\\u0072\\u0053\\u0076\\u0058\\u0074\\u002e\\u003d\\u002b\\u0065\\u003c\\u0029\\u0046\\u0034\\u002f\\u0050\\u004e\\u006e\\u0029\\u0076\\u0058\\u0074\\u0022\\u006c\\u006a\\u0029\\u0029\\u002a\\u006f\\u0034\\u006b\\u0051\\u004a\\u0051\\u004e\\u0043\\u002a\\u005d\\u007d\\u0068\\u007a\\u002b\\u0029\\u002a\\u0050\\u0022\\u0071\\u003a\\u0056\\u0040\\u0062\\u0043\\u0050\\u005a\\u006a\\u0042\\u007c\\u0037\\u0034\\u005f\\u002b\\u0034\\u006e\\u0037\\u0052\\u0073\\u0061\\u0056\\u003d\\u0031\\u005e\\u0053\\u005d\\u005e\\u0070\\u0032\\u005d\\u0034\\u004b\\u0070\\u006a\\u005b\\u005e\\u006e\\u0039\\u0056\\u0064\\u0060\\u007b\\u0066\\u0033\\u004f\\u0069\\u002f\\u0057\\u0050\\u0029\\u0022\\u0029\\u0043\\u0070\\u0060\\u005e\\u006b\\u0032\\u0073\\u0024\\u003e\\u0070\\u0034\\u0053\\u0072\\u0035\\u007e\\u005a\\u0064\\u0049\\u0033\\u0045\\u0029\\u0044\\u0034\\u0049\\u003f\\u0059\\u0025\\u0078\\u006b\\u0059\\u0041\\u0045\\u0058\\u0025\\u0033\\u0063\\u0029\\u0032\\u006a\\u0033\\u005f\\u005b\\u006d\\u0028\\u0042\\u002b\\u0047\\u0022\\u0064\\u005a\\u006f\\u006b\\u006d\\u0032\\u0073\\u002c\\u0060\\u0028\\u005b\\u004a\\u0021\\u0029\\u003f\\u007b\\u0047\\u0062\\u007a\\u0072\\u0060\\u006d\\u004e\\u006c\\u007b\\u0033\\u0041\\u0038\\u002f\\u0069\\u0064\\u005a\\u002f\\u004e\\u004c\\u0042\\u0068\\u007b\\u002e\\u004c\\u0050\\u0021\\u0055\\u007b\\u0051\\u0031\\u0067\\u002f\\u0043\\u006e\\u0065\\u003f\\u004c\\u003b\",\"\\x26\\x2e\\x64\\x2b\\x2c\\x30\\x7c\\x2f\\x54\\x56\\x6b\\x61\\x67\\x66\\x4b\\x5a\\x38\\x6d\\x61\\x37\\x5f\\x3e\\x33\\x53\\x62\\x51\\x2f\\x6a\\x40\\x5d\\x69\\x47\\x6c\\x51\\x2b\\x3d\\x6d\\x64\\x5b\\x60\\x28\\x56\\x79\\x54\\x6c\\x6a\\x38\\x65\\x56\\x58\\x4b\\x61\\x43\\x7b\\x5f\\x38\\x64\\x56\\x61\\x4e\\x39\\x63\\x2f\\x58\\x51\\x30\\x66\\x70\\x70\\x5b\\x2a\\x74\\x66\\x2f\\x41\\x64\\x4e\\x6a\\x3b\\x25\\x66\\x49\\x78\\x2b\\x6d\\x55\\x59\\x33\\x50\\x6b\\x5d\\x37\\x47\\x6e\\x21\\x33\\x31\\x58\\x66\\x3d\\x76\\x79\\x7a\\x38\\x4f\\x56\\x68\\x3e\\x3b\\x66\\x61\\x35\\x67\\x44\\x6a\\x29\\x57\\x41\\x23\\x74\\x3f\\x50\\x34\\x3f\\x39\\x7d\\x5f\\x60\\x61\\x61\\x38\\x3f\\x23\\x69\\x38\\x7b\\x4c\\x51\\x50\\x29\\x77\\x5d\\x38\\x68\\x51\\x72\\x51\\x64\\x45\\x3e\\x41\\x33\\x65\\x28\\x3f\\x29\\x6f\\x64\\x6c\\x65\\x6b\\x61\\x50\\x3f\\x4d\\x35\\x4e\\x5d\\x53\\x50\\x35\\x25\\x5d\\x76\\x33\\x68\\x6d\\x72\\x59\\x61\\x7a\\x3c\\x6b\\x66\\x69\\x75\\x24\\x52\\x76\\x63\\x79\\x6a\\x66\\x55\\x6f\\x3d\\x79\\x69\\x36\\x3c\\x2b\\x3a\\x22\\x6b\\x7a\\x54\\x40\\x43\\x43\\x7d\\x63\",izD_V32(IUH9gW[0x61a]),izD_V32(IUH9gW[0x61b]),izD_V32(IUH9gW[0x61c]),izD_V32(IUH9gW[0x61d]),izD_V32(IUH9gW[0x61e]),izD_V32(IUH9gW[0x61f]),izD_V32(IUH9gW[0x620]),izD_V32(IUH9gW[0x621]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0054\",izD_V32(IUH9gW[0x622]),izD_V32(IUH9gW[0x623]),izD_V32(IUH9gW[0x624]),izD_V32(IUH9gW[0x626]),izD_V32(IUH9gW[0x627]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u0074\\u0060\\u0024\\u0065\\u0064\\u0055\\u004c\\u0045\\u0033\\u0051\\u0054\\u0069\\u006e\\u0035\\u0056\\u004d\\u005d\\u0031\\u004c\\u0029\\u006b\\u003e\\u006c\\u0066\\u0053\\u0050\\u005d\\u0030\\u0063\\u006f\\u0054\",\"\\u0033\\u0031\\u005d\\u0065\\u0060\\u0041\\u005e\\u0073\\u006f\\u003a\\u0043\\u0040\\u0062\\u0043\\u0050\\u005a\\u006a\\u0042\\u007c\\u0037\\u0034\\u005f\\u002b\\u0034\\u006e\\u0037\\u0052\\u0073\\u0069\\u0056\\u003f\\u0047\\u0050\\u0032\\u004c\\u0029\\u006b\\u003e\\u006c\\u0066\\u0053\\u0050\\u0061\\u0070\\u007d\\u0058\\u0054\",izD_V32(IUH9gW[0x628]),izD_V32(IUH9gW[0x629]),izD_V32(IUH9gW[0x62a]),izD_V32(IUH9gW[0x62b]),izD_V32(IUH9gW[0x62c]),izD_V32(IUH9gW[0x62d]),izD_V32(IUH9gW[0x62e]),izD_V32(IUH9gW[0x62f]),izD_V32(IUH9gW[0x630]),izD_V32(IUH9gW[0x631]),\"\\x55\\x61\\x70\\x4a\\x31\\x41\\x7c\\x69\\x6a\\x72\\x61\",izD_V32(IUH9gW[0x632]),izD_V32(IUH9gW[0x633]),izD_V32(IUH9gW[0x634]),izD_V32(IUH9gW[0x635]),izD_V32(IUH9gW[0x636]),izD_V32(IUH9gW[0x637]),izD_V32(IUH9gW[0x638]),izD_V32(IUH9gW[0x639]),izD_V32(IUH9gW[0x63a]),izD_V32(IUH9gW[0x63b]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u0074\\u0060\\u0024\\u0065\\u0064\\u0055\\u004c\\u0045\\u0033\\u0051\\u0054\\u0069\\u006e\\u0035\\u0056\\u004d\\u005d\\u0031\\u0064\\u0029\\u0054\\u007b\\u0022\\u0022\\u0022\\u0049\\u0042\\u0028\\u0026\\u007d\\u0026\\u0033\\u006a\\u0042\\u0061\\u0029\\u003a\\u006e\\u0021\\u0022\\u002b\\u0049\\u0047\\u005b\\u0068\\u006e\\u0050\\u002c\\u0023\\u002b\\u0026\\u003f\\u003a\\u007b\\u005b\\u0034\\u0053\\u0050\\u0043\\u0069\\u0058\\u0048\\u0065\\u007a\\u0052\\u0055\\u0048\\u0058\\u0067\\u004a\\u005b\\u0022\\u002f\\u0075\",izD_V32(IUH9gW[0x63c]),izD_V32(IUH9gW[0x63d]),izD_V32(IUH9gW[0x63f]),izD_V32(IUH9gW[0x640]),izD_V32(IUH9gW[0x641]),izD_V32(IUH9gW[0x642]),izD_V32(IUH9gW[0x643]),izD_V32(IUH9gW[0x644]),izD_V32(IUH9gW[0x645]),izD_V32(IUH9gW[0x646]),izD_V32(IUH9gW[0x647]),izD_V32(IUH9gW[0x648]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u0074\\u0060\\u0024\\u0065\\u0064\\u0055\\u004c\\u0045\\u0033\\u0051\\u0054\\u0069\\u006e\\u0035\\u0056\\u004d\\u005d\\u0031\\u004c\\u0029\\u006b\\u003e\\u006c\\u0066\\u0053\\u0050\\u005d\\u0030\\u0063\\u006f\\u007d\\u0068\\u0073\\u0054\\u0070\\u0073\\u0048\\u004a\\u0038\\u007b\\u004c\\u0051\\u007c\\u0050\\u0078\\u0056\\u006b\\u004d\\u0079\\u003c\\u0024\\u002c\\u0044\\u0036\\u002a\\u0069\\u0043\\u0044\\u0031\\u0021\\u0073\\u0043\\u0025\\u0035\\u005e\\u0060\\u0024\\u0073\\u0079\\u0032\\u0062\\u006c\\u007d\\u0048\\u0039\\u006d\\u0064\\u006e\\u002e\\u0068\\u0032\\u0049\\u007b\\u0034\\u003e\\u006e\\u0039\\u006b\\u0067\\u004c\\u005e\\u002b\\u0069\\u0076\\u0058\\u0074\\u0051\\u0044\\u006f\\u0065\\u006c\\u003e\\u0022\\u0025\\u0046\\u0072\\u0032\\u0051\\u0026\\u0032\\u0047\\u0074\\u0068\\u0053\\u004d\\u003f\\u0053\\u007b\\u0044\\u0045\\u0073\\u0045\\u0071\\u0061\\u0077\",izD_V32(IUH9gW[0x649]),izD_V32(IUH9gW[0x64a]),izD_V32(IUH9gW[0x64b]),izD_V32(IUH9gW[0x64c]),izD_V32(IUH9gW[0x64d]),izD_V32(IUH9gW[0x64e]),izD_V32(IUH9gW[0x64f]),izD_V32(IUH9gW[0x650]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u0074\\u0060\\u0077\",izD_V32(IUH9gW[0x652]),izD_V32(IUH9gW[0x653]),izD_V32(IUH9gW[0x654]),\"\\x65\\x42\\x61\\x29\\x51\\x6d\\x74\\x23\\x65\\x6c\\x48\\x70\\x3a\\x76\\x7c\\x60\\x46\\x39\\x77\",izD_V32(IUH9gW[0x655]),izD_V32(IUH9gW[0x656]),\"\\u0071\\u0056\\u002a\\u0066\\u0049\\u007d\\u002e\\u003a\\u002b\\u003a\\u007c\\u0057\\u0054\\u0032\\u007e\\u0033\\u0076\\u0033\\u004d\\u003f\\u0073\\u0033\\u006a\\u002c\\u0042\\u006c\\u005e\\u0036\\u0048\\u003c\\u003b\\u0068\\u0028\\u0061\\u006a\\u0029\\u0071\\u007d\\u0068\\u0045\\u003f\\u004c\\u005a\\u007e\\u0026\\u0058\\u0050\\u0043\\u0062\\u0060\\u0071\\u0064\\u0075\",izD_V32(IUH9gW[0x657]),izD_V32(IUH9gW[0x658]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u0058\\u006c\\u0067\\u0070\\u0073\\u0042\\u0053\\u006f\\u0074\\u0060\\u0024\\u0065\\u0064\\u0055\\u004c\\u0045\\u0033\\u0051\\u0054\\u0069\\u006e\\u0035\\u0056\\u004d\\u006b\\u0077\",izD_V32(IUH9gW[0x659]),\"\\u002b\\u0058\\u007c\\u0037\\u0034\\u007d\\u0062\",izD_V32(IUH9gW[0x65b]),izD_V32(IUH9gW[0x65c]),izD_V32(IUH9gW[0x65d]),izD_V32(IUH9gW[0x65e]),izD_V32(IUH9gW[0x65f]),izD_V32(IUH9gW[0x660]),\"\\u003b\\u0077\\u002f\\u0049\\u0064\\u004b\\u0032\\u0074\\u0033\\u007b\\u0040\\u0029\\u0063\\u0029\\u0062\\u0059\\u007c\\u003c\\u0045\\u003a\\u0031\\u0075\\u0029\\u0062\",izD_V32(IUH9gW[0x661]),izD_V32(IUH9gW[0x662]),izD_V32(IUH9gW[0x663]),izD_V32(IUH9gW[0x664]),izD_V32(IUH9gW[0x665]),izD_V32(IUH9gW[0x666]),izD_V32(IUH9gW[0x667]),izD_V32(IUH9gW[0x668]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x7a\\x72\\x53\\x76\\x58\\x74\\x2e\\x3d\\x2b\\x65\\x3c\\x29\\x46\\x34\\x2f\\x50\\x4e\\x6e\\x29\\x76\\x58\\x74\\x22\\x6c\\x6a\\x29\\x29\\x2a\\x5b\\x34\\x58\\x49\\x55\\x28\\x71\\x79\\x42\\x43\\x7e\\x3c\\x56\\x3d\\x64\\x55\\x6f\\x3a\\x34\\x6c\\x48\\x70\\x3a\\x76\\x7c\\x60\\x31\\x31\\x5e\\x3f\\x4c\\x7b\\x4c\\x45\\x46\\x72\\x79\\x51\\x58\\x64\\x39\\x33\\x29\\x39\\x41\\x69\\x37\\x7e\\x49\\x22\\x58\\x72\\x4d\\x7e\\x23\\x5b\\x38\",\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x37\\x32\\x7a\\x3b\",\"\\x4e\\x63\\x35\\x29\\x5b\\x29\\x7c\\x45\\x53\\x4c\\x58\\x5b\\x2e\\x5e\",izD_V32(IUH9gW[0x669]),izD_V32(IUH9gW[0x66a]),izD_V32(IUH9gW[0x66b]),izD_V32(IUH9gW[0x66c]),izD_V32(IUH9gW[0x66d]),izD_V32(IUH9gW[0x66e]),izD_V32(IUH9gW[0x66f]),izD_V32(IUH9gW[0x670]),izD_V32(IUH9gW[0x671]),izD_V32(IUH9gW[0x672]),izD_V32(IUH9gW[0x673]),izD_V32(IUH9gW[0x674]),izD_V32(IUH9gW[0x675]),izD_V32(IUH9gW[0x676]),izD_V32(IUH9gW[0x677]),izD_V32(IUH9gW[0x678]),izD_V32(IUH9gW[0x679]),izD_V32(IUH9gW[0x67a]),izD_V32(IUH9gW[0x67c]),izD_V32(IUH9gW[0x67d]),izD_V32(IUH9gW[0x67e]),izD_V32(IUH9gW[0x67f]),izD_V32(IUH9gW[0x680]),izD_V32(IUH9gW[0x681]),izD_V32(IUH9gW[0x682]),izD_V32(IUH9gW[0x684]),\"\\u0072\\u0061\\u004e\\u004a\\u006b\\u007b\\u0028\\u0025\\u0034\\u007c\\u0042\\u0070\\u0077\",izD_V32(IUH9gW[0x685]),izD_V32(IUH9gW[0x686]),izD_V32(IUH9gW[0x687]),izD_V32(IUH9gW[0x688]),izD_V32(IUH9gW[0x68a]),izD_V32(IUH9gW[0x68b]),izD_V32(IUH9gW[0x68c]),izD_V32(IUH9gW[0x68d]),izD_V32(IUH9gW[0x68e]),\"\\u0079\\u0057\\u007c\\u003d\\u007b\\u002a\\u0062\",\"\\u0047\\u0056\\u007c\\u0037\",izD_V32(IUH9gW[0x68f]),izD_V32(IUH9gW[0x690]),izD_V32(IUH9gW[0x691]),izD_V32(IUH9gW[0x692]),\"\\x47\\x31\\x7c\\x37\\x35\\x4f\\x5d\\x3b\",izD_V32(IUH9gW[0x693]),izD_V32(IUH9gW[0x694]),izD_V32(IUH9gW[0x695]),izD_V32(IUH9gW[0x696]),izD_V32(IUH9gW[0x697]),izD_V32(IUH9gW[0x698]),izD_V32(IUH9gW[0x69a]),izD_V32(IUH9gW[0x69b]),izD_V32(IUH9gW[0x69c]),izD_V32(IUH9gW[0x69d]),izD_V32(IUH9gW[0x69e]),izD_V32(IUH9gW[0x69f]),\"\\u004b\\u0073\\u007c\\u003d\",izD_V32(IUH9gW[0x6a0]),izD_V32(IUH9gW[0x6a1]),izD_V32(IUH9gW[0x6a2]),izD_V32(IUH9gW[0x6a3]),izD_V32(IUH9gW[0x6a4]),izD_V32(IUH9gW[0x6a5]),izD_V32(IUH9gW[0x6a6]),izD_V32(IUH9gW[0x6a7]),izD_V32(IUH9gW[0x6a8]),izD_V32(IUH9gW[0x6a9]),izD_V32(IUH9gW[0x6aa]),izD_V32(IUH9gW[0x6ab]),izD_V32(IUH9gW[0x6ac]),izD_V32(IUH9gW[0x6ad]),izD_V32(IUH9gW[0x6ae]),\"\\x71\\x72\\x25\\x6a\\x62\\x5d\\x7c\\x77\",izD_V32(IUH9gW[0x6af]),izD_V32(IUH9gW[0x6b0]),\"\\u003d\\u0058\\u007c\\u0037\",izD_V32(IUH9gW[0x6b1]),\"\\u003f\\u0021\\u007c\\u003d\",izD_V32(IUH9gW[0x6b2]),izD_V32(IUH9gW[0x6b3]),izD_V32(IUH9gW[0x6b4]),izD_V32(IUH9gW[0x6b5]),izD_V32(IUH9gW[0x6b6]),izD_V32(IUH9gW[0x6b7]),izD_V32(IUH9gW[0x6b8]),izD_V32(IUH9gW[0x6b9]),izD_V32(IUH9gW[0x6ba]),izD_V32(IUH9gW[0x6bb]),izD_V32(IUH9gW[0x6bc]),\"\\u003d\\u003d\\u007c\\u0037\\u0058\",izD_V32(IUH9gW[0x6bd]),izD_V32(IUH9gW[0x6be]),izD_V32(IUH9gW[0x6bf]),\"\\x3d\\x31\\x25\\x2a\\x71\\x3f\\x62\\x6c\\x65\\x73\\x4b\\x3a\\x37\\x3b\\x37\\x54\\x47\\x58\\x3a\\x44\\x65\\x4f\\x57\\x45\\x3a\\x5e\\x61\\x4e\\x48\\x53\\x22\\x43\\x23\\x57\\x6b\\x5e\\x47\\x48\\x38\\x7b\\x61\\x44\\x47\\x76\\x68\\x77\\x54\\x45\\x7b\\x47\\x34\\x47\\x22\\x4f\\x40\\x3e\\x3f\\x50\\x23\\x70\\x38\\x6f\\x3b\\x68\\x31\\x31\\x4c\\x6e\\x59\\x6f\\x7b\\x4c\\x78\\x44\\x60\\x21\\x6a\\x63\\x5b\\x2c\\x7e\\x33\\x7b\\x63\\x3d\\x3f\\x6b\\x3a\\x69\\x4c\\x3b\\x37\\x45\\x6f\\x3e\\x68\\x64\\x58\\x65\\x66\\x2c\\x30\\x32\\x22\\x71\\x3a\\x42\\x28\\x72\\x2f\\x7a\\x43\\x76\\x4d\\x44\\x6e\\x23\\x4d\\x3b\\x41\\x3d\\x37\\x47\\x57\\x32\\x54\\x62\\x5d\\x3a\\x61\\x7d\\x3f\\x5d\\x68\\x6d\\x60\\x53\\x73\\x7c\\x3f\\x62\",\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x3b\",izD_V32(IUH9gW[0x6c0]),izD_V32(IUH9gW[0x6c1]),izD_V32(IUH9gW[0x6c2]),izD_V32(IUH9gW[0x6c3]),izD_V32(IUH9gW[0x6c4]),izD_V32(IUH9gW[0x6c5]),izD_V32(IUH9gW[0x6c6]),izD_V32(IUH9gW[0x6c7]),izD_V32(IUH9gW[0x6c8]),izD_V32(IUH9gW[0x6c9]),izD_V32(IUH9gW[0x6ca]),izD_V32(IUH9gW[0x6cb]),izD_V32(IUH9gW[0x6cc]),izD_V32(IUH9gW[0x6cd]),izD_V32(IUH9gW[0x6ce]),izD_V32(IUH9gW[0x6cf]),\"\\x7c\\x71\\x5d\\x35\\x41\\x75\\x23\\x5a\\x3d\\x4f\\x66\\x7e\\x23\\x3a\\x68\\x43\\x7b\\x4d\\x77\",izD_V32(IUH9gW[0x6d0]),izD_V32(IUH9gW[0x6d1]),izD_V32(IUH9gW[0x6d2]),izD_V32(IUH9gW[0x6d3]),izD_V32(IUH9gW[0x6d4]),izD_V32(IUH9gW[0x6d5]),\"\\u0044\\u0051\\u0044\\u006e\\u0042\\u0071\\u005d\\u005d\\u004c\\u002b\\u007c\\u0057\\u004f\\u003b\\u0064\\u004d\\u007a\\u0056\\u0050\\u0038\",izD_V32(IUH9gW[0x6d6]),izD_V32(IUH9gW[0x6d7]),izD_V32(IUH9gW[0x6d8]),izD_V32(IUH9gW[0x6d9]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u006a\\u0073\\u0024\\u0051\\u0058\\u0064\\u0075\\u006f\\u005f\\u0063\\u006d\\u007e\\u0067\\u0029\\u0022\\u0022\\u003e\\u0045\",izD_V32(IUH9gW[0x6da]),izD_V32(IUH9gW[0x6db]),izD_V32(IUH9gW[0x6dc]),\"\\x64\\x2b\\x7d\\x3f\\x5b\\x4a\\x64\\x6a\\x7c\\x65\",izD_V32(IUH9gW[0x6dd]),\"\\x7c\\x71\\x5d\\x35\\x41\\x75\\x23\\x5a\\x3d\\x4f\\x66\\x7e\\x23\\x3a\\x68\\x43\\x6d\\x62\",izD_V32(IUH9gW[0x6de]),\"\\u007c\\u006d\\u0024\\u0073\\u005f\\u0079\\u0056\\u0077\",izD_V32(IUH9gW[0x6df]),izD_V32(IUH9gW[0x6e0]),izD_V32(IUH9gW[0x6e1]),izD_V32(IUH9gW[0x6e2]),izD_V32(IUH9gW[0x6e3]),\"\\u0048\\u0060\\u007c\\u0037\",izD_V32(IUH9gW[0x6e4]),izD_V32(IUH9gW[0x6e5]),izD_V32(IUH9gW[0x6e6]),izD_V32(IUH9gW[0x6e8]),izD_V32(IUH9gW[0x6e9]),izD_V32(IUH9gW[0x6ea]),izD_V32(IUH9gW[0x6eb]),izD_V32(IUH9gW[0x6ec]),izD_V32(IUH9gW[0x6ed]),izD_V32(IUH9gW[0x6ee]),izD_V32(IUH9gW[0x6ef]),izD_V32(IUH9gW[0x6f0]),izD_V32(IUH9gW[0x6f1]),izD_V32(IUH9gW[0x6f2]),izD_V32(IUH9gW[0x6f3]),izD_V32(IUH9gW[0x6f4]),\"\\u0060\\u007d\\u005e\\u0059\\u0076\\u0050\\u006f\\u0025\\u002e\\u003a\\u0030\\u0029\\u0069\\u0054\\u0024\\u006a\\u0039\\u0063\\u0038\\u002a\\u0058\\u0067\\u0060\\u006d\\u0030\\u005b\\u0028\\u004a\\u006e\\u0056\\u007d\\u006f\\u0050\\u0078\\u003f\\u0038\\u0072\\u006d\\u0079\\u005b\\u004a\\u006c\\u0064\\u0054\\u0028\\u0068\\u003e\\u0047\\u0076\\u0047\\u006d\\u004e\\u0041\\u0076\\u006b\\u0025\\u0043\\u0053\\u0061\\u006b\\u0039\\u0067\\u0077\\u0031\\u004c\\u007d\\u0077\\u004f\\u0021\\u0061\\u0048\\u002f\\u0030\\u0072\\u005e\\u0055\\u006d\\u006f\\u0059\\u0047\\u002a\\u0031\\u002b\\u0065\\u003e\\u0059\\u0066\\u0053\\u0070\\u002f\\u0055\\u0035\\u004e\\u0023\\u0042\\u007a\\u0063\\u0058\\u0036\\u0070\\u007d\\u0042\\u004e\\u006c\\u0033\\u0042\\u0043\\u0050\\u0075\\u006f\\u0057\\u006a\\u0026\\u0030\\u006f\\u004e\\u0043\\u006f\\u0037\\u0025\\u005a\\u0050\\u0065\\u0049\\u003c\\u0043\\u0061\\u0060\\u0071\\u0044\\u0078\\u002e\\u0034\\u007d\\u003f\\u0053\\u004e\\u0067\\u0071\\u0033\\u0025\\u0063\\u007e\\u0033\\u0064\\u0068\\u0066\\u003f\\u005e\\u0059\\u002e\\u0070\\u0076\\u003c\\u005f\\u004a\\u006e\\u0056\\u004d\\u006f\\u0050\\u0078\\u007c\\u003f\\u0030\\u003c\\u004a\\u002f\\u0077\\u0056\\u0072\\u0021\\u0043\\u0076\\u0029\\u0025\\u0029\\u0031\\u0025\\u002b\\u004f\\u006f\\u0055\\u0059\\u004c\\u0056\\u003a\\u006d\\u0035\\u0058\\u0053\\u0058\\u0067\\u0068\\u0026\\u0070\\u0042\\u0061\\u0028\\u0022\\u004c\\u0051\\u0028\\u0041\\u0025\\u0063\\u0078\\u0033\\u004d\\u004c\\u0055\\u0037\\u0030\\u0078\\u002c\\u003e\\u0031\\u004c\\u0061\\u006b\\u005d\\u0076\\u003b\\u0068\\u0030\\u0067\\u0065\\u003f\\u003c\\u0024\\u003d\\u0066\\u003f\\u0021\\u003b\\u005b\\u0043\\u0076\\u0053\\u0049\\u0073\\u0044\\u0078\\u0064\\u0025\\u0070\\u0064\\u0074\\u005b\\u004c\\u003a\\u0064\\u0070\\u0076\\u0038\\u0068\\u004c\\u0058\\u0065\\u004e\\u0067\\u0066\\u0024\\u006d\\u006a\\u0049\\u002c\\u0033\\u0041\\u0035\\u0069\\u0047\\u0036\\u004e\\u0057\\u007e\\u004d\\u0048\\u005e\\u0051\\u0028\\u0042\\u003b\\u0069\\u003c\\u003e\\u004d\\u0047\\u007b\\u0072\\u005a\\u0069\\u0061\\u0061\\u0069\\u0061\\u0077\\u003c\\u0037\\u006e\\u0040\\u005d\\u0037\\u0058\\u004b\\u0063\\u007d\\u0070\\u0032\\u0076\\u0064\\u0074\\u002a\\u003c\\u007c\\u0065\\u004c\\u0078\\u004b\\u0074\\u0060\\u002b\\u0074\\u0061\\u0046\\u0061\\u0053\\u0070\\u0047\\u0072\\u0021\\u003d\\u0066\\u0047\\u0047\\u0033\\u0063\\u0042\\u0051\\u002b\\u006b\\u0079\\u0023\\u0038\\u0072\\u0042\\u0037\\u0061\\u0023\\u006f\\u003a\\u0034\\u0045\\u0058\\u0046\\u002c\\u0062\\u006d\\u0053\\u0066\\u003f\\u0021\\u003b\\u005b\\u0036\\u0058\\u003d\\u006f\\u004d\\u0059\\u006f\\u003d\\u0058\\u003f\\u0055\\u006b\\u0056\\u0042\\u0037\\u0034\\u0067\\u0066\\u0066\\u006f\\u002e\\u0042\\u0063\\u004a\\u003c\\u0061\\u0028\\u0022\\u004c\\u0051\\u005b\\u003d\\u0077\\u0024\\u0030\\u0047\\u0073\\u0060\\u0058\\u0029\\u004d\\u0048\\u006a\\u002c\\u0076\\u0042\\u003f\\u004a\\u005d\\u0076\\u003b\\u0068\\u006f\\u0072\\u007c\\u0059\\u007b\\u0057\\u0022\\u0070\\u004f\\u0073\\u007c\\u003e\\u0069\\u007d\\u0040\\u004e\\u0030\\u002e\\u0023\\u003d\\u0061\\u0032\\u0077\\u0069\\u006b\\u0042\\u0031\\u0078\\u003e\\u0025\\u0040\\u0043\\u005f\\u004e\\u004e\\u004a\\u0070\\u0051\\u0054\\u005d\\u0047\\u0072\\u0036\\u0066\\u0057\\u0068\\u0069\\u0047\\u0036\\u004e\\u0055\\u0058\\u006b\\u0079\\u005d\\u0025\\u0032\\u0056\\u006e\\u0047\\u0044\\u005d\\u0044\\u0047\\u007a\\u0058\\u0046\\u002c\\u0062\\u006d\\u0053\\u0066\\u003f\\u0021\\u003b\\u005b\\u006c\\u0076\\u006c\\u006f\\u0072\\u0030\\u0050\\u0070\\u005b\\u006d\\u004f\\u006b\\u0041\\u0053\\u0026\\u0053\\u0050\\u0047\\u0042\\u005a\\u0030\\u0072\\u0077\\u0069\\u0067\\u0061\\u0052\\u003c\\u0045\\u0045\\u0032\\u0029\\u003d\\u004d\\u0051\\u002c\\u0072\\u0033\\u0021\\u0064\\u004d\\u0048\\u006f\\u0070\\u0039\\u005b\\u0035\\u0063\\u0041\\u0035\\u0059\\u006f\\u003a\\u0033\\u007c\\u0059\\u007b\\u0057\\u0022\\u0070\\u0078\\u0056\\u004b\\u0052\\u0061\\u0056\\u006c\\u0058\\u003c\\u0044\\u007d\\u004e\\u007a\\u005f\\u0038\\u0045\\u0041\\u0053\\u0026\\u0053\\u0050\\u0047\\u0042\\u005a\\u0030\\u0072\\u0077\\u0069\\u0067\\u0061\\u0052\\u003c\\u0049\\u003a\\u003f\\u0051\\u0078\\u0023\\u005d\\u0034\\u0042\\u004c\\u007a\\u002a\\u003b\\u0033\\u007c\\u003e\\u006a\\u004c\\u0024\\u0047\\u0023\\u006f\\u005e\\u0068\\u0051\\u0050\\u004d\\u002e\\u0036\\u003c\\u0056\\u0047\\u0033\\u0042\\u006b\\u006e\\u0040\\u005d\\u0037\\u0058\\u0046\\u0059\\u0050\\u0070\\u0058\\u005f\\u0045\\u002f\\u002c\\u006b\\u007c\\u0078\\u002a\\u006e\\u0022\\u0074\\u0073\\u0055\\u0078\\u002e\\u0038\\u0042\\u0036\\u0036\\u0061\\u0045\\u004a\\u0029\\u0043\\u0023\\u0034\\u002c\\u0063\\u0042\\u007e\\u002b\\u002a\\u005f\\u002a\\u0035\\u0041\\u003c\\u005f\\u0059\\u0042\\u0025\\u0044\\u0047\\u003e\\u002b\\u0039\\u0030\\u0049\\u0070\\u0064\\u002f\\u0033\\u0042\\u007c\\u003e\\u0069\\u007d\\u003c\\u004e\\u0029\\u0031\\u003e\\u0065\\u0036\\u0076\\u0036\\u0038\\u006e\\u007e\\u0034\",izD_V32(IUH9gW[0x6f5]),izD_V32(IUH9gW[0x6f6]),izD_V32(IUH9gW[0x6f7]),izD_V32(IUH9gW[0x6f8]),izD_V32(IUH9gW[0x6f9]),izD_V32(IUH9gW[0x6fa]),izD_V32(IUH9gW[0x6fb]),izD_V32(IUH9gW[0x6fc]),izD_V32(IUH9gW[0x6fd]),izD_V32(IUH9gW[0x6fe]),izD_V32(IUH9gW[0x6ff]),izD_V32(IUH9gW[0x700]),izD_V32(IUH9gW[0x701]),izD_V32(IUH9gW[0x702]),izD_V32(IUH9gW[0x703]),izD_V32(IUH9gW[0x704]),izD_V32(IUH9gW[0x705]),izD_V32(IUH9gW[0x706]),izD_V32(IUH9gW[0x707]),izD_V32(IUH9gW[0x708]),izD_V32(IUH9gW[0x709]),izD_V32(IUH9gW[0x70a]),izD_V32(IUH9gW[0x70b]),izD_V32(IUH9gW[0x70c]),izD_V32(IUH9gW[0x70d]),izD_V32(IUH9gW[0x70e]),izD_V32(IUH9gW[0x70f]),izD_V32(IUH9gW[0x710]),izD_V32(IUH9gW[0x711]),izD_V32(IUH9gW[0x712]),izD_V32(IUH9gW[0x713]),izD_V32(IUH9gW[0x714]),izD_V32(IUH9gW[0x715]),izD_V32(IUH9gW[0x716]),\"\\u0028\\u002b\\u007c\\u0065\\u005b\\u004a\\u0049\\u003b\",izD_V32(IUH9gW[0x718]),izD_V32(IUH9gW[0x719]),izD_V32(IUH9gW[0x71a]),izD_V32(IUH9gW[0x71b]),izD_V32(IUH9gW[0x71c]),izD_V32(IUH9gW[0x71d]),izD_V32(IUH9gW[0x71e]),izD_V32(IUH9gW[0x71f]),izD_V32(IUH9gW[0x720]),izD_V32(IUH9gW[0x721]),izD_V32(IUH9gW[0x722]),izD_V32(IUH9gW[0x723]),izD_V32(IUH9gW[0x724]),izD_V32(IUH9gW[0x725]),izD_V32(IUH9gW[0x726]),izD_V32(IUH9gW[0x728]),izD_V32(IUH9gW[0x729]),izD_V32(IUH9gW[0x72a]),izD_V32(IUH9gW[0x72b]),izD_V32(IUH9gW[0x72c]),izD_V32(IUH9gW[0x72e]),izD_V32(IUH9gW[0x72f]),izD_V32(IUH9gW[0x731]),izD_V32(IUH9gW[0x732]),izD_V32(IUH9gW[0x733]),izD_V32(IUH9gW[0x734]),izD_V32(IUH9gW[0x735]),\"\\x7c\\x58\\x25\\x2a\\x47\",izD_V32(IUH9gW[0x736]),izD_V32(IUH9gW[0x737]),izD_V32(IUH9gW[0x738]),izD_V32(IUH9gW[0x739]),izD_V32(IUH9gW[0x73a]),izD_V32(IUH9gW[0x73b]),izD_V32(IUH9gW[0x73c]),izD_V32(IUH9gW[0x73d]),izD_V32(IUH9gW[0x73e]),\"\\x48\\x60\\x7c\\x3f\\x26\\x3f\\x58\\x53\\x38\",izD_V32(IUH9gW[0x73f]),izD_V32(IUH9gW[0x740]),izD_V32(IUH9gW[0x741]),izD_V32(IUH9gW[0x742]),izD_V32(IUH9gW[0x744]),izD_V32(IUH9gW[0x745]),izD_V32(IUH9gW[0x746]),izD_V32(IUH9gW[0x747]),izD_V32(IUH9gW[0x748]),izD_V32(IUH9gW[0x749]),\"\\x38\\x6d\\x47\\x2b\\x54\\x7d\\x32\\x50\\x67\\x72\\x6b\\x5b\\x2e\\x5e\\x43\\x4d\\x48\\x60\\x7c\\x3f\\x26\\x3f\\x62\",izD_V32(IUH9gW[0x74a]),izD_V32(IUH9gW[0x74b]),\"\\u005d\\u0031\\u0034\\u0065\\u007c\\u003f\\u0065\\u0077\",izD_V32(IUH9gW[0x74c]),\"\\x68\\x53\\x7c\\x79\\x66\\x36\\x2a\\x69\\x7a\\x72\\x64\",izD_V32(IUH9gW[0x74d]),izD_V32(IUH9gW[0x74e]),izD_V32(IUH9gW[0x74f]),izD_V32(IUH9gW[0x750]),izD_V32(IUH9gW[0x751]),izD_V32(IUH9gW[0x752]),izD_V32(IUH9gW[0x753]),izD_V32(IUH9gW[0x754]),izD_V32(IUH9gW[0x755]),izD_V32(IUH9gW[0x756]),izD_V32(IUH9gW[0x757]),\"\\x5f\\x74\\x5b\\x6f\\x43\\x75\\x60\\x65\\x51\\x4a\\x6c\\x73\\x76\\x4e\\x2a\\x41\\x76\\x3d\\x7d\\x5a\\x68\\x2a\\x79\\x6a\\x7c\\x65\\x6f\\x59\\x47\\x38\",izD_V32(IUH9gW[0x758]),izD_V32(IUH9gW[0x759]),izD_V32(IUH9gW[0x75a]),izD_V32(IUH9gW[0x75c]),izD_V32(IUH9gW[0x75d]),izD_V32(IUH9gW[0x75e]),izD_V32(IUH9gW[0x75f]),\"\\u004b\\u0054\\u007c\\u0038\",izD_V32(IUH9gW[0x760]),izD_V32(IUH9gW[0x761]),izD_V32(IUH9gW[0x762]),izD_V32(IUH9gW[0x763]),izD_V32(IUH9gW[0x764]),izD_V32(IUH9gW[0x765]),izD_V32(IUH9gW[0x766]),izD_V32(IUH9gW[0x767]),izD_V32(IUH9gW[0x768]),izD_V32(IUH9gW[0x769]),izD_V32(IUH9gW[0x76a]),izD_V32(IUH9gW[0x76b]),izD_V32(IUH9gW[0x76c]),izD_V32(IUH9gW[0x76d]),izD_V32(IUH9gW[0x76e]),izD_V32(IUH9gW[0x770]),izD_V32(IUH9gW[0x771]),izD_V32(IUH9gW[0x772]),\"\\u0078\\u007a\\u0038\\u0041\\u0078\\u007d\\u0076\\u005d\\u0033\\u005f\\u003c\\u0040\\u0065\\u007c\\u0028\\u0078\\u0072\\u0040\\u0049\\u0067\\u0034\\u0077\\u004b\\u0065\\u0062\\u0059\\u0039\",izD_V32(IUH9gW[0x773]),izD_V32(IUH9gW[0x774]),izD_V32(IUH9gW[0x775]),izD_V32(IUH9gW[0x776]),izD_V32(IUH9gW[0x777]),izD_V32(IUH9gW[0x77b]),izD_V32(IUH9gW[0x77c]),izD_V32(IUH9gW[0x77d]),izD_V32(IUH9gW[0x77e]),izD_V32(IUH9gW[0x77f]),izD_V32(IUH9gW[0x780]),izD_V32(IUH9gW[0x782]),izD_V32(IUH9gW[0x783]),izD_V32(IUH9gW[0x784]),izD_V32(IUH9gW[0x785]),izD_V32(IUH9gW[0x786]),izD_V32(IUH9gW[0x787]),izD_V32(IUH9gW[0x788]),izD_V32(IUH9gW[0x789]),izD_V32(IUH9gW[0x78b]),izD_V32(IUH9gW[0x78c]),izD_V32(IUH9gW[0x78d]),izD_V32(IUH9gW[0x78f]),izD_V32(IUH9gW[0x790]),izD_V32(IUH9gW[0x791]),izD_V32(IUH9gW[0x792]),izD_V32(IUH9gW[0x793]),izD_V32(IUH9gW[0x794]),izD_V32(IUH9gW[0x795]),izD_V32(IUH9gW[0x796]),izD_V32(IUH9gW[0x797]),izD_V32(IUH9gW[0x798]),izD_V32(IUH9gW[0x799]),izD_V32(IUH9gW[0x79a]),izD_V32(IUH9gW[0x79b]),izD_V32(IUH9gW[0x79c]),izD_V32(IUH9gW[0x79d]),\"\\u0078\\u007a\\u0038\\u0041\\u0078\\u007d\\u0076\\u005d\\u0033\\u005f\\u003c\\u0040\\u0065\\u007c\\u0028\\u0078\\u0072\\u0040\\u0049\\u0067\\u0034\\u0077\\u004b\\u0065\\u0062\\u0059\\u007c\\u003c\\u0045\\u003a\\u0031\\u0075\\u0072\\u0046\\u004d\\u0056\\u0055\\u003b\\u0024\\u0068\\u007b\\u007d\\u0059\\u007e\\u004f\\u0061\\u0075\\u007b\\u0043\\u006f\\u0051\\u005a\\u0059\\u0046\\u004a\\u004e\\u0063\\u002a\\u0058\\u003c\\u006b\\u0069\\u0037\\u007b\\u0026\\u002b\\u0025\\u0049\\u002a\\u005e\\u007c\\u004f\\u0023\\u002a\\u0059\\u0079\\u0035\\u003a\\u0066\\u007b\\u005b\\u003d\\u0025\\u0049\\u006c\\u0049\\u0076\\u0028\\u0062\\u002a\\u005e\\u0026\\u003f\\u0050\\u0038\\u0023\\u0049\\u002f\\u0060\\u0048\\u0069\\u006e\\u0024\\u0047\\u0061\\u0060\\u0044\\u003a\\u0050\\u0029\\u003c\\u006d\",izD_V32(IUH9gW[0x79e]),izD_V32(IUH9gW[0x79f]),izD_V32(IUH9gW[0x7a0]),izD_V32(IUH9gW[0x7a1]),izD_V32(IUH9gW[0x7a2]),izD_V32(IUH9gW[0x7a3]),izD_V32(IUH9gW[0x7a4]),izD_V32(IUH9gW[0x7a5]),izD_V32(IUH9gW[0x7a6]),izD_V32(IUH9gW[0x7a7]),izD_V32(IUH9gW[0x7a8]),izD_V32(IUH9gW[0x7a9]),izD_V32(IUH9gW[0x7aa]),izD_V32(IUH9gW[0x7ab]),izD_V32(IUH9gW[0x7ac]),\"\\x68\\x3c\\x7c\\x37\\x4c\\x7b\\x48\\x5f\\x6a\\x73\\x3d\\x55\\x2f\\x6e\\x70\\x35\\x74\\x65\\x69\\x29\\x25\",izD_V32(IUH9gW[0x7ad]),izD_V32(IUH9gW[0x7ae]),izD_V32(IUH9gW[0x7af]),izD_V32(IUH9gW[0x7b0]),izD_V32(IUH9gW[0x7b1]),izD_V32(IUH9gW[0x7b2]),izD_V32(IUH9gW[0x7b3]),\"\\x32\\x4c\\x45\\x5d\\x5a\\x7d\\x70\\x73\\x2a\\x5f\\x3c\\x40\\x65\\x7c\\x28\\x78\\x66\\x2f\\x21\\x56\",izD_V32(IUH9gW[0x7b4]),izD_V32(IUH9gW[0x7b5]),izD_V32(IUH9gW[0x7b6]),izD_V32(IUH9gW[0x7b7]),izD_V32(IUH9gW[0x7b8]),\"\\x68\\x3c\\x7c\\x37\\x44\\x74\\x4d\\x5f\\x38\\x4c\\x7a\\x72\\x43\\x43\\x49\\x60\\x42\\x60\\x24\\x73\\x42\\x29\\x32\\x70\\x77\\x51\\x7b\\x21\\x42\\x76\\x34\\x43\\x58\\x31\\x53\\x4a\\x3a\\x7b\\x53\\x6c\\x46\\x50\\x51\\x28\\x3b\\x6f\\x24\\x60\\x3d\\x51\\x61\\x6c\\x29\\x7d\\x62\",izD_V32(IUH9gW[0x7b9]),izD_V32(IUH9gW[0x7ba]),izD_V32(IUH9gW[0x7bb]),izD_V32(IUH9gW[0x7bc]),\"\\u002c\\u0056\\u0062\\u002a\\u0060\\u0041\\u0074\\u002f\\u0059\\u004c\\u0039\\u0066\\u006c\\u004d\\u0075\\u004d\\u0048\\u0060\\u007c\\u0037\",izD_V32(IUH9gW[0x7bd]),izD_V32(IUH9gW[0x7be]),izD_V32(IUH9gW[0x7bf]),izD_V32(IUH9gW[0x7c0]),izD_V32(IUH9gW[0x7c1]),izD_V32(IUH9gW[0x7c2]),izD_V32(IUH9gW[0x7c3]),izD_V32(IUH9gW[0x7c4]),izD_V32(IUH9gW[0x7c5]),izD_V32(IUH9gW[0x7c6]),izD_V32(IUH9gW[0x7c7]),izD_V32(IUH9gW[0x7c8]),izD_V32(IUH9gW[0x7c9]),izD_V32(IUH9gW[0x7ca]),izD_V32(IUH9gW[0x7cb]),izD_V32(IUH9gW[0x7cc]),izD_V32(IUH9gW[0x7cd]),izD_V32(IUH9gW[0x7cf]),izD_V32(IUH9gW[0x7d0]),izD_V32(IUH9gW[0x7d2]),izD_V32(IUH9gW[0x7d3]),izD_V32(IUH9gW[0x7d4]),izD_V32(IUH9gW[0x7d5]),\"\\u005a\\u004c\\u0070\\u0073\\u0060\\u0035\\u0030\\u0038\\u0050\\u006c\\u0038\\u0036\\u003c\\u003e\\u003a\\u006b\\u0060\\u004c\\u003e\\u0058\\u004c\\u003e\\u0037\\u006d\\u0078\\u0044\\u005b\\u004a\\u0073\\u002f\\u0072\\u004c\\u0029\\u0078\\u007c\\u003d\\u0066\\u003e\\u004a\\u0038\\u0025\\u004c\\u007a\\u003f\\u0048\\u002f\\u002a\\u004c\\u0038\\u006d\\u005b\\u0073\\u0069\\u006f\\u006e\\u0070\\u003c\\u0050\\u006a\",\"\\x7a\\x61\\x78\\x6a\\x52\\x33\\x71\\x6d\\x64\\x2b\\x2b\\x66\\x6f\\x5b\\x7c\\x35\\x72\\x2e\\x77\\x2b\\x63\\x33\\x63\\x45\\x74\\x50\\x6a\\x36\\x2a\\x2f\\x29\\x6b\\x7b\\x66\\x2f\\x3f\\x4e\\x35\\x6b\\x6d\\x40\\x50\\x74\\x41\\x24\\x25\\x37\\x49\\x55\\x2e\\x36\\x3d\\x37\\x6f\\x75\\x77\\x4c\\x2b\\x47\",izD_V32(IUH9gW[0x7d6]),izD_V32(IUH9gW[0x7d7]),izD_V32(IUH9gW[0x7d8]),izD_V32(IUH9gW[0x7d9]),izD_V32(IUH9gW[0x7da]),izD_V32(IUH9gW[0x7db]),izD_V32(IUH9gW[0x7dc]),izD_V32(IUH9gW[0x7dd]),izD_V32(IUH9gW[0x7de]),izD_V32(IUH9gW[0x7df]),\"\\u0068\\u003c\\u007c\\u0037\\u004c\\u007b\\u0048\\u005f\\u006a\\u0073\\u003d\\u0055\\u002f\\u006e\\u0070\\u0035\\u0074\\u0065\\u0069\\u0029\\u0037\\u0059\\u0064\\u0023\\u002b\\u003a\\u0065\\u0072\\u0075\\u0076\\u0031\\u006f\\u0054\\u0061\\u004d\\u003f\\u007b\\u007b\\u0058\\u0053\\u0029\\u0073\\u0056\\u0061\\u006c\\u0023\\u0025\\u0033\\u0045\\u0029\\u0043\\u0064\\u0065\\u007d\\u004f\\u0022\\u0037\\u0049\\u005b\",izD_V32(IUH9gW[0x7e0]),izD_V32(IUH9gW[0x7e1]),izD_V32(IUH9gW[0x7e2]),izD_V32(IUH9gW[0x7e3]),izD_V32(IUH9gW[0x7e4]),izD_V32(IUH9gW[0x7e5]),\"\\u005a\\u004f\\u0062\\u004d\\u0042\\u0038\\u0050\\u0065\\u0056\\u002c\\u0036\\u0070\\u0029\\u004c\\u0066\\u0041\\u0067\\u0070\\u0079\\u0072\\u0042\\u003d\\u0059\\u0076\\u0052\\u003e\\u003a\\u005f\\u0043\\u002e\\u0046\\u0052\\u0045\\u0025\\u007c\\u0054\\u0069\\u006e\\u004e\\u007d\\u0037\",izD_V32(IUH9gW[0x7e6]),izD_V32(IUH9gW[0x7e7]),izD_V32(IUH9gW[0x7e8]),\"\\x73\\x43\\x55\\x35\\x42\\x38\\x63\\x29\\x34\\x29\\x67\\x5b\\x48\\x59\\x3a\\x41\\x48\\x35\\x5e\\x7c\\x26\\x6c\\x77\",izD_V32(IUH9gW[0x7e9]),izD_V32(IUH9gW[0x7ea]),izD_V32(IUH9gW[0x7eb]),izD_V32(IUH9gW[0x7ec]),izD_V32(IUH9gW[0x7ed]),izD_V32(IUH9gW[0x7ee]),izD_V32(IUH9gW[0x7ef]),izD_V32(IUH9gW[0x7f0]),izD_V32(IUH9gW[0x7f1]),izD_V32(IUH9gW[0x7f2]),izD_V32(IUH9gW[0x7f3]),izD_V32(IUH9gW[0x7f4]),izD_V32(IUH9gW[0x7f5]),izD_V32(IUH9gW[0x7f6]),izD_V32(IUH9gW[0x7f7]),izD_V32(IUH9gW[0x7f8]),izD_V32(IUH9gW[0x7f9]),izD_V32(IUH9gW[0x7fa]),izD_V32(IUH9gW[0x7fb]),izD_V32(IUH9gW[0x7fd]),izD_V32(IUH9gW[0x7fe]),\"\\x75\\x57\\x70\\x7b\\x53\\x6c\\x28\\x57\\x2a\\x7a\\x6a\\x2b\\x32\\x61\\x7c\",\"\\x3c\\x43\\x26\\x36\\x78\\x31\\x39\\x65\\x6a\\x47\\x6d\\x5b\\x52\\x24\\x2e\\x7b\\x5b\\x7c\\x25\\x49\\x4a\\x74\\x77\",izD_V32(IUH9gW[0x7ff]),izD_V32(IUH9gW[0x800]),izD_V32(IUH9gW[0x801]),izD_V32(IUH9gW[0x802]),izD_V32(IUH9gW[0x803]),izD_V32(IUH9gW[0x804]),izD_V32(IUH9gW[0x805]),izD_V32(IUH9gW[0x806]),izD_V32(IUH9gW[0x807]),izD_V32(IUH9gW[0x808]),izD_V32(IUH9gW[0x809]),izD_V32(IUH9gW[0x80a]),izD_V32(IUH9gW[0x80b]),izD_V32(IUH9gW[0x80c]),izD_V32(IUH9gW[0x80d]),izD_V32(IUH9gW[0x80e]),\"\\x3c\\x67\\x7c\\x3d\\x64\\x72\\x47\\x77\",izD_V32(IUH9gW[0x80f]),izD_V32(IUH9gW[0x810]),izD_V32(IUH9gW[0x813]),\"\\u007c\\u0052\\u0079\\u006f\\u0059\\u0043\\u007e\\u002b\\u004c\\u007d\\u0044\\u003c\\u0057\\u0022\\u0047\\u0024\\u0069\\u0035\\u0026\\u0026\\u0054\\u004d\\u002e\\u005e\\u004d\\u0030\\u0044\\u0075\\u004d\\u0030\\u0056\\u007e\\u0026\\u0056\\u006e\\u002f\\u0049\\u006e\\u006c\\u0068\\u0044\\u0022\\u0039\\u0030\\u003b\",izD_V32(IUH9gW[0x814]),izD_V32(IUH9gW[0x815]),izD_V32(IUH9gW[0x816]),izD_V32(IUH9gW[0x817]),izD_V32(IUH9gW[0x818]),izD_V32(IUH9gW[0x819]),izD_V32(IUH9gW[0x81a]),izD_V32(IUH9gW[0x81b]),\"\\u0066\\u002f\\u0021\\u0056\\u0045\\u0068\\u005b\\u0063\\u0069\\u005f\\u002c\\u004f\\u007b\\u0031\\u007c\\u0057\\u0052\\u0040\\u0079\\u0054\",\"\\u0078\\u003b\\u006c\\u004d\\u0069\\u005a\\u0054\\u0063\\u0031\\u005f\\u007e\\u007e\\u0031\\u007c\\u0074\\u0064\\u0023\\u004f\\u006f\\u002f\",izD_V32(IUH9gW[0x81c]),izD_V32(IUH9gW[0x81d]),izD_V32(IUH9gW[0x81e]),izD_V32(IUH9gW[0x81f]),izD_V32(IUH9gW[0x820]),izD_V32(IUH9gW[0x821]),izD_V32(IUH9gW[0x822]),izD_V32(IUH9gW[0x823]),izD_V32(IUH9gW[0x824]),\"\\u0055\\u0046\\u0062\\u004d\\u0043\\u0075\\u0060\\u0065\\u002e\\u0025\\u006f\\u002b\\u0033\\u0061\\u0060\\u007b\\u007e\\u0038\\u0051\\u005a\\u0059\\u0046\\u0060\\u0040\\u0069\\u007d\\u0075\\u0075\\u0061\\u004c\\u006c\\u0023\\u0071\\u007c\\u003a\\u0048\\u0040\\u0071\\u0062\",izD_V32(IUH9gW[0x825]),\"\\u005f\\u0074\\u005b\\u006f\\u0043\\u0075\\u0059\\u0047\\u003d\\u004f\\u002e\\u0073\\u0029\\u004c\\u0055\\u0041\\u006b\\u0028\\u0022\\u005a\\u0070\\u004e\\u0079\\u006a\\u007c\\u0065\\u006f\\u0059\\u0047\\u0038\",\"\\u004f\\u0071\\u0040\\u0032\\u007c\\u006e\\u002b\\u0063\\u0064\\u005f\\u0076\\u0070\\u0053\\u0037\\u0034\\u0028\\u0058\\u007b\\u003c\\u0053\\u0069\\u007d\\u0068\\u005a\\u0037\",izD_V32(IUH9gW[0x826]),izD_V32(IUH9gW[0x827]),izD_V32(IUH9gW[0x828]),izD_V32(IUH9gW[0x829]),izD_V32(IUH9gW[0x82a]),izD_V32(IUH9gW[0x82b]),izD_V32(IUH9gW[0x82c]),izD_V32(IUH9gW[0x82d]),izD_V32(IUH9gW[0x82e]),izD_V32(IUH9gW[0x82f]),\"\\u007c\\u004c\\u003c\\u0033\\u0067\\u0030\\u0028\\u0068\\u0035\\u005f\\u002f\\u004f\\u0064\\u007e\\u0046\\u0064\\u0073\\u0043\\u007e\\u0056\",izD_V32(IUH9gW[0x830]),\"\\u002e\\u0024\\u0029\\u0053\\u007c\\u0030\\u0028\\u0068\\u0035\\u005f\\u002f\\u004f\\u0035\\u007c\\u0076\\u005b\\u002a\\u005e\\u002a\\u0053\",izD_V32(IUH9gW[0x831]),izD_V32(IUH9gW[0x832]),izD_V32(IUH9gW[0x833]),\"\\x7c\\x71\\x5d\\x35\\x41\\x75\\x7b\\x5d\\x7a\\x3e\\x43\\x3c\\x75\\x70\\x2a\\x41\\x39\\x29\\x6c\\x49\\x78\\x4b\",izD_V32(IUH9gW[0x834]),izD_V32(IUH9gW[0x5be]),\"\\u003b\\u0077\\u007c\\u0049\\u004a\\u0074\\u0070\\u006a\\u0037\\u004a\\u0071\\u004d\\u002b\\u004e\\u0038\",izD_V32(IUH9gW[0x836]),\"\\x4a\\x40\\x41\\x53\\x4b\\x71\\x51\\x7e\\x2b\\x71\\x67\\x60\\x3d\\x2e\\x21\\x51\\x7b\\x56\\x56\\x41\\x7c\\x6e\\x72\\x3a\\x61\\x60\\x66\\x3f\\x5f\\x31\\x52\\x78\\x42\\x4b\\x62\",izD_V32(IUH9gW[0x837]),izD_V32(IUH9gW[0x838]),izD_V32(IUH9gW[0x839]),\"\\x57\\x3b\\x45\\x35\\x5f\\x46\\x78\\x68\\x7a\\x3e\\x45\\x2b\\x7c\\x6b\\x37\\x32\\x21\\x39\\x4f\\x5a\\x62\\x2e\\x77\",\"\\u005a\\u004f\\u0062\\u004d\\u0042\\u0038\\u004e\\u0068\\u0058\\u003f\\u004c\\u002b\\u006f\\u004d\\u0038\\u0041\\u007c\\u0064\\u0024\\u0062\",izD_V32(IUH9gW[0x83a]),izD_V32(IUH9gW[0x83b]),izD_V32(IUH9gW[0x83c]),izD_V32(IUH9gW[0x83d]),izD_V32(IUH9gW[0x83e]),izD_V32(IUH9gW[0x83f]),izD_V32(IUH9gW[0x840]),\"\\u006a\\u007b\\u004b\\u0054\\u0022\\u0046\\u004d\\u0078\\u005a\\u004e\\u0049\\u002b\\u004e\\u005f\\u0068\\u0041\\u0070\\u003e\\u002a\\u0072\\u007c\\u0063\\u0077\",izD_V32(IUH9gW[0x842]),izD_V32(IUH9gW[0x683]),izD_V32(IUH9gW[0x843]),izD_V32(IUH9gW[0x844]),izD_V32(IUH9gW[0x845]),izD_V32(IUH9gW[0x846]),izD_V32(IUH9gW[0x847]),izD_V32(IUH9gW[0x849]),izD_V32(IUH9gW[0x84b]),izD_V32(IUH9gW[0x84c]),izD_V32(IUH9gW[0x84d]),izD_V32(IUH9gW[0x84e]),izD_V32(IUH9gW[0x850]),izD_V32(IUH9gW[0x851]),\"\\x4d\\x59\\x76\\x2c\\x78\\x64\\x7c\\x77\",izD_V32(IUH9gW[0x852]),izD_V32(IUH9gW[0x853]),izD_V32(IUH9gW[0x854]),izD_V32(IUH9gW[0x855]),izD_V32(IUH9gW[0x856]),izD_V32(IUH9gW[0x857]),izD_V32(IUH9gW[0x858]),\"\\u003b\\u007c\\u004d\\u003f\\u0056\\u007b\\u0048\\u0077\",izD_V32(IUH9gW[0x859]),izD_V32(IUH9gW[0x85a])]);function jZhnmm(){var ezk0Yu=[function(){return globalThis},function(){return global},function(){return berSED[\"TMczNL\"]},function(){return new Function(izD_V32(IUH9gW[0x85b]))()}],RWe5Wz,qIOqfr8,szoaZL;jk9aAk8(RWe5Wz=void 0x0,qIOqfr8=[]);try{jk9aAk8(RWe5Wz=Object,qIOqfr8[izD_V32(IUH9gW[0x25])](\"\"[izD_V32(IUH9gW[0x85c])][izD_V32(IUH9gW[0x85d])][izD_V32(IUH9gW[0x85e])]))}catch(onPFgpD){}dvlo0hk:for(szoaZL=IUH9gW[0x1];szoaZLIUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(gdNrP5.uzsim0Y[IUH9gW[0xc]].push(gdNrP5.uzsim0Y[IUH9gW[0x27]]&IUH9gW[0x12]),gdNrP5.uzsim0Y[IUH9gW[rWJvcF+-0xb5]]>>=IUH9gW[J7aaZbe+-0x10],gdNrP5.uzsim0Y[IUH9gW[J7aaZbe+-0x11]]-=IUH9gW[0xa])}while(gdNrP5.uzsim0Y[IUH9gW[0x9]]>IUH9gW[J7aaZbe+-0x7]);gdNrP5.uzsim0Y[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(gdNrP5.uzsim0Y[IUH9gW[0x2a]]>-IUH9gW[rWJvcF+-0xd9]){jk9aAk8(EzW9ZM.tMg65JU=EzW9ZM.FSBcHOx,J7aaZbe+=-0x264,mOfCEy+=0x11f);break}else{jk9aAk8(EzW9ZM.tMg65JU=EzW9ZM.FSBcHOx,J7aaZbe+=-0x264,mOfCEy+=0x2b7);break}default:jk9aAk8(EzW9ZM.tMg65JU=EzW9ZM.pVUWSQ,J7aaZbe+=-0x3d,rWJvcF+=-0xa3,mOfCEy+=-0xda);break;case-0x30:case 0x8:jk9aAk8(EzW9ZM.FSBcHOx.jI_Jsy=-0xef,EzW9ZM.tMg65JU=EzW9ZM.FSBcHOx,J7aaZbe+=0x1c7,rWJvcF+=0xe8,mOfCEy+=-0x220);break;case mOfCEy!=0x258&&mOfCEy-0x16e:case 0xcd:jk9aAk8(gdNrP5.uzsim0Y[IUH9gW[J7aaZbe+0x256]].push((gdNrP5.uzsim0Y[IUH9gW[0x27]]|gdNrP5.uzsim0Y[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(rWJvcF.push(mOfCEy&IUH9gW[0x12]),mOfCEy>>=IUH9gW[0xa],EzW9ZM-=IUH9gW[0xa])}while(EzW9ZM>IUH9gW[0x13]);Khi9t8=-IUH9gW[0x3]}}if(Khi9t8>-IUH9gW[0x3]){rWJvcF.push((mOfCEy|Khi9t8<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[-IUH9gW[0x38]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0x38]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[-IUH9gW[0x39]]=-IUH9gW[0x3]}}if(qIOqfr8[-IUH9gW[0x39]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[-IUH9gW[0x38]]|qIOqfr8[-IUH9gW[0x39]]<IUH9gW[rWJvcF+0x94]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[onPFgpD+-0xf9]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[J7aaZbe+0x42]]-=IUH9gW[onPFgpD+-0x116])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x3e]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x3e]]>-IUH9gW[0x3]){jk9aAk8(EzW9ZM.X1QoTUZ=EzW9ZM.f4v2FKx,onPFgpD+=-0x78,J7aaZbe+=0x95,rWJvcF+=-0x54,mOfCEy+=0x9e);break}else{jk9aAk8(EzW9ZM.X1QoTUZ=EzW9ZM.f4v2FKx,onPFgpD+=-0x78,J7aaZbe+=0x95,rWJvcF+=-0x134,mOfCEy+=0x9e);break}case 0x99:jk9aAk8(EzW9ZM.X1QoTUZ=EzW9ZM.wypqOC,rWJvcF+=-0x17e);break;default:jk9aAk8([EzW9ZM.f4v2FKx.oTR4UBW,EzW9ZM.f4v2FKx.GTIzE2,EzW9ZM.f4v2FKx.yR1evg]=[0x14,0xdc,0xc6],EzW9ZM.X1QoTUZ=EzW9ZM.Zk3P_v,onPFgpD+=0xc8,J7aaZbe+=0x164,rWJvcF+=-0x26e,mOfCEy+=0x9e);break;case mOfCEy-0xad:case-0x91:case 0x7b:return szoaZL=!0x0,bPpkx2(qIOqfr8[IUH9gW[0xc]]);case-0xd6:case onPFgpD-0x74:jk9aAk8(qIOqfr8[IUH9gW[0x27]]=IUH9gW[rWJvcF+-0x6b],qIOqfr8[IUH9gW[0x9]]=IUH9gW[rWJvcF+-0x6b],EzW9ZM.X1QoTUZ=EzW9ZM.f4v2FKx,rWJvcF+=-0xe9);break;case 0x8b:jk9aAk8([EzW9ZM.f4v2FKx.oTR4UBW,EzW9ZM.f4v2FKx.GTIzE2,EzW9ZM.f4v2FKx.yR1evg]=[0x71,-0xf,0xbf],qIOqfr8[IUH9gW[J7aaZbe+-0x82]]=IUH9gW[J7aaZbe+-0x7f],qIOqfr8[IUH9gW[0x2]]=\"\\x6c\\x4f\\x7a\\x3b\\x71\\x69\\x7e\\x44\\x3a\\x7c\\x78\\x5b\\x23\\x37\\x75\\x2a\\x4d\\x58\\x54\\x26\\x76\\x5f\\x64\\x22\\x3e\\x34\\x49\\x59\\x66\\x57\\x36\\x68\\x67\\x2e\\x70\\x21\\x72\\x50\\x28\\x7b\\x52\\x2f\\x60\\x5a\\x48\\x31\\x38\\x2c\\x7d\\x6f\\x29\\x65\\x53\\x42\\x4a\\x5e\\x4b\\x4c\\x6d\\x6a\\x74\\x56\\x6b\\x24\\x25\\x61\\x6e\\x35\\x79\\x77\\x2b\\x3c\\x5d\\x63\\x33\\x40\\x30\\x62\\x41\\x46\\x55\\x32\\x3f\\x45\\x43\\x39\\x3d\\x4e\\x73\\x51\\x47\",qIOqfr8[IUH9gW[rWJvcF+0x61]]=\"\"+(qIOqfr8[IUH9gW[J7aaZbe+-0x81]]||\"\"),qIOqfr8[IUH9gW[0x11]]=qIOqfr8[IUH9gW[0x10]].length,qIOqfr8[IUH9gW[rWJvcF+0x5d]]=[],EzW9ZM.X1QoTUZ=EzW9ZM.f4v2FKx,onPFgpD+=0xdb,J7aaZbe+=-0xbb,rWJvcF+=0xbd,mOfCEy+=-0xbc);break;case onPFgpD-0x8f:jk9aAk8([EzW9ZM.f4v2FKx.oTR4UBW,EzW9ZM.f4v2FKx.GTIzE2,EzW9ZM.f4v2FKx.yR1evg]=[0x88,0x55,0x18],EzW9ZM.X1QoTUZ=EzW9ZM.iYGo4oj,onPFgpD+=-0x127,J7aaZbe+=0x2c6,rWJvcF+=-0x233,mOfCEy+=-0x66);break}}jk9aAk8(szoaZL=void 0x0,onPFgpD=J7aaZbe(0x45,0x82,-0x51,0x15).next().value);if(szoaZL){return onPFgpD}}function Khi9t8(...qIOqfr8){var szoaZL,onPFgpD;function*J7aaZbe(onPFgpD,J7aaZbe,rWJvcF,mOfCEy={yMlWFA_:{}}){while(onPFgpD+J7aaZbe+rWJvcF!==-0x10)with(mOfCEy.Cj563t||mOfCEy)switch(onPFgpD+J7aaZbe+rWJvcF){case J7aaZbe-0x3c:jk9aAk8(mOfCEy.Cj563t=mOfCEy.Vqyn5vQ,onPFgpD+=-0x14,J7aaZbe+=0xe9,rWJvcF+=0xd9);break;case rWJvcF-0x20:default:jk9aAk8(mOfCEy.Cj563t=mOfCEy.s3xq73j,onPFgpD+=0x70,J7aaZbe+=0x91,rWJvcF+=-0x5a);break;case mOfCEy.yMlWFA_.xKyKvD+-0x9:jk9aAk8(mOfCEy.yMlWFA_.xKyKvD=-0x60,mOfCEy.Cj563t=mOfCEy.zbUG25_,onPFgpD+=-0x13,rWJvcF+=0x1ef);break;case-0x9d:return szoaZL=!0x0,ezk0Yu[qIOqfr8[IUH9gW[0x1]]];case J7aaZbe- -0x89:jk9aAk8(mOfCEy.yMlWFA_.xKyKvD=-0xd9,qIOqfr8[IUH9gW[J7aaZbe+-0x71]]=IUH9gW[0x3]);if(typeof ezk0Yu[qIOqfr8[IUH9gW[onPFgpD+-0x6f]]]===izD_V32(IUH9gW[onPFgpD+-0x6f])){jk9aAk8(mOfCEy.Cj563t=mOfCEy.yMlWFA_,onPFgpD+=0x4,J7aaZbe+=-0x9b,rWJvcF+=-0xbd);break}else{jk9aAk8(mOfCEy.Cj563t=mOfCEy.yMlWFA_,onPFgpD+=-0xb1,J7aaZbe+=-0x9b,rWJvcF+=-0x4b);break}case rWJvcF- -0x105:jk9aAk8(mOfCEy.Cj563t=mOfCEy.W1cMPI,onPFgpD+=0x11f,J7aaZbe+=-0x143,rWJvcF+=0xd9);break;case 0xe4:case rWJvcF- -0x16f:return szoaZL=!0x0,ezk0Yu[qIOqfr8[IUH9gW[0x1]]];case J7aaZbe-0x30:case-0x70:return szoaZL=!0x0,ezk0Yu[qIOqfr8[IUH9gW[0x1]]]=EzW9ZM(RWe5Wz[qIOqfr8[IUH9gW[J7aaZbe+0x2b]]]);case 0x7b:jk9aAk8(mOfCEy.Cj563t=mOfCEy.yMlWFA_,onPFgpD+=0x5d,J7aaZbe+=-0x7f,rWJvcF+=-0xb3);break;case rWJvcF-0x17:return szoaZL=!0x0,ezk0Yu[qIOqfr8[IUH9gW[0x1]]]}}jk9aAk8(szoaZL=void 0x0,onPFgpD=J7aaZbe(0x70,0x71,0x19).next().value);if(szoaZL){return onPFgpD}}return Khi9t8(IUH9gW[0x41])}}function aDf6Q9(...qIOqfr8){var szoaZL,onPFgpD;function*J7aaZbe(onPFgpD,rWJvcF,mOfCEy,EzW9ZM={bjSXPk:{}},aC0THb){while(onPFgpD+rWJvcF+mOfCEy!==-0xe2)with(EzW9ZM.u8PPpT8||EzW9ZM)switch(onPFgpD+rWJvcF+mOfCEy){case-0x5b:EzW9ZM.lnG8N6B.PhOezSE=(0x1,I9Od6Gg)(-0x87,-0x94,-0xd4,0x145).next().value;if(kw0ATH){jk9aAk8(EzW9ZM.u8PPpT8=EzW9ZM.lnG8N6B,onPFgpD+=-0x115,rWJvcF+=0x24c);break}else{jk9aAk8(EzW9ZM.u8PPpT8=EzW9ZM.lnG8N6B,onPFgpD+=-0x115,rWJvcF+=0x93);break}case-0xdb:case EzW9ZM.bjSXPk.KSvL1I+0x1e:jk9aAk8([...lnG8N6B.mcGOI0]=aC0THb,lnG8N6B.I9Od6Gg=function*onPFgpD(rWJvcF,mOfCEy,EzW9ZM,aC0THb,qIOqfr8={bRW99c:{}}){while(rWJvcF+mOfCEy+EzW9ZM+aC0THb!==0x2a)with(qIOqfr8.CUfVHNS||qIOqfr8)switch(rWJvcF+mOfCEy+EzW9ZM+aC0THb){case 0x61:default:jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.oEN66Z,rWJvcF+=0xe);break;case aC0THb-0x1ef:jk9aAk8([qIOqfr8.bRW99c.hihQsd8,qIOqfr8.bRW99c.XYXaPsr]=[-0xb7,-0xd3],lnG8N6B.mcGOI0[IUH9gW[0x0]]=IUH9gW[0x3]);if(typeof ezk0Yu[lnG8N6B.mcGOI0[IUH9gW[0x1]]]===izD_V32(IUH9gW[0x1])){jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=0x58,mOfCEy+=0x96,EzW9ZM+=-0x9,aC0THb+=-0x9c);break}else{jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=0x144,mOfCEy+=0x153,EzW9ZM+=-0x9,aC0THb+=-0xf5);break}case qIOqfr8.bRW99c.XYXaPsr+0xc9:jk9aAk8([qIOqfr8.bRW99c.hihQsd8,qIOqfr8.bRW99c.XYXaPsr]=[-0x5a,-0x6a],qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=0x175,mOfCEy+=0xc9,EzW9ZM+=-0xa,aC0THb+=-0x13b);break;case 0xf0:case EzW9ZM- -0x15e:jk9aAk8([qIOqfr8.bRW99c.hihQsd8,qIOqfr8.bRW99c.XYXaPsr]=[0x74,-0xd2],qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,mOfCEy+=0x101,aC0THb+=-0x17e);break;case-0x2a:case 0xa3:jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.ag5juj,rWJvcF+=0x4d,mOfCEy+=0x1ae,EzW9ZM+=-0x13f,aC0THb+=-0x68);break;case 0x94:case EzW9ZM- -0x9a:jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=0x175,mOfCEy+=0xc9,EzW9ZM+=-0xa,aC0THb+=-0x10c);break;case-0xa4:case-0x80:lnG8N6B.mcGOI0[IUH9gW[0x0]]=IUH9gW[0x3];if(typeof ezk0Yu[lnG8N6B.mcGOI0[IUH9gW[rWJvcF+0x2b]]]===izD_V32(IUH9gW[0x1])){jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=-0x5,mOfCEy+=0xc,EzW9ZM+=-0x157,aC0THb+=0x16f);break}else{jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=0xe7,mOfCEy+=0xc9,EzW9ZM+=-0x157,aC0THb+=0x116);break}case rWJvcF-0x32:case 0x54:return lnG8N6B.kw0ATH=!0x0,ezk0Yu[lnG8N6B.mcGOI0[IUH9gW[EzW9ZM+0xde]]]=(0x1,bjSXPk.Ubi_oIs)(RWe5Wz[lnG8N6B.mcGOI0[IUH9gW[0x1]]]);case aC0THb- -0x9f:return lnG8N6B.kw0ATH=!0x0,ezk0Yu[lnG8N6B.mcGOI0[IUH9gW[EzW9ZM+0xde]]];case-0x74:case-0x18:case mOfCEy- -0x37:jk9aAk8(qIOqfr8.CUfVHNS=qIOqfr8.bRW99c,rWJvcF+=0x89,mOfCEy+=0xc,EzW9ZM+=-0x41,aC0THb+=-0xe2);break;case-0x22:case-0xf8:}},lnG8N6B.kw0ATH=void 0x0,EzW9ZM.u8PPpT8=EzW9ZM.lnG8N6B,onPFgpD+=0x78,rWJvcF+=-0x54,mOfCEy+=-0x48);break;case 0xc7:case-0x9d:return oDGOuvu;case rWJvcF!=0x25a&&rWJvcF-0x17e:case 0x1f:case 0x0:return;case EzW9ZM.bjSXPk.unlPF6K+-0x196:case 0xd3:EzW9ZM.qcB_h3.oDGOuvu=(0x1,HCw__9)(0xc0,0x16).next().value;if(y_0HF1n){jk9aAk8(EzW9ZM.u8PPpT8=EzW9ZM.qcB_h3,rWJvcF+=0x396,mOfCEy+=-0x37b);break}else{jk9aAk8(EzW9ZM.u8PPpT8=EzW9ZM.qcB_h3,onPFgpD+=0xd,rWJvcF+=0x35d,mOfCEy+=-0x302);break}case 0x51:case-0x21:case-0xc6:jk9aAk8([EzW9ZM.bjSXPk.unlPF6K,EzW9ZM.bjSXPk.KSvL1I,EzW9ZM.bjSXPk.Nc3yzki]=[0xc4,0x92,-0x96],EzW9ZM.u8PPpT8=EzW9ZM.qcB_h3,onPFgpD+=-0x23a,rWJvcF+=0x170,mOfCEy+=-0x24);break;case onPFgpD- -0x1b7:jk9aAk8([...qcB_h3.hzYpEvZ]=aC0THb,qcB_h3.HCw__9=function*onPFgpD(rWJvcF,mOfCEy,EzW9ZM={RhcbTe:{}}){while(rWJvcF+mOfCEy!==0x16)with(EzW9ZM.oxtsSYL||EzW9ZM)switch(rWJvcF+mOfCEy){case 0xbc:for(qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x3a]]=IUH9gW[rWJvcF+-0x61];qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x3a]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qcB_h3.hzYpEvZ[IUH9gW[0x1c]].push(qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x1e]]&IUH9gW[0x12]),qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x1e]]>>=IUH9gW[0xa],qcB_h3.hzYpEvZ[IUH9gW[0x1e]]-=IUH9gW[0xa])}while(qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x44]]>IUH9gW[rWJvcF+-0x4f]);qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x1f]]=-IUH9gW[rWJvcF+-0x5f]}}if(qcB_h3.hzYpEvZ[IUH9gW[0x43]]>-IUH9gW[0x3]){jk9aAk8(EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,mOfCEy+=-0x191);break}else{jk9aAk8(EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=-0xb1,mOfCEy+=-0x83);break}case 0xda:case 0xad:case 0x38:jk9aAk8(EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=-0x1a8,mOfCEy+=0x83);break;case-0x28:case EzW9ZM.RhcbTe.I1c29BG+0x152:jk9aAk8(qcB_h3.hzYpEvZ[-IUH9gW[0x42]]=qcB_h3.hzYpEvZ[IUH9gW[0x10]].length,qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0x59]]=[],EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=-0x1cb);break;case EzW9ZM.RhcbTe.I1c29BG+-0x56:case 0x1:case-0x2d:jk9aAk8(EzW9ZM.RhcbTe.I1c29BG=0x1,EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=0x65,mOfCEy+=-0x7c);break;case-0x78:return qcB_h3.y_0HF1n=!0x0,bPpkx2(qcB_h3.hzYpEvZ[IUH9gW[0x1c]]);case 0x92:case 0x7e:case-0x42:jk9aAk8(EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=-0x3e,mOfCEy+=0x7c);break;case 0x4d:case 0xa3:case 0xd6:jk9aAk8(EzW9ZM.RhcbTe.I1c29BG=-0x68,qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0xc0]]=IUH9gW[rWJvcF+-0xbd],qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0xbd]]=\"\\u0028\\u0048\\u0041\\u006b\\u0079\\u0060\\u004a\\u0042\\u0051\\u0069\\u0078\\u0057\\u0031\\u0077\\u0035\\u0074\\u0055\\u006e\\u0064\\u006c\\u0052\\u003a\\u0043\\u002b\\u004c\\u003f\\u0023\\u0034\\u0053\\u0054\\u003c\\u0050\\u0065\\u004e\\u0068\\u005b\\u0063\\u0036\\u0061\\u0021\\u004d\\u0044\\u006d\\u0045\\u0033\\u007d\\u003b\\u0058\\u0039\\u006a\\u0049\\u0029\\u0040\\u005e\\u0046\\u0032\\u0025\\u0067\\u0030\\u0072\\u002f\\u003d\\u0022\\u0073\\u007b\\u005d\\u0062\\u0047\\u0070\\u004f\\u0038\\u0076\\u002e\\u0066\\u0059\\u005f\\u0056\\u006f\\u002c\\u0026\\u007a\\u0024\\u003e\\u0075\\u0071\\u004b\\u0037\\u007e\\u002a\\u007c\\u005a\",qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0xb0]]=\"\"+(qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+-0xbf]]||\"\"),EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=-0x4b,mOfCEy+=0x5f);break;case-0xf7:case rWJvcF!=0x75&&rWJvcF- -0x75:default:jk9aAk8(qcB_h3.hzYpEvZ[IUH9gW[0x44]]=IUH9gW[rWJvcF+0x157],qcB_h3.hzYpEvZ[IUH9gW[0x1e]]=IUH9gW[0x1],qcB_h3.hzYpEvZ[IUH9gW[rWJvcF+0x199]]=-IUH9gW[0x3],EzW9ZM.oxtsSYL=EzW9ZM.RhcbTe,rWJvcF+=0x1b8,mOfCEy+=-0x1b);break;case rWJvcF!=0x159&&rWJvcF-0xac:jk9aAk8(EzW9ZM.oxtsSYL=EzW9ZM.SjOEcbi,rWJvcF+=0xd7,mOfCEy+=-0x12);break;case mOfCEy!=0x5a&&mOfCEy- -0x62:jk9aAk8(qcB_h3.hzYpEvZ[IUH9gW[0x1c]].push((qcB_h3.hzYpEvZ[IUH9gW[0x44]]|qcB_h3.hzYpEvZ[IUH9gW[0x43]]<IUH9gW[onPFgpD+0x5e]?IUH9gW[0x14]:IUH9gW[onPFgpD+0x5c]);do{jk9aAk8(qIOqfr8[IUH9gW[0xbb]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[onPFgpD+0x59]),qIOqfr8[IUH9gW[onPFgpD+0x8b]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[onPFgpD+0x81]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[-IUH9gW[onPFgpD+0xd9]]=-IUH9gW[onPFgpD+0x4a]}}if(qIOqfr8[-IUH9gW[0x92]]>-IUH9gW[onPFgpD+0x4a]){jk9aAk8(rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=0x100,J7aaZbe+=0x6a);break}else{jk9aAk8(rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=0xbb,J7aaZbe+=-0xbe);break}case-0x95:case onPFgpD!=-0x4c&&onPFgpD- -0xeb:case 0xdc:jk9aAk8(qIOqfr8[IUH9gW[onPFgpD+0xe5]]=IUH9gW[onPFgpD+0xac],qIOqfr8[-IUH9gW[0x92]]=-IUH9gW[0x3],rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=0x64,J7aaZbe+=-0x16b);break;case-0x7b:case-0x84:case J7aaZbe-0x4c:jk9aAk8(qIOqfr8[-IUH9gW[onPFgpD+0x106]]=\"\"+(qIOqfr8[IUH9gW[onPFgpD+0x4d]]||\"\"),qIOqfr8[IUH9gW[0x11]]=qIOqfr8[-IUH9gW[0xba]].length,qIOqfr8[IUH9gW[onPFgpD+0x107]]=[],qIOqfr8[IUH9gW[onPFgpD+0x90]]=IUH9gW[onPFgpD+0x4d],rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=-0x5f);break;case onPFgpD-0xe8:jk9aAk8(rWJvcF.cW7qAd.T00n4T=0x32,qIOqfr8[IUH9gW[onPFgpD+-0xad]]=IUH9gW[0x3],qIOqfr8[IUH9gW[onPFgpD+-0xab]]=\"\\u0071\\u0045\\u006c\\u0061\\u004e\\u0074\\u0073\\u0067\\u004f\\u0048\\u0043\\u007d\\u007a\\u007e\\u0063\\u0028\\u0047\\u0042\\u006e\\u005f\\u004a\\u0029\\u0032\\u0075\\u0076\\u0052\\u0064\\u0077\\u0069\\u0050\\u006b\\u0044\\u0021\\u0065\\u0030\\u005e\\u0053\\u0037\\u002f\\u0049\\u007c\\u002c\\u003d\\u006f\\u006a\\u0031\\u0070\\u0079\\u002b\\u0060\\u002a\\u005b\\u007b\\u004c\\u002e\\u0034\\u0026\\u0055\\u0068\\u0058\\u0051\\u0078\\u004d\\u0057\\u006d\\u0024\\u0072\\u0056\\u004b\\u0059\\u005a\\u005d\\u0054\\u003a\\u0066\\u003f\\u0046\\u0062\\u0022\\u0033\\u0038\\u0025\\u0035\\u0040\\u0036\\u0039\\u003b\\u0023\\u003e\\u0041\\u003c\",rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=-0xf9,J7aaZbe+=0x1d3);break;case J7aaZbe!=0x5c&&J7aaZbe!=-0x13e&&J7aaZbe- -0x99:jk9aAk8(rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=-0x144,J7aaZbe+=0x278);break;default:case J7aaZbe- -0x74:return szoaZL=!0x0,bPpkx2(qIOqfr8[IUH9gW[0xbb]]);case-0x3a:case onPFgpD-0xfc:case-0x81:jk9aAk8(qIOqfr8[IUH9gW[onPFgpD+-0x150]]=IUH9gW[0x1],qIOqfr8[-IUH9gW[0x92]]=-IUH9gW[0x3],rWJvcF.lIZ48fZ=rWJvcF.cW7qAd,onPFgpD+=-0x1d1,J7aaZbe+=0x7c);break;case rWJvcF.cW7qAd.T00n4T+0x71:jk9aAk8(qIOqfr8[IUH9gW[onPFgpD+0x2]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[-IUH9gW[0x92]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(BlcfqoE.push(PwIqS6&IUH9gW[0x12]),PwIqS6>>=IUH9gW[J7aaZbe+-0x1b],fLUBIe-=IUH9gW[0xa])}while(fLUBIe>IUH9gW[0x13]);uk_uwT=-IUH9gW[0x3]}}if(uk_uwT>-IUH9gW[0x3]){jk9aAk8(mOfCEy.ZY3_ppO=mOfCEy.ttTfGU,onPFgpD+=-0x8,J7aaZbe+=-0x6a,rWJvcF+=-0x5d);break}else{jk9aAk8(mOfCEy.ZY3_ppO=mOfCEy.ttTfGU,onPFgpD+=-0x18e,J7aaZbe+=0x80,rWJvcF+=-0x5d);break}case-0x59:case rWJvcF-0x8b:jk9aAk8(BlcfqoE.push((PwIqS6|uk_uwT<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0xcb]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0xcb]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0xcb]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x1c]].push(szoaZL[-IUH9gW[0xb2]]&IUH9gW[0x12]),szoaZL[-IUH9gW[0xb2]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x9]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x9]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x2a]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x1c]].push((szoaZL[-IUH9gW[0xb2]]|szoaZL[IUH9gW[0x2a]]<{jk9aAk8(RH8KLq(rWJvcF),RH8KLq(J7aaZbe));function J7aaZbe(...szoaZL){jk9aAk8(szoaZL[IUH9gW[0x0]]=IUH9gW[0x3],szoaZL[IUH9gW[0x2]]=\"\\u0050\\u0079\\u0078\\u0077\\u0061\\u005e\\u002b\\u0029\\u0049\\u0026\\u002e\\u0058\\u004d\\u003f\\u0024\\u0066\\u002f\\u0065\\u007a\\u0032\\u003a\\u005a\\u0071\\u0023\\u003b\\u006e\\u0055\\u0057\\u0033\\u0041\\u0042\\u0073\\u006f\\u0060\\u003d\\u0063\\u005b\\u0069\\u0028\\u002c\\u004f\\u0064\\u0070\\u0021\\u006b\\u0037\\u006c\\u007b\\u0067\\u0052\\u007e\\u0076\\u004a\\u0075\\u0062\\u0030\\u0044\\u0056\\u004b\\u0045\\u0059\\u0040\\u0072\\u003c\\u002a\\u004c\\u0031\\u0054\\u0039\\u0051\\u0053\\u0036\\u0025\\u007c\\u0034\\u007d\\u005f\\u0048\\u0074\\u0022\\u0068\\u0043\\u003e\\u004e\\u0038\\u0046\\u006a\\u006d\\u005d\\u0035\\u0047\",szoaZL[IUH9gW[0xb2]]=\"\"+(szoaZL[IUH9gW[0x1]]||\"\"),szoaZL[IUH9gW[0x4]]=szoaZL[IUH9gW[0xb2]].length,szoaZL[IUH9gW[0x1c]]=[],szoaZL[IUH9gW[0x27]]=IUH9gW[0x1],szoaZL[IUH9gW[0x3a]]=IUH9gW[0x1],szoaZL[IUH9gW[0x2a]]=-IUH9gW[0x3]);for(szoaZL[-IUH9gW[0x5a]]=IUH9gW[0x1];szoaZL[-IUH9gW[0x5a]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x1c]].push(szoaZL[IUH9gW[0x27]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x27]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x3a]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x2a]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x1c]].push((szoaZL[IUH9gW[0x27]]|szoaZL[IUH9gW[0x2a]]<{szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return szoaZL[IUH9gW[0x1]]})),this[rWJvcF(IUH9gW[0xf9])+rWJvcF(IUH9gW[0xfa])]=this[rWJvcF(IUH9gW[0xf1])+IUH9gW[0xf2]][rWJvcF(IUH9gW[0xfb])],this[rWJvcF(IUH9gW[0xfc])](rWJvcF(IUH9gW[0xfd])+this[rWJvcF(IUH9gW[0xf9])+rWJvcF(IUH9gW[0xfa])]+rWJvcF(IUH9gW[0xfe])))}async[onPFgpD(IUH9gW[0xff])](){jk9aAk8(RH8KLq(szoaZL),RH8KLq(qIOqfr8));function qIOqfr8(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0xd0]]=\"\\x44\\x30\\x42\\x53\\x4f\\x51\\x74\\x41\\x62\\x48\\x71\\x37\\x3f\\x7e\\x25\\x50\\x52\\x2e\\x2c\\x58\\x56\\x47\\x40\\x2a\\x4c\\x31\\x5f\\x43\\x6b\\x5a\\x55\\x2f\\x49\\x22\\x61\\x68\\x70\\x38\\x65\\x3e\\x4a\\x7a\\x6f\\x4d\\x67\\x39\\x60\\x23\\x64\\x36\\x21\\x7d\\x5b\\x45\\x7b\\x54\\x3d\\x66\\x32\\x79\\x6a\\x73\\x5e\\x78\\x4e\\x46\\x57\\x24\\x59\\x2b\\x33\\x69\\x7c\\x6c\\x29\\x4b\\x77\\x3c\\x5d\\x76\\x3a\\x34\\x35\\x72\\x6e\\x26\\x3b\\x75\\x63\\x6d\\x28\",qIOqfr8[-IUH9gW[0x100]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x4]]=qIOqfr8[-IUH9gW[0x100]].length,qIOqfr8[-IUH9gW[0xd0]]=[],qIOqfr8[-IUH9gW[0x101]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x9]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x28]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x28]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0xd0]].push(qIOqfr8[-IUH9gW[0x101]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0x101]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0xd0]].push((qIOqfr8[-IUH9gW[0x101]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0x38]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x10a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x10a]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0x38]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x10a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[-IUH9gW[0x11a]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0x11a]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[-IUH9gW[0x11a]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x1c]].push(szoaZL[IUH9gW[0x56]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x56]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x3a]]>IUH9gW[0x13]);szoaZL[IUH9gW[0xa4]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0xa4]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x1c]].push((szoaZL[IUH9gW[0x56]]|szoaZL[IUH9gW[0xa4]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x1c]].push(szoaZL[IUH9gW[0x27]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x27]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x9]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x9]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x13]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x1c]].push((szoaZL[IUH9gW[0x27]]|szoaZL[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8.push(onPFgpD&IUH9gW[0x12]),onPFgpD>>=IUH9gW[0xa],EzW9ZM-=IUH9gW[0xa])}while(EzW9ZM>IUH9gW[0x13]);Khi9t8=-IUH9gW[0x3]}}if(Khi9t8>-IUH9gW[0x3]){qIOqfr8.push((onPFgpD|Khi9t8<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[-IUH9gW[0xbb]].push(szoaZL[IUH9gW[0x27]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x27]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x9]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x9]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x52]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x52]]>-IUH9gW[0x3]){szoaZL[-IUH9gW[0xbb]].push((szoaZL[IUH9gW[0x27]]|szoaZL[IUH9gW[0x52]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8.push(onPFgpD&IUH9gW[0x12]),onPFgpD>>=IUH9gW[0xa],EzW9ZM-=IUH9gW[0xa])}while(EzW9ZM>IUH9gW[0x13]);Khi9t8=-IUH9gW[0x3]}}if(Khi9t8>-IUH9gW[0x3]){qIOqfr8.push((onPFgpD|Khi9t8<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x1c]].push(szoaZL[-IUH9gW[0x85]]&IUH9gW[0x12]),szoaZL[-IUH9gW[0x85]]>>=IUH9gW[0xa],szoaZL[-IUH9gW[0x63]]-=IUH9gW[0xa])}while(szoaZL[-IUH9gW[0x63]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x2a]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x1c]].push((szoaZL[-IUH9gW[0x85]]|szoaZL[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(onPFgpD.push(EzW9ZM&IUH9gW[0x12]),EzW9ZM>>=IUH9gW[0xa],Khi9t8-=IUH9gW[0xa])}while(Khi9t8>IUH9gW[0x13]);cIULrn=-IUH9gW[0x3]}}if(cIULrn>-IUH9gW[0x3]){onPFgpD.push((EzW9ZM|cIULrn<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0xc]].push(szoaZL[IUH9gW[0x27]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x27]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x9]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x9]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x6a]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x6a]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0xc]].push((szoaZL[IUH9gW[0x27]]|szoaZL[IUH9gW[0x6a]]<IUH9gW[0xb])szoaZL[IUH9gW[0x2]]=VQfS3_(szoaZL[IUH9gW[0x2]],szoaZL[IUH9gW[0x1]].length*IUH9gW[0xa]);var qIOqfr8=aDf6Q9(rWJvcF(IUH9gW[0x142]))(IUH9gW[0xb]),onPFgpD=aDf6Q9(rWJvcF(IUH9gW[0x142]))(IUH9gW[0xb]);for(szoaZL[-IUH9gW[0x143]]=IUH9gW[0x1];szoaZL[-IUH9gW[0x143]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(J7aaZbe[IUH9gW[0xc]].push(J7aaZbe[IUH9gW[0x44]]&IUH9gW[0x12]),J7aaZbe[IUH9gW[0x44]]>>=IUH9gW[0xa],J7aaZbe[IUH9gW[0x9]]-=IUH9gW[0xa])}while(J7aaZbe[IUH9gW[0x9]]>IUH9gW[0x13]);J7aaZbe[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(J7aaZbe[IUH9gW[0x13]]>-IUH9gW[0x3]){J7aaZbe[IUH9gW[0xc]].push((J7aaZbe[IUH9gW[0x44]]|J7aaZbe[IUH9gW[0x13]]<>>IUH9gW[0xc]&IUH9gW[0x16])+J7aaZbe[IUH9gW[0x3]].charAt(J7aaZbe[-IUH9gW[0x40]]&IUH9gW[0x16]))}return J7aaZbe[IUH9gW[0x7]]}function AvR7Ar(...J7aaZbe){jk9aAk8(J7aaZbe[IUH9gW[0x0]]=IUH9gW[0x3],RH8KLq(qIOqfr8),RH8KLq(rWJvcF));function rWJvcF(...J7aaZbe){jk9aAk8(J7aaZbe[IUH9gW[0x0]]=IUH9gW[0x3],J7aaZbe[IUH9gW[0x2]]=\"\\x66\\x30\\x52\\x71\\x6a\\x4c\\x41\\x4f\\x50\\x53\\x31\\x35\\x32\\x72\\x5a\\x21\\x26\\x78\\x2b\\x3e\\x40\\x39\\x69\\x45\\x4b\\x3a\\x6d\\x29\\x5d\\x67\\x79\\x34\\x28\\x75\\x68\\x6b\\x42\\x7a\\x56\\x73\\x3c\\x22\\x4d\\x36\\x7d\\x33\\x43\\x62\\x48\\x64\\x54\\x59\\x3f\\x58\\x47\\x55\\x44\\x65\\x63\\x7b\\x4a\\x24\\x6e\\x23\\x70\\x3b\\x3d\\x49\\x57\\x25\\x60\\x61\\x74\\x51\\x5f\\x46\\x6c\\x6f\\x2c\\x4e\\x76\\x77\\x5e\\x2e\\x38\\x7c\\x7e\\x2a\\x5b\\x37\\x2f\",J7aaZbe[-IUH9gW[0xd4]]=\"\"+(J7aaZbe[IUH9gW[0x1]]||\"\"),J7aaZbe[IUH9gW[0x4]]=J7aaZbe[-IUH9gW[0xd4]].length,J7aaZbe[IUH9gW[0x4c]]=[],J7aaZbe[-IUH9gW[0x52]]=IUH9gW[0x1],J7aaZbe[IUH9gW[0x9]]=IUH9gW[0x1],J7aaZbe[IUH9gW[0x2a]]=-IUH9gW[0x3]);for(J7aaZbe[IUH9gW[0x28]]=IUH9gW[0x1];J7aaZbe[IUH9gW[0x28]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(J7aaZbe[IUH9gW[0x4c]].push(J7aaZbe[-IUH9gW[0x52]]&IUH9gW[0x12]),J7aaZbe[-IUH9gW[0x52]]>>=IUH9gW[0xa],J7aaZbe[IUH9gW[0x9]]-=IUH9gW[0xa])}while(J7aaZbe[IUH9gW[0x9]]>IUH9gW[0x13]);J7aaZbe[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(J7aaZbe[IUH9gW[0x2a]]>-IUH9gW[0x3]){J7aaZbe[IUH9gW[0x4c]].push((J7aaZbe[-IUH9gW[0x52]]|J7aaZbe[IUH9gW[0x2a]]<J7aaZbe[IUH9gW[0x1]].length*IUH9gW[0xa]?J7aaZbe[IUH9gW[0x7]]+=szoaZL[IUH9gW[0x10]]:J7aaZbe[IUH9gW[0x7]]+=J7aaZbe[-IUH9gW[0x2e]].charAt(J7aaZbe[IUH9gW[0x27]]>>>IUH9gW[0x9]*(IUH9gW[0x4]-J7aaZbe[IUH9gW[0x3a]])&IUH9gW[0x20])}return J7aaZbe[IUH9gW[0x7]]}function P68Tf2(...szoaZL){jk9aAk8(szoaZL[IUH9gW[0x0]]=IUH9gW[0x7],RH8KLq(J7aaZbe));function J7aaZbe(...szoaZL){jk9aAk8(szoaZL[IUH9gW[0x0]]=IUH9gW[0x3],szoaZL[IUH9gW[0x2]]=\"\\x39\\x64\\x6f\\x2f\\x50\\x5d\\x4d\\x73\\x6e\\x43\\x3b\\x4f\\x59\\x30\\x54\\x4a\\x7c\\x67\\x46\\x56\\x3d\\x3f\\x63\\x5a\\x25\\x32\\x77\\x22\\x58\\x7a\\x2e\\x68\\x5e\\x69\\x2b\\x47\\x6a\\x4b\\x72\\x71\\x66\\x76\\x37\\x44\\x26\\x3e\\x21\\x7e\\x7d\\x65\\x23\\x24\\x48\\x78\\x5b\\x36\\x38\\x79\\x3c\\x75\\x40\\x33\\x5f\\x2c\\x7b\\x34\\x31\\x60\\x3a\\x42\\x2a\\x28\\x6b\\x61\\x62\\x70\\x6d\\x4c\\x57\\x55\\x49\\x51\\x6c\\x4e\\x53\\x45\\x29\\x35\\x52\\x74\\x41\",szoaZL[IUH9gW[0x151]]=\"\"+(szoaZL[IUH9gW[0x1]]||\"\"),szoaZL[IUH9gW[0xd4]]=szoaZL[IUH9gW[0x151]].length,szoaZL[IUH9gW[0x42]]=[],szoaZL[IUH9gW[0x59]]=IUH9gW[0x1],szoaZL[IUH9gW[0x3a]]=IUH9gW[0x1],szoaZL[IUH9gW[0x13]]=-IUH9gW[0x3]);for(szoaZL[-IUH9gW[0x152]]=IUH9gW[0x1];szoaZL[-IUH9gW[0x152]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x42]].push(szoaZL[IUH9gW[0x59]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x59]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x3a]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x13]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x42]].push((szoaZL[IUH9gW[0x59]]|szoaZL[IUH9gW[0x13]]<IUH9gW[0x1]){jk9aAk8(Khi9t8=aDf6Q9(rWJvcF(IUH9gW[0x153]))(),EzW9ZM=IUH9gW[0x1]);for(qIOqfr8=IUH9gW[0x1];qIOqfr8IUH9gW[0x1]||onPFgpD>IUH9gW[0x1])Khi9t8[Khi9t8.length]=onPFgpD}jk9aAk8(szoaZL[IUH9gW[0x79]][szoaZL[IUH9gW[0x79]].length]=EzW9ZM,szoaZL[IUH9gW[0xc]]=Khi9t8)}szoaZL[IUH9gW[0x27]]=\"\";for(qIOqfr8=szoaZL[IUH9gW[0x79]].length-IUH9gW[0x3];qIOqfr8>=IUH9gW[0x1];qIOqfr8--)szoaZL[IUH9gW[0x27]]+=szoaZL[IUH9gW[0x3]].charAt(szoaZL[IUH9gW[0x79]][qIOqfr8]);szoaZL[IUH9gW[0x9]]=aDf6Q9(rWJvcF(IUH9gW[0x154])+IUH9gW[0x155]).ceil(szoaZL[IUH9gW[0x1]].length*IUH9gW[0xa]/(aDf6Q9(rWJvcF(IUH9gW[0x156])).log(szoaZL[IUH9gW[0x3]].length)/aDf6Q9(rWJvcF(IUH9gW[0x154])+IUH9gW[0x155]).log(IUH9gW[0x7])));for(qIOqfr8=szoaZL[IUH9gW[0x27]].length;qIOqfr8IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0xbe]].push(szoaZL[IUH9gW[0x44]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x44]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x157]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x157]]>IUH9gW[0x13]);szoaZL[IUH9gW[0x52]]=-IUH9gW[0x3]}}if(szoaZL[IUH9gW[0x52]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0xbe]].push((szoaZL[IUH9gW[0x44]]|szoaZL[IUH9gW[0x52]]<>>IUH9gW[0x9]&IUH9gW[0x1f],IUH9gW[0x1a]|J7aaZbe&IUH9gW[0x20]);else if(J7aaZbe<=IUH9gW[0x167])szoaZL[IUH9gW[0x2]]+=aDf6Q9(onPFgpD(IUH9gW[0x15b])).fromCharCode(IUH9gW[0xbc]|J7aaZbe>>>IUH9gW[0x22]&IUH9gW[0x16],IUH9gW[0x1a]|J7aaZbe>>>IUH9gW[0x9]&IUH9gW[0x20],IUH9gW[0x1a]|J7aaZbe&IUH9gW[0x20]);else if(J7aaZbe<=0x1fffff)szoaZL[IUH9gW[0x2]]+=aDf6Q9(onPFgpD(IUH9gW[0x15b])).fromCharCode(IUH9gW[0xd0]|J7aaZbe>>>IUH9gW[0x24]&IUH9gW[0x13],IUH9gW[0x1a]|J7aaZbe>>>IUH9gW[0x22]&IUH9gW[0x20],IUH9gW[0x1a]|J7aaZbe>>>IUH9gW[0x9]&IUH9gW[0x20],IUH9gW[0x1a]|J7aaZbe&IUH9gW[0x20])}return szoaZL[IUH9gW[0x2]]}function p4AG2E6(...szoaZL){jk9aAk8(szoaZL[IUH9gW[0x0]]=IUH9gW[0x3],szoaZL[IUH9gW[0x2]]=\"\");for(szoaZL[IUH9gW[0x10]]=IUH9gW[0x1];szoaZL[IUH9gW[0x10]]>>IUH9gW[0xa]&IUH9gW[0x12],szoaZL[IUH9gW[0x1]].charCodeAt(szoaZL[IUH9gW[0x10]])&IUH9gW[0x12]);return szoaZL[IUH9gW[0x2]]}function vFTL7uH(...szoaZL){jk9aAk8(szoaZL[IUH9gW[0x0]]=IUH9gW[0x3],szoaZL[IUH9gW[0xaa]]=aDf6Q9(mOfCEy(IUH9gW[0x15f]))(szoaZL[IUH9gW[0x1]].length>>IUH9gW[0x7]));for(szoaZL[IUH9gW[0x7]]=IUH9gW[0x1];szoaZL[IUH9gW[0x7]]>IUH9gW[0x27]]|=(szoaZL[IUH9gW[0x1]].charCodeAt(szoaZL[IUH9gW[0x7]]/IUH9gW[0xa])&IUH9gW[0x12])<>IUH9gW[0x27]]>>>IUH9gW[0x160]-szoaZL[IUH9gW[0x7]]%IUH9gW[0x6]&IUH9gW[0x12]);return szoaZL[IUH9gW[0x2]]}function DgSF7DB(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x7];return szoaZL[IUH9gW[0x1]]>>>szoaZL[IUH9gW[0x3]]|szoaZL[IUH9gW[0x1]]<>>szoaZL[IUH9gW[0x3]]}function lYK0Eoq(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x4];return szoaZL[IUH9gW[0x1]]&szoaZL[IUH9gW[0x3]]^~szoaZL[IUH9gW[0x1]]&szoaZL[IUH9gW[0x7]]}function faBjLD(szoaZL,J7aaZbe,rWJvcF){return szoaZL&J7aaZbe^szoaZL&rWJvcF^J7aaZbe&rWJvcF}function nC60Cg(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x7])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x14])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x161])}function aatDxQ(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x9])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x151])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x162])}function nWUdKq(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x13])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x24])^ZuMey1G(szoaZL[IUH9gW[0x1]],IUH9gW[0x4])}function bcq5K8P(szoaZL){return DgSF7DB(szoaZL,IUH9gW[0xbf])^DgSF7DB(szoaZL,IUH9gW[0x163])^ZuMey1G(szoaZL,IUH9gW[0x15a])}function ajEE_i(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x157])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0xba])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x164])}function XOmVU2g(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x15])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x24])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x143])}function bEWF0E6(...szoaZL){szoaZL[IUH9gW[0x0]]=IUH9gW[0x3];return DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x163])^DgSF7DB(szoaZL[IUH9gW[0x1]],IUH9gW[0x165])^ZuMey1G(szoaZL[IUH9gW[0x1]],IUH9gW[0x9])}szoaZL[IUH9gW[0x7]]=new(aDf6Q9(rWJvcF(IUH9gW[0x166])))(0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e);function VQfS3_(...J7aaZbe){jk9aAk8(J7aaZbe[IUH9gW[0x0]]=IUH9gW[0x7],J7aaZbe[IUH9gW[0x7]]=new(aDf6Q9(rWJvcF(IUH9gW[0x166])))(0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19),J7aaZbe[IUH9gW[0x4]]=new(aDf6Q9(rWJvcF(IUH9gW[0x166])))(IUH9gW[0xd4]));var qIOqfr8,onPFgpD,EzW9ZM,Khi9t8,cIULrn,aC0THb,ix6yOs,u7abyW,jZhnmm,AvR7Ar,P68Tf2,CiFrPq;jk9aAk8(J7aaZbe[IUH9gW[0x1]][J7aaZbe[IUH9gW[0x3]]>>IUH9gW[0x27]]|=IUH9gW[0x1a]<>IUH9gW[0x29]<>IUH9gW[0xb])+(szoaZL[IUH9gW[0x3]]>>IUH9gW[0xb])+(szoaZL[IUH9gW[0x163]]>>IUH9gW[0xb]));return szoaZL[IUH9gW[0x4]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(szoaZL[IUH9gW[0x1c]].push(szoaZL[IUH9gW[0x27]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x27]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x9]]-=IUH9gW[0xa])}while(szoaZL[IUH9gW[0x9]]>IUH9gW[0x13]);szoaZL[-IUH9gW[0x3f]]=-IUH9gW[0x3]}}if(szoaZL[-IUH9gW[0x3f]]>-IUH9gW[0x3]){szoaZL[IUH9gW[0x1c]].push((szoaZL[IUH9gW[0x27]]|szoaZL[-IUH9gW[0x3f]]<J7aaZbe-rWJvcF),szoaZL[IUH9gW[0x3]](mOfCEy,[],IUH9gW[0x1],EzW9ZM,J7aaZbe,rWJvcF));return mOfCEy},szoaZL[IUH9gW[0x3]]=function(J7aaZbe,rWJvcF,mOfCEy,EzW9ZM,qIOqfr8,Khi9t8){var cIULrn=IUH9gW[0x5],izD_V32;if(Khi9t8Khi9t8)break;if(izD_V32>mOfCEy&&qIOqfr8[izD_V32]===qIOqfr8[izD_V32-IUH9gW[0x3]])continue;jk9aAk8(cIULrn=aDf6Q9(onPFgpD(IUH9gW[0x16e])).from(rWJvcF),cIULrn.push(qIOqfr8[izD_V32]),szoaZL[IUH9gW[0x3]](J7aaZbe,cIULrn,izD_V32+IUH9gW[0x3],EzW9ZM,qIOqfr8,Khi9t8-qIOqfr8[izD_V32]))}},aDf6Q9(onPFgpD(IUH9gW[0x16f])).log(szoaZL[-IUH9gW[0x66]]))}J7aaZbe={};return qIOqfr8[IUH9gW[0x7]][mOfCEy(IUH9gW[0x170])](szoaZL,J7aaZbe)}[onPFgpD(IUH9gW[0x102])](qIOqfr8){RH8KLq(J7aaZbe);function szoaZL(qIOqfr8){var szoaZL=\"\\u0041\\u006b\\u004d\\u0042\\u004c\\u006f\\u004f\\u0045\\u0071\\u006e\\u0062\\u0061\\u0048\\u005a\\u0055\\u007e\\u005e\\u005d\\u0075\\u007c\\u0073\\u006d\\u0044\\u0056\\u0022\\u0031\\u0024\\u0076\\u003b\\u0037\\u006c\\u0052\\u0058\\u0063\\u0029\\u0038\\u0064\\u0026\\u0043\\u0054\\u0077\\u0049\\u007a\\u002f\\u002e\\u004e\\u006a\\u0059\\u0033\\u0068\\u0051\\u0078\\u0070\\u004b\\u0053\\u003c\\u0069\\u005f\\u0065\\u0046\\u0047\\u0032\\u0072\\u003d\\u0074\\u004a\\u0067\\u0035\\u0060\\u002a\\u0050\\u0066\\u0079\\u0039\\u0023\\u005b\\u0040\\u003e\\u007b\\u0025\\u002c\\u0021\\u0036\\u002b\\u0034\\u0057\\u0030\\u0028\\u007d\\u003f\\u003a\",J7aaZbe,onPFgpD,rWJvcF,mOfCEy,EzW9ZM,Khi9t8,cIULrn;jk9aAk8(J7aaZbe=\"\"+(qIOqfr8||\"\"),onPFgpD=J7aaZbe.length,rWJvcF=[],mOfCEy=IUH9gW[0x1],EzW9ZM=IUH9gW[0x1],Khi9t8=-IUH9gW[0x3]);for(cIULrn=IUH9gW[0x1];cIULrnIUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(rWJvcF.push(mOfCEy&IUH9gW[0x12]),mOfCEy>>=IUH9gW[0xa],EzW9ZM-=IUH9gW[0xa])}while(EzW9ZM>IUH9gW[0x13]);Khi9t8=-IUH9gW[0x3]}}if(Khi9t8>-IUH9gW[0x3]){rWJvcF.push((mOfCEy|Khi9t8<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(mOfCEy.push(EzW9ZM&IUH9gW[0x12]),EzW9ZM>>=IUH9gW[0xa],Khi9t8-=IUH9gW[0xa])}while(Khi9t8>IUH9gW[0x13]);onPFgpD=-IUH9gW[0x3]}}if(onPFgpD>-IUH9gW[0x3]){mOfCEy.push((EzW9ZM|onPFgpD<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(kxLdiO4[IUH9gW[J7aaZbe+0xe7]].push(kxLdiO4[IUH9gW[0x27]]&IUH9gW[0x12]),kxLdiO4[IUH9gW[J7aaZbe+0xf2]]>>=IUH9gW[mOfCEy+-0x15b],kxLdiO4[-IUH9gW[0x59]]-=IUH9gW[mOfCEy+-0x15b])}while(kxLdiO4[-IUH9gW[0x59]]>IUH9gW[0x13]);kxLdiO4[IUH9gW[0x13]]=-IUH9gW[J7aaZbe+0xce]}}if(kxLdiO4[IUH9gW[0x13]]>-IUH9gW[0x3]){jk9aAk8(Khi9t8.vmhGuf=Khi9t8.Wm0ysDC,J7aaZbe+=0x156,mOfCEy+=-0x82,EzW9ZM+=-0x17b);break}else{jk9aAk8(Khi9t8.vmhGuf=Khi9t8.Wm0ysDC,J7aaZbe+=0x156,mOfCEy+=0x60,EzW9ZM+=-0x17b);break}case-0x7a:case EzW9ZM- -0x18c:jk9aAk8((0x1,utn3k6)(),Khi9t8.vmhGuf=Khi9t8.Tnqt22G,J7aaZbe+=-0x226,EzW9ZM+=0x13b);break;case mOfCEy- -0x2a:jk9aAk8([...ZmgETuO.Z0fp4D]=aC0THb,ZmgETuO.a4EuCH=function*J7aaZbe(mOfCEy,EzW9ZM,Khi9t8,aC0THb,qIOqfr8={NV5saiS:{}}){while(mOfCEy+EzW9ZM+Khi9t8+aC0THb!==-0x2f)with(qIOqfr8.MlwnX_||qIOqfr8)switch(mOfCEy+EzW9ZM+Khi9t8+aC0THb){case 0x12:case qIOqfr8.NV5saiS.lMyGdG+-0x80:jk9aAk8(qIOqfr8.MlwnX_=qIOqfr8.sSGafJ,mOfCEy+=-0x6c,EzW9ZM+=0x113);break;case 0xfa:case aC0THb- -0xdf:jk9aAk8(qIOqfr8.NV5saiS.lMyGdG=0x4b,qIOqfr8.MlwnX_=qIOqfr8.S2_LpPS,mOfCEy+=-0x6c,EzW9ZM+=0x12b,Khi9t8+=-0xdb,aC0THb+=-0x66);break;case-0xec:default:jk9aAk8(qIOqfr8.NV5saiS.lMyGdG=-0x56,ZmgETuO.Z0fp4D[IUH9gW[0x0]]=IUH9gW[mOfCEy+0x2b],ZmgETuO.Z0fp4D[IUH9gW[EzW9ZM+0xb7]]=RH8KLq(function(...J7aaZbe){J7aaZbe[IUH9gW[0x0]]=IUH9gW[0x7];return ZmgETuO.Z0fp4D[IUH9gW[0x3]]({},J7aaZbe[IUH9gW[0x1]],J7aaZbe[IUH9gW[0x3]])},IUH9gW[0x7]),qIOqfr8.MlwnX_=qIOqfr8.NV5saiS,mOfCEy+=0xa7,EzW9ZM+=0x51,Khi9t8+=0x13b,aC0THb+=-0x120);break;case qIOqfr8.NV5saiS.lMyGdG+0xeb:ZmgETuO.Z0fp4D[IUH9gW[Khi9t8+-0xef]]=function(J7aaZbe,mOfCEy,EzW9ZM){var Khi9t8,aC0THb;function*qIOqfr8(aC0THb,qIOqfr8,szoaZL,onPFgpD,rWJvcF={_0porG:{}}){while(aC0THb+qIOqfr8+szoaZL+onPFgpD!==-0x57)with(rWJvcF.qVYivqm||rWJvcF)switch(aC0THb+qIOqfr8+szoaZL+onPFgpD){case 0x9c:jk9aAk8([rWJvcF._0porG.HdzkZ6x,rWJvcF._0porG.drVSwvu]=[0x3a,0x99],_0porG.oYbofj={});if(J7aaZbe[mOfCEy+EzW9ZM]!==IUH9gW[0x1b])return Khi9t8=!0x0,J7aaZbe[mOfCEy+EzW9ZM];jk9aAk8(rWJvcF.qVYivqm=rWJvcF._0porG,aC0THb+=0x8,qIOqfr8+=0x10a,szoaZL+=-0x218,onPFgpD+=-0x23);break;case szoaZL-0xe3:case-0x9f:case 0x1d:return Khi9t8=!0x0,IUH9gW[aC0THb+0x228];default:case-0xb4:case 0x42:if(mOfCEy===EzW9ZM)return Khi9t8=!0x0,IUH9gW[0x192];for(CecDZC=IUH9gW[szoaZL+0x66];CecDZCIUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[-IUH9gW[0x101]]=-IUH9gW[0x3]}}if(qIOqfr8[-IUH9gW[0x101]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[-IUH9gW[0x101]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[-IUH9gW[0xc2]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0xc2]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[-IUH9gW[0xce]]=-IUH9gW[0x3]}}if(qIOqfr8[-IUH9gW[0xce]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[-IUH9gW[0xc2]]|qIOqfr8[-IUH9gW[0xce]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[-IUH9gW[0x81]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[0x81]]>IUH9gW[0x13]);qIOqfr8[-IUH9gW[0x100]]=-IUH9gW[0x3]}}if(qIOqfr8[-IUH9gW[0x100]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[-IUH9gW[0x100]]<{qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];return aDf6Q9(szoaZL(IUH9gW[0x1a5]))(qIOqfr8[IUH9gW[0x1]],onPFgpD)}))}function DgSF7DB(){\"use strict\";RH8KLq(qIOqfr8);function qIOqfr8(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x3]]=\"\\u0075\\u0044\\u0042\\u004e\\u006e\\u0067\\u0046\\u0066\\u0059\\u0051\\u0072\\u0061\\u0074\\u0065\\u004f\\u004d\\u0053\\u0045\\u0076\\u0077\\u005b\\u0069\\u002b\\u0037\\u0073\\u0048\\u0060\\u0055\\u005a\\u003c\\u0041\\u007c\\u0064\\u003e\\u007b\\u0028\\u0049\\u0058\\u0043\\u0023\\u003f\\u0039\\u003d\\u0035\\u0078\\u004c\\u0052\\u006a\\u0050\\u0026\\u002f\\u0079\\u0036\\u0038\\u0029\\u004a\\u0034\\u007a\\u0070\\u0030\\u0071\\u003b\\u0063\\u007d\\u003a\\u0031\\u006c\\u0024\\u005e\\u004b\\u002a\\u0022\\u0054\\u005d\\u0021\\u0040\\u007e\\u006f\\u0025\\u0032\\u0056\\u0033\\u0047\\u0068\\u005f\\u0062\\u006d\\u002c\\u0057\\u002e\\u006b\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x4]]=qIOqfr8[IUH9gW[0x7]].length,qIOqfr8[IUH9gW[0xc]]=[],qIOqfr8[IUH9gW[0x27]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x3a]]=IUH9gW[0x1],qIOqfr8[-IUH9gW[0x9f]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0xa]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0xa]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[-IUH9gW[0x9f]]=-IUH9gW[0x3]}}if(qIOqfr8[-IUH9gW[0x9f]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[-IUH9gW[0x9f]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0x2c]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0x2c]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[-IUH9gW[0xa1]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0xa1]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[-IUH9gW[0xa1]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x6e]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x6e]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x6e]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1ce]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[-IUH9gW[0x58]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[0x58]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1ce]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x13]]<{jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x1],RH8KLq(szoaZL));function szoaZL(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x2]]=\"\\x77\\x33\\x3e\\x7b\\x40\\x5f\\x5b\\x21\\x57\\x43\\x6e\\x4d\\x39\\x76\\x23\\x67\\x5e\\x42\\x66\\x22\\x7a\\x4a\\x4c\\x51\\x4b\\x71\\x30\\x7e\\x58\\x2c\\x24\\x59\\x3d\\x70\\x61\\x31\\x3a\\x5d\\x52\\x73\\x62\\x36\\x55\\x4e\\x54\\x74\\x26\\x4f\\x6b\\x32\\x25\\x46\\x44\\x28\\x64\\x45\\x6c\\x65\\x7d\\x68\\x2f\\x79\\x2a\\x50\\x41\\x38\\x78\\x49\\x53\\x6d\\x3c\\x5a\\x37\\x35\\x48\\x3f\\x47\\x56\\x6a\\x6f\\x2b\\x29\\x75\\x69\\x34\\x60\\x2e\\x7c\\x63\\x72\\x3b\",qIOqfr8[-IUH9gW[0x49]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[-IUH9gW[0x87]]=qIOqfr8[-IUH9gW[0x49]].length,qIOqfr8[-IUH9gW[0x45]]=[],qIOqfr8[IUH9gW[0x27]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x9]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x28]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x28]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0x45]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0x45]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0xab]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0xab]]>>=IUH9gW[0xa],qIOqfr8[-IUH9gW[0x157]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[0x157]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0xab]]|qIOqfr8[IUH9gW[0x2a]]<{jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x1],RH8KLq(onPFgpD),RH8KLq(szoaZL));function szoaZL(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x3]]=\"\\x2a\\x32\\x37\\x66\\x21\\x7a\\x72\\x5f\\x35\\x55\\x28\\x63\\x3c\\x23\\x78\\x4f\\x73\\x67\\x29\\x2b\\x76\\x34\\x47\\x3a\\x26\\x48\\x79\\x4d\\x45\\x6d\\x42\\x52\\x60\\x36\\x7d\\x56\\x31\\x75\\x3d\\x30\\x57\\x61\\x24\\x2f\\x65\\x68\\x69\\x51\\x7e\\x40\\x58\\x53\\x3e\\x7b\\x33\\x74\\x4e\\x4a\\x77\\x6f\\x3f\\x41\\x7c\\x4c\\x3b\\x6e\\x49\\x25\\x50\\x59\\x5a\\x71\\x2e\\x5e\\x62\\x39\\x5b\\x6c\\x64\\x43\\x46\\x6b\\x54\\x5d\\x4b\\x22\\x70\\x38\\x44\\x6a\\x2c\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x3e]]=qIOqfr8[IUH9gW[0x7]].length,qIOqfr8[-IUH9gW[0xad]]=[],qIOqfr8[IUH9gW[0x7c]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x3a]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0xf]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0xf]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0xad]].push(qIOqfr8[IUH9gW[0x7c]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x7c]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0xad]].push((qIOqfr8[IUH9gW[0x7c]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0xa9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0xa9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0x31]].push(qIOqfr8[IUH9gW[0x208]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x208]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x81]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x81]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0x31]].push((qIOqfr8[IUH9gW[0x208]]|qIOqfr8[IUH9gW[0x81]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x13]]<{jk9aAk8(RH8KLq(szoaZL),qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],RH8KLq(onPFgpD));function szoaZL(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x2]]=\"\\u005e\\u0041\\u0063\\u0058\\u0054\\u004a\\u0048\\u0052\\u0066\\u0068\\u0057\\u0064\\u0061\\u006c\\u006f\\u003b\\u007c\\u0065\\u002b\\u002c\\u0071\\u0042\\u0069\\u0075\\u0050\\u002a\\u003e\\u005a\\u0040\\u0067\\u0023\\u0072\\u0043\\u0053\\u0076\\u0037\\u002f\\u0028\\u004d\\u0060\\u0074\\u0056\\u0038\\u0025\\u004c\\u0070\\u0039\\u0033\\u006b\\u0030\\u0022\\u007b\\u007d\\u0047\\u0024\\u0059\\u0044\\u002e\\u0078\\u004e\\u006e\\u0062\\u0045\\u0035\\u0021\\u007a\\u006a\\u0073\\u0046\\u005d\\u0036\\u0034\\u0031\\u007e\\u0049\\u006d\\u003d\\u0077\\u004b\\u005b\\u004f\\u0055\\u0026\\u0032\\u0051\\u005f\\u0029\\u0079\\u003f\\u003a\\u003c\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x11]]=qIOqfr8[IUH9gW[0x7]].length,qIOqfr8[IUH9gW[0xc]]=[],qIOqfr8[-IUH9gW[0x84]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x4]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x89]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x89]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[-IUH9gW[0x84]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0x84]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x4]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x4]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[-IUH9gW[0x84]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x2a]]<{jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x1],RH8KLq(onPFgpD),RH8KLq(szoaZL));function szoaZL(...qIOqfr8){var szoaZL,onPFgpD;function*J7aaZbe(onPFgpD,J7aaZbe,rWJvcF={e1528n3:{}}){while(onPFgpD+J7aaZbe!==-0x8)with(rWJvcF.L7tkQ1O||rWJvcF)switch(onPFgpD+J7aaZbe){case rWJvcF.e1528n3.Fpmyr2y+0xf7:jk9aAk8(qIOqfr8[IUH9gW[0x9]]=IUH9gW[0x1],qIOqfr8[IUH9gW[onPFgpD+0x1b0]]=-IUH9gW[onPFgpD+0xa9],rWJvcF.L7tkQ1O=rWJvcF.e1528n3,onPFgpD+=0x6,J7aaZbe+=-0x1c4);break;case 0xce:case-0x29:case-0x12:jk9aAk8(qIOqfr8[-IUH9gW[onPFgpD+-0x12]]=[],qIOqfr8[IUH9gW[onPFgpD+-0x50]]=IUH9gW[0x1],rWJvcF.L7tkQ1O=rWJvcF.e1528n3,onPFgpD+=-0x11d,J7aaZbe+=0x226);break;case 0xc7:jk9aAk8([rWJvcF.e1528n3.Fpmyr2y,rWJvcF.e1528n3.gaS2LyE]=[0x0,-0x9f],qIOqfr8[IUH9gW[onPFgpD+-0x93]]=IUH9gW[onPFgpD+-0x90],qIOqfr8[IUH9gW[onPFgpD+-0x90]]=\"\\x37\\x3d\\x26\\x5f\\x58\\x52\\x2e\\x33\\x6e\\x7d\\x65\\x56\\x75\\x40\\x4e\\x6a\\x6b\\x44\\x41\\x36\\x79\\x46\\x7b\\x69\\x4b\\x6c\\x2c\\x3b\\x48\\x38\\x64\\x5b\\x76\\x50\\x57\\x5a\\x74\\x45\\x3e\\x55\\x73\\x29\\x35\\x25\\x72\\x77\\x51\\x2a\\x3a\\x2b\\x49\\x42\\x32\\x78\\x39\\x67\\x2f\\x4f\\x6f\\x61\\x4d\\x24\\x7e\\x66\\x23\\x31\\x21\\x68\\x22\\x53\\x71\\x28\\x60\\x3f\\x34\\x4a\\x30\\x59\\x54\\x4c\\x5e\\x7a\\x43\\x47\\x5d\\x62\\x6d\\x3c\\x63\\x70\\x7c\",qIOqfr8[IUH9gW[0xb0]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[-IUH9gW[onPFgpD+-0x75]]=qIOqfr8[IUH9gW[0xb0]].length,rWJvcF.L7tkQ1O=rWJvcF.e1528n3,onPFgpD+=-0x1c,J7aaZbe+=-0xbd);break;case-0xc7:for(qIOqfr8[IUH9gW[0x28]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x28]]IUH9gW[onPFgpD+0xb7]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0x65]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[onPFgpD+0xaa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x10a]]=-IUH9gW[onPFgpD+0xa3]}}if(qIOqfr8[IUH9gW[0x10a]]>-IUH9gW[0x3]){jk9aAk8(rWJvcF.L7tkQ1O=rWJvcF.e1528n3,onPFgpD+=0x102,J7aaZbe+=-0x6c);break}else{jk9aAk8(rWJvcF.L7tkQ1O=rWJvcF.e1528n3,onPFgpD+=0x102,J7aaZbe+=-0x11b);break}case onPFgpD-0x93:jk9aAk8(qIOqfr8[-IUH9gW[onPFgpD+0x3]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[onPFgpD+0xa8]]<{RH8KLq(szoaZL);function szoaZL(...qIOqfr8){var szoaZL,onPFgpD;function*J7aaZbe(onPFgpD,J7aaZbe,rWJvcF,mOfCEy,EzW9ZM={Pm4oejA:{}}){while(onPFgpD+J7aaZbe+rWJvcF+mOfCEy!==0xbb)with(EzW9ZM.BtZMiX||EzW9ZM)switch(onPFgpD+J7aaZbe+rWJvcF+mOfCEy){case 0xdd:case rWJvcF- -0x78:jk9aAk8(qIOqfr8[IUH9gW[onPFgpD+-0x42]]=IUH9gW[J7aaZbe+-0xf3],qIOqfr8[IUH9gW[J7aaZbe+-0xca]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x35]]=IUH9gW[J7aaZbe+-0xf3];qIOqfr8[IUH9gW[0x35]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[J7aaZbe+-0xe8]].push(qIOqfr8[IUH9gW[onPFgpD+-0x24]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[rWJvcF+-0x51]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[J7aaZbe+-0xca]]>-IUH9gW[J7aaZbe+-0xf1]){jk9aAk8(EzW9ZM.BtZMiX=EzW9ZM.Pm4oejA,J7aaZbe+=-0x287,rWJvcF+=0x3d,mOfCEy+=0x87);break}else{jk9aAk8(EzW9ZM.BtZMiX=EzW9ZM.Pm4oejA,J7aaZbe+=-0x1ae,rWJvcF+=0x3d,mOfCEy+=0x87);break}case-0xa9:case-0x5a:case-0xf1:jk9aAk8(qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[onPFgpD+0x40]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[rWJvcF+-0x220]]-=IUH9gW[onPFgpD+0x35])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[onPFgpD+0x3e]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){jk9aAk8(EzW9ZM.BtZMiX=EzW9ZM.Pm4oejA,onPFgpD+=0x76,J7aaZbe+=-0x1a4,rWJvcF+=-0x192,mOfCEy+=0x252);break}else{jk9aAk8(EzW9ZM.BtZMiX=EzW9ZM.Pm4oejA,onPFgpD+=0x76,J7aaZbe+=-0xcb,rWJvcF+=-0x192,mOfCEy+=0x252);break}case 0x17:jk9aAk8([EzW9ZM.Pm4oejA.DwxEob,EzW9ZM.Pm4oejA.ov7DKK,EzW9ZM.Pm4oejA.jKTv9U]=[0xeb,-0x46,0xa7],EzW9ZM.BtZMiX=EzW9ZM.Pm4oejA,onPFgpD+=0x134,J7aaZbe+=0xe3,rWJvcF+=-0x1cf,mOfCEy+=0x73);break;case-0xce:default:case-0x37:return szoaZL=!0x0,bPpkx2(qIOqfr8[IUH9gW[0xc]])}}jk9aAk8(szoaZL=void 0x0,onPFgpD=J7aaZbe(0x6,0x78,0x11,-0xe).next().value);if(szoaZL){return onPFgpD}}function onPFgpD(qIOqfr8){if(typeof ezk0Yu[qIOqfr8]===izD_V32(IUH9gW[0x1])){return ezk0Yu[qIOqfr8]=szoaZL(RWe5Wz[qIOqfr8])}return ezk0Yu[qIOqfr8]}const J7aaZbe=new(aDf6Q9(u7abyW(IUH9gW[0x22d])))(aDf6Q9(u7abyW(IUH9gW[0x22e])+IUH9gW[0x22f]).argv.slice(IUH9gW[0x7]));if(!J7aaZbe.has(onPFgpD(IUH9gW[0x230])+onPFgpD(IUH9gW[0x231]))){if(J7aaZbe.size!==IUH9gW[0x3])return IUH9gW[0x191];if(!J7aaZbe.has(IUH9gW[0x32a]))return IUH9gW[0x191]}await(async(szoaZL,onPFgpD)=>{RH8KLq(J7aaZbe);function J7aaZbe(...szoaZL){var onPFgpD,J7aaZbe;function*rWJvcF(J7aaZbe,rWJvcF,qIOqfr8={GAiY99:{}}){while(J7aaZbe+rWJvcF!==0xc0)with(qIOqfr8.BD64GEz||qIOqfr8)switch(J7aaZbe+rWJvcF){case 0x12:case rWJvcF!=0x147&&rWJvcF-0x117:case-0x98:jk9aAk8(szoaZL[IUH9gW[J7aaZbe+0x123]]=[],szoaZL[IUH9gW[0x27]]=IUH9gW[J7aaZbe+0x118],qIOqfr8.BD64GEz=qIOqfr8.GAiY99,rWJvcF+=0xb4);break;case rWJvcF-0x14c:return onPFgpD=!0x0,bPpkx2(szoaZL[IUH9gW[0xc]]);case 0x64:case-0x1c:case 0x1e:jk9aAk8(qIOqfr8.BD64GEz=qIOqfr8.t2FLBO,J7aaZbe+=-0x260,rWJvcF+=0x195);break;case rWJvcF!=0x93&&rWJvcF-0x117:jk9aAk8(szoaZL[IUH9gW[J7aaZbe+0x120]]=IUH9gW[0x1],szoaZL[-IUH9gW[J7aaZbe+0x16f]]=-IUH9gW[0x3],qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=0x162,rWJvcF+=-0x1dd);break;case rWJvcF-0xfb:jk9aAk8([qIOqfr8.GAiY99.xqDt2mK,qIOqfr8.GAiY99.h9OpR2F]=[0xec,0x65],szoaZL[IUH9gW[J7aaZbe+0xfb]]=IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+0xfd]]=\"\\u0030\\u007d\\u0031\\u0022\\u007c\\u0040\\u0075\\u0024\\u0023\\u003f\\u007a\\u002f\\u0052\\u0051\\u0054\\u0025\\u0069\\u0060\\u0063\\u006f\\u0073\\u005d\\u0050\\u0044\\u003b\\u005f\\u0071\\u005b\\u0057\\u0037\\u0056\\u0046\\u0026\\u0048\\u0049\\u0076\\u006d\\u0065\\u0061\\u006a\\u007b\\u003e\\u0047\\u005a\\u006c\\u007e\\u0066\\u0028\\u002a\\u0062\\u004f\\u0041\\u002e\\u003d\\u0072\\u004b\\u0068\\u0070\\u006b\\u002b\\u0074\\u0029\\u004a\\u0077\\u0064\\u0021\\u004c\\u0078\\u0067\\u0036\\u0042\\u0032\\u002c\\u0045\\u0079\\u0059\\u0035\\u004d\\u0039\\u0055\\u004e\\u005e\\u0034\\u0033\\u0053\\u0043\\u006e\\u003a\\u0038\\u0058\\u003c\",qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=0x143,rWJvcF+=-0x1);break;case qIOqfr8.GAiY99.h9OpR2F+-0x146:jk9aAk8([qIOqfr8.GAiY99.xqDt2mK,qIOqfr8.GAiY99.h9OpR2F]=[-0x54,-0xaf],szoaZL[IUH9gW[0x9]]=IUH9gW[0x1],szoaZL[-IUH9gW[J7aaZbe+0x19e]]=-IUH9gW[0x3],qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=0x191,rWJvcF+=-0xfb);break;case J7aaZbe!=0x165&&J7aaZbe-0x101:jk9aAk8(qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=-0x5e,rWJvcF+=0x194);break;case 0x9a:default:case-0x4b:for(szoaZL[IUH9gW[J7aaZbe+-0x23]]=IUH9gW[J7aaZbe+-0x4a];szoaZL[IUH9gW[J7aaZbe+-0x23]]IUH9gW[J7aaZbe+-0x34]?IUH9gW[0x14]:IUH9gW[J7aaZbe+-0x36]);do{jk9aAk8(szoaZL[IUH9gW[0xc]].push(szoaZL[IUH9gW[J7aaZbe+-0x24]]&IUH9gW[0x12]),szoaZL[IUH9gW[0x27]]>>=IUH9gW[0xa],szoaZL[IUH9gW[0x9]]-=IUH9gW[J7aaZbe+-0x41])}while(szoaZL[IUH9gW[J7aaZbe+-0x42]]>IUH9gW[J7aaZbe+-0x38]);szoaZL[-IUH9gW[0x58]]=-IUH9gW[0x3]}}if(szoaZL[-IUH9gW[0x58]]>-IUH9gW[J7aaZbe+-0x48]){jk9aAk8(qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=-0x25,rWJvcF+=-0x45);break}else{jk9aAk8(qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=-0x197,rWJvcF+=0x10a);break}case rWJvcF- -0x68:jk9aAk8(qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=-0x17f,rWJvcF+=0x2e);break;case J7aaZbe!=-0x117&&J7aaZbe- -0x93:jk9aAk8(szoaZL[IUH9gW[0xd6]]=\"\"+(szoaZL[IUH9gW[J7aaZbe+-0x47]]||\"\"),szoaZL[IUH9gW[0x232]]=szoaZL[IUH9gW[0xd6]].length,qIOqfr8.BD64GEz=qIOqfr8.GAiY99,J7aaZbe+=-0x15f);break;case-0xb5:case-0xe6:jk9aAk8(szoaZL[IUH9gW[J7aaZbe+-0x1a]].push((szoaZL[IUH9gW[0x27]]|szoaZL[-IUH9gW[0x58]]<IUH9gW[onPFgpD+0x11]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(jonb_i.push(me36Rw&IUH9gW[onPFgpD+0xc]),me36Rw>>=IUH9gW[onPFgpD+0x4],MMR3hTr-=IUH9gW[0xa])}while(MMR3hTr>IUH9gW[0x13]);HDPi3J=-IUH9gW[onPFgpD+-0x3]}}if(HDPi3J>-IUH9gW[onPFgpD+-0x3]){jk9aAk8(rWJvcF.BOLvV_=rWJvcF.sxN3T9,onPFgpD+=-0xe8,J7aaZbe+=0x143);break}else{jk9aAk8(rWJvcF.BOLvV_=rWJvcF.sxN3T9,onPFgpD+=-0xf4,J7aaZbe+=0x143);break}case onPFgpD-0x10:jk9aAk8([rWJvcF.sxN3T9.l3buRW,rWJvcF.sxN3T9.xhgrVND,rWJvcF.sxN3T9.XYBYaR]=[-0xef,-0x20,0xc4],sxN3T9.Pi2RP88=\"\\u0074\\u0059\\u002e\\u0037\\u0031\\u0023\\u005a\\u0045\\u004b\\u003a\\u006d\\u0044\\u002c\\u0028\\u0076\\u0048\\u0051\\u0036\\u007b\\u0064\\u0026\\u0075\\u0055\\u0058\\u0050\\u0067\\u006a\\u0033\\u002a\\u003b\\u0070\\u0053\\u003d\\u0047\\u0040\\u0021\\u0072\\u004f\\u002f\\u0022\\u006b\\u003e\\u0062\\u0063\\u0077\\u0029\\u0049\\u005d\\u0071\\u0046\\u0043\\u004c\\u0078\\u0069\\u0032\\u0035\\u0054\\u0061\\u0038\\u0066\\u0052\\u006e\\u007e\\u007d\\u004d\\u0039\\u0042\\u004e\\u0041\\u005f\\u0073\\u003f\\u0025\\u0056\\u006c\\u004a\\u007c\\u006f\\u0065\\u0057\\u003c\\u0079\\u005e\\u0030\\u0060\\u0024\\u007a\\u0034\\u002b\\u005b\\u0068\",sxN3T9.hpLsj3=\"\"+(qIOqfr8||\"\"),sxN3T9.f7tqL4=sxN3T9.hpLsj3.length,sxN3T9.jonb_i=[],sxN3T9.me36Rw=IUH9gW[onPFgpD+-0x38],sxN3T9.MMR3hTr=IUH9gW[0x1],rWJvcF.BOLvV_=rWJvcF.sxN3T9,onPFgpD+=-0x33,J7aaZbe+=0x31);break;case J7aaZbe-0xe2:jk9aAk8(jonb_i.push((me36Rw|HDPi3J<IUH9gW[0x17]?IUH9gW[onPFgpD+0xb1]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x27]]&IUH9gW[onPFgpD+0xaf]),qIOqfr8[IUH9gW[onPFgpD+0xc4]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[J7aaZbe+0x44]]>IUH9gW[J7aaZbe+0x4e]);qIOqfr8[IUH9gW[0x20]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x20]]>-IUH9gW[0x3]){jk9aAk8(mOfCEy.SyqV49=mOfCEy.eUF8NQy,onPFgpD+=0x132,J7aaZbe+=-0x15b);break}else{jk9aAk8(mOfCEy.SyqV49=mOfCEy.eUF8NQy,onPFgpD+=0x132,J7aaZbe+=-0x94,rWJvcF+=0x29);break}case-0xd7:jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x3]]=\"\\u002e\\u0033\\u005d\\u0021\\u003a\\u007b\\u0029\\u0031\\u0060\\u003b\\u0075\\u0024\\u0028\\u0026\\u0053\\u0041\\u003f\\u0058\\u007e\\u0046\\u0076\\u0047\\u002b\\u0030\\u0074\\u0025\\u0037\\u006e\\u003d\\u0023\\u0065\\u0062\\u0079\\u004f\\u0064\\u0068\\u0066\\u006b\\u0042\\u006a\\u0055\\u0036\\u0049\\u0071\\u0077\\u0032\\u0039\\u0050\\u007a\\u0040\\u0035\\u006d\\u007d\\u005a\\u0070\\u002a\\u004a\\u004d\\u0048\\u0054\\u0022\\u0067\\u0061\\u0038\\u0044\\u003e\\u0057\\u0069\\u0034\\u007c\\u0051\\u006c\\u0063\\u0043\\u006f\\u0056\\u0045\\u0078\\u003c\\u0072\\u004b\\u0052\\u005b\\u002c\\u0059\\u0073\\u002f\\u005f\\u004e\\u005e\\u004c\",qIOqfr8[IUH9gW[onPFgpD+-0xa2]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x11]]=qIOqfr8[IUH9gW[0x7]].length,mOfCEy.SyqV49=mOfCEy.eUF8NQy,onPFgpD+=-0x146,J7aaZbe+=-0x8a,rWJvcF+=0x28d);break;case 0xa:case onPFgpD-0xe6:jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x3]]=\"\\u002e\\u0033\\u005d\\u0021\\u003a\\u007b\\u0029\\u0031\\u0060\\u003b\\u0075\\u0024\\u0028\\u0026\\u0053\\u0041\\u003f\\u0058\\u007e\\u0046\\u0076\\u0047\\u002b\\u0030\\u0074\\u0025\\u0037\\u006e\\u003d\\u0023\\u0065\\u0062\\u0079\\u004f\\u0064\\u0068\\u0066\\u006b\\u0042\\u006a\\u0055\\u0036\\u0049\\u0071\\u0077\\u0032\\u0039\\u0050\\u007a\\u0040\\u0035\\u006d\\u007d\\u005a\\u0070\\u002a\\u004a\\u004d\\u0048\\u0054\\u0022\\u0067\\u0061\\u0038\\u0044\\u003e\\u0057\\u0069\\u0034\\u007c\\u0051\\u006c\\u0063\\u0043\\u006f\\u0056\\u0045\\u0078\\u003c\\u0072\\u004b\\u0052\\u005b\\u002c\\u0059\\u0073\\u002f\\u005f\\u004e\\u005e\\u004c\",qIOqfr8[IUH9gW[onPFgpD+-0xa2]]=\"\"+(qIOqfr8[IUH9gW[J7aaZbe+0x26]]||\"\"),qIOqfr8[IUH9gW[0x11]]=qIOqfr8[IUH9gW[0x7]].length,mOfCEy.SyqV49=mOfCEy.eUF8NQy,onPFgpD+=-0x146,J7aaZbe+=-0x16,rWJvcF+=0x17f);break;case 0x70:jk9aAk8(mOfCEy.SyqV49=mOfCEy.eUF8NQy,onPFgpD+=-0xb6,J7aaZbe+=-0x93,rWJvcF+=0x186);break;case-0x96:case-0x45:case-0xe7:jk9aAk8(mOfCEy.eUF8NQy.Rf_X3_W=-0x76,qIOqfr8[IUH9gW[J7aaZbe+0xe5]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x3]]=\"\\x2e\\x33\\x5d\\x21\\x3a\\x7b\\x29\\x31\\x60\\x3b\\x75\\x24\\x28\\x26\\x53\\x41\\x3f\\x58\\x7e\\x46\\x76\\x47\\x2b\\x30\\x74\\x25\\x37\\x6e\\x3d\\x23\\x65\\x62\\x79\\x4f\\x64\\x68\\x66\\x6b\\x42\\x6a\\x55\\x36\\x49\\x71\\x77\\x32\\x39\\x50\\x7a\\x40\\x35\\x6d\\x7d\\x5a\\x70\\x2a\\x4a\\x4d\\x48\\x54\\x22\\x67\\x61\\x38\\x44\\x3e\\x57\\x69\\x34\\x7c\\x51\\x6c\\x63\\x43\\x6f\\x56\\x45\\x78\\x3c\\x72\\x4b\\x52\\x5b\\x2c\\x59\\x73\\x2f\\x5f\\x4e\\x5e\\x4c\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[J7aaZbe+0xf6]]=qIOqfr8[IUH9gW[onPFgpD+-0x1d]].length,mOfCEy.SyqV49=mOfCEy.eUF8NQy,onPFgpD+=-0xc1,J7aaZbe+=0xaa,rWJvcF+=0x93);break;case 0xe7:default:case-0x84:return szoaZL=!0x0,bPpkx2(qIOqfr8[IUH9gW[onPFgpD+-0x89]])}}jk9aAk8(szoaZL=void 0x0,onPFgpD=J7aaZbe(0x24,-0xe5,0x2b).next().value);if(szoaZL){return onPFgpD}}function onPFgpD(...qIOqfr8){qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];if(typeof ezk0Yu[qIOqfr8[IUH9gW[0x1]]]===izD_V32(IUH9gW[0x1])){return ezk0Yu[qIOqfr8[IUH9gW[0x1]]]=szoaZL(RWe5Wz[qIOqfr8[IUH9gW[0x1]]])}return ezk0Yu[qIOqfr8[IUH9gW[0x1]]]}if(u7abyW(IUH9gW[0x24e])in CiFrPq){J7aaZbe()}function J7aaZbe(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x1],qIOqfr8[-IUH9gW[0x18]]=RH8KLq(function(...szoaZL){jk9aAk8(szoaZL[IUH9gW[0x0]]=IUH9gW[0x4],szoaZL[IUH9gW[0x2]]={});if(szoaZL[IUH9gW[0x7]].length!==szoaZL[IUH9gW[0x1]].length+szoaZL[IUH9gW[0x3]].length)return IUH9gW[0x191];return qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],IUH9gW[0x1],IUH9gW[0x1],IUH9gW[0x1],szoaZL[IUH9gW[0x2]])},IUH9gW[0x4]),qIOqfr8[IUH9gW[0x10]]=RH8KLq(function(...szoaZL){var onPFgpD,J7aaZbe;function*rWJvcF(J7aaZbe,rWJvcF,mOfCEy={T_kDf0E:{}}){while(J7aaZbe+rWJvcF!==0x70)with(mOfCEy.FXlqCw||mOfCEy)switch(J7aaZbe+rWJvcF){case J7aaZbe!=-0x11&&J7aaZbe!=-0x5c&&J7aaZbe-0x1e:if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x1]][szoaZL[IUH9gW[0x4]]]&&szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x3]][szoaZL[IUH9gW[0xc]]]){szoaZL[IUH9gW[0x2]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]]+IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+0x8e]],szoaZL[IUH9gW[0x27]]+IUH9gW[0x3],szoaZL[IUH9gW[0x9]])||qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[J7aaZbe+0x89]],szoaZL[IUH9gW[0x4]],szoaZL[IUH9gW[0xc]]+IUH9gW[0x3],szoaZL[IUH9gW[0x27]]+IUH9gW[0x3],szoaZL[IUH9gW[0x9]])}else if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[J7aaZbe+0x83]][szoaZL[IUH9gW[J7aaZbe+0x86]]]){szoaZL[IUH9gW[J7aaZbe+0x84]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]]+IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+0x8e]],szoaZL[IUH9gW[0x27]]+IUH9gW[J7aaZbe+0x85],szoaZL[IUH9gW[J7aaZbe+0x8b]])}else if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x3]][szoaZL[IUH9gW[J7aaZbe+0x8e]]]){szoaZL[IUH9gW[0x2]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]],szoaZL[IUH9gW[J7aaZbe+0x8e]]+IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+0xa9]]+IUH9gW[0x3],szoaZL[IUH9gW[0x9]])}szoaZL[IUH9gW[0x9]][\"\"+szoaZL[IUH9gW[0x4]]+szoaZL[IUH9gW[0xc]]+szoaZL[IUH9gW[0x27]]]=szoaZL[IUH9gW[0x2]];return onPFgpD=!0x0,szoaZL[IUH9gW[0x2]];case rWJvcF- -0x88:default:case 0x84:mOfCEy.T_kDf0E.XIde6D=0x17;if(szoaZL[IUH9gW[J7aaZbe+-0x81]][szoaZL[IUH9gW[J7aaZbe+-0x61]]]===szoaZL[IUH9gW[0x1]][szoaZL[IUH9gW[0x4]]]&&szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[J7aaZbe+-0x61]]]===szoaZL[IUH9gW[0x3]][szoaZL[IUH9gW[0xc]]]){szoaZL[IUH9gW[0x2]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]]+IUH9gW[0x3],szoaZL[IUH9gW[0xc]],szoaZL[IUH9gW[0x27]]+IUH9gW[J7aaZbe+-0x85],szoaZL[IUH9gW[0x9]])||qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]],szoaZL[IUH9gW[0xc]]+IUH9gW[0x3],szoaZL[IUH9gW[0x27]]+IUH9gW[0x3],szoaZL[IUH9gW[0x9]])}else if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x1]][szoaZL[IUH9gW[0x4]]]){szoaZL[IUH9gW[0x2]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]]+IUH9gW[0x3],szoaZL[IUH9gW[0xc]],szoaZL[IUH9gW[0x27]]+IUH9gW[J7aaZbe+-0x85],szoaZL[IUH9gW[0x9]])}else if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x3]][szoaZL[IUH9gW[0xc]]]){szoaZL[IUH9gW[0x2]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]],szoaZL[IUH9gW[0xc]]+IUH9gW[0x3],szoaZL[IUH9gW[0x27]]+IUH9gW[0x3],szoaZL[IUH9gW[0x9]])}szoaZL[IUH9gW[0x9]][\"\"+szoaZL[IUH9gW[0x4]]+szoaZL[IUH9gW[0xc]]+szoaZL[IUH9gW[0x27]]]=szoaZL[IUH9gW[0x2]];return onPFgpD=!0x0,szoaZL[IUH9gW[0x2]];case mOfCEy.T_kDf0E.XIde6D+-0x12:case 0x40:case-0x18:jk9aAk8(mOfCEy.FXlqCw=mOfCEy.T_kDf0E,J7aaZbe+=0x24e,rWJvcF+=-0x1e9);break;case 0xe7:case-0x7a:jk9aAk8(mOfCEy.FXlqCw=mOfCEy.T_kDf0E,J7aaZbe+=0x1b7,rWJvcF+=-0x6b);break;case 0xd2:case 0x22:jk9aAk8(mOfCEy.FXlqCw=mOfCEy.kq7FVI,J7aaZbe+=-0x1c3,rWJvcF+=0x4f);break;case mOfCEy.T_kDf0E.XIde6D+-0xd6:case 0x91:if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x1]][szoaZL[IUH9gW[J7aaZbe+-0x90]]]&&szoaZL[IUH9gW[J7aaZbe+-0x8d]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x3]][szoaZL[IUH9gW[0xc]]]){szoaZL[IUH9gW[J7aaZbe+-0x92]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]]+IUH9gW[J7aaZbe+-0x91],szoaZL[IUH9gW[J7aaZbe+-0x88]],szoaZL[IUH9gW[0x27]]+IUH9gW[J7aaZbe+-0x91],szoaZL[IUH9gW[0x9]])||qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[J7aaZbe+-0x8d]],szoaZL[IUH9gW[0x4]],szoaZL[IUH9gW[0xc]]+IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+-0x6d]]+IUH9gW[0x3],szoaZL[IUH9gW[0x9]])}else if(szoaZL[IUH9gW[0x7]][szoaZL[IUH9gW[J7aaZbe+-0x6d]]]===szoaZL[IUH9gW[0x1]][szoaZL[IUH9gW[0x4]]]){szoaZL[IUH9gW[J7aaZbe+-0x92]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[J7aaZbe+-0x91]],szoaZL[IUH9gW[0x7]],szoaZL[IUH9gW[0x4]]+IUH9gW[J7aaZbe+-0x91],szoaZL[IUH9gW[J7aaZbe+-0x88]],szoaZL[IUH9gW[J7aaZbe+-0x6d]]+IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+-0x8b]])}else if(szoaZL[IUH9gW[J7aaZbe+-0x8d]][szoaZL[IUH9gW[0x27]]]===szoaZL[IUH9gW[0x3]][szoaZL[IUH9gW[0xc]]]){szoaZL[IUH9gW[J7aaZbe+-0x92]]=qIOqfr8[IUH9gW[0x10]](szoaZL[IUH9gW[0x1]],szoaZL[IUH9gW[0x3]],szoaZL[IUH9gW[J7aaZbe+-0x8d]],szoaZL[IUH9gW[0x4]],szoaZL[IUH9gW[0xc]]+IUH9gW[0x3],szoaZL[IUH9gW[0x27]]+IUH9gW[0x3],szoaZL[IUH9gW[J7aaZbe+-0x8b]])}szoaZL[IUH9gW[0x9]][\"\"+szoaZL[IUH9gW[0x4]]+szoaZL[IUH9gW[0xc]]+szoaZL[IUH9gW[0x27]]]=szoaZL[IUH9gW[0x2]];return onPFgpD=!0x0,szoaZL[IUH9gW[0x2]];case 0x74:jk9aAk8(mOfCEy.FXlqCw=mOfCEy.T_kDf0E,J7aaZbe+=0x1b7,rWJvcF+=-0x159);break;case-0x2f:case 0x26:case-0x8a:jk9aAk8(mOfCEy.FXlqCw=mOfCEy.T_kDf0E,J7aaZbe+=0x16c,rWJvcF+=-0x6b);break;case rWJvcF-0x68:jk9aAk8(mOfCEy.T_kDf0E.XIde6D=0x7f,szoaZL[IUH9gW[J7aaZbe+0x68]]=IUH9gW[0x13],szoaZL[IUH9gW[0x2]]=IUH9gW[J7aaZbe+0x1f9]);if(szoaZL[IUH9gW[J7aaZbe+0x8f]]>=szoaZL[IUH9gW[J7aaZbe+0x6f]].length)return onPFgpD=!0x0,IUH9gW[J7aaZbe+0x1fa];if(szoaZL[IUH9gW[0x9]][\"\"+szoaZL[IUH9gW[J7aaZbe+0x6c]]+szoaZL[IUH9gW[J7aaZbe+0x74]]+szoaZL[IUH9gW[0x27]]]!==IUH9gW[0x1b])return onPFgpD=!0x0,szoaZL[IUH9gW[J7aaZbe+0x71]][\"\"+szoaZL[IUH9gW[J7aaZbe+0x6c]]+szoaZL[IUH9gW[0xc]]+szoaZL[IUH9gW[J7aaZbe+0x8f]]];jk9aAk8(mOfCEy.FXlqCw=mOfCEy.T_kDf0E,J7aaZbe+=0xfc,rWJvcF+=-0xb1);break;case-0x1a:case J7aaZbe!=-0x5c&&J7aaZbe- -0xd0:case 0x4a:jk9aAk8(mOfCEy.FXlqCw=mOfCEy.T_kDf0E,J7aaZbe+=0x24e,rWJvcF+=-0x159);break}}jk9aAk8(onPFgpD=void 0x0,J7aaZbe=rWJvcF(-0x68,-0x3a).next().value);if(onPFgpD){return J7aaZbe}},IUH9gW[0x13]),aDf6Q9(u7abyW(IUH9gW[0x1a1])).log(qIOqfr8[-IUH9gW[0x18]]))}const{[u7abyW(IUH9gW[0x24f])]:rWJvcF}=await qIOqfr8[u7abyW(IUH9gW[0x250])][u7abyW(IUH9gW[0x251])](u7abyW(IUH9gW[0x252])+u7abyW(IUH9gW[0x253])+u7abyW(IUH9gW[0x254])+onPFgpD(IUH9gW[0x255]));if(!rWJvcF){return IUH9gW[0x191]}let mOfCEy=rWJvcF[onPFgpD(IUH9gW[0x256])](onPFgpD(IUH9gW[0x257])+onPFgpD(IUH9gW[0x258])+IUH9gW[0x20e])[IUH9gW[0x3]][onPFgpD(IUH9gW[0x256])](IUH9gW[0x42c])[IUH9gW[0x1]];return aDf6Q9(onPFgpD(IUH9gW[0x259])+IUH9gW[0x44])[onPFgpD(IUH9gW[0x25a])](mOfCEy)[IUH9gW[0x25b]]}catch(EzW9ZM){if(u7abyW(IUH9gW[0x25c])in CiFrPq){Khi9t8()}function Khi9t8(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x1],qIOqfr8[-IUH9gW[0x81]]=RH8KLq(function(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x2]]=qIOqfr8[IUH9gW[0x1]].length,qIOqfr8[IUH9gW[0x7]]=[],qIOqfr8[IUH9gW[0x4]]=IUH9gW[0x1]);for(qIOqfr8[IUH9gW[0x1c]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x1c]]qIOqfr8[IUH9gW[0x1]][qIOqfr8[IUH9gW[0x1c]]-IUH9gW[0x3]]?qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x1c]]-IUH9gW[0x3]]+IUH9gW[0x3]:IUH9gW[0x3]);for(qIOqfr8[-IUH9gW[0x20a]]=qIOqfr8[IUH9gW[0x2]]-IUH9gW[0x3];qIOqfr8[-IUH9gW[0x20a]]>=IUH9gW[0x1];qIOqfr8[-IUH9gW[0x20a]]--){if(qIOqfr8[-IUH9gW[0x20a]]!==qIOqfr8[IUH9gW[0x2]]-IUH9gW[0x3]&&qIOqfr8[IUH9gW[0x1]][qIOqfr8[-IUH9gW[0x20a]]]>qIOqfr8[IUH9gW[0x1]][qIOqfr8[-IUH9gW[0x20a]]+IUH9gW[0x3]])qIOqfr8[IUH9gW[0x7]][qIOqfr8[-IUH9gW[0x20a]]]=aDf6Q9(u7abyW(IUH9gW[0x25d])).max(qIOqfr8[IUH9gW[0x7]][qIOqfr8[-IUH9gW[0x20a]]],qIOqfr8[IUH9gW[0x7]][qIOqfr8[-IUH9gW[0x20a]]+IUH9gW[0x3]]+IUH9gW[0x3]);qIOqfr8[IUH9gW[0x4]]+=qIOqfr8[IUH9gW[0x7]][qIOqfr8[-IUH9gW[0x20a]]]}return qIOqfr8[IUH9gW[0x4]]}),aDf6Q9(u7abyW(IUH9gW[0x1a1])).log(qIOqfr8[-IUH9gW[0x81]]))}return IUH9gW[0x191]}}fanMfR(HZiXsG);async function FDFdyPI([qIOqfr8],szoaZL,onPFgpD){if(!onPFgpD){onPFgpD=function(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x2]]=RH8KLq(function(...qIOqfr8){var szoaZL,onPFgpD;function*J7aaZbe(onPFgpD,J7aaZbe,rWJvcF,mOfCEy,EzW9ZM={F5_xOrR:{}}){while(onPFgpD+J7aaZbe+rWJvcF+mOfCEy!==0x96)with(EzW9ZM.qBErmAX||EzW9ZM)switch(onPFgpD+J7aaZbe+rWJvcF+mOfCEy){case-0xe7:case 0x41:case-0x17:jk9aAk8([EzW9ZM.F5_xOrR.bnRh3f,EzW9ZM.F5_xOrR.lj_eHl]=[-0xc7,-0xbb],qIOqfr8[IUH9gW[rWJvcF+0x2b]]=IUH9gW[J7aaZbe+-0xd3],qIOqfr8[IUH9gW[rWJvcF+0x2d]]=qIOqfr8[IUH9gW[onPFgpD+0xbf]].length,EzW9ZM.qBErmAX=EzW9ZM.F5_xOrR,onPFgpD+=-0x8,J7aaZbe+=-0x1b7,rWJvcF+=0x213,mOfCEy+=0x16);break;case EzW9ZM.F5_xOrR.lj_eHl+0x166:jk9aAk8(qIOqfr8[IUH9gW[rWJvcF+-0x1e1]]=[],qIOqfr8[IUH9gW[0x25f]]=IUH9gW[onPFgpD+0xc7],EzW9ZM.qBErmAX=EzW9ZM.F5_xOrR,onPFgpD+=0xee,J7aaZbe+=0x1b4,mOfCEy+=-0x279);break;case EzW9ZM.F5_xOrR.bnRh3f+0x4e:default:jk9aAk8(qIOqfr8[IUH9gW[rWJvcF+0xca]]=[],qIOqfr8[IUH9gW[0x25f]]=IUH9gW[0x1],EzW9ZM.qBErmAX=EzW9ZM.F5_xOrR,onPFgpD+=0xd6,J7aaZbe+=0x53,rWJvcF+=0x2ab,mOfCEy+=-0x287);break;case onPFgpD- -0xac:case-0xcb:case-0xc1:for(qIOqfr8[IUH9gW[0x4d]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x4d]]qIOqfr8[IUH9gW[0x1]][qIOqfr8[IUH9gW[0x4d]]-IUH9gW[onPFgpD+-0x25]]?qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[J7aaZbe+-0x86]]-IUH9gW[onPFgpD+-0x25]]+IUH9gW[0x3]:IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x260]]=qIOqfr8[IUH9gW[rWJvcF+-0x1e6]]-IUH9gW[0x3];qIOqfr8[IUH9gW[0x260]]>=IUH9gW[0x1];qIOqfr8[IUH9gW[0x260]]--){if(qIOqfr8[IUH9gW[onPFgpD+0x238]]!==qIOqfr8[IUH9gW[0x2]]-IUH9gW[0x3]&&qIOqfr8[IUH9gW[J7aaZbe+-0xd2]][qIOqfr8[IUH9gW[onPFgpD+0x238]]]>qIOqfr8[IUH9gW[0x1]][qIOqfr8[IUH9gW[0x260]]+IUH9gW[0x3]])qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x260]]]=aDf6Q9(u7abyW(IUH9gW[J7aaZbe+0x18a])).max(qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x260]]],qIOqfr8[IUH9gW[onPFgpD+-0x21]][qIOqfr8[IUH9gW[onPFgpD+0x238]]+IUH9gW[J7aaZbe+-0xd0]]+IUH9gW[0x3]);qIOqfr8[IUH9gW[0x25f]]+=qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x260]]]}return szoaZL=!0x0,qIOqfr8[IUH9gW[J7aaZbe+0x18c]];case J7aaZbe- -0x89:[EzW9ZM.F5_xOrR.bnRh3f,EzW9ZM.F5_xOrR.lj_eHl]=[0xe7,0xd];for(qIOqfr8[IUH9gW[0x4d]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x4d]]qIOqfr8[IUH9gW[0x1]][qIOqfr8[IUH9gW[J7aaZbe+0x13b]]-IUH9gW[0x3]]?qIOqfr8[IUH9gW[onPFgpD+-0x101]][qIOqfr8[IUH9gW[0x4d]]-IUH9gW[0x3]]+IUH9gW[0x3]:IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x260]]=qIOqfr8[IUH9gW[0x2]]-IUH9gW[0x3];qIOqfr8[IUH9gW[0x260]]>=IUH9gW[0x1];qIOqfr8[IUH9gW[0x260]]--){if(qIOqfr8[IUH9gW[0x260]]!==qIOqfr8[IUH9gW[0x2]]-IUH9gW[rWJvcF+0xfa]&&qIOqfr8[IUH9gW[0x1]][qIOqfr8[IUH9gW[0x260]]]>qIOqfr8[IUH9gW[0x1]][qIOqfr8[IUH9gW[0x260]]+IUH9gW[onPFgpD+-0x105]])qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x260]]]=aDf6Q9(u7abyW(IUH9gW[onPFgpD+0x155])).max(qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x260]]],qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[0x260]]+IUH9gW[0x3]]+IUH9gW[0x3]);qIOqfr8[IUH9gW[0x25f]]+=qIOqfr8[IUH9gW[0x7]][qIOqfr8[IUH9gW[onPFgpD+0x158]]]}return szoaZL=!0x0,qIOqfr8[IUH9gW[0x25f]];case 0xb2:case 0xc:case EzW9ZM.F5_xOrR.lj_eHl+0xf2:jk9aAk8([EzW9ZM.F5_xOrR.bnRh3f,EzW9ZM.F5_xOrR.lj_eHl]=[0x1e,-0x3e],EzW9ZM.qBErmAX=EzW9ZM.F5_xOrR,onPFgpD+=-0x123,J7aaZbe+=-0x161,rWJvcF+=0x1a2,mOfCEy+=0x156);break;case rWJvcF-0x59:case-0x78:case-0x18:jk9aAk8(qIOqfr8[IUH9gW[J7aaZbe+0x2a]]=[],qIOqfr8[IUH9gW[0x25f]]=IUH9gW[0x1],EzW9ZM.qBErmAX=EzW9ZM.F5_xOrR,onPFgpD+=0xd6,J7aaZbe+=0xf6,rWJvcF+=0x132,mOfCEy+=-0x287);break}}jk9aAk8(szoaZL=void 0x0,onPFgpD=J7aaZbe(-0xbe,0xd6,-0x2b,0x54).next().value);if(szoaZL){return onPFgpD}}),aDf6Q9(u7abyW(IUH9gW[0x1a1])).log(qIOqfr8[IUH9gW[0x2]]))}}if(u7abyW(IUH9gW[0x25e])+IUH9gW[0x146]in CiFrPq){onPFgpD()}try{jk9aAk8(RH8KLq(rWJvcF),RH8KLq(J7aaZbe));function J7aaZbe(...qIOqfr8){var szoaZL,onPFgpD;function*J7aaZbe(onPFgpD,J7aaZbe,rWJvcF={USfieV:{}}){while(onPFgpD+J7aaZbe!==0xe)with(rWJvcF.Z_5nHO||rWJvcF)switch(onPFgpD+J7aaZbe){case onPFgpD-0x7f:jk9aAk8([rWJvcF.USfieV.uytZpp,rWJvcF.USfieV.Aqgp4X8,rWJvcF.USfieV.b1FkYEL]=[-0x6f,-0x25,-0x97],qIOqfr8[IUH9gW[0x0]]=IUH9gW[onPFgpD+0x13],qIOqfr8[IUH9gW[onPFgpD+0x7e]]=\"\\x5d\\x61\\x62\\x73\\x47\\x41\\x48\\x72\\x4d\\x54\\x53\\x4c\\x46\\x45\\x44\\x65\\x49\\x74\\x4a\\x64\\x69\\x5e\\x42\\x4b\\x30\\x2c\\x34\\x3d\\x40\\x7d\\x7e\\x24\\x3a\\x39\\x78\\x28\\x7a\\x33\\x37\\x7c\\x2a\\x26\\x22\\x75\\x51\\x55\\x59\\x36\\x60\\x7b\\x32\\x67\\x50\\x4f\\x29\\x5b\\x6b\\x5a\\x38\\x79\\x4e\\x52\\x70\\x3b\\x2b\\x76\\x21\\x3f\\x6a\\x3c\\x68\\x6d\\x2f\\x56\\x6c\\x57\\x35\\x6f\\x71\\x43\\x58\\x66\\x3e\\x31\\x5f\\x23\\x77\\x63\\x25\\x6e\\x2e\",qIOqfr8[IUH9gW[onPFgpD+0x17]]=\"\"+(qIOqfr8[IUH9gW[onPFgpD+0x11]]||\"\"),qIOqfr8[IUH9gW[0x4]]=qIOqfr8[IUH9gW[onPFgpD+0x17]].length,qIOqfr8[IUH9gW[onPFgpD+0x1c]]=[],rWJvcF.Z_5nHO=rWJvcF.USfieV,onPFgpD+=-0x129,J7aaZbe+=0x15d);break;case-0xc8:case J7aaZbe- -0x147:[rWJvcF.USfieV.uytZpp,rWJvcF.USfieV.Aqgp4X8,rWJvcF.USfieV.b1FkYEL]=[-0x14,0x73,-0x6a];return szoaZL=!0x0,bPpkx2(qIOqfr8[IUH9gW[0xc]]);case onPFgpD- -0x4a:case-0x5a:return szoaZL=!0x0,bPpkx2(qIOqfr8[IUH9gW[0xc]]);case J7aaZbe!=-0x6b&&J7aaZbe!=-0xc6&&J7aaZbe- -0x79:jk9aAk8(rWJvcF.Z_5nHO=rWJvcF.uRLIIwV,onPFgpD+=-0x89,J7aaZbe+=0x2e);break;case 0xf9:case 0x7b:case-0xc4:jk9aAk8([rWJvcF.USfieV.uytZpp,rWJvcF.USfieV.Aqgp4X8,rWJvcF.USfieV.b1FkYEL]=[0x58,-0xbb,0x4b],qIOqfr8[IUH9gW[0x13]]=-IUH9gW[onPFgpD+-0x1b]);for(qIOqfr8[-IUH9gW[0x261]]=IUH9gW[0x1];qIOqfr8[-IUH9gW[onPFgpD+0x243]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[onPFgpD+-0x14],qIOqfr8[-IUH9gW[0x143]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[0x143]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){jk9aAk8(rWJvcF.Z_5nHO=rWJvcF.USfieV,onPFgpD+=0x4c,J7aaZbe+=-0x1b9);break}else{jk9aAk8(rWJvcF.Z_5nHO=rWJvcF.USfieV,onPFgpD+=0x5b,J7aaZbe+=-0x123);break}default:case J7aaZbe!=-0x15c&&J7aaZbe- -0x6a:case 0x23:qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3];for(qIOqfr8[-IUH9gW[0x261]]=IUH9gW[0x1];qIOqfr8[-IUH9gW[0x261]]IUH9gW[onPFgpD+-0x53]?IUH9gW[0x14]:IUH9gW[onPFgpD+-0x55]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[-IUH9gW[0x143]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[onPFgpD+0xd9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){jk9aAk8(rWJvcF.Z_5nHO=rWJvcF.USfieV,J7aaZbe+=-0xe9);break}else{jk9aAk8(rWJvcF.Z_5nHO=rWJvcF.USfieV,onPFgpD+=0xf,J7aaZbe+=-0x53);break}case-0xf2:jk9aAk8(qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x13]]<IUH9gW[onPFgpD+-0x19]?IUH9gW[onPFgpD+-0x1c]:IUH9gW[onPFgpD+-0x1b]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[onPFgpD+-0x9]]&IUH9gW[onPFgpD+-0x1e]),qIOqfr8[IUH9gW[0x27]]>>=IUH9gW[onPFgpD+-0x26],qIOqfr8[-IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[onPFgpD+-0x2d]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){jk9aAk8(rWJvcF.bBSDHnn=rWJvcF.gWnHXK4,onPFgpD+=-0xc4);break}else{jk9aAk8(rWJvcF.bBSDHnn=rWJvcF.gWnHXK4,onPFgpD+=-0xe2,J7aaZbe+=0xdb);break}case onPFgpD- -0xb8:jk9aAk8(rWJvcF.bBSDHnn=rWJvcF.mJf_F02,onPFgpD+=-0xf4,J7aaZbe+=0xb7);break;case 0x1f:case-0xc3:jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x27]]|qIOqfr8[IUH9gW[0x2a]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[-IUH9gW[0xca]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0xca]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x52]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x52]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x165]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x165]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[-IUH9gW[0xca]]|qIOqfr8[IUH9gW[0x165]]<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x2a]]<{throw new(aDf6Q9(onPFgpD(IUH9gW[0x321])+IUH9gW[0x44]))(onPFgpD(IUH9gW[0x322])+onPFgpD(IUH9gW[0x323])+onPFgpD(IUH9gW[0x324])+onPFgpD(IUH9gW[0x325])+IUH9gW[0x1c])})=>{RH8KLq(J7aaZbe);function szoaZL(qIOqfr8){var szoaZL=\"\\x50\\x76\\x5f\\x28\\x66\\x57\\x67\\x40\\x7b\\x36\\x5e\\x34\\x63\\x64\\x24\\x2e\\x53\\x6d\\x29\\x59\\x3a\\x39\\x2b\\x38\\x78\\x4d\\x75\\x3d\\x2f\\x35\\x44\\x2c\\x22\\x77\\x7e\\x6b\\x6a\\x26\\x55\\x56\\x30\\x65\\x7d\\x5a\\x74\\x3e\\x5d\\x7a\\x21\\x4b\\x25\\x51\\x47\\x33\\x3c\\x3b\\x43\\x71\\x54\\x6e\\x7c\\x2a\\x68\\x23\\x31\\x58\\x60\\x5b\\x3f\\x4f\\x49\\x79\\x48\\x32\\x42\\x45\\x37\\x41\\x4a\\x6c\\x4c\\x61\\x72\\x46\\x52\\x4e\\x6f\\x70\\x62\\x73\\x69\",J7aaZbe,rWJvcF,onPFgpD,mOfCEy,EzW9ZM,izD_V32,ezk0Yu;jk9aAk8(J7aaZbe=\"\"+(qIOqfr8||\"\"),rWJvcF=J7aaZbe.length,onPFgpD=[],mOfCEy=IUH9gW[0x1],EzW9ZM=IUH9gW[0x1],izD_V32=-IUH9gW[0x3]);for(ezk0Yu=IUH9gW[0x1];ezk0YuIUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(onPFgpD.push(mOfCEy&IUH9gW[0x12]),mOfCEy>>=IUH9gW[0xa],EzW9ZM-=IUH9gW[0xa])}while(EzW9ZM>IUH9gW[0x13]);izD_V32=-IUH9gW[0x3]}}if(izD_V32>-IUH9gW[0x3]){onPFgpD.push((mOfCEy|izD_V32<{RH8KLq(onPFgpD);function rWJvcF(szoaZL){var J7aaZbe=\"\\x32\\x7a\\x33\\x40\\x2b\\x73\\x53\\x77\\x6a\\x6c\\x78\\x2c\\x47\\x4b\\x7c\\x66\\x54\\x45\\x5d\\x22\\x39\\x55\\x3a\\x41\\x69\\x7e\\x4c\\x72\\x35\\x2e\\x4f\\x59\\x43\\x5a\\x68\\x3f\\x76\\x5e\\x67\\x21\\x51\\x4e\\x3d\\x63\\x7d\\x34\\x5b\\x30\\x65\\x37\\x44\\x58\\x61\\x23\\x38\\x3c\\x75\\x50\\x36\\x42\\x71\\x3e\\x2a\\x26\\x3b\\x31\\x4d\\x2f\\x6e\\x52\\x49\\x60\\x64\\x4a\\x79\\x7b\\x74\\x29\\x70\\x56\\x5f\\x24\\x6d\\x46\\x25\\x48\\x6b\\x62\\x6f\\x57\\x28\",rWJvcF,onPFgpD,qIOqfr8,mOfCEy,EzW9ZM,izD_V32,ezk0Yu;jk9aAk8(rWJvcF=\"\"+(szoaZL||\"\"),onPFgpD=rWJvcF.length,qIOqfr8=[],mOfCEy=IUH9gW[0x1],EzW9ZM=IUH9gW[0x1],izD_V32=-IUH9gW[0x3]);for(ezk0Yu=IUH9gW[0x1];ezk0YuIUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8.push(mOfCEy&IUH9gW[0x12]),mOfCEy>>=IUH9gW[0xa],EzW9ZM-=IUH9gW[0xa])}while(EzW9ZM>IUH9gW[0x13]);izD_V32=-IUH9gW[0x3]}}if(izD_V32>-IUH9gW[0x3]){qIOqfr8.push((mOfCEy|izD_V32<IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0xc7]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0xc7]]>>=IUH9gW[0xa],qIOqfr8[-IUH9gW[0x63]]-=IUH9gW[0xa])}while(qIOqfr8[-IUH9gW[0x63]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0xc7]]|qIOqfr8[IUH9gW[0x13]]<=IUH9gW[0x342]&&qIOqfr8[IUH9gW[0x1c]]<=IUH9gW[0x343]&&qIOqfr8[IUH9gW[0x10]]IUH9gW[0x167]){jk9aAk8(qIOqfr8[IUH9gW[0x4]]-=IUH9gW[0x345],qIOqfr8[IUH9gW[0xc]]+=szoaZL(qIOqfr8[IUH9gW[0x4]]>>>IUH9gW[0x15a]&IUH9gW[0x159]|IUH9gW[0x342]),qIOqfr8[IUH9gW[0x4]]=IUH9gW[0x344]|qIOqfr8[IUH9gW[0x4]]&IUH9gW[0x159])}qIOqfr8[IUH9gW[0xc]]+=szoaZL(qIOqfr8[IUH9gW[0x4]])}return qIOqfr8[IUH9gW[0xc]]}function ezk0Yu(qIOqfr8){if(qIOqfr8>=IUH9gW[0x342]&&qIOqfr8<=IUH9gW[0x346]){throw aDf6Q9(onPFgpD(IUH9gW[0x347]))(onPFgpD(IUH9gW[0x348])+onPFgpD(IUH9gW[0x349])+onPFgpD(IUH9gW[0x34a])+qIOqfr8.toString(IUH9gW[0xb]).toUpperCase()+onPFgpD(IUH9gW[0x34b]))}}function RWe5Wz(...qIOqfr8){qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x7];return szoaZL(qIOqfr8[IUH9gW[0x1]]>>qIOqfr8[IUH9gW[0x3]]&IUH9gW[0x20]|IUH9gW[0x1a])}function Khi9t8(...qIOqfr8){qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];if((qIOqfr8[IUH9gW[0x1]]&0xffffff80)==IUH9gW[0x1]){return szoaZL(qIOqfr8[IUH9gW[0x1]])}qIOqfr8[-IUH9gW[0xad]]=\"\";if((qIOqfr8[IUH9gW[0x1]]&0xfffff800)==IUH9gW[0x1]){qIOqfr8[-IUH9gW[0xad]]=szoaZL(qIOqfr8[IUH9gW[0x1]]>>IUH9gW[0x9]&IUH9gW[0x1f]|IUH9gW[0x9b])}else if((qIOqfr8[IUH9gW[0x1]]&0xffff0000)==IUH9gW[0x1]){jk9aAk8(ezk0Yu(qIOqfr8[IUH9gW[0x1]]),qIOqfr8[-IUH9gW[0xad]]=szoaZL(qIOqfr8[IUH9gW[0x1]]>>IUH9gW[0x22]&IUH9gW[0x16]|IUH9gW[0xbc]),qIOqfr8[-IUH9gW[0xad]]+=RWe5Wz(qIOqfr8[IUH9gW[0x1]],IUH9gW[0x9]))}else if((qIOqfr8[IUH9gW[0x1]]&0xffe00000)==IUH9gW[0x1]){jk9aAk8(qIOqfr8[-IUH9gW[0xad]]=szoaZL(qIOqfr8[IUH9gW[0x1]]>>IUH9gW[0x24]&IUH9gW[0x13]|IUH9gW[0xd0]),qIOqfr8[-IUH9gW[0xad]]+=RWe5Wz(qIOqfr8[IUH9gW[0x1]],IUH9gW[0x22]),qIOqfr8[-IUH9gW[0xad]]+=RWe5Wz(qIOqfr8[IUH9gW[0x1]],IUH9gW[0x9]))}qIOqfr8[-IUH9gW[0xad]]+=szoaZL(qIOqfr8[IUH9gW[0x1]]&IUH9gW[0x20]|IUH9gW[0x1a]);return qIOqfr8[-IUH9gW[0xad]]}function aC0THb(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x2]]=EzW9ZM(qIOqfr8[IUH9gW[0x1]]),qIOqfr8[IUH9gW[0x65]]=qIOqfr8[IUH9gW[0x2]].length,qIOqfr8[IUH9gW[0x4]]=-IUH9gW[0x3],qIOqfr8[IUH9gW[0xc]]=IUH9gW[0x1b],qIOqfr8[IUH9gW[0x44]]=\"\");while(++qIOqfr8[IUH9gW[0x4]]=rWJvcF){throw aDf6Q9(onPFgpD(IUH9gW[0x321])+IUH9gW[0x44])(onPFgpD(IUH9gW[0x34c]))}jk9aAk8(qIOqfr8[-IUH9gW[0x2f]]=J7aaZbe[mOfCEy]&IUH9gW[0x12],mOfCEy++);if((qIOqfr8[-IUH9gW[0x2f]]&IUH9gW[0x9b])==IUH9gW[0x1a]){return qIOqfr8[-IUH9gW[0x2f]]&IUH9gW[0x20]}throw aDf6Q9(onPFgpD(IUH9gW[0x321])+IUH9gW[0x44])(onPFgpD(IUH9gW[0x34d])+onPFgpD(IUH9gW[0x34e])+onPFgpD(IUH9gW[0x34f])+onPFgpD(IUH9gW[0x350])+IUH9gW[0x44])}function cIULrn(){var qIOqfr8,szoaZL,EzW9ZM,izD_V32,RWe5Wz;jk9aAk8(szoaZL=void 0x0,EzW9ZM=void 0x0,izD_V32=void 0x0,RWe5Wz=void 0x0);if(mOfCEy>rWJvcF){throw aDf6Q9(onPFgpD(IUH9gW[0x321])+IUH9gW[0x44])(onPFgpD(IUH9gW[0x34d])+onPFgpD(IUH9gW[0x351])+onPFgpD(IUH9gW[0x352]))}if(mOfCEy==rWJvcF){return IUH9gW[0x191]}jk9aAk8(qIOqfr8=J7aaZbe[mOfCEy]&IUH9gW[0x12],mOfCEy++);if((qIOqfr8&IUH9gW[0x1a])==IUH9gW[0x1]){return qIOqfr8}if((qIOqfr8&IUH9gW[0xbc])==IUH9gW[0x9b]){jk9aAk8(szoaZL=ix6yOs(),RWe5Wz=(qIOqfr8&IUH9gW[0x1f])<=IUH9gW[0x1a]){return RWe5Wz}else{throw aDf6Q9(onPFgpD(IUH9gW[0x321])+IUH9gW[0x44])(onPFgpD(IUH9gW[0x34d])+onPFgpD(IUH9gW[0x34e])+onPFgpD(IUH9gW[0x34f])+onPFgpD(IUH9gW[0x350])+IUH9gW[0x44])}}if((qIOqfr8&IUH9gW[0xd0])==IUH9gW[0xbc]){jk9aAk8(szoaZL=ix6yOs(),EzW9ZM=ix6yOs(),RWe5Wz=(qIOqfr8&IUH9gW[0x16])<=IUH9gW[0x353]){ezk0Yu(RWe5Wz);return RWe5Wz}else{throw aDf6Q9(onPFgpD(IUH9gW[0x347]))(onPFgpD(IUH9gW[0x34d])+onPFgpD(IUH9gW[0x34e])+onPFgpD(IUH9gW[0x34f])+onPFgpD(IUH9gW[0x350])+IUH9gW[0x44])}}if((qIOqfr8&IUH9gW[0xdb])==IUH9gW[0xd0]){jk9aAk8(szoaZL=ix6yOs(),EzW9ZM=ix6yOs(),izD_V32=ix6yOs(),RWe5Wz=(qIOqfr8&IUH9gW[0x13])<=IUH9gW[0x345]&&RWe5Wz<=0x10ffff){return RWe5Wz}}throw aDf6Q9(onPFgpD(IUH9gW[0x321])+IUH9gW[0x44])(onPFgpD(IUH9gW[0x34d])+onPFgpD(IUH9gW[0x354])+onPFgpD(IUH9gW[0x355])+onPFgpD(IUH9gW[0x356]))}jk9aAk8(J7aaZbe=void 0x0,rWJvcF=void 0x0,mOfCEy=void 0x0);function u7abyW(qIOqfr8){var szoaZL,ezk0Yu;jk9aAk8(J7aaZbe=EzW9ZM(qIOqfr8),rWJvcF=J7aaZbe.length,mOfCEy=IUH9gW[0x1],szoaZL=[],ezk0Yu=void 0x0);while((ezk0Yu=cIULrn())!==IUH9gW[0x191])szoaZL.push(ezk0Yu);return izD_V32(szoaZL)}jk9aAk8(qIOqfr8.version=onPFgpD(IUH9gW[0x357]),qIOqfr8.encode=aC0THb,qIOqfr8.decode=u7abyW)})(berSED[\"jHH6if9\"]===szoaZL(IUH9gW[0x358])+szoaZL(IUH9gW[0x359])?this.utf8={}:berSED[\"LF74SSL\"])}this[onPFgpD(IUH9gW[0x35a])]=aDf6Q9(onPFgpD(IUH9gW[0x35b])+IUH9gW[0x249])(HidfqvV);if(aDf6Q9(onPFgpD(IUH9gW[0x35c]))(this[onPFgpD(IUH9gW[0x33d])+onPFgpD(IUH9gW[0x33e])])||this[onPFgpD(IUH9gW[0x35a])]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(izD_V32.push(ezk0Yu&IUH9gW[0x12]),ezk0Yu>>=IUH9gW[0xa],RWe5Wz-=IUH9gW[0xa])}while(RWe5Wz>IUH9gW[0x13]);rWJvcF=-IUH9gW[0x3]}}if(rWJvcF>-IUH9gW[0x3]){izD_V32.push((ezk0Yu|rWJvcF<IUH9gW[0x1]&&this[szoaZL(IUH9gW[0x3ef])+szoaZL(IUH9gW[0x3f0])][szoaZL(IUH9gW[0x3f1])]>=this[szoaZL(IUH9gW[0x3f2])+szoaZL(IUH9gW[0x3f3])]){RH8KLq(onPFgpD);function onPFgpD(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0xcf]]=\"\\u002f\\u0040\\u003a\\u0022\\u007a\\u0023\\u002b\\u0026\\u0056\\u0073\\u0068\\u003c\\u004d\\u006c\\u005e\\u0067\\u0034\\u0028\\u0074\\u0041\\u0063\\u0078\\u0061\\u005b\\u006a\\u005f\\u007d\\u004b\\u003b\\u006b\\u0044\\u0060\\u003f\\u004e\\u0042\\u002e\\u0066\\u003e\\u006f\\u0036\\u0049\\u0045\\u007b\\u004c\\u006e\\u002c\\u0053\\u0070\\u0024\\u0052\\u0062\\u0077\\u0048\\u0033\\u0059\\u0055\\u0039\\u004f\\u0043\\u0072\\u0050\\u0021\\u0032\\u0035\\u0057\\u0076\\u0051\\u0064\\u0058\\u006d\\u0029\\u0071\\u0030\\u007e\\u0047\\u007c\\u002a\\u0031\\u005d\\u0054\\u0079\\u0038\\u005a\\u0069\\u003d\\u0037\\u004a\\u0025\\u0046\\u0075\\u0065\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x4]]=qIOqfr8[IUH9gW[0x7]].length,qIOqfr8[IUH9gW[0xc]]=[],qIOqfr8[IUH9gW[0x44]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x9]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x28]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x28]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0xc]].push(qIOqfr8[IUH9gW[0x44]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x44]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x9]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x9]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0xc]].push((qIOqfr8[IUH9gW[0x44]]|qIOqfr8[IUH9gW[0x13]]<{qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3];const[szoaZL,onPFgpD]=qIOqfr8[IUH9gW[0x1]][u7abyW(IUH9gW[0x42e])]()[u7abyW(IUH9gW[0x42b])](IUH9gW[0x20e]);qIOqfr8[IUH9gW[0x3]]=onPFgpD||\"\";if(qIOqfr8[IUH9gW[0x3]]){qIOqfr8[IUH9gW[0x3]]=aDf6Q9(u7abyW(IUH9gW[0x42f])+IUH9gW[0x1c9])(qIOqfr8[IUH9gW[0x3]])}J7aaZbe[szoaZL]=qIOqfr8[IUH9gW[0x3]]}));if(J7aaZbe[u7abyW(IUH9gW[0x430])+u7abyW(IUH9gW[0x431])+IUH9gW[0x438]](u7abyW(IUH9gW[0x432]))){jk9aAk8(RH8KLq(mOfCEy),RH8KLq(rWJvcF));function rWJvcF(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x3]]=\"\\x41\\x65\\x71\\x62\\x70\\x74\\x68\\x66\\x47\\x42\\x46\\x4e\\x48\\x73\\x52\\x54\\x45\\x49\\x6c\\x64\\x6b\\x55\\x72\\x69\\x4d\\x4a\\x67\\x6a\\x63\\x6e\\x51\\x43\\x50\\x57\\x4f\\x44\\x2f\\x77\\x53\\x56\\x59\\x30\\x61\\x3c\\x2a\\x79\\x7e\\x4b\\x21\\x4c\\x3a\\x6d\\x29\\x3d\\x25\\x33\\x38\\x32\\x5a\\x6f\\x58\\x5e\\x2b\\x7b\\x7a\\x3b\\x2c\\x31\\x3f\\x26\\x76\\x78\\x5f\\x28\\x75\\x34\\x2e\\x5d\\x22\\x35\\x7d\\x40\\x60\\x7c\\x5b\\x3e\\x36\\x23\\x37\\x24\\x39\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x11]]=qIOqfr8[IUH9gW[0x7]].length,qIOqfr8[IUH9gW[0x1c]]=[],qIOqfr8[-IUH9gW[0x99]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x3a]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x28]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x28]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[IUH9gW[0x1c]].push(qIOqfr8[-IUH9gW[0x99]]&IUH9gW[0x12]),qIOqfr8[-IUH9gW[0x99]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x3a]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x3a]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x2a]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x2a]]>-IUH9gW[0x3]){qIOqfr8[IUH9gW[0x1c]].push((qIOqfr8[-IUH9gW[0x99]]|qIOqfr8[IUH9gW[0x2a]]<{return \"\"+qIOqfr8+IUH9gW[0x20e]+szoaZL})[u7abyW(IUH9gW[0x43e])](IUH9gW[0x551])}const aC0THb={};qIOqfr8[u7abyW(IUH9gW[0x43f])](qIOqfr8=>{aC0THb[qIOqfr8]=J7aaZbe[u7abyW(IUH9gW[0x430])+u7abyW(IUH9gW[0x431])+IUH9gW[0x438]](qIOqfr8)});const ix6yOs=this[IUH9gW[0x42a]][u7abyW(IUH9gW[0x440])](new(aDf6Q9(u7abyW(IUH9gW[0x441])+IUH9gW[0x6c]))(u7abyW(IUH9gW[0x419])+u7abyW(IUH9gW[0x442])+u7abyW(IUH9gW[0x443])+u7abyW(IUH9gW[0x444]),\"\"));jk9aAk8(this[u7abyW(IUH9gW[0x445])]=ix6yOs?ix6yOs[IUH9gW[0x3]]:\"\",qIOqfr8[u7abyW(IUH9gW[0x42d])+IUH9gW[0x28]](qIOqfr8=>{this[qIOqfr8]=J7aaZbe[qIOqfr8]}));return aC0THb}[u7abyW(IUH9gW[0x446])+IUH9gW[0x1c]](){const izD_V32=this[IUH9gW[0x42a]],ezk0Yu={};if(izD_V32){izD_V32[u7abyW(IUH9gW[0x42b])](IUH9gW[0x42c])[u7abyW(IUH9gW[0x43f])](RH8KLq((...izD_V32)=>{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];const[RWe5Wz,qIOqfr8]=izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x42e])]()[u7abyW(IUH9gW[0x42b])](IUH9gW[0x20e]);ezk0Yu[RWe5Wz]=qIOqfr8}))}return ezk0Yu[u7abyW(IUH9gW[0x447])]||u7abyW(IUH9gW[0x448])+u7abyW(IUH9gW[0x449])+u7abyW(IUH9gW[0x44a])}[u7abyW(IUH9gW[0x44b])+u7abyW(IUH9gW[0x44c])](){const izD_V32=this[IUH9gW[0x42a]],ezk0Yu={};if(izD_V32){izD_V32[u7abyW(IUH9gW[0x42b])](IUH9gW[0x42c])[u7abyW(IUH9gW[0x42d])+IUH9gW[0x28]](RH8KLq((...izD_V32)=>{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];const[RWe5Wz,qIOqfr8]=izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x42e])]()[u7abyW(IUH9gW[0x42b])](IUH9gW[0x20e]);ezk0Yu[RWe5Wz]=qIOqfr8}))}return ezk0Yu[u7abyW(IUH9gW[0x44d])+u7abyW(IUH9gW[0x44e])]||\"\\x31\\x30\"}async[u7abyW(IUH9gW[0x44f])](){RH8KLq(qIOqfr8);function qIOqfr8(...qIOqfr8){jk9aAk8(qIOqfr8[IUH9gW[0x0]]=IUH9gW[0x3],qIOqfr8[IUH9gW[0x2]]=\"\\u007d\\u0048\\u004f\\u0059\\u006d\\u0074\\u0071\\u0056\\u0043\\u0049\\u0070\\u0063\\u006e\\u0044\\u004a\\u006b\\u005a\\u006f\\u0061\\u004e\\u0072\\u006c\\u0052\\u0067\\u004d\\u0065\\u0075\\u0076\\u0042\\u0029\\u0040\\u0023\\u002c\\u007a\\u0045\\u0041\\u0025\\u0057\\u0030\\u003f\\u0033\\u0038\\u0079\\u0054\\u0031\\u0077\\u005b\\u0035\\u003a\\u002e\\u003b\\u004b\\u0036\\u004c\\u0022\\u002b\\u0028\\u0055\\u0068\\u0064\\u006a\\u005e\\u0046\\u005d\\u0062\\u0037\\u0051\\u0078\\u0026\\u0058\\u002f\\u003e\\u007e\\u0021\\u0069\\u0024\\u0053\\u0050\\u0073\\u0034\\u0066\\u0039\\u007c\\u0032\\u0047\\u003d\\u005f\\u002a\\u007b\\u0060\\u003c\",qIOqfr8[IUH9gW[0x7]]=\"\"+(qIOqfr8[IUH9gW[0x1]]||\"\"),qIOqfr8[IUH9gW[0x4]]=qIOqfr8[IUH9gW[0x7]].length,qIOqfr8[-IUH9gW[0x11a]]=[],qIOqfr8[IUH9gW[0x9e]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x8f]]=IUH9gW[0x1],qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]);for(qIOqfr8[IUH9gW[0x1cb]]=IUH9gW[0x1];qIOqfr8[IUH9gW[0x1cb]]IUH9gW[0x17]?IUH9gW[0x14]:IUH9gW[0x15]);do{jk9aAk8(qIOqfr8[-IUH9gW[0x11a]].push(qIOqfr8[IUH9gW[0x9e]]&IUH9gW[0x12]),qIOqfr8[IUH9gW[0x9e]]>>=IUH9gW[0xa],qIOqfr8[IUH9gW[0x8f]]-=IUH9gW[0xa])}while(qIOqfr8[IUH9gW[0x8f]]>IUH9gW[0x13]);qIOqfr8[IUH9gW[0x13]]=-IUH9gW[0x3]}}if(qIOqfr8[IUH9gW[0x13]]>-IUH9gW[0x3]){qIOqfr8[-IUH9gW[0x11a]].push((qIOqfr8[IUH9gW[0x9e]]|qIOqfr8[IUH9gW[0x13]]<{return!onPFgpD[qIOqfr8]});if(J7aaZbe[u7abyW(IUH9gW[0x34])]>IUH9gW[0x1]){return i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x456])+u7abyW(IUH9gW[0x457])+u7abyW(IUH9gW[0x458]))+J7aaZbe[u7abyW(IUH9gW[0x43e])](\"\\u002c\\u0020\"))}if(!this[u7abyW(IUH9gW[0x459])]){return i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x45a])+u7abyW(IUH9gW[0x45b])))}jk9aAk8(await this[u7abyW(IUH9gW[0x45c])](),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x45d])+u7abyW(IUH9gW[0x45e]))+this[szoaZL(IUH9gW[0x45f])]+IUH9gW[0x47d]),await this[szoaZL(IUH9gW[0x460])+IUH9gW[0x1c]](),await this[szoaZL(IUH9gW[0x461])+szoaZL(IUH9gW[0x462])+szoaZL(IUH9gW[0x463])]());if(pn34plr[szoaZL(IUH9gW[0x464])](szoaZL(IUH9gW[0x465]))){await this[szoaZL(IUH9gW[0x466])+szoaZL(IUH9gW[0x467])+IUH9gW[0x5eb]]()}let rWJvcF=await this[szoaZL(IUH9gW[0x468])+szoaZL(IUH9gW[0x469])]();if(!rWJvcF){return i6HDx_S[szoaZL(IUH9gW[0x46a])](szoaZL(IUH9gW[0x46b])+this[szoaZL(IUH9gW[0x46c])]+(szoaZL(IUH9gW[0x46d])+szoaZL(IUH9gW[0x46e])+szoaZL(IUH9gW[0x46f])))}await this[szoaZL(IUH9gW[0x470])+szoaZL(IUH9gW[0x471])+szoaZL(IUH9gW[0x472])]();if(pn34plr[szoaZL(IUH9gW[0x473])+IUH9gW[0x453]](szoaZL(IUH9gW[0x474]))){await this[szoaZL(IUH9gW[0x475])+szoaZL(IUH9gW[0x476])]()}jk9aAk8(Sq514i=jVnJl_Y[aDf6Q9(szoaZL(IUH9gW[0x477])+IUH9gW[0x155])[szoaZL(IUH9gW[0x478])](aDf6Q9(szoaZL(IUH9gW[0x477])+IUH9gW[0x155])[szoaZL(IUH9gW[0x479])]()*jVnJl_Y[szoaZL(IUH9gW[0x47a])])],i6HDx_S[szoaZL(IUH9gW[0x46a])](szoaZL(IUH9gW[0x46b])+this[szoaZL(IUH9gW[0x46c])]+(szoaZL(IUH9gW[0x47b])+szoaZL(IUH9gW[0x47c]))+Sq514i+IUH9gW[0x47d]),await this[szoaZL(IUH9gW[0x461])+szoaZL(IUH9gW[0x47e])+szoaZL(IUH9gW[0x47f])+szoaZL(IUH9gW[0x480])](),await this[szoaZL(IUH9gW[0x470])+szoaZL(IUH9gW[0x471])+szoaZL(IUH9gW[0x472])](),i6HDx_S[szoaZL(IUH9gW[0x46a])](this[szoaZL(IUH9gW[0x481])+szoaZL(IUH9gW[0x482])+IUH9gW[0x625]]()));if(this[szoaZL(IUH9gW[0x483])+szoaZL(IUH9gW[0x484])]&&this[szoaZL(IUH9gW[0x485])+szoaZL(IUH9gW[0x486])]){i6HDx_S[szoaZL(IUH9gW[0x46a])](szoaZL(IUH9gW[0x487])+this[szoaZL(IUH9gW[0x488])])}i6HDx_S[szoaZL(IUH9gW[0x46a])](szoaZL(IUH9gW[0x489])+szoaZL(IUH9gW[0x48a]));return this[szoaZL(IUH9gW[0x48b])+szoaZL(IUH9gW[0x48c])][szoaZL(IUH9gW[0x48d])]}async[u7abyW(IUH9gW[0x48e])](){let izD_V32={[IUH9gW[0x72d]]:u7abyW(IUH9gW[0x300]),[u7abyW(IUH9gW[0x48f])+u7abyW(IUH9gW[0x490])]:u7abyW(IUH9gW[0x491])+IUH9gW[0x835],[u7abyW(IUH9gW[0x492])+u7abyW(IUH9gW[0x493])+u7abyW(IUH9gW[0x494])]:u7abyW(IUH9gW[0x495]),[IUH9gW[0x730]]:u7abyW(IUH9gW[0x409])+IUH9gW[0x1c],[u7abyW(IUH9gW[0x419])+u7abyW(IUH9gW[0x41a])+u7abyW(IUH9gW[0x41b])]:this[u7abyW(IUH9gW[0x445])],[u7abyW(IUH9gW[0x496])]:this[u7abyW(IUH9gW[0x496])]},ezk0Yu=await this[u7abyW(IUH9gW[0x497])](u7abyW(IUH9gW[0x498]),izD_V32,this[u7abyW(IUH9gW[0x459])]);if(ezk0Yu==IUH9gW[0x5]){return IUH9gW[0x5]}let{[u7abyW(IUH9gW[0x24f])]:RWe5Wz}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x49a])+u7abyW(IUH9gW[0x49b])+u7abyW(IUH9gW[0x49c])+u7abyW(IUH9gW[0x49d])+IUH9gW[0x1c],[u7abyW(IUH9gW[0x49e])]:ezk0Yu[u7abyW(IUH9gW[0x49f])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a3])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x4a6])+IUH9gW[0x25b]]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180]),[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x4a8])]:ezk0Yu[u7abyW(IUH9gW[0x4a7])+u7abyW(IUH9gW[0x4a9])][u7abyW(IUH9gW[0x4a8])],[u7abyW(IUH9gW[0x4aa])]:ezk0Yu[u7abyW(IUH9gW[0x4ab])][u7abyW(IUH9gW[0x4aa])],[u7abyW(IUH9gW[0x4ac])+u7abyW(IUH9gW[0x4ad])]:u7abyW(IUH9gW[0x4ae])+u7abyW(IUH9gW[0x4af])+u7abyW(IUH9gW[0x4b0])+u7abyW(IUH9gW[0x4b1])+IUH9gW[0x1c],[u7abyW(IUH9gW[0x4b2])]:b4GwMp,[u7abyW(IUH9gW[0x4b3])]:u7abyW(IUH9gW[0x4b4])+this[u7abyW(IUH9gW[0x445])]},[u7abyW(IUH9gW[0x24f])]:izD_V32});if(RWe5Wz[u7abyW(IUH9gW[0x285])]==IUH9gW[0x3]&&RWe5Wz[u7abyW(IUH9gW[0x4b5])]){this[u7abyW(IUH9gW[0x4b6])]=RWe5Wz[u7abyW(IUH9gW[0x4b5])];return IUH9gW[0x192]}}async[u7abyW(IUH9gW[0x4b7])+u7abyW(IUH9gW[0x4b8])](){if(this[u7abyW(IUH9gW[0x4b9])][u7abyW(IUH9gW[0x34])]>IUH9gW[0x7]){this[u7abyW(IUH9gW[0x4ba])]=this[u7abyW(IUH9gW[0x4b9])][IUH9gW[0x7]];if(this[u7abyW(IUH9gW[0x4ba])]&&(this[u7abyW(IUH9gW[0x4ba])][u7abyW(IUH9gW[0x4bb])+IUH9gW[0x453]](u7abyW(IUH9gW[0x4bc])+\"\\x2f\\x2f\")||this[u7abyW(IUH9gW[0x4ba])][u7abyW(IUH9gW[0x4bd])](u7abyW(IUH9gW[0x4be])))){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4bf])+u7abyW(IUH9gW[0x4c0])+u7abyW(IUH9gW[0x4c1]))+this[u7abyW(IUH9gW[0x4ba])]+IUH9gW[0x47d]);try{this[u7abyW(IUH9gW[0x4a2])]=new Y4a4yg(this[u7abyW(IUH9gW[0x4ba])],{[u7abyW(IUH9gW[0x4a6])+IUH9gW[0x25b]]:LrptE9(u7abyW(IUH9gW[0x4c2]),IUH9gW[0x109],IUH9gW[0x180])});let{[u7abyW(IUH9gW[0x24f])]:izD_V32}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x4c3])+u7abyW(IUH9gW[0x4c4])+u7abyW(IUH9gW[0x4c5])+u7abyW(IUH9gW[0x4c6]),[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x4a6])+IUH9gW[0x25b]]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180]),[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x23c])]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x4c9])+u7abyW(IUH9gW[0x4ca])+u7abyW(IUH9gW[0x4cb])+u7abyW(IUH9gW[0x4cc])+u7abyW(IUH9gW[0x4cd])+u7abyW(IUH9gW[0x4ce])}});i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x4cf]))}catch(ezk0Yu){jk9aAk8(this[u7abyW(IUH9gW[0x4a2])]=IUH9gW[0x5],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4bf])+u7abyW(IUH9gW[0x4d0]))))}}else{this[u7abyW(IUH9gW[0x4ba])]&&this[u7abyW(IUH9gW[0x4ba])][u7abyW(IUH9gW[0x4bb])+IUH9gW[0x453]](IUH9gW[0x4d1])&&this[u7abyW(IUH9gW[0x4ba])][u7abyW(IUH9gW[0x42b])](IUH9gW[0x4d1])[u7abyW(IUH9gW[0x34])]==IUH9gW[0xc]?(this[u7abyW(IUH9gW[0x4ba])]=this[u7abyW(IUH9gW[0x4b9])][IUH9gW[0x7]][u7abyW(IUH9gW[0x42b])](IUH9gW[0x4d1]),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4bf])+u7abyW(IUH9gW[0x4d2])+u7abyW(IUH9gW[0x4d3]))+this[u7abyW(IUH9gW[0x4ba])]+IUH9gW[0x47d]),this[u7abyW(IUH9gW[0x4a2])]=new Y4a4yg({[u7abyW(IUH9gW[0x4d4])]:this[u7abyW(IUH9gW[0x4ba])][IUH9gW[0x1]],[u7abyW(IUH9gW[0x4d5])]:this[u7abyW(IUH9gW[0x4ba])][IUH9gW[0x3]],[u7abyW(IUH9gW[0x4d6])+IUH9gW[0x651]]:this[u7abyW(IUH9gW[0x4ba])][IUH9gW[0x7]],[u7abyW(IUH9gW[0x4d7])+IUH9gW[0x4d8]]:this[u7abyW(IUH9gW[0x4ba])][IUH9gW[0x4]]},{[u7abyW(IUH9gW[0x4a6])+IUH9gW[0x25b]]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180])})):i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4d9])+u7abyW(IUH9gW[0x4da])+u7abyW(IUH9gW[0x4db])+u7abyW(IUH9gW[0x4dc])+u7abyW(IUH9gW[0x4dd])))}}else{try{let{[u7abyW(IUH9gW[0x24f])]:izD_V32}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x4de]),[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x4df])]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180])});i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x4e0]))}catch(RWe5Wz){}}}async[u7abyW(IUH9gW[0x4e1])+u7abyW(IUH9gW[0x4e2])+u7abyW(IUH9gW[0x4e3])](){if(k5KyAj[u7abyW(IUH9gW[0x34])]>IUH9gW[0x1]){for(let izD_V32 of k5KyAj)await this[u7abyW(IUH9gW[0x4e4])+u7abyW(IUH9gW[0x4e5])](izD_V32)}if(BaZkob[u7abyW(IUH9gW[0x34])]>IUH9gW[0x1]){for(let izD_V32 of BaZkob)await this[u7abyW(IUH9gW[0x4e4])+u7abyW(IUH9gW[0x4e6])](izD_V32)}}async[u7abyW(IUH9gW[0x4e1])+u7abyW(IUH9gW[0x4e7])+u7abyW(IUH9gW[0x4e8])+u7abyW(IUH9gW[0x4e9])](){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4ea])+u7abyW(IUH9gW[0x4eb])+u7abyW(IUH9gW[0x4ec])+IUH9gW[0x20e]);if(this[u7abyW(IUH9gW[0x3ec])+u7abyW(IUH9gW[0x3ed])+IUH9gW[0x4d8]]()){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4ed])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4ee])+u7abyW(IUH9gW[0x4ef])+u7abyW(IUH9gW[0x4f0])));return}const izD_V32=aDf6Q9(u7abyW(IUH9gW[0xb8]))[u7abyW(IUH9gW[0x4f1])](this[u7abyW(IUH9gW[0x4f2])])[u7abyW(IUH9gW[0x4f3])](RH8KLq((...izD_V32)=>{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];return izD_V32[IUH9gW[0x1]]}));if(!izD_V32){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4f5])+u7abyW(IUH9gW[0x4f6])+u7abyW(IUH9gW[0x4f7])));return}const ezk0Yu=[u7abyW(IUH9gW[0x4f8]),u7abyW(IUH9gW[0x4f9]),u7abyW(IUH9gW[0x4fa]),u7abyW(IUH9gW[0x4fb])];for(const RWe5Wz of ezk0Yu){if(this[u7abyW(IUH9gW[0x4fc])+u7abyW(IUH9gW[0x4fd])]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4ed])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x4fe])+u7abyW(IUH9gW[0x4ff]))+this[u7abyW(IUH9gW[0x500])+u7abyW(IUH9gW[0x501])]);break}if(ZzwZ2OA[u7abyW(IUH9gW[0x4bb])+IUH9gW[0x453]](RWe5Wz)&&this[u7abyW(IUH9gW[0x502])+u7abyW(IUH9gW[0x503])+IUH9gW[0x33a]][RWe5Wz]){await this[u7abyW(IUH9gW[0x504])](RWe5Wz)}else{if(!this[u7abyW(IUH9gW[0x4f2])][RWe5Wz]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x505])+this[u7abyW(IUH9gW[0x506])+u7abyW(IUH9gW[0x507])][RWe5Wz][u7abyW(IUH9gW[0x508])]+u7abyW(IUH9gW[0x509]))}}}i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x50a])+u7abyW(IUH9gW[0x50b])+u7abyW(IUH9gW[0x50c]))}async[u7abyW(IUH9gW[0x4e1])+u7abyW(IUH9gW[0x50d])+u7abyW(IUH9gW[0x50e])+IUH9gW[0x44]](izD_V32){if(this[u7abyW(IUH9gW[0x4fc])+u7abyW(IUH9gW[0x4fd])]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x50f])+this[u7abyW(IUH9gW[0x510])][izD_V32][u7abyW(IUH9gW[0x508])]+(u7abyW(IUH9gW[0x511])+IUH9gW[0x185])+this[u7abyW(IUH9gW[0x512])]);return}const ezk0Yu=this[u7abyW(IUH9gW[0x506])+u7abyW(IUH9gW[0x507])][izD_V32];if(izD_V32===u7abyW(IUH9gW[0x4f8])){const RWe5Wz=await this[u7abyW(IUH9gW[0x513])+u7abyW(IUH9gW[0x514])+u7abyW(IUH9gW[0x515])+IUH9gW[0x116]]();if(RWe5Wz[u7abyW(IUH9gW[0x516])]){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x505])+ezk0Yu[u7abyW(IUH9gW[0x508])]+(u7abyW(IUH9gW[0x517])+u7abyW(IUH9gW[0x518]))+RWe5Wz[u7abyW(IUH9gW[0x519])]),this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51b])+u7abyW(IUH9gW[0x51c])]=IUH9gW[0x192],this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51b])+u7abyW(IUH9gW[0x51d])+u7abyW(IUH9gW[0x51e])]=RWe5Wz[u7abyW(IUH9gW[0x519])]);return}else{jk9aAk8(this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51b])+u7abyW(IUH9gW[0x51c])]=IUH9gW[0x191],this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51b])+u7abyW(IUH9gW[0x51d])+u7abyW(IUH9gW[0x51e])]=\"\");if(!this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51f])+u7abyW(IUH9gW[0x520])]){jk9aAk8(await this[u7abyW(IUH9gW[0x521])+u7abyW(IUH9gW[0x522])+u7abyW(IUH9gW[0x523])](u7abyW(IUH9gW[0x4f8])),this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51f])+u7abyW(IUH9gW[0x520])]=IUH9gW[0x192])}}}i6HDx_S[u7abyW(IUH9gW[0x237])](\"\"+ezk0Yu[u7abyW(IUH9gW[0x524])]+u7abyW(IUH9gW[0x525])+ezk0Yu[u7abyW(IUH9gW[0x508])]+u7abyW(IUH9gW[0x526])+ezk0Yu[u7abyW(IUH9gW[0x527])]+\"\u4E2A\\u0029\");let qIOqfr8=IUH9gW[0x1];for(let szoaZL=IUH9gW[0x3];szoaZL<=ezk0Yu[u7abyW(IUH9gW[0x527])];szoaZL++){if(this[u7abyW(IUH9gW[0x4fc])+u7abyW(IUH9gW[0x4fd])]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x50f])+ezk0Yu[u7abyW(IUH9gW[0x508])]+u7abyW(IUH9gW[0x528])+this[u7abyW(IUH9gW[0x500])+u7abyW(IUH9gW[0x501])]);break}jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x529])+szoaZL+u7abyW(IUH9gW[0x52a])+ezk0Yu[u7abyW(IUH9gW[0x508])]+IUH9gW[0x47d]),this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])]=ezk0Yu);const onPFgpD=await this[u7abyW(IUH9gW[0x4e1])+u7abyW(IUH9gW[0x50e])+u7abyW(IUH9gW[0x52e])](izD_V32);if(onPFgpD===u7abyW(IUH9gW[0x52f])){szoaZL--;continue}if(onPFgpD===u7abyW(IUH9gW[0x530])){this[u7abyW(IUH9gW[0x4f2])][izD_V32]=IUH9gW[0x191];break}else{if(onPFgpD===u7abyW(IUH9gW[0x531])){jk9aAk8(qIOqfr8++,this[u7abyW(IUH9gW[0x532])+u7abyW(IUH9gW[0x533])+IUH9gW[0x33a]]&&this[u7abyW(IUH9gW[0x506])+u7abyW(IUH9gW[0x507])][izD_V32][u7abyW(IUH9gW[0x534])]?(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x535])+ezk0Yu[u7abyW(IUH9gW[0x508])]+(u7abyW(IUH9gW[0x536])+\"\u5F0F\")),this[u7abyW(IUH9gW[0x537])]++):this[u7abyW(IUH9gW[0x538])+IUH9gW[0x539]]=IUH9gW[0x1]);if(this[u7abyW(IUH9gW[0x3ec])+u7abyW(IUH9gW[0x3ed])+IUH9gW[0x4d8]]()){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x53a])+u7abyW(IUH9gW[0x53b])+IUH9gW[0x185]+this[u7abyW(IUH9gW[0x53c])+u7abyW(IUH9gW[0x53d])]+(u7abyW(IUH9gW[0x53e])+\"\u52A1\"));break}if(izD_V32===u7abyW(IUH9gW[0x4f8])&&szoaZL%IUH9gW[0x15a]===IUH9gW[0x1]&&szoaZLIUH9gW[0xa2]){await this[u7abyW(IUH9gW[0x563])](aDf6Q9(u7abyW(IUH9gW[0x19e]))(ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x564])]))}}}async[u7abyW(IUH9gW[0x563])](izD_V32){let ezk0Yu={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x565])+u7abyW(IUH9gW[0x566])+u7abyW(IUH9gW[0x567])+u7abyW(IUH9gW[0x568])+u7abyW(IUH9gW[0x569])+u7abyW(IUH9gW[0x56a])+u7abyW(IUH9gW[0x56b]),[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x56c])+u7abyW(IUH9gW[0x56d])+u7abyW(IUH9gW[0x56e])+IUH9gW[0x185]+this[u7abyW(IUH9gW[0x44d])+u7abyW(IUH9gW[0x44e])]+IUH9gW[0x551]+this[u7abyW(IUH9gW[0x56f])]()+(u7abyW(IUH9gW[0x570])+u7abyW(IUH9gW[0x571])+u7abyW(IUH9gW[0x572])+u7abyW(IUH9gW[0x573])),[u7abyW(IUH9gW[0x574])]:u7abyW(IUH9gW[0x55b])+u7abyW(IUH9gW[0x55c])+u7abyW(IUH9gW[0x55d]),[u7abyW(IUH9gW[0x575])]:u7abyW(IUH9gW[0x576])+u7abyW(IUH9gW[0x577])+u7abyW(IUH9gW[0x578])+IUH9gW[0x560],[u7abyW(IUH9gW[0x4b3])]:this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:{[u7abyW(IUH9gW[0x579])]:izD_V32,[u7abyW(IUH9gW[0x57a])]:u7abyW(IUH9gW[0x57b])+u7abyW(IUH9gW[0x57c])+u7abyW(IUH9gW[0x57d])+u7abyW(IUH9gW[0x57e])+u7abyW(IUH9gW[0x57f])+u7abyW(IUH9gW[0x580])}},{[u7abyW(IUH9gW[0x24f])]:RWe5Wz}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](ezk0Yu);if(RWe5Wz[u7abyW(IUH9gW[0x285])]==IUH9gW[0x3]){}}async[u7abyW(IUH9gW[0x546])+u7abyW(IUH9gW[0x547])+u7abyW(IUH9gW[0x581])](){let izD_V32={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x582])+u7abyW(IUH9gW[0x583])+u7abyW(IUH9gW[0x584])+u7abyW(IUH9gW[0x585])+u7abyW(IUH9gW[0x586])+IUH9gW[0x21b],[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x587])+u7abyW(IUH9gW[0x588])+u7abyW(IUH9gW[0x589])+u7abyW(IUH9gW[0x58a])+u7abyW(IUH9gW[0x58b])+this[u7abyW(IUH9gW[0x44d])+u7abyW(IUH9gW[0x44e])]+IUH9gW[0x551]+this[u7abyW(IUH9gW[0x56f])]()+u7abyW(IUH9gW[0x58c]),[u7abyW(IUH9gW[0x559])+u7abyW(IUH9gW[0x55a])]:u7abyW(IUH9gW[0x55b])+u7abyW(IUH9gW[0x55c])+u7abyW(IUH9gW[0x55d]),[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x576])+u7abyW(IUH9gW[0x577])+u7abyW(IUH9gW[0x578])+IUH9gW[0x560],[u7abyW(IUH9gW[0x4b3])]:this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:{[u7abyW(IUH9gW[0x546])+u7abyW(IUH9gW[0x547])+u7abyW(IUH9gW[0x58d])]:IUH9gW[0x7]}},{[u7abyW(IUH9gW[0x24f])]:ezk0Yu}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](izD_V32);if(ezk0Yu[u7abyW(IUH9gW[0x285])]==IUH9gW[0x3]){await this[u7abyW(IUH9gW[0x546])+u7abyW(IUH9gW[0x547])+u7abyW(IUH9gW[0x548])]()}}async[u7abyW(IUH9gW[0x521])+u7abyW(IUH9gW[0x522])+u7abyW(IUH9gW[0x523])](izD_V32){let ezk0Yu={};if(izD_V32==u7abyW(IUH9gW[0x4f8])){ezk0Yu={[u7abyW(IUH9gW[0x58e])+u7abyW(IUH9gW[0x40e])]:IUH9gW[0x3],[u7abyW(IUH9gW[0x58f])+u7abyW(IUH9gW[0x590])+u7abyW(IUH9gW[0x591])]:this[u7abyW(IUH9gW[0x592])]}}if(izD_V32==u7abyW(IUH9gW[0x593])+IUH9gW[0x331]){ezk0Yu={[u7abyW(IUH9gW[0x594])]:IUH9gW[0x3],[u7abyW(IUH9gW[0x595])]:{[u7abyW(IUH9gW[0x596])+u7abyW(IUH9gW[0x597])+u7abyW(IUH9gW[0x598])+IUH9gW[0x1c]]:0x4e43,[u7abyW(IUH9gW[0x58f])+u7abyW(IUH9gW[0x599])]:u7abyW(IUH9gW[0x59a])+u7abyW(IUH9gW[0x59b])+u7abyW(IUH9gW[0x59c])+u7abyW(IUH9gW[0x59d]),[u7abyW(IUH9gW[0x59e])+u7abyW(IUH9gW[0x59f])]:{[u7abyW(IUH9gW[0x5a0])+u7abyW(IUH9gW[0x5a1])+u7abyW(IUH9gW[0x5a2])+u7abyW(IUH9gW[0x5a3])+IUH9gW[0xf5]]:IUH9gW[0x192]}}}}if(izD_V32==u7abyW(IUH9gW[0x5a4])){ezk0Yu={[u7abyW(IUH9gW[0x58e])+u7abyW(IUH9gW[0x40e])]:IUH9gW[0x3],[u7abyW(IUH9gW[0x595])]:this[u7abyW(IUH9gW[0x5a5])+u7abyW(IUH9gW[0x5a6])+u7abyW(IUH9gW[0x5a7])]}}try{let RWe5Wz=await this[u7abyW(IUH9gW[0x312])+IUH9gW[0x689]](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])]({}))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x5a8]))[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](ezk0Yu))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),u7abyW(IUH9gW[0x4a5]),u7abyW(IUH9gW[0x55d]),this[IUH9gW[0x42a]]);if(!RWe5Wz){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x5a9])+u7abyW(IUH9gW[0x5aa])+u7abyW(IUH9gW[0x5ab])));return IUH9gW[0x191]}const qIOqfr8={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x5ac])+RWe5Wz,[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x587])+u7abyW(IUH9gW[0x588])+u7abyW(IUH9gW[0x589])+u7abyW(IUH9gW[0x58a])+u7abyW(IUH9gW[0x58b])+this[u7abyW(IUH9gW[0x44d])+u7abyW(IUH9gW[0x44e])]+IUH9gW[0x551]+this[u7abyW(IUH9gW[0x56f])]()+(u7abyW(IUH9gW[0x5ad])+u7abyW(IUH9gW[0x5ae])+u7abyW(IUH9gW[0x5af])),[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x5b1]),[u7abyW(IUH9gW[0x4b3])]:this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:ezk0Yu,[u7abyW(IUH9gW[0x54e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a3])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a6])+IUH9gW[0x25b]]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180])};let{[u7abyW(IUH9gW[0x24f])]:szoaZL}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](qIOqfr8);return szoaZL&&szoaZL[u7abyW(IUH9gW[0x285])]===IUH9gW[0x3]?IUH9gW[0x192]:(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5b2])+(szoaZL?.errorMsg||u7abyW(IUH9gW[0x5b3]))),IUH9gW[0x191])}catch(onPFgpD){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x5b4])+u7abyW(IUH9gW[0x5b5])+u7abyW(IUH9gW[0x5b6]))+onPFgpD[u7abyW(IUH9gW[0x5b7])+IUH9gW[0x44]]);return IUH9gW[0x191]}}async[u7abyW(IUH9gW[0x4e1])+u7abyW(IUH9gW[0x50e])+u7abyW(IUH9gW[0x52e])](izD_V32){const ezk0Yu=await this[u7abyW(IUH9gW[0x5b8])](izD_V32),RWe5Wz=aDf6Q9(u7abyW(IUH9gW[0x1a6]))[u7abyW(IUH9gW[0x5b9])]();if(!ezk0Yu){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x5ba])+u7abyW(IUH9gW[0x5bb])+u7abyW(IUH9gW[0x5bc])));return u7abyW(IUH9gW[0x5bd])}await i6HDx_S[u7abyW(IUH9gW[0x543])](IUH9gW[0x5be]);const qIOqfr8=await this[u7abyW(IUH9gW[0x5bf])](ezk0Yu[u7abyW(IUH9gW[0x5c0])],ezk0Yu[u7abyW(IUH9gW[0x5c1])],ezk0Yu[u7abyW(IUH9gW[0x5c2])+u7abyW(IUH9gW[0x5c3])]);if(!qIOqfr8){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x5c4])+u7abyW(IUH9gW[0x5c5])+\"\u5E7F\u544A\"));return u7abyW(IUH9gW[0x5bd])}if(aDf6Q9(u7abyW(IUH9gW[0x5c6]))[u7abyW(IUH9gW[0x5c7])+IUH9gW[0x16d]](ezk0Yu[u7abyW(IUH9gW[0x5c8])])){for(let szoaZL of ezk0Yu[u7abyW(IUH9gW[0x5c8])])await this[u7abyW(IUH9gW[0x5c9])+IUH9gW[0x876]](szoaZL[u7abyW(IUH9gW[0x23a])])}const onPFgpD=aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x53f])]((ezk0Yu[u7abyW(IUH9gW[0x5ca])+u7abyW(IUH9gW[0x5cb])]+aDf6Q9(u7abyW(IUH9gW[0x25d]))[u7abyW(IUH9gW[0x53f])](aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x3fb])]()*LrptE9(u7abyW(IUH9gW[0x5cc])+IUH9gW[0x11],0xbb8,IUH9gW[0x180])+IUH9gW[0x180]))/IUH9gW[0x180]);jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5cd])+onPFgpD+IUH9gW[0x542]),await i6HDx_S[u7abyW(IUH9gW[0x543])](onPFgpD*IUH9gW[0x180]));const J7aaZbe=await this[u7abyW(IUH9gW[0x5ce])](ezk0Yu[u7abyW(IUH9gW[0x5c0])],ezk0Yu[u7abyW(IUH9gW[0x5c1])],ezk0Yu[u7abyW(IUH9gW[0x5cf])],RWe5Wz,onPFgpD,ezk0Yu[u7abyW(IUH9gW[0x5d0])+u7abyW(IUH9gW[0x5d1])],ezk0Yu[u7abyW(IUH9gW[0x5ca])+u7abyW(IUH9gW[0x5cb])],ezk0Yu[u7abyW(IUH9gW[0x5d2])]);if(J7aaZbe===u7abyW(IUH9gW[0x5d3])+u7abyW(IUH9gW[0x5d4])+u7abyW(IUH9gW[0x53d])){return u7abyW(IUH9gW[0x52f])}if(J7aaZbe>IUH9gW[0x1]){jk9aAk8(this[u7abyW(IUH9gW[0x5d5])][u7abyW(IUH9gW[0x5d6])]+=J7aaZbe,this[u7abyW(IUH9gW[0x5d5])][u7abyW(IUH9gW[0x5d7])][izD_V32]+=J7aaZbe,this[u7abyW(IUH9gW[0x5d8])]+=J7aaZbe)}if(J7aaZbe==IUH9gW[0x1]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5d9]));return u7abyW(IUH9gW[0x530])}if(w8rKdS!=u7abyW(IUH9gW[0x19b])){if(J7aaZbe==IUH9gW[0x3]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5da])+J7aaZbe+u7abyW(IUH9gW[0x5db]));return u7abyW(IUH9gW[0x530])}}if(w8rKdS!=u7abyW(IUH9gW[0x19b])){if(J7aaZbe==IUH9gW[0x15a]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5da])+J7aaZbe+(u7abyW(IUH9gW[0x5dc])+u7abyW(IUH9gW[0x5dd])));return u7abyW(IUH9gW[0x530])}}if(this[u7abyW(IUH9gW[0x4fc])+u7abyW(IUH9gW[0x4fd])]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x50f])+this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x508])]+(u7abyW(IUH9gW[0x511])+IUH9gW[0x185])+this[u7abyW(IUH9gW[0x500])+u7abyW(IUH9gW[0x501])]);return u7abyW(IUH9gW[0x530])}return J7aaZbe==IUH9gW[0x27]?(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x5de])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5da])+J7aaZbe+(u7abyW(IUH9gW[0x5df])+u7abyW(IUH9gW[0x5e0]))),u7abyW(IUH9gW[0x5e1])+IUH9gW[0x21b]):(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x5de])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x5e2])+u7abyW(IUH9gW[0x5e3]))+J7aaZbe+IUH9gW[0x47d]),u7abyW(IUH9gW[0x5e1])+IUH9gW[0x21b])}async[u7abyW(IUH9gW[0x5e4])](){try{const izD_V32=await this[u7abyW(IUH9gW[0x5e5])+u7abyW(IUH9gW[0x5e6])]();if(!izD_V32){return{[u7abyW(IUH9gW[0x516])]:IUH9gW[0x192],[u7abyW(IUH9gW[0x519])]:u7abyW(IUH9gW[0x5e7])+IUH9gW[0x618]}}if(pn34plr[u7abyW(IUH9gW[0x4bd])](u7abyW(IUH9gW[0x5e8]))){const ezk0Yu=izD_V32[u7abyW(IUH9gW[0x5e9])]?.find(RH8KLq((...izD_V32)=>{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];return izD_V32[IUH9gW[0x1]][IUH9gW[0x5f5]]===IUH9gW[0x5ec]}))||{};this[u7abyW(IUH9gW[0x596])+u7abyW(IUH9gW[0x597])+u7abyW(IUH9gW[0x5ea])+IUH9gW[0x5eb]]={[u7abyW(IUH9gW[0x596])+u7abyW(IUH9gW[0x597])+u7abyW(IUH9gW[0x598])+IUH9gW[0x1c]]:IUH9gW[0x5ec],[u7abyW(IUH9gW[0x58f])+u7abyW(IUH9gW[0x599])]:u7abyW(IUH9gW[0x59a])+u7abyW(IUH9gW[0x5ed])+u7abyW(IUH9gW[0x5ee])+IUH9gW[0x427],[u7abyW(IUH9gW[0x5ef])]:{[u7abyW(IUH9gW[0x5a0])+u7abyW(IUH9gW[0x5a1])+u7abyW(IUH9gW[0x5a2])+u7abyW(IUH9gW[0x5a3])+IUH9gW[0xf5]]:IUH9gW[0x192]}};if(!ezk0Yu[u7abyW(IUH9gW[0x5f0])]){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x5f1])+u7abyW(IUH9gW[0x5f2])+\"\u7B7E\u5230\")),await this[u7abyW(IUH9gW[0x521])+u7abyW(IUH9gW[0x522])+u7abyW(IUH9gW[0x523])](u7abyW(IUH9gW[0x5a4])),await this[u7abyW(IUH9gW[0x5a4])]())}}const RWe5Wz=izD_V32[u7abyW(IUH9gW[0x5f3])+u7abyW(IUH9gW[0x5f4])]?.find(RH8KLq((...izD_V32)=>{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];return izD_V32[IUH9gW[0x1]][IUH9gW[0x5f5]]===IUH9gW[0xbf]}));if(!RWe5Wz){return{[u7abyW(IUH9gW[0x5f6])+IUH9gW[0x2a]]:IUH9gW[0x192],[u7abyW(IUH9gW[0x519])]:u7abyW(IUH9gW[0x5f7])+\"\u4EFB\u52A1\"}}if(!RWe5Wz[u7abyW(IUH9gW[0x5f8])+IUH9gW[0x5f9]]){return{[u7abyW(IUH9gW[0x5f6])+IUH9gW[0x2a]]:IUH9gW[0x192],[u7abyW(IUH9gW[0x519])]:u7abyW(IUH9gW[0x5fa])}}jk9aAk8(this[u7abyW(IUH9gW[0x5fb])+u7abyW(IUH9gW[0x5fc])]=RWe5Wz[u7abyW(IUH9gW[0x5fd])]||IUH9gW[0xa2],this[u7abyW(IUH9gW[0x5fe])+u7abyW(IUH9gW[0x5ff])+u7abyW(IUH9gW[0x600])+IUH9gW[0x21b]]=RWe5Wz[u7abyW(IUH9gW[0x601])]||IUH9gW[0x1],this[u7abyW(IUH9gW[0x5a5])+u7abyW(IUH9gW[0x5a6])+u7abyW(IUH9gW[0x5a7])]=RWe5Wz[u7abyW(IUH9gW[0x596])+u7abyW(IUH9gW[0x597])+u7abyW(IUH9gW[0x5ea])+IUH9gW[0x5eb]]||{[u7abyW(IUH9gW[0x602])+u7abyW(IUH9gW[0x603])+IUH9gW[0x67b]]:u7abyW(IUH9gW[0x604]),[u7abyW(IUH9gW[0x5d0])+u7abyW(IUH9gW[0x605])]:u7abyW(IUH9gW[0x606])+u7abyW(IUH9gW[0x607])+u7abyW(IUH9gW[0x608])+u7abyW(IUH9gW[0x609])+u7abyW(IUH9gW[0x60a]),[u7abyW(IUH9gW[0x596])+u7abyW(IUH9gW[0x597])+u7abyW(IUH9gW[0x598])+IUH9gW[0x1c]]:IUH9gW[0xbf],[u7abyW(IUH9gW[0x58f])+u7abyW(IUH9gW[0x599])]:u7abyW(IUH9gW[0x59a])+u7abyW(IUH9gW[0x60b])+u7abyW(IUH9gW[0x60c])+IUH9gW[0x427],[u7abyW(IUH9gW[0x59e])+u7abyW(IUH9gW[0x59f])]:{[u7abyW(IUH9gW[0x60d])]:IUH9gW[0x192]}},this[u7abyW(IUH9gW[0x592])][u7abyW(IUH9gW[0x60e])]&&this[u7abyW(IUH9gW[0x596])+u7abyW(IUH9gW[0x597])+u7abyW(IUH9gW[0x5ea])+IUH9gW[0x5eb]][u7abyW(IUH9gW[0x5d0])+u7abyW(IUH9gW[0x605])][u7abyW(IUH9gW[0x4bb])+IUH9gW[0x453]](u7abyW(IUH9gW[0x30b])+\"\\x31\\x31\")?(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x60f])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x610])),this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])]=this[u7abyW(IUH9gW[0x506])+u7abyW(IUH9gW[0x507])][u7abyW(IUH9gW[0x611])]):this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])]=this[u7abyW(IUH9gW[0x506])+u7abyW(IUH9gW[0x507])][u7abyW(IUH9gW[0x4f8])],this[u7abyW(IUH9gW[0x612])]=RWe5Wz[u7abyW(IUH9gW[0x613])]);try{const qIOqfr8=aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](RWe5Wz[u7abyW(IUH9gW[0x5f8])+IUH9gW[0x5f9]],u7abyW(IUH9gW[0x27e]))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x280])),szoaZL=aDf6Q9(u7abyW(IUH9gW[0x5a8]))[u7abyW(IUH9gW[0x1f5])](qIOqfr8);this[u7abyW(IUH9gW[0x59e])+u7abyW(IUH9gW[0x59f])]=szoaZL[u7abyW(IUH9gW[0x5ef])]}catch(onPFgpD){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x614])+u7abyW(IUH9gW[0x615])+u7abyW(IUH9gW[0x616]))+onPFgpD[u7abyW(IUH9gW[0x5b7])+IUH9gW[0x44]]);return{[u7abyW(IUH9gW[0x5f6])+IUH9gW[0x2a]]:IUH9gW[0x192],[u7abyW(IUH9gW[0x519])]:u7abyW(IUH9gW[0x617])+IUH9gW[0x618]}}return{[u7abyW(IUH9gW[0x5f6])+IUH9gW[0x2a]]:IUH9gW[0x191],[u7abyW(IUH9gW[0x519])]:\"\"}}catch(J7aaZbe){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x619])+u7abyW(IUH9gW[0x61a])+u7abyW(IUH9gW[0x61b]))+J7aaZbe[u7abyW(IUH9gW[0x5b7])+IUH9gW[0x44]]);return{[u7abyW(IUH9gW[0x5f6])+IUH9gW[0x2a]]:IUH9gW[0x192],[u7abyW(IUH9gW[0x519])]:u7abyW(IUH9gW[0x61c])}}}async[u7abyW(IUH9gW[0x61d])](){try{let{[u7abyW(IUH9gW[0x24f])]:izD_V32}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x61e]),[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x4b3])]:this[IUH9gW[0x42a]]}});return izD_V32[u7abyW(IUH9gW[0x285])]==IUH9gW[0x3]?izD_V32[u7abyW(IUH9gW[0x24f])]:(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x61f])+u7abyW(IUH9gW[0x620]))+izD_V32[u7abyW(IUH9gW[0x621])+IUH9gW[0x848]]),IUH9gW[0x5])}catch(ezk0Yu){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x622])+ezk0Yu[u7abyW(IUH9gW[0x5b7])+IUH9gW[0x44]]);return IUH9gW[0x5]}}[u7abyW(IUH9gW[0x623])+u7abyW(IUH9gW[0x624])+IUH9gW[0x625]](){const izD_V32=this[u7abyW(IUH9gW[0x506])+u7abyW(IUH9gW[0x507])];let ezk0Yu=u7abyW(IUH9gW[0x626])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x627]);jk9aAk8(ezk0Yu+=IUH9gW[0x63e][u7abyW(IUH9gW[0x628])](IUH9gW[0x1ce])+IUH9gW[0x31a],ezk0Yu+=u7abyW(IUH9gW[0x629])+this[u7abyW(IUH9gW[0x62a])+u7abyW(IUH9gW[0x62b])][u7abyW(IUH9gW[0x5d6])]+u7abyW(IUH9gW[0x62c]));if(this[u7abyW(IUH9gW[0x53c])+u7abyW(IUH9gW[0x53d])]>IUH9gW[0x1]){ezk0Yu+=u7abyW(IUH9gW[0x62d])+u7abyW(IUH9gW[0x62e])+this[u7abyW(IUH9gW[0x3ee])]+u7abyW(IUH9gW[0x62f]);const RWe5Wz=this[u7abyW(IUH9gW[0x53c])+u7abyW(IUH9gW[0x53d])]-this[u7abyW(IUH9gW[0x5d5])][u7abyW(IUH9gW[0x5d6])];jk9aAk8(RWe5Wz>IUH9gW[0x1]?ezk0Yu+=u7abyW(IUH9gW[0x630])+u7abyW(IUH9gW[0x631])+RWe5Wz+u7abyW(IUH9gW[0x62f]):ezk0Yu+=u7abyW(IUH9gW[0x632])+u7abyW(IUH9gW[0x633]),ezk0Yu+=IUH9gW[0x31a])}jk9aAk8(ezk0Yu+=u7abyW(IUH9gW[0x634])+u7abyW(IUH9gW[0x635]),aDf6Q9(u7abyW(IUH9gW[0xb8]))[u7abyW(IUH9gW[0x454])](this[u7abyW(IUH9gW[0x62a])+u7abyW(IUH9gW[0x62b])][u7abyW(IUH9gW[0x5d7])])[u7abyW(IUH9gW[0x42d])+IUH9gW[0x28]](RWe5Wz=>{if(this[u7abyW(IUH9gW[0x62a])+u7abyW(IUH9gW[0x62b])][u7abyW(IUH9gW[0x5d7])][RWe5Wz]>IUH9gW[0x1]){ezk0Yu+=IUH9gW[0x6e7]+izD_V32[RWe5Wz][u7abyW(IUH9gW[0x524])]+IUH9gW[0x185]+izD_V32[RWe5Wz][u7abyW(IUH9gW[0x508])]+IUH9gW[0x897]+this[u7abyW(IUH9gW[0x62a])+u7abyW(IUH9gW[0x62b])][u7abyW(IUH9gW[0x5d7])][RWe5Wz]+u7abyW(IUH9gW[0x62f])}}));if(this[u7abyW(IUH9gW[0x51a])+u7abyW(IUH9gW[0x51b])+u7abyW(IUH9gW[0x51c])]){ezk0Yu+=u7abyW(IUH9gW[0x636])+this[u7abyW(IUH9gW[0x637])]+IUH9gW[0x31a]}if(this[u7abyW(IUH9gW[0x4fc])+u7abyW(IUH9gW[0x4fd])]&&this[u7abyW(IUH9gW[0x512])]){ezk0Yu+=u7abyW(IUH9gW[0x638])+u7abyW(IUH9gW[0x639])+this[u7abyW(IUH9gW[0x512])]+IUH9gW[0x31a]}const qIOqfr8=(this[u7abyW(IUH9gW[0x62a])+u7abyW(IUH9gW[0x62b])][u7abyW(IUH9gW[0x5d6])]/IUH9gW[0x65a])[u7abyW(IUH9gW[0x63a])+IUH9gW[0x1c]](IUH9gW[0x7]);jk9aAk8(ezk0Yu+=u7abyW(IUH9gW[0x63b])+u7abyW(IUH9gW[0x63c])+\"\u7EA6\\x20\"+qIOqfr8+u7abyW(IUH9gW[0x63d]),ezk0Yu+=IUH9gW[0x63e][u7abyW(IUH9gW[0x628])](IUH9gW[0x1ce]));return ezk0Yu}async[u7abyW(IUH9gW[0x63f])+u7abyW(IUH9gW[0x640])](){let izD_V32={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x549])+u7abyW(IUH9gW[0x54a])+u7abyW(IUH9gW[0x54b])+u7abyW(IUH9gW[0x641])+u7abyW(IUH9gW[0x642])+u7abyW(IUH9gW[0x643]),[u7abyW(IUH9gW[0x54e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x644]),[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x645])+u7abyW(IUH9gW[0x646])+u7abyW(IUH9gW[0x647])+u7abyW(IUH9gW[0x648])+u7abyW(IUH9gW[0x649])+u7abyW(IUH9gW[0x64a]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]}},{[u7abyW(IUH9gW[0x24f])]:ezk0Yu}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](izD_V32);return ezk0Yu?.data?(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x64b])+ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x64c])+\"\\u0074\\u0061\"][u7abyW(IUH9gW[0x64d])]+(u7abyW(IUH9gW[0x64e])+u7abyW(IUH9gW[0x64f])+IUH9gW[0x7fc])),this[u7abyW(IUH9gW[0x650])+IUH9gW[0x651]]=ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x652])][u7abyW(IUH9gW[0x64d])],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x5da])+this[u7abyW(IUH9gW[0x401])]+u7abyW(IUH9gW[0x653])+ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x654])+u7abyW(IUH9gW[0x655])]+u7abyW(IUH9gW[0x656])+ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x654])+u7abyW(IUH9gW[0x657])]+\"\u3011\"),this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x658])+u7abyW(IUH9gW[0x659])]=aDf6Q9(u7abyW(IUH9gW[0x19e]))(ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x654])+u7abyW(IUH9gW[0x655])])*IUH9gW[0x65a]+aDf6Q9(u7abyW(IUH9gW[0x19e]))(ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x65b])])||IUH9gW[0x1],IUH9gW[0x192]):(this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x658])+u7abyW(IUH9gW[0x659])]=IUH9gW[0x1],IUH9gW[0x191])}async[u7abyW(IUH9gW[0x65c])+u7abyW(IUH9gW[0x65d])+IUH9gW[0x5eb]](){let izD_V32={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x65e])+u7abyW(IUH9gW[0x65f])+u7abyW(IUH9gW[0x660]),[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x23c])]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:\"\",[u7abyW(IUH9gW[0x575])]:\"\",[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]}},{[u7abyW(IUH9gW[0x24f])]:ezk0Yu}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](izD_V32);ezk0Yu?.result==IUH9gW[0x3]?ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x661])+u7abyW(IUH9gW[0x662])]==IUH9gW[0x1]&&ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x663])]==IUH9gW[0x1]?0x0:(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x664])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x665])+u7abyW(IUH9gW[0x666]))+ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x661])+u7abyW(IUH9gW[0x667])][u7abyW(IUH9gW[0x661])+u7abyW(IUH9gW[0x668])]+IUH9gW[0x47d]),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x664])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x669])+u7abyW(IUH9gW[0x66a]))+ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x661])+u7abyW(IUH9gW[0x667])][u7abyW(IUH9gW[0x5a4])+u7abyW(IUH9gW[0x66b])]+IUH9gW[0x560]+ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x661])+u7abyW(IUH9gW[0x667])][u7abyW(IUH9gW[0x66c])+u7abyW(IUH9gW[0x66d])+IUH9gW[0x21b]]),this[u7abyW(IUH9gW[0x66e])+u7abyW(IUH9gW[0x66f])+u7abyW(IUH9gW[0x670])]=ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x671])][u7abyW(IUH9gW[0x65c])+u7abyW(IUH9gW[0x672])+u7abyW(IUH9gW[0x673])+IUH9gW[0xf5]],this[u7abyW(IUH9gW[0x674])+u7abyW(IUH9gW[0x675])+u7abyW(IUH9gW[0x676])+IUH9gW[0x699]]=ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x671])][u7abyW(IUH9gW[0x677])],this[u7abyW(IUH9gW[0x678])+u7abyW(IUH9gW[0x679])]=ezk0Yu[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x671])][u7abyW(IUH9gW[0x67a])+IUH9gW[0x67b]],await this[u7abyW(IUH9gW[0x65c])+u7abyW(IUH9gW[0x67c])+u7abyW(IUH9gW[0x67d])+IUH9gW[0x25b]]()):0x0}async[u7abyW(IUH9gW[0x65c])+u7abyW(IUH9gW[0x67e])+u7abyW(IUH9gW[0x67f])+u7abyW(IUH9gW[0x680])](){let izD_V32={[u7abyW(IUH9gW[0x661])+u7abyW(IUH9gW[0x662])]:IUH9gW[0x4b2],[u7abyW(IUH9gW[0x681])+u7abyW(IUH9gW[0x682])]:IUH9gW[0x683],[u7abyW(IUH9gW[0x684])]:\"\",[u7abyW(IUH9gW[0x685])]:u7abyW(IUH9gW[0x671]),[u7abyW(IUH9gW[0x686])+u7abyW(IUH9gW[0x687])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x688])]:\"\",[u7abyW(IUH9gW[0x447])]:this[u7abyW(IUH9gW[0x447])]},ezk0Yu=await this[u7abyW(IUH9gW[0x312])+IUH9gW[0x689]](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])]({}))[u7abyW(IUH9gW[0x27f])](u7abyW(IUH9gW[0x27e])),aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](izD_V32))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),u7abyW(IUH9gW[0x4a5]),u7abyW(IUH9gW[0x55d]),this[IUH9gW[0x42a]]),RWe5Wz={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x68a])+u7abyW(IUH9gW[0x68b])+u7abyW(IUH9gW[0x68c])+u7abyW(IUH9gW[0x68d])+ezk0Yu,[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x55b])+u7abyW(IUH9gW[0x55c])+u7abyW(IUH9gW[0x55d]),[u7abyW(IUH9gW[0x4b2])]:u7abyW(IUH9gW[0x68e])+u7abyW(IUH9gW[0x68f])+u7abyW(IUH9gW[0x690]),[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x691])+u7abyW(IUH9gW[0x692])+u7abyW(IUH9gW[0x693])+u7abyW(IUH9gW[0x694]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:izD_V32},{[u7abyW(IUH9gW[0x24f])]:qIOqfr8}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](RWe5Wz)}async[u7abyW(IUH9gW[0x65c])+u7abyW(IUH9gW[0x67c])+u7abyW(IUH9gW[0x67d])+IUH9gW[0x25b]](){let izD_V32={[u7abyW(IUH9gW[0x695])]:this[u7abyW(IUH9gW[0x678])+u7abyW(IUH9gW[0x679])],[u7abyW(IUH9gW[0x688])]:\"\",[u7abyW(IUH9gW[0x447])]:this[u7abyW(IUH9gW[0x447])],[u7abyW(IUH9gW[0x66e])+u7abyW(IUH9gW[0x66f])+u7abyW(IUH9gW[0x696])]:this[u7abyW(IUH9gW[0x66e])+u7abyW(IUH9gW[0x66f])+u7abyW(IUH9gW[0x670])],[u7abyW(IUH9gW[0x697])+u7abyW(IUH9gW[0x698])+u7abyW(IUH9gW[0x696])]:this[u7abyW(IUH9gW[0x674])+u7abyW(IUH9gW[0x675])+u7abyW(IUH9gW[0x676])+IUH9gW[0x699]],[u7abyW(IUH9gW[0x69a])+u7abyW(IUH9gW[0x69b])+u7abyW(IUH9gW[0x69c])]:u7abyW(IUH9gW[0x69d])+u7abyW(IUH9gW[0x69e])+u7abyW(IUH9gW[0x69f])+u7abyW(IUH9gW[0x6a0])+u7abyW(IUH9gW[0x6a1])},ezk0Yu=await this[u7abyW(IUH9gW[0x6a2])](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](izD_V32))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e]))),RWe5Wz={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x6a3])+u7abyW(IUH9gW[0x6a4])+u7abyW(IUH9gW[0x6a5])+u7abyW(IUH9gW[0x6a6])+u7abyW(IUH9gW[0x6a7])+u7abyW(IUH9gW[0x6a8])+ezk0Yu,[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x5b1]),[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x6a9])+u7abyW(IUH9gW[0x6aa])+u7abyW(IUH9gW[0x6ab])+u7abyW(IUH9gW[0x6ac])+u7abyW(IUH9gW[0x6ad])+u7abyW(IUH9gW[0x6ae])+\"\\u002f\\u0031\",[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x6af]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:izD_V32},{[u7abyW(IUH9gW[0x24f])]:qIOqfr8}=await o1FeYT[u7abyW(IUH9gW[0x6b0])](RWe5Wz);if(qIOqfr8?.result==IUH9gW[0x3]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x664])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x665])+u7abyW(IUH9gW[0x6b1])+u7abyW(IUH9gW[0x6b2])+u7abyW(IUH9gW[0x6b3])+\"\u6210\"));let szoaZL=qIOqfr8[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x6b4])];for(let onPFgpD of szoaZL)onPFgpD[u7abyW(IUH9gW[0x6b5])]==0x74ff&&onPFgpD[u7abyW(IUH9gW[0x5fb])+u7abyW(IUH9gW[0x6b6])]!=u7abyW(IUH9gW[0x6b7])+u7abyW(IUH9gW[0x6b8])+\"\\u0045\\u0044\"?await this[u7abyW(IUH9gW[0x6b9])+u7abyW(IUH9gW[0x6ba])+u7abyW(IUH9gW[0x6bb])](onPFgpD[u7abyW(IUH9gW[0x6bc])+IUH9gW[0x67b]],onPFgpD[u7abyW(IUH9gW[0x6b5])]):i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x664])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x6bd]))}else{}}async[u7abyW(IUH9gW[0x6be])](izD_V32,ezk0Yu){let RWe5Wz={[u7abyW(IUH9gW[0x6bf])+u7abyW(IUH9gW[0x6c0])]:IUH9gW[0x3],[u7abyW(IUH9gW[0x6bc])+IUH9gW[0x67b]]:izD_V32,[u7abyW(IUH9gW[0x6b5])]:ezk0Yu},qIOqfr8=await this[u7abyW(IUH9gW[0x6a2])](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](RWe5Wz))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e]))),szoaZL={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x6c1])+u7abyW(IUH9gW[0x6c2])+u7abyW(IUH9gW[0x6c3])+u7abyW(IUH9gW[0x6c4])+u7abyW(IUH9gW[0x6c5])+u7abyW(IUH9gW[0x6c6])+u7abyW(IUH9gW[0x6c7])+IUH9gW[0x20e]+qIOqfr8,[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x55b])+u7abyW(IUH9gW[0x55c])+u7abyW(IUH9gW[0x55d]),[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x6c8])+u7abyW(IUH9gW[0x6c9])+u7abyW(IUH9gW[0x6ca]),[u7abyW(IUH9gW[0x575])]:u7abyW(IUH9gW[0x6cb])+u7abyW(IUH9gW[0x6cc])+u7abyW(IUH9gW[0x6cd])+u7abyW(IUH9gW[0x6ce]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:RWe5Wz},{[u7abyW(IUH9gW[0x24f])]:onPFgpD}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](szoaZL);onPFgpD?.result==IUH9gW[0x3]&&onPFgpD[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x5fe])+u7abyW(IUH9gW[0x5ff])+IUH9gW[0x1c]]==IUH9gW[0x192]?i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x664])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x6cf])+IUH9gW[0x88f])):0x0}[u7abyW(IUH9gW[0x6d0])+u7abyW(IUH9gW[0x6d1])](...izD_V32){var ezk0Yu={};return dLtwzx(izD_V32,ezk0Yu)}[u7abyW(IUH9gW[0x6d2])](...izD_V32){var ezk0Yu={};return fw17eO(izD_V32,ezk0Yu)}async[u7abyW(IUH9gW[0x5a4])](){let izD_V32=await this[u7abyW(IUH9gW[0x312])+IUH9gW[0x689]](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x6d3])]({}))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])]({}))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),u7abyW(IUH9gW[0x4c7]),u7abyW(IUH9gW[0x55d]),this[IUH9gW[0x42a]]);if(!izD_V32){return i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x6d4])+IUH9gW[0x873])}let ezk0Yu={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x6d5])+u7abyW(IUH9gW[0x6d6])+u7abyW(IUH9gW[0x6d7])+u7abyW(IUH9gW[0x6d8])+u7abyW(IUH9gW[0x6d9])+u7abyW(IUH9gW[0x6da])+izD_V32,[u7abyW(IUH9gW[0x54e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a3])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x4ac])+u7abyW(IUH9gW[0x4ad])]:u7abyW(IUH9gW[0x5b1]),[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x644]),[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x6db])+u7abyW(IUH9gW[0x6dc])+u7abyW(IUH9gW[0x6dd]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]}};try{let{[u7abyW(IUH9gW[0x24f])]:RWe5Wz}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](ezk0Yu);if(RWe5Wz?.data){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x5de])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x6de])+u7abyW(IUH9gW[0x6df]))+RWe5Wz[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x6bf])+u7abyW(IUH9gW[0x6e0])+u7abyW(IUH9gW[0x6e1])][u7abyW(IUH9gW[0x6e2])][u7abyW(IUH9gW[0x6e3])+u7abyW(IUH9gW[0x6e4])][IUH9gW[0x1]][u7abyW(IUH9gW[0x6e5])]+IUH9gW[0x717]);try{}catch(qIOqfr8){}}else{RWe5Wz[u7abyW(IUH9gW[0x285])]==IUH9gW[0x2f8]?i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x6e6])+IUH9gW[0x6e7])+RWe5Wz[u7abyW(IUH9gW[0x6e8])]+(u7abyW(IUH9gW[0x6e9])+u7abyW(IUH9gW[0x6ea])+u7abyW(IUH9gW[0x6eb])+u7abyW(IUH9gW[0x6ec])+u7abyW(IUH9gW[0x6ed])+u7abyW(IUH9gW[0x40f])+IUH9gW[0x44])):i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x6ee])+RWe5Wz[u7abyW(IUH9gW[0x6ef])+u7abyW(IUH9gW[0x6f0])])}}catch(szoaZL){}}async[u7abyW(IUH9gW[0x593])+u7abyW(IUH9gW[0x6f1])](){let izD_V32=await this[u7abyW(IUH9gW[0x312])+IUH9gW[0x689]](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])]({}))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])]({}))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),u7abyW(IUH9gW[0x4c7]),u7abyW(IUH9gW[0x55d]),this[IUH9gW[0x42a]]);if(!izD_V32){return i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x6f2]))}let ezk0Yu={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x6f3])+izD_V32,[u7abyW(IUH9gW[0x54e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x6f4])+u7abyW(IUH9gW[0x6f5])+u7abyW(IUH9gW[0x6f6])+u7abyW(IUH9gW[0x6f7])+u7abyW(IUH9gW[0x6f8])+IUH9gW[0x1c9],[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x6f9])+u7abyW(IUH9gW[0x6fa])+u7abyW(IUH9gW[0x6fb])+u7abyW(IUH9gW[0x6fc])+u7abyW(IUH9gW[0x6fd])+u7abyW(IUH9gW[0x6fe])+u7abyW(IUH9gW[0x6ff]),[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x700]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]}},{[u7abyW(IUH9gW[0x24f])]:RWe5Wz}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](ezk0Yu);if(RWe5Wz?.data){if(RWe5Wz[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x701])]==IUH9gW[0x4]){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x702])+u7abyW(IUH9gW[0x703]))),await this[u7abyW(IUH9gW[0x521])+u7abyW(IUH9gW[0x522])+u7abyW(IUH9gW[0x523])](u7abyW(IUH9gW[0x593])+IUH9gW[0x331]),await this[u7abyW(IUH9gW[0x593])+IUH9gW[0x331]]())}if(RWe5Wz[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x701])]==IUH9gW[0x7]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x702])+u7abyW(IUH9gW[0x704])+\"\u95F4\"))}if(RWe5Wz[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x701])]==IUH9gW[0xc]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x702])+u7abyW(IUH9gW[0x705])+u7abyW(IUH9gW[0x706])))}}}async[u7abyW(IUH9gW[0x593])+IUH9gW[0x331]](){let izD_V32={},ezk0Yu=await this[u7abyW(IUH9gW[0x312])+IUH9gW[0x689]](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x6d3])]({}))[u7abyW(IUH9gW[0x281])+IUH9gW[0x116]](u7abyW(IUH9gW[0x27e])),aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](izD_V32))[u7abyW(IUH9gW[0x27f])](u7abyW(IUH9gW[0x27e])),u7abyW(IUH9gW[0x707]),u7abyW(IUH9gW[0x55d]),this[IUH9gW[0x42a]]);if(!ezk0Yu){return i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x708]))}let RWe5Wz={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:u7abyW(IUH9gW[0x709])+u7abyW(IUH9gW[0x70a])+u7abyW(IUH9gW[0x70b])+u7abyW(IUH9gW[0x70c])+u7abyW(IUH9gW[0x70d])+ezk0Yu,[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x55b])+u7abyW(IUH9gW[0x55c])+u7abyW(IUH9gW[0x55d]),[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x70e])+u7abyW(IUH9gW[0x70f])+u7abyW(IUH9gW[0x710])+u7abyW(IUH9gW[0x711]),[u7abyW(IUH9gW[0x712])]:u7abyW(IUH9gW[0x713]),[u7abyW(IUH9gW[0x55e])+IUH9gW[0x26a]]:u7abyW(IUH9gW[0x700]),[u7abyW(IUH9gW[0x4b3])]:\"\"+this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:izD_V32};try{let{[u7abyW(IUH9gW[0x24f])]:qIOqfr8}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](RWe5Wz);qIOqfr8?.data?i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x5de])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x702])+u7abyW(IUH9gW[0x714])+\"\u83B7\u5F97\")+qIOqfr8[u7abyW(IUH9gW[0x24f])][u7abyW(IUH9gW[0x715])][u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x6c0])]+IUH9gW[0x717]):qIOqfr8[u7abyW(IUH9gW[0x285])]==IUH9gW[0x2f8]?i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(IUH9gW[0x718])+u7abyW(IUH9gW[0x719]))+qIOqfr8[u7abyW(IUH9gW[0x6ef])+u7abyW(IUH9gW[0x6f0])]+(u7abyW(IUH9gW[0x71a])+u7abyW(IUH9gW[0x71b])+u7abyW(IUH9gW[0x71c])+IUH9gW[0x44])):i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+u7abyW(IUH9gW[0x71d])+qIOqfr8[u7abyW(IUH9gW[0x6e8])])}catch(szoaZL){}}async[u7abyW(IUH9gW[0x71e])](izD_V32){try{let ezk0Yu=u7abyW(IUH9gW[0x709])+u7abyW(IUH9gW[0x70a])+u7abyW(IUH9gW[0x71f])+u7abyW(IUH9gW[0x720])+u7abyW(IUH9gW[0x721]);if(izD_V32[u7abyW(IUH9gW[0x722])+u7abyW(IUH9gW[0x723])]==u7abyW(IUH9gW[0x724])+u7abyW(IUH9gW[0x725])){ezk0Yu=u7abyW(IUH9gW[0x726])}let RWe5Wz=await this[u7abyW(IUH9gW[0x312])+IUH9gW[0x727]](aDf6Q9(u7abyW(IUH9gW[0x27c]))[u7abyW(IUH9gW[0x27d])](aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](izD_V32))[u7abyW(IUH9gW[0x27f])](u7abyW(IUH9gW[0x27e]))),qIOqfr8={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:ezk0Yu+RWe5Wz,[u7abyW(IUH9gW[0x23c])]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x56c])+u7abyW(IUH9gW[0x56d])+u7abyW(IUH9gW[0x56e])+IUH9gW[0x185]+this[u7abyW(IUH9gW[0x44d])+u7abyW(IUH9gW[0x44e])]+IUH9gW[0x551]+this[u7abyW(IUH9gW[0x3fb])+u7abyW(IUH9gW[0x3fc])+u7abyW(IUH9gW[0x317])]()+(u7abyW(IUH9gW[0x5ad])+u7abyW(IUH9gW[0x5ae])+u7abyW(IUH9gW[0x5af])),[u7abyW(IUH9gW[0x4ac])+u7abyW(IUH9gW[0x4ad])]:u7abyW(IUH9gW[0x55b])+u7abyW(IUH9gW[0x55c])+u7abyW(IUH9gW[0x55d]),[u7abyW(IUH9gW[0x4b3])]:this[IUH9gW[0x42a]]},[u7abyW(IUH9gW[0x24f])]:izD_V32},{[u7abyW(IUH9gW[0x24f])]:szoaZL}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](qIOqfr8)}catch(onPFgpD){}}async[u7abyW(IUH9gW[0x4e4])+u7abyW(IUH9gW[0x4e6])](izD_V32){try{let ezk0Yu=u7abyW(IUH9gW[0x728])+u7abyW(IUH9gW[0x729])+u7abyW(IUH9gW[0x72a])+u7abyW(IUH9gW[0x72b])+u7abyW(IUH9gW[0x72c])+IUH9gW[0x1c],RWe5Wz={[IUH9gW[0x72d]]:u7abyW(IUH9gW[0x300]),[u7abyW(IUH9gW[0x72e])]:u7abyW(IUH9gW[0x72f]),[u7abyW(IUH9gW[0x492])+u7abyW(IUH9gW[0x493])+u7abyW(IUH9gW[0x494])]:\"\",[IUH9gW[0x730]]:u7abyW(IUH9gW[0x409])+IUH9gW[0x1c],[u7abyW(IUH9gW[0x731])]:this[u7abyW(IUH9gW[0x445])],[u7abyW(IUH9gW[0x496])]:this[u7abyW(IUH9gW[0x496])]};aDf6Q9(u7abyW(IUH9gW[0xb8]))[u7abyW(IUH9gW[0x732])](izD_V32,RWe5Wz);let qIOqfr8=await this[u7abyW(IUH9gW[0x733])+u7abyW(IUH9gW[0x734])+IUH9gW[0x21b]](u7abyW(IUH9gW[0x735])+u7abyW(IUH9gW[0x736])+u7abyW(IUH9gW[0x737])+IUH9gW[0x1c],izD_V32,this[u7abyW(IUH9gW[0x459])]);if(!qIOqfr8){return}let szoaZL={[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23a])]:ezk0Yu,[u7abyW(IUH9gW[0x49e])]:qIOqfr8[u7abyW(IUH9gW[0x738])+u7abyW(IUH9gW[0x739])],[u7abyW(IUH9gW[0x23c])]:{[u7abyW(IUH9gW[0x4a8])]:qIOqfr8[u7abyW(IUH9gW[0x4a7])+u7abyW(IUH9gW[0x4a9])][u7abyW(IUH9gW[0x4a8])],[u7abyW(IUH9gW[0x4aa])]:qIOqfr8[u7abyW(IUH9gW[0x4a7])+u7abyW(IUH9gW[0x4a9])][u7abyW(IUH9gW[0x4aa])],[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:u7abyW(IUH9gW[0x73a])+u7abyW(IUH9gW[0x73b])+u7abyW(IUH9gW[0x73c])+u7abyW(IUH9gW[0x73d])+IUH9gW[0x2af],[u7abyW(IUH9gW[0x5b0])]:u7abyW(IUH9gW[0x73e])+u7abyW(IUH9gW[0x73f])+u7abyW(IUH9gW[0x740]),[u7abyW(IUH9gW[0x4b3])]:u7abyW(IUH9gW[0x419])+u7abyW(IUH9gW[0x41a])+u7abyW(IUH9gW[0x741])+this[u7abyW(IUH9gW[0x445])]},[u7abyW(IUH9gW[0x24f])]:izD_V32},{[u7abyW(IUH9gW[0x24f])]:onPFgpD}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]](szoaZL)}catch(J7aaZbe){}}async[u7abyW(IUH9gW[0x312])+IUH9gW[0x727]](...izD_V32){var ezk0Yu={[u7abyW(IUH9gW[0x287])](...izD_V32){return sU_R8c(...izD_V32)}};return GxQdcq4(izD_V32,ezk0Yu)}async[u7abyW(IUH9gW[0x312])+IUH9gW[0x689]](...izD_V32){var ezk0Yu={[u7abyW(IUH9gW[0x742])+IUH9gW[0x743]](...izD_V32){return nviqsc(...izD_V32)}};return zQlIl8G(izD_V32,ezk0Yu)}async[u7abyW(IUH9gW[0x312])+u7abyW(IUH9gW[0x744])](...izD_V32){var ezk0Yu={[u7abyW(IUH9gW[0x27a])](...izD_V32){return azI3FD(...izD_V32)}};return K3AT3ta(izD_V32,ezk0Yu)}async[u7abyW(IUH9gW[0x733])+u7abyW(IUH9gW[0x734])+IUH9gW[0x21b]](izD_V32,ezk0Yu,RWe5Wz){const qIOqfr8=IUH9gW[0x4];let szoaZL=IUH9gW[0x1];while(szoaZLIUH9gW[0x891]?IUH9gW[0x4]:IUH9gW[0x9],RWe5Wz=aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x53f])](aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x3fb])]()*IUH9gW[0x874])+IUH9gW[0x27],qIOqfr8={[u7abyW(IUH9gW[0x868])+IUH9gW[0x42a]]:izD_V32,[u7abyW(IUH9gW[0x875])+u7abyW(IUH9gW[0x7c0])]:ezk0Yu,[u7abyW(IUH9gW[0x875])+u7abyW(0x82f)]:aDf6Q9(u7abyW(IUH9gW[0x1a6]))[u7abyW(IUH9gW[0x5b9])]()};if(ezk0Yu==IUH9gW[0x4]){aDf6Q9(u7abyW(IUH9gW[0xb8]))[u7abyW(IUH9gW[0x732])](qIOqfr8,{[u7abyW(0x830)+u7abyW(0x831)+u7abyW(IUH9gW[0x7bd])]:RWe5Wz})}let{[u7abyW(IUH9gW[0x24f])]:szoaZL}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:u7abyW(0x832),[u7abyW(IUH9gW[0x49e])]:qIOqfr8,[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4a6])+IUH9gW[0x25b]]:LrptE9(u7abyW(IUH9gW[0x4c2]),IUH9gW[0x109],IUH9gW[0x180]),[u7abyW(IUH9gW[0x23c])]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:b4GwMp},[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7])})}async[u7abyW(IUH9gW[0x5c9])+IUH9gW[0x876]](izD_V32){try{if(!izD_V32){return}let{[u7abyW(IUH9gW[0x24f])]:ezk0Yu}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:izD_V32,[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4df])]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180]),[u7abyW(IUH9gW[0x4a7])+IUH9gW[0x21b]]:{[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:b4GwMp},[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4c7])})}catch(RWe5Wz){}}async[u7abyW(IUH9gW[0x5ce])](izD_V32,ezk0Yu,RWe5Wz,qIOqfr8,szoaZL,onPFgpD,J7aaZbe,rWJvcF){if(!this[u7abyW(IUH9gW[0x86f])]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+(u7abyW(0x833)+u7abyW(0x834)));return IUH9gW[0x1]}if(!this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])]){this[u7abyW(IUH9gW[0x88d])]={}}const mOfCEy=this[u7abyW(IUH9gW[0x86f])][u7abyW(IUH9gW[0x7c0])];if(!this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]){this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]=IUH9gW[0x1]}let EzW9ZM=IUH9gW[0x3],Khi9t8=IUH9gW[0x3];if(this[u7abyW(IUH9gW[0x532])+u7abyW(IUH9gW[0x533])+IUH9gW[0x33a]]&&this[u7abyW(IUH9gW[0x538])+IUH9gW[0x539]]!=IUH9gW[0x1]){jk9aAk8(EzW9ZM=IUH9gW[0x7],Khi9t8=IUH9gW[0x13])}if(this[u7abyW(IUH9gW[0x86f])][u7abyW(IUH9gW[0x508])]==u7abyW(IUH9gW[0x4fb])){RWe5Wz=\"\"}let aC0THb=[],ix6yOs=u7abyW(IUH9gW[0x879]);rWJvcF!=\"\"?(ix6yOs=u7abyW(IUH9gW[0x87a]),aC0THb=[{[u7abyW(IUH9gW[0x86c])+u7abyW(IUH9gW[0x86d])]:izD_V32,[u7abyW(0x838)]:rWJvcF,[u7abyW(IUH9gW[0x5c1])]:ezk0Yu,[u7abyW(IUH9gW[0x5cf])]:RWe5Wz,[u7abyW(IUH9gW[0x5d0])+u7abyW(IUH9gW[0x5d1])]:IUH9gW[0x1],[u7abyW(IUH9gW[0x5ca])+u7abyW(IUH9gW[0x5cb])]:J7aaZbe,[u7abyW(IUH9gW[0x499])+u7abyW(IUH9gW[0x7f3])+u7abyW(IUH9gW[0x40e])]:Khi9t8,[u7abyW(0x839)]:EzW9ZM,[u7abyW(IUH9gW[0x888])+u7abyW(IUH9gW[0x889])]:\"\",[u7abyW(IUH9gW[0x87c])+u7abyW(IUH9gW[0x87d])]:IUH9gW[0x1]}]):aC0THb=[{[u7abyW(IUH9gW[0x48f])+u7abyW(IUH9gW[0x87e])+IUH9gW[0x7d1]]:u7abyW(IUH9gW[0x87f])+u7abyW(IUH9gW[0x880])+u7abyW(IUH9gW[0x881])+u7abyW(IUH9gW[0x882])+IUH9gW[0x883],[u7abyW(IUH9gW[0x86c])+u7abyW(IUH9gW[0x86d])]:izD_V32,[u7abyW(IUH9gW[0x884])+IUH9gW[0x7d1]]:\"\",[u7abyW(IUH9gW[0x5c1])]:ezk0Yu,[u7abyW(IUH9gW[0x86e])+u7abyW(IUH9gW[0x6e4])]:RWe5Wz,[u7abyW(IUH9gW[0x87b])]:onPFgpD,[u7abyW(IUH9gW[0x5ca])+u7abyW(IUH9gW[0x5cb])]:J7aaZbe,[u7abyW(IUH9gW[0x885])]:Khi9t8,[u7abyW(IUH9gW[0x886])+IUH9gW[0x887]]:EzW9ZM,[u7abyW(0x846)]:\"\",[u7abyW(IUH9gW[0x87c])+u7abyW(IUH9gW[0x87d])]:IUH9gW[0x1]}];const RH8KLq=this[u7abyW(IUH9gW[0x309])+u7abyW(IUH9gW[0x30a])]==u7abyW(IUH9gW[0x19b]);if(this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x860])+u7abyW(IUH9gW[0x861])]&&RH8KLq){aC0THb[u7abyW(IUH9gW[0x89f])]({[u7abyW(IUH9gW[0x48f])+u7abyW(IUH9gW[0x87e])+IUH9gW[0x7d1]]:u7abyW(IUH9gW[0x87f])+u7abyW(IUH9gW[0x880])+u7abyW(IUH9gW[0x881])+u7abyW(IUH9gW[0x882])+IUH9gW[0x883],[u7abyW(IUH9gW[0x86c])+u7abyW(IUH9gW[0x86d])]:izD_V32,[u7abyW(IUH9gW[0x884])+IUH9gW[0x7d1]]:\"\",[u7abyW(IUH9gW[0x5c1])]:ezk0Yu,[u7abyW(IUH9gW[0x86e])+u7abyW(IUH9gW[0x6e4])]:RWe5Wz,[u7abyW(IUH9gW[0x5d0])+u7abyW(IUH9gW[0x5d1])]:onPFgpD,[u7abyW(0x848)]:J7aaZbe,[u7abyW(IUH9gW[0x885])]:Khi9t8,[u7abyW(IUH9gW[0x886])+IUH9gW[0x887]]:IUH9gW[0x4],[u7abyW(IUH9gW[0x888])+u7abyW(IUH9gW[0x889])]:\"\",[u7abyW(IUH9gW[0x87c])+u7abyW(IUH9gW[0x87d])]:IUH9gW[0x1]})}const cIULrn=aDf6Q9(u7abyW(IUH9gW[0x1a6]))[u7abyW(IUH9gW[0x5b9])](),jZhnmm={[u7abyW(IUH9gW[0x88a])]:aDf6Q9(u7abyW(IUH9gW[0x5a8]))[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])]({[u7abyW(IUH9gW[0x7cb])+u7abyW(IUH9gW[0x88b])]:this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(0x849)],[u7abyW(0x84a)+IUH9gW[0x44]]:cIULrn,[u7abyW(IUH9gW[0x59e])+u7abyW(IUH9gW[0x59f])]:this[u7abyW(IUH9gW[0x5ef])]||u7abyW(0x84b)+u7abyW(0x84c)+u7abyW(0x84d)+u7abyW(0x84e)+u7abyW(0x84f)+u7abyW(0x850),[u7abyW(0x851)]:ix6yOs,[u7abyW(0x852)+IUH9gW[0x730]]:aC0THb,[u7abyW(IUH9gW[0x7ef])]:this[u7abyW(IUH9gW[0x86f])][u7abyW(IUH9gW[0x7ef])],[u7abyW(IUH9gW[0x870])]:this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x870])],[u7abyW(IUH9gW[0x6bf])+u7abyW(IUH9gW[0x40e])]:IUH9gW[0x1],[u7abyW(IUH9gW[0x7b9])+u7abyW(0x853)]:u7abyW(0x854)+this[u7abyW(IUH9gW[0x401])]+IUH9gW[0x7fc]+this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x7f0])]+IUH9gW[0x7fc]+aDf6Q9(u7abyW(IUH9gW[0x1a6]))[u7abyW(IUH9gW[0x5b9])](),[u7abyW(0x855)]:qIOqfr8,[u7abyW(IUH9gW[0x7f1])+u7abyW(IUH9gW[0x7f2])]:this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x7f0])]}),[IUH9gW[0x72d]]:u7abyW(IUH9gW[0x300]),[u7abyW(IUH9gW[0x48f])+u7abyW(IUH9gW[0x490])]:u7abyW(IUH9gW[0x72f]),[u7abyW(IUH9gW[0x492])+u7abyW(IUH9gW[0x493])+u7abyW(IUH9gW[0x494])]:u7abyW(0x856),[IUH9gW[0x730]]:u7abyW(IUH9gW[0x409])+IUH9gW[0x1c],[u7abyW(IUH9gW[0x419])+u7abyW(IUH9gW[0x41a])+u7abyW(IUH9gW[0x41b])]:this[u7abyW(IUH9gW[0x445])],[u7abyW(IUH9gW[0x496])]:this[u7abyW(IUH9gW[0x496])],[u7abyW(IUH9gW[0x57a])]:this[u7abyW(IUH9gW[0x445])]};if(this[u7abyW(IUH9gW[0x4b6])]){aDf6Q9(u7abyW(IUH9gW[0xb8]))[u7abyW(IUH9gW[0x732])](jZhnmm,{[u7abyW(IUH9gW[0x4b5])]:this[u7abyW(IUH9gW[0x4b6])]})}let bPpkx2=await this[u7abyW(IUH9gW[0x497])](u7abyW(IUH9gW[0x816])+u7abyW(0x857)+u7abyW(0x858)+u7abyW(IUH9gW[0x4d5]),jZhnmm,this[u7abyW(IUH9gW[0x459])]);if(bPpkx2==IUH9gW[0x5]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x859)+u7abyW(0x85a));return IUH9gW[0x1]}try{let{[u7abyW(IUH9gW[0x24f])]:AvR7Ar}=await o1FeYT[u7abyW(IUH9gW[0x499])+IUH9gW[0x25b]]({[u7abyW(IUH9gW[0x23a])]:u7abyW(0x85b),[u7abyW(IUH9gW[0x4a1])+u7abyW(IUH9gW[0x317])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4c8])+u7abyW(IUH9gW[0x23e])]:this[u7abyW(IUH9gW[0x4a2])],[u7abyW(IUH9gW[0x4a0])]:IUH9gW[0x191],[u7abyW(IUH9gW[0x4df])]:LrptE9(u7abyW(IUH9gW[0xb5])+IUH9gW[0xb6],IUH9gW[0x109],IUH9gW[0x180]),[u7abyW(IUH9gW[0x49e])]:bPpkx2[u7abyW(IUH9gW[0x49f])],[u7abyW(IUH9gW[0x4a4])]:u7abyW(IUH9gW[0x4a5]),[u7abyW(IUH9gW[0x23c])]:{[u7abyW(IUH9gW[0x4a8])]:bPpkx2[u7abyW(IUH9gW[0x4a7])+u7abyW(IUH9gW[0x4a9])][u7abyW(IUH9gW[0x4a8])],[u7abyW(IUH9gW[0x4aa])]:bPpkx2[u7abyW(IUH9gW[0x4a7])+u7abyW(IUH9gW[0x4a9])][u7abyW(IUH9gW[0x4aa])],[u7abyW(IUH9gW[0x83c])+u7abyW(IUH9gW[0x83d])]:u7abyW(0x85c),[u7abyW(IUH9gW[0x824])+u7abyW(IUH9gW[0x825])]:aDf6Q9(u7abyW(IUH9gW[0x1a6]))[u7abyW(IUH9gW[0x5b9])]()+aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x53f])](aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x3fb])]()*IUH9gW[0x841]),[u7abyW(IUH9gW[0x826])]:u7abyW(IUH9gW[0x827]),[u7abyW(IUH9gW[0x4ac])+u7abyW(IUH9gW[0x4ad])]:u7abyW(0x85d)+u7abyW(0x85e)+u7abyW(0x85f)+u7abyW(0x860),[u7abyW(IUH9gW[0x4b3])]:u7abyW(IUH9gW[0x419])+u7abyW(IUH9gW[0x41a])+u7abyW(IUH9gW[0x741])+this[u7abyW(IUH9gW[0x445])],[u7abyW(IUH9gW[0x828])+u7abyW(IUH9gW[0x829])+IUH9gW[0x7d1]]:u7abyW(IUH9gW[0x82a])+this[u7abyW(IUH9gW[0x405])]+(u7abyW(IUH9gW[0x82b])+u7abyW(IUH9gW[0x82c])+u7abyW(0x861)+u7abyW(IUH9gW[0x82e])+u7abyW(IUH9gW[0x82f])+u7abyW(IUH9gW[0x830])+IUH9gW[0x88c]),[u7abyW(IUH9gW[0x23d])+u7abyW(IUH9gW[0x23e])]:b4GwMp},[u7abyW(IUH9gW[0x24f])]:jZhnmm});if(AvR7Ar[u7abyW(IUH9gW[0x285])]===IUH9gW[0x423]||AvR7Ar[u7abyW(IUH9gW[0x285])]===IUH9gW[0x1a7]){this[u7abyW(IUH9gW[0x88d])][mOfCEy]++;return this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]<=IUH9gW[0x3]?(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x79f])+this[u7abyW(IUH9gW[0x43a])]+IUH9gW[0x88e]+this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x508])]+u7abyW(0x862)+this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]+u7abyW(0x863)),this[u7abyW(IUH9gW[0x309])+u7abyW(IUH9gW[0x30a])]=u7abyW(IUH9gW[0x300]),this[u7abyW(IUH9gW[0x532])+u7abyW(IUH9gW[0x533])+IUH9gW[0x33a]]=IUH9gW[0x191],u7abyW(0x864)):(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x4f4])+this[u7abyW(IUH9gW[0x43a])]+IUH9gW[0x88e]+this[u7abyW(IUH9gW[0x86f])][u7abyW(IUH9gW[0x508])]+(u7abyW(0x865)+u7abyW(0x866)+u7abyW(0x867)+\"\u578B\")),this[u7abyW(IUH9gW[0x502])+u7abyW(IUH9gW[0x503])+IUH9gW[0x33a]][this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x7c0])]]=IUH9gW[0x191],IUH9gW[0x1])}if(AvR7Ar[u7abyW(IUH9gW[0x5b7])+IUH9gW[0x44]]==IUH9gW[0x88f]){const P68Tf2=AvR7Ar[u7abyW(IUH9gW[0x24f])][u7abyW(0x868)];this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]=IUH9gW[0x1];if(w8rKdS!=u7abyW(IUH9gW[0x19b])){if(P68Tf2==IUH9gW[0x15a]){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x890])+this[u7abyW(IUH9gW[0x43a])]+IUH9gW[0x88e]+this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x508])]+u7abyW(0x86a)),this[u7abyW(IUH9gW[0x502])+u7abyW(IUH9gW[0x503])+IUH9gW[0x33a]][this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x7c0])]]=IUH9gW[0x191]);return P68Tf2}else{if(P68Tf2==IUH9gW[0x3]){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x890])+this[u7abyW(IUH9gW[0x43a])]+IUH9gW[0x88e]+this[u7abyW(IUH9gW[0x52b])+u7abyW(IUH9gW[0x52c])+u7abyW(IUH9gW[0x52d])][u7abyW(IUH9gW[0x508])]+u7abyW(0x86b)),this[u7abyW(IUH9gW[0x502])+u7abyW(IUH9gW[0x503])+IUH9gW[0x33a]][this[u7abyW(IUH9gW[0x86f])][u7abyW(IUH9gW[0x7c0])]]=IUH9gW[0x191]);return P68Tf2}}}return P68Tf2}else{jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](AvR7Ar),this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]=IUH9gW[0x1]);return IUH9gW[0x1]}}catch(CiFrPq){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x86c)),this[u7abyW(IUH9gW[0x716])+u7abyW(IUH9gW[0x877])+u7abyW(IUH9gW[0x878])][mOfCEy]=IUH9gW[0x1]);return IUH9gW[0x1]}}}async function HZiXsG(...izD_V32){var ezk0Yu={get[u7abyW(IUH9gW[0x262])+IUH9gW[0x263]](){return o1FeYT}};return FDFdyPI(izD_V32,ezk0Yu)}async function YhKHLTU(...izD_V32){var ezk0Yu={get[u7abyW(IUH9gW[0x250])](){return o1FeYT}};return TyS56cx(izD_V32,ezk0Yu)}!(async()=>{await NPLpVYC();let izD_V32=await hANxcl();if(!izD_V32){return}Y9_psKn=izD_V32[u7abyW(0x86d)];let ezk0Yu=IUH9gW[0x5],RWe5Wz=[...Y9_psKn][u7abyW(0x86e)](()=>{return aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x3fb])]()-IUH9gW[0x891]});i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x86f)+RWe5Wz[u7abyW(IUH9gW[0x34])]+(u7abyW(0x870)+IUH9gW[0x2e0]));for(let qIOqfr8 of RWe5Wz)try{const szoaZL=await HZiXsG(qIOqfr8);if(szoaZL){jk9aAk8(ezk0Yu=qIOqfr8,UW8IRP=qIOqfr8,i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x871)));break}else{i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x892])+u7abyW(0x873))}}catch(onPFgpD){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x892])+u7abyW(0x874)+u7abyW(0x875)+onPFgpD[u7abyW(0x876)])}if(!ezk0Yu){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x877)+u7abyW(0x878)+u7abyW(0x879))}jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x87a)+u7abyW(0x87b)+(w8rKdS===u7abyW(IUH9gW[0x19b])?IUH9gW[0x894]:IUH9gW[0x895])),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x87c)+u7abyW(0x87d)+\"\\x3a\"),i6HDx_S[u7abyW(IUH9gW[0x237])](IUH9gW[0x63e][u7abyW(IUH9gW[0x628])](IUH9gW[0x2f8])),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x87e)+u7abyW(0x87f)+cQChDzh),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x880)+YFRxvc),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x881)+u7abyW(IUH9gW[0x893])+IUH9gW[0x185]+AU7CsdH),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x883)+u7abyW(IUH9gW[0x893])+IUH9gW[0x185]+yIL4ZH),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x884)+u7abyW(IUH9gW[0x62e])+HidfqvV),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x885)+BGww_rx),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x886)+ocunYau),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x887)+u7abyW(0x888)+(YgEGbY||u7abyW(IUH9gW[0x896]))),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x88a)+u7abyW(0x88b)+(oI9lJJ!==u7abyW(IUH9gW[0x300])?IUH9gW[0x894]:IUH9gW[0x895])),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x88c)+u7abyW(0x88d)+u7abyW(0x88e)+IUH9gW[0x185]+no0cY4v+IUH9gW[0x185]),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x88f)+(Tr1GQB[u7abyW(IUH9gW[0x34])]>IUH9gW[0x1]?u7abyW(0x890):u7abyW(IUH9gW[0x896]))),i6HDx_S[u7abyW(IUH9gW[0x237])](IUH9gW[0x63e][u7abyW(IUH9gW[0x628])](IUH9gW[0x2f8])));let J7aaZbe=aDf6Q9(u7abyW(IUH9gW[0x19f])+IUH9gW[0x155])[u7abyW(IUH9gW[0x53f])](aDf6Q9(u7abyW(IUH9gW[0x1a6]))[u7abyW(IUH9gW[0x5b9])]()/IUH9gW[0x180]),rWJvcF=await YhKHLTU();if(aDf6Q9(u7abyW(IUH9gW[0x25d]))[u7abyW(0x891)](J7aaZbe-rWJvcF)>IUH9gW[0x761]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x892))}jk9aAk8(k5KyAj=izD_V32[u7abyW(IUH9gW[0x311])],BaZkob=izD_V32[u7abyW(IUH9gW[0x311])+IUH9gW[0x95]],i6HDx_S[u7abyW(0x893)+\"\\u006e\\u0076\"](a0uB7XG),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x894)+\"\u914D\u7F6E\"));let mOfCEy=IUH9gW[0x15a];if(BGww_rx){try{mOfCEy=aDf6Q9(u7abyW(0x895)+IUH9gW[0x249])(BGww_rx);if(aDf6Q9(u7abyW(0x896))(mOfCEy)||mOfCEyIUH9gW[0x15a]){mOfCEy=IUH9gW[0x15a]}}}catch(EzW9ZM){mOfCEy=IUH9gW[0x15a]}}i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x897)+IUH9gW[0x897]+mOfCEy+u7abyW(IUH9gW[0x8a1]));if(ocunYau){try{jk9aAk8(ZzwZ2OA=ocunYau[u7abyW(IUH9gW[0x42b])](IUH9gW[0x898]),aDf6Q9(u7abyW(IUH9gW[0x1a1]))[u7abyW(IUH9gW[0x237])](u7abyW(0x899)+u7abyW(0x89a)+aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](ZzwZ2OA)))}catch(EzW9ZM){jk9aAk8(ZzwZ2OA=[u7abyW(IUH9gW[0x4f8]),u7abyW(IUH9gW[0x4f9]),u7abyW(IUH9gW[0x4fa])],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x5e7])+u7abyW(IUH9gW[0x899])+u7abyW(IUH9gW[0x89a])+u7abyW(0x89d)+u7abyW(0x89e)+u7abyW(0x89f)))}}else{jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8a0)),ZzwZ2OA=[u7abyW(IUH9gW[0x4f8]),u7abyW(IUH9gW[0x4f9]),u7abyW(IUH9gW[0x4fa])])}if(jVnJl_Y){try{jk9aAk8(jVnJl_Y=jVnJl_Y[u7abyW(IUH9gW[0x42b])](IUH9gW[0x898]),aDf6Q9(u7abyW(IUH9gW[0x1a1]))[u7abyW(IUH9gW[0x237])](u7abyW(0x8a1)+u7abyW(0x8a2)+aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x6d3])](jVnJl_Y)))}catch(EzW9ZM){jk9aAk8(jVnJl_Y=[IUH9gW[0x89b],IUH9gW[0x89c],u7abyW(IUH9gW[0x89d])],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x5e7])+u7abyW(IUH9gW[0x899])+u7abyW(IUH9gW[0x89a])+u7abyW(0x8a4)+aDf6Q9(u7abyW(IUH9gW[0x5a8]))[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](jVnJl_Y)))}}else{jk9aAk8(jVnJl_Y=[IUH9gW[0x89b],IUH9gW[0x89c],u7abyW(IUH9gW[0x89d])],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8a5)+aDf6Q9(u7abyW(IUH9gW[0x5a8]))[u7abyW(IUH9gW[0x6d3])](jVnJl_Y)))}if(pn34plr){try{jk9aAk8(pn34plr=pn34plr[u7abyW(IUH9gW[0x42b])](IUH9gW[0x898]),aDf6Q9(u7abyW(IUH9gW[0x1a1]))[u7abyW(IUH9gW[0x237])](u7abyW(0x8a6)+aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x1fa])+u7abyW(IUH9gW[0x20f])](pn34plr)))}catch(EzW9ZM){jk9aAk8(pn34plr=[u7abyW(IUH9gW[0x5e8]),u7abyW(IUH9gW[0x4fa]),u7abyW(IUH9gW[0x89e])],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8a8)+u7abyW(0x8a9)+u7abyW(0x8aa)+aDf6Q9(u7abyW(IUH9gW[0x1f4])+IUH9gW[0x44])[u7abyW(IUH9gW[0x6d3])](pn34plr)))}}else{jk9aAk8(pn34plr=[u7abyW(IUH9gW[0x5e8]),u7abyW(IUH9gW[0x4fa]),u7abyW(IUH9gW[0x89e])],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8ab)+u7abyW(0x8ac)+u7abyW(0x8ad)+u7abyW(0x8ae)+u7abyW(0x8af)))}let Khi9t8=[];const aC0THb=[];for(let ix6yOs=IUH9gW[0x1];ix6yOs{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];return new(aDf6Q9(u7abyW(IUH9gW[0x1a2])))(async ezk0Yu=>{try{let RWe5Wz=new eoeZZW(izD_V32[IUH9gW[0x1]]),qIOqfr8=await RWe5Wz[u7abyW(IUH9gW[0x44f])]();jk9aAk8(Khi9t8[u7abyW(IUH9gW[0x89f])]({[u7abyW(IUH9gW[0x43a])]:RWe5Wz[u7abyW(IUH9gW[0x43a])],[u7abyW(IUH9gW[0x5d6])]:qIOqfr8,[u7abyW(0x8b5)]:RWe5Wz[u7abyW(IUH9gW[0x623])+u7abyW(IUH9gW[0x624])+IUH9gW[0x625]](),[u7abyW(IUH9gW[0x401])]:RWe5Wz[u7abyW(IUH9gW[0x401])]}),ezk0Yu())}catch(szoaZL){jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8b6)+u7abyW(0x8b7)+szoaZL),ezk0Yu())}})}));await aDf6Q9(u7abyW(IUH9gW[0x1a2]))[u7abyW(0x8b8)](bPpkx2);if(cIULrn{jk9aAk8(izD_V32[IUH9gW[0x0]]=IUH9gW[0x3],i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(IUH9gW[0x439])+izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x43a])]+(u7abyW(0x8bd)+IUH9gW[0x185])+izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x5d6])]+u7abyW(IUH9gW[0x8a2])),P68Tf2+=izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x5d6])])})),i6HDx_S[u7abyW(IUH9gW[0x237])](\"\u2500\"[u7abyW(IUH9gW[0x628])](IUH9gW[0x2f8])),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8bf)+P68Tf2+u7abyW(IUH9gW[0x8a2])));const LrptE9=(P68Tf2/IUH9gW[0x65a])[u7abyW(IUH9gW[0x63a])+IUH9gW[0x1c]](IUH9gW[0x7]);jk9aAk8(i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8c0)+u7abyW(0x8c1)+IUH9gW[0x185]+LrptE9+\"\\u0020\u5143\"),i6HDx_S[u7abyW(IUH9gW[0x237])](IUH9gW[0x63e][u7abyW(IUH9gW[0x628])](IUH9gW[0x2f8])),i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8c2)),i6HDx_S[u7abyW(IUH9gW[0x237])](IUH9gW[0x63e][u7abyW(IUH9gW[0x628])](IUH9gW[0x2f8])));let CiFrPq=u7abyW(0x8c3)+u7abyW(0x8c4);jk9aAk8(CiFrPq+=u7abyW(0x8c5)+Khi9t8[u7abyW(IUH9gW[0x34])]+IUH9gW[0x31a],CiFrPq+=u7abyW(0x8c6)+IUH9gW[0x185]+P68Tf2+IUH9gW[0x31a],CiFrPq+=u7abyW(0x8c7)+LrptE9+u7abyW(0x8c8),Khi9t8[u7abyW(IUH9gW[0x42d])+IUH9gW[0x28]](RH8KLq((...izD_V32)=>{jk9aAk8(izD_V32[IUH9gW[0x0]]=IUH9gW[0x3],CiFrPq+=\"\u8D26\u53F7\"+izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x43a])]+IUH9gW[0x897]+izD_V32[IUH9gW[0x1]][u7abyW(IUH9gW[0x5d6])]+u7abyW(0x8c9))})),i6HDx_S[u7abyW(0x8ca)+u7abyW(0x8cb)][u7abyW(IUH9gW[0x89f])](CiFrPq));if(EklD7Y1[u7abyW(IUH9gW[0x34])]>IUH9gW[0x1]){i6HDx_S[u7abyW(IUH9gW[0x237])](u7abyW(0x8cc)+u7abyW(IUH9gW[0x401])+u7abyW(0x8cd)+EklD7Y1[u7abyW(IUH9gW[0x43e])](IUH9gW[0x898]))}})()[u7abyW(0x8ce)](RH8KLq((...izD_V32)=>{izD_V32[IUH9gW[0x0]]=IUH9gW[0x3];return aDf6Q9(u7abyW(IUH9gW[0x1a1]))[u7abyW(IUH9gW[0x237])](izD_V32[IUH9gW[0x1]])}))[u7abyW(0x8cf)+IUH9gW[0x16d]](()=>{return i6HDx_S[u7abyW(0x8d0)]()});async function NPLpVYC(...izD_V32){var ezk0Yu={get[u7abyW(0x8d1)](){return o1FeYT},get[u7abyW(IUH9gW[0x24c])](){return i6HDx_S}};return VQfS3_(izD_V32,ezk0Yu)}async function hANxcl(...izD_V32){var ezk0Yu={get[u7abyW(0x8d2)](){return o1FeYT},get[u7abyW(IUH9gW[0x236])](){return i6HDx_S}};return bEWF0E6(izD_V32,ezk0Yu)}function QC0AOY(...izD_V32){var ezk0Yu={get[u7abyW(0x8d3)](){return drO1rB},get[u7abyW(0x8d4)](){return w8rKdS},[u7abyW(0x8d5)](...izD_V32){return XOmVU2g(...izD_V32)},[u7abyW(0x8d6)+IUH9gW[0x12c]](...izD_V32){return ajEE_i(...izD_V32)},[u7abyW(0x8d7)+IUH9gW[0x26a]](...izD_V32){return bcq5K8P(...izD_V32)},[u7abyW(0x8d8)](...izD_V32){return nWUdKq(...izD_V32)},[u7abyW(0x8d9)](...izD_V32){return aatDxQ(...izD_V32)},[u7abyW(0x8da)+IUH9gW[0x12c]](...izD_V32){return nC60Cg(...izD_V32)},[u7abyW(0x8db)](...izD_V32){return faBjLD(...izD_V32)},[u7abyW(0x8dc)](...izD_V32){return fanMfR(...izD_V32)},[u7abyW(0x8dd)](...izD_V32){return lYK0Eoq(...izD_V32)},[u7abyW(0x8de)](...izD_V32){return ZuMey1G(...izD_V32)},[u7abyW(0x8df)](...izD_V32){return DgSF7DB(...izD_V32)},[u7abyW(0x8e0)](...izD_V32){return yrnZhC(...izD_V32)}};return ix6yOs=[izD_V32,ezk0Yu],new p4AG2E6(u7abyW(IUH9gW[0x1e]),u7abyW(0x8e1)+u7abyW(0x8e2),u7abyW(0x8e3)+u7abyW(0x8e4))[u7abyW(0x8e5)]}function jk9aAk8(){jk9aAk8=function(){}}")({ get "uFhJlC"() { return define }, get "vK1nFuf"() { return module }, set "vK1nFuf"(berSED) { return module = berSED }, get "qxMoumD"() { return angular }, get "TMczNL"() { return window }, get "Y7ydzU"() { return notify }, set "Y7ydzU"(berSED) { return notify = berSED }, get "YdMtds"() { return require }, get "LF74SSL"() { return exports }, get "csVzwK"() { return typeof define }, get "XtK2qOW"() { return typeof module }, get "k5qRMq"() { return typeof angular }, get "jHH6if9"() { return typeof exports } }); diff --git a/laoyou.py b/laoyou.py new file mode 100644 index 0000000..167f628 --- /dev/null +++ b/laoyou.py @@ -0,0 +1,292 @@ +''' +FilePath: \脚本\老有工社\老友工社.py +Date: 2026-01-23 22:11:01 +LastEditTime: 2026-01-26 16:07:25 +LastEditors: liyan +Copyright (c) 2026 by liyan, All Rights Reserved. +''' +import datetime +import json +import logging +import random +import time +import requests +from concurrent.futures import ThreadPoolExecutor +userinfo = [ + "18834181486&13903414922gxr&4e893a49e6e6db2f", +] +MAX_CONCURRENT_TASKS = 1 +logging.basicConfig(level=logging.INFO, + format='%(asctime)s %(message)s', + datefmt='%H:%M:%S' +) # 设置日志级别 +lygs_headers = { + 'User-Agent': "okhttp/4.10.0", + 'Connection': "Keep-Alive", + 'Accept': "application/json", + 'Accept-Encoding': "gzip", + 'os': "android", + # 'deviceId': "4e893a49e6e6db2f", + 'Version-Code': "4", + 'Client-Version': "1.0.3", + # 'datetime': "2026-01-26 08:46:33.861" +} + +def void_follow(phone,headers,tsk): + try: + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/recommends" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'page': "5",'type': "0"} + resp = requests.get(url, params=params, headers=headers).json() + for video in resp: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + url = "https://www.laoyou.video/api/v2/follow" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'id': f'{video.get("user_id")}'} + resp = requests.post(url,params=params, headers=headers).json() + tsk['finish_num'] = tsk['finish_num'] + 1 + logging.info(f"💵 {phone}>>任务({tsk['name']}) 视频({video.get("id")})") + void_follow(phone,headers,tsk)#递归函数 + except Exception: + logging.info(f"⛔️ 收藏视频异常") +def voide_time(phone,headers,tsk): + try: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/watchtime" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + payload = {'time': "300"} + response = requests.post(url, data=payload, headers=headers) + logging.info(f"💵 {phone}>>任务({tsk['name']}) 时长(300)") + time.sleep(2) + payload = {'time': "600"} + response = requests.post(url, data=payload, headers=headers) + logging.info(f"💵 {phone}>>任务({tsk['name']}) 时长(600)") + time.sleep(2) + payload = {'time': "1200"} + response = requests.post(url, data=payload, headers=headers) + logging.info(f"💵 {phone}>>任务({tsk['name']}) 时长(1200)") + time.sleep(2) + except Exception: + logging.info(f"⛔️ 收藏视频异常") +def voide_share(phone,headers,tsk): + try: + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/recommends" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'page': "1",'type': "0"} + resp = requests.get(url, params=params, headers=headers).json() + for video in resp: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + url = "https://www.laoyou.video/api/v2/video/share" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'video_id': video.get("id")} + resp = requests.get(url,params=params, headers=headers).json() + tsk['finish_num'] = tsk['finish_num'] + 1 + logging.info(f"💵 {phone}>>任务({tsk['name']}) 视频({video.get("id")})") + voide_share(phone,headers,tsk)#递归函数 + except Exception: + logging.info(f"⛔️ 收藏视频异常") + +def voide_collect(phone,headers,tsk): + try: + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/recommends" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'page': "1",'type': "0"} + resp = requests.get(url, params=params, headers=headers).json() + for video in resp: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + url = "https://www.laoyou.video/api/v2/video/collect" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'video_id': video.get("id")} + resp = requests.get(url,params=params, headers=headers).json() + tsk['finish_num'] = tsk['finish_num'] + 1 + logging.info(f"💵 {phone}>>任务({tsk['name']}) 视频({video.get("id")})") + voide_collect(phone,headers,tsk)#递归函数 + except Exception: + logging.info(f"⛔️ 收藏视频异常") + + +def voide_comment(phone,headers,tsk): + try: + url = "https://www.laoyou.video/api/v2/user" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + resp = requests.get(url, headers=headers).json() + id = resp.get('id') + name = resp.get('name') + avatar = resp.get('avatar') + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/recommends" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'page': "6",'type': "0"} + resp = requests.get(url, params=params, headers=headers).json() + for video in resp: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + url = "https://www.laoyou.video/api/v2/video/store-comment" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + payload = { + 'body': "666", + 'pid': "0", + 'video_id': video.get("id"), + 'at_user': "", + 'target_user': video.get("user_id"), + 'cid': "0", + 'reply_user': json.dumps({"user_avatar": avatar,"user_id": id,"user_name": name}, ensure_ascii=False), + 'type': "1", + 'voice': "", + 'time': "" + } + resp = requests.post(url, data=payload, headers=headers).json() + tsk['finish_num'] = tsk['finish_num'] + 1 + logging.info(f"💵 {phone}>>任务({tsk['name']}) 视频({video.get("id")})") + voide_comment(phone,headers,tsk)#递归函数 + except Exception: + logging.info(f"⛔️ 评论视频异常") + +def voide_like(phone,headers,tsk): + try: + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/recommends" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'page': "6",'type': "0"} + resp = requests.get(url, params=params, headers=headers).json() + for video in resp: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + url = f"https://www.laoyou.video/api/v2/video/like/{video.get("id")}" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + resp = requests.get(url, headers=headers).json() + tsk['finish_num'] = tsk['finish_num'] + 1 + logging.info(f"💵 {phone}>>任务({tsk['name']}) 视频({video.get("id")})") + voide_like(phone,headers,tsk)#递归函数 + except Exception: + logging.info(f"⛔️ 点赞视频异常") +def watck_ads(phone,headers,tsk,uid): + pass + # url = "https://www.laoyou.video/api/v2/mission/basicAds" + # headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + # time.sleep(random.randint(10, 20)) + # payload = {"trans_id":show_id, "type":25} + # resp = requests.post(url, data=payload, headers=headers).json() +def watck_videos(phone,headers,tsk): + try: + #获取视频列表 + url = "https://www.laoyou.video/api/v2/video/recommends" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + params = {'page': "6",'type': "0"} + resp = requests.get(url, params=params, headers=headers).json() + for video in resp: + if tsk['finish_num'] >= tsk['completed_num']: + logging.info(f"💵 {phone}>>任务({tsk['name']}) 已完成") + return + logging.info(f"💵 {phone}>>任务({tsk['name']}) {video.get("name")}({video.get("id")})") + url = "https://www.laoyou.video/api/v2/video/watchvideo" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + # params = {'video_id': f"{video.get("id")}"} + resp = requests.post(url, headers=headers).json() + tsk['finish_num'] = tsk['finish_num'] + 1 + logging.info(f"💵 {phone}>>提交观看 {tsk['finish_num']}") + wait_time = random.randint(15, 30) + time.sleep(wait_time) + watck_videos(phone,headers,tsk) + except Exception: + logging.info(f"⛔️ 当前任务刷视频异常错误") +def work_task(userinfo): + try: + # watck_ads() + # return + config = userinfo.split("&") + phone = config[0] + password = config[1] + deviceId = config[2] + #1.获取登陆token + url = "https://www.laoyou.video/api/v2/auth/login" + payload = {'login': phone,'type': "2",'verifiable_code': "",'password': password} + headers = lygs_headers.copy() + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + headers['deviceId'] = deviceId + resp = requests.post(url, data=payload, headers=headers).json() + user_id = resp['user_id'] + headers['Authorization'] = f'Bearer {resp['token']}' + #2.开始签到任务 + url = "https://www.laoyou.video/api/v2/sign/add" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + resp = requests.post(url, data=payload, headers=headers).json() + result = resp.get("day") + if result is None: + logging.info(f"💵 {phone}>>{resp.get("message")}") + else: + logging.info(f"💵 {phone}>>{resp.get("day")}") + task_list = [] + #2.获取任务列表 + url = "https://www.laoyou.video/api/v2/mission/new-num-point" + headers['datetime'] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")[:-3] + resp = requests.get(url, headers=headers).json() + task_list = [] + for tsk in resp['basic']: + logging.info(f"💵 {phone}>>基础任务 {tsk['name']}({tsk['id']})[{tsk['finish_num']}/{tsk['completed_num']}]") + task_list.append({ + "name": tsk.get("name"), + "finish_num": tsk.get("finish_num"), + "completed_num": tsk.get("completed_num") + }) + for tsk in resp['interact']: + task_list.append({ + "name": tsk.get("name"), + "finish_num": tsk.get("finish_num"), + "completed_num": tsk.get("completed_num") + }) + logging.info(f"💵 {phone}>>互动任务 {tsk['name']}({tsk['id']})[{tsk['finish_num']}/{tsk['completed_num']}]") + + for tsk in resp['advanced']: + task_list.append({ + "name": tsk.get("name"), + "finish_num": tsk.get("is_finish"), + "completed_num": tsk.get("completed_num") + }) + logging.info(f"💵 {phone}>>进阶任务 {tsk['name']}({tsk['id']})[{tsk['is_finish']}/{tsk['completed_num']}]") + + for tsk in resp['social']: + task_list.append({ + "name": tsk.get("name"), + "finish_num": tsk.get("finish_num"), + "completed_num": tsk.get("completed_num") + }) + logging.info(f"💵 {phone}>>社交任务 {tsk['name']}({tsk['id']})[{tsk['finish_num']}/{tsk['completed_num']}]") + + #3.1刷视频任务 + watck_videos(phone,headers,task_list[0]) + #3.2观看广告 + watck_ads(phone,headers,task_list[1],user_id) + #3.3视频点赞任务 + voide_like(phone,headers,task_list[2]) + #3.4评论视频 + voide_comment(phone,headers,task_list[3]) + #3.5收藏视频 + voide_collect(phone,headers,task_list[4]) + #3.6转发视频 + voide_share(phone,headers,task_list[5]) + # 3.7观看时长视频 + voide_time(phone,headers,task_list[9]) + #3.8关注他人 + void_follow(phone,headers,task_list[12]) + except Exception: + logging.info(f"⛔️ 获取参数错误") + return +if __name__ == '__main__': + with ThreadPoolExecutor(max_workers=MAX_CONCURRENT_TASKS) as executor: + list(executor.map(work_task, userinfo)) + \ No newline at end of file diff --git a/leidaCar.js b/leidaCar.js new file mode 100644 index 0000000..39d1d50 --- /dev/null +++ b/leidaCar.js @@ -0,0 +1,559 @@ +/** + * cron 27 17 * * * leidacar.js + * 雷达汽车APP 每日获取积分 + * 变量名:leidaCarCookie + * 变量值:https://app-api.radar-ev.com Headers中rid和aid和userId 以#分开 多账户请新建同变量名账号(类似京东) + * scriptVersionNow = "0.0.1"; + */ +//Quantumult X 用户可以把变量写这里(第一次写脚本 可能在圈X有BUG) +const cookies = [ + +] +const $ = new Env("雷达汽车"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "leidaCarCookie"; +let envSplitor = ["&"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +let msg = "" +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck1 = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ck2 = str.split(strSplitor)[1]; //单账号多变量分隔符 + this.ck3 = str.split(strSplitor)[2]; //单账号多变量分隔符 + this.ckStatus = true; + this.taskList = [] + this.taskNum_like = 0 + this.taskNum_share = 0 + this.artList = [] + this.headers = + { + "user-agent": "Dart/2.19 (dart:io)", + "system": "iOS", + "version": "54", + "userid": this.ck3, + "accept-encoding": "gzip", + //"content-length": "31", + "rid": this.ck1, + "host": "app-api.radar-ev.com", + "login-system": "iPhone10,1|iOS 14.6|true|Darwin Kernel Version 20.5.0: Sat May 8 02:21:43 PDT 2021; root:xnu-7195.122.1~4/RELEASE_ARM64_T8015|", + "aid": this.ck2, + "content-type": "application/json; charset=utf-8" + + } + } + async main() { + $.log(`------ 第[${this.index}]个号 ------`) + await this.task_list(); + for (let task of this.taskList) { + await this.art_list() + + if (task.taskName == "点赞") { + //需要点赞的数量 + $.log(`[${task.taskName}] ${task.maxNum} / ${task.finishNum}`) + this.taskNum_like = task.maxNum - task.finishNum + for (let i in this.artList) { + if (this.artList[i].thumb == false) { + await this.task_like(this.artList[i].essayId) + + + } + } + + } else if (task.taskName == "分享") { + $.log(`[${task.taskName}] ${task.maxNum} / ${task.finishNum}`) + //需要分享的数量 + this.taskNum_share = task.maxNum - task.finishNum + for (let i = 0; i < this.taskNum_share; i++) { + await this.task_share(this.artList[i].essayId) + + } + } + + } + + + } + + + async task_list() { + try { + let options = { + fn: "任务列表", + method: "post", + url: `https://app-api.radar-ev.com/appapi/radarpoints/api/task/manage/list`, + headers: this.headers, + body: JSON.stringify({ "taskType": "20", "version": 261 }) + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(JSON.stringify(result)); + if (result.code == 200) { + $.log(`当前积分[${result.data.points}]`) + this.taskList = result.data.taskItems + + } else { + console.log(`❌账号[${this.index}] 用户查询: 失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async task_like(essayId) { + try { + let options = { + fn: "点赞文章", + method: "post", + url: `https://app-api.radar-ev.com/appapi/content/activitythumb/thumbs`, + headers: this.headers, + body: JSON.stringify({ "essayId": essayId, "status": 1, "currentThumb": 192 }) + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 0) { + $.log(`点赞成功`) + } else { + console.log(`❌账号[${this.index}] 点赞文章失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async task_share(businessCode) { + try { + let options = { + fn: "分享文章", + method: "post", + url: `https://app-api.radar-ev.com/appapi/radarpoints/api/task/manage/action/submit`, + headers: this.headers, + body: JSON.stringify({ "businessCode": businessCode, "actionType": 1, "userId": this.ck3}) + } + //console.log(options); + + let { body: result } = await $.httpRequest(options); + console.log(result); + if (result.code == 200) { + $.log(`分享成功`) + } else { + console.log(`❌账号[${this.index}] 分享文章失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async art_list() { + try { + let options = { + fn: "文章列表", + method: "get", + url: `https://app-api.radar-ev.com/appapi/content/essay/pageCommunity?current=1&size=20&channelId=PD3455168030976339970`, + headers: this.headers, + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 0) { + this.artList = result.data.records + } else { + console.log(`❌账号[${this.index}] 获取文章失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let qxCookies = cookies.join("") + let userCookie = ($.isNode() ? process.env[ckName] : qxCookies) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log(`未找到变量[${ckName}]`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + isJSONString(str) { + try { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t["body"] + } + if (t.method === 'post') { + let contentType; + + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + contentType = 'application/json' + } else { + contentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + contentType = 'application/json'; + } + } + if (!t.headers['Content-Type']) { + t.headers['Content-Type'] = contentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }, reason => { + reject(reason.err) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/lenovoapp.js b/lenovoapp.js new file mode 100644 index 0000000..afb5833 --- /dev/null +++ b/lenovoapp.js @@ -0,0 +1,412 @@ +/** + * cron 5 12 * * * + * Show:每日做联想乐豆任务 可以换东西 + * 变量名:lenovoAccessToken + * 变量值: APP 我的 乐豆 前往乐豆兑换中心 抓 https://mmembership.lenovo.com.cn/member-hp-task-center + * 请求头Headers 中 accesstoken 的值 多账号&或换行 分割 或新建同名变量 + * scriptVersionNow = "0.0.2"; + */ + +const $ = new Env("联想App"); +const axios = require('axios'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "lenovoAccessToken"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class Task { + constructor(str) { + this.index = ++userIdx; + this.ck = null //单账号多变量分隔符 + this.ckStatus = true; + this.token = null + this.accesstoken = str.split(strSplitor)[0]; + } + async main() { + await this.ssoCheck() + console.log(this.ck, this.token) + if (this.ck && this.token) { + await this.userInfo() + await this.checkIn() + await this.getUserTaskList(); + + } + + + + } + async userInfo() { + let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-webapi/v1/userBenefit/getMyAssets` }) + //console.log(result); + if (result.code == "0") { + $.log(`✅账号[${this.index}] 获取用户信息成功===>[${result.data.userId}]乐豆[${result.data.ledouNum}]`); + this.ckStatus = true + } else { + $.log(`❌账号[${this.index}] 获取用户状态失败`); + this.ckStatus = false + console.log(result); + } + } + async isSignIn() { + let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/task/getCheckInList?lenovoId=${this.ck}` }) + //console.log(result); + if (result.code == "0") { + if (result.data.flag == !1) { + $.log(`✅账号[${this.index}] 今日未签到 =====> 签到ing🎉`) + + await this.checkIn() + } + } else { + $.log(`❌账号[${this.index}] 获取签到状态`); + console.log(result); + } + } + async checkIn() { + 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` }) + //console.log(result); + if (result.code == "0") { + $.log(`✅账号[${this.index}] 签到成功🎉`) + } else { + $.log(`❌账号[${this.index}] 签到失败`); + console.log(result); + } + } + getSignKey() { + global["window"] = {} + const JSEncrypt = require("jsencrypt") + let pt = ["cD", "BT", "Uzn", "Po", "Luu", "Yhc", "Cj", "FP", "al", "Tq"] + , ht = ["MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJB", "L7qpP6mG6ZHdDKEIdTqQDo/WQ", "6NaWftXwOTHnnbnwUEX2/2jI4qALxRWMliYI80cszh6", "ySbap0KIljDCN", "w0CAwEAAQ=="] + , mt = function (text) { + var t, e, n = ""; + try { + var r = new JSEncrypt; + r.setPublicKey((t = ["A", "b", "C", "D", ""], + e = "", + ht.forEach((function (n, r) { + return e += n + t[r] + } + )), + e)), + n = r.encrypt(text) + } catch (t) { + console.log("rsa加密错误!", n) + } + return n + } + for (var t = function () { + var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 8; + return Math.floor(Math.random() * Math.pow(10, t)) + }(8).toString(), e = "", i = 0; i < t.length; i++) + e += pt[Number(t[i])]; + return mt(t + ":" + e) + } + async getUserTaskList() { + let result = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/task/getUserTaskList` }) + //console.log(result); + if (result.code == "0") { + $.log(`✅账号[${this.index}] 获取任务列表成功🎉`) + for (let i = 0; i < result.data.length; i++) { + let task = result.data[i]; + if (task.taskState == 0 && task.type !== 13) { + await $.wait(5000) + await this.doTask(task.taskId); + } + + } + } else { + $.log(`❌账号[${this.index}] 获取任务列表失败`); + console.log(result); + } + } + async doTask(id) { + let result_ = await this.taskRequest({ method: "POST", url: `https://mmembership.lenovo.com.cn/member-hp-task-center/v1/checkin/selectTaskPrize?taskId=${id}&channelId=1` }) + if (result_.code == "0") { + 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` }) + //console.log(result); + if (result.code == "0") { + $.log(`✅账号[${this.index}] 任务执行成功🎉`) + + } else { + $.log(`❌账号[${this.index}] 任务执行失败`); + console.log(result_.message); + console.log(id) + } + } else { + console.log(result_.message) + } + + } + async ssoCheck() { + + let config = { + method: 'POST', + url: 'https://mmembership.lenovo.com.cn/member-center-api/v2/access/ssoCheck?lenovoId=&unionId=&clientId=2', + headers: { + '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/', + 'Accept-Encoding': 'gzip, deflate', + 'pragma': 'no-cache', + 'cache-control': 'no-cache', + 'accesstoken': this.accesstoken, + 'signkey': this.getSignKey(), + 'origin': 'https://mmembership.lenovo.com.cn', + 'servicetoken': '', + 'tenantid': '25', + 'sec-fetch-dest': 'empty', + //'lenovoid': , + 'clientid': '2', + 'x-requested-with': 'com.lenovo.club.app', + 'sec-fetch-site': 'same-origin', + 'sec-fetch-mode': 'cors', + 'referer': 'https://mmembership.lenovo.com.cn/app?pmf_source=P0000005611M0002', + 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + } + } + let { data: result } = await axios.request(config) + //console.log(result) + if (result.code == "0") { + this.token = result.data.serviceToken + this.ck = result.data.lenovoId + } + } + + async taskRequest(options) { + let headers = { + '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/', + 'Accept-Encoding': 'gzip, deflate', + 'pragma': 'no-cache', + 'cache-control': 'no-cache', + 'origin': 'https://mmembership.lenovo.com.cn', + 'servicetoken': this.token, + 'sec-fetch-dest': 'empty', + //'service-authentication':this.token, + 'lenovoid': this.ck, + 'clientid': '2', + 'x-requested-with': 'com.lenovo.club.app', + 'sec-fetch-site': 'same-origin', + 'sec-fetch-mode': 'cors', + 'referer': 'https://mmembership.lenovo.com.cn/app?pmf_source=P0000005611M0002', + 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + } + Object.assign(options, { headers }) + let { data: result } = await axios.request(options) + return result + } +} + + + +!(async () => { + console.log(`==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date( + new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000 + ).toLocaleString()} \n==================================================`); + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log(`未找到CK【${ckName}】`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +//Env Api ============================= +/* + * @modifyAuthor @smallfawn + * @modifyTime 2024-05-01 + * @modifyInfo 抽离操作文件的函数 + */ +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(""); + } + timeStamp() { + return new Date().getTime(); + } + uuid() { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace( + /[xy]/g, + function (c) { + var r = (Math.random() * 16) | 0, + v = c == "x" ? r : (r & 0x3) | 0x8; + return v.toString(16); + } + ); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let e in s) { + new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); + } + return t; + }; + msg(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); +} diff --git a/ljfsjlb.js b/ljfsjlb.js new file mode 100644 index 0000000..819f6d6 --- /dev/null +++ b/ljfsjlb.js @@ -0,0 +1,583 @@ +/* +罗技粉丝俱乐部 + +自己捉api.wincheers.net包里的Authorization,去掉前面的Bearer之后填到ljfsjlbCookie里 +多账号换行或&隔开 +*/ +const $ = new Env("罗技粉丝俱乐部"); + +let envSplitor = ['\n','&'] +let httpErr, httpReq, httpResp + +let userCookie = ($.isNode() ? process.env.ljfsjlbCookie : $.getdata('ljfsjlbCookie')) || ''; + +let userList = [] +let userIdx = 0 +let userCount = 0 + +let VIDEO_TASK_NUM = 3 + +let contentType = 'application/json;charset=utf-8' +let client_id = 'LogitechFans' + +let defaultUA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.23(0x1800172f) NetType/WIFI Language/zh_CN' +let Referer = 'https://servicewechat.com/wx9be0a7d24db348e8/220/page-frame.html' +/////////////////////////////////////////////////////////////////// +class UserInfo { + constructor(str) { + this.index = ++userIdx + this.name = this.index + this.valid = false + + this.auth = str + this.taskList = {} + } + + async taskApi(fn,method,url,body) { + let result = null + try { + let host = url.replace('//','/').split('/')[1] + let urlObject = { + url: url, + headers: { + 'Host': host, + 'Connection': 'keep-alive', + 'User-Agent': defaultUA, + 'Referer': Referer, + 'client_id': client_id, + 'Authorization': 'Bearer ' + this.auth, + }, + timeout: 5000, + } + if(body) { + urlObject.body = body + urlObject.headers['Content-Type'] = contentType + } + await httpRequest(method,urlObject).then(async (ret) => { + if(ret.resp?.statusCode == 200) { + if(ret.resp?.body) { + result = JSON.parse(ret.resp.body) + } else { + console.log(`账号[${this.index}]调用${method}[${fn}]出错,返回为空`) + } + } else { + console.log(`账号[${this.index}]调用${method}[${fn}]出错,返回状态码[${ret.resp?.statusCode||''}]`) + } + }) + } catch(e) { + console.log(e) + } finally { + return Promise.resolve(result); + } + } + + async GetIsLogin() { + try { + let fn = 'GetIsLogin' + let method = 'post' + let url = `https://api.wincheers.net/api/services/app/crmAccount/GetIsLogin` + let body = `` + await this.taskApi(fn,method,url,body).then(async (result) => { + if(result.success==true) { + this.valid = true + this.name = result.result.name + this.id = result.result.id + this.integral = result.result.integral + this.phone = result.result.telephone + this.buyerNo = result.result.buyerNo + console.log(`登录成功`) + console.log(`昵称: ${this.name}`) + console.log(`ID: ${this.id}`) + console.log(`积分: ${this.integral}`) + } else { + $.logAndNotify(`账号[${this.index}]登录失败,CK失效`) + } + }) + } catch(e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + + async IsSignDao() { + try { + let fn = 'IsSignDao' + let method = 'post' + let url = `https://api.wincheers.net/api/services/app/signIn/IsSignDao` + let body = `` + await this.taskApi(fn,method,url,body).then(async (result) => { + if(result.success==true) { + let taskDetail = result.result.split('|') + + this.taskList.IsSingDao = taskDetail[0] + this.taskList.SignDay = taskDetail[1] + this.taskList.IsNotice = taskDetail[2] + this.taskList.Integral = taskDetail[3] + this.taskList.VideoNum = taskDetail[4] + this.taskList.shareNum = taskDetail[5] + this.taskList.Isperfect = taskDetail[6] + this.taskList.IsRelease = taskDetail[7] + this.taskList.IsBangDing = taskDetail[8] + this.taskList.IsForward = taskDetail[9] + this.taskList.Iscomment = taskDetail[10] + this.taskList.isProbe = taskDetail[11] + this.taskList.isInterest = taskDetail[12] + this.taskList.InviteNum = taskDetail[13] + + if(this.taskList.IsSingDao != 'ok') { + await this.ContinuitySignIn(); + } else { + console.log(`今天已签到,已签到${this.taskList.SignDay}天`) + } + if(this.taskList.VideoNum < VIDEO_TASK_NUM) { + let num = VIDEO_TASK_NUM - this.taskList.VideoNum + for(let i=0; i { + if(result.success==true) { + this.taskList.SignDay++ + console.log(`签到成功,获得${result.result}积分,已签到${this.taskList.SignDay}天`) + } else { + console.log(`签到失败:${result?.error?.message}`) + } + }) + } catch(e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + + async AddLogVideo(SocialId) { + try { + let fn = 'AddLogVideo' + let method = 'post' + let url = `https://api.wincheers.net/api/services/app/socialVideoOverLog/AddLog?SocialId=${SocialId}` + let body = `` + await this.taskApi(fn,method,url,body).then(async (result) => { + if(result.success==true) { + console.log(`观看视频成功`) + if(result.result > 0) console.log(`完成观看视频任务成功,获得${result.result}积分`) + } else { + console.log(`观看视频失败:${result?.error?.message}`) + } + }) + } catch(e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + + async GiftPoints() { + try { + let fn = 'GiftPoints' + let method = 'post' + let url = `https://api.wincheers.net/api/services/app/crmAccount/GiftPoints` + let body = `` + await this.taskApi(fn,method,url,body).then(async (result) => { + if(result.success==true) { + console.log(`分享成功,每天首次分享可得50积分`) + } else { + console.log(`分享失败:${result?.error?.message}`) + } + }) + } catch(e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } + + async userTask() { + try { + console.log(`\n============= 账号[${this.index}] =============`) + await this.getScoreAccount(); + } catch(e) { + console.log(e) + } finally { + return Promise.resolve(1); + } + } +} + +!(async () => { + if (typeof $request !== "undefined") { + await GetRewrite() + }else { + if(!(await checkEnv())) return; + + console.log('\n================ 登录 ================') + for(let user of userList) { + console.log(`----------- 账号[${user.index}] -----------`) + await user.GetIsLogin(); + } + + let validUserList = userList.filter(x => x.valid) + + if(validUserList.length > 0) { + console.log('\n================ 任务 ================') + for(let user of validUserList) { + console.log(`----------- 账号[${user.index}] -----------`) + await user.IsSignDao(); + } + } + + await $.showmsg(); + } +})() +.catch((e) => console.log(e)) +.finally(() => $.done()) + +/////////////////////////////////////////////////////////////////// +async function GetRewrite() { +} + +async function checkEnv() { + if(userCookie) { + let splitor = envSplitor[0]; + for(let sp of envSplitor) { + if(userCookie.indexOf(sp) > -1) { + splitor = sp; + break; + } + } + for(let userCookies of userCookie.split(splitor)) { + if(userCookies) userList.push(new UserInfo(userCookies)) + } + userCount = userList.length + } else { + console.log('未找到CK') + return; + } + + console.log(`共找到${userCount}个账号`) + return true +} +//////////////////////////////////////////////////////////////////// +async function httpRequest(method,url) { + httpErr=null, httpReq=null, httpResp=null; + return new Promise((resolve) => { + $.send(method, url, async (err, req, resp) => { + httpErr=err, httpReq=req, httpResp=resp; + resolve({err,req,resp}) + }) + }); +} +//////////////////////////////////////////////////////////////////// +function Env(name,env) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); + return new class { + constructor(name,env) { + this.name = name + this.notifyStr = '' + this.startTime = (new Date).getTime() + Object.assign(this,env) + console.log(`${this.name} 开始运行:\n`) + } + 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 + } + 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 + } + send(m, t, e = (() => {})) { + if(m != 'get' && m != 'post' && m != 'put' && m != 'delete') { + console.log(`无效的http方法:${m}`); + return; + } + if(m == 'get' && t.headers) { + delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if(t.body && t.headers) { + if(!t.headers["Content-Type"]) t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + if(this.isSurge() || this.isLoon()) { + if(this.isSurge() && this.isNeedRewrite) { + t.headers = t.headers || {}; + Object.assign(t.headers, {"X-Surge-Skip-Scripting": !1}); + } + let conf = { + method: m, + url: t.url, + headers: t.headers, + timeout: t.timeout, + data: t.body + }; + if(m == 'get') delete conf.data + $axios(conf).then(t => { + const { + status: i, + request: q, + headers: r, + data: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }); + }).catch(err => console.log(err)) + } else if (this.isQuanX()) { + t.method = m.toUpperCase(), this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), + $task.fetch(t).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => e(t)) + } else if (this.isNode()) { + this.got = this.got ? this.got : require("got"); + const { + url: s, + ...i + } = t; + this.instance = this.got.extend({ + followRedirect: false + }); + this.instance[m](s, i).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => { + const { + message: s, + request: q, + response: i + } = t; + e(s, q, i) + }) + } + } + time(t,x=null) { + let xt = x ? new Date(x) : new Date + let e = { + "M+": xt.getMonth() + 1, + "d+": xt.getDate(), + "h+": xt.getHours(), + "m+": xt.getMinutes(), + "s+": xt.getSeconds(), + "q+": Math.floor((xt.getMonth() + 3) / 3), + S: xt.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (xt.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let s in e) + new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); + return t + } + async showmsg() { + if(!this.notifyStr) return; + let notifyBody = this.name + " 运行通知\n\n" + this.notifyStr + if($.isNode()){ + var notify = require('./sendNotify'); + console.log('\n============== 推送 ==============') + await notify.sendNotify(this.name, notifyBody); + } else { + this.msg(notifyBody); + } + } + logAndNotify(str) { + console.log(str) + this.notifyStr += str + this.notifyStr += '\n' + } + logAndNotifyWithTime(str) { + let t = '['+this.time('hh:mm:ss.S')+']'+str + console.log(t) + this.notifyStr += t + this.notifyStr += '\n' + } + logWithTime(str) { + console.log('['+this.time('hh:mm:ss.S')+']'+str) + } + 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 + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); + let h = ["", "============== 系统通知 =============="]; + h.push(e), + s && h.push(s), + i && h.push(i), + console.log(h.join("\n")) + } + getMin(a,b){ + return ((anumStr.length) ? (length-numStr.length) : 0 + let retStr = '' + for(let i=0; i setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`) + if(this.isSurge() || this.isQuanX() || this.isLoon()) $done(t) + } + }(name,env) +} diff --git a/maisiweier.js b/maisiweier.js new file mode 100644 index 0000000..95941e4 --- /dev/null +++ b/maisiweier.js @@ -0,0 +1,415 @@ + +/** + + * 麦斯威尔福利社 + * mswefls + * Author: Mist + * Date: 2024-07-20 + * cron "10 12 * * *" mswefls.js + * export mswefls= openid 多账号换行或者#分隔 + */ +// ============================================================================================================ +const $ = new Env('vx麦斯威尔福利社') +const axios = require('axios') +const md5 = require('md5') +const env_name = 'mswefls' //环境变量名字 +const env = process.env[env_name] || '' //获取环境变量 +const Notify = 1//是否通知, 1通知, 0不通知. 默认通知 +const debug = 0//是否调试, 1调试, 0不调试. 默认不调试 +let scriptVersionNow = "1.0.0";//脚本版本号 +let msg = ""; +// ==================================异步顺序============================================================================== +!(async () => { + //await getNotice(); //远程通知 + //await getVersion("yang88758/ohhh154@main/mswefls.js"); + await main();//主函数 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +//==================================脚本入口函数main()============================================================== +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}`) + return + } + let user_ck = env.split('\n') + DoubleLog(`\n========== 共找到 ${user_ck.length} 个账号 ==========`); + let index = 1 //用来给账号标记序号, 从1开始 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + let ck_info = ck.split('&') + let openId = ck_info[0] + let user = { + index: index, + openId, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + await userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`账号[${user.index}]随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +// ======================================开始任务========================================= +async function userTask(user) { + console.log(`\n============= 账号[${user.index}]开始任务 =============`) + await wait (1) + await SignInDailyScore(user) + await wait (1) + await ShareDailyScore(user) + await wait (1) + await UserSign(user) + await wait (1) + await UserShare(user) + await wait (1) + for (let i = 0; i < 3; i++) { + await Watering(user); + await wait (2) + } + await GetUserPoint(user) + +} +// ============================================================================================================================= +//签到 +async function SignInDailyScore(user) { + try { + let timestamp = getTimestamp(); + let sign = md5(`timestamp=${timestamp}&openid=${user.openId}&key=JDEMaxwellminiapp#2021!`).toUpperCase(); + let urlObject = { + method: 'post', + url: 'https://jde.mtbcpt.com/api/JDEMaxwellApi/SignInDailyScore', + headers: { + 'Host': 'jde.mtbcpt.com', + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + "openId": user.openId, + "timestamp": timestamp, + "sign": sign, + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.state == true) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊${result.msg}🎉`); + }else{ + DoubleLog(`🌸账号[${user.index}]签到-失败:${result.msg}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e); + } +} +//分享加积分 +async function ShareDailyScore(user) { + try { + let timestamp = getTimestamp(); + let sign = md5(`timestamp=${timestamp}&openid=${user.openId}&key=JDEMaxwellminiapp#2021!`).toUpperCase(); + let urlObject = { + method: 'post', + url: `https://jde.mtbcpt.com/api/JDEMaxwellApi/ShareDailyScore`, + headers: { + 'Host': 'jde.mtbcpt.com', + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data:{ + "through": true, + "openId": user.openId, + "timestamp": timestamp, + "sign": sign, + } + + } + // + let { data: result} = await axios.request(urlObject) + //console.log(urlObject); + //console.log(result); + if (result?.state == true) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊${result.msg}🎉`); + }if(result?.state == false) { + DoubleLog(`🌸账号[${user.index}]分享-失败:${result.msg}❌`) + } + } catch (e) { + //打印错误信息 + console.log(e.response.data); + } +} +//浇水签到 +async function UserSign(user) { + try { + let timestamp = getTimestamp(); + let sign = md5(`timestamp=${timestamp}&openid=${user.openId}&key=JDEMaxwellminiapp#2021!`).toUpperCase(); + let urlObject = { + method: 'post', + url: 'https://jde.mtbcpt.com/api/JDEMaxwellApi/UserSign', + headers: { + 'Host': 'jde.mtbcpt.com', + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + + "openId": user.openId, + "timestamp": timestamp, + "sign": sign, + + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.state == true) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊水滴签到-领取成功${result.msg}🎉`); + }else{ + DoubleLog(`🌸账号[${user.index}]水滴签到-失败:${result.msg}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e.response.data); + } +} +//分享领水滴 +async function UserShare(user) { + try { + let timestamp = getTimestamp(); + let sign = md5(`timestamp=${timestamp}&openid=${user.openId}&key=JDEMaxwellminiapp#2021!`).toUpperCase(); + let urlObject = { + method: 'post', + url: 'https://jde.mtbcpt.com/api/JDEMaxwellApi/UserShare', + headers: { + 'Host': 'jde.mtbcpt.com', + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + + "openId": user.openId, + "timestamp": timestamp, + "sign": sign, + + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.state == true) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊任务分享领水滴-领取成功${result.msg}🎉`); + }else{ + DoubleLog(`🌸账号[${user.index}]任务分享领水滴-失败:${result.msg}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e.response.data); + } +} +//浇水 +async function Watering(user) { + try { + let timestamp = getTimestamp(); + let sign = md5(`timestamp=${timestamp}&openid=${user.openId}&key=JDEMaxwellminiapp#2021!`).toUpperCase(); + let urlObject = { + method: 'post', + url: 'https://jde.mtbcpt.com/api/JDEMaxwellApi/UserWatering', + headers: { + 'Host': 'jde.mtbcpt.com', + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + + "openId": user.openId, + "timestamp": timestamp, + "sign": sign, + + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.state == true) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊浇水-成功${result.msg}🎉`); + }else{ + DoubleLog(`🌸账号[${user.index}]浇水-失败:${result.msg}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e.response.data); + } +} +async function GetUserPoint(user) { + try { + let timestamp = getTimestamp(); + let sign = md5(`timestamp=${timestamp}&openid=${user.openId}&key=JDEMaxwellminiapp#2021!`).toUpperCase(); + let urlObject = { + method: 'post', + url: 'https://jde.mtbcpt.com/api/JDEMWMall/GetUserPoint', + headers: { + 'Host': 'jde.mtbcpt.com', + 'content-type': 'application/json', + 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129', + }, + data: { + + "openId": user.openId, + "timestamp": timestamp, + "sign": sign, + + } + }; + //console.log(urlObject); + let { data: result} = await axios.request(urlObject) + if (result?.state == true) { + //打印签到结果 + DoubleLog(`🌸账号[${user.index}]` + `🕊${result.msg}为[${result.data}]💰`); + }else{ + DoubleLog(`🌸账号[${user.index}]积分查询失败:${result.msg}❌`) + } + + } catch (e) { + //打印错误信息 + console.log('以下是报错输出:'); + console.log(e.response.data); + } +} +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} +/** +* ======================================================随机等待 1-5 秒============================================ +*/ +function sjwait() { + return new Promise(function (resolve) { + let waitTime = Math.floor(Math.random() * 4000 + 1000); + setTimeout(resolve, waitTime); + }); +} +// ==========================================================13位时间戳===================================================== +function getTimestamp() { + return new Date().getTime(); +} +//===============================================网络请求httpRequest========================================= +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//==============================================Debug模式=============================================== +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "http://tfapi.cn/tl.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +//==============================================获取远程版本================================================= +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n============= 当前版本:${scriptVersionNow} 🌟 最新版本:${scriptVersionLatest} =============`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} + +//=============================================================================================================================================== +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/mtf.js b/mtf.js new file mode 100644 index 0000000..fbe119e --- /dev/null +++ b/mtf.js @@ -0,0 +1,844 @@ +/** + * + * 项目昵称:摩托范 + * + * cron 0 0,7 * * * mtf.js + * + * 9-5 签到兑换实物 + * + * ========= 青龙--配置文件 ========= + * 变量格式: export mtf_data='' ,多账号用 换行 或 @ 分割 + * 抓域名 api.58moto.com 下请求中 token和uid 的值填入变量 用&连接 + */ + + const { log } = require("console"); + + const $ = new Env("摩托范"); + const notify = $.isNode() ? require("./sendNotify") : ""; + const Notify = 1 + const debug = 0 + //--------------------------------------------------------------------------------------------------------- + let ckStr = ($.isNode() ? process.env.mtf_data : $.getdata('mtf_data')) || ''; + let msg, ck; + let ck_status = true; + let host = 'api.58moto.com'; + let hostname = 'https://' + host; + //let UA = $.isNode() ? (require('./user_agents.js').user_agent) : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36"; + //--------------------------------------------------------------------------------------------------------- + let Version = `V 0.0.1` + let Change = '每天签到 ,兑换实物' + let thank = `\n感谢 群友 的投稿\n` + let githubproxy = "https://ghproxy.com/" + //--------------------------------------------------------------------------------------------------------- + + async function tips(ckArr) { + DoubleLog(`当前脚本版本${Version}\n📌,如果脚本版本不一致请及时更新`); + // DoubleLog(`${thank}`); + //await wyy(); //网易云API 查询 失效则不能运行 + DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); + } + + + !(async () => { + let ckArr = await checkEnv(ckStr, "mtf_data"); + console.log("开始获取公告") + //await ScriptText("demo"); //远程获取公告 + await tips(ckArr); + for (let index = 0; index < ckArr.length; index++) { + let num = index + 1; + DoubleLog(`\n-------- 开始【第 ${num} 个账号】--------`); + ck = ckArr[index].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + debugLog(`【debug】 这是你第 ${num} 账号信息:\n ${ck}`); //单账号多变量 调用格式 ck[0] 和ck[1],ck[0]指的就是user1 ck[1]就是token1 + await start(); //单独拿出来一个账号执行 strat函数任务 + } + await SendMsg(msg); + + })() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + + async function start() { + + console.log("\n开始 用户信息查询"); + await userinfo(); + await $.wait(3 * 1000); + //weekdate = local_year() + local_month_two(); +local_day_two(); 年份月份日期 + console.log("\n开始 签到"); + await signin(); + await $.wait(3 * 1000); + + console.log("\n开始 查询日常任务"); + await taskList(); + await $.wait(3 * 1000); + //以上 三行代码可以复制 只需要改动 函数名和输出 + + + + } + + + /** + * 用户信息 httpGet或者httpPost 看你的请求头 + */ + async function userinfo() { + try { + let url = { + url: `${hostname}/user/center/info/principal`, + headers: { + "Host": host, + "token": ck[0], + "content-type": "application/x-www-form-urlencoded" + }, + body: "uid=" + ck[1] + + }; + let result = await httpPost(url, `用户信息查询`); + + console.log(result); + if (result?.code == 0) { + DoubleLog(`查询成功:当前手机号${result.data.mobile} \n 用户昵称为${result.data.username} 🎉`); + await wait(3); + } else { + DoubleLog(`查询: 失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + + /** + * 签到 httpGet或者httpPost 看你的请求头 + */ + async function signin() { + try { + let url = { + url: `${hostname}/coins/task/dailyCheckIn`, + headers: { + "Host": host, + "token": ck[0], + "content-type": "application/x-www-form-urlencoded" + }, + body: "uid=" + ck[1] + "&weekDate=" + local_year() + 0 +parseFloat(local_month()+1) + local_day_two() + + }; + let result = await httpPost(url, `签到`); + + console.log(result); + if (result?.code == 0) { + DoubleLog(`签到成功:${result.data.contentDesc} 🎉`); + await wait(3); + } else if (result?.code == 300101) { + DoubleLog(`签到失败:${result.msg},请勿重复签到`); + } else { + DoubleLog(`签到: 失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + + } + + /** + * 查询日常任务 httpGet或者httpPost 看你的请求头 + */ + async function taskList() { + try { + let url = { + url: `${hostname}/coins/task/taskList`, + headers: { + "Host": host, + "token": ck[0], + "version": "3.52.40" + }, + + }; + let result = await httpGet(url, `日常任务查询`); + + console.log(result); + if (result?.code == 0) { + for (var invite = 0; invite < result.data.length; invite++) { + DoubleLog(`查询成功:第` + parseFloat(invite+1) + `个任务为${result.data[invite].taskName} \n 任务ID为${result.data[invite].taskId} 🎉`); + await wait(2); + } + } else { + DoubleLog(`查询: 失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + + /** + * 积分 httpPost //参考上面的即可 这个函数也可以复制 改下相应的就可以 + */ + async function jifen() { + try { + let url = { + url: `${hostname}/xxx/xxx`, + headers: { + "Host": host, + "User-Agent": "xxx", + "Cookie": ck[0], + } + }; + let result = await httpGet(url, `查询积分`); + + console.log(result); + if (result?.code == 200) { + DoubleLog(`查询积分:${result?.chnDesc} 🎉,当前积分:${result?.recordList.pointValueAfterChange} `); + await wait(3); + } else { + DoubleLog(`查询积分: 失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + + + + + + + //---------------------这里往下不要动+++--------------------------------- + + + // #region ******************************************************** 固定代码 ******************************************************** + /** + * 变量检查 + */ + async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) + } + +//----------------------------------获取公告和脚本版本 + + async function ScriptText(name) { + try { + let url = { + url: githubproxy + `https://raw.githubusercontent.com/zhaoshicong/QLScriptPublic/main/text.json`, + }; + let result = await httpGet(url, `输出`); + //console.log(result); + if (result?.Status == "true") { + DoubleLog(`公告:${result.Notice} 🎉`); + DoubleLog(`远程仓库脚本最新版本为:${result.Script[name].version} \n 脚本更新内容为${result.Script[name].text}`) + await wait(1); + } else { + DoubleLog(`获取公告及其版本: 失败 ❌ 了呢,原因未知!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + + } + + + + + /** + * 发送消息 + */ + async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } + } + + /** + * 双平台log输出 + */ + function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(` ${data}`); + msg += `\n ${data}`; + } + } else { + console.log(` ${data}`); + msg += `\n ${data}`; + } + + } + + /** + * 随机 数字 + 大写字母 生成 + */ + function randomszdx(e) { + e = e || 32; + var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", + a = t.length, + n = ""; + + for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); + return n; + } + + + /** + * 随机 数字 + 小写字母 生成 + */ + function randomszxx(e) { + e = e || 32; + var t = "qwertyuioplkjhgfdsazxcvbnm1234567890", + a = t.length, + n = ""; + + for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); + return n; + } + + + + + /** + * 随机整数生成 + */ + function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); + } + + + /** + * 时间戳 13位 + */ + function ts13() { + return Math.round(new Date().getTime()).toString(); + } + + /** + * 时间戳 10位 + */ + function ts10() { + return Math.round(new Date().getTime() / 1000).toString(); + } + + /** + * 获取当前小时数 + */ + function local_hours() { + let myDate = new Date(); + let h = myDate.getHours(); + return h; + } + + /** + * 获取当前分钟数 + */ + function local_minutes() { + let myDate = new Date(); + let m = myDate.getMinutes(); + return m; + } + + + /** + * 获取当前年份 2022 + */ + function local_year() { + let myDate = new Date(); + y = myDate.getFullYear(); + return y; + } + + /** + * 获取当前月份(数字) 5月 + */ + function local_month() { + let myDate = new Date(); + let m = myDate.getMonth(); + return m; + } + + + /** + * 获取当前月份(数字) 05月 补零 + */ + function local_month_two() { + let myDate = new Date(); + let m = myDate.getMonth(); + if (m.toString().length == 1) { + m = `0${m}` + } + return m; + } + + /** + * 获取当前天数(数字) 5日 + */ + function local_day() { + let myDate = new Date(); + let d = myDate.getDate(); + return d; + } + + + /** + * 获取当前天数 05日 补零 + */ + function local_day_two() { + let myDate = new Date(); + let d = myDate.getDate(); + if (d.toString().length == 1) { + d = `0${d}` + } + return d; + } + + + + /** + * 等待 X 秒 + */ + function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); + } + + + /** + * 每日网抑云 + */ + function wyy() { + return new Promise((resolve) => { + let url = { + url: `http://ovooa.com/API/wyrp/api.php`, + } + $.get(url, async (err, resp, data) => { + try { + data = JSON.parse(data); + // console.log(data); + console.log(`网抑云时间: ${data.data.Content} by--${data.data.Music}`) + msg = `[网抑云时间]: ${data.data.Content} by--${data.data.Music}` + // DoubleLog(`[网抑云时间]: ${data.data.Content} by--${data.data.Music}`); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }, timeout = 3) + }) + } + + /** + * get请求 + */ + async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }, + timeout + ); + }); + } + + /** + * post请求 + */ + async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }, + timeout + ); + }); + } + + /** + * 网络请求 (get, post等) + */ + async function httpRequest(postOptionsObject, tip, timeout = 3) { + return new Promise((resolve) => { + + let Options = postOptionsObject; + let request = require('request'); + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); + console.log(Options); + } + + request(Options, async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (!result) return; + resolve(result); + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }), timeout + + }); + } + + + /** + * debug调试 + */ + function debugLog(...args) { + if (debug) { + console.log(...args); + } + } + + + + // /** + // * 单名字 Env + // */ + // function Env() { + // return new class { + // isNode() { + // return "undefined" != typeof module && !!module.exports + // } + // }() + // } + + + // md5 + function MD5Encrypt(a) { function b(a, b) { return a << b | a >>> 32 - b } function c(a, b) { var c, d, e, f, g; return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f } function d(a, b, c) { return a & b | ~a & c } function e(a, b, c) { return a & c | b & ~c } function f(a, b, c) { return a ^ b ^ c } function g(a, b, c) { return b ^ (a | ~c) } function h(a, e, f, g, h, i, j) { return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e) } function i(a, d, f, g, h, i, j) { return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d) } function j(a, d, e, g, h, i, j) { return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d) } function k(a, d, e, f, h, i, j) { return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d) } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;)b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | a.charCodeAt(i) << h, i++; return b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++)b = a >>> 8 * c & 255, e = "0" + b.toString(16), d += e.substr(e.length - 2, 2); return d } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128), b += String.fromCharCode(63 & d | 128)) } return b } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16)p = t, q = u, r = v, s = w, t = h(t, u, v, w, x[o + 0], y, 3614090360), w = h(w, t, u, v, x[o + 1], z, 3905402710), v = h(v, w, t, u, x[o + 2], A, 606105819), u = h(u, v, w, t, x[o + 3], B, 3250441966), t = h(t, u, v, w, x[o + 4], y, 4118548399), w = h(w, t, u, v, x[o + 5], z, 1200080426), v = h(v, w, t, u, x[o + 6], A, 2821735955), u = h(u, v, w, t, x[o + 7], B, 4249261313), t = h(t, u, v, w, x[o + 8], y, 1770035416), w = h(w, t, u, v, x[o + 9], z, 2336552879), v = h(v, w, t, u, x[o + 10], A, 4294925233), u = h(u, v, w, t, x[o + 11], B, 2304563134), t = h(t, u, v, w, x[o + 12], y, 1804603682), w = h(w, t, u, v, x[o + 13], z, 4254626195), v = h(v, w, t, u, x[o + 14], A, 2792965006), u = h(u, v, w, t, x[o + 15], B, 1236535329), t = i(t, u, v, w, x[o + 1], C, 4129170786), w = i(w, t, u, v, x[o + 6], D, 3225465664), v = i(v, w, t, u, x[o + 11], E, 643717713), u = i(u, v, w, t, x[o + 0], F, 3921069994), t = i(t, u, v, w, x[o + 5], C, 3593408605), w = i(w, t, u, v, x[o + 10], D, 38016083), v = i(v, w, t, u, x[o + 15], E, 3634488961), u = i(u, v, w, t, x[o + 4], F, 3889429448), t = i(t, u, v, w, x[o + 9], C, 568446438), w = i(w, t, u, v, x[o + 14], D, 3275163606), v = i(v, w, t, u, x[o + 3], E, 4107603335), u = i(u, v, w, t, x[o + 8], F, 1163531501), t = i(t, u, v, w, x[o + 13], C, 2850285829), w = i(w, t, u, v, x[o + 2], D, 4243563512), v = i(v, w, t, u, x[o + 7], E, 1735328473), u = i(u, v, w, t, x[o + 12], F, 2368359562), t = j(t, u, v, w, x[o + 5], G, 4294588738), w = j(w, t, u, v, x[o + 8], H, 2272392833), v = j(v, w, t, u, x[o + 11], I, 1839030562), u = j(u, v, w, t, x[o + 14], J, 4259657740), t = j(t, u, v, w, x[o + 1], G, 2763975236), w = j(w, t, u, v, x[o + 4], H, 1272893353), v = j(v, w, t, u, x[o + 7], I, 4139469664), u = j(u, v, w, t, x[o + 10], J, 3200236656), t = j(t, u, v, w, x[o + 13], G, 681279174), w = j(w, t, u, v, x[o + 0], H, 3936430074), v = j(v, w, t, u, x[o + 3], I, 3572445317), u = j(u, v, w, t, x[o + 6], J, 76029189), t = j(t, u, v, w, x[o + 9], G, 3654602809), w = j(w, t, u, v, x[o + 12], H, 3873151461), v = j(v, w, t, u, x[o + 15], I, 530742520), u = j(u, v, w, t, x[o + 2], J, 3299628645), t = k(t, u, v, w, x[o + 0], K, 4096336452), w = k(w, t, u, v, x[o + 7], L, 1126891415), v = k(v, w, t, u, x[o + 14], M, 2878612391), u = k(u, v, w, t, x[o + 5], N, 4237533241), t = k(t, u, v, w, x[o + 12], K, 1700485571), w = k(w, t, u, v, x[o + 3], L, 2399980690), v = k(v, w, t, u, x[o + 10], M, 4293915773), u = k(u, v, w, t, x[o + 1], N, 2240044497), t = k(t, u, v, w, x[o + 8], K, 1873313359), w = k(w, t, u, v, x[o + 15], L, 4264355552), v = k(v, w, t, u, x[o + 6], M, 2734768916), u = k(u, v, w, t, x[o + 13], N, 1309151649), t = k(t, u, v, w, x[o + 4], K, 4149444226), w = k(w, t, u, v, x[o + 11], L, 3174756917), v = k(v, w, t, u, x[o + 2], M, 718787259), u = k(u, v, w, t, x[o + 9], N, 3951481745), t = c(t, p), u = c(u, q), v = c(v, r), w = c(w, s); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase() } + + + + + /* SHA256 logical functions */ + function rotateRight(n, x) { + return ((x >>> n) | (x << (32 - n))); + } + function choice(x, y, z) { + return ((x & y) ^ (~x & z)); + } + function majority(x, y, z) { + return ((x & y) ^ (x & z) ^ (y & z)); + } + function sha256_Sigma0(x) { + return (rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x)); + } + function sha256_Sigma1(x) { + return (rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x)); + } + function sha256_sigma0(x) { + return (rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3)); + } + function sha256_sigma1(x) { + return (rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10)); + } + function sha256_expand(W, j) { + return (W[j & 0x0f] += sha256_sigma1(W[(j + 14) & 0x0f]) + W[(j + 9) & 0x0f] + + sha256_sigma0(W[(j + 1) & 0x0f])); + } + + /* Hash constant words K: */ + var K256 = new Array( + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 + ); + + /* global arrays */ + var ihash, count, buffer; + var sha256_hex_digits = "0123456789abcdef"; + + /* Add 32-bit integers with 16-bit operations (bug in some JS-interpreters: + overflow) */ + function safe_add(x, y) { + var lsw = (x & 0xffff) + (y & 0xffff); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xffff); + } + + /* Initialise the SHA256 computation */ + function sha256_init() { + ihash = new Array(8); + count = new Array(2); + buffer = new Array(64); + count[0] = count[1] = 0; + ihash[0] = 0x6a09e667; + ihash[1] = 0xbb67ae85; + ihash[2] = 0x3c6ef372; + ihash[3] = 0xa54ff53a; + ihash[4] = 0x510e527f; + ihash[5] = 0x9b05688c; + ihash[6] = 0x1f83d9ab; + ihash[7] = 0x5be0cd19; + } + + /* Transform a 512-bit message block */ + function sha256_transform() { + var a, b, c, d, e, f, g, h, T1, T2; + var W = new Array(16); + + /* Initialize registers with the previous intermediate value */ + a = ihash[0]; + b = ihash[1]; + c = ihash[2]; + d = ihash[3]; + e = ihash[4]; + f = ihash[5]; + g = ihash[6]; + h = ihash[7]; + + /* make 32-bit words */ + for (var i = 0; i < 16; i++) + W[i] = ((buffer[(i << 2) + 3]) | (buffer[(i << 2) + 2] << 8) | (buffer[(i << 2) + 1] + << 16) | (buffer[i << 2] << 24)); + + for (var j = 0; j < 64; j++) { + T1 = h + sha256_Sigma1(e) + choice(e, f, g) + K256[j]; + if (j < 16) T1 += W[j]; + else T1 += sha256_expand(W, j); + T2 = sha256_Sigma0(a) + majority(a, b, c); + h = g; + g = f; + f = e; + e = safe_add(d, T1); + d = c; + c = b; + b = a; + a = safe_add(T1, T2); + } + + /* Compute the current intermediate hash value */ + ihash[0] += a; + ihash[1] += b; + ihash[2] += c; + ihash[3] += d; + ihash[4] += e; + ihash[5] += f; + ihash[6] += g; + ihash[7] += h; + } + + /* Read the next chunk of data and update the SHA256 computation */ + function sha256_update(data, inputLen) { + var i, index, curpos = 0; + /* Compute number of bytes mod 64 */ + index = ((count[0] >> 3) & 0x3f); + var remainder = (inputLen & 0x3f); + + /* Update number of bits */ + if ((count[0] += (inputLen << 3)) < (inputLen << 3)) count[1]++; + count[1] += (inputLen >> 29); + + /* Transform as many times as possible */ + for (i = 0; i + 63 < inputLen; i += 64) { + for (var j = index; j < 64; j++) + buffer[j] = data.charCodeAt(curpos++); + sha256_transform(); + index = 0; + } + + /* Buffer remaining input */ + for (var j = 0; j < remainder; j++) + buffer[j] = data.charCodeAt(curpos++); + } + + /* Finish the computation by operations such as padding */ + function sha256_final() { + var index = ((count[0] >> 3) & 0x3f); + buffer[index++] = 0x80; + if (index <= 56) { + for (var i = index; i < 56; i++) + buffer[i] = 0; + } else { + for (var i = index; i < 64; i++) + buffer[i] = 0; + sha256_transform(); + for (var i = 0; i < 56; i++) + buffer[i] = 0; + } + buffer[56] = (count[1] >>> 24) & 0xff; + buffer[57] = (count[1] >>> 16) & 0xff; + buffer[58] = (count[1] >>> 8) & 0xff; + buffer[59] = count[1] & 0xff; + buffer[60] = (count[0] >>> 24) & 0xff; + buffer[61] = (count[0] >>> 16) & 0xff; + buffer[62] = (count[0] >>> 8) & 0xff; + buffer[63] = count[0] & 0xff; + sha256_transform(); + } + + /* Split the internal hash values into an array of bytes */ + function sha256_encode_bytes() { + var j = 0; + var output = new Array(32); + for (var i = 0; i < 8; i++) { + output[j++] = ((ihash[i] >>> 24) & 0xff); + output[j++] = ((ihash[i] >>> 16) & 0xff); + output[j++] = ((ihash[i] >>> 8) & 0xff); + output[j++] = (ihash[i] & 0xff); + } + return output; + } + + /* Get the internal hash as a hex string */ + function sha256_encode_hex() { + var output = new String(); + for (var i = 0; i < 8; i++) { + for (var j = 28; j >= 0; j -= 4) + output += sha256_hex_digits.charAt((ihash[i] >>> j) & 0x0f); + } + return output; + } + + /* Main function: returns a hex string representing the SHA256 value of the + given data */ + function sha256_Encrypt(data) { + sha256_init(); + sha256_update(data, data.length); + sha256_final(); + return sha256_encode_hex(); + } + + + + // 完整 Env + 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) } + + //#endregion + diff --git a/musi.js b/musi.js new file mode 100644 index 0000000..99df15c --- /dev/null +++ b/musi.js @@ -0,0 +1,572 @@ + +/** + * 慕思 + * const $ = new Env("慕思"); + * cron 10 6,15 * * * 慕思.js + * 活动入口:https://pic.imgdb.cn/item/64eaffc4661c6c8e54806be6.jpg + + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export mshy='api_token#openId' + * 自己抓包 请求头里的 api_token,请求包里的 openId + * 抓包后不要打开小程序避免刷新了token,有效期待测试,如出现 “Token有误” 则是 token过期了请重新抓取 + * 多账号可用 换行、&、@ 符号隔开,支持新建多个同名环境变量来设置多账号 + * 奖励:签到每天得积分,积分兑换实物 + * ==================================== + */ +const $ = new Env("慕思"); +const utils = require("./utils") +let envParams = 'mshy'; + +let envSplitor = ['\n', '@', '&'] + +let processEnvParams = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || ''; + +let initedJobForTokens = [] +let currentUserIndex = 0 + +class JobTask { + constructor(str) { + this.requestUA = generateRandomUA(); + this.index = ++currentUserIndex + this.valid = false; + try { + [this.activedAuthToken, this.openId] = str; + } catch (error) { + console.log('参数不完整:自己抓包 请求头里的 api_token,请求包里的 openId') + } + } + + async taskApi (fn, method, url, body, moreHeaders = {}) { + let result = null + try { + let urlObject = { + url: url, + headers: { + 'Accept': '*/*', + 'Accept-Language': 'zh-CN,zh', + 'Connection': 'keep-alive', + 'Host': 'atom.musiyoujia.com', + 'Referer': 'https://servicewechat.com/wx03527497c5369a2c/94/page-frame.html', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': this.requestUA || '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 XWEB/8379', + 'api_client_code': '65', + 'api_token': this.activedAuthToken, + 'api_version': '1.0.0', + 'xweb_xhr': '1', + 'Content-Type': 'application/json', + ...moreHeaders + }, + timeout: 60000, + } + if (this.requestUA) { + urlObject.headers['User-Agent'] = this.requestUA + } + if (body) { + urlObject.body = body + // urlObject.headers['Content-Length'] = body?.length + } + // console.log('urlObject:', urlObject); + await httpRequest(method, urlObject).then(async (ret) => { + if (ret.resp?.statusCode == 200) { + if (ret.resp?.body) { + result = JSON.parse(ret.resp.body) + } else { + console.log(`账号[${this.index}]调用${method}[${fn}]出错,返回为空`) + } + } else { + console.log(`账号[${this.index}]调用${method}[${fn}]出错,返回状态码[${ret.resp?.statusCode || ''}]`, '返回结果:', ret.resp?.body || ret?.err) + } + }) + } catch (e) { + console.log(e) + } finally { + return Promise.resolve(result); + } + } + + async GetUserInfo () { + try { + let fn = 'GetUserInfo' + let method = 'post' + let url = `https://atom.musiyoujia.com/member/wechatlogin/selectuserinfo`; + const timestamp = new Date().getTime(); + let moreHeaders = { + 'api_timestamp': timestamp, + 'api_sign': utils?.MD5_Encrypt(`api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase() + } + let body = `{"appId":"wx03527497c5369a2c","appType":"WECHAT_MINI_PROGRAM","openId":"${this.openId}"}`; + await this.taskApi(fn, method, url, body, moreHeaders).then(async (result) => { + if (result?.msg === "success") { + this.valid = true; + this.customId = result?.data.resMemberInfo.memberId; + console.log(`账号[${this.index}] 查询个人信息成功,积分:${result?.data?.memberInfo?.pointInfo?.point}`) + } else { + console.log(`账号[${this.index}] 查询个人信息失败:${result?.msg || JSON.stringify(result)}`) + this.valid = false + } + }) + } catch (e) { + console.log(e) + } + } + + async GetJob () { + try { + let fn = 'GetJob' + let method = 'post' + let url = `https://atom.musiyoujia.com/member/memberbehavior/getBehaviorInfos`; + let body = `{"appId":"wx03527497c5369a2c","appType":"WECHAT_MINI_PROGRAM","behaviorIds":[1,2,10203,10204,10205,5],"sourceChannel":"会员小程序","source":"${this.customId}","openId":"${this.openId}"}`; + const timestamp = new Date().getTime(); + let moreHeaders = { + 'api_timestamp': timestamp, + 'api_sign': utils?.MD5_Encrypt(`api_token=${this.activedAuthToken}&api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase() + } + await this.taskApi(fn, method, url, body, moreHeaders).then(async (result) => { + if (result?.msg === "success") { + this.isSigned = result?.data[0].acts['每天已获得积分次数'] === 1; + console.log(`账号[${this.index}] 获取任务列表成功,${this.isSigned ? '已签到' : '未签到'}`) + } else { + console.log(`账号[${this.index}] 获取任务列表失败:${result?.msg || JSON.stringify(result)}`) + } + }) + } catch (e) { + console.log(e) + } + } + + async Sign () { + try { + let fn = 'Sign' + let method = 'post' + let url = `https://atom.musiyoujia.com/member/memberbehavior/add`; + const currentDate = new Date(); + const year = currentDate.getFullYear(); + const month = currentDate.getMonth() + 1; + const day = currentDate.getDate(); + let body = `{"appId":"wx03527497c5369a2c","appType":"WECHAT_MINI_PROGRAM","osType":"windows","model":"microsoft","browser":"微信小程序","platform":"1","sourceType":"5","sourceChannel":"会员小程序","siteId":"","visitorId":"","deviceId":"","spotId":"","campaignId":"","deviceType":"","eventLabel":"","eventValue":"","eventAttr2":"${`${year}.${month}.${day}`}","eventAttr3":"","eventAttr4":"","eventAttr5":"","eventAttr6":"","googleCampaignName":"","googleCampaignSource":"","googleCampaignMedium":"","googleCampaignContent":"","memberType":"DeRUCCI","customId":"${this.customId}","locationUrl":"/pages/user/signIn","url":"/pages/user/signIn","pageTitle":"每日签到","logType":"event","behaviorIds":[1,3],"eventCategory":"用户签到","eventAction":"签到","eventAttr1":2,"openId":"${this.openId}"}`; + const timestamp = new Date().getTime(); + let moreHeaders = { + 'api_timestamp': timestamp, + 'api_sign': utils?.MD5_Encrypt(`api_token=${this.activedAuthToken}&api_client_code=65&api_version=1.0.0&api_timestamp=${timestamp}`)?.toUpperCase() + } + await this.taskApi(fn, method, url, body, moreHeaders).then(async (result) => { + if (result?.msg === "success") { + console.log(`账号[${this.index}] 签到成功,获得积分:${result?.data?.point}`) + } else { + console.log(`账号[${this.index}] 签到失败:${result?.msg || JSON.stringify(result)}`) + } + }) + } catch (e) { + console.log(e) + } + } + + async doTask () { + try { + console.log(`\n============= 账号[${this.index}] 开始获取任务=============`); + await this.GetJob(); + if (!this.isSigned) { + console.log(`\n============= 账号[${this.index}] 开始执行 签到任务=============`); + await this.Sign(); + } + } catch (e) { + console.log(e) + } + } +} + +!(async () => { + if (typeof $request !== "undefined") { + await GetRewrite() + } else { + if (!(await checkEnv())) return; + + console.log('\n================ 开始执行 ================') + for (let user of initedJobForTokens) { + console.log(`----------- 执行 第 [${user.index}] 个账号 -----------`) + await user.GetUserInfo(); + } + + let validUserList = initedJobForTokens.filter(x => x.valid) + + if (initedJobForTokens.length > 0) { + console.log('\n================ 任务队列构建完毕 ================') + for (let user of initedJobForTokens) { + console.log(`----------- 账号[${user.index}] -----------`) + await user.doTask(); + } + } else { + console.log('\n====幻生提示:无可用账号,请检查配置============ 任务结束 ================') + } + + await $.showmsg(); + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()) + +async function GetRewrite () { +} + +async function checkEnv () { + if (processEnvParams) { + let splitor = envSplitor[0]; + for (let sp of envSplitor) { + if (processEnvParams.indexOf(sp) > -1) { + splitor = sp; + break; + } + } + for (let token of processEnvParams.split(splitor)) { + if (token) initedJobForTokens.push(new JobTask(token?.split('#'))) + } + userCount = initedJobForTokens.length + } else { + console.log('未找到 配置信息,请检查是否配置 变量:', envParams) + return; + } + + console.log(`共找到${userCount}个账号`) + return true +} + +function generateRandomUA () { + var androidVersion = Math.floor(Math.random() * 6) + 8; // 生成 Android 版本号 8-13 之间的随机数 + var androidModels = [ + "PBBM00", "SM-G975F", "Pixel 4", "OnePlus 7T", "Redmi Note 8 Pro", + "iPhone X", "Galaxy S10", "Huawei P30 Pro", "LG G8 ThinQ", "Sony Xperia 1", + "Moto G7", "Nokia 9 PureView", "Xiaomi Mi 9", "Google Pixel 3a", "OnePlus 6T", + "Redmi Note 7", "Samsung Galaxy A50", "Huawei Mate 20 Pro", "LG V40 ThinQ", "Sony Xperia XZ3", + "Moto Z4", "Nokia 7.1", "Xiaomi Mi Mix 3", "Google Pixel 2", "OnePlus 5T", + "Redmi Note 6 Pro", "Samsung Galaxy A70", "Huawei P20 Pro", "LG G7 ThinQ", "Sony Xperia XZ2", + "Moto G6", "Nokia 6.1", "Xiaomi Mi 8", "Google Pixel", "OnePlus 5", + "Redmi Note 5 Pro", "Samsung Galaxy A30", "Huawei Mate 10 Pro", "LG V30", "Sony Xperia XZ1", + "Moto X4", "Nokia 5.1", "Xiaomi Mi 6", "Google Pixel XL", "OnePlus 3T", + "Redmi Note 4", "Samsung Galaxy A20", "Huawei P10 Plus", "LG G6", "Sony Xperia XZ", + "Moto G5 Plus", "Nokia 3.1", "Xiaomi Mi 5", "Google Pixel 3", "OnePlus 3", + "Redmi Note 3", "Samsung Galaxy A10", "Huawei Mate 9", "LG V20", "Sony Xperia X Compact", + "Moto G4", "Nokia 2.2", "Xiaomi Mi 4", "Google Pixel 2 XL", "OnePlus 2", + "Redmi Note 2", "Samsung Galaxy A5", "Huawei P9", "LG G5", "Sony Xperia X", + "Moto E6", "Nokia 1", "Xiaomi Mi 3", "Google Pixel 4", "OnePlus One", + "Redmi Note", "Samsung Galaxy A3", "Huawei P8", "LG G4", "Sony Xperia Z5", + "Moto E5", "Nokia 3310", "Xiaomi Mi 2", "Google Pixel 4 XL", "OnePlus Nord" + ]; // 常见的手机型号 + + var chromeVersion = "Chrome/" + (Math.floor(Math.random() * 30) + 50) + ".0." + (Math.floor(Math.random() * 1000) + 100); // 生成 Chrome 版本号 50.0.100-79.0.999 之间的随机数 + + var ua = "Mozilla/5.0 (Linux; Android " + androidVersion + "; " + androidModels[Math.floor(Math.random() * androidModels.length)] + " Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 " + chromeVersion + " Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;5.3.1;native_app"; + + return ua; +} + +// 无参数加密:请求地址+时间戳+A749380BBD5A4D93B55B4BE245A42988+Token +// 示例数据:https://api.ikbang.cn/v2/iclick-new/signIn/sign1692923683034A749380BBD5A4D93B55B4BE245A4298839D21A3B3EFF817154C47470BF13E62CF05F956446D53C359688A094E91A9B1F2A67065862923551F147C32E3AFAF778 +// 如果请求URL有参数则是 在时间戳 和 盐 之间增加 stringify后的参数(POST) + +async function httpRequest (method, url) { + httpErr = null, httpReq = null, httpResp = null; + return new Promise((resolve) => { + $.send(method, url, async (err, req, resp) => { + httpErr = err, httpReq = req, httpResp = resp; + resolve({ err, req, resp }) + }) + }); +} + +function Env (name, env) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("xcxx") > -1 && process.exit(0); + return new class { + constructor(name, env) { + this.name = name + this.notifyStr = '' + this.startTime = (new Date).getTime() + Object.assign(this, env) + console.log(`${this.name} 开始运行:\n`) + } + 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 + } + 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 + } + send (m, t, e = (() => { })) { + if (m != 'get' && m != 'post' && m != 'put' && m != 'delete') { + console.log(`无效的http方法:${m}`); + return; + } + if (m == 'get' && t.headers) { + delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if (t.body && t.headers) { + if (!t.headers["Content-Type"]) t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + if (this.isSurge() || this.isLoon()) { + if (this.isSurge() && this.isNeedRewrite) { + t.headers = t.headers || {}; + Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 }); + } + let conf = { + method: m, + url: t.url, + headers: t.headers, + timeout: t.timeout, + data: t.body + }; + if (m == 'get') delete conf.data + $axios(conf).then(t => { + const { + status: i, + request: q, + headers: r, + data: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }); + }).catch(err => console.log(err)) + } else if (this.isQuanX()) { + t.method = m.toUpperCase(), this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), + $task.fetch(t).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => e(t)) + } else if (this.isNode()) { + this.got = this.got ? this.got : require("got"); + const { + url: s, + ...i + } = t; + this.instance = this.got.extend({ + followRedirect: false + }); + this.instance[m](s, i).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => { + const { + message: s, + request: q, + response: i + } = t; + e(s, q, i) + }) + } + } + time (t, x = null) { + let xt = x ? new Date(x) : new Date + let e = { + "M+": xt.getMonth() + 1, + "d+": xt.getDate(), + "h+": xt.getHours(), + "m+": xt.getMinutes(), + "s+": xt.getSeconds(), + "q+": Math.floor((xt.getMonth() + 3) / 3), + S: xt.getMilliseconds() + }; + /(y+)/.test(t) && (t = t.replace(RegExp.$1, (xt.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let s in e) + new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); + return t + } + async showmsg () { + if (!this.notifyStr) return; + let notifyBody = this.name + " 运行通知\n\n" + this.notifyStr + if ($.isNode()) { + var notify = require('./sendNotify'); + console.log('\n============== 推送 ==============') + await notify.sendNotify(this.name, notifyBody); + } else { + this.msg(notifyBody); + } + } + logAndNotify (str) { + console.log(str) + this.notifyStr += str + this.notifyStr += '\n' + } + logAndNotifyWithTime (str) { + let t = '[' + this.time('hh:mm:ss.S') + ']' + str + console.log(t) + this.notifyStr += t + this.notifyStr += '\n' + } + logWithTime (str) { + console.log('[' + this.time('hh:mm:ss.S') + ']' + str) + } + 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 + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); + let h = ["", "============== 系统通知 =============="]; + h.push(e), + s && h.push(s), + i && h.push(i), + console.log(h.join("\n")) + } + getMin (a, b) { + return ((a < b) ? a : b) + } + getMax (a, b) { + return ((a < b) ? b : a) + } + padStr (num, length, padding = '0') { + let numStr = String(num) + let numPad = (length > numStr.length) ? (length - numStr.length) : 0 + let retStr = '' + for (let i = 0; i < numPad; i++) { + retStr += padding + } + retStr += numStr + return retStr; + } + json2str (obj, c, encodeUrl = false) { + let ret = [] + for (let keys of Object.keys(obj).sort()) { + let v = obj[keys] + if (v && encodeUrl) v = encodeURIComponent(v) + ret.push(keys + '=' + v) + } + return ret.join(c); + } + str2json (str, decodeUrl = false) { + let ret = {} + for (let item of str.split('&')) { + if (!item) continue; + let idx = item.indexOf('=') + if (idx == -1) continue; + let k = item.substr(0, idx) + let v = item.substr(idx + 1) + if (decodeUrl) v = decodeURIComponent(v) + ret[k] = v + } + return ret; + } + randomString (len, charset = 'abcdef0123456789') { + let str = ''; + for (let i = 0; i < len; i++) { + str += charset.charAt(Math.floor(Math.random() * charset.length)); + } + return str; + } + randomList (a) { + let idx = Math.floor(Math.random() * a.length) + return a[idx] + } + wait (t) { + return new Promise(e => setTimeout(e, t)) + } + done (t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`) + if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(t) + } + }(name, env) +} diff --git a/mxbc.js b/mxbc.js new file mode 100644 index 0000000..c6493f4 --- /dev/null +++ b/mxbc.js @@ -0,0 +1,303 @@ +/** + * 蜜雪冰城 + * cron 11 12 * * * mxbc.js + * 感谢大佬的代码 + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export mxbc_data='token @ token' + * + * 多账号用 换行 或 @ 分割 + * 抓包 mxsa.mxbc.net/api , 找到 Access-Token 即可 + * ==================================== + * + */ + + + +const $ = new Env("蜜雪冰城"); +const ckName = "mxbc_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let debug = 1; //Debug调试 0关闭 1开启 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + + //await getNotice() + console.log('\n================== 用户CK ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.user_info()); + await $.wait(1000); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + console.log('\n================== 每日签到 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.task_signin()); + await $.wait(1000); //延迟 1秒 可充分利用 $.环境函数 + } + } + await Promise.all(taskall); + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; //单账号多变量分隔符 + //let ck = str.split('&') + //this.data1 = ck[0] + this.ckStatus = true + + } + async user_info() { + try { + let options = { + url: `https://mxsa.mxbc.net/api/v1/customer/info?appId=d82be6bbc1da11eb9dd000163e122ecb&t=${ts13()}&sign=${getSHA256withRSA('appId=d82be6bbc1da11eb9dd000163e122ecb&t=' + ts13())}`, + headers: { + 'app': 'mxbc', + 'appchannel': 'xiaomi', + 'appversion': '3.0.3', + 'Access-Token': this.ck, + 'Host': 'mxsa.mxbc.net', + 'Connection': 'Keep-Alive', + //'Accept-Encoding': 'gzip', + 'User-Agent': 'okhttp/4.4.1' + } + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}] 用户CK有效: [${result.data.mobilePhone}] 雪王币剩余[${result.data.customerPoint}]`); + this.ckStatus = true + + } else { + DoubleLog(`账号[${this.index}] 用户CK失效:,原因未知!`); + this.ckStatus = false + + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_signin() { + try { + let options = { + url: `https://mxsa.mxbc.net/api/v1/customer/signin?appId=d82be6bbc1da11eb9dd000163e122ecb&t=${ts13()}&sign=${getSHA256withRSA('appId=d82be6bbc1da11eb9dd000163e122ecb&t=' + ts13())}`, + headers: { + 'app': 'mxbc', + 'appchannel': 'xiaomi', + 'appversion': '3.0.3', + 'Access-Token': this.ck, + 'Host': 'mxsa.mxbc.net', + 'Connection': 'Keep-Alive', + //'Accept-Encoding': 'gzip', + 'User-Agent': 'okhttp/4.4.1' + } + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}] 签到成功:累计签到 [${result.data.ruleValueGrowth}]天 本次获得[${result.data.ruleValuePoint}]币`); + this.ckStatus = true + + } else { + DoubleLog(`账号[${this.index}] 签到:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +var rs = require("jsrsasign"); + +var privateKeyString = `-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCtypUdHZJKlQ9L +L6lIJSphnhqjke7HclgWuWDRWvzov30du235cCm13mqJ3zziqLCwstdQkuXo9sOP +Ih94t6nzBHTuqYA1whrUnQrKfv9X4/h3QVkzwT+xWflE+KubJZoe+daLKkDeZjVW +nUku8ov0E5vwADACfntEhAwiSZUALX9UgNDTPbj5ESeII+VztZ/KOFsRHMTfDb1G +IR/dAc1mL5uYbh0h2Fa/fxRPgf7eJOeWGiygesl3CWj0Ue13qwX9PcG7klJXfToI +576MY+A7027a0aZ49QhKnysMGhTdtFCksYG0lwPz3bIR16NvlxNLKanc2h+ILTFQ +bMW/Y3DRAgMBAAECggEBAJGTfX6rE6zX2bzASsu9HhgxKN1VU6/L70/xrtEPp4SL +SpHKO9/S/Y1zpsigr86pQYBx/nxm4KFZewx9p+El7/06AX0djOD7HCB2/+AJq3iC +5NF4cvEwclrsJCqLJqxKPiSuYPGnzji9YvaPwArMb0Ff36KVdaHRMw58kfFys5Y2 +HvDqh4x+sgMUS7kSEQT4YDzCDPlAoEFgF9rlXnh0UVS6pZtvq3cR7pR4A9hvDgX9 +wU6zn1dGdy4MEXIpckuZkhwbqDLmfoHHeJc5RIjRP7WIRh2CodjetgPFE+SV7Sdj +ECmvYJbet4YLg+Qil0OKR9s9S1BbObgcbC9WxUcrTgECgYEA/Yj8BDfxcsPK5ebE +9N2teBFUJuDcHEuM1xp4/tFisoFH90JZJMkVbO19rddAMmdYLTGivWTyPVsM1+9s +tq/NwsFJWHRUiMK7dttGiXuZry+xvq/SAZoitgI8tXdDXMw7368vatr0g6m7ucBK +jZWxSHjK9/KVquVr7BoXFm+YxaECgYEAr3sgVNbr5ovx17YriTqe1FLTLMD5gPrz +ugJj7nypDYY59hLlkrA/TtWbfzE+vfrN3oRIz5OMi9iFk3KXFVJMjGg+M5eO9Y8m +14e791/q1jUuuUH4mc6HttNRNh7TdLg/OGKivE+56LEyFPir45zw/dqwQM3jiwIz +yPz/+bzmfTECgYATxrOhwJtc0FjrReznDMOTMgbWYYPJ0TrTLIVzmvGP6vWqG8rI +S8cYEA5VmQyw4c7G97AyBcW/c3K1BT/9oAj0wA7wj2JoqIfm5YPDBZkfSSEcNqqy +5Ur/13zUytC+VE/3SrrwItQf0QWLn6wxDxQdCw8J+CokgnDAoehbH6lTAQKBgQCE +67T/zpR9279i8CBmIDszBVHkcoALzQtU+H6NpWvATM4WsRWoWUx7AJ56Z+joqtPK +G1WztkYdn/L+TyxWADLvn/6Nwd2N79MyKyScKtGNVFeCCJCwoJp4R/UaE5uErBNn +OH+gOJvPwHj5HavGC5kYENC1Jb+YCiEDu3CB0S6d4QKBgQDGYGEFMZYWqO6+LrfQ +ZNDBLCI2G4+UFP+8ZEuBKy5NkDVqXQhHRbqr9S/OkFu+kEjHLuYSpQsclh6XSDks +5x/hQJNQszLPJoxvGECvz5TN2lJhuyCupS50aGKGqTxKYtiPHpWa8jZyjmanMKnE +dOGyw/X4SFyodv8AEloqd81yGg== +-----END PRIVATE KEY----- +`; +function getSHA256withRSA(content) { + const key = rs.KEYUTIL.getKey(privateKeyString); + + const signature = new rs.KJUR.crypto.Signature({ alg: "SHA256withRSA" }); + + signature.init(key); + + signature.updateString(content); + + const originSign = signature.sign(); + const sign64u = rs.hextob64u(originSign); + + return sign64u; +} +/** + * 获取远程通知 + */ +async function getNotice() { + try { + const urls = [ + "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", + "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json" + ]; + let notice = null; + for (const url of urls) { + const options = { + url, + headers: { "User-Agent": "" } + }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, '\n'); + break; + } + } + if (notice) { + DoubleLog(notice); + } + } catch (e) { + console.log(e); + } +} +function ts13() { + return Math.round(new Date().getTime()).toString(); +} + +function httpRequest(options, method) { + //options = changeCode(options) + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + //console.log(JSON.parse(err)); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + data = JSON.parse(data); + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +// 完整 Env +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) } diff --git a/nhsy.js b/nhsy.js new file mode 100644 index 0000000..3660355 --- /dev/null +++ b/nhsy.js @@ -0,0 +1,511 @@ +/** + * 南湖声音 + * cron 4 10,20 * * * nhsy.js + * * + * 22/11/27 执行签到,阅读,点赞,分享,本地服务 增加评论 延迟 + * ========= 青龙--配置文件 =========== + * # 南湖声音 + * export nhsy_data='xxxxx @ xxxxx' + * + * 多账号用 换行 或 @ 分割 + * 抓包 vapp.tmuyun.com , 找到 header中的X-SESSION-ID 即可 + * ==================================== + * 交流群/BUG反馈 862839604 + */ + + + +const $ = new Env("南湖声音"); +const ckName = "nhsy_data"; + +//-------------------- 一般不动变量区域 ------------------------------------- +const utils = require("./utils") +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let debug = 0; //Debug调试 0关闭 1开启 +let utilsState = 1; //是否开启依赖 0关闭 1开启 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +let show = "每日250分左右/可换实物" +//------------------------------------------------------------------------ + +async function start() { + console.log(show); + console.log('\n================== 用户信息 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_tasklist('用户信息')); + await wait(1); + } + await Promise.all(taskall); + + console.log('\n================== 每日签到 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_sign('每日签到')); + await wait(3); + } + await Promise.all(taskall); + + console.log('\n================== 文章列表 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_articlelist('文章列表')); + await wait(3); + } + await Promise.all(taskall); + + console.log('\n================== 执行分享 ==================\n'); + taskall = []; + for (let user of userList) { + for (let i = 0; i <= 5; i++) { + taskall.push(await user.task_share("3", "分享")); + await wait(3); + } + } + await Promise.all(taskall); + + console.log('\n================== 本地服务 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_share("6", "本地服务")); + await wait(3); + } + await Promise.all(taskall); + +} + + +class UserInfo { + + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; + this.host = "vapp.tmuyun.com"; + this.hostname = "https://" + this.host; + this.key = "FR*r!isE5W"; + this.appId = 57; + this.artlistdata = "6329970cad61a4052a4a389e" + } + + async txt_api() { // 获取评论 一言api + try { + let options = { + method: 'GET', + url: 'https://v1.hitokoto.cn/', + qs: { c: 'd' }, + headers: { 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' }, + formData: {} + }; + //console.log(options); + let result = await httpRequest(options, ""); + //console.log(result); + if (result.id) { + return result.hitokoto; + } else { + } + } catch (error) { + console.log(error); + } + } + + async task_tasklist(name) { // 任务列表 + let host_data = `/api/user_mumber/numberCenter` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}` + `?is_new=1`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],欢迎用户:[${result.data.rst.nick_name}],当前积分为[${result.data.rst.total_integral}]`); + for (let i = 0; i < result.data.rst.user_task_list.length; i++) { + DoubleLog(`账号[${this.index}],获取任务列表成功:${result.data.rst.user_task_list[i].name}[${result.data.rst.user_task_list[i].finish_times}/${result.data.rst.user_task_list[i].frequency}]`); + } + } else { + DoubleLog(`账号[${this.index}],阅读文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_sign(name) { // 每日签到 + let host_data = `/api/user_mumber/sign` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],签到成功[${result.data.signCommonInfo.date}],获得积分:[${result.data.signExperience}]`); + } else { + DoubleLog(`账号[${this.index}],签到:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_articlelist(name) { // 获取文章列表 + let host_data = `/api/article/channel_list` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}` + `?channel_id=${this.artlistdata}&isDiangHao=false&is_new=true&list_count=0&size=10`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + for (let i = 3; i < 8; i++) { + //DoubleLog(`账号[${this.index}],获取文章列表[${result.data.article_list[i].id}]`) + let articleId = result.data.article_list[i].id; + await wait(3); + await this.task_read(articleId); + await wait(3); + await this.task_like(articleId); + await wait(3); + await this.task_comment(articleId); + } + } else { + DoubleLog(`账号[${this.index}],获取文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_read(articleId) { // 阅读文章 + let host_data = `/api/article/detail` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}` + `?id=` + articleId, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, "阅读文章"); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],阅读文章成功:[${result.data.article.id}]`); + } else { + DoubleLog(`账号[${this.index}],阅读文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_like(articleId) { // 点赞文章 + let host_data = `/api/favorite/like` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { action: 'true', id: articleId } + }; + //console.log(options); + let result = await httpRequest(options, '点赞文章'); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],点赞文章成功:[` + articleId + `]`); + } else { + DoubleLog(`账号[${this.index}],用户查询:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_comment(articleId) { // 评论文章 + let txt = await this.txt_api() + let host_data = `/api/comment/create` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { channel_article_id: articleId, content: txt } + }; + //console.log(options); + let result = await httpRequest(options, "评论"); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],评论成功[` + txt + `]`); + } else { + DoubleLog(`账号[${this.index}],评论:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_share(mumberType, name) { // 分享文章3/使用本地服务6 + let host_data = `/api/user_mumber/doTask` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { memberType: mumberType, member_type: mumberType } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],` + name + `成功`); + if (result.data) { `账号[${this.index}],` + name + `执行完毕共获得:[${result.data.score_notify.integral}]` } + } else { + DoubleLog(`账号[${this.index}],分享文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + + async user_info() { // 阅读文章 + let host_data = `/api/user_mumber/account_detail` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, "用户信息"); + //console.log(result); + if (result.code == 0) { + //DoubleLog(`账号[${this.index}],验证成功[${result.data.rst.nick_name}]`); + if (result.data.rst.ref_user_uid == "") { + //await this.share_code("分享") + } + } else { + //DoubleLog(`账号[${this.index}],验证成功`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async share_code(name) { + let host_data = `/api/account/update_ref_code` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { ref_code: "J8YS49" } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + //DoubleLog(`账号[${this.index}],验证成功`); + } else { + //DoubleLog(`账号[${this.index}],验证成功`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + } + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +// #region ******************************************************** 固定代码 ******************************************************** + +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +// =========================================== 不懂不要动 ========================================================= +// 网络请求 (get, post等) +async function httpRequest(options, name) { return new Promise((resolve) => { var request = require("request"); if (!name) { let tmp = arguments.callee.toString(); let re = /function\s*(\w*)/i; let matches = re.exec(tmp); name = matches[1] } if (debug) { console.log(`\n【debug】===============这是${name}请求信息===============`); console.log(options) } request(options, function (error, response) { if (error) throw new Error(error); let data = response.body; try { if (debug) { console.log(`\n\n【debug】===============这是${name}返回数据==============`); console.log(data) } if (typeof data == "string") { if (isJsonString(data)) { let result = JSON.parse(data); if (debug) { console.log(`\n【debug】=============这是${name}json解析后数据============`); console.log(result) } resolve(result) } else { let result = data; resolve(result) } function isJsonString(str) { if (typeof str == "string") { try { if (typeof JSON.parse(str) == "object") { return true } } catch (e) { return false } } return false } } else { let result = data; resolve(result) } } catch (e) { console.log(error, response); console.log(`\n ${name}失败了!请稍后尝试!!`) } finally { resolve() } }) }) } +// 等待 X 秒 +function wait(n) { return new Promise(function (resolve) { setTimeout(resolve, n * 1000) }) } +// 双平台log输出 +function DoubleLog(data) { if ($.isNode()) { if (data) { console.log(`${data}`); msg += `${data}` } } else { console.log(`${data}`); msg += `${data}` } } +// 发送消息 +async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } else { console.log(message) } } +// 完整 Env +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) } diff --git a/notify.py b/notify.py new file mode 100644 index 0000000..25f1a1f --- /dev/null +++ b/notify.py @@ -0,0 +1,1107 @@ +#!/usr/bin/env python3 +# _*_ coding:utf-8 _*_ +import base64 +import hashlib +import hmac +import json +import os +import re +import threading +import time +import urllib.parse +import smtplib +from email.mime.text import MIMEText +from email.header import Header +from email.utils import formataddr + +import requests + +# 原先的 print 函数和主线程的锁 +_print = print +mutex = threading.Lock() + + +# 定义新的 print 函数 +def print(text, *args, **kw): + """ + 使输出有序进行,不出现多线程同一时间输出导致错乱的问题。 + """ + with mutex: + _print(text, *args, **kw) + + +# 通知服务 +# fmt: off +push_config = { + 'HITOKOTO': True, # 启用一言(随机句子) + + 'BARK_PUSH': '', # bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ + 'BARK_ARCHIVE': '', # bark 推送是否存档 + 'BARK_GROUP': '', # bark 推送分组 + 'BARK_SOUND': '', # bark 推送声音 + 'BARK_ICON': '', # bark 推送图标 + 'BARK_LEVEL': '', # bark 推送时效性 + 'BARK_URL': '', # bark 推送跳转URL + + 'CONSOLE': False, # 控制台输出 + + 'DD_BOT_SECRET': '', # 钉钉机器人的 DD_BOT_SECRET + 'DD_BOT_TOKEN': '', # 钉钉机器人的 DD_BOT_TOKEN + + 'FSKEY': '', # 飞书机器人的 FSKEY + 'FSSECRET': '', # 飞书机器人的 FSSECRET,对应安全设置里的签名校验密钥 + + 'GOBOT_URL': '', # go-cqhttp + # 推送到个人QQ:http://127.0.0.1/send_private_msg + # 群:http://127.0.0.1/send_group_msg + 'GOBOT_QQ': '', # go-cqhttp 的推送群或用户 + # GOBOT_URL 设置 /send_private_msg 时填入 user_id=个人QQ + # /send_group_msg 时填入 group_id=QQ群 + 'GOBOT_TOKEN': '', # go-cqhttp 的 access_token + + 'GOTIFY_URL': '', # gotify地址,如https://push.example.de:8080 + 'GOTIFY_TOKEN': '', # gotify的消息应用token + 'GOTIFY_PRIORITY': 0, # 推送消息优先级,默认为0 + + 'IGOT_PUSH_KEY': '', # iGot 聚合推送的 IGOT_PUSH_KEY + + 'PUSH_KEY': '', # server 酱的 PUSH_KEY,兼容旧版与 Turbo 版 + + 'DEER_KEY': '', # PushDeer 的 PUSHDEER_KEY + 'DEER_URL': '', # PushDeer 的 PUSHDEER_URL + + 'CHAT_URL': '', # synology chat url + 'CHAT_TOKEN': '', # synology chat token + + 'PUSH_PLUS_TOKEN': '', # pushplus 推送的用户令牌 + 'PUSH_PLUS_USER': '', # pushplus 推送的群组编码 + 'PUSH_PLUS_TEMPLATE': 'html', # pushplus 发送模板,支持html,txt,json,markdown,cloudMonitor,jenkins,route,pay + 'PUSH_PLUS_CHANNEL': 'wechat', # pushplus 发送渠道,支持wechat,webhook,cp,mail,sms + 'PUSH_PLUS_WEBHOOK': '', # pushplus webhook编码,可在pushplus公众号上扩展配置出更多渠道 + 'PUSH_PLUS_CALLBACKURL': '', # pushplus 发送结果回调地址,会把推送最终结果通知到这个地址上 + 'PUSH_PLUS_TO': '', # pushplus 好友令牌,微信公众号渠道填写好友令牌,企业微信渠道填写企业微信用户id + + 'WE_PLUS_BOT_TOKEN': '', # 微加机器人的用户令牌 + 'WE_PLUS_BOT_RECEIVER': '', # 微加机器人的消息接收者 + 'WE_PLUS_BOT_VERSION': 'pro', # 微加机器人的调用版本 + + 'QMSG_KEY': '', # qmsg 酱的 QMSG_KEY + 'QMSG_TYPE': '', # qmsg 酱的 QMSG_TYPE + + 'QYWX_ORIGIN': '', # 企业微信代理地址 + + 'QYWX_AM': '', # 企业微信应用 + + 'QYWX_KEY': '', # 企业微信机器人 + + 'TG_BOT_TOKEN': '', # tg 机器人的 TG_BOT_TOKEN,例:1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ + 'TG_USER_ID': '', # tg 机器人的 TG_USER_ID,例:1434078534 + 'TG_API_HOST': '', # tg 代理 api + 'TG_PROXY_AUTH': '', # tg 代理认证参数 + 'TG_PROXY_HOST': '', # tg 机器人的 TG_PROXY_HOST + 'TG_PROXY_PORT': '', # tg 机器人的 TG_PROXY_PORT + + 'AIBOTK_KEY': '', # 智能微秘书 个人中心的apikey 文档地址:http://wechat.aibotk.com/docs/about + 'AIBOTK_TYPE': '', # 智能微秘书 发送目标 room 或 contact + 'AIBOTK_NAME': '', # 智能微秘书 发送群名 或者好友昵称和type要对应好 + + 'SMTP_SERVER': '', # SMTP 发送邮件服务器,形如 smtp.exmail.qq.com:465 + 'SMTP_SSL': 'false', # SMTP 发送邮件服务器是否使用 SSL,填写 true 或 false + 'SMTP_EMAIL': '', # SMTP 收发件邮箱,通知将会由自己发给自己 + 'SMTP_PASSWORD': '', # SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定 + 'SMTP_NAME': '', # SMTP 收发件人姓名,可随意填写 + + 'PUSHME_KEY': '', # PushMe 的 PUSHME_KEY + 'PUSHME_URL': '', # PushMe 的 PUSHME_URL + + 'CHRONOCAT_QQ': '', # qq号 + 'CHRONOCAT_TOKEN': '', # CHRONOCAT 的token + 'CHRONOCAT_URL': '', # CHRONOCAT的url地址 + + 'WEBHOOK_URL': '', # 自定义通知 请求地址 + 'WEBHOOK_BODY': '', # 自定义通知 请求体 + 'WEBHOOK_HEADERS': '', # 自定义通知 请求头 + 'WEBHOOK_METHOD': '', # 自定义通知 请求方法 + 'WEBHOOK_CONTENT_TYPE': '', # 自定义通知 content-type + + 'NTFY_URL': '', # ntfy地址,如https://ntfy.sh + 'NTFY_TOPIC': '', # ntfy的消息应用topic + 'NTFY_PRIORITY':'3', # 推送消息优先级,默认为3 + 'NTFY_TOKEN': '', # 推送token,可选 + 'NTFY_USERNAME': '', # 推送用户名称,可选 + 'NTFY_PASSWORD': '', # 推送用户密码,可选 + 'NTFY_ACTIONS': '', # 推送用户动作,可选 + + 'WXPUSHER_APP_TOKEN': '', # wxpusher 的 appToken 官方文档: https://wxpusher.zjiecode.com/docs/ 管理后台: https://wxpusher.zjiecode.com/admin/ + 'WXPUSHER_TOPIC_IDS': '', # wxpusher 的 主题ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行 + 'WXPUSHER_UIDS': '', # wxpusher 的 用户ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行 +} +# fmt: on + +for k in push_config: + if os.getenv(k): + v = os.getenv(k) + push_config[k] = v + + +def bark(title: str, content: str) -> None: + """ + 使用 bark 推送消息。 + """ + if not push_config.get("BARK_PUSH"): + return + print("bark 服务启动") + + if push_config.get("BARK_PUSH").startswith("http"): + url = f'{push_config.get("BARK_PUSH")}' + else: + url = f'https://api.day.app/{push_config.get("BARK_PUSH")}' + + bark_params = { + "BARK_ARCHIVE": "isArchive", + "BARK_GROUP": "group", + "BARK_SOUND": "sound", + "BARK_ICON": "icon", + "BARK_LEVEL": "level", + "BARK_URL": "url", + } + data = { + "title": title, + "body": content, + } + for pair in filter( + lambda pairs: pairs[0].startswith("BARK_") + and pairs[0] != "BARK_PUSH" + and pairs[1] + and bark_params.get(pairs[0]), + push_config.items(), + ): + data[bark_params.get(pair[0])] = pair[1] + headers = {"Content-Type": "application/json;charset=utf-8"} + response = requests.post( + url=url, data=json.dumps(data), headers=headers, timeout=15 + ).json() + + if response["code"] == 200: + print("bark 推送成功!") + else: + print("bark 推送失败!") + + +def console(title: str, content: str) -> None: + """ + 使用 控制台 推送消息。 + """ + print(f"{title}\n\n{content}") + + +def dingding_bot(title: str, content: str) -> None: + """ + 使用 钉钉机器人 推送消息。 + """ + if not push_config.get("DD_BOT_SECRET") or not push_config.get("DD_BOT_TOKEN"): + return + print("钉钉机器人 服务启动") + + timestamp = str(round(time.time() * 1000)) + secret_enc = push_config.get("DD_BOT_SECRET").encode("utf-8") + string_to_sign = "{}\n{}".format(timestamp, push_config.get("DD_BOT_SECRET")) + string_to_sign_enc = string_to_sign.encode("utf-8") + hmac_code = hmac.new( + secret_enc, string_to_sign_enc, digestmod=hashlib.sha256 + ).digest() + sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) + url = f'https://oapi.dingtalk.com/robot/send?access_token={push_config.get("DD_BOT_TOKEN")}×tamp={timestamp}&sign={sign}' + headers = {"Content-Type": "application/json;charset=utf-8"} + data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} + response = requests.post( + url=url, data=json.dumps(data), headers=headers, timeout=15 + ).json() + + if not response["errcode"]: + print("钉钉机器人 推送成功!") + else: + print("钉钉机器人 推送失败!") + + +def feishu_bot(title: str, content: str) -> None: + """ + 使用 飞书机器人 推送消息。 + """ + if not push_config.get("FSKEY"): + return + print("飞书 服务启动") + + url = f'https://open.feishu.cn/open-apis/bot/v2/hook/{push_config.get("FSKEY")}' + data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}} + + # Add signature if secret is provided + # Note: Feishu's signature algorithm uses timestamp+"\n"+secret as the HMAC key + # and signs an empty message, which differs from typical HMAC usage + if push_config.get("FSSECRET"): + timestamp = str(int(time.time())) + string_to_sign = f'{timestamp}\n{push_config.get("FSSECRET")}' + hmac_code = hmac.new( + string_to_sign.encode("utf-8"), digestmod=hashlib.sha256 + ).digest() + sign = base64.b64encode(hmac_code).decode("utf-8") + data["timestamp"] = timestamp + data["sign"] = sign + + response = requests.post(url, data=json.dumps(data)).json() + + if response.get("StatusCode") == 0 or response.get("code") == 0: + print("飞书 推送成功!") + else: + print("飞书 推送失败!错误信息如下:\n", response) + + +def go_cqhttp(title: str, content: str) -> None: + """ + 使用 go_cqhttp 推送消息。 + """ + if not push_config.get("GOBOT_URL") or not push_config.get("GOBOT_QQ"): + return + print("go-cqhttp 服务启动") + + url = f'{push_config.get("GOBOT_URL")}?access_token={push_config.get("GOBOT_TOKEN")}&{push_config.get("GOBOT_QQ")}&message=标题:{title}\n内容:{content}' + response = requests.get(url).json() + + if response["status"] == "ok": + print("go-cqhttp 推送成功!") + else: + print("go-cqhttp 推送失败!") + + +def gotify(title: str, content: str) -> None: + """ + 使用 gotify 推送消息。 + """ + if not push_config.get("GOTIFY_URL") or not push_config.get("GOTIFY_TOKEN"): + return + print("gotify 服务启动") + + url = f'{push_config.get("GOTIFY_URL")}/message?token={push_config.get("GOTIFY_TOKEN")}' + data = { + "title": title, + "message": content, + "priority": push_config.get("GOTIFY_PRIORITY"), + } + response = requests.post(url, data=data).json() + + if response.get("id"): + print("gotify 推送成功!") + else: + print("gotify 推送失败!") + + +def iGot(title: str, content: str) -> None: + """ + 使用 iGot 推送消息。 + """ + if not push_config.get("IGOT_PUSH_KEY"): + return + print("iGot 服务启动") + + url = f'https://push.hellyw.com/{push_config.get("IGOT_PUSH_KEY")}' + data = {"title": title, "content": content} + headers = {"Content-Type": "application/x-www-form-urlencoded"} + response = requests.post(url, data=data, headers=headers).json() + + if response["ret"] == 0: + print("iGot 推送成功!") + else: + print(f'iGot 推送失败!{response["errMsg"]}') + + +def serverJ(title: str, content: str) -> None: + """ + 通过 serverJ 推送消息。 + """ + if not push_config.get("PUSH_KEY"): + return + print("serverJ 服务启动") + + data = {"text": title, "desp": content.replace("\n", "\n\n")} + + match = re.match(r"sctp(\d+)t", push_config.get("PUSH_KEY")) + if match: + num = match.group(1) + url = f'https://{num}.push.ft07.com/send/{push_config.get("PUSH_KEY")}.send' + else: + url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send' + + response = requests.post(url, data=data).json() + + if response.get("errno") == 0 or response.get("code") == 0: + print("serverJ 推送成功!") + else: + print(f'serverJ 推送失败!错误码:{response["message"]}') + + +def pushdeer(title: str, content: str) -> None: + """ + 通过PushDeer 推送消息 + """ + if not push_config.get("DEER_KEY"): + return + print("PushDeer 服务启动") + data = { + "text": title, + "desp": content, + "type": "markdown", + "pushkey": push_config.get("DEER_KEY"), + } + url = "https://api2.pushdeer.com/message/push" + if push_config.get("DEER_URL"): + url = push_config.get("DEER_URL") + + response = requests.post(url, data=data).json() + + if len(response.get("content").get("result")) > 0: + print("PushDeer 推送成功!") + else: + print("PushDeer 推送失败!错误信息:", response) + + +def chat(title: str, content: str) -> None: + """ + 通过Chat 推送消息 + """ + if not push_config.get("CHAT_URL") or not push_config.get("CHAT_TOKEN"): + return + print("chat 服务启动") + data = "payload=" + json.dumps({"text": title + "\n" + content}) + url = push_config.get("CHAT_URL") + push_config.get("CHAT_TOKEN") + response = requests.post(url, data=data) + + if response.status_code == 200: + print("Chat 推送成功!") + else: + print("Chat 推送失败!错误信息:", response) + + +def pushplus_bot(title: str, content: str) -> None: + """ + 通过 pushplus 推送消息。 + """ + if not push_config.get("PUSH_PLUS_TOKEN"): + return + print("PUSHPLUS 服务启动") + + url = "https://www.pushplus.plus/send" + data = { + "token": push_config.get("PUSH_PLUS_TOKEN"), + "title": title, + "content": content, + "topic": push_config.get("PUSH_PLUS_USER"), + "template": push_config.get("PUSH_PLUS_TEMPLATE"), + "channel": push_config.get("PUSH_PLUS_CHANNEL"), + "webhook": push_config.get("PUSH_PLUS_WEBHOOK"), + "callbackUrl": push_config.get("PUSH_PLUS_CALLBACKURL"), + "to": push_config.get("PUSH_PLUS_TO"), + } + body = json.dumps(data).encode(encoding="utf-8") + headers = {"Content-Type": "application/json"} + response = requests.post(url=url, data=body, headers=headers).json() + + code = response["code"] + if code == 200: + print("PUSHPLUS 推送请求成功,可根据流水号查询推送结果:" + response["data"]) + print( + "注意:请求成功并不代表推送成功,如未收到消息,请到pushplus官网使用流水号查询推送最终结果" + ) + elif code == 900 or code == 903 or code == 905 or code == 999: + print(response["msg"]) + + else: + url_old = "http://pushplus.hxtrip.com/send" + headers["Accept"] = "application/json" + response = requests.post(url=url_old, data=body, headers=headers).json() + + if response["code"] == 200: + print("PUSHPLUS(hxtrip) 推送成功!") + + else: + print("PUSHPLUS 推送失败!") + + +def weplus_bot(title: str, content: str) -> None: + """ + 通过 微加机器人 推送消息。 + """ + if not push_config.get("WE_PLUS_BOT_TOKEN"): + return + print("微加机器人 服务启动") + + template = "txt" + if len(content) > 800: + template = "html" + + url = "https://www.weplusbot.com/send" + data = { + "token": push_config.get("WE_PLUS_BOT_TOKEN"), + "title": title, + "content": content, + "template": template, + "receiver": push_config.get("WE_PLUS_BOT_RECEIVER"), + "version": push_config.get("WE_PLUS_BOT_VERSION"), + } + body = json.dumps(data).encode(encoding="utf-8") + headers = {"Content-Type": "application/json"} + response = requests.post(url=url, data=body, headers=headers).json() + + if response["code"] == 200: + print("微加机器人 推送成功!") + else: + print("微加机器人 推送失败!") + + +def qmsg_bot(title: str, content: str) -> None: + """ + 使用 qmsg 推送消息。 + """ + if not push_config.get("QMSG_KEY") or not push_config.get("QMSG_TYPE"): + return + print("qmsg 服务启动") + + url = f'https://qmsg.zendee.cn/{push_config.get("QMSG_TYPE")}/{push_config.get("QMSG_KEY")}' + payload = {"msg": f'{title}\n\n{content.replace("----", "-")}'.encode("utf-8")} + response = requests.post(url=url, params=payload).json() + + if response["code"] == 0: + print("qmsg 推送成功!") + else: + print(f'qmsg 推送失败!{response["reason"]}') + + +def wecom_app(title: str, content: str) -> None: + """ + 通过 企业微信 APP 推送消息。 + """ + if not push_config.get("QYWX_AM"): + return + QYWX_AM_AY = re.split(",", push_config.get("QYWX_AM")) + if 4 < len(QYWX_AM_AY) > 5: + print("QYWX_AM 设置错误!!") + return + print("企业微信 APP 服务启动") + + corpid = QYWX_AM_AY[0] + corpsecret = QYWX_AM_AY[1] + touser = QYWX_AM_AY[2] + agentid = QYWX_AM_AY[3] + try: + media_id = QYWX_AM_AY[4] + except IndexError: + media_id = "" + wx = WeCom(corpid, corpsecret, agentid) + # 如果没有配置 media_id 默认就以 text 方式发送 + if not media_id: + message = title + "\n\n" + content + response = wx.send_text(message, touser) + else: + response = wx.send_mpnews(title, content, media_id, touser) + + if response == "ok": + print("企业微信推送成功!") + else: + print("企业微信推送失败!错误信息如下:\n", response) + + +class WeCom: + def __init__(self, corpid, corpsecret, agentid): + self.CORPID = corpid + self.CORPSECRET = corpsecret + self.AGENTID = agentid + self.ORIGIN = "https://qyapi.weixin.qq.com" + if push_config.get("QYWX_ORIGIN"): + self.ORIGIN = push_config.get("QYWX_ORIGIN") + + def get_access_token(self): + url = f"{self.ORIGIN}/cgi-bin/gettoken" + values = { + "corpid": self.CORPID, + "corpsecret": self.CORPSECRET, + } + req = requests.post(url, params=values) + data = json.loads(req.text) + return data["access_token"] + + def send_text(self, message, touser="@all"): + send_url = ( + f"{self.ORIGIN}/cgi-bin/message/send?access_token={self.get_access_token()}" + ) + send_values = { + "touser": touser, + "msgtype": "text", + "agentid": self.AGENTID, + "text": {"content": message}, + "safe": "0", + } + send_msges = bytes(json.dumps(send_values), "utf-8") + respone = requests.post(send_url, send_msges) + respone = respone.json() + return respone["errmsg"] + + def send_mpnews(self, title, message, media_id, touser="@all"): + send_url = ( + f"{self.ORIGIN}/cgi-bin/message/send?access_token={self.get_access_token()}" + ) + send_values = { + "touser": touser, + "msgtype": "mpnews", + "agentid": self.AGENTID, + "mpnews": { + "articles": [ + { + "title": title, + "thumb_media_id": media_id, + "author": "Author", + "content_source_url": "", + "content": message.replace("\n", "
"), + "digest": message, + } + ] + }, + } + send_msges = bytes(json.dumps(send_values), "utf-8") + respone = requests.post(send_url, send_msges) + respone = respone.json() + return respone["errmsg"] + + +def wecom_bot(title: str, content: str) -> None: + """ + 通过 企业微信机器人 推送消息。 + """ + if not push_config.get("QYWX_KEY"): + return + print("企业微信机器人服务启动") + + origin = "https://qyapi.weixin.qq.com" + if push_config.get("QYWX_ORIGIN"): + origin = push_config.get("QYWX_ORIGIN") + + url = f"{origin}/cgi-bin/webhook/send?key={push_config.get('QYWX_KEY')}" + headers = {"Content-Type": "application/json;charset=utf-8"} + data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} + response = requests.post( + url=url, data=json.dumps(data), headers=headers, timeout=15 + ).json() + + if response["errcode"] == 0: + print("企业微信机器人推送成功!") + else: + print("企业微信机器人推送失败!") + + +def telegram_bot(title: str, content: str) -> None: + """ + 使用 telegram 机器人 推送消息。 + """ + if not push_config.get("TG_BOT_TOKEN") or not push_config.get("TG_USER_ID"): + return + print("tg 服务启动") + + if push_config.get("TG_API_HOST"): + url = f"{push_config.get('TG_API_HOST')}/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" + else: + url = ( + f"https://api.telegram.org/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" + ) + headers = {"Content-Type": "application/x-www-form-urlencoded"} + payload = { + "chat_id": str(push_config.get("TG_USER_ID")), + "text": f"{title}\n\n{content}", + "disable_web_page_preview": "true", + } + proxies = None + if push_config.get("TG_PROXY_HOST") and push_config.get("TG_PROXY_PORT"): + if push_config.get("TG_PROXY_AUTH") is not None and "@" not in push_config.get( + "TG_PROXY_HOST" + ): + push_config["TG_PROXY_HOST"] = ( + push_config.get("TG_PROXY_AUTH") + + "@" + + push_config.get("TG_PROXY_HOST") + ) + proxyStr = "http://{}:{}".format( + push_config.get("TG_PROXY_HOST"), push_config.get("TG_PROXY_PORT") + ) + proxies = {"http": proxyStr, "https": proxyStr} + response = requests.post( + url=url, headers=headers, params=payload, proxies=proxies + ).json() + + if response["ok"]: + print("tg 推送成功!") + else: + print("tg 推送失败!") + + +def aibotk(title: str, content: str) -> None: + """ + 使用 智能微秘书 推送消息。 + """ + if ( + not push_config.get("AIBOTK_KEY") + or not push_config.get("AIBOTK_TYPE") + or not push_config.get("AIBOTK_NAME") + ): + return + print("智能微秘书 服务启动") + + if push_config.get("AIBOTK_TYPE") == "room": + url = "https://api-bot.aibotk.com/openapi/v1/chat/room" + data = { + "apiKey": push_config.get("AIBOTK_KEY"), + "roomName": push_config.get("AIBOTK_NAME"), + "message": {"type": 1, "content": f"【青龙快讯】\n\n{title}\n{content}"}, + } + else: + url = "https://api-bot.aibotk.com/openapi/v1/chat/contact" + data = { + "apiKey": push_config.get("AIBOTK_KEY"), + "name": push_config.get("AIBOTK_NAME"), + "message": {"type": 1, "content": f"【青龙快讯】\n\n{title}\n{content}"}, + } + body = json.dumps(data).encode(encoding="utf-8") + headers = {"Content-Type": "application/json"} + response = requests.post(url=url, data=body, headers=headers).json() + print(response) + if response["code"] == 0: + print("智能微秘书 推送成功!") + else: + print(f'智能微秘书 推送失败!{response["error"]}') + + +def smtp(title: str, content: str) -> None: + """ + 使用 SMTP 邮件 推送消息。 + """ + if ( + not push_config.get("SMTP_SERVER") + or not push_config.get("SMTP_SSL") + or not push_config.get("SMTP_EMAIL") + or not push_config.get("SMTP_PASSWORD") + or not push_config.get("SMTP_NAME") + ): + return + print("SMTP 邮件 服务启动") + + message = MIMEText(content, "plain", "utf-8") + message["From"] = formataddr( + ( + Header(push_config.get("SMTP_NAME"), "utf-8").encode(), + push_config.get("SMTP_EMAIL"), + ) + ) + message["To"] = formataddr( + ( + Header(push_config.get("SMTP_NAME"), "utf-8").encode(), + push_config.get("SMTP_EMAIL"), + ) + ) + message["Subject"] = Header(title, "utf-8") + + try: + smtp_server = ( + smtplib.SMTP_SSL(push_config.get("SMTP_SERVER")) + if push_config.get("SMTP_SSL") == "true" + else smtplib.SMTP(push_config.get("SMTP_SERVER")) + ) + smtp_server.login( + push_config.get("SMTP_EMAIL"), push_config.get("SMTP_PASSWORD") + ) + smtp_server.sendmail( + push_config.get("SMTP_EMAIL"), + push_config.get("SMTP_EMAIL"), + message.as_bytes(), + ) + smtp_server.close() + print("SMTP 邮件 推送成功!") + except Exception as e: + print(f"SMTP 邮件 推送失败!{e}") + + +def pushme(title: str, content: str) -> None: + """ + 使用 PushMe 推送消息。 + """ + if not push_config.get("PUSHME_KEY"): + return + print("PushMe 服务启动") + + url = ( + push_config.get("PUSHME_URL") + if push_config.get("PUSHME_URL") + else "https://push.i-i.me/" + ) + data = { + "push_key": push_config.get("PUSHME_KEY"), + "title": title, + "content": content, + "date": push_config.get("date") if push_config.get("date") else "", + "type": push_config.get("type") if push_config.get("type") else "", + } + response = requests.post(url, data=data) + + if response.status_code == 200 and response.text == "success": + print("PushMe 推送成功!") + else: + print(f"PushMe 推送失败!{response.status_code} {response.text}") + + +def chronocat(title: str, content: str) -> None: + """ + 使用 CHRONOCAT 推送消息。 + """ + if ( + not push_config.get("CHRONOCAT_URL") + or not push_config.get("CHRONOCAT_QQ") + or not push_config.get("CHRONOCAT_TOKEN") + ): + return + + print("CHRONOCAT 服务启动") + + user_ids = re.findall(r"user_id=(\d+)", push_config.get("CHRONOCAT_QQ")) + group_ids = re.findall(r"group_id=(\d+)", push_config.get("CHRONOCAT_QQ")) + + url = f'{push_config.get("CHRONOCAT_URL")}/api/message/send' + headers = { + "Content-Type": "application/json", + "Authorization": f'Bearer {push_config.get("CHRONOCAT_TOKEN")}', + } + + for chat_type, ids in [(1, user_ids), (2, group_ids)]: + if not ids: + continue + for chat_id in ids: + data = { + "peer": {"chatType": chat_type, "peerUin": chat_id}, + "elements": [ + { + "elementType": 1, + "textElement": {"content": f"{title}\n\n{content}"}, + } + ], + } + response = requests.post(url, headers=headers, data=json.dumps(data)) + if response.status_code == 200: + if chat_type == 1: + print(f"QQ个人消息:{ids}推送成功!") + else: + print(f"QQ群消息:{ids}推送成功!") + else: + if chat_type == 1: + print(f"QQ个人消息:{ids}推送失败!") + else: + print(f"QQ群消息:{ids}推送失败!") + + +def ntfy(title: str, content: str) -> None: + """ + 通过 Ntfy 推送消息 + """ + + def encode_rfc2047(text: str) -> str: + """将文本编码为符合 RFC 2047 标准的格式""" + encoded_bytes = base64.b64encode(text.encode("utf-8")) + encoded_str = encoded_bytes.decode("utf-8") + return f"=?utf-8?B?{encoded_str}?=" + + if not push_config.get("NTFY_TOPIC"): + return + print("ntfy 服务启动") + priority = "3" + if not push_config.get("NTFY_PRIORITY"): + print("ntfy 服务的NTFY_PRIORITY 未设置!!默认设置为3") + else: + priority = push_config.get("NTFY_PRIORITY") + + # 使用 RFC 2047 编码 title + encoded_title = encode_rfc2047(title) + + data = content.encode(encoding="utf-8") + headers = {"Title": encoded_title, "Priority": priority, "Icon": "https://qn.whyour.cn/logo.png"} # 使用编码后的 title + if push_config.get("NTFY_TOKEN"): + headers['Authorization'] = "Bearer " + push_config.get("NTFY_TOKEN") + elif push_config.get("NTFY_USERNAME") and push_config.get("NTFY_PASSWORD"): + authStr = push_config.get("NTFY_USERNAME") + ":" + push_config.get("NTFY_PASSWORD") + headers['Authorization'] = "Basic " + base64.b64encode(authStr.encode('utf-8')).decode('utf-8') + if push_config.get("NTFY_ACTIONS"): + headers['Actions'] = encode_rfc2047(push_config.get("NTFY_ACTIONS")) + + url = push_config.get("NTFY_URL") + "/" + push_config.get("NTFY_TOPIC") + response = requests.post(url, data=data, headers=headers) + if response.status_code == 200: # 使用 response.status_code 进行检查 + print("Ntfy 推送成功!") + else: + print("Ntfy 推送失败!错误信息:", response.text) + + +def wxpusher_bot(title: str, content: str) -> None: + """ + 通过 wxpusher 推送消息。 + 支持的环境变量: + - WXPUSHER_APP_TOKEN: appToken + - WXPUSHER_TOPIC_IDS: 主题ID, 多个用英文分号;分隔 + - WXPUSHER_UIDS: 用户ID, 多个用英文分号;分隔 + """ + if not push_config.get("WXPUSHER_APP_TOKEN"): + return + + url = "https://wxpusher.zjiecode.com/api/send/message" + + # 处理topic_ids和uids,将分号分隔的字符串转为数组 + topic_ids = [] + if push_config.get("WXPUSHER_TOPIC_IDS"): + topic_ids = [ + int(id.strip()) + for id in push_config.get("WXPUSHER_TOPIC_IDS").split(";") + if id.strip() + ] + + uids = [] + if push_config.get("WXPUSHER_UIDS"): + uids = [ + uid.strip() + for uid in push_config.get("WXPUSHER_UIDS").split(";") + if uid.strip() + ] + + # topic_ids uids 至少有一个 + if not topic_ids and not uids: + print("wxpusher 服务的 WXPUSHER_TOPIC_IDS 和 WXPUSHER_UIDS 至少设置一个!!") + return + + print("wxpusher 服务启动") + + data = { + "appToken": push_config.get("WXPUSHER_APP_TOKEN"), + "content": f"

{title}


{content}
", + "summary": title, + "contentType": 2, + "topicIds": topic_ids, + "uids": uids, + "verifyPayType": 0, + } + + headers = {"Content-Type": "application/json"} + response = requests.post(url=url, json=data, headers=headers).json() + + if response.get("code") == 1000: + print("wxpusher 推送成功!") + else: + print(f"wxpusher 推送失败!错误信息:{response.get('msg')}") + + +def parse_headers(headers): + if not headers: + return {} + + parsed = {} + lines = headers.split("\n") + + for line in lines: + i = line.find(":") + if i == -1: + continue + + key = line[:i].strip().lower() + val = line[i + 1 :].strip() + parsed[key] = parsed.get(key, "") + ", " + val if key in parsed else val + + return parsed + + +def parse_string(input_string, value_format_fn=None): + matches = {} + pattern = r"(\w+):\s*((?:(?!\n\w+:).)*)" + regex = re.compile(pattern) + for match in regex.finditer(input_string): + key, value = match.group(1).strip(), match.group(2).strip() + try: + value = value_format_fn(value) if value_format_fn else value + json_value = json.loads(value) + matches[key] = json_value + except: + matches[key] = value + return matches + + +def parse_body(body, content_type, value_format_fn=None): + if not body or content_type == "text/plain": + return value_format_fn(body) if value_format_fn and body else body + + parsed = parse_string(body, value_format_fn) + + if content_type == "application/x-www-form-urlencoded": + data = urllib.parse.urlencode(parsed, doseq=True) + return data + + if content_type == "application/json": + data = json.dumps(parsed) + return data + + return parsed + + +def custom_notify(title: str, content: str) -> None: + """ + 通过 自定义通知 推送消息。 + """ + if not push_config.get("WEBHOOK_URL") or not push_config.get("WEBHOOK_METHOD"): + return + + print("自定义通知服务启动") + + WEBHOOK_URL = push_config.get("WEBHOOK_URL") + WEBHOOK_METHOD = push_config.get("WEBHOOK_METHOD") + WEBHOOK_CONTENT_TYPE = push_config.get("WEBHOOK_CONTENT_TYPE") + WEBHOOK_BODY = push_config.get("WEBHOOK_BODY") + WEBHOOK_HEADERS = push_config.get("WEBHOOK_HEADERS") + + if "$title" not in WEBHOOK_URL and "$title" not in WEBHOOK_BODY: + print("请求头或者请求体中必须包含 $title 和 $content") + return + + headers = parse_headers(WEBHOOK_HEADERS) + body = parse_body( + WEBHOOK_BODY, + WEBHOOK_CONTENT_TYPE, + lambda v: v.replace("$title", title.replace("\n", "\\n")).replace( + "$content", content.replace("\n", "\\n") + ), + ) + formatted_url = WEBHOOK_URL.replace( + "$title", urllib.parse.quote_plus(title) + ).replace("$content", urllib.parse.quote_plus(content)) + response = requests.request( + method=WEBHOOK_METHOD, url=formatted_url, headers=headers, timeout=15, data=body + ) + + if response.status_code == 200: + print("自定义通知推送成功!") + else: + print(f"自定义通知推送失败!{response.status_code} {response.text}") + + +def one() -> str: + """ + 获取一条一言。 + :return: + """ + url = "https://v1.hitokoto.cn/" + res = requests.get(url).json() + return res["hitokoto"] + " ----" + res["from"] + + +def add_notify_function(): + notify_function = [] + if push_config.get("BARK_PUSH"): + notify_function.append(bark) + if push_config.get("CONSOLE"): + notify_function.append(console) + if push_config.get("DD_BOT_TOKEN") and push_config.get("DD_BOT_SECRET"): + notify_function.append(dingding_bot) + if push_config.get("FSKEY"): + notify_function.append(feishu_bot) + if push_config.get("GOBOT_URL") and push_config.get("GOBOT_QQ"): + notify_function.append(go_cqhttp) + if push_config.get("GOTIFY_URL") and push_config.get("GOTIFY_TOKEN"): + notify_function.append(gotify) + if push_config.get("IGOT_PUSH_KEY"): + notify_function.append(iGot) + if push_config.get("PUSH_KEY"): + notify_function.append(serverJ) + if push_config.get("DEER_KEY"): + notify_function.append(pushdeer) + if push_config.get("CHAT_URL") and push_config.get("CHAT_TOKEN"): + notify_function.append(chat) + if push_config.get("PUSH_PLUS_TOKEN"): + notify_function.append(pushplus_bot) + if push_config.get("WE_PLUS_BOT_TOKEN"): + notify_function.append(weplus_bot) + if push_config.get("QMSG_KEY") and push_config.get("QMSG_TYPE"): + notify_function.append(qmsg_bot) + if push_config.get("QYWX_AM"): + notify_function.append(wecom_app) + if push_config.get("QYWX_KEY"): + notify_function.append(wecom_bot) + if push_config.get("TG_BOT_TOKEN") and push_config.get("TG_USER_ID"): + notify_function.append(telegram_bot) + if ( + push_config.get("AIBOTK_KEY") + and push_config.get("AIBOTK_TYPE") + and push_config.get("AIBOTK_NAME") + ): + notify_function.append(aibotk) + if ( + push_config.get("SMTP_SERVER") + and push_config.get("SMTP_SSL") + and push_config.get("SMTP_EMAIL") + and push_config.get("SMTP_PASSWORD") + and push_config.get("SMTP_NAME") + ): + notify_function.append(smtp) + if push_config.get("PUSHME_KEY"): + notify_function.append(pushme) + if ( + push_config.get("CHRONOCAT_URL") + and push_config.get("CHRONOCAT_QQ") + and push_config.get("CHRONOCAT_TOKEN") + ): + notify_function.append(chronocat) + if push_config.get("WEBHOOK_URL") and push_config.get("WEBHOOK_METHOD"): + notify_function.append(custom_notify) + if push_config.get("NTFY_TOPIC"): + notify_function.append(ntfy) + if push_config.get("WXPUSHER_APP_TOKEN") and ( + push_config.get("WXPUSHER_TOPIC_IDS") or push_config.get("WXPUSHER_UIDS") + ): + notify_function.append(wxpusher_bot) + if not notify_function: + print(f"无推送渠道,请检查通知变量是否正确") + return notify_function + + +def send(title: str, content: str, ignore_default_config: bool = False, **kwargs): + if kwargs: + global push_config + if ignore_default_config: + push_config = kwargs # 清空从环境变量获取的配置 + else: + push_config.update(kwargs) + + if not content: + print(f"{title} 推送内容为空!") + return + + # 根据标题跳过一些消息推送,环境变量:SKIP_PUSH_TITLE 用回车分隔 + skipTitle = os.getenv("SKIP_PUSH_TITLE") + if skipTitle: + if title in re.split("\n", skipTitle): + print(f"{title} 在SKIP_PUSH_TITLE环境变量内,跳过推送!") + return + + hitokoto = push_config.get("HITOKOTO") + content += "\n\n" + one() if hitokoto != "false" else "" + + notify_function = add_notify_function() + ts = [ + threading.Thread(target=mode, args=(title, content), name=mode.__name__) + for mode in notify_function + ] + [t.start() for t in ts] + [t.join() for t in ts] + + +def main(): + send("title", "content") + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/pangguai.py b/pangguai.py new file mode 100644 index 0000000..8807e6a --- /dev/null +++ b/pangguai.py @@ -0,0 +1,610 @@ + +""" + * 设置变量 PGSH_TOKEN,多号使用&隔开,网页获取ck:https://bigostk.github.io/pg/ + * ck格式1:token#备注 + * ck格式2: token + * 代理开关变量名:pg_dl,True为开启代理模式,False为关闭,默认为False + * 代理变量名:pg_dlurl,代理地址是动态代理api接口,一次性提取一个,选择txt格式,\r\n或者\n模式都可以 + * 并发开关变量名:pg_bf,True为开启并发模式,False为关闭,默认为False + * 并发数量变量名:pg_bfsum,并发几个就写几个,默认为3 + * 推送开关变量名:pg_ts,True为开启推送,False为关闭,默认为False + * 推送变量名1:WxPusher:pg_WxPusher_token是你的WxPusher的推送组的token,pg_WxPusher_uid是你的WxPusher该推送组的用户uid,推送给谁就填写谁的,填写一个即可 + * 推送变量名2:pushplus:pg_pushplus_token是你的pushplus的token + * Top: 上面两个推送配置哪个就使用哪个推送,两个都配置的话就两个都进行推送 + * 数据库地址变量名:pg_ckurl,保证打开数据库里面是ck,并使用&隔开,或者ck#备注,并使用&隔开 + * 不填备注默认使用隐私格式手机号作为用户名,否则使用填写的备注作为用户名 + * 出现False就是任务已完成或者不可完成 + +""" +import subprocess + +def check_yl(): + lb = ['requests', 'urllib3', 'requests_toolbelt', 'fake_useragent'] # 添加 fake_useragent 依赖 + for yl in lb: + try: + subprocess.check_call(["pip", "show", yl], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + except subprocess.CalledProcessError: + print(f"{yl} 未安装,开始安装...") + subprocess.check_call(["pip", "install", yl, "-i", "https://pypi.tuna.tsinghua.edu.cn/simple"], + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + print(f"{yl} 安装完成") + +check_yl() +############################### 本地环境ck,环境变量存在此处不生效 + + +# 在下方填入你的Token后,运行代码 +ck = "" + + + +ckurl1 = "" # 数据库地址,适配部分群友要求 +jh = False # 聚合ck模式,开启即所有环境模式ck都生效,都会合成为一个ck列表,关闭则优先处理环境变量,默认为True,False为关闭 + +############################# +# -----运行模式配置区,自行配置------ + +bf1 = False # True开启并发,False关闭并发 +bfsum1 = 5 # 并发数,开启并发模式生效 +lljf = 1 # 运行新版浏览任务,22金币,只有10天 + +# -------推送配置区,自行填写------- + +ts1 = True # True开启推送,False关闭推送 + +# -------代理配置区,自行填写------- + +dl1 = False # True开启代理,False关闭代理 +dl_url = "" # 代理池api + +# -----代理时间配置区,秒为单位------ + +dl_sleep = 30 # 代理切换时间 +qqtime = 15 # 请求超时时间 + +# -----时间配置区,默认即可------ + +a = "6" +b = "22" # 表示6-22点之间才执行任务 + +############################# +# ---------勿动区---------- + +# 已隐藏乾坤于此区域 + +########################### +# ---------代码块--------- + +import requests +import time +import random +import string +import os +import json +import hashlib +import threading +from functools import partial +from urllib.parse import urlparse +from datetime import datetime, timedelta +from concurrent.futures import ThreadPoolExecutor, as_completed +from urllib3.exceptions import InsecureRequestWarning +from requests_toolbelt import MultipartEncoder +from fake_useragent import UserAgent + +# ================================================================================== +# ======================== 伪装模块 - Anti-Detection Module ======================== +# ================================================================================== + +class Humanizer: + """ + 这是一个模拟人类行为的模块,用于取代固定的延时和参数。 + 人类行为不是固定的 time.sleep(6),而是充满随机和不确定性。 + """ + def __init__(self): + try: + self.ua = UserAgent() + except Exception: + self.fallback_uas = [ + "okhttp/3.14.9", + "Dalvik/2.1.0 (Linux; U; Android 13; SM-S908U Build/TP1A.220624.014)", + "Dalvik/2.1.0 (Linux; U; Android 12; SM-G998B Build/SP1A.210812.016)", + "Dalvik/2.1.0 (Linux; U; Android 11; Pixel 5 Build/RQ3A.210805.001a)" + ] + self.ua = None + self.phone_brands = ["Xiaomi", "Redmi", "HUAWEI", "OPPO", "VIVO", "Realme", "OnePlus", "Samsung"] + + def random_sleep(self, min_s, max_s): + """模拟人类操作的随机停顿,单位为秒""" + time.sleep(random.uniform(min_s, max_s)) + + def get_user_agent(self, type='android'): + """获取一个随机的、真实的User-Agent""" + if self.ua: + return self.ua.random + else: + return random.choice(self.fallback_uas) + + def get_device_brand(self): + """随机获取一个手机品牌""" + return random.choice(self.phone_brands) + + @staticmethod + def shuffle_headers(headers): + """将请求头的顺序随机化""" + header_list = list(headers.items()) + random.shuffle(header_list) + return dict(header_list) + +humanizer = Humanizer() # 实例化“伪装者” + +# ======================== 伪装模块结束 ======================== + + +dl = os.environ.get('pg_dl', dl1) +proxy_api_url = os.environ.get('pg_dlurl', dl_url) +bf = os.environ.get('pg_bf', bf1) +bfsum = os.environ.get('pg_bfsum', bfsum1) +ts = os.environ.get('pg_ts', str(ts1)) # 确保ts从环境变量获取时是字符串 +ckurl = os.environ.get('pg_ckurl', ckurl1) +WxPusher_uid = os.environ.get('pg_WxPusher_uid') +WxPusher_token = os.environ.get('pg_WxPusher_token') +pushplus_token = os.environ.get('pg_pushplus_token') + + +v = '7.0.3-final' # 版本号升级 + +global_proxy = { + 'http': None, + 'https': None +} + + +def start_dlapi(): + dlstart = threading.Thread(target=get_proxy, args=(stop_event,)) + dlstart.start() + + +stop_event = threading.Event() + + +def get_proxy(stop_event): + global global_proxy, ipp + a = 0 + while not stop_event.is_set(): + a += 1 + try: + response = requests.get(proxy_api_url) + if response.status_code == 200: + proxy1 = response.text.strip() + if "白名单" not in proxy1 and ":" in proxy1: + print(f'✅第{a}次获取代理成功: {proxy1}') + ipp = proxy1.split(':')[0] + global_proxy = {'http': f'http://{proxy1}', 'https': f'http://{proxy1}'} + humanizer.random_sleep(dl_sleep - 5, dl_sleep + 5) + else: + print(f"请求代理池: {proxy1}") + if "白名单" in proxy1: + print("响应中存在白名单字样,结束运行") + os._exit(0) + else: + print(f'❎第{a}次获取代理失败!状态码: {response.status_code},将随机等待后重试!') + humanizer.random_sleep(dl_sleep, dl_sleep * 1.5) + except Exception as e: + print(f"❎获取代理时发生网络错误: {e},将随机等待后重试!") + humanizer.random_sleep(dl_sleep, dl_sleep * 1.5) + + +def p(p): + if len(p) == 11: + return p[:3] + '****' + p[7:] + else: + return p + + +class PGSH: + def __init__(self, cki): + self.msg = None + self.messages = [] + self.title = None + self.phone = None + self.token = cki.split('#')[0] + self.cook = cki + self.total_amount = 0 + self.id = None + + self.device_ua = humanizer.get_user_agent() + self.device_brand = humanizer.get_device_brand() + + self.hd = { + 'User-Agent': self.device_ua, + 'Accept': 'application/json, text/plain, */*', + 'Version': "1.58.0", + 'Content-Type': "application/x-www-form-urlencoded;charset=UTF-8", + 'Authorization': self.token, + 'channel': "android_app" + } + self.hd1 = { + 'User-Agent': self.device_ua, + 'Connection': "Keep-Alive", + 'Accept-Encoding': "gzip", + 'Authorization': self.token, + 'Version': "1.58.0", + 'channel': "android_app", + 'phoneBrand': self.device_brand, + 'Content-Type': "application/x-www-form-urlencoded;charset=UTF-8" + } + self.session = requests.Session() + + self.listUrl = 'https://userapi.qiekj.com/task/list' + self.phone_url = 'https://userapi.qiekj.com/user/info' + self.check_url = 'https://userapi.qiekj.com/user/balance' + self.rcrw_url = 'https://userapi.qiekj.com/task/completed' + self.sign_url = 'https://userapi.qiekj.com/signin/doUserSignIn' + self.jtjl_url = 'https://userapi.qiekj.com/ladderTask/applyLadderReward' + self.jrjf_url = "https://userapi.qiekj.com/integralRecord/pageList" # 新增:今日积分URL + + def _make_request(self, method, url, headers, data=None, params=None, max_retries=3): + humanizer.random_sleep(1.5, 3.5) + for attempt in range(max_retries): + try: + final_headers = humanizer.shuffle_headers(headers) + response = self.session.request( + method, url, headers=final_headers, data=data, params=params, + proxies=global_proxy if dl else None, timeout=qqtime, verify=False + ) + response.raise_for_status() + return response.json() + except requests.exceptions.RequestException as e: + print(f"~请求异常: {e}。模拟真人, {attempt + 1}/{max_retries} 次尝试...") + if attempt < max_retries - 1: + humanizer.random_sleep(3, 7) + else: + print(f"~达到最大重试次数,任务失败。") + return None + + def sg(self, y): + timestamp = str(int(time.time() * 1000)) + path = urlparse(y).path + data = f"appSecret=nFU9pbG8YQoAe1kFh+E7eyrdlSLglwEJeA0wwHB1j5o=&channel=android_app×tamp={timestamp}&token={self.token}&version=1.58.0&{path}" + data1 = f"appSecret=Ew+ZSuppXZoA9YzBHgHmRvzt0Bw1CpwlQQtSl49QNhY=&channel=alipay×tamp={timestamp}&token={self.token}&{path}" + sign = hashlib.sha256(data.encode()).hexdigest() + sign1 = hashlib.sha256(data1.encode()).hexdigest() + return sign, sign1, timestamp + + def name(self): + data = {'token': self.token} + re = self._make_request('post', self.phone_url, headers=self.hd, data=data) + if re and re['code'] == 0: + try: + self.phone = self.cook.split('#')[1] if "#" in self.cook else p(re['data']['phone']) + except Exception: + print(f'[账号] Cookie备注解析异常') + return False + + self.id = re["data"]["id"] + sign, _, timestamp = self.sg(self.check_url) + self.hd['sign'] = sign + self.hd['timestamp'] = timestamp + r = self._make_request('post', self.check_url, headers=self.hd, data=data) + + if r and r['code'] == 0: + balance = r['data']['integral'] + print(f"[{self.phone}] ✅登录成功!积分余额: {balance}") + return True + else: + print(f"[{self.phone}] ❎获取余额失败: {r.get('msg', '未知错误') if r else '请求失败'}") + return False + else: + msg = re.get("msg", "未知错误") if re else "请求失败" + print(f"[账号] ❎登录失败==> {msg}") + return False + + def sign(self): + data = {'activityId': '600001', 'token': self.token} + sign, _, timestamp = self.sg(self.sign_url) + self.hd['sign'] = sign + self.hd['timestamp'] = timestamp + re = self._make_request('post', self.sign_url, headers=self.hd, data=data) + if re: + print(f"[{self.phone}] ✅签到==> {re.get('msg', '无消息')}") + + # 支付宝广告任务 + def zfbgg1(self): + # 采纳用户建议:分组执行,每组6-10次,组间休息10-30秒 + print(f"--- 支付宝任务开始,将分批执行(每批6-10次) ---") + total_tasks_done = 0 + max_tasks_possible = 50 # 任务上限 + + while total_tasks_done < max_tasks_possible: + batch_size = random.randint(6, 10) + print(f"--- 开始新一批任务,本批 {batch_size} 次 ---") + + for t in range(batch_size): + if total_tasks_done >= max_tasks_possible: + print("~已达到50次任务上限,停止。") + break + + data = {'taskType': "9", 'token': self.token} + _, sign1, timestamp = self.sg(self.rcrw_url) + hd1 = { + 'User-Agent': "Dalvik/2.1.0 (Linux; U; Android 13; MEIZU 20 Build/TKQ1.221114.001) Chrome/105.0.5195.148 MYWeb/0.11.0.240407200246 UWS/3.22.2.9999 UCBS/3.22.2.9999_220000000000 Mobile Safari/537.36 NebulaSDK/1.8.100112 Nebula AlipayDefined(nt:WIFI,ws:1080|1862|2.8125) AliApp(AP/10.5.88.8000) AlipayClient/10.5.88.8000 Language/zh-Hans useStatusBar/true isConcaveScreen/true NebulaX/1.0.0 DTN/2.0", + 'Connection': "Keep-Alive", 'Accept-Encoding': "gzip", 'Content-Type': "application/x-www-form-urlencoded", + 'Accept-Charset': "UTF-8", 'channel': "alipay", 'sign': sign1, + 'x-release-type': "ONLINE", 'version': "", 'timestamp': timestamp + } + response = self._make_request('post', self.rcrw_url, headers=hd1, data=data) + + if response and response.get("data"): + total_tasks_done += 1 + print(f"[{self.phone}] ✅第{total_tasks_done}次支付宝广告==> {response['data']}") + else: + msg = response.get('msg') if response else "请求失败" + print(f"[{self.phone}] ❎第{total_tasks_done + 1}次广告失败==> {msg}, 模拟用户放弃") + total_tasks_done = max_tasks_possible # 设置为最大值以跳出外层循环 + break # 跳出内层循环 + + humanizer.random_sleep(4, 8) # 模拟单次任务的观看延迟 + + if total_tasks_done >= max_tasks_possible: + break # 跳出外层循环 + + # 模拟一组任务完成后的休息 + print(f"--- 本批完成,模拟休息... ---") + humanizer.random_sleep(10, 30) + + print(f"--- 支付宝任务结束,共完成 {total_tasks_done} 次 ---") + + def rcrw(self): + data = {'token': self.token} + sign, _, timestamp = self.sg(self.listUrl) + self.hd['sign'] = sign + self.hd['timestamp'] = timestamp + response = self._make_request('post', self.listUrl, headers=self.hd, data=data) + if response and response.get('code') == 0: + tasks = response.get('data', {}).get('items', []) + if not tasks: + print("~日常任务列表为空。") + return + + random.shuffle(tasks) + print(f'[{self.phone}] ✅获取到{len(tasks)}个日常任务, 将随机顺序执行...') + for item in tasks: + title = item["title"] + task_data = {'taskCode': item["taskCode"], 'token': self.token} + sign, _, timestamp = self.sg(self.rcrw_url) + self.hd['sign'] = sign + self.hd['timestamp'] = timestamp + + humanizer.random_sleep(3, 7) + + response1 = self._make_request('post', self.rcrw_url, headers=self.hd, data=task_data) + data1 = response1.get("data") if response1 else "请求失败" + if data1: + print(f'[{self.phone}] ✅完成日常任务[{title}]成功==> {data1}') + else: + print(f'[{self.phone}] ❎完成日常任务[{title}]失败==> {response1.get("msg") if response1 else "请求失败"}') + else: + print("❎获取日常任务列表失败!") + + def timejl(self): + url = "https://userapi.qiekj.com/timedBenefit/applyRewardForTimeBenefit" + params = {'token': self.token} + sign, _, timestamp = self.sg(url) + self.hd1['sign'] = sign + self.hd1['timestamp'] = timestamp + r = self._make_request('get', url, headers=self.hd1, params=params) + if r and r.get("code") == 0: + print(f'[{self.phone}] ✅领取时间段奖励成功==> {r["data"]["rewardNum"]}') + else: + print(f'[{self.phone}] ❎领取时间段奖励失败==> {r.get("msg") if r else "请求失败"}') + + def start(self): + if not self.name(): + return + + available_tasks = [ + {'name': '签到', 'func': self.sign}, + {'name': '领取时间段奖励', 'func': self.timejl}, + {'name': '支付宝广告', 'func': self.zfbgg1}, + {'name': '遍历日常任务', 'func': self.rcrw}, + ] + + random.shuffle(available_tasks) + + print(f"\n[{self.phone}] --------滴滴, {self.device_brand} 牌快车发车, 坐稳了--------") + print(f"本次任务序列: {[task['name'] for task in available_tasks]}") + + for task in available_tasks: + humanizer.random_sleep(5, 12) + print(f"----- [{self.phone}] 开始执行: {task['name']} -----") + try: + task['func']() + except Exception as e: + print(f"执行任务 [{task['name']}] 时发生意外错误: {e}") + + humanizer.random_sleep(10, 20) + print(f"----- [{self.phone}] 所有任务已执行完毕 -----") + + # 新增:查询当日积分(基于原版jrjf逻辑,适配为实例方法) + def query_daily_points(self, i): + try: + # 1. 获取用户名 + # (name() 已经在start()中调用, self.phone 应该有值, 但为保险起见重新获取) + hd_user = self.hd.copy() + sign, _, timestamp = self.sg(self.phone_url) + hd_user['sign'] = sign + hd_user['timestamp'] = timestamp + r = requests.post(self.phone_url, data={'token': self.token}, headers=hd_user).json() + + if r['code'] != 0: + return {'序号': i + 1, '用户': f"账号{i+1}", 'arg1': f"登录失败: {r['msg']}", 'arg2': "N/A"} + + phone = p(r['data']['phone']) + if "#" in self.cook: + phone = self.cook.split('#')[1] + + # 2. 获取总积分 + hd_balance = self.hd.copy() + sign, _, timestamp = self.sg(self.check_url) + hd_balance['sign'] = sign + hd_balance['timestamp'] = timestamp + r1 = requests.post(self.check_url, data={'token': self.token}, headers=hd_balance).json() + balance = r1['data']['integral'] if r1['code'] == 0 else 'N/A' + + # 3. 获取今日积分 + data = { + 'page': (None, '1'), 'pageSize': (None, '100'), + 'type': (None, '100'), 'receivedStatus': (None, '1'), + 'token': (None, self.token), + } + # 这个请求头是原版查询积分专用的,保持一致 + hd_jrjf = { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 23117RK66C Build/UKQ1.230804.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/118.0.0.0 Mobile Safari/537.36 AgentWeb/5.0.0 UCBrowser/11.6.4.950 com.qiekj.QEUser', + 'Accept': 'application/json, text/plain, */*', + 'channel': 'android_app', + } + re_response = requests.post(self.jrjf_url, headers=hd_jrjf, files=data).json() + + total_amount = 0 + if re_response.get('data') and re_response['data'].get('items'): + current_date = datetime.now().strftime('%Y-%m-%d') + for item in re_response['data']['items']: + received_date = item['receivedTime'][:10] + if received_date == current_date: + total_amount += item['amount'] + print(f"[{phone}] ✅今日获得积分: {total_amount}") + return { + '序号': i + 1, '用户': phone, 'arg1': balance, 'arg2': total_amount + } + except Exception as e: + print(f"[账号{i + 1}] ❎查询当日积分出现错误: {e}") + return { + '序号': i + 1, '用户': f"账号{i+1}", 'arg1': "查询出错", 'arg2': "N/A" + } + +# ================================================================================== +# ============================ 独立推送和汇总功能 ============================ +# ================================================================================== + +def WxPusher_ts(content): + try: + url = 'https://wxpusher.zjiecode.com/api/send/message' + params = { + 'appToken': WxPusher_token, + 'content': content, + 'summary': '胖乖生活-任务汇总', + 'contentType': 3, # 1为text, 2为html, 3为markdown + 'uids': [WxPusher_uid] + } + re = requests.post(url, json=params) + msg = re.json().get('msg', None) + print(f'WxPusher推送结果:{msg}\n') + except Exception as e: + print(f"WxPusher推送出现错误: {e}") + +def pushplus_ts(content): + try: + url = 'https://www.pushplus.plus/send/' + data = { + "token": pushplus_token, + "title": '胖乖生活-任务汇总', + "content": content, + "template": "html" # pushplus支持html + } + re = requests.post(url, json=data) + msg = re.json().get('msg', None) + print(f'pushplus推送结果:{msg}\n') + except Exception as e: + print(f"pushplus推送出现错误: {e}") + +def format_and_send_summary(msg_list): + try: + sorted_data = sorted(msg_list, key=lambda x: x['序号']) + table_content = '' + for row in sorted_data: + table_content += f"{row['序号']}{row['用户']}{row['arg1']}{row['arg2']}" + + summary_html = f"{table_content}
🆔用户名总积分今日积分
" + + if WxPusher_token and WxPusher_uid: + WxPusher_ts(summary_html) + if pushplus_token: + pushplus_ts(summary_html) + except Exception as e: + print(f"汇总推送出现错误: {e}") + + +# ============================ 脚本主入口 ============================ + +if __name__ == '__main__': + print(f"当前版本: {v}") + requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) + print = partial(print, flush=True) + + # --- Cookie 获取逻辑 --- + if jh: + ck1 = [] + if 'PGSH_TOKEN' in os.environ: ck1.append(os.environ.get('PGSH_TOKEN')) + if ckurl != "": ck1.append(requests.get(ckurl).text.strip()) + if ck != "": ck1.append(ck) + if not ck1: print("变量为空..."); exit(-1) + cookie = '&'.join(ck1) + else: + if 'PGSH_TOKEN' in os.environ: + cookie = os.environ.get('PGSH_TOKEN') + else: + cookie = ck if ckurl == "" else requests.get(ckurl).text.strip() + if cookie == "": print("变量为空..."); exit(-1) + cookies = cookie.split("&") + print(f"胖乖生活共获取到 {len(cookies)} 个账号") + + if dl: + start_dlapi() + print("代理模块已启动,等待初始化...") + time.sleep(5) + + # --- 任务执行逻辑 --- + if bf: + print("✅开启高仿真并发模式") + with ThreadPoolExecutor(max_workers=int(bfsum)) as executor: + futures = [executor.submit(PGSH(ck_item).start) for ck_item in cookies] + for future in as_completed(futures): future.result() + else: + print("✅开启高仿真常规运行模式") + for i, ck_item in enumerate(cookies): + print(f"\n================== 开始第{i + 1}个账号 ==================") + PGSH(ck_item).start() + if i < len(cookies) - 1: + interval = random.uniform(10, 30) + print(f"{interval:.1f}秒后进行下一个账号...") + time.sleep(interval) + + if dl: + stop_event.set() + + print("\n所有账号任务执行完毕。") + + # --- 积分汇总和推送逻辑 --- + if ts.lower() == 'true': # 检查推送总开关 + print("\n======开始查询所有账号当日收益======") + summary_list = [] + for i, ck_item in enumerate(cookies): + print(f"---正在查询第{i + 1}个账号...") + try: + # 必须为每个账号创建新实例,以确保使用正确的token + temp_instance = PGSH(ck_item) + summary_list.append(temp_instance.query_daily_points(i)) + except Exception as e: + print(f"查询账号 {i+1} 积分时出错: {e}") + summary_list.append({'序号': i + 1, '用户': f"账号{i+1}", 'arg1': "查询失败", 'arg2': "N/A"}) + + format_and_send_summary(summary_list) + else: + print("推送未开启(pg_ts=False),跳过积分统计。") + +# 当前脚本来自于 脚本库下载! +# 脚本库官方QQ群: +# 脚本库中的所有脚本文件均来自热心网友上传和互联网收集。 +# 脚本库仅提供文件上传和下载服务,不提供脚本文件的审核。 +# 您在使用脚本库下载的脚本时自行检查判断风险。 +# 所涉及到的 账号安全、数据泄露、设备故障、软件违规封禁、财产损失等问题及法律风险,与脚本库无关!均由开发者、上传者、使用者自行承担。 \ No newline at end of file diff --git a/qiehuang.py b/qiehuang.py new file mode 100644 index 0000000..b332171 --- /dev/null +++ b/qiehuang.py @@ -0,0 +1,507 @@ +import requests +import json +import os +import time +import re +import random +from collections import defaultdict +from notify import send + +users = os.getenv("QH", "").splitlines() +# 清洗数据:去除每个用户字符串的首尾空格,过滤空行/全空格的无效数据 +users = [user.strip() for user in users if user.strip()] + +# 解析为 (wid, 手机号) 列表 +parsed_users = [] +for user_str in users: + if "#" in user_str: + # 按#拆分(只拆1次,避免手机号含#导致拆分错误) + wid, phone = user_str.split("#", 1) + parsed_users.append((wid.strip(), phone.strip())) + else: + # 兼容旧格式:只有wid没有手机号时,手机号为空字符串 + parsed_users.append((user_str.strip(), "")) + +# UA可自行替换为自己的 +user_agent = "Mozilla/5.0 (Linux; Android 14; 23046RP50C Build/UKQ1.230804.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/142.0.7444.172 Safari/537.36 XWEB/1420045 MMWEBSDK/20250201 MMWEBID/5714 MicroMessenger/8.0.57.2820(0x28003956) WeChat/arm64 Weixin Android Tablet NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9" +STEP_ORDER = ["登录", "领取种子", "签到", "浏览任务", "收获作物", "播种", "循环浇水"] +STEP_EMOJI = {"登录": "🔑", "领取种子": "🌱", "签到": "📅", "浏览任务": "🔍", "收获作物": "🌾", "播种": "🌱", "循环浇水": "🔄"} + +def _short(s, n=120): + s = s.strip() + return s if len(s) <= n else s[:n - 1] + "…" + +def _pick_status(line: str) -> str: + if "✅" in line: return "✅" + if "⚠️" in line: return "⚠️" + if "❌" in line: return "❌" + return "ℹ️" + +def _step_key(line: str) -> str: + for k in STEP_ORDER: + if k in line: + return k + return "信息" + +def _pull_resource_snapshot(lines): + res = {} + for line in reversed(lines): + if "☀️" in line: + try: res["sun"] = int(re.findall(r"☀️(\d+)", line)[0]) + except: pass + if "💧" in line: + try: res["water"] = int(re.findall(r"💧(\d+)", line)[0]) + except: pass + if "🍅" in line: + try: res["fruit"] = int(re.findall(r"🍅(\d+)", line)[0]) + except: pass + if len(res) >= 2: + break + return res + +def render_report(all_lines): + blocks, cur = [], [] + for ln in all_lines: + if ln.strip().startswith("👤 用户"): + if cur: blocks.append(cur) + cur = [ln.strip()] + elif ln is not None: + cur.append(ln.rstrip()) + if cur: blocks.append(cur) + out = [] + for b in blocks: + if not b: continue + header = b[0].strip() + out.append("━━━━━━━━━━━━━━━━━━━━━━") + out.append(header) + bucket = defaultdict(list) + for ln in b[1:]: + if not ln.strip(): continue + bucket[_step_key(ln)].append(ln) + snap = _pull_resource_snapshot(b) + if snap: + res_line = "📊 当前资源:" + if "sun" in snap: res_line += f"☀️{snap['sun']} " + if "water" in snap: res_line += f"💧{snap['water']} " + if "fruit" in snap: res_line += f"🍅{snap['fruit']} " + out.append(res_line.strip()) + for step in STEP_ORDER + ["信息"]: + if step not in bucket: continue + lines = bucket[step] + cleaned, seen = [], set() + for ln in lines: + if set(ln.strip()) in (set("="),): + continue + # 关键修复:循环浇水日志不做去重(保留所有记录) + if step == "循环浇水": + cleaned.append(ln) + else: + norm = re.sub(r"账号\d+:", "", re.sub(r"\s+", " ", ln)).strip() + if norm not in seen: + seen.add(norm) + cleaned.append(ln) + # 循环浇水保留所有记录 + if step == "循环浇水": + picked = cleaned + else: + picked = cleaned[-1:] if cleaned else [] + for pln in picked: + status = _pick_status(pln) + icon = STEP_EMOJI.get(step, "•") + body = re.sub(r"^[🔑🌱📅🔍🌾🔄]+\s*" + re.escape(step) + r"[::]?\s*", "", pln) + body = re.sub(r"^[✅❌⚠️ℹ️]+\s*", "", body) + out.append(f"{icon} {step} {status} {_short(body)}") + succ = sum("✅" in ln for ln in b) + fail = sum("❌" in ln for ln in b) + warn = sum("⚠️" in ln for ln in b) + out.append(f"🧾 小结:成功 {succ} · 预警 {warn} · 失败 {fail}") + out.append("━━━━━━━━━━━━━━━━━━━━━━") + return "\n".join(out) + + +def login(wid, phone, user_logs): + step = "登录" + # 校验手机号是否存在 + if not phone: + msg = "未配置手机号,登录失败 🔒" + print(msg) + user_logs.append(f"🔑 {step}: {msg}") + return None + try: + url = "https://api.zhumanito.cn/api/login" + # 新增手机号参数 wm_phone + payload = {"wid": wid, "wm_phone": phone} + headers = {'User-Agent': user_agent, 'Content-Type': "application/json"} + response = requests.post(url, data=json.dumps(payload), headers=headers) + response.raise_for_status() + dljson = response.json() + # 响应格式新增 code 字段校验 + if dljson.get("code") == 200 and 'data' in dljson and 'token' in dljson['data'] and 'user' in dljson['data'] and 'land' in dljson['data']: + msg = f"登录成功(手机号:{phone})✅" + print(msg) + user_logs.append(f"🔑 {step}: {msg}") + time.sleep(random.uniform(4, 5)) + return { + "token": dljson['data']['token'], + "user_data": dljson['data']['user'], + "land_data": dljson['data']['land'] + } + else: + msg = f"登录失败,返回数据: {dljson} ❌" + print(msg) + user_logs.append(f"🔑 {step}: {msg}") + return None + except Exception as e: + msg = f"登录出错(手机号:{phone}): {str(e)} ❌" + print(msg) + user_logs.append(f"🔑 {step}: {msg}") + return None + +def get_seeds(authorization, user_logs): + step = "领取种子" + if not authorization: + msg = "未获取到授权,无法领取种子 🔒" + print(msg) + user_logs.append(f"🌱 {step}: {msg}") + return + try: + url = "https://api.zhumanito.cn/api/guide" + headers = {'User-Agent': user_agent, 'Content-Type': "application/json", 'authorization': authorization} + for st in (1, 2): + payload = {"status": st} + response = requests.post(url, data=json.dumps(payload), headers=headers) + response.raise_for_status() + user_logs.append(f"🌱 {step}: 领取/引导完成 ✅") + time.sleep(random.uniform(4, 5)) + except Exception as e: + msg = f"领取种子出错: {str(e)} ❌" + print(msg) + user_logs.append(f"🌱 {step}: {msg}") + +def check_in(authorization, user_logs): + step = "签到" + if not authorization: + msg = "未获取到授权,无法签到 🔒" + print(msg) + user_logs.append(f"📅 {step}: {msg}") + return + try: + url = "https://api.zhumanito.cn/api/task/complete" + headers = {'User-Agent': user_agent, 'Content-Type': "application/x-www-form-urlencoded", 'authorization': authorization} + response = requests.post(url, headers=headers) + response_data = response.json() + if response_data.get("msg") == "成功": + msg = "签到成功 ✅" + print(f"签到结果: {msg}") + user_logs.append(f"📅 {step}: {msg}") + elif response_data.get("msg") == "不可重复完成": + msg = "今日已签到,无需重复操作 ✅" + print(f"签到结果: {msg}") + user_logs.append(f"📅 {step}: {msg}") + else: + msg = f"失败,原因: {response_data.get('msg', '未知错误')} ❌" + print(f"签到结果: {msg}") + user_logs.append(f"📅 {step}: {msg}") + time.sleep(random.uniform(4, 5)) + except Exception as e: + msg = f"签到出错: {str(e)} ❌" + print(msg) + user_logs.append(f"📅 {step}: {msg}") + +def explore(authorization, wid, user_logs): + step = "浏览任务" + if not authorization: + msg = "未获取到授权,无法执行浏览任务 🔒" + print(msg) + user_logs.append(f"🔍 {step}: {msg}") + return + max_retry = 3 + retry_count = 0 + while retry_count < max_retry: + try: + url = f"https://api.zhumanito.cn/?wid={wid}" + headers = { + 'Host': 'api.zhumanito.cn', + 'User-Agent': user_agent, + 'authorization': authorization, + 'sec-ch-ua': '"Chromium";v="142", "Android WebView";v="142", "Not_A Brand";v="99"', + 'sec-ch-ua-mobile': '?0', + 'sec-ch-ua-platform': '"Android"', + 'upgrade-insecure-requests': '1', + 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/wxpic,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', + 'x-requested-with': 'com.tencent.mm', + 'sec-fetch-site': 'same-site', + 'sec-fetch-mode': 'navigate', + 'sec-fetch-user': '?1', + 'sec-fetch-dest': 'document', + 'referer': 'https://h5.zhumanito.cn/', + 'accept-encoding': 'gzip, deflate, br, zstd', + 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'priority': 'u=0, i' + } + response = requests.get(url, headers=headers, allow_redirects=False, timeout=10, verify=True) + if response.status_code == 302: + msg = "浏览任务完成✅" + print(f"浏览任务:{msg}") + user_logs.append(f"🔍 {step}: {msg}") + time.sleep(random.uniform(4, 5)) + break + elif response.status_code == 429: + retry_after = int(response.headers.get("Retry-After", "1")) + retry_count += 1 + if retry_count < max_retry: + msg = f"浏览请求限速,等待{retry_after}秒后重试(第{retry_count}/{max_retry}次)" + print(f"浏览任务:{msg}") + time.sleep(retry_after) + else: + msg = f"浏览请求多次限速,放弃重试 ❌" + print(f"浏览任务:{msg}") + user_logs.append(f"🔍 {step}: {msg}") + else: + msg = f"浏览失败,状态码: {response.status_code} ❌" + print(f"浏览任务:{msg}") + user_logs.append(f"🔍 {step}: {msg}") + break + except requests.exceptions.RequestException as e: + msg = f"浏览任务出错: {str(e)} ❌" + print(msg) + user_logs.append(f"🔍 {step}: {msg}") + break + +def harvest(authorization, user_logs, account): + step = "收获作物" + try: + url = "https://api.zhumanito.cn/api/harvest" + headers = { + 'User-Agent': user_agent, + 'Content-Type': "application/x-www-form-urlencoded;charset=utf-8", + 'authorization': authorization + } + before_fruit = int(account["user_data"].get("fruit_num", 0)) + response = requests.post(url, headers=headers, data=b"", timeout=15) + response.raise_for_status() + res_json = response.json() + if res_json.get("code") == 200: + account["user_data"] = res_json["data"]["user"] + account["land_data"] = res_json["data"]["land"] + after_fruit = int(account["user_data"].get("fruit_num", 0)) + total_after = int(account["user_data"].get("total_fruit_num", after_fruit)) + delta = max(0, after_fruit - before_fruit) + msg = f"收获成功!🍅+{delta} → 现有 {after_fruit}(累计 {total_after})" + print(msg) + user_logs.append(f"🌾 {step}: {msg}") + snap_line = f"📊 收获后资源:☀️{account['user_data'].get('sun_num',0)} 💧{account['user_data'].get('water_num',0)} 🍅{after_fruit}" + print(snap_line) + user_logs.append(snap_line) + time.sleep(random.uniform(4, 5)) + return True + else: + msg = f"收获失败: {res_json.get('msg', '未知信息')} ⚠️" + print(msg) + user_logs.append(f"🌾 {step}: {msg}") + return False + except Exception as e: + msg = f"收获请求出错: {str(e)} ❌" + print(msg) + user_logs.append(f"🌾 {step}: {msg}") + return False + +def plant_seed(authorization, user_logs, account): + step = "播种" + try: + url = "https://api.zhumanito.cn/api/seed" + headers = { + 'User-Agent': user_agent, + 'Content-Type': "application/x-www-form-urlencoded;charset=utf-8", + 'authorization': authorization + } + response = requests.post(url, headers=headers, data=b"", timeout=15) + response.raise_for_status() + res_json = response.json() + if res_json.get("code") == 200: + msg = "播种成功!✅" + print(msg) + user_logs.append(f"🌱 {step}: {msg}") + account["user_data"] = res_json["data"]["user"] + account["land_data"] = res_json["data"]["land"] + time.sleep(random.uniform(4, 5)) + return True + else: + msg = f"播种失败: {res_json.get('msg', '未知信息')} ⚠️" + print(msg) + user_logs.append(f"🌱 {step}: {msg}") + return False + except Exception as e: + msg = f"播种请求出错: {str(e)} ❌" + print(msg) + user_logs.append(f"🌱 {step}: {msg}") + return False + +def water_once(headers, account_idx): + """单次浇水(带限速重试)""" + max_retry = 3 + retry_count = 0 + while retry_count < max_retry: + try: + response = requests.post( + "https://api.zhumanito.cn/api/water", + headers=headers, + data=b"", + allow_redirects=False, + timeout=(25, 30) + ) + + if response.status_code == 200: + return response.json() + elif response.status_code == 429: + retry_after = int(response.headers.get("Retry-After", "1")) + retry_count += 1 + if retry_count < max_retry: + print(f"账号{account_idx}:浇水请求限速,等待{retry_after}秒后重试(第{retry_count}/{max_retry}次)") + time.sleep(retry_after) + else: + raise Exception(f"浇水请求多次限速({max_retry}次),放弃重试") + else: + raise Exception(f"响应状态码异常: {response.status_code},内容: {response.text}") + except json.JSONDecodeError: + raise Exception(f"返回非JSON数据: {response.text}") + except Exception as e: + if retry_count >= max_retry - 1: + raise e + retry_count += 1 + time.sleep(1) + return None + +def loop_watering(headers, account_idx, account, user_logs): + step = "循环浇水" + user_logs.append(f"🔄 {step}:进入循环浇水(需💧≥20且☀️≥20)") + print(f"\n🔄 账号{account_idx}:进入循环浇水(需💧≥20且☀️≥20)") + + water_headers = headers.copy() + water_headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8" + + while True: + water = account["user_data"].get("water_num", 0) + sun = account["user_data"].get("sun_num", 0) + + if water >= 20 and sun >= 20: + log_msg = f"🔄 {step}:📌 账号{account_idx}:资源满足(💧{water},☀️{sun}),浇水..." + print(log_msg) + user_logs.append(log_msg) + + try: + res = water_once(water_headers, account_idx) + + if res.get("code") == 200: + # 浇水成功,更新用户数据 + account["user_data"] = res["data"]["user"] + land = res["data"].get("land", []) + + success_msg = f"🔄 {step}:✅ 账号{account_idx}:浇水成功!" + status_msg = f"🔄 {step}:📊 剩余:💧{account['user_data']['water_num']},☀️{account['user_data']['sun_num']}" + print("="*35) + print(success_msg) + print(status_msg) + # 关键修改:每条浇水成功日志都保留(不合并、不删除) + user_logs.append(success_msg) + user_logs.append(status_msg) + + if land: + land_msg = f"🔄 {step}:🌱 土地:共{len(land)}块,阶段{land[0]['seed_stage']} 🌱" + print(land_msg) + user_logs.append(land_msg) + print("="*35) + + time.sleep(random.uniform(4, 5)) + else: + # 浇水失败(如达上限、其他错误) + fail_msg = f"🔄 {step}:❌ 账号{account_idx}:浇水失败:{res.get('msg', '未知错误')}" + print(fail_msg) + user_logs.append(fail_msg) + break + + except Exception as e: + error_msg = f"🔄 {step}:⚠️ 账号{account_idx}:浇水请求异常:{str(e)} ❌" + print(error_msg) + user_logs.append(error_msg) + break + else: + end_msg = f"🔄 {step}:🔚 账号{account_idx}:资源不足(💧{water},☀️{sun}),停止浇水 ⏹️" + print(end_msg) + user_logs.append(end_msg) + fruit = account['user_data'].get('fruit_num', 0) + final_snap = f"📊 最终资源:☀️{sun} 💧{water} 🍅{fruit}" + print(final_snap) + user_logs.append(final_snap) + break + +def process_user(wid, phone, user_index): + user_logs = [f"👤 用户{user_index}: wid={wid} | 手机号={phone}"] + print(f"\n===== 开始处理用户 {user_index} (wid: {wid}, 手机号: {phone}) =====") + # 登录时传入 wid 和手机号 + login_data = login(wid, phone, user_logs) + if login_data: + auth_token = login_data["token"] + headers = {'User-Agent': user_agent, 'authorization': auth_token} + account = {"user_data": login_data["user_data"], "land_data": login_data["land_data"]} + fruit = account['user_data'].get('fruit_num', 0) + print(f"📊 当前番茄数量:{fruit}") + user_logs.append(f"📊 当前番茄数量:{fruit}") + if account["user_data"].get("new_status", 2) != 2: + get_seeds(auth_token, user_logs) + check_in(auth_token, user_logs) + explore(auth_token, wid, user_logs) + current_stage = 0 + if account["land_data"] and len(account["land_data"]) > 0: + current_stage = account["land_data"][0].get("seed_stage", 0) + print(f"\n🧠 账号{user_index}:智能判断... 当前土地状态: {current_stage}") + user_logs.append(f"ℹ️ 土地状态: {current_stage}") + if current_stage == 5: + print("判断:作物已成熟。") + user_logs.append("🧠 判断:作物已成熟。") + print(f">> 账号{user_index}:执行 [收获]...") + harvest_success = harvest(auth_token, user_logs, account) + if harvest_success: + print(f">> 账号{user_index}:执行 [播种]...") + plant_seed(auth_token, user_logs, account) + elif current_stage == 0: + print("判断:土地为空。") + user_logs.append("🧠 判断:土地为空。") + print(f">> 账号{user_index}:执行 [播种]...") + plant_seed(auth_token, user_logs, account) + else: + print("判断:作物生长中... 无需收获或播种。") + user_logs.append("🧠 判断:作物生长中。") + loop_watering(headers, user_index, account, user_logs) + else: + msg = "获取授权失败,无法执行后续操作 🔒" + print(msg) + user_logs.append(f"⚠️ {msg}") + print(f"===== 完成处理用户 {user_index} =====\n") + time.sleep(3) + return user_logs + +if __name__ == "__main__": + if not parsed_users or len(parsed_users) == 0: + print("未从环境变量TYQH中获取到任何用户信息! 🚫") + send("统一茄皇", "未从环境变量TYQH中获取到任何用户信息! 🚫") + else: + print(f"共检测到 {len(parsed_users)} 个用户,开始依次处理... 👥") + all_logs = [] + for i, (wid, phone) in enumerate(parsed_users, 1): + try: + user_logs = process_user(wid, phone, i) + all_logs.extend(user_logs) + all_logs.append("") + except Exception as e: + error_msg = f"用户 {i} 处理过程中发生未捕获错误: {str(e)} ❌" + print(error_msg) + all_logs.append(f"❌ {error_msg}") + all_logs.append("") + # 推送完整报告(包含所有浇水成功记录) + report = render_report(all_logs) + print("\n" + "="*50) + print("最终推送通知内容:") + print(report) + print("="*50) + send("统一茄皇", report) \ No newline at end of file diff --git a/ql.js b/ql.js new file mode 100644 index 0000000..70a077c --- /dev/null +++ b/ql.js @@ -0,0 +1,209 @@ +'use strict'; +/* + ========================= + qinglong api + base qinglong project + ========================= +*/ +const got = require('got'); +require('dotenv').config(); +const { readFile } = require('fs/promises'); +const path = require('path'); + +const qlDir = '/ql'; +const fs = require('fs'); +let Fileexists = fs.existsSync('/ql/data/config/auth.json'); +let authFile=""; +if (Fileexists) + authFile="/ql/data/config/auth.json" +else + authFile="/ql/config/auth.json" +//const authFile = path.join(qlDir, 'config/auth.json'); + +const api = got.extend({ + prefixUrl: 'http://127.0.0.1:5600', + retry: { limit: 0 }, +}); + +async function getToken() { + const authConfig = JSON.parse(await readFile(authFile)); + return authConfig.token; +} + +module.exports.getEnvs = async (envName) => { + const token = await getToken(); + const body = await api({ + url: 'api/envs', + searchParams: { + searchValue: envName, + t: Date.now(), + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + }, + }).json(); + return body.data; +}; + +module.exports.getEnvsCount = async () => { + const data = await this.getEnvs(); + return data.length; +}; + +module.exports.addEnv = async (cookie, remarks,envName) => { + const token = await getToken(); + const body = await api({ + method: 'post', + url: 'api/envs', + params: { t: Date.now() }, + json: [{ + name: envName, + value: cookie, + remarks, + }], + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.updateEnv = async (cookie, eid, remarks,envName) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs', + params: { t: Date.now() }, + json: { + name: envName, + value: cookie, + _id: eid, + remarks, + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.updateEnv11 = async (cookie, eid, remarks,envName) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs', + params: { t: Date.now() }, + json: { + name: envName, + value: cookie, + id: eid, + remarks, + }, + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.DisableCk = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs/disable', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.EnableCk = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'put', + url: 'api/envs/enable', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; + +module.exports.getstatus = async(eid) => { + const envs = await this.getEnvs(); + var tempid = 0; + for (let i = 0; i < envs.length; i++) { + tempid = 0; + if (envs[i]._id) { + tempid = envs[i]._id; + } + if (envs[i].id) { + tempid = envs[i].id; + } + if (tempid == eid) { + return envs[i].status; + } + } + return 99; +}; + +module.exports.getEnvById = async(eid) => { + const envs = await this.getEnvs(); + var tempid = 0; + for (let i = 0; i < envs.length; i++) { + tempid = 0; + if (envs[i]._id) { + tempid = envs[i]._id; + } + if (envs[i].id) { + tempid = envs[i].id; + } + if (tempid == eid) { + return envs[i].value; + } + } + return ""; +}; + +/*module.exports.getEnvByCookie = async (cookie) => { + const envs = await this.getEnvs(); + for (let i = 0; i < envs.length; i++) { + var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + if(tempptpin==cookie){ + return envs[i]; + } + } + return ""; +};*/ + +module.exports.delEnv = async (eid) => { + const token = await getToken(); + const body = await api({ + method: 'delete', + url: 'api/envs', + params: { t: Date.now() }, + body: JSON.stringify([eid]), + headers: { + Accept: 'application/json', + authorization: `Bearer ${token}`, + 'Content-Type': 'application/json;charset=UTF-8', + }, + }).json(); + return body; +}; diff --git a/qtx.js b/qtx.js new file mode 100644 index 0000000..a490486 --- /dev/null +++ b/qtx.js @@ -0,0 +1,385 @@ +/** + * 青碳行 + * cron 9 5 * * * qtx.js + * 2023/04/12 + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export qtxtk='token&deviceCoding' + * + * 多账号用 换行 或 @ 分割 + * 抓包 carbon.lcago.cn 这个域名 请求体 的body部分的 token 和 deviceCoding + * ==================================== + * + */ + + + +const $ = new Env("青碳行"); +const ckName = "qtxtk"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const notify = $.isNode() ? require('./sendNotify') : ''; +let envSplitor = ["@"]; //多账号分隔符 +let msg;//声明通知变量 +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + //await getNotice() + console.log('\n============= 用户CK有效性验证 =============\n'); + taskall = []; + for (let user of userList) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.user_info()); + await $.wait(user.getRandomTime()); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + console.log('\n================== 任务 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + console.log(`随机延迟${user.getRandomTime()}ms`); + taskall.push(await user.task_signIn()); + await $.wait(user.getRandomTime()); + taskall.push(await user.get_question()); + await $.wait(user.getRandomTime()); + taskall.push(await user.do_question()); + await $.wait(user.getRandomTime()); + taskall.push(await user.get_cal()); + await $.wait(user.getRandomTime()); + if (user.calIdArr.length !== 0) { + console.log(`未收取精力列表${user.calIdArr}`); + } + for (let l = 0; l < user.calIdArr.length; l++) { + taskall.push(await user.do_cal(user.calIdArr[l])); + await $.wait(user.getRandomTime()); + } + + } + } + await Promise.all(taskall); + + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; + this.deviceCoding = str.split('&')[1]; + //let ck = str.split('&') + //this.data1 = ck[0] + this.ckStatus = true + this.questionId = '' + this.answer = '' + this.calIdArr = [] + this.headers = { + 'Content-Type': 'application/json; charset=utf-8', + 'Host': 'carbon.lcago.cn', + 'Connection': 'Keep-Alive', + //'Accept-Encoding': 'gzip', + 'User-Agent': 'okhttp/3.12.' + } + + + + } + + getRandomTime() { + return randomInt(3000, 9000) + } + async user_info() {//userinfo + try { + let options = { + url: `https://carbon.lcago.cn/myCarbonAssets/myData`, + headers: this.headers, + body: `{"token":"${this.ck}","platform":"android","model":"MI8SE","version":"1.1.1_VersionCode_111","deviceCoding":"${this.deviceCoding}","language":"ZH","systemversion":"10"}` + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.respcod == '01') { + DoubleLog(`\n账号[${this.index}] 可兑换余额为:${result.data.exchangeAmt}`) + } else { + DoubleLog(`账号[${this.index}] 获取失效,原因未知!`); + console.log(result); + this.ckStatus = false + } + } catch (e) { + console.log(e); + } + } + async task_signIn() {//userinfo + try { + let options = { + url: `https://carbon.lcago.cn/signIn/sign`, + headers: this.headers, + body: `{"token":"${this.ck}","platform":"android","model":"MI8","appChannel":"qtx","version":"1.3.3_VersionCode_111","deviceCoding":"${this.deviceCoding}","language":"ZH","systemversion":"10"}` + + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.respcod == '01') { + DoubleLog(`账号[${this.index}] 签到成功`); + } else if (result.respcod == '02') { + DoubleLog(`账号[${this.index}] 今日已签到`); + } else { + DoubleLog(`账号[${this.index}] 签到失效,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async get_question() {//获取答题 + try { + let options = { + url: `https://carbon.lcago.cn/community/requestQuestion`, + headers: this.headers, + body: `{"token":"${this.ck}","deviceCoding":"${this.deviceCoding}","taskId":"EHD8472JSDS","channel":"qtx"}` + + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.respcod == '01') { + DoubleLog(`账号[${this.index}] 获取问题成功: [${result.data.dataList[0].id}] [${result.data.dataList[0].questionTitle}] [${result.data.dataList[0].questionOptions}]`); + DoubleLog(`获取答案:[${result.data.dataList[0].answer}]`); + + this.questionId = result.data.dataList[0].id; + this.answer = result.data.dataList[0].answer + } else { + DoubleLog(`账号[${this.index}] 获取问题失效,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async do_question() {//答题 + try { + let options = { + url: `https://carbon.lcago.cn/community/answerQuestion`, + headers: this.headers, + body: `{"token":"${this.ck}","deviceCoding":"${this.deviceCoding}","questionId":"${this.questionId}","answer":"${this.answer}"}` + + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.respcod == '01') { + DoubleLog(`账号[${this.index}] 答题成功:[${this.questionId}]`); + } else if (result.respcod == '02') { + DoubleLog(`题目已提交`); + + } else { + DoubleLog(`账号[${this.index}] 答题失效,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async get_cal() {//获取精力 + try { + let options = { + url: `https://carbon.lcago.cn/interact/data`, + headers: this.headers, + body: `{"token":"${this.ck}","platform":"android","model":"MI8Lite","appChannel":"qtx","version":"1.3.3_VersionCode_133","deviceCoding":"${this.deviceCoding}","language":"ZH","systemversion":"10"}` + + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.respcod == '01') { + if (result.data.dataList.length != 0) { + for (let i = 0; i < result.data.dataList.length; i++) { + this.calIdArr[i] = result.data.dataList[i].id; + //console.log(`未收取精力ID为${this.calIdArr[i]}`); + } + } + else { console.log("无未收取的精力") } + } else { + DoubleLog(`账号[${this.index}] 获取精力失效,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async do_cal(calId) {//收取精力 + try { + let options = { + url: `https://carbon.lcago.cn/interact/collect`, + headers: this.headers, + body: `{"token":"${this.ck}","platform":"android","model":"MI8Lite","appChannel":"qtx","version":"1.3.3_VersionCode_133","deviceCoding":"${this.deviceCoding}","language":"ZH","systemversion":"10","id":"${calId}"}` + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.respcod == '01') { + DoubleLog(`账号[${this.index}] 收取精力成功`); + } else { + DoubleLog(`账号[${this.index}] 收取精力失效,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// + +function httpRequest(options, method) { + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + typeof JSON.parse(data) == 'object' ? data = JSON.parse(data) : data = data + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +/** + * 获取远程版本 + */ +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} +/** + * 获取远程通知 + */ +async function getNotice() { + try { + const urls = [ + "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://gcore.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", + "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json", + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +function ts13() { + return Math.round(new Date().getTime()).toString(); +} +/** + * 随机整数生成 + */ +function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +function MD5Encrypt(a) { function b(a, b) { return a << b | a >>> 32 - b } function c(a, b) { var c, d, e, f, g; return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f } function d(a, b, c) { return a & b | ~a & c } function e(a, b, c) { return a & c | b & ~c } function f(a, b, c) { return a ^ b ^ c } function g(a, b, c) { return b ^ (a | ~c) } function h(a, e, f, g, h, i, j) { return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e) } function i(a, d, f, g, h, i, j) { return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d) } function j(a, d, e, g, h, i, j) { return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d) } function k(a, d, e, f, h, i, j) { return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d) } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;)b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | a.charCodeAt(i) << h, i++; return b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++)b = a >>> 8 * c & 255, e = "0" + b.toString(16), d += e.substr(e.length - 2, 2); return d } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128), b += String.fromCharCode(63 & d | 128)) } return b } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16)p = t, q = u, r = v, s = w, t = h(t, u, v, w, x[o + 0], y, 3614090360), w = h(w, t, u, v, x[o + 1], z, 3905402710), v = h(v, w, t, u, x[o + 2], A, 606105819), u = h(u, v, w, t, x[o + 3], B, 3250441966), t = h(t, u, v, w, x[o + 4], y, 4118548399), w = h(w, t, u, v, x[o + 5], z, 1200080426), v = h(v, w, t, u, x[o + 6], A, 2821735955), u = h(u, v, w, t, x[o + 7], B, 4249261313), t = h(t, u, v, w, x[o + 8], y, 1770035416), w = h(w, t, u, v, x[o + 9], z, 2336552879), v = h(v, w, t, u, x[o + 10], A, 4294925233), u = h(u, v, w, t, x[o + 11], B, 2304563134), t = h(t, u, v, w, x[o + 12], y, 1804603682), w = h(w, t, u, v, x[o + 13], z, 4254626195), v = h(v, w, t, u, x[o + 14], A, 2792965006), u = h(u, v, w, t, x[o + 15], B, 1236535329), t = i(t, u, v, w, x[o + 1], C, 4129170786), w = i(w, t, u, v, x[o + 6], D, 3225465664), v = i(v, w, t, u, x[o + 11], E, 643717713), u = i(u, v, w, t, x[o + 0], F, 3921069994), t = i(t, u, v, w, x[o + 5], C, 3593408605), w = i(w, t, u, v, x[o + 10], D, 38016083), v = i(v, w, t, u, x[o + 15], E, 3634488961), u = i(u, v, w, t, x[o + 4], F, 3889429448), t = i(t, u, v, w, x[o + 9], C, 568446438), w = i(w, t, u, v, x[o + 14], D, 3275163606), v = i(v, w, t, u, x[o + 3], E, 4107603335), u = i(u, v, w, t, x[o + 8], F, 1163531501), t = i(t, u, v, w, x[o + 13], C, 2850285829), w = i(w, t, u, v, x[o + 2], D, 4243563512), v = i(v, w, t, u, x[o + 7], E, 1735328473), u = i(u, v, w, t, x[o + 12], F, 2368359562), t = j(t, u, v, w, x[o + 5], G, 4294588738), w = j(w, t, u, v, x[o + 8], H, 2272392833), v = j(v, w, t, u, x[o + 11], I, 1839030562), u = j(u, v, w, t, x[o + 14], J, 4259657740), t = j(t, u, v, w, x[o + 1], G, 2763975236), w = j(w, t, u, v, x[o + 4], H, 1272893353), v = j(v, w, t, u, x[o + 7], I, 4139469664), u = j(u, v, w, t, x[o + 10], J, 3200236656), t = j(t, u, v, w, x[o + 13], G, 681279174), w = j(w, t, u, v, x[o + 0], H, 3936430074), v = j(v, w, t, u, x[o + 3], I, 3572445317), u = j(u, v, w, t, x[o + 6], J, 76029189), t = j(t, u, v, w, x[o + 9], G, 3654602809), w = j(w, t, u, v, x[o + 12], H, 3873151461), v = j(v, w, t, u, x[o + 15], I, 530742520), u = j(u, v, w, t, x[o + 2], J, 3299628645), t = k(t, u, v, w, x[o + 0], K, 4096336452), w = k(w, t, u, v, x[o + 7], L, 1126891415), v = k(v, w, t, u, x[o + 14], M, 2878612391), u = k(u, v, w, t, x[o + 5], N, 4237533241), t = k(t, u, v, w, x[o + 12], K, 1700485571), w = k(w, t, u, v, x[o + 3], L, 2399980690), v = k(v, w, t, u, x[o + 10], M, 4293915773), u = k(u, v, w, t, x[o + 1], N, 2240044497), t = k(t, u, v, w, x[o + 8], K, 1873313359), w = k(w, t, u, v, x[o + 15], L, 4264355552), v = k(v, w, t, u, x[o + 6], M, 2734768916), u = k(u, v, w, t, x[o + 13], N, 1309151649), t = k(t, u, v, w, x[o + 4], K, 4149444226), w = k(w, t, u, v, x[o + 11], L, 3174756917), v = k(v, w, t, u, x[o + 2], M, 718787259), u = k(u, v, w, t, x[o + 9], N, 3951481745), t = c(t, p), u = c(u, q), v = c(v, r), w = c(w, s); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase() } + +// 完整 Env +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) } diff --git a/quanzhan.py b/quanzhan.py new file mode 100644 index 0000000..0f8dbe1 --- /dev/null +++ b/quanzhan.py @@ -0,0 +1,233 @@ + +""" +小程序搜 泉站大桶订水桶装水同城送水 + +变量 authcode # authorization #备注 (没有备注 也可以运行) +变量名 qztoken +项目 泉站订水 + +""" +import os +import requests +from datetime import datetime, timezone, timedelta +import json +import sys +import time +import random +from io import StringIO + +enable_notification =1 # 控制是否启用通知的变量 0 不发送 1 发 + +# 只有在需要发送通知时才尝试导入notify模块 +if enable_notification == 1: + try: + from notify import send + except ModuleNotFoundError: + print("警告:未找到notify.py模块。它不是一个依赖项,请勿错误安装。程序将退出。") + sys.exit(1) + +#---------解--的简化0.2框架-------- +# 配置参数 +base_url = "https://microuser.quanzhan888.com" # 实际的基础URL +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(0x6309080f)XWEB/8519" + +def get_beijing_date(): # 获取北京日期的函数 + beijing_time = datetime.now(timezone(timedelta(hours=8))) + return beijing_time.date() + +def timestamp_to_beijing_time(timestamp): + utc_zone = timezone.utc + beijing_zone = timezone(timedelta(hours=8)) + utc_time = datetime.fromtimestamp(timestamp, utc_zone) + beijing_time = utc_time.astimezone(beijing_zone) + return beijing_time.strftime("%Y-%m-%d %H:%M:%S") + +def get_env_variable(var_name): + value = os.getenv(var_name) + if value is None: + print(f'环境变量{var_name}未设置,请检查。') + return None + + accounts = value.strip().split('\n') # 使用 \n 分割 + num_accounts = len(accounts) + print(f'-----------本次账号运行数量:{num_accounts}-----------') + print(f'泉站大桶订水--QGh3amllamll ') + + return accounts + +#113.28824159502027 +#23.103660007697727 +def fz_hs(auth_code, authorization, user_agent, sign): #封装headers + return { + 'Host': 'microuser.quanzhan888.com', + 'Connection': 'keep-alive', + 'Content-Length': '2', + 'charset': 'utf-8', + 'product': "shop", + 'authcode': auth_code, + 'authorization': authorization, + 'user-agent': user_agent, + 'sign': sign, + 'Accept-Encoding': 'gzip,compress,br,deflate', + 'platform': "wx", + 'x-requested-with': 'xmlhttprequest', + 'content-type': 'application/x-www-form-urlencoded', + } + +def wdqbsj(auth_code, authorization): # 个人信息/钱包 + url = f"{base_url}/user/get-wallet-info" + headers = fz_hs(auth_code, authorization, user_agent, "99914b932bd37a50b983c5e7c90ae93b") + data = json.dumps({}) # 发送空的JSON数据 + #print(url) + + try: + response = requests.post(url, headers=headers, data=data) + response.raise_for_status() + response_data = response.json() + #print("解析的JSON数据:", response_data) + + # 判断code并提取所需数据 + if response_data.get('code') == 0: + user_id = response_data['data']['wallet_info'].get('user_id') + total_balance = response_data['data']['wallet_info'].get('total_balance') + today_income = response_data['data']['wallet_info'].get('today_income') + #print(f"用户ID: {user_id}, 总余额: {total_balance}, 今日收入: {today_income}") + print(f"🆔: {user_id}, 总💸: {total_balance}, 今日: {today_income}") + + # 判断今日收入是否大于0 + if float(today_income) > 0: + print("今日已有收入,不需要签到") + #tj_sign(auth_code, authorization)#测试提交签到 + else: + print("今日无收入,需要签到") + tj_sign(auth_code, authorization) + + + else: + print("响应代码不为0,完整响应体:", response_data) + + except ValueError: + print("响应不是有效的JSON格式。") + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + + +def tj_sign(auth_code, authorization): # 提交签到 + url = f"{base_url}/user/do-sign" + headers = fz_hs(auth_code, authorization, user_agent, "99914b932bd37a50b983c5e7c90ae93b") + data = json.dumps({}) # 发送空的JSON数据 + + try: + response = requests.post(url, headers=headers, data=data) + response.raise_for_status() + response_data = response.json() + #print("解析的JSON数据:", response_data) + + # 提取所需数据并转换时间戳 + if 'data' in response_data and len(response_data['data']) > 0: + for item in response_data['data']: + user_id = item.get('user_id') + sign_date = timestamp_to_beijing_time(item.get('sign_date')) + sign_time = timestamp_to_beijing_time(item.get('sign_time')) + #print(f"用户: {user_id}, 签名日期: {sign_date}, 签到时间: {sign_time}") + print(f" 签名日期: {sign_date}, 签到🎉: {sign_time}") + return response_data + except ValueError: + print("响应不是有效的JSON格式。") + return None + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + return None + +#------------通知开始----------- + +class Tee: + def __init__(self, *files): + self.files = files + + def write(self, obj): + for file in self.files: + file.write(obj) + file.flush() # 确保及时输出 + + def flush(self): + for file in self.files: + file.flush() +#------------通知结束----------- + + + + + + + + + +def main(): + string_io = StringIO() + original_stdout = sys.stdout + + try: + sys.stdout = Tee(sys.stdout, string_io) + + var_name = 'qztoken' # 环境变量名 + accounts = get_env_variable(var_name) + if not accounts: + return + + print(f'找到 {len(accounts)} 个账号的令牌。') + total_tokens = len(accounts) + + for index, account in enumerate(accounts, start=1): + parts = account.split('#') + auth_code, authorization = parts[0], parts[1] + remark = None if len(parts) == 2 else parts[2] # 检查是否有备注 + + remark_info = f" --- 备注: {remark}" if remark else "" + print(f"------账号 {index}/{total_tokens}{remark_info} ------") + + wdqbsj(auth_code, authorization) # 个人信息/钱包 + + # 暂停3到5秒 + time.sleep(random.randint(3, 5)) + + finally: + sys.stdout = original_stdout + output_content = string_io.getvalue() + + if enable_notification: + send("-泉站大桶订水-通知", output_content) + +if __name__ == "__main__": + main() + +""" +#本地测试用 +os.environ['qztoken'] = ''' +authcode # authorization + +''' + +def main(): + var_name = 'qztoken' # 环境变量名 + accounts = get_env_variable(var_name) + if not accounts: + return + + print(f'找到 {len(accounts)} 个账号的令牌。') + total_tokens = len(accounts) + + for index, account in enumerate(accounts, start=1): + parts = account.split('#') + auth_code, authorization = parts[0], parts[1] + remark = None if len(parts) == 2 else parts[2] # 检查是否有备注 + + remark_info = f" --- 备注: {remark}" if remark else "" + print(f"------账号 {index}/{total_tokens}{remark_info} ------") + + wdqbsj(auth_code, authorization)# 个人信息/钱包 + + +if __name__ == "__main__": + main() +""" diff --git a/quzanmi.js b/quzanmi.js new file mode 100644 index 0000000..b807574 --- /dev/null +++ b/quzanmi.js @@ -0,0 +1,427 @@ + +/** + 变量名 qzmCookie 抓包 x-qzm-token 每天0.6,满10提现,绑定支付宝时会自动提现0.3,秒到, + */ + +const $ = new ENV("趣攒米视频任务", ["qzmCookie"]); +const cookieArr = $.qzmCookie.split("&"); + +class QZM { + constructor(ck, index) { + this.ck = ck.split("#")[0]; + this.index = ++index; + this.oaid = this.randomString(16); + this.androidId = this.randomString(16); + } + + randomString(length) { + // const table = "0123456789ABCDEF"; + const table = "0123456789abcdef"; + const _0x5ddc9a = { + length: length + }; + return Array.from(_0x5ddc9a, () => table[Math.floor(Math.random() * table.length)]).join(""); + } + + randomStringNum(length) { + // const table = "0123456789ABCDEF"; + const table = "0123456789"; + const _0x5ddc9a = { + length: length + }; + return Array.from(_0x5ddc9a, () => table[Math.floor(Math.random() * table.length)]).join(""); + } + + async main() { + const info = await this.getUserInfo(); + if (!info) { + return void 0; + } + try { + $.log(`账号[${this.index}]【${this.nickName}】 获取任务列表`) + const tasks = await this.taskList() + $.log(`账号[${this.index}]【${this.nickName}】 刷新令牌`) + await this.access() + for (const task of tasks) { + const source = task.source; + $.log(`账号[${this.index}]【${this.nickName}】 开始任务 ${task.name}`) + for (let i = 0; i < 10; i++) { + try { + $.log(`账号[${this.index}]【${this.nickName}】 假装看广告 ${i+1}`) + await this.ecpm(); + }catch (e) { + console.log(e) + } + await $.wait(10000) + } + try { + $.log(`账号[${this.index}]【${this.nickName}】 领取奖励`) + const re = await this.reward(source) + if (re){ + $.log(`账号[${this.index}]【${this.nickName}】 领取奖励成功`) + }else { + $.log(`账号[${this.index}]【${this.nickName}】 领取奖励失败`) + } + }catch (e) { + console.log(e) + } + } + } catch (e) { + console.log(e) + } + try { + $.log(`账号[${this.index}]【${this.nickName}】 兑换金币`) + await this.getUserInfo() + if (this.point>=1000){ + await this.trade(this.point) + }else { + $.log(`账号[${this.index}]【${this.nickName}】 当前金币数量不可兑换`) + } + }catch (e) { + console.log(e) + } + + } + + async getUserInfo() { + const options = { + 'method': 'GET', + 'url': 'https://api.quzanmi.com/api/user/info/mine', + 'headers': { + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'Origin': 'http://anh5.quzanmi.com', + 'Pragma': 'no-cache', + 'Referer': 'http://anh5.quzanmi.com/', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950', + 'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"', + 'sec-ch-ua-mobile': '?1', + 'sec-ch-ua-platform': '"Android"', + 'x-qzm-aid': `|${this.oaid}|${this.androidId}`, + 'x-qzm-bundle': 'com.zhangwen.quzanmi|Xiaomi|13|1.0.0', + 'x-qzm-device': 'android', + 'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(), + 'x-qzm-token': this.ck, + } + }; + const res = await $.request(options); + if (res.code === 2000) { + this.id = res.data.id; + this.phone = res.data.phone_number; + this.nickName = res.data.nickname; + this.realName = res.data.realname; + this.score = res.data.score; + this.today_income = res.data.today_income; + this.banlance = res.data.balance; + this.payment_num = res.data.payment_num; + this.point = res.data.point; + this.total_balance = res.data.total_balance; + // console.log( res.data) + $.log(`账号[${this.index}]【${this.nickName}】 真名: ${this.realName} 手机号: ${this.phone}`); + $.log(`账号[${this.index}]【${this.nickName}】 余额: ${this.banlance} 金币: ${this.point}`); + return true; + } else { + $.log(`获取用户信息失败: ${res.message}`); + return false; + } + } + + async taskList() { + const options = { + 'method': 'GET', + 'url': 'https://api.quzanmi.com/api/ad/android/list', + 'headers': { + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'Origin': 'http://anh5.quzanmi.com', + 'Pragma': 'no-cache', + 'Referer': 'http://anh5.quzanmi.com/', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950', + 'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"', + 'sec-ch-ua-mobile': '?1', + 'sec-ch-ua-platform': '"Android"', + 'x-qzm-aid': `|${this.oaid}|${this.androidId}`, + 'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1', + 'x-qzm-device': 'android', + 'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(), + 'x-qzm-token': this.ck, + } + }; + const res = await $.request(options); + if (res.code === 2000) { + const list = res.data.filter(item => item.source.includes("videoad")); + // console.log(list) + return list + } else { + $.log(`账号[${this.index}]【${this.nickName}】 获取任务列表 ${res.msg}`); + return false; + } + } + + async access() { + const options = { + 'method': 'POST', + 'url': 'https://api.aibianxian.net/igame/api/v1.0/cplApi/access', + 'headers': { + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'Origin': 'http://anh5.quzanmi.com', + 'Pragma': 'no-cache', + 'Referer': 'http://anh5.quzanmi.com/', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950', + 'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"', + 'sec-ch-ua-mobile': '?1', + 'sec-ch-ua-platform': '"Android"', + 'x-qzm-aid': `|${this.oaid}|${this.androidId}`, + 'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1', + 'x-qzm-device': 'android', + 'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(), + 'x-qzm-token': this.ck, + 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryZnyXeBEEvBYSL7mL' + }, + formData: { + 'app_key': '142793900', + 'device': 'android', + 'device_info': this.oaid, + 'target_id': this.id + } + }; + const res = await $.request(options); + // console.log(res) + if (res.code == 200) { + this.token = res.data.token; + // console.log(this.token) + return true + } else { + $.log(`账号[${this.index}]【${this.nickName}】 刷新令牌 ${res.msg}`); + return false; + } + } + + randomEcpm(min, max) { + // 生成一个介于min和max之间的随机整数 + const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min; + // 将随机数转换为字符串 + return randomNumber.toString(); + } + + async reward(source) { + const options = { + url: `https://api.quzanmi.com/api/ad/android/reward`, + method: 'POST', + headers: { + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'Origin': 'http://anh5.quzanmi.com', + 'Pragma': 'no-cache', + 'Referer': 'http://anh5.quzanmi.com/', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'Content-Type': 'application/json;charset=UTF-8', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950', + 'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"', + 'sec-ch-ua-mobile': '?1', + 'sec-ch-ua-platform': '"Android"', + 'x-qzm-aid': `|${this.oaid}|${this.androidId}`, + 'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1', + 'x-qzm-device': 'android', + 'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(), + 'x-qzm-token': this.ck, + }, + body: JSON.stringify({"source": source}) + } + const res = await $.request(options); + if (res.code === 2000) { + return true + } else { + $.log(`账号[${this.index}]【${this.nickName}】 领取奖励 ${res.msg}`); + return false; + } + } + + async ecpm() { + const options = { + url: `https://api.quzanmi.com/api/ad/app/ecpm`, + method: 'POST', + headers: { + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'Origin': 'http://anh5.quzanmi.com', + 'Pragma': 'no-cache', + 'Referer': 'http://anh5.quzanmi.com/', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'Content-Type': 'application/json;charset=UTF-8', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950', + 'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"', + 'sec-ch-ua-mobile': '?1', + 'sec-ch-ua-platform': '"Android"', + 'x-qzm-aid': `|${this.oaid}|${this.androidId}`, + 'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1', + 'x-qzm-device': 'android', + 'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(), + 'x-qzm-token': this.ck, + }, + body: JSON.stringify({"ecpm": this.randomEcpm(100000,800000)+".0", "source": "android", "kind": "rewardAd", "rit_id": "1"+this.randomStringNum(8)}) + } + const res = await $.request(options); + if (res.code === 2000) { + return true + } else { + return false; + } + } + + async trade(point){ + const options = { + url: 'https://api.quzanmi.com/api/user/point/trade', + method: 'POST', + headers: { + 'Accept': 'application/json, text/plain, */*', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'Cache-Control': 'no-cache', + 'Connection': 'keep-alive', + 'Origin': 'http://anh5.quzanmi.com', + 'Pragma': 'no-cache', + 'Referer': 'http://anh5.quzanmi.com/', + 'Sec-Fetch-Dest': 'empty', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Site': 'cross-site', + 'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950', + 'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"', + 'sec-ch-ua-mobile': '?1', + 'sec-ch-ua-platform': '"Android"', + 'x-qzm-aid': `|${this.oaid}|${this.androidId}`, + 'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1', + 'x-qzm-device': 'android', + 'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(), + 'x-qzm-token': this.ck, + }, + body: JSON.stringify({ + "point": Math.floor(point / 1000) * 1000 + }) + } + // console.log(options) + const res = await $.request(options); + // console.log(res) + if (res.code === 2000) { + $.log(`账号[${this.index}]【${this.nickName}】 兑换金币成功`); + return true + } else { + $.log(`账号[${this.index}]【${this.nickName}】 兑换金币 ${res.msg}`); + return false; + } + } +}; + +(async () => { + const qzm = []; + for (const index in cookieArr) { + qzm.push(new QZM(cookieArr[index], index)); + } + + for (const qzmElement of qzm) { + try { + await qzmElement.main(); + } catch (e) { + console.log(e) + } + } +})(); + +function ENV(name, envNames) { + const request = require("request"); + const cryptoJS = require("crypto-js"); + return new class { + constructor(name, envNames = []) { + this.name = name; + this.envNames = envNames; + this.startTime = Date.now(); + this.logs = []; + if (this.envNames.length > 0) { + for (const envName of envNames) { + this[envName] = process.env[envName]; + } + } + this.log(`🔔${this.name},开始!`) + } + + log(...args) { + args.length > 0 && (this.logs = [...this.logs, ...args]) + console.log(...args) + } + + md5(str) { + return cryptoJS.MD5(str).toString() + } + + sha256(str) { + return cryptoJS.SHA256(str).toString() + } + + aesCBCEncrypt(data, key, iv) { + const n = cryptoJS.enc.Hex.parse(key); + const r = cryptoJS.enc.Hex.parse(iv); + const o = cryptoJS.AES.encrypt(data, n, { + iv: r, + mode: cryptoJS.mode.CBC, + padding: cryptoJS.pad.Pkcs7 + }); + return cryptoJS.enc.Base64.stringify(o.ciphertext); + } + + aesCBCDecrypt(data, key, iv) { + const n = cryptoJS.enc.Hex.parse(key); + const r = cryptoJS.enc.Hex.parse(iv); + const o = cryptoJS.AES.decrypt(data, n, { + iv: r, + mode: cryptoJS.mode.CBC, + padding: cryptoJS.pad.Pkcs7 + }); + return o.toString(cryptoJS.enc.Utf8); + } + + request(options) { + options.gzip = true; + return new Promise((resolve, reject) => { + request(options, (error, response, body) => { + if (error) { + resolve(error) + } + try { + const objBody = JSON.parse(body); + resolve(objBody); + } catch (e) { + resolve(body) + } + }) + }) + } + + wait(time) { + return new Promise((resolve) => setTimeout(resolve, time)); + } + + }(name, envNames) +} diff --git a/ruilanCar.js b/ruilanCar.js new file mode 100644 index 0000000..6c140fe --- /dev/null +++ b/ruilanCar.js @@ -0,0 +1,509 @@ +/** + * cron 32 17 * * * + * Show:睿蓝汽车APP 或者小程序 一天7分左右 积分换实物 + * 变量名:ruilanCar + * 变量值:https://api-gateway.livanauto.com/app/ Headers中的aid的值 # rid的值 #连接 多账户 & 或创建同名变量 + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("睿蓝汽车"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "ruilanCar"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class Task { + constructor(str) { + this.index = ++userIdx; + this.aid = str.split(strSplitor)[0]; + this.rid = str.split(strSplitor)[1]; + this.ckStatus = true; + this.contentList = [] + this.essayList = [] + } + async main() { + await this.user_info() + if (this.ckStatus == true) { + await this.content_list(); + //console.log(this.contentList) + if (this.contentList.length > 0) { + for (let i = 0; i < 5; i++) { + await this.task_like(this.contentList[0].id) + } + } + await this.essay_list() + if (this.essayList.length > 0) { + for (let i = 0; i < 5; i++) { + await this.task_share(this.essayList[i].id) + + } + } + } + + } + async taskRequest(method, url, body = "") { + // + let headers = { + "user-agent": "Dart/2.19 (dart:io)", + "x-app-id": "fVbEaznM", + "service-version": "2.16.5", + "accept-encoding": "gzip", + "aid": this.aid, + "content-type": "application/json", + "signinsource": "client_ios", + "version": "", + //"content-length": "33", + "rid": this.rid, + "host": "api-gateway.livanauto.com", + "x-timestamp": Date.now(), + "x-sequence-no": "q193JPARcnfIVizYzt3IZ" + } + const reqeuestOptions = { + url: url, + method: method, + headers: headers + } + if (method !== "get") { + if (headers["Content-Type"] == "application/json") { + reqeuestOptions["body"] = JSON.stringify(body); + } else { + reqeuestOptions["body"] = body + } + } + let { body: result } = await $.httpRequest(reqeuestOptions) + return result + } + async essay_list() { + let result = await this.taskRequest("get", `https://api-gateway.livanauto.com/app/v1.0/appapi/content/subject/appSubject?current=1&subjectId=36&essayCurrent=1&pageSize=20`) + if (result.code == 0) { + for (let art of result.data.records[0].essay) { + this.essayList.push({ id: art.essayId, text: art.title }) + } + + } + } + + async content_list() { + let result = await this.taskRequest("get", `https://api-gateway.livanauto.com/app/v1.0/appapi/content/content/pageBetter?current=1&size=10&createBy×tamp=${Date.now()}`) + if (result.code == 0) { + for (let art of result.data.records) { + if (art.thumb == false) { + this.contentList.push({ id: art.contentId, text: art.contentDesc }) + } + } + } + } + + async user_info() { + let result = await this.taskRequest("get", `https://api-gateway.livanauto.com/app/v1.0/appapi/common/user/getUserToFml`) + if (result.code == 0) { + $.log(`[${result.data.nickName}]积分[${result.data.integralCount}]`) + this.ckStatus = true + } else { + this.ckStatus = false + $.log(result) + } + } + async task_share(id) { + let result = await this.taskRequest(`post`, `https://api-gateway.livanauto.com/app/v1.0/appapi/content/essayshare/add`, { "essayId": id }) + result.code == 0 ? (result.data.result == true ? $.log(`分享成功`) : $.log(`分享失败`)) : $.log(`分享失败`) + } + async task_like(id) { + let result = await this.taskRequest(`post`, `https://api-gateway.livanauto.com/app/v1.0/appapi/content/contentthumbs/thumb`, { "contentId": id }) + result.code == 0 ? (result.data.result == true ? $.log(`点赞成功`) : $.log(`点赞失败`)) : $.log(`点赞失败`) + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + //从url获取参数组成json + 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] = decodeURIComponent(value); + }); + } + return params; + } + isJSONString(str) { + try { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t.headers['content-type']; + delete t.headers['content-length']; + delete t["body"] + } + if (t.method === 'post') { + let ContentType; + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + ContentType = 'application/json' + } else { + ContentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + ContentType = 'application/json'; + } + } + if (!t.headers['Content-Type'] || !t.headers['content-type']) { + t.headers['Content-Type'] = ContentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/sendNofity.js b/sendNofity.js new file mode 100644 index 0000000..13536ed --- /dev/null +++ b/sendNofity.js @@ -0,0 +1,1546 @@ +const querystring = require('node:querystring'); +const { request: undiciRequest, ProxyAgent, FormData } = require('undici'); +const timeout = 15000; + +async function request(url, options = {}) { + const { json, form, body, headers = {}, ...rest } = options; + + const finalHeaders = { ...headers }; + let finalBody = body; + + if (json) { + finalHeaders['content-type'] = 'application/json'; + finalBody = JSON.stringify(json); + } else if (form) { + finalBody = form; + delete finalHeaders['content-type']; + } + + return undiciRequest(url, { + headers: finalHeaders, + body: finalBody, + ...rest, + }); +} + +function post(url, options = {}) { + return request(url, { ...options, method: 'POST' }); +} + +function get(url, options = {}) { + return request(url, { ...options, method: 'GET' }); +} + +const httpClient = { + request, + post, + get, +}; + +const push_config = { + HITOKOTO: true, // 启用一言(随机句子) + + BARK_PUSH: '', // bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ + BARK_ARCHIVE: '', // bark 推送是否存档 + BARK_GROUP: '', // bark 推送分组 + BARK_SOUND: '', // bark 推送声音 + BARK_ICON: '', // bark 推送图标 + BARK_LEVEL: '', // bark 推送时效性 + BARK_URL: '', // bark 推送跳转URL + + DD_BOT_SECRET: '', // 钉钉机器人的 DD_BOT_SECRET + DD_BOT_TOKEN: '', // 钉钉机器人的 DD_BOT_TOKEN + + FSKEY: '', // 飞书机器人的 FSKEY + FSSECRET: '', // 飞书机器人的 FSSECRET,对应安全设置里的签名校验密钥 + + // 推送到个人QQ:http://127.0.0.1/send_private_msg + // 群:http://127.0.0.1/send_group_msg + GOBOT_URL: '', // go-cqhttp + // 推送到个人QQ 填入 user_id=个人QQ + // 群 填入 group_id=QQ群 + GOBOT_QQ: '', // go-cqhttp 的推送群或用户 + GOBOT_TOKEN: '', // go-cqhttp 的 access_token + + GOTIFY_URL: '', // gotify地址,如https://push.example.de:8080 + GOTIFY_TOKEN: '', // gotify的消息应用token + GOTIFY_PRIORITY: 0, // 推送消息优先级,默认为0 + + IGOT_PUSH_KEY: '', // iGot 聚合推送的 IGOT_PUSH_KEY,例如:https://push.hellyw.com/XXXXXXXX + + PUSH_KEY: '', // server 酱的 PUSH_KEY,兼容旧版与 Turbo 版 + + DEER_KEY: '', // PushDeer 的 PUSHDEER_KEY + DEER_URL: '', // PushDeer 的 PUSHDEER_URL + + CHAT_URL: '', // synology chat url + CHAT_TOKEN: '', // synology chat token + + // 官方文档:https://www.pushplus.plus/ + PUSH_PLUS_TOKEN: '', // pushplus 推送的用户令牌 + PUSH_PLUS_USER: '', // pushplus 推送的群组编码 + PUSH_PLUS_TEMPLATE: 'html', // pushplus 发送模板,支持html,txt,json,markdown,cloudMonitor,jenkins,route,pay + PUSH_PLUS_CHANNEL: 'wechat', // pushplus 发送渠道,支持wechat,webhook,cp,mail,sms + PUSH_PLUS_WEBHOOK: '', // pushplus webhook编码,可在pushplus公众号上扩展配置出更多渠道 + PUSH_PLUS_CALLBACKURL: '', // pushplus 发送结果回调地址,会把推送最终结果通知到这个地址上 + PUSH_PLUS_TO: '', // pushplus 好友令牌,微信公众号渠道填写好友令牌,企业微信渠道填写企业微信用户id + + // 微加机器人,官方网站:https://www.weplusbot.com/ + WE_PLUS_BOT_TOKEN: '', // 微加机器人的用户令牌 + WE_PLUS_BOT_RECEIVER: '', // 微加机器人的消息接收人 + WE_PLUS_BOT_VERSION: 'pro', //微加机器人调用版本,pro和personal;为空默认使用pro(专业版),个人版填写:personal + + QMSG_KEY: '', // qmsg 酱的 QMSG_KEY + QMSG_TYPE: '', // qmsg 酱的 QMSG_TYPE + + QYWX_ORIGIN: 'https://qyapi.weixin.qq.com', // 企业微信代理地址 + + /* + 此处填你企业微信应用消息的值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236) + 环境变量名 QYWX_AM依次填入 corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) + 注意用,号隔开(英文输入法的逗号),例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat + 可选推送消息类型(推荐使用图文消息(mpnews)): + - 文本卡片消息: 0 (数字零) + - 文本消息: 1 (数字一) + - 图文消息(mpnews): 素材库图片id, 可查看此教程(http://note.youdao.com/s/HMiudGkb)或者(https://note.youdao.com/ynoteshare1/index.html?id=1a0c8aff284ad28cbd011b29b3ad0191&type=note) + */ + QYWX_AM: '', // 企业微信应用 + + QYWX_KEY: '', // 企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa + + TG_BOT_TOKEN: '', // tg 机器人的 TG_BOT_TOKEN,例:1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ + TG_USER_ID: '', // tg 机器人的 TG_USER_ID,例:1434078534 + TG_API_HOST: 'https://api.telegram.org', // tg 代理 api + TG_PROXY_AUTH: '', // tg 代理认证参数 + TG_PROXY_HOST: '', // tg 机器人的 TG_PROXY_HOST + TG_PROXY_PORT: '', // tg 机器人的 TG_PROXY_PORT + + AIBOTK_KEY: '', // 智能微秘书 个人中心的apikey 文档地址:http://wechat.aibotk.com/docs/about + AIBOTK_TYPE: '', // 智能微秘书 发送目标 room 或 contact + AIBOTK_NAME: '', // 智能微秘书 发送群名 或者好友昵称和type要对应好 + + SMTP_SERVICE: '', // 邮箱服务名称,比如 126、163、Gmail、QQ 等,支持列表 https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json + SMTP_EMAIL: '', // SMTP 发件邮箱 + SMTP_TO: '', // SMTP 收件邮箱,默认通知将会发给发件邮箱 + SMTP_PASSWORD: '', // SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定 + SMTP_NAME: '', // SMTP 收发件人姓名,可随意填写 + + PUSHME_KEY: '', // 官方文档:https://push.i-i.me,PushMe 酱的 PUSHME_KEY + + // CHRONOCAT API https://chronocat.vercel.app/install/docker/official/ + CHRONOCAT_QQ: '', // 个人: user_id=个人QQ 群则填入 group_id=QQ群 多个用英文;隔开同时支持个人和群 + CHRONOCAT_TOKEN: '', // 填写在CHRONOCAT文件生成的访问密钥 + CHRONOCAT_URL: '', // Red 协议连接地址 例: http://127.0.0.1:16530 + + WEBHOOK_URL: '', // 自定义通知 请求地址 + WEBHOOK_BODY: '', // 自定义通知 请求体 + WEBHOOK_HEADERS: '', // 自定义通知 请求头 + WEBHOOK_METHOD: '', // 自定义通知 请求方法 + WEBHOOK_CONTENT_TYPE: '', // 自定义通知 content-type + + NTFY_URL: '', // ntfy地址,如https://ntfy.sh,默认为https://ntfy.sh + NTFY_TOPIC: '', // ntfy的消息应用topic + NTFY_PRIORITY: '3', // 推送消息优先级,默认为3 + NTFY_TOKEN: '', // 推送token,可选 + NTFY_USERNAME: '', // 推送用户名称,可选 + NTFY_PASSWORD: '', // 推送用户密码,可选 + NTFY_ACTIONS: '', // 推送用户动作,可选 + + // 官方文档: https://wxpusher.zjiecode.com/docs/ + // 管理后台: https://wxpusher.zjiecode.com/admin/ + WXPUSHER_APP_TOKEN: '', // wxpusher 的 appToken + WXPUSHER_TOPIC_IDS: '', // wxpusher 的 主题ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行 + WXPUSHER_UIDS: '', // wxpusher 的 用户ID,多个用英文分号;分隔 topic_ids 与 uids 至少配置一个才行 +}; + +for (const key in push_config) { + const v = process.env[key]; + if (v) { + push_config[key] = v; + } +} + +const $ = { + post: (params, callback) => { + const { url, ...others } = params; + httpClient.post(url, others).then( + async (res) => { + let body = await res.body.text(); + try { + body = JSON.parse(body); + } catch (error) {} + callback(null, res, body); + }, + (err) => { + callback(err?.response?.body || err); + }, + ); + }, + get: (params, callback) => { + const { url, ...others } = params; + httpClient.get(url, others).then( + async (res) => { + let body = await res.body.text(); + try { + body = JSON.parse(body); + } catch (error) {} + callback(null, res, body); + }, + (err) => { + callback(err?.response?.body || err); + }, + ); + }, + logErr: console.log, +}; + +async function one() { + const url = 'https://v1.hitokoto.cn/'; + const res = await httpClient.request(url); + const body = await res.body.json(); + return `${body.hitokoto} ----${body.from}`; +} + +function gotifyNotify(text, desp) { + return new Promise((resolve) => { + const { GOTIFY_URL, GOTIFY_TOKEN, GOTIFY_PRIORITY } = push_config; + if (GOTIFY_URL && GOTIFY_TOKEN) { + const options = { + url: `${GOTIFY_URL}/message?token=${GOTIFY_TOKEN}`, + body: `title=${encodeURIComponent(text)}&message=${encodeURIComponent( + desp, + )}&priority=${GOTIFY_PRIORITY}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Gotify 发送通知调用API失败😞\n', err); + } else { + if (data.id) { + console.log('Gotify 发送通知消息成功🎉\n'); + } else { + console.log(`Gotify 发送通知调用API失败😞 ${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function gobotNotify(text, desp) { + return new Promise((resolve) => { + const { GOBOT_URL, GOBOT_TOKEN, GOBOT_QQ } = push_config; + if (GOBOT_URL) { + const options = { + url: `${GOBOT_URL}?access_token=${GOBOT_TOKEN}&${GOBOT_QQ}`, + json: { message: `${text}\n${desp}` }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Go-cqhttp 通知调用API失败😞\n', err); + } else { + if (data.retcode === 0) { + console.log('Go-cqhttp 发送通知消息成功🎉\n'); + } else if (data.retcode === 100) { + console.log(`Go-cqhttp 发送通知消息异常 ${data.errmsg}\n`); + } else { + console.log(`Go-cqhttp 发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function serverNotify(text, desp) { + return new Promise((resolve) => { + const { PUSH_KEY } = push_config; + if (PUSH_KEY) { + // 微信server酱推送通知一个\n不会换行,需要两个\n才能换行,故做此替换 + desp = desp.replace(/[\n\r]/g, '\n\n'); + + const matchResult = PUSH_KEY.match(/^sctp(\d+)t/i); + const options = { + url: + matchResult && matchResult[1] + ? `https://${matchResult[1]}.push.ft07.com/send/${PUSH_KEY}.send` + : `https://sctapi.ftqq.com/${PUSH_KEY}.send`, + body: `text=${encodeURIComponent(text)}&desp=${encodeURIComponent( + desp, + )}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Server 酱发送通知调用API失败😞\n', err); + } else { + // server酱和Server酱·Turbo版的返回json格式不太一样 + if (data.errno === 0 || data.data.errno === 0) { + console.log('Server 酱发送通知消息成功🎉\n'); + } else if (data.errno === 1024) { + // 一分钟内发送相同的内容会触发 + console.log(`Server 酱发送通知消息异常 ${data.errmsg}\n`); + } else { + console.log(`Server 酱发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function pushDeerNotify(text, desp) { + return new Promise((resolve) => { + const { DEER_KEY, DEER_URL } = push_config; + if (DEER_KEY) { + // PushDeer 建议对消息内容进行 urlencode + desp = encodeURI(desp); + const options = { + url: DEER_URL || `https://api2.pushdeer.com/message/push`, + body: `pushkey=${DEER_KEY}&text=${text}&desp=${desp}&type=markdown`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('PushDeer 通知调用API失败😞\n', err); + } else { + // 通过返回的result的长度来判断是否成功 + if ( + data.content.result.length !== undefined && + data.content.result.length > 0 + ) { + console.log('PushDeer 发送通知消息成功🎉\n'); + } else { + console.log( + `PushDeer 发送通知消息异常😞 ${JSON.stringify(data)}`, + ); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function chatNotify(text, desp) { + return new Promise((resolve) => { + const { CHAT_URL, CHAT_TOKEN } = push_config; + if (CHAT_URL && CHAT_TOKEN) { + // 对消息内容进行 urlencode + desp = encodeURI(desp); + const options = { + url: `${CHAT_URL}${CHAT_TOKEN}`, + body: `payload={"text":"${text}\n${desp}"}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Chat 发送通知调用API失败😞\n', err); + } else { + if (data.success) { + console.log('Chat 发送通知消息成功🎉\n'); + } else { + console.log(`Chat 发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function barkNotify(text, desp, params = {}) { + return new Promise((resolve) => { + let { + BARK_PUSH, + BARK_ICON, + BARK_SOUND, + BARK_GROUP, + BARK_LEVEL, + BARK_ARCHIVE, + BARK_URL, + } = push_config; + if (BARK_PUSH) { + // 兼容BARK本地用户只填写设备码的情况 + if (!BARK_PUSH.startsWith('http')) { + BARK_PUSH = `https://api.day.app/${BARK_PUSH}`; + } + const options = { + url: `${BARK_PUSH}`, + json: { + title: text, + body: desp, + icon: BARK_ICON, + sound: BARK_SOUND, + group: BARK_GROUP, + isArchive: BARK_ARCHIVE, + level: BARK_LEVEL, + url: BARK_URL, + ...params, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Bark APP 发送通知调用API失败😞\n', err); + } else { + if (data.code === 200) { + console.log('Bark APP 发送通知消息成功🎉\n'); + } else { + console.log(`Bark APP 发送通知消息异常 ${data.message}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }); + } else { + resolve(); + } + }); +} + +function tgBotNotify(text, desp) { + return new Promise((resolve) => { + const { + TG_BOT_TOKEN, + TG_USER_ID, + TG_PROXY_HOST, + TG_PROXY_PORT, + TG_API_HOST, + TG_PROXY_AUTH, + } = push_config; + if (TG_BOT_TOKEN && TG_USER_ID) { + let options = { + url: `${TG_API_HOST}/bot${TG_BOT_TOKEN}/sendMessage`, + json: { + chat_id: `${TG_USER_ID}`, + text: `${text}\n\n${desp}`, + disable_web_page_preview: true, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (TG_PROXY_HOST && TG_PROXY_PORT) { + let proxyHost = TG_PROXY_HOST; + if (TG_PROXY_AUTH && !TG_PROXY_HOST.includes('@')) { + proxyHost = `${TG_PROXY_AUTH}@${TG_PROXY_HOST}`; + } + let agent; + agent = new ProxyAgent({ + uri: `http://${proxyHost}:${TG_PROXY_PORT}`, + }); + options.dispatcher = agent; + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Telegram 发送通知消息失败😞\n', err); + } else { + if (data.ok) { + console.log('Telegram 发送通知消息成功🎉。\n'); + } else if (data.error_code === 400) { + console.log( + '请主动给bot发送一条消息并检查接收用户ID是否正确。\n', + ); + } else if (data.error_code === 401) { + console.log('Telegram bot token 填写错误。\n'); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} +function ddBotNotify(text, desp) { + return new Promise((resolve) => { + const { DD_BOT_TOKEN, DD_BOT_SECRET } = push_config; + const options = { + url: `https://oapi.dingtalk.com/robot/send?access_token=${DD_BOT_TOKEN}`, + json: { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (DD_BOT_TOKEN && DD_BOT_SECRET) { + const crypto = require('crypto'); + const dateNow = Date.now(); + const hmac = crypto.createHmac('sha256', DD_BOT_SECRET); + hmac.update(`${dateNow}\n${DD_BOT_SECRET}`); + const result = encodeURIComponent(hmac.digest('base64')); + options.url = `${options.url}×tamp=${dateNow}&sign=${result}`; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败😞\n', err); + } else { + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉\n'); + } else { + console.log(`钉钉发送通知消息异常 ${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else if (DD_BOT_TOKEN) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('钉钉发送通知消息失败😞\n', err); + } else { + if (data.errcode === 0) { + console.log('钉钉发送通知消息成功🎉\n'); + } else { + console.log(`钉钉发送通知消息异常 ${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function qywxBotNotify(text, desp) { + return new Promise((resolve) => { + const { QYWX_ORIGIN, QYWX_KEY } = push_config; + const options = { + url: `${QYWX_ORIGIN}/cgi-bin/webhook/send?key=${QYWX_KEY}`, + json: { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + if (QYWX_KEY) { + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('企业微信发送通知消息失败😞\n', err); + } else { + if (data.errcode === 0) { + console.log('企业微信发送通知消息成功🎉。\n'); + } else { + console.log(`企业微信发送通知消息异常 ${data.errmsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function ChangeUserId(desp) { + const { QYWX_AM } = push_config; + const QYWX_AM_AY = QYWX_AM.split(','); + if (QYWX_AM_AY[2]) { + const userIdTmp = QYWX_AM_AY[2].split('|'); + let userId = ''; + for (let i = 0; i < userIdTmp.length; i++) { + const count = '账号' + (i + 1); + const count2 = '签到号 ' + (i + 1); + if (desp.match(count2)) { + userId = userIdTmp[i]; + } + } + if (!userId) userId = QYWX_AM_AY[2]; + return userId; + } else { + return '@all'; + } +} + +async function qywxamNotify(text, desp) { + const MAX_LENGTH = 900; + if (desp.length > MAX_LENGTH) { + let d = desp.substr(0, MAX_LENGTH) + '\n==More=='; + await do_qywxamNotify(text, d); + await qywxamNotify(text, desp.substr(MAX_LENGTH)); + } else { + return await do_qywxamNotify(text, desp); + } +} + +function do_qywxamNotify(text, desp) { + return new Promise((resolve) => { + const { QYWX_AM, QYWX_ORIGIN } = push_config; + if (QYWX_AM) { + const QYWX_AM_AY = QYWX_AM.split(','); + const options_accesstoken = { + url: `${QYWX_ORIGIN}/cgi-bin/gettoken`, + json: { + corpid: `${QYWX_AM_AY[0]}`, + corpsecret: `${QYWX_AM_AY[1]}`, + }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options_accesstoken, (err, resp, json) => { + let html = desp.replace(/\n/g, '
'); + let accesstoken = json.access_token; + let options; + + switch (QYWX_AM_AY[4]) { + case '0': + options = { + msgtype: 'textcard', + textcard: { + title: `${text}`, + description: `${desp}`, + url: 'https://github.com/whyour/qinglong', + btntxt: '更多', + }, + }; + break; + + case '1': + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + break; + + default: + options = { + msgtype: 'mpnews', + mpnews: { + articles: [ + { + title: `${text}`, + thumb_media_id: `${QYWX_AM_AY[4]}`, + author: `智能助手`, + content_source_url: ``, + content: `${html}`, + digest: `${desp}`, + }, + ], + }, + }; + } + if (!QYWX_AM_AY[4]) { + // 如不提供第四个参数,则默认进行文本消息类型推送 + options = { + msgtype: 'text', + text: { + content: `${text}\n\n${desp}`, + }, + }; + } + options = { + url: `${QYWX_ORIGIN}/cgi-bin/message/send?access_token=${accesstoken}`, + json: { + touser: `${ChangeUserId(desp)}`, + agentid: `${QYWX_AM_AY[3]}`, + safe: '0', + ...options, + }, + headers: { + 'Content-Type': 'application/json', + }, + }; + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log( + '成员ID:' + + ChangeUserId(desp) + + '企业微信应用消息发送通知消息失败😞\n', + err, + ); + } else { + if (data.errcode === 0) { + console.log( + '成员ID:' + + ChangeUserId(desp) + + '企业微信应用消息发送通知消息成功🎉。\n', + ); + } else { + console.log( + `企业微信应用消息发送通知消息异常 ${data.errmsg}\n`, + ); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); + } else { + resolve(); + } + }); +} + +function iGotNotify(text, desp, params = {}) { + return new Promise((resolve) => { + const { IGOT_PUSH_KEY } = push_config; + if (IGOT_PUSH_KEY) { + // 校验传入的IGOT_PUSH_KEY是否有效 + const IGOT_PUSH_KEY_REGX = new RegExp('^[a-zA-Z0-9]{24}$'); + if (!IGOT_PUSH_KEY_REGX.test(IGOT_PUSH_KEY)) { + console.log('您所提供的 IGOT_PUSH_KEY 无效\n'); + resolve(); + return; + } + const options = { + url: `https://push.hellyw.com/${IGOT_PUSH_KEY.toLowerCase()}`, + body: `title=${text}&content=${desp}&${querystring.stringify(params)}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('IGot 发送通知调用API失败😞\n', err); + } else { + if (data.ret === 0) { + console.log('IGot 发送通知消息成功🎉\n'); + } else { + console.log(`IGot 发送通知消息异常 ${data.errMsg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function pushPlusNotify(text, desp) { + return new Promise((resolve) => { + const { + PUSH_PLUS_TOKEN, + PUSH_PLUS_USER, + PUSH_PLUS_TEMPLATE, + PUSH_PLUS_CHANNEL, + PUSH_PLUS_WEBHOOK, + PUSH_PLUS_CALLBACKURL, + PUSH_PLUS_TO, + } = push_config; + if (PUSH_PLUS_TOKEN) { + desp = desp.replace(/[\n\r]/g, '
'); // 默认为html, 不支持plaintext + const body = { + token: `${PUSH_PLUS_TOKEN}`, + title: `${text}`, + content: `${desp}`, + topic: `${PUSH_PLUS_USER}`, + template: `${PUSH_PLUS_TEMPLATE}`, + channel: `${PUSH_PLUS_CHANNEL}`, + webhook: `${PUSH_PLUS_WEBHOOK}`, + callbackUrl: `${PUSH_PLUS_CALLBACKURL}`, + to: `${PUSH_PLUS_TO}`, + }; + const options = { + url: `https://www.pushplus.plus/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log( + `pushplus 发送${ + PUSH_PLUS_USER ? '一对多' : '一对一' + }通知消息失败😞\n`, + err, + ); + } else { + if (data.code === 200) { + console.log( + `pushplus 发送${ + PUSH_PLUS_USER ? '一对多' : '一对一' + }通知请求成功🎉,可根据流水号查询推送结果:${ + data.data + }\n注意:请求成功并不代表推送成功,如未收到消息,请到pushplus官网使用流水号查询推送最终结果`, + ); + } else { + console.log( + `pushplus 发送${ + PUSH_PLUS_USER ? '一对多' : '一对一' + }通知消息异常 ${data.msg}\n`, + ); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function wePlusBotNotify(text, desp) { + return new Promise((resolve) => { + const { WE_PLUS_BOT_TOKEN, WE_PLUS_BOT_RECEIVER, WE_PLUS_BOT_VERSION } = + push_config; + if (WE_PLUS_BOT_TOKEN) { + let template = 'txt'; + if (desp.length > 800) { + desp = desp.replace(/[\n\r]/g, '
'); + template = 'html'; + } + const body = { + token: `${WE_PLUS_BOT_TOKEN}`, + title: `${text}`, + content: `${desp}`, + template: `${template}`, + receiver: `${WE_PLUS_BOT_RECEIVER}`, + version: `${WE_PLUS_BOT_VERSION}`, + }; + const options = { + url: `https://www.weplusbot.com/send`, + body: JSON.stringify(body), + headers: { + 'Content-Type': ' application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`微加机器人发送通知消息失败😞\n`, err); + } else { + if (data.code === 200) { + console.log(`微加机器人发送通知消息完成🎉\n`); + } else { + console.log(`微加机器人发送通知消息异常 ${data.msg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function aibotkNotify(text, desp) { + return new Promise((resolve) => { + const { AIBOTK_KEY, AIBOTK_TYPE, AIBOTK_NAME } = push_config; + if (AIBOTK_KEY && AIBOTK_TYPE && AIBOTK_NAME) { + let json = {}; + let url = ''; + switch (AIBOTK_TYPE) { + case 'room': + url = 'https://api-bot.aibotk.com/openapi/v1/chat/room'; + json = { + apiKey: `${AIBOTK_KEY}`, + roomName: `${AIBOTK_NAME}`, + message: { + type: 1, + content: `【青龙快讯】\n\n${text}\n${desp}`, + }, + }; + break; + case 'contact': + url = 'https://api-bot.aibotk.com/openapi/v1/chat/contact'; + json = { + apiKey: `${AIBOTK_KEY}`, + name: `${AIBOTK_NAME}`, + message: { + type: 1, + content: `【青龙快讯】\n\n${text}\n${desp}`, + }, + }; + break; + } + const options = { + url: url, + json, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('智能微秘书发送通知消息失败😞\n', err); + } else { + if (data.code === 0) { + console.log('智能微秘书发送通知消息成功🎉。\n'); + } else { + console.log(`智能微秘书发送通知消息异常 ${data.error}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function fsBotNotify(text, desp) { + return new Promise((resolve) => { + const { FSKEY, FSSECRET } = push_config; + if (FSKEY) { + const body = { + msg_type: 'text', + content: { text: `${text}\n\n${desp}` }, + }; + + // Add signature if secret is provided + // Note: Feishu's signature algorithm uses timestamp+"\n"+secret as the HMAC key + // and signs an empty message, which differs from typical HMAC usage + if (FSSECRET) { + const crypto = require('crypto'); + const timestamp = Math.floor(Date.now() / 1000).toString(); + const stringToSign = `${timestamp}\n${FSSECRET}`; + const hmac = crypto.createHmac('sha256', stringToSign); + const sign = hmac.digest('base64'); + body.timestamp = timestamp; + body.sign = sign; + } + + const options = { + url: `https://open.feishu.cn/open-apis/bot/v2/hook/${FSKEY}`, + json: body, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('飞书发送通知调用API失败😞\n', err); + } else { + if (data.StatusCode === 0 || data.code === 0) { + console.log('飞书发送通知消息成功🎉\n'); + } else { + console.log(`飞书发送通知消息异常 ${data.msg}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +async function smtpNotify(text, desp) { + const { SMTP_EMAIL, SMTP_TO, SMTP_PASSWORD, SMTP_SERVICE, SMTP_NAME } = + push_config; + if (![SMTP_EMAIL, SMTP_PASSWORD].every(Boolean) || !SMTP_SERVICE) { + return; + } + + try { + const nodemailer = require('nodemailer'); + const transporter = nodemailer.createTransport({ + service: SMTP_SERVICE, + auth: { + user: SMTP_EMAIL, + pass: SMTP_PASSWORD, + }, + }); + + const addr = SMTP_NAME ? `"${SMTP_NAME}" <${SMTP_EMAIL}>` : SMTP_EMAIL; + const info = await transporter.sendMail({ + from: addr, + to: SMTP_TO ? SMTP_TO.split(';') : addr, + subject: text, + html: `${desp.replace(/\n/g, '
')}`, + }); + + transporter.close(); + + if (info.messageId) { + console.log('SMTP 发送通知消息成功🎉\n'); + return true; + } + console.log('SMTP 发送通知消息失败😞\n'); + } catch (e) { + console.log('SMTP 发送通知消息出现异常😞\n', e); + } +} + +function pushMeNotify(text, desp, params = {}) { + return new Promise((resolve) => { + const { PUSHME_KEY, PUSHME_URL } = push_config; + if (PUSHME_KEY) { + const options = { + url: PUSHME_URL || 'https://push.i-i.me', + json: { push_key: PUSHME_KEY, title: text, content: desp, ...params }, + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('PushMe 发送通知调用API失败😞\n', err); + } else { + if (data === 'success') { + console.log('PushMe 发送通知消息成功🎉\n'); + } else { + console.log(`PushMe 发送通知消息异常 ${data}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function chronocatNotify(title, desp) { + return new Promise((resolve) => { + const { CHRONOCAT_TOKEN, CHRONOCAT_QQ, CHRONOCAT_URL } = push_config; + if (!CHRONOCAT_TOKEN || !CHRONOCAT_QQ || !CHRONOCAT_URL) { + resolve(); + return; + } + + const user_ids = CHRONOCAT_QQ.match(/user_id=(\d+)/g)?.map( + (match) => match.split('=')[1], + ); + const group_ids = CHRONOCAT_QQ.match(/group_id=(\d+)/g)?.map( + (match) => match.split('=')[1], + ); + + const url = `${CHRONOCAT_URL}/api/message/send`; + const headers = { + 'Content-Type': 'application/json', + Authorization: `Bearer ${CHRONOCAT_TOKEN}`, + }; + + for (const [chat_type, ids] of [ + [1, user_ids], + [2, group_ids], + ]) { + if (!ids) { + continue; + } + for (const chat_id of ids) { + const data = { + peer: { + chatType: chat_type, + peerUin: chat_id, + }, + elements: [ + { + elementType: 1, + textElement: { + content: `${title}\n\n${desp}`, + }, + }, + ], + }; + const options = { + url: url, + json: data, + headers, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Chronocat 发送QQ通知消息失败😞\n', err); + } else { + if (chat_type === 1) { + console.log(`Chronocat 个人消息 ${ids}推送成功🎉`); + } else { + console.log(`Chronocat 群消息 ${ids}推送成功🎉`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } + } + }); +} + +function qmsgNotify(text, desp) { + return new Promise((resolve) => { + const { QMSG_KEY, QMSG_TYPE } = push_config; + if (QMSG_KEY && QMSG_TYPE) { + const options = { + url: `https://qmsg.zendee.cn/${QMSG_TYPE}/${QMSG_KEY}`, + body: `msg=${text}\n\n${desp.replace('----', '-')}`, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + timeout, + }; + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Qmsg 发送通知调用API失败😞\n', err); + } else { + if (data.code === 0) { + console.log('Qmsg 发送通知消息成功🎉\n'); + } else { + console.log(`Qmsg 发送通知消息异常 ${data}\n`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function webhookNotify(text, desp) { + return new Promise((resolve) => { + const { + WEBHOOK_URL, + WEBHOOK_BODY, + WEBHOOK_HEADERS, + WEBHOOK_CONTENT_TYPE, + WEBHOOK_METHOD, + } = push_config; + if ( + !WEBHOOK_METHOD || + !WEBHOOK_URL || + (!WEBHOOK_URL.includes('$title') && !WEBHOOK_BODY.includes('$title')) + ) { + resolve(); + return; + } + + const headers = parseHeaders(WEBHOOK_HEADERS); + const body = parseBody(WEBHOOK_BODY, WEBHOOK_CONTENT_TYPE, (v) => + v + ?.replaceAll('$title', text?.replaceAll('\n', '\\n')) + ?.replaceAll('$content', desp?.replaceAll('\n', '\\n')), + ); + const bodyParam = formatBodyFun(WEBHOOK_CONTENT_TYPE, body); + const options = { + method: WEBHOOK_METHOD, + headers, + allowGetBody: true, + ...bodyParam, + timeout, + retry: 1, + }; + + const formatUrl = WEBHOOK_URL.replaceAll( + '$title', + encodeURIComponent(text), + ).replaceAll('$content', encodeURIComponent(desp)); + httpClient.request(formatUrl, options).then(async (resp) => { + const body = await resp.body.text(); + try { + if (resp.statusCode !== 200) { + console.log(`自定义发送通知消息失败😞 ${body}\n`); + } else { + console.log(`自定义发送通知消息成功🎉 ${body}\n`); + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(body); + } + }); + }); +} + +function ntfyNotify(text, desp) { + function encodeRFC2047(text) { + const encodedBase64 = Buffer.from(text).toString('base64'); + return `=?utf-8?B?${encodedBase64}?=`; + } + + return new Promise((resolve) => { + const { + NTFY_URL, + NTFY_TOPIC, + NTFY_PRIORITY, + NTFY_TOKEN, + NTFY_USERNAME, + NTFY_PASSWORD, + NTFY_ACTIONS, + } = push_config; + if (NTFY_TOPIC) { + const options = { + url: `${NTFY_URL || 'https://ntfy.sh'}/${NTFY_TOPIC}`, + body: `${desp}`, + headers: { + Title: `${encodeRFC2047(text)}`, + Priority: NTFY_PRIORITY || '3', + Icon: 'https://qn.whyour.cn/logo.png', + }, + timeout, + }; + if (NTFY_TOKEN) { + options.headers['Authorization'] = `Bearer ${NTFY_TOKEN}`; + } else if (NTFY_USERNAME && NTFY_PASSWORD) { + options.headers['Authorization'] = + `Basic ${Buffer.from(`${NTFY_USERNAME}:${NTFY_PASSWORD}`).toString('base64')}`; + } + if (NTFY_ACTIONS) { + options.headers['Actions'] = encodeRFC2047(NTFY_ACTIONS); + } + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('Ntfy 通知调用API失败😞\n', err); + } else { + if (data.id) { + console.log('Ntfy 发送通知消息成功🎉\n'); + } else { + console.log(`Ntfy 发送通知消息异常 ${JSON.stringify(data)}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function wxPusherNotify(text, desp) { + return new Promise((resolve) => { + const { WXPUSHER_APP_TOKEN, WXPUSHER_TOPIC_IDS, WXPUSHER_UIDS } = + push_config; + if (WXPUSHER_APP_TOKEN) { + // 处理topic_ids,将分号分隔的字符串转为数组 + const topicIds = WXPUSHER_TOPIC_IDS + ? WXPUSHER_TOPIC_IDS.split(';') + .map((id) => id.trim()) + .filter((id) => id) + .map((id) => parseInt(id)) + : []; + + // 处理uids,将分号分隔的字符串转为数组 + const uids = WXPUSHER_UIDS + ? WXPUSHER_UIDS.split(';') + .map((uid) => uid.trim()) + .filter((uid) => uid) + : []; + + // topic_ids uids 至少有一个 + if (!topicIds.length && !uids.length) { + console.log( + 'wxpusher 服务的 WXPUSHER_TOPIC_IDS 和 WXPUSHER_UIDS 至少设置一个!!', + ); + return resolve(); + } + + const body = { + appToken: WXPUSHER_APP_TOKEN, + content: `

${text}


${desp}
`, + summary: text, + contentType: 2, + topicIds: topicIds, + uids: uids, + verifyPayType: 0, + }; + + const options = { + url: 'https://wxpusher.zjiecode.com/api/send/message', + body: JSON.stringify(body), + headers: { + 'Content-Type': 'application/json', + }, + timeout, + }; + + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log('wxpusher发送通知消息失败!\n', err); + } else { + if (data.code === 1000) { + console.log('wxpusher发送通知消息完成!'); + } else { + console.log(`wxpusher发送通知消息异常:${data.msg}`); + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + } else { + resolve(); + } + }); +} + +function parseString(input, valueFormatFn) { + const regex = /(\w+):\s*((?:(?!\n\w+:).)*)/g; + const matches = {}; + + let match; + while ((match = regex.exec(input)) !== null) { + const [, key, value] = match; + const _key = key.trim(); + if (!_key || matches[_key]) { + continue; + } + + let _value = value.trim(); + + try { + _value = valueFormatFn ? valueFormatFn(_value) : _value; + const jsonValue = JSON.parse(_value); + matches[_key] = jsonValue; + } catch (error) { + matches[_key] = _value; + } + } + + return matches; +} + +function parseHeaders(headers) { + if (!headers) return {}; + + const parsed = {}; + let key; + let val; + let i; + + headers && + headers.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + if (!key) { + return; + } + + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + }); + + return parsed; +} + +function parseBody(body, contentType, valueFormatFn) { + if (contentType === 'text/plain' || !body) { + return valueFormatFn && body ? valueFormatFn(body) : body; + } + + const parsed = parseString(body, valueFormatFn); + + switch (contentType) { + case 'multipart/form-data': + return Object.keys(parsed).reduce((p, c) => { + p.append(c, parsed[c]); + return p; + }, new FormData()); + case 'application/x-www-form-urlencoded': + return Object.keys(parsed).reduce((p, c) => { + return p ? `${p}&${c}=${parsed[c]}` : `${c}=${parsed[c]}`; + }); + } + + return parsed; +} + +function formatBodyFun(contentType, body) { + if (!body) return {}; + switch (contentType) { + case 'application/json': + return { json: body }; + case 'multipart/form-data': + return { form: body }; + case 'application/x-www-form-urlencoded': + case 'text/plain': + return { body }; + } + return {}; +} + +/** + * sendNotify 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @returns {Promise} + */ +async function sendNotify(text, desp, params = {}) { + // 根据标题跳过一些消息推送,环境变量:SKIP_PUSH_TITLE 用回车分隔 + let skipTitle = process.env.SKIP_PUSH_TITLE; + if (skipTitle) { + if (skipTitle.split('\n').includes(text)) { + console.info(text + '在 SKIP_PUSH_TITLE 环境变量内,跳过推送'); + return; + } + } + + if (push_config.HITOKOTO !== 'false') { + desp += '\n\n' + (await one()); + } + + await Promise.all([ + serverNotify(text, desp), // 微信server酱 + pushPlusNotify(text, desp), // pushplus + wePlusBotNotify(text, desp), // 微加机器人 + barkNotify(text, desp, params), // iOS Bark APP + tgBotNotify(text, desp), // telegram 机器人 + ddBotNotify(text, desp), // 钉钉机器人 + qywxBotNotify(text, desp), // 企业微信机器人 + qywxamNotify(text, desp), // 企业微信应用消息推送 + iGotNotify(text, desp, params), // iGot + gobotNotify(text, desp), // go-cqhttp + gotifyNotify(text, desp), // gotify + chatNotify(text, desp), // synolog chat + pushDeerNotify(text, desp), // PushDeer + aibotkNotify(text, desp), // 智能微秘书 + fsBotNotify(text, desp), // 飞书机器人 + smtpNotify(text, desp), // SMTP 邮件 + pushMeNotify(text, desp, params), // PushMe + chronocatNotify(text, desp), // Chronocat + webhookNotify(text, desp), // 自定义通知 + qmsgNotify(text, desp), // 自定义通知 + ntfyNotify(text, desp), // Ntfy + wxPusherNotify(text, desp), // wxpusher + ]); +} + +module.exports = { + sendNotify, +}; \ No newline at end of file diff --git a/sf33.py b/sf33.py new file mode 100644 index 0000000..bdcb427 --- /dev/null +++ b/sf33.py @@ -0,0 +1,854 @@ +""" + +顺丰33周年活动 - 完成任务抽勋章 +Author: 爱学习的呆子 +Version: 1.1.0 +Date: 2026-03-19 + +顺丰暗号环境变量:sfsyah + +""" + +import hashlib +import json +import os +import random +import time +from datetime import datetime +from typing import Dict, List, Optional, Any +from urllib.parse import unquote +from concurrent.futures import ThreadPoolExecutor, as_completed +from threading import Lock +import requests +from requests.packages.urllib3.exceptions import InsecureRequestWarning + +# 禁用SSL警告 +requests.packages.urllib3.disable_warnings(InsecureRequestWarning) +inviteId = ['C6E5C3BDD7624520AB869D2AF9E75D95'] + +# ==================== 配置常量 ==================== +PROXY_TIMEOUT = 15 +MAX_PROXY_RETRIES = 5 +REQUEST_RETRY_COUNT = 3 +CONCURRENT_NUM = int(os.getenv('SFBF', '1')) +if CONCURRENT_NUM > 20: + CONCURRENT_NUM = 20 +elif CONCURRENT_NUM < 1: + CONCURRENT_NUM = 1 + +print_lock = Lock() + +# 周年活动配置 +ACTIVITY_CODE = "ANNIVERSARY_2026" +TOKEN = 'wwesldfs29aniversaryvdld29' +SYS_CODE = 'MCS-MIMP-CORE' + +# 暗号环境变量(可选,不设置则自动从API获取答案) +GUESS_ANSWER_ENV = 'sfsyah' + +# 需要跳过的任务类型(需要实际操作的) +SKIP_TASK_TYPES = [ + 'BUY_ADD_VALUE_SERVICE_PACKET', # 通过服务套餐寄件 + 'SEND_INTERNATIONAL_PACKAGE', # 寄一单国际件 + 'LOOK_BIG_PACKAGE_GET_CASH', # 寄大件重货 + 'SEND_SUCCESS_RECALL', # 去寄快递 + 'CHARGE_NEW_EXPRESS_CARD', # 充值新速运通全国卡 + 'CHARGE_COLLECT_ALL', # 充值1000元一键集齐 + 'OPEN_FAMILY_HOME_MUTUAL', # 开通家庭8折互寄权益 + 'BUY_ANNIVERSARY_LIMITED_PACKET', # 33周年宠粉券包 + # 'INTEGRAL_EXCHANGE', # 积分兑换抽勋章次数(已特殊处理) +] + + +# ==================== 日志 ==================== +class Logger: + def __init__(self): + self.messages: List[str] = [] + self.lock = Lock() + + def _log(self, icon: str, msg: str): + line = f"{icon} {msg}" + with print_lock: + print(line) + with self.lock: + self.messages.append(line) + + def info(self, msg): self._log('📝', msg) + def success(self, msg): self._log('✅', msg) + def warning(self, msg): self._log('⚠️', msg) + def error(self, msg): self._log('❌', msg) + def task(self, msg): self._log('🎯', msg) + def medal(self, msg): self._log('🏅', msg) + + +# ==================== 代理管理器 ==================== +class ProxyManager: + def __init__(self, api_url: str): + self.api_url = api_url + + def get_proxy(self) -> Optional[Dict[str, str]]: + try: + if not self.api_url: + return None + response = requests.get(self.api_url, timeout=10) + if response.status_code == 200: + proxy_text = response.text.strip() + if ':' in proxy_text: + proxy = proxy_text if proxy_text.startswith('http') else f'http://{proxy_text}' + # 隐藏认证信息用于显示 + display = proxy + if '@' in proxy: + parts = proxy.split('@') + display = f"http://***:***@{parts[-1]}" + with print_lock: + print(f"✅ 获取代理: {display}") + return {'http': proxy, 'https': proxy} + with print_lock: + print(f"❌ 获取代理失败: HTTP {response.status_code}") + return None + except Exception as e: + with print_lock: + print(f"❌ 获取代理异常: {str(e)[:100]}") + return None + + +# ==================== HTTP客户端 ==================== +class SFHttpClient: + def __init__(self, proxy_manager: ProxyManager): + self.proxy_manager = proxy_manager + self.session = requests.Session() + self.session.verify = False + + proxy = self.proxy_manager.get_proxy() + if proxy: + self.session.proxies = proxy + else: + if self.proxy_manager.api_url: + with print_lock: + print("⚠️ 代理获取失败,将不使用代理") + + self.headers = { + 'Host': 'mcs-mimp-web.sf-express.com', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) UnifiedPCWindowsWechat(0xf254173b) XWEB/19027', + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'channel': 'xcxpart', + 'platform': 'MINI_PROGRAM', + 'accept-language': 'zh-CN,zh;q=0.9', + } + + def _generate_sign(self) -> Dict[str, str]: + timestamp = str(int(round(time.time() * 1000))) + data = f'token={TOKEN}×tamp={timestamp}&sysCode={SYS_CODE}' + signature = hashlib.md5(data.encode()).hexdigest() + return { + 'syscode': SYS_CODE, + 'timestamp': timestamp, + 'signature': signature, + } + + def request(self, url: str, data: Optional[Dict] = None, method: str = 'POST') -> Optional[Dict]: + retry_count = 0 + proxy_retry_count = 0 + + while proxy_retry_count < MAX_PROXY_RETRIES: + # 每次请求重新生成签名 + sign_data = self._generate_sign() + headers = {**self.headers, **sign_data} + + try: + if method == 'POST': + resp = self.session.post(url, headers=headers, json=data or {}, timeout=PROXY_TIMEOUT) + else: + resp = self.session.get(url, headers=headers, timeout=PROXY_TIMEOUT) + resp.raise_for_status() + + try: + result = resp.json() + if result is None: + retry_count += 1 + if retry_count < REQUEST_RETRY_COUNT: + time.sleep(2) + continue + return None + return result + except (json.JSONDecodeError, ValueError): + retry_count += 1 + if retry_count < REQUEST_RETRY_COUNT: + time.sleep(2) + continue + return None + + except requests.exceptions.RequestException as e: + retry_count += 1 + error_str = str(e) + + # 代理相关错误,切换代理 + if 'ProxyError' in error_str or 'SSLError' in error_str or 'ConnectionError' in error_str: + proxy_retry_count += 1 + if proxy_retry_count < MAX_PROXY_RETRIES: + new_proxy = self.proxy_manager.get_proxy() + if new_proxy: + self.session.proxies = new_proxy + retry_count = 0 # 换代理后重置请求重试计数 + time.sleep(2) + continue + + # 普通请求错误,重试 + if retry_count < REQUEST_RETRY_COUNT: + time.sleep(2) + continue + return None + + except Exception: + return None + + return None + + def login(self, url: str) -> tuple: + """登录(兼容URL和CK格式)""" + try: + decoded_input = unquote(url) + if decoded_input.startswith('sessionId=') or '_login_mobile_=' in decoded_input: + cookie_dict = {} + for item in decoded_input.split(';'): + item = item.strip() + if '=' in item: + k, v = item.split('=', 1) + cookie_dict[k] = v + for k, v in cookie_dict.items(): + self.session.cookies.set(k, v, domain='mcs-mimp-web.sf-express.com') + user_id = cookie_dict.get('_login_user_id_', '') + phone = cookie_dict.get('_login_mobile_', '') + return (True, user_id, phone) if phone else (False, '', '') + else: + self.session.get(unquote(url), headers=self.headers, timeout=PROXY_TIMEOUT) + cookies = self.session.cookies.get_dict() + user_id = cookies.get('_login_user_id_', '') + phone = cookies.get('_login_mobile_', '') + return (True, user_id, phone) if phone else (False, '', '') + except Exception as e: + print(f'登录异常: {str(e)}') + return False, '', '' + + +# ==================== 周年活动任务执行器 ==================== +class AnniversaryExecutor: + # MODIFIED: 增加 user_id 参数 + def __init__(self, http: SFHttpClient, logger: Logger, user_id: str): + self.http = http + self.logger = logger + self.user_id = user_id + + # ---------- API 方法 ---------- + + def get_activity_index(self) -> Optional[Dict]: + """获取周年活动首页信息""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026IndexService~index' + resp = self.http.request(url, data={}) + if resp and resp.get('success'): + return resp.get('obj', {}) + return None + + def get_task_list(self) -> Optional[List[Dict]]: + """获取周年活动任务列表""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~activityTaskService~taskList' + data = { + "activityCode": ACTIVITY_CODE, + "channelType": "MINI_PROGRAM" + } + resp = self.http.request(url, data=data) + if resp and resp.get('success'): + return resp.get('obj', []) + else: + error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + self.logger.error(f'获取任务列表失败: {error_msg}') + return None + + def finish_task(self, task_code: str) -> bool: + """完成任务(浏览类)""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonRoutePost/memberEs/taskRecord/finishTask' + data = {"taskCode": task_code} + resp = self.http.request(url, data=data) + if resp and resp.get('success'): + return True + return False + + # ========== 新增:专用接口-领取寄件会员权益 ========== + def receive_vip_benefit(self) -> bool: + """领取寄件会员权益(特殊任务)""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberManage~memberEquity~commonEquityReceive' + data = {"key": "surprise_benefit"} + resp = self.http.request(url, data=data) + if resp and resp.get('success'): + self.logger.success(f'[领取寄件会员权益] 完成成功') + # 可选:解析返回的奖励信息 + if resp.get('obj'): + self.logger.info(f'领取详情: {resp["obj"]}') + return True + else: + error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + self.logger.warning(f'[领取寄件会员权益] 完成失败: {error_msg}') + return False + # ================================================= + + def fetch_tasks_reward(self) -> Optional[Dict]: + """领取已完成任务的奖励(获得抽勋章次数)""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026TaskService~fetchTasksReward' + data = { + "channelType": "MINI_PROGRAM", + "activityCode": ACTIVITY_CODE + } + resp = self.http.request(url, data=data) + if resp and resp.get('success'): + return resp.get('obj', {}) + else: + error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + self.logger.warning(f'领取任务奖励失败: {error_msg}') + return None + + def get_card_status(self) -> Optional[Dict]: + """查看勋章收集状态""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026CardService~cardStatus' + resp = self.http.request(url, data={}) + if resp and resp.get('success'): + return resp.get('obj', {}) + return None + + def claim_medal(self, batch: bool = False) -> Optional[Dict]: + """抽勋章""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026CardService~claim' + data = {"batchClaim": batch} + resp = self.http.request(url, data=data) + if resp and resp.get('success'): + return resp.get('obj', {}) + else: + error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + self.logger.error(f'抽勋章失败: {error_msg}') + return None + + def give_countdown_chance(self) -> Optional[Dict]: + """领取倒计时奖励(每日一次免费抽勋章机会)""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026CardService~giveClaimChance' + resp = self.http.request(url, data={}) + if resp and resp.get('success'): + return resp.get('obj', {}) + else: + error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + self.logger.warning(f'领取倒计时奖励失败: {error_msg}') + return None + + def get_user_rest_integral(self) -> int: + """查询用户剩余积分""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~activityTaskService~getUserRestIntegral' + resp = self.http.request(url, data={}) + if resp and resp.get('success'): + points = resp.get('obj', 0) + self.logger.info(f'当前可用积分: {points}') + return points + return 0 + + def exchange_points_for_chance(self) -> bool: + """积分兑换抽勋章次数(10积分兑1次)""" + points = self.get_user_rest_integral() + if points < 10: + self.logger.warning(f'积分不足10,无法兑换(当前: {points})') + return False + + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026TaskService~integralExchange' + data = { + "exchangeNum": 1, # 一次兑换1次机会 + "activityCode": ACTIVITY_CODE # 当前活动码 + } + + resp = self.http.request(url, data=data) + if resp and resp.get('success'): + self.logger.success('积分兑换成功,获得1次抽勋章次数') + return True + else: + error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + self.logger.warning(f'积分兑换失败: {error_msg}') + return False + + def get_guess_title_list(self) -> Optional[Dict]: + """获取对暗号题目列表(含答案)""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026GuessService~titleList' + resp = self.http.request(url, data={}) + if resp and resp.get('success'): + return resp.get('obj', {}) + return None + + def submit_guess_answer(self, answer: str, period: str = '') -> Optional[Dict]: + """提交暗号答案,返回完整响应""" + url = 'https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026GuessService~answer' + data = {"answerInfo": answer} + if period: + data["period"] = period + resp = self.http.request(url, data=data) + if resp: + self.logger.info(f'[对暗号] 提交响应: {json.dumps(resp, ensure_ascii=False)[:300]}') + if resp.get('success'): + obj = resp.get('obj', {}) + # 检查obj中是否有失败标志 + if isinstance(obj, dict) and obj.get('answerStatus') == 0: + self.logger.warning(f'[对暗号] 答案错误') + return None + return obj + else: + error_msg = resp.get('errorMessage', '未知错误') + self.logger.warning(f'提交暗号失败: {error_msg}') + return None + else: + self.logger.warning(f'提交暗号失败: 请求失败') + return None + + # ---------- 新增:邀请初始化 ---------- + def do_invite(self): + """发送邀请初始化请求(借鉴自第二段代码)""" + try: + # 从全局 inviteId 列表中排除自己的 user_id + available_invites = [inv for inv in inviteId if inv != self.user_id] + if not available_invites: + self.logger.warning("没有可用的邀请码(排除自身后为空),跳过邀请") + return + random_invite = random.choice(available_invites) + # self.logger.info(f"随机选择邀请码: {random_invite} (排除自身 {self.user_id})") + # 构造邀请请求 URL,使用 commonNoLoginPost + url = "https://mcs-mimp-web.sf-express.com/mcs-mimp/commonPost/~memberNonactivity~anniversary2026IndexService~index" + data = {"inviteType": 1, "inviteUserId": random_invite} + resp = self.http.request(url, data=data) + # if resp and resp.get('success'): + # self.logger.success(f"邀请初始化成功,邀请码: {random_invite}") + # else: + # error_msg = resp.get('errorMessage', '未知错误') if resp else '请求失败' + # self.logger.warning(f"邀请初始化失败: {error_msg}") + except Exception as e: + self.logger.error(f"邀请初始化异常: {str(e)}") + + # ---------- 业务逻辑 ---------- + + def do_guess_game(self) -> bool: + """对暗号任务:读取所有日期的题目,按顺序匹配环境变量中的暗号逐日提交""" + self.logger.task('[对暗号赢免单] 开始...') + + # 1. 获取题目列表 + guess_info = self.get_guess_title_list() + if not guess_info: + self.logger.warning('[对暗号] 获取题目列表失败') + return False + + current_period = guess_info.get('currentPeriod', '') + title_list = guess_info.get('guessTitleInfoList', []) + + if not title_list: + self.logger.warning('[对暗号] 题目列表为空') + return False + + # 按日期排序 + title_list.sort(key=lambda x: x.get('period', '')) + + self.logger.info(f'[对暗号] 共 {len(title_list)} 天题目,当前日期: {current_period}') + + # 2. 读取环境变量中的暗号列表(每行一个,按日期顺序对应) + env_answers_raw = os.getenv(GUESS_ANSWER_ENV, '').strip() + env_answers = [a.strip() for a in env_answers_raw.split('\n') if a.strip()] if env_answers_raw else [] + + if env_answers: + self.logger.info(f'[对暗号] 环境变量已设置 {len(env_answers)} 个暗号') + + # 3. 逐日处理 + any_success = False + for i, title in enumerate(title_list): + period = title.get('period', '') + answer_status = title.get('answerStatus') + tip = title.get('tip', '') + + # 已答过的跳过 + if answer_status == 1: + self.logger.success(f'[对暗号] {period} 已作答: {title.get("answerInfo", "")}') + any_success = True + continue + + # 超过当前日期的不处理(未来题目) + if period > current_period: + self.logger.info(f'[对暗号] {period} 尚未开放,跳过') + continue + + # 获取答案:优先环境变量按顺序匹配,其次API返回的answerInfo + answer = '' + if i < len(env_answers): + answer = env_answers[i] + if not answer: + answer = title.get('answerInfo', '') + + if not answer: + self.logger.warning(f'[对暗号] {period} 无法获取答案(提示: {tip})') + self.logger.info(f'[对暗号] 请在环境变量 {GUESS_ANSWER_ENV} 第 {i + 1} 行填写该日暗号') + continue + + self.logger.info(f'[对暗号] {period} 提交答案: {answer}') + + # 提交答案 + result = self.submit_guess_answer(answer, period) + if result is not None: + # 提交后重新获取题目列表验证是否真的成功 + time.sleep(1) + verify_info = self.get_guess_title_list() + if verify_info: + for t in verify_info.get('guessTitleInfoList', []): + if t.get('period') == period: + if t.get('answerStatus') == 1: + self.logger.success(f'[对暗号] {period} 验证通过,答案已录入: {t.get("answerInfo", "")}') + any_success = True + else: + self.logger.warning(f'[对暗号] {period} 验证失败,答案未被采纳 (answerStatus={t.get("answerStatus")})') + break + else: + self.logger.success(f'[对暗号] {period} 提交成功(未能验证)') + any_success = True + else: + self.logger.warning(f'[对暗号] {period} 提交失败') + + time.sleep(1) + + return any_success + + def do_tasks(self, result: Dict) -> None: + """执行所有可自动完成的任务""" + self.logger.info('正在获取周年活动任务列表...') + tasks = self.get_task_list() + if tasks is None: + return + + self.logger.info(f'共发现 {len(tasks)} 个任务') + + for task in tasks: + task_name = task.get('taskName', '未知') + task_type = task.get('taskType', '') + task_code = task.get('taskCode', '') + status = task.get('status') + process = task.get('process', '') + rest_finish = task.get('restFinishTime', 0) + virtual_token = task.get('virtualTokenNum', 0) + + # status=3 表示已完成且已领奖,status=1且restFinishTime=0表示已完成待领奖 + if status == 3 or (status == 1 and rest_finish <= 0): + can_receive = task.get('canReceiveTokenNum', 0) + if can_receive > 0: + self.logger.info(f'[{task_name}] 已完成,待领取 {can_receive} 次抽勋章机会') + else: + self.logger.success(f'[{task_name}] 已完成 ({process})') + continue + + if task_type in SKIP_TASK_TYPES: + self.logger.info(f'[{task_name}] 需要实际操作,跳过') + continue + + # 对暗号单独处理 + if task_type == 'GUESS_GAME_TIP': + if self.do_guess_game(): + result['tasks_completed'] += 1 + continue + + # 积分兑换特殊处理 + if task_type == 'INTEGRAL_EXCHANGE': + self.logger.task(f'[{task_name}] 尝试用积分兑换抽勋章次数...') + if self.exchange_points_for_chance(): + self.logger.success(f'[{task_name}] 积分兑换成功') + result['tasks_completed'] += 1 + continue + + # ========== 新增:领取寄件会员权益特殊处理 ========== + if task_type == 'RECEIVE_VIP_BENEFIT': + self.logger.task(f'[{task_name}] 尝试专用接口领取...') + if self.receive_vip_benefit(): + result['tasks_completed'] += 1 + continue + # ================================================= + + # 有taskCode的任务尝试自动完成(通用接口) + if task_code: + self.logger.task(f'[{task_name}] 尝试完成任务 (taskCode: {task_code})') + if self.finish_task(task_code): + self.logger.success(f'[{task_name}] 完成成功,可获得 {virtual_token} 次抽勋章机会') + result['tasks_completed'] += 1 + else: + self.logger.warning(f'[{task_name}] 完成失败') + time.sleep(1) + else: + self.logger.info(f'[{task_name}] 无taskCode,跳过 ({task_type})') + + def do_fetch_rewards(self, result: Dict) -> None: + """领取所有已完成任务的奖励""" + self.logger.info('领取任务奖励...') + time.sleep(1) + reward_resp = self.fetch_tasks_reward() + if reward_resp: + received = reward_resp.get('receivedAccountList', []) + if received: + for item in received: + currency = item.get('currency', '') + amount = item.get('amount', 0) + task_type = item.get('taskType', '') + self.logger.success(f'领取奖励: {currency} x{amount} (来自: {task_type})') + else: + self.logger.info('无新的任务奖励可领取') + + # 显示累计进度 + accrued = reward_resp.get('accruedTaskAward', {}) + progress = accrued.get('currentProgress', 0) + config = accrued.get('progressConfig', {}) + if config: + milestones = ', '.join([f'{k}个任务得{v}次' for k, v in sorted(config.items(), key=lambda x: int(x[0]))]) + self.logger.info(f'累计完成任务数: {progress} (里程碑: {milestones})') + + def do_countdown_chance(self, result: Dict) -> None: + """领取倒计时奖励(每日免费抽勋章机会)""" + self.logger.info('领取倒计时奖励...') + time.sleep(1) + resp = self.give_countdown_chance() + if resp: + if resp.get('todayCountdownChanceGiven'): + received = resp.get('receivedAccountList', []) + if received: + for item in received: + currency = item.get('currency', '') + amount = item.get('amount', 0) + self.logger.success(f'倒计时奖励: {currency} x{amount}') + else: + self.logger.success('倒计时奖励已领取') + else: + self.logger.info('今日倒计时奖励未到领取时间') + else: + self.logger.warning('倒计时奖励领取失败') + + + def do_claim_medals(self, result: Dict) -> None: + """抽勋章直到没有次数""" + # 先查看当前状态 + card_status = self.get_card_status() + if card_status: + claim_balance = 0 + for acc in card_status.get('currentAccountList', []): + if acc.get('currency') == 'CLAIM_CHANCE': + claim_balance = acc.get('balance', 0) + break + self.logger.info(f'当前可抽勋章次数: {claim_balance}') + + # 显示已有勋章 + medals_owned = [] + for acc in card_status.get('currentAccountList', []): + currency = acc.get('currency', '') + balance = acc.get('balance', 0) + if currency != 'CLAIM_CHANCE' and balance > 0: + medals_owned.append(f'{currency}x{balance}') + if medals_owned: + self.logger.info(f'已有勋章: {", ".join(medals_owned)}') + + if claim_balance <= 0: + self.logger.info('无抽勋章次数,跳过') + return + + # 开始抽勋章 + self.logger.info('开始抽勋章...') + claim_count = 0 + max_claims = 30 + + while claim_count < max_claims: + time.sleep(1) + claim_result = self.claim_medal(batch=False) + if claim_result is None: + break + + received = claim_result.get('receivedAccountList', []) + current_accounts = claim_result.get('currentAccountList', []) + + if received: + for item in received: + currency = item.get('currency', '未知') + amount = item.get('amount', 0) + self.logger.medal(f'抽到勋章: {currency} x{amount}') + result['medals_detail'].append({'type': currency, 'amount': amount}) + result['medals_claimed'] += amount + claim_count += 1 + else: + self.logger.info('没有抽到勋章或无抽取次数') + break + + # 检查剩余次数 + claim_balance = 0 + for acc in current_accounts: + if acc.get('currency') == 'CLAIM_CHANCE': + claim_balance = acc.get('balance', 0) + break + + result['claim_balance'] = claim_balance + self.logger.info(f'剩余抽取次数: {claim_balance}') + + if claim_balance <= 0: + break + + self.logger.info(f'抽勋章完成,本次共抽取 {result["medals_claimed"]} 个勋章') + + def run(self) -> Dict[str, Any]: + """执行周年活动全流程""" + result = { + 'tasks_completed': 0, + 'medals_claimed': 0, + 'medals_detail': [], + 'claim_balance': 0, + } + + # MODIFIED: 在任务开始前先发送邀请 + self.do_invite() + + # 0. 获取活动首页信息 + index_info = self.get_activity_index() + if index_info: + self.logger.info(f'活动时间: {index_info.get("acStartTime", "")} ~ {index_info.get("acEndTime", "")}') + self.logger.info(f'历史寄件数: {index_info.get("sendNum", 0)},累计支付: {index_info.get("payAmount", 0)}元') + + # 1. 执行任务(含对暗号) + self.do_tasks(result) + + # 2. 领取任务奖励(获得抽勋章次数) + self.do_fetch_rewards(result) + + # 3. 抽勋章 + self.do_claim_medals(result) + + return result + + +# ==================== 账号执行 ==================== +def run_account(account_url: str, index: int) -> Dict[str, Any]: + """执行单个账号""" + logger = Logger() + proxy_url = os.getenv('SF_PROXY_API_URL', '') + proxy_manager = ProxyManager(proxy_url) + + # 登录 + http = SFHttpClient(proxy_manager) + retry_count = 0 + login_success = False + phone = '' + user_id = '' + + while retry_count < MAX_PROXY_RETRIES and not login_success: + try: + if retry_count > 0: + http = SFHttpClient(proxy_manager) + success, user_id, phone = http.login(account_url) + if success: + login_success = True + break + except Exception as e: + pass + retry_count += 1 + if retry_count < MAX_PROXY_RETRIES: + time.sleep(2) + + if not login_success: + logger.error(f'账号{index + 1} 登录失败') + return {'success': False, 'phone': '', 'index': index, + 'tasks_completed': 0, 'medals_claimed': 0, 'medals_detail': [], 'claim_balance': 0} + + masked_phone = phone[:3] + "****" + phone[7:] if len(phone) >= 7 else phone + logger.success(f'账号{index + 1}: 【{masked_phone}】登录成功') + + # 随机延迟 + time.sleep(random.uniform(1, 3)) + + # MODIFIED: 将 user_id 传递给 AnniversaryExecutor + executor = AnniversaryExecutor(http, logger, user_id) + activity_result = executor.run() + + return { + 'success': True, + 'phone': phone, + 'index': index, + **activity_result, + } + + +# ==================== 主程序 ==================== +def main(): + env_name = 'sfsyUrl' + env_value = os.getenv(env_name) + if not env_value: + print(f"❌ 未找到环境变量 {env_name},请检查配置") + return + + account_urls = [url.strip() for url in env_value.split('&') if url.strip()] + if not account_urls: + print(f"❌ 环境变量 {env_name} 为空或格式错误") + return + + # 暗号提示 + guess_answer = os.getenv(GUESS_ANSWER_ENV, '') + if guess_answer: + answer_lines = [a.strip() for a in guess_answer.strip().split('\n') if a.strip()] + print(f"🔑 已设置暗号环境变量,共 {len(answer_lines)} 个暗号(按日期顺序对应)") + for i, a in enumerate(answer_lines): + print(f" 第{i+1}天: {a}") + else: + print(f"🔑 未设置暗号环境变量({GUESS_ANSWER_ENV}),将自动从API获取答案") + + random.shuffle(account_urls) + + print("=" * 60) + print(f"🎉 顺丰33周年活动 - 完成任务抽勋章") + print(f"👨‍💻 作者: 爱学习的呆子") + print(f"📱 共获取到 {len(account_urls)} 个账号") + print(f"⚙️ 并发数量: {CONCURRENT_NUM}") + print(f"⏰ 执行时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") + print("=" * 60) + + all_results = [] + + if CONCURRENT_NUM <= 1: + for idx, url in enumerate(account_urls): + result = run_account(url, idx) + all_results.append(result) + if idx < len(account_urls) - 1: + print("-" * 60) + time.sleep(2) + else: + with ThreadPoolExecutor(max_workers=CONCURRENT_NUM) as pool: + futures = {pool.submit(run_account, url, idx): idx for idx, url in enumerate(account_urls)} + for future in as_completed(futures): + all_results.append(future.result()) + + all_results.sort(key=lambda x: x['index']) + + # 汇总 + print(f"\n" + "=" * 70) + print(f"📊 周年活动汇总") + print("=" * 70) + print(f"{'序号':<6} {'手机号':<15} {'完成任务数':<12} {'抽到勋章数':<12} {'勋章详情':<20}") + print("-" * 70) + + total_tasks = 0 + total_medals = 0 + + for r in all_results: + idx = r['index'] + 1 + phone = r['phone'][:3] + "****" + r['phone'][7:] if r.get('phone') and len(r['phone']) >= 7 else r.get('phone', '未登录') + tasks = r.get('tasks_completed', 0) + medals = r.get('medals_claimed', 0) + detail = ', '.join([f"{d['type']}x{d['amount']}" for d in r.get('medals_detail', [])]) or '无' + status = "✅" if r['success'] else "❌" + + total_tasks += tasks + total_medals += medals + + print(f"{idx:<6} {phone:<15} {tasks:<12} {medals:<12} {detail:<20} {status}") + + print("-" * 70) + print(f"{'汇总':<6} {'账号: ' + str(len(all_results)):<15} {total_tasks:<12} {total_medals:<12}") + print("=" * 70) + print("\n🎊 所有账号执行完成!") + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/sysxc.js b/sysxc.js new file mode 100644 index 0000000..6aace0a --- /dev/null +++ b/sysxc.js @@ -0,0 +1,432 @@ +/** + * 书亦烧仙草 + * cron 11 8 * * * sysxc.js + * 23/04/15 内部使用 + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export sysxc_data='auth' + * + * 多账号用 @ 分割 + * 抓包 https://scrm-prod.shuyi.org.cn , 找到 headrs中的auth 即可 + * author : TencentGroupCode 862839604 + * GitHub : https://github.com/smallfawn/QLScriptPublic + * 制作不易请大家给Github仓库点点star + * ==================================== + * + */ + + + +const $ = new Env("书亦烧仙草"); +const ckName = "sysxc_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const notify = $.isNode() ? require('./sendNotify') : ''; +let envSplitor = ["@"]; //多账号分隔符 +let msg = ''; //let ck,msg +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +const crypto = require('crypto'); +//--------------------------------------------------------- + +async function start() { + + await notice() + console.log('\n================== 用户信息 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.getVcode()); + await $.wait(1000); //延迟 1秒 可充分利用 $.环境函数 + } + } + await Promise.all(taskall); + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; //单账号多变量分隔符 + //let ck = str.split('&') + //this.data1 = ck[0] + this.ckStatus = true + this.timestamp = ts13() + this.signInStatus = ''//签到状态 + this.getVcodeStatus = ''//HK 获取状态 + this.checkVcodeStatus = ''//HK 验证状态 + + } + + async getVcode() { + try { + let VcodeKey = '', VcodeToken = '', tg = '', bg = '', data = '', ocrRes = '', d = '', aesStr = '', aesRes = '', checkRes = '', aesStrStar = '' + let options = { + url: 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/getVCode', + headers: { + 'Host': 'scrm-prod.shuyi.org.cn', + 'Connection': 'keep-alive', + 'charset': 'utf-8', + 'auth': this.ck, + 'sessionkey': '', + 'channel': 'wechat_micro', + '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/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221206 MMWEBID/2585 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', + 'terminal-code': 'member_wechat_micro', + 'releaseversion': '2023411', + 'hostname': 'scrm-prod.shuyi.org.cn', + 'httpt-taceid': '', + 'Content-Type': 'application/json', + 'channelid': '', + 'Referer': 'https://servicewechat.com/wxa778c3d895442625/287/page-frame.html' + }, + body: JSON.stringify({ + captchaType: 'blockPuzzle', + clientUid: 'slider-f55cf63d-2806-460a-a57f-5d0d7b56a0c0', + ts: this.timestamp + }) + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.resultCode == '0000') { + VcodeToken = result.data.token + VcodeKey = result.data.secretKey + bg = result.data.originalImageBase64 + tg = result.data.jigsawImageBase64 + data = JSON.stringify({ "target_img": tg, "bg_img": bg }) + data = base64_encode(data) //B64编码 + //data = base64_decode(data) + //console.log(data); + ocrRes = await ocr('/slide/match/b64/json', data) + //console.log(ocrRes); + d = ocrRes.result.target[0] + //console.log(`滑动距离${d}`); + aesStr = JSON.stringify({ "x": d, "y": 5 }).toString() + aesStrStar = `{"x": ${d}, "y": 5}` + aesStr = aesStr.replace(/\ +/g, ""); + //console.log(`加密前${aesStr}`); + //AES的ECB模式加密方法 + aesRes = aesEncrypt(VcodeKey, aesStr) + aesRes = aesRes.substring(0, 22) + aesRes += '==' + //console.log(`加密后${aesRes}`); + //console.log(VcodeKey); + for (let i = 0; i < 10; i++) { + checkRes = await this.checkVcode(aesRes, VcodeToken, VcodeKey, aesStrStar) + if (checkRes == '0') { + return + } + } + + } else { + DoubleLog(`账号[${this.index}]获取失败了呢`); + } + } catch (e) { + console.log(e); + } + } + async checkVcode(pointJson, VcodeToken, VcodeKey, aesStrStar) { + try { + let options = { + url: 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/checkVCode', + headers: { + Host: 'scrm-prod.shuyi.org.cn', + Connection: 'keep-alive', + charset: 'utf-8', + auth: this.ck, + sessionkey: '', + channel: 'wechat_micro', + '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/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221206 MMWEBID/2585 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', + 'terminal-code': 'member_wechat_micro', + releaseversion: '2023411', + hostname: 'scrm-prod.shuyi.org.cn', + 'httpt-taceid': '', + 'Content-Type': 'application/json', + channelid: '', + Referer: 'https://servicewechat.com/wxa778c3d895442625/287/page-frame.html' + }, + body: JSON.stringify({ + "captchaType": "blockPuzzle", + "pointJson": pointJson, + "token": VcodeToken + }) + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.resultCode == '0000') { + //console.log(result); + DoubleLog(`账号[${this.index}]验证成功`); + + let SignInParams = VcodeToken + '---' + aesStrStar + SignInParams = SignInParams.replace(/\ +/g, ""); + //console.log(SignInParams); + + let abc = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] + for (let a in abc) { + let SignInpointJson = aesEncrypt(VcodeKey, SignInParams) + SignInpointJson = SignInpointJson.substring(0, 85) + SignInpointJson += abc[a] + //console.log(SignInpointJson); + SignInpointJson += '==' + //console.log(SignInpointJson); + let res = await this.SignIn(SignInpointJson) + if (res == '0') { + //console.log(`签到成功`); + return '0' + } + } + DoubleLog(`账号[${this.index}]签到结束`); + //console.log(aesDecrypt(key, aesEncrypt(VcodeKey, SignInParams))); + return '0' + } else { + //console.log(result); + DoubleLog(`账号[${this.index}]验证失败`); + return '1' + } + } catch (e) { + console.log(e); + } + } + async SignIn(SignInpointJson) { + try { + let options = { + url: 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/insertSignInV3', + headers: { + Host: 'scrm-prod.shuyi.org.cn', + //Connection: 'keep-alive', + //charset: 'utf-8', + auth: this.ck, + //sessionkey: '', + //channel: 'wechat_micro', + '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/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221206 MMWEBID/2585 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', + //'terminal-code': 'member_wechat_micro', + //'sessionKey': '', + //releaseversion: '2023411', + hostname: 'scrm-prod.shuyi.org.cn', + //'httpt-taceid': '', + 'Content-Type': 'application/json', + //channelid: '', + //Referer: 'https://servicewechat.com/wxa778c3d895442625/287/page-frame.html' + }, + body: JSON.stringify({ + "captchaVerification": SignInpointJson + }) + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.resultCode == '0') { + //console.log(result); + DoubleLog(`账号[${this.index}]签到成功啦`); + return '0' + } else { + await $.wait(2000) + return '1' + //console.log(result); + //console.log(`签到失败`); + } + } catch (e) { + console.log(e); + } + } + + + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method) { + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + typeof JSON.parse(data) == 'object' ? data = JSON.parse(data) : data = data + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +/** + * 时间戳 13位 + */ +function ts13() { + return Math.round(new Date().getTime()).toString(); +} +/** + * base64 编码 + */ +function base64_encode(data) { + let a = Buffer.from(data, 'utf-8').toString('base64') + return a +} + +/** + * base64 解码 + */ +function base64_decode(data) { + let a = Buffer.from(data, 'base64').toString('utf8') + return a +} +async function notice() { + try { + let options = { + url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/api/main/notice.json`, + headers: { + 'User-Agent': '' + }, + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result) { + if ('notice' in result) { + DoubleLog(`${result.notice}`); + } else { + options.url = `https://gitee.com/smallfawn/api/raw/master/notice.json` + result = await httpRequest(options); + if ('notice' in result) { + DoubleLog(`${result.notice}`); + } + } + } else { + } + } catch (e) { + console.log(e); + } +} +async function ocr(path, data) { + try { + let options = { + url: `http://ocr.onecc.cc${path}`, + headers: { + }, + body: `${data}` + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result) { + return result + } else { + } + } catch (e) { + console.log(e); + } +} + +const BLOCK_SIZE = 16; + +function pad(text) { + const padding = BLOCK_SIZE - text.length % BLOCK_SIZE; + return text + String.fromCharCode(padding).repeat(padding); +} + +function unpad(text) { + const padding = text.charCodeAt(text.length - 1); + return text.slice(0, text.length - padding); +} + +function aesEncrypt(key, data) { + const cipher = crypto.createCipheriv('aes-128-ecb', key, ''); + let encrypted = cipher.update(pad(data), 'utf8', 'base64'); + encrypted += cipher.final('base64'); + return encrypted; +} +async function hitokoto() { // 随机一言 + try { + let options = { + url: 'https://v1.hitokoto.cn/', + headers: {} + }; + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + return result.hitokoto + } catch (error) { + console.log(error); + } +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +// 完整 Env +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) } diff --git a/sysxc.py b/sysxc.py new file mode 100644 index 0000000..ef72836 --- /dev/null +++ b/sysxc.py @@ -0,0 +1,215 @@ +""" +new Env("书亦烧仙草python版") +1. 书亦烧仙草签到 抓包scrm-prod.shuyi.org.cn域名请求头里的auth + 脚本仅供学习交流使用, 请在下载后24h内删除 +2. cron 以防ocr识别出错每天运行两次左右 +3. ddddocr搭建方法https://github.com/sml2h3/ocr_api_server #如果脚本里的失效请自行搭建 +""" +import json,logging,os,sys,time,base64,requests +from os import environ, system, path + +logger = logging.getLogger(name=None) +logging.Formatter("%(message)s") +logger.setLevel(logging.INFO) +logger.addHandler(logging.StreamHandler()) + +def load_send(): + global send, mg + cur_path = path.abspath(path.dirname(__file__)) + if path.exists(cur_path + "/notify.py"): + try: + from notify import send + print("加载通知服务成功!") + except: + send = False + print("加载通知服务失败~") + else: + send = False + print("加载通知服务失败~") + +load_send() + +try: + from Crypto.Cipher import AES +except: + logger.info( + "\n未检测到pycryptodome\n需要Python依赖里安装pycryptodome\n安装失败先linux依赖里安装gcc、python3-dev、libc-dev\n如果还是失败,重启容器,或者重启docker就能解决") + exit(0) + +def setHeaders(i): + headers = { + "auth": cookies[i], + "hostname": "scrm-prod.shuyi.org.cn", + "content-type": "application/json", + "host": "scrm-prod.shuyi.org.cn", + "User-Agent": "Mozilla/5.0 (Linux; Android 10; V2203A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221012 MMWEBID/1571 MicroMessenger/8.0.30.2260(0x28001E55) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android" + } + return headers + +cookies = [] +try: + cookies = os.environ["sysxc_auth"].split("&") + if len(os.environ["sysxc_auth"]) > 0: + logger.info("已获取并使用Env环境Cookie\n声明:本脚本为学习python,请勿用于非法用途\n") + + +except: + logger.info( + "【提示】请先添加sysxc_auth") + exit(3) + +def getVCode(headers): + """获取滑块图片""" + data = { + "captchaType": "blockPuzzle", + "clientUid": "slider-6292e85b-e871-4abd-89df-4d97709c6e0c", + "ts": int(time.time() * 1000) + } + url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/getVCode' + response = requests.post(url, json=data, headers=headers) + return response.json() + + + +def ocr(tg,bg): + """使用自有ocr识别滑块坐标""" + url = 'http://103.45.185.224:9898/slide/match/b64/json' + jsonstr = json.dumps({'target_img': tg, 'bg_img': bg}) + response = requests.post(url, data=base64.b64encode(jsonstr.encode()).decode()) + return response.json() + + +''' +采用AES对称加密算法 +''' + +BLOCK_SIZE = 16 # Bytes +pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \ + chr(BLOCK_SIZE - len(s) % BLOCK_SIZE) +unpad = lambda s: s[:-ord(s[len(s) - 1:])] + + +def aesEncrypt(key, data): + ''' + AES的ECB模式加密方法 + :param key: 密钥 + :param data:被加密字符串(明文) + :return:密文 + ''' + key = key.encode('utf8') + # 字符串补位 + data = pad(data) + cipher = AES.new(key, AES.MODE_ECB) + # 加密后得到的是bytes类型的数据,使用Base64进行编码,返回byte字符串 + result = cipher.encrypt(data.encode()) + encodestrs = base64.b64encode(result) + enctext = encodestrs.decode('utf8') + return enctext + + +def aesDecrypt(key, data): + ''' + :param key: 密钥 + :param data: 加密后的数据(密文) + :return:明文 + ''' + key = key.encode('utf8') + data = base64.b64decode(data) + cipher = AES.new(key, AES.MODE_ECB) + + # 去补位 + text_decrypted = unpad(cipher.decrypt(data)) + text_decrypted = text_decrypted.decode('utf8') + return text_decrypted + + +def checkVCode(pointJson, token): + """验证""" + try: + data = { + "captchaType": "blockPuzzle", + "pointJson": pointJson, + "token": token + } + + url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/checkVCode' + response = requests.post(url, json=data, headers=headers) + result = response.json() + resultCode = result['resultCode'] + resultMsg = result['resultMsg'] + if resultCode == '0000': + logger.info(f"校验结果:成功") + else: + logger.info(f"校验结果: {resultMsg}") + time.sleep(3) + main() + except Exception as err: + print(err) + + +def check_sign(pointJson): + """签到""" + try: + data = { + "captchaVerification": pointJson + } + url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/insertSignInV3' + response = requests.post(url, json=data, headers=headers) + result = response.json() + resultCode = result['resultCode'] + + resultMsg = result['resultMsg'] + if resultCode == '0': + logger.info(f"签到结果:{result}") + send('书亦烧仙草签到通知', result) + else: + logger.info(f"签到结果: {resultMsg}") + send('书亦烧仙草签到通知', resultMsg) + except Exception as err: + print(err) + sys.exit(0) + +def main(): + logger.info("--------------------任务开始--------------------") + result = getVCode(headers) + bg = result['data']['originalImageBase64'] + tg = result['data']['jigsawImageBase64'] + key = result['data']['secretKey'] + token = result['data']['token'] + logger.info(f"本次口令为: {token}") + logger.info(f"本次密钥为: {key}") + time.sleep(1.5) + logger.info("--------------------识别滑块--------------------") + result = ocr(tg,bg) + res = result['result']['target'] + d = (res[0]) + logger.info(f"滑动距离为: {d}") + logger.info("--------------------执行算法--------------------") + aes_str = json.dumps({"x": d, "y": 5}) + data = aes_str.replace(' ', '') + logger.info(f"加密前: {data}") + time.sleep(1.5) + ecdata = aesEncrypt(key, data) + aesDecrypt(key, ecdata) + pointJson = aesEncrypt(key, data) + logger.info(f"加密后: {pointJson}") + logger.info("--------------------校验滑块--------------------") + checkVCode(pointJson, token) + logger.info("--------------------开始签到--------------------") + str = (token + '---' + aes_str) + data = str.replace(' ', '') + ecdata = aesEncrypt(key, data) + aesDecrypt(key, ecdata) + pointJson = aesEncrypt(key, data) + time.sleep(0.5) + check_sign(pointJson) + +if __name__ == '__main__': + for i in range(len(cookies)): + logger.info(f"\n开始第{i + 1}个账号") + + headers = setHeaders(i) + main() + logger.info("所有账号执行完成\n") + sys.exit(0) + diff --git a/sytt.js b/sytt.js new file mode 100644 index 0000000..ff09424 --- /dev/null +++ b/sytt.js @@ -0,0 +1,515 @@ +/** + * + * 自建模板 + * + * cron 0 0,7 * * * demo.js + * 多账号并行执行任务模板 + */ +//=====================================================// +const $ = new Env("十堰头条/月低保4.5"); +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1 +const debug = 0 +let ckStr = ($.isNode() ? process.env.sytt_data : $.getdata('sytt_data')) || ''; //检测CK 外部 +let msg, ck; + + +let replytxtArr = ["好的政府办好事", "美丽十堰", "十堰欢迎大家", "我爱十堰", "十堰真的好美"]; +let randReply = randomInt(0, 4) +let replytxt = replytxtArr[randReply] +//---------------------------------------------------// +async function tips(ckArr) { + //DoubleLog(`当前脚本版本${Version}\n📌,如果脚本版本不一致请及时更新`); + DoubleLog(`\n============= 共找到 ${ckArr.length} 个账号 =============`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); +} +!(async () => { + let ckArr = await checkEnv(ckStr, "sytt_data"); //检查CK + await tips(ckArr); //脚本提示 + await start(); //开始任务 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + +//---------------------------------------------------------------------------------封装循环测试 +async function newstart(name, taskname, time) { //任务名 函数名 等待时间 + let ckArr = await checkEnv(ckStr, "sytt_data"); //检查CK + console.log("\n📌📌📌📌📌📌📌📌" + name + "📌📌📌📌📌📌📌📌"); + for (i = 0; i < ckArr.length; i++) { + ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + //let CK = ckArr[i] + await taskname(); + await $.wait(time * 1000); + } +} +//-------------------------------------------------------------------------------封装循环测试 + +async function start() { + await newstart("签到", sign, 2) + await newstart("文章", getnewslist, 2) + //await newstart("帖子", gettielist, 2) + +} + + + + +//------------------------------------------------------------------------------------------ +//用户信息查询 +async function sign() { + try { + let options = { + method: 'GET', + url: 'http://app.site.10yan.com.cn/index.php', + qs: { + s: '/Api/Activityv1/sign', + token: ck[1], + uid: ck[0], + source: 'android', + ver: '6.2.3', + build: '145' + }, + headers: { Host: 'app.site.10yan.com.cn' } + }; + let result = await httpRequest(options, `签到`); + + //console.log(result); + if (result.code == 200) { + console.log(`账号[` + Number(i + 1) + `]` + `签到成功:${result.retinfo} 🎉`); + } else if (result.code = 400) { + console.log(`账号[` + Number(i + 1) + `]` + `签到失败:${result.retinfo} !`); + //console.log(result); + } else { console.log(`账号[` + Number(i + 1) + `]` + `签到失败:${result.retinfo} !`); } + } catch (error) { + console.log(error); + } + +} + + +//用户信息查询 +async function getnewslist() { + + try { + let options = { + method: 'GET', + url: 'http://app.site.10yan.com.cn/index.php', + qs: { s: '/Api/Newsv4/newslist', page: '1', type: 'reply' }, + headers: { Host: 'app.site.10yan.com.cn' }, + }; + let result = await httpRequest(options, `评论文章列表`); + + //console.log(result); + if (result?.code == 200) { + //console.log(`获取评论文章成功🎉`); + await wait(2); + + artID0 = result.list[0].contentid + //await artReply(artID0); + await artShare(artID0) + await wait(2); + + artID1 = result.list[2].contentid + //await artReply(artID1); + await artShare(artID1) + await wait(2); + + artID2 = result.list[4].contentid + //await artReply(artID2); + await artShare(artID2) + } else { + console.log(`获取评论文章失败!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + + + +//用户信息查询 +async function artReply(artID) { + try { + let options = { + method: 'POST', + url: 'http://app.site.10yan.com.cn/index.php', + qs: { + s: '/Api/Article/artReply/', + actiontype: '12', + contentid: artID, + reply: replytxt, + uid: ck[0], + source: 'android', + ver: '6.2.3', + build: '145', + token: ck[1] + }, + headers: { Host: 'app.site.10yan.com.cn' }, + form: {} + }; + let result = await httpRequest(options, `评论文章`); + + //console.log(result); + if (result?.code == 200) { + console.log(`账号[` + Number(i + 1) + `]评论文章成功🎉`); + await wait(2); + } else { + console.log(`账号[` + Number(i + 1) + `]评论文章失败!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + +//用户信息查询 +async function artShare(artID) { + try { + let options = { + method: 'GET', + url: 'http://app.site.10yan.com.cn/index.php', + qs: { + s: '/Api/Activityv1/getNewsShareTask', + contentid: artID, + uid: ck[0], + source: 'android', + ver: '6.2.3', + build: '145', + token: ck[1] + }, + headers: { Host: 'app.site.10yan.com.cn' }, + form: {} + }; + let result = await httpRequest(options, `分享文章`); + + //console.log(result); + if (result?.code == 200) { + console.log(`账号[` + Number(i + 1) + `]分享文章成功🎉`); + await wait(2); + } else { + console.log(`账号[` + Number(i + 1) + `]分享文章失败!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + +} + +//用户信息查询 +async function gettielist() { + + try { + let options = { + method: 'GET', + url: 'http://app.site.10yan.com.cn/index.php', + qs: { s: '/Api/Dynamic/' }, + headers: { Host: 'app.site.10yan.com.cn' }, + }; + let result = await httpRequest(options, `帖子列表`); + + //console.log(result); + if (result?.code == 200) { + //console.log(`获取评论文章成功🎉`); + tieID0 = result.data[0].id + //await tie(tieID0); + await wait(2); + + tieID1 = result.data[2].id + //await tie(tieID1); + await wait(2); + + tieID2 = result.data[4].id + //await tie(tieID2); + } else { + console.log(`获取帖子列表失败!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + +async function tie(tieID) { + try { + let options = { + method: 'POST', + url: 'http://app.site.10yan.com.cn/index.php', + qs: { s: '/Api/Dynamic/reply/' }, + headers: { Host: 'app.site.10yan.com.cn' }, + form: { + content: replytxt, + uid: ck[0], + source: 'android', + ver: '6.2.3', + build: '145', + token: ck[1], + pid: tieID + } + }; + let result = await httpRequest(options, `评论帖子`); + + //console.log(result); + if (result?.code == 200) { + console.log(`账号[` + Number(i + 1) + `]评论帖子成功🎉`); + await wait(2); + } else { + console.log(`账号[` + Number(i + 1) + `]评论帖子失败!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + + + + + + + + + + + + +// #region ******************************************************** 固定代码 ******************************************************** +/** + * 变量检查 + */ +async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) +} +/** + * 发送消息 + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("./sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * 双平台log输出 + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* 等待 X 秒 +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} + +/** + * 随机整数生成 + */ +function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); +} +/** + * get请求 + */ +async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * post请求 + */ +async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * 网络请求 (get, post等) + */ +async function httpRequest(postOptionsObject, tip, timeout = 3) { + return new Promise((resolve) => { + + let Options = postOptionsObject; + let request = require('request'); + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); + console.log(Options); + } + + request(Options, async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (!result) return; + resolve(result); + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }), timeout + + }); +} + + +/** + * debug调试 + */ +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} + +// 完整 Env +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) } diff --git a/tianyi.py b/tianyi.py new file mode 100644 index 0000000..ee8aaf8 --- /dev/null +++ b/tianyi.py @@ -0,0 +1,964 @@ +""" +中国电信首页 → 天翼智铃 +""" +import os +import re +import ssl +import json +import time +import random +import string +import base64 +import hashlib +import datetime +import requests +from hashlib import md5 +from http import cookiejar +from Crypto.Cipher import AES, DES3 +from Crypto.PublicKey import RSA +from Crypto.Cipher import PKCS1_v1_5 +from Crypto.Util.Padding import pad, unpad + +ACTIVITY_MODE = os.environ.get("ACTIVITY_MODE", "new_year") + +CHANNEL_ID = "156000007489" +INVITATION_CODE = "" +ACTIVITY_ID = "ai089" +VIDEO_ID = "" + +# 账号配置:格式 "手机号#密码" 或 "手机号@密码" +ACCOUNTS_STR = os.environ.get("chinaTelecomAccount", "") + +MAKE_COUNT = 3 + +MIN_SCORE_TO_LOTTERY = 0 +context = ssl.create_default_context() +context.set_ciphers('DEFAULT@SECLEVEL=1') +context.check_hostname = False +context.verify_mode = ssl.CERT_NONE + +class DESAdapter(requests.adapters.HTTPAdapter): + def init_poolmanager(self, *args, **kwargs): + kwargs['ssl_context'] = context + return super().init_poolmanager(*args, **kwargs) + +class BlockAll(cookiejar.CookiePolicy): + return_ok = set_ok = domain_return_ok = path_return_ok = lambda self, *args, **kwargs: False + netscape = True + rfc2965 = hide_cookie2 = False + +key = b'1234567`90koiuyhgtfrdews' +iv = 8 * b'\0' +public_key_b64 = '''-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBkLT15ThVgz6/NOl6s8GNPofdWzWbCkWnkaAm7O2LjkM1H7dMvzkiqdxU02jamGRHLX/ZNMCXHnPcW/sDhiFCBN18qFvy8g6VYb9QtroI09e176s+ZCtiv7hbin2cCTj99iUpnEloZm19lwHyo69u5UMiPMpq0/XKBO8lYhN/gwIDAQAB +-----END PUBLIC KEY-----''' + +requests.packages.urllib3.disable_warnings() +ss = requests.session() +ss.headers = {"User-Agent": "Mozilla/5.0 (Linux; Android 13; 22081212C) AppleWebKit/537.36"} +ss.mount('https://', DESAdapter()) +ss.cookies.set_policy(BlockAll()) + +def encrypt_3des(text): + cipher = DES3.new(key, DES3.MODE_CBC, iv) + ciphertext = cipher.encrypt(pad(text.encode(), DES3.block_size)) + return ciphertext.hex() + +def decrypt_3des(text): + ciphertext = bytes.fromhex(text) + cipher = DES3.new(key, DES3.MODE_CBC, iv) + plaintext = unpad(cipher.decrypt(ciphertext), DES3.block_size) + return plaintext.decode() + +def b64_rsa(plaintext): + public_key = RSA.import_key(public_key_b64) + cipher = PKCS1_v1_5.new(public_key) + ciphertext = cipher.encrypt(plaintext.encode()) + return base64.b64encode(ciphertext).decode() + +def encode_phone(text): + return ''.join(chr(ord(char) + 2) for char in text) + +def generate_random_string(length=16): + return ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(length)) + +def md5_hash(data): + return hashlib.md5(data.encode('utf-8')).hexdigest() + +def encryptmd5(timestamp, randomnum): + md5_e = md5_hash(str(timestamp)) + base64_encoded = base64.b64encode((md5_e + randomnum).encode()).decode() + return md5_hash(base64_encoded + randomnum) + +def encrypt_request(data, t, e, i): + n = json.dumps({k: v for k, v in data.items() if v is not None}, separators=(',', ':')) + encoded_t = base64.b64encode(t.encode()).decode() + encoded_e = base64.b64encode(e.encode()).decode() + s = md5((encoded_t + md5(e.encode()).hexdigest() + i).encode()).hexdigest()[:16] + o = md5((encoded_e + md5(t.encode()).hexdigest() + i).encode()).hexdigest()[:16] + cipher = AES.new(s.encode(), AES.MODE_CBC, iv=o.encode()) + padded_data = pad(n.encode(), AES.block_size) + encrypted_data = cipher.encrypt(padded_data) + return base64.b64encode(encrypted_data).decode() + +def decrypt_response(encrypted_base64, t, e, i): + encoded_t = base64.b64encode(t.encode()).decode() + encoded_e = base64.b64encode(e.encode()).decode() + n = md5((encoded_e + i + md5(t.encode()).hexdigest()).encode()).hexdigest()[:16] + s = md5((encoded_t + i + md5(e.encode()).hexdigest()).encode()).hexdigest()[:16] + cipher = AES.new(n.encode(), AES.MODE_CBC, iv=s.encode()) + encrypted_data = base64.b64decode(encrypted_base64) + decrypted_data = cipher.decrypt(encrypted_data) + unpadded_data = unpad(decrypted_data, AES.block_size) + return json.loads(unpadded_data.decode()) + +def parse_accounts(accounts_str: str) -> list: + accounts = [] + for part in accounts_str.replace("\n", "&").replace("\r", "").split("&"): + part = part.strip() + if "#" in part: + phone, pwd = part.split("#", 1) + elif "@" in part: + phone, pwd = part.split("@", 1) + else: + continue + phone, pwd = phone.strip(), pwd.strip() + if phone and pwd: + accounts.append((phone, pwd)) + return accounts + +def userLoginNormal(phone, password): + timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S") + rdmstr = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', k=16)) + login_cipher = f'iPhone 14 15.4.{rdmstr[:12]}{phone}{timestamp}{password}0$$$0.' + payload = { + "headerInfos": { + "code": "userLoginNormal", "timestamp": timestamp, "broadAccount": "", "broadToken": "", + "clientType": "#11.3.0#channel50#iPhone 14 Pro Max#", "shopId": "20002", + "source": "110003", "sourcePassword": "Sid98s", "token": "", "userLoginName": encode_phone(phone) + }, + "content": { + "attach": "test", + "fieldData": { + "loginType": "4", "accountType": "", "loginAuthCipherAsymmertric": b64_rsa(login_cipher), + "deviceUid": rdmstr, "phoneNum": encode_phone(phone), "isChinatelecom": "0", + "systemVersion": "15.4.0", "authentication": encode_phone(password) + } + } + } + r = ss.post('https://appgologin.189.cn:9031/login/client/userLoginNormal', json=payload) + data = r.json() + response_data = data.get('responseData') + if response_data: + data_inner = response_data.get('data') + if data_inner: + login_result = data_inner.get('loginSuccessResult') + if login_result: + return login_result + print(f"登录响应: {data}") + return None + +def get_ticket(phone, userId, token): + import re + timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S") + xml_data = f'getSingle{timestamp}' \ + f'' \ + f'#9.6.1#channel50#iPhone 14 Pro Max#20002' \ + f'110003Sid98s{token}' \ + f'{phone}test' \ + f'{encrypt_3des(userId)}' \ + f'4a6862274835b451' + r = ss.post('https://appgologin.189.cn:9031/map/clientXML', data=xml_data, + headers={'user-agent': 'CtClient;10.4.1;Android;13;22081212C;NTQzNzgx!#!MTgwNTg1'}) + tk = re.findall('(.*?)', r.text) + if tk: + return decrypt_3des(tk[0]) + return None + +def sso_login_v2(ticket): + payload = {"portal": "45", "channelId": CHANNEL_ID, "ticket": ticket} + headers = { + 'User-Agent': "CtClient;11.3.0;Android;12;Redmi K30 Pro;MDAyNDUy!#!MTgwMjQ", + 'Content-Type': "application/json" + } + r = requests.post("https://ai.imusic.cn/vapi/vue_login/sso_login_v2", + data=json.dumps(payload), headers=headers) + if r.status_code == 200: + data = r.json() + if data.get("token"): + return data.get("token"), r.cookies.get_dict() + return None, None + + +class InviteAPI: + BASE_URL = "https://ai.imusic.cn" + + def __init__(self, token: str, cookies: dict = None): + self.token = token + self.session = requests.Session() + self.session.mount('https://', DESAdapter()) + if cookies: + self.session.cookies.update(cookies) + self.session.headers.update({ + "User-Agent": "CtClient;11.3.0;Android;12;Redmi K30 Pro;ODAwODUw!#!MTg2MDg", + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br, zstd", + "Origin": self.BASE_URL, + "Authorization": f"Bearer {token}", + "Referer": f"{self.BASE_URL}/h5v/fusion/ai-luck-flow?ca=AP3V&cc={CHANNEL_ID}&utm_scha=utm_ch-010001002009.utm_sch-hg_xx_qlxx-1-104705800001-105782800001.utm_af-1000000037.utm_as-158492900001.utm_sd1-default", + "X-Requested-With": "com.ct.client", + "sec-ch-ua": '"Chromium";v="140", "Not=A?Brand";v="24", "Android WebView";v="140"', + "sec-ch-ua-mobile": "?1", + "sec-ch-ua-platform": '"Android"', + "Sec-Fetch-Site": "same-origin", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" + }) + + + + def request_plain(self, endpoint: str, params: dict = None) -> dict: + url = f"{self.BASE_URL}{endpoint}" + response = self.session.post(url, params=params, timeout=30) + return response.json() + + def request_encrypted(self, endpoint: str, params: dict) -> dict: + self.session.headers["imencrypt"] = "1" + imrandomnum = generate_random_string(16) + imtimestamp = str(int(time.time() * 1000)) + imencryptkey = encryptmd5(imtimestamp, imrandomnum) + + form_data = {"channelId": CHANNEL_ID, "portal": "45"} + form_data.update(params) + encrypted_form = encrypt_request(form_data, imrandomnum, imtimestamp, imencryptkey) + + headers = { + "imencryptkey": imencryptkey, + "imrandomnum": imrandomnum, + "imtimestamp": imtimestamp, + } + url = f"{self.BASE_URL}{endpoint}" + response = self.session.post(url, params={"formData": encrypted_form}, headers=headers, timeout=30) + + new_auth = response.headers.get("Authorization") + if new_auth: + self.token = new_auth + self.session.headers["Authorization"] = f"Bearer {new_auth}" + + try: + return decrypt_response(response.text, imrandomnum, imtimestamp, imencryptkey) + except: + return {"raw": response.text} + + def get_user_info(self, mobile: str) -> dict: + params = {"channelId": CHANNEL_ID, "portal": "45", "mobile": mobile} + return self.request_plain("/vapi/new_member/get_user_info", params) + + def check_user_state(self, mobile: str) -> dict: + params = {"mobile": mobile, "is4G": "1", "is5G": "1", "isDX": "1", "channelId": CHANNEL_ID, "portal": "45"} + return self.request_plain("/vapi/vrbt/check_user_state", params) + + def query_template_list(self, page_no: int = 1, page_size: int = 10) -> dict: + params = { + "pageNo": page_no, "pageSize": page_size, "activityId": ACTIVITY_ID, + "apiName": "diy/DiyVideoApi/queryActRecommendTemplateList", + "channelId": CHANNEL_ID, "portal": "45" + } + return self.request_plain("/hapi/de/api", params) + + def send_stat_message(self, mobile: str, actname: str, actparam: str) -> dict: + params = { + "mobile": mobile, + "actname": actname, + "actparam": actparam + } + return self.request_encrypted("/vapi/vue_stat/sendMessage", params) + + def template_make(self, mobile: str, template_id: str, template_conf_id: str, + template_name: str, user_words: str = "", arrange_id: str = "", **kwargs) -> dict: + params = { + "channelId": CHANNEL_ID, + "portal": "45", + "mobile": mobile, + "openId": "", + "makeId": "", + "background": "", + "userPhotos": "", + "userWords": user_words, + "templateName": template_name, + "videoName": template_name, + "templateId": template_id, + "templateConfId": template_conf_id, + "aid": ACTIVITY_ID, + "aiPack": 0, + "arrangeId": arrange_id, + "autoOrderUgc": 0, + "aiGatewayImagMakeId": "", + "fromType": "", + "sessionId": "" + } + params.update(kwargs) + return self.request_encrypted("/hapi/diy_video/au/template_make_add_v2", params) + + def get_score(self, mobile: str, score_type: int = 1) -> dict: + params = { + "activityId": ACTIVITY_ID, + "mobile": mobile, + "type": score_type, + "apiName": "act/ActApi/getDoubleTotalScoreOrRemainingScore" + } + return self.request_encrypted("/hapi/en/api", params) + + def do_lottery(self, mobile: str) -> dict: + params = { + "activityId": ACTIVITY_ID, + "mobile": mobile, + "apiName": "act/ActApi/doubleFestivalLottery" + } + return self.request_encrypted("/hapi/en/api", params) + + def do_egg_lottery(self, mobile: str, activity_id: str = "1611") -> dict: + params = { + "activityId": activity_id, + "mobile": mobile, + "apiName": "act/ActApi/doubleEggLottery" + } + return self.request_encrypted("/hapi/en/api", params) + + def get_lottery_times(self, mobile: str, activity_id: str = "1611") -> dict: + params = { + "mobile": mobile, + "activityId": activity_id + } + return self.request_encrypted("/hapi/activity/au/get_act_lottery_times", params) + + def query_new_year_templates(self, page_no: int = 1, page_size: int = 500) -> dict: + params = { + "pageNo": page_no, + "pageSize": page_size, + "activityId": "0090_2", + "apiName": "diy/DiyVideoApi/queryActRecommendTemplateList", + "channelId": CHANNEL_ID, + "portal": "45" + } + return self.request_plain("/hapi/de/api", params) + + def make_new_year_video(self, mobile: str, template_data: dict) -> dict: + + template_id = template_data.get("templateId", "") + template_conf_id = template_data.get("templateConfId", "") + video_name = template_data.get("videoName", "") + user_words = template_data.get("userWords", "") + random_suffix = random.randint(100000, 999999) + video_name_with_suffix = f"{video_name}{random_suffix}" + + params = { + "mobile": mobile, + "openId": "", + "background": template_id, + "userPhotos": "", + "userWords": user_words, + "templateName": "", + "videoName": video_name_with_suffix, + "templateId": template_id, + "templateConfId": template_conf_id, + "aid": "ai090", + "inviterMobile": "", + "arrangeId": "", + "autoOrderUgc": 0, + "aiGatewayImagMakeId": "", + "fromType": "", + "sessionId": "" + } + return self.request_encrypted("/hapi/diy_video/au/template_make_add_v2", params) + + def ai_agent_chat(self, mobile: str, content: str, agent_id: str = "", from_act: str = "cny", session_id: str = "") -> dict: + params = { + "apiName": "diy/AiAgentChatApi/aiAgentChat", + "content": content, + "mobile": mobile, + "agentId": agent_id, + "fromAct": from_act, + "sessionId": session_id + } + return self.request_encrypted("/hapi/en/api", params) + + def control_confirm_submit(self, mobile: str, session_id: str, confirm_id: int, text_list: list, + agent_id: str = "text_to_image", from_act: str = "cny") -> dict: + params = { + "apiName": "diy/AiAgentChatApi/controlConfirmSubmit", + "content": "", + "mobile": mobile, + "sessionId": session_id, + "confirmId": confirm_id, + "channelId": "", + "portal": "45", + "agentId": agent_id, + "triggerSource": "card_submit", + "textList": text_list, + "fromAct": from_act + } + return self.request_encrypted("/hapi/en/api", params) + + def check_ai_agent_result(self, mobile: str, task_id: str) -> dict: + params = { + "apiName": "diy/AiAgentChatApi/checkAiAgentResult", + "mobile": mobile, + "taskId": task_id + } + return self.request_encrypted("/hapi/en/api", params) + + def query_person_tasks(self, mobile: str, activity_id: str = "ai090") -> dict: + params = { + "apiName": "act/ActApi/queryPersonTasks", + "mobile": mobile, + "activityId": activity_id + } + return self.request_encrypted("/hapi/en/api", params) + + def query_red_packet_balance(self, mobile: str, activity_id: str = "1611") -> dict: + params = { + "apiName": "act/ActApi/doubleEggCostRedeemInfo", + "mobile": mobile, + "activityId": activity_id + } + return self.request_encrypted("/hapi/en/api", params) + + def redeem_red_packet(self, mobile: str, cost_value: float, activity_id: str = "1611") -> dict: + params = { + "apiName": "act/ActApi/doubleEggCostRedeem", + "mobile": mobile, + "activityId": activity_id, + "costValue": cost_value + } + return self.request_encrypted("/hapi/en/api", params) + + +def process_new_year_lottery(phone: str, password: str, account_idx: int = 0, total_accounts: int = 0): + print(f"\n{'='*50}") + print(f"处理账号: {phone} ({account_idx}/{total_accounts})") + print(f"活动: 2026新年星辰") + print(f"{'='*50}") + + print("\n[1] 账密登录...") + login_result = userLoginNormal(phone, password) + if not login_result: + print("❌ 登录失败") + return False + print("✓ 登录成功") + print("\n[2] 获取ticket...") + ticket = get_ticket(phone, login_result['userId'], login_result['token']) + if not ticket: + print("❌ 获取ticket失败") + return False + print("✓ 获取ticket成功") + print("\n[3] SSO登录...") + token, cookies = sso_login_v2(ticket) + if not token: + print("❌ SSO登录失败") + return False + print(f"✓ SSO登录成功") + + api = InviteAPI(token, cookies) + + print("\n[4] 查询任务状态...") + tasks_result = api.query_person_tasks(phone) + + task1_completed = False + task2_completed = False + + if tasks_result.get("code") == "0000": + tasks = tasks_result.get("data", {}).get("tasks", []) + print(f"✓ 获取到 {len(tasks)} 个任务\n") + + for task in tasks: + task_name = task.get("taskName", "") + task_type = task.get("taskType", "") + task_state = task.get("taskState", 0) # 0=未完成, 1=已完成 + current_progress = task.get("currentProgress", 0) + target_progress = task.get("targetProgress", 0) + lottery_count = task.get("lotteryCount", 0) + + state_text = "✓ 已完成" if task_state == 1 else "○ 未完成" + print(f" {state_text} {task_name} ({current_progress}/{target_progress}) - 奖励: +{lottery_count}次") + + if task_type == "video_make": + task1_completed = (task_state == 1) + elif task_type == "ai_agent_chat": + task2_completed = (task_state == 1) + + print() + else: + print(f"⚠ 查询失败,继续执行任务\n") + + print("[5] 查询初始抽奖次数...") + lottery_times_result = api.get_lottery_times(phone) + if lottery_times_result.get("code") == "0000": + initial_times = lottery_times_result.get("data", 0) + print(f"✓ 当前抽奖次数: {initial_times}") + else: + print(f"⚠ 查询失败") + initial_times = 0 + + print("\n" + "="*50) + print("【任务1】制作同款视频(获得抽奖次数)") + print("="*50) + + if task1_completed: + print("\n✓ 任务1已完成,跳过") + task1_success = True + else: + print("\n[6] 查询新年模板列表...") + templates_result = api.query_new_year_templates() + if templates_result.get("code") != "0000": + print(f"❌ 获取模板列表失败: {templates_result}") + task1_success = False + else: + template_list = templates_result.get("data", {}).get("list", []) + if not template_list: + print("❌ 模板列表为空") + task1_success = False + else: + print(f"✓ 获取到 {len(template_list)} 个模板") + + print(f"\n[7] 开始制作视频 (共3次)...") + task1_success_count = 0 + available_templates = template_list.copy() + + success_count = 0 + attempt_count = 0 + max_attempts = min(len(available_templates), 10) # 最多尝试10次 + + while success_count < 3 and attempt_count < max_attempts and available_templates: + attempt_count += 1 + + template = random.choice(available_templates) + video_name = template.get("videoName", "") + template_id = template.get("templateId", "") + user_words = template.get("userWords", "") + + print(f"\n 制作第 {success_count + 1}/3 次 (尝试 {attempt_count})...") + print(f" 模板: {video_name} (ID: {template_id})") + if not template_id or not user_words: + print(f" ⚠ 模板缺少必要字段,跳过此模板") + available_templates.remove(template) + continue + + result = api.make_new_year_video(phone, template) + code = result.get("code", "") + msg = result.get("message", result.get("desc", str(result))) + + available_templates.remove(template) + + if code == "0000": + data = result.get("data", {}) + add_lottery_times = data.get("addLotteryTimes", 0) + add_huango_times = data.get("addHuanGoLotteryTimes", "0") + print(f" ✓ 制作成功! 获得抽奖次数: {add_lottery_times}, 换购次数: {add_huango_times}") + success_count += 1 + task1_success_count += 1 + else: + print(f" ✗ 制作失败: {msg},尝试下一个模板") + + if success_count < 3 and available_templates: + time.sleep(1) + + print(f"\n任务1完成: {success_count}/3 成功 (共尝试 {attempt_count} 次)") + task1_success = success_count > 0 + + lottery_times_result = api.get_lottery_times(phone) + if lottery_times_result.get("code") == "0000": + after_task1_times = lottery_times_result.get("data", 0) + print(f"✓ 当前抽奖次数: {after_task1_times}") + else: + print(f"⚠ 查询失败") + after_task1_times = initial_times + + print("\n" + "="*50) + print("【任务2】去智能体创作(获得抽奖次数)") + print("="*50) + + if task2_completed: + print("\n✓ 任务2已完成,跳过") + task2_success_count = 3 + else: + ai_prompts = [ + "生成一张马年春节窗花剪纸的图片", + "生成一张新年祝福的中国风图片", + "生成一张春节喜庆氛围的图片" + ] + + print(f"\n[9] 开始AI对话生成图片 (共3次)...") + task2_success_count = 0 + session_id = "" + + for chat_idx in range(3): + prompt = ai_prompts[chat_idx % len(ai_prompts)] + print(f"\n === 第 {chat_idx + 1}/3 次生成 ===") + print(f" 提示词: {prompt}") + + print(f" [1/3] 发起AI对话...") + result1 = api.ai_agent_chat(phone, prompt, session_id=session_id) + code1 = result1.get("code", "") + + if code1 != "0000": + msg = result1.get("desc", result1.get("message", "未知错误")) + print(f" ✗ 对话失败: {msg}") + continue + + data1 = result1.get("data", {}) + session_id = data1.get("sessionId", "") + confirm_id = data1.get("id", 0) + card_params = data1.get("cardParameterList", {}) + text_list = card_params.get("textList", []) + + print(f" ✓ 对话成功,confirmId: {confirm_id}") + + if not text_list: + print(f" ⚠ textList为空,跳过此次生成") + continue + + print(f" [2/3] 确认提交生成...") + result2 = api.control_confirm_submit(phone, session_id, confirm_id, text_list) + code2 = result2.get("code", "") + + if code2 != "0000": + msg = result2.get("desc", result2.get("message", "未知错误")) + print(f" ✗ 提交失败: {msg}") + continue + + data2 = result2.get("data", {}) + task_id = data2.get("taskId", "") + content = data2.get("content", "") + + print(f" ✓ 提交成功,taskId: {task_id}") + print(f" 响应: {content[:80]}..." if len(content) > 80 else f" 响应: {content}") + + print(f" [3/3] 等待生成完成...这步冗余,保留了") + max_check_times = 15 + check_interval = 2 + + for check_idx in range(max_check_times): + time.sleep(check_interval) + + result3 = api.check_ai_agent_result(phone, task_id) + code3 = result3.get("code", "") + desc3 = result3.get("desc", "") + + if code3 == "0000": + print(f" ✓ 生成完成! ({check_idx + 1}次检查)") + task2_success_count += 1 + break + elif code3 == "10008": + print(f" ⏳ 制作中... ({check_idx + 1}/{max_check_times})") + continue + else: + print(f" ✗ 生成失败: {desc3}") + break + else: + print(f" ⚠ 等待超时,跳过") + + if chat_idx < 2: + print(f" 等待2秒后进行下一次生成...") + time.sleep(2) + + print(f"\n任务2完成: {task2_success_count}/3 成功") + + print("\n" + "="*50) + print("【抽奖环节】") + print("="*50) + print("\n[9] 查询最终抽奖次数...") + lottery_times_result = api.get_lottery_times(phone) + if lottery_times_result.get("code") == "0000": + final_times = lottery_times_result.get("data", 0) + print(f"✓ 最终抽奖次数: {final_times}") + else: + print(f"⚠ 查询失败,跳过抽奖") + final_times = 0 + + total_red_packet = 0.0 # 累计红包金额 + if final_times > 0: + print(f"\n开始抽奖 (共{final_times}次)...") + lottery_success = 0 + awards = [] + + for lottery_idx in range(final_times): + print(f"\n 第 {lottery_idx + 1}/{final_times} 次抽奖...") + lottery_result = api.do_egg_lottery(phone) + + if lottery_result.get("code") == "0000": + data = lottery_result.get("data", {}) + award_name = data.get("awardName", "未知奖品") + awards.append(award_name) + print(f" ✓ {award_name}") + lottery_success += 1 + money_match = re.search(r'(\d+\.?\d*)元', award_name) + if money_match: + money = float(money_match.group(1)) + total_red_packet += money + else: + msg = lottery_result.get("desc", lottery_result.get("message", "未知错误")) + print(f" ✗ 抽奖失败: {msg}") + + if lottery_idx < final_times - 1: + time.sleep(0.5) # 抽奖间隔 + + print(f"\n抽奖完成: {lottery_success}/{final_times} 成功") + if awards: + print(f"获得奖品: {', '.join(awards)}") + if total_red_packet > 0: + print(f"累计红包: {total_red_packet:.2f}元") + else: + print(f"\n跳过抽奖 (抽奖次数为0)") + + print(f"\n查询红包余额...") + + balance_result = api.query_red_packet_balance(phone) + if balance_result.get("code") == "0000": + data = balance_result.get("data", {}) + already_redeem = data.get("alreadyRedeemValue", "0") + balance_cost = data.get("balanceCostValue", "0") + already_redeem_costs = data.get("alreadyRedeemCosts", []) + + print(f" ✓ 查询成功!") + print(f" 累计已兑换: {already_redeem}元") + print(f" 剩余可兑换: {balance_cost}元") + + if already_redeem_costs: + print(f" 已兑换记录:") + for record in already_redeem_costs: + award_name = record.get("awardName", "") + update_date = record.get("updateDate", "") + print(f" - {award_name} ({update_date})") + + try: + balance_float = float(balance_cost) + if balance_float >= 2.0: + print(f"\n 💰 可兑换金额已满2元,开始兑换...") + + redeem_result = api.redeem_red_packet(phone, balance_float) + if redeem_result.get("code") == "0000": + redeem_data = redeem_result.get("data", {}) + extract_value = redeem_data.get("extractValue", "0") + new_already_redeem = redeem_data.get("alreadyRedeemValue", "0") + new_balance = redeem_data.get("balanceCostValue", "0") + + print(f" ✓ 兑换成功!") + print(f" 本次提取: {extract_value}元") + print(f" 累计已兑换: {new_already_redeem}元") + print(f" 剩余可兑换: {new_balance}元") + else: + msg = redeem_result.get("desc", redeem_result.get("message", "未知错误")) + print(f" ✗ 兑换失败: {msg}") + else: + print(f" ℹ️ 需满2元才能兑换(还差{2.0 - balance_float:.2f}元)") + except Exception as e: + print(f" ⚠ 处理失败: {e}") + else: + msg = balance_result.get("desc", balance_result.get("message", "未知错误")) + print(f" ✗ 查询失败: {msg}") + stat_result = api.send_stat_message( + phone, + "activity_2512new-year-2026_30.1", + "activityID_ai090_ca_dljA" + ) + if stat_result.get("code") == "0000": + pass + else: + print(f"发送失败: {stat_result.get('desc', '')}") + + print(f"\n{'='*50}") + print(f"账号 {phone} 处理完成") + print(f"{'='*50}") + + return task1_success or task2_success_count > 0 + + +def process_account(phone: str, password: str, account_idx: int = 0, total_accounts: int = 0): + print(f"\n{'='*50}") + print(f"处理账号: {phone} ({account_idx}/{total_accounts})") + print(f": {INVITATION_CODE[:20]}...") + print(f"{'='*50}") + print("\n[1] 账密登录...") + login_result = userLoginNormal(phone, password) + if not login_result: + print("❌ 登录失败") + return False + print("✓ 登录成功") + + print("\n[2] 获取ticket...") + ticket = get_ticket(phone, login_result['userId'], login_result['token']) + if not ticket: + print("❌ 获取ticket失败") + return False + print("✓ 获取ticket成功") + + print("\n[3] SSO登录...") + token, cookies = sso_login_v2(ticket) + if not token: + print("❌ SSO登录失败") + return False + print(f"✓ SSO登录成功,token: {token[:50]}...") + + api = InviteAPI(token, cookies) + + print("\n获取用户信息...") + user_info = api.get_user_info(phone) + if user_info.get("code") == "0000": + print(f"✓ 用户信息获取成功") + else: + print(f"用户信息: {user_info}") + + # Step 7: 检查用户状态 + print("\n[6] 检查用户状态...") + user_state = api.check_user_state(phone) + print(f"用户状态: {user_state}") + + # Step 8: 查询推荐模板列表 + print("\n[8] 查询推荐模板列表...") + templates = api.query_template_list() + template_list = templates.get("data", {}).get("list", []) + if not template_list: + print("❌ 未获取到模板列表") + return False + print(f"✓ 获取到 {len(template_list)} 个模板") + + # Step 9: 选择第一个模板进行制作 + tpl = template_list[0] + template_id = tpl.get("templateId", "") + template_conf_id = tpl.get("templateConfId", "") + video_name = tpl.get("videoName", "") + user_words = tpl.get("userWords1", "1234") + arrange_id = str(tpl.get("arrangeId", "")) + + # 如果有输入限制,生成符合要求的内容 + word_min = tpl.get("wordMinCount", 0) + limit_regular = tpl.get("limitRegular", "") + + if limit_regular == "/^\\d+$/" and word_min > 0: + # 数字输入(如手机尾号) + user_words = phone[-word_min:] if len(phone) >= word_min else phone + elif word_min > 0 and not user_words: + user_words = "接福" # 默认文字 + + print(f"\n[9] 开始制作模板 (共{MAKE_COUNT}次)...") + print(f" 模板: {video_name}") + print(f" 模板ID: {template_id}") + print(f" 配置ID: {template_conf_id}") + print(f" 用户输入: {user_words}") + print(f" : {INVITATION_CODE[:20]}...") + + # Step 10: 循环制作 + success_count = 0 + for make_idx in range(MAKE_COUNT): + print(f"\n 制作第 {make_idx + 1}/{MAKE_COUNT} 次...") + result = api.template_make( + mobile=phone, + template_id=template_id, + template_conf_id=template_conf_id, + template_name=video_name, + user_words=user_words, + arrange_id=arrange_id + ) + msg = result.get("message", result.get("desc", str(result))) + code = result.get("code", "") + print(f" 结果: {msg}") + if code == "0000": + success_count += 1 + if make_idx < MAKE_COUNT - 1: + time.sleep(0.5) + + print(f"\n制作完成: {success_count}/{MAKE_COUNT} 成功") + + if success_count > 0: + actparam_base = f"activityID_{ACTIVITY_ID}_templateID_{template_id}_entrance_{CHANNEL_ID}_templateConfID_{template_conf_id}_ca_AP3V" + + stat_events = [ + ("activity_vring_make_20250616", actparam_base), + ("activity_2511AI-makeonekey_9.2", actparam_base), + ("activity_vring_make_1.9", f"_activityID_{ACTIVITY_ID}_templateID_{template_id}_entrance_{CHANNEL_ID}_templateconfID_{template_conf_id}_ca_AP3V"), + ("activity_2511AI-makeonekey_1.6", f"activityID_{ACTIVITY_ID}_templateID_{template_id}_entrance_{CHANNEL_ID}_templateconfID_{template_conf_id}_ca_AP3V"), + ("page_2511AI-makeonekey_9", actparam_base), + ("page_2511AI-makeonekey_3", actparam_base), + ("with_vring_display_20250616", actparam_base), + ("with_vring_slide_display_20250829", actparam_base), + ("with_vring_stay_duration", f"activityID_{ACTIVITY_ID}_entrance_{CHANNEL_ID}_duration_15_ca_AP3V"), + ] + + for actname, actparam in stat_events: + try: + stat_result = api.send_stat_message(phone, actname, actparam) + if stat_result.get("code") == "0000": + print(f" ✓ {actname}") + else: + print(f" ⚠ {actname}: {stat_result.get('desc', '')}") + except Exception as e: + print(f" ⚠ {actname}: {str(e)}") + time.sleep(0.1) + + print("\n查看积分...") + score_result = api.get_score(phone) + current_score = 0 + if score_result.get("code") == "0000": + current_score = int(score_result.get("data", "0")) + print(f"✓ 当前积分: {current_score}") + else: + print(f"积分查询: {score_result}") + + if MIN_SCORE_TO_LOTTERY > 0 and current_score >= MIN_SCORE_TO_LOTTERY: + print(f"\n[13] 抽奖 (积分{current_score} >= 阈值{MIN_SCORE_TO_LOTTERY})...") + lottery_result = api.do_lottery(phone) + if lottery_result.get("code") == "0000": + award_data = lottery_result.get("data", {}) + award_name = award_data.get("awardName", "未知") + print(f"✓ 抽奖结果: {award_name}") + else: + print(f"抽奖失败: {lottery_result}") + elif MIN_SCORE_TO_LOTTERY == 0: + print(f"\n[13] 跳过抽奖 (阈值设为0,不抽奖)") + else: + print(f"\n[13] 跳过抽奖 (积分{current_score} < 阈值{MIN_SCORE_TO_LOTTERY})") + + if success_count > 0: + print("✓ 兑换成功!") + return True + else: + print("❌ 兑换失败") + return False + + +def main(): + accounts = parse_accounts(ACCOUNTS_STR) + if not accounts: + print("错误: 未配置账号") + return + + print("=" * 50) + print("电信彩玲AI脚本 - 2026新年星辰活动") + print(f"渠道ID: {CHANNEL_ID}") + print(f"共 {len(accounts)} 个账号") + print("=" * 50) + print("\n活动说明:") + print(" 任务1: 制作新年视频 (3次) → 获得抽奖次数") + print(" 任务2: AI对话生成图片 (3次) → 获得抽奖次数") + print(" 最后: 使用获得的次数进行抽奖") + print("=" * 50) + + total = len(accounts) + success_count = 0 + for idx, (phone, password) in enumerate(accounts): + if process_new_year_lottery(phone, password, idx + 1, total): + success_count += 1 + if idx < len(accounts) - 1: + print(f"\n等待3秒后处理下一个账号...") + time.sleep(3) + + print(f"\n{'='*50}") + print(f"全部处理完成: {success_count}/{total} 成功") + print(f"{'='*50}") + + +if __name__ == "__main__": + main() + diff --git a/tools/bucket.js b/tools/bucket.js new file mode 100644 index 0000000..106f101 --- /dev/null +++ b/tools/bucket.js @@ -0,0 +1,13 @@ +module.exports = { + getBucket, + updateBucket +} +const fs = require('fs') +function getBucket(bucketName) { + return fs.readFileSync(bucketName) +} + +function updateBucket(bucketName, bucket) { + return fs.writeFileSync(bucketName, bucket) +} + diff --git a/utils.js b/utils.js new file mode 100644 index 0000000..3cd4212 --- /dev/null +++ b/utils.js @@ -0,0 +1,314 @@ +/* +* 感谢yml大佬js封装库 当前版本V0.0.5 +* 22/11/21 随机生成GUID +* 22/11/23 随机生成MAC网络地址 +* 22/11/28 随机一言 自建和其他 gitee版和github版 优先gitee 速度快 +*/ +module.exports = { + txt_api: txt_api,//获取随机文案 一言api // "a"动画, "b"漫画, "c"游戏, "d"文学, "e"原创, "f"来自网络, "g"其他, "h"影视, "i"诗词, "j"网易云, "k"哲学 ,"l"抖机灵 + randomMac: randomMac,//随机MAC网络地址 + guid: guid,//根据时间戳生成GUID 8-4-4-4-12 + phone_num: phone_num,//手机号中间遮挡 + randomszdx: randomszdx,//随机 数字 + 大写字母 生成 + randomszxx: randomszxx,//随机 数字 + 小写字母 生成 + randomInt: randomInt,//随机整数生成 + ts13: ts13,//时间戳 13位 + ts10: ts10,//时间戳 10位 + tmtoDate: tmtoDate,//时间戳 转 日期 + local_hours: local_hours,//获取当前小时数 + local_minutes: local_minutes,//获取当前分钟数 + local_year: local_year,//获取当前年份 2022 + local_month: local_month,//获取当前月份(数字) 5月 + local_month_two: local_month_two,//获取当前月份(数字) 05月 补零 + local_day: local_day,//获取当前天数(数字) 5日 + local_day_two: local_day_two,//获取当前天数 05日 补零 + RSA_Encrypt: RSA_Encrypt,//RSA公钥加密 传参(数据,key) , 返回 base64格式 + base64_encode: base64_encode,//base64 编码 + base64_decode: base64_decode,//base64 解码 + SHA1_Encrypt: SHA1_Encrypt,//SHA1加密 + SHA256_Encrypt: SHA256_Encrypt,//SHA256加密 + MD5_Encrypt: MD5_Encrypt,//md5 加密 +}; + +/** + * 获取随机文案 一言api + */ +function txt_api(i) { + return new Promise((resolve) => { + try { + var request = require('request'); + let options = { + method: 'GET', + url: 'https://v1.hitokoto.cn/', + qs: { c: i }, + }; + request(options, function (error, response, body) { + if (error) throw new Error(error); + //console.log(body); + let result = JSON.parse(body); + let txt = result.hitokoto + //console.log(result.id); + resolve(txt) + return txt + }); + } catch (error) { + console.log(error); + } + }) +} + +/** + * 随机MAC网络地址 + */ +function randomMac() { + return "XX:XX:XX:XX:XX:XX".replace(/X/g, function () { + return "0123456789ABCDEF".charAt(Math.floor(Math.random() * 16)) + }); +} + +/** + * 随机UUID(由时间戳生成) 8-4-4-4-12 + */ +function guid() { + function S4() { + return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); + } + return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); +} + +/** + * 手机号中间遮挡 + */ +function phone_num(phone_num) { + if (phone_num.length == 11) { + let data = phone_num.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2"); + return data; + } else { + return phone_num; + } +} + +/** + * 随机 数字 + 大写字母 生成 + */ +function randomszdx(e) { + e = e || 32; + var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", + a = t.length, + n = ""; + + for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); + return n; +} + +/** + * 随机 数字 + 小写字母 生成 + */ +function randomszxx(e) { + e = e || 32; + var t = "qwertyuioplkjhgfdsazxcvbnm1234567890", + a = t.length, + n = ""; + + for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); + return n; +} + +/** + * 随机整数生成 + */ +function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); +} + +/** + * 时间戳 13位 + */ +function ts13() { + return Math.round(new Date().getTime()).toString(); +} + +/** + * 时间戳 10位 + */ +function ts10() { + return Math.round(new Date().getTime() / 1000).toString(); +} + +/** + * 时间戳 转 日期 + */ +function tmtoDate(time = +new Date()) { + if (time.toString().length == 13) { + var date = new Date(time + 8 * 3600 * 1000); + return date.toJSON().substr(0, 19).replace("T", " "); + } else if (time.toString().length == 10) { + time = time * 1000; + var date = new Date(time + 8 * 3600 * 1000); + return date.toJSON().substr(0, 19).replace("T", " "); + } +} + +/** + * 获取当前小时数 + */ +function local_hours() { + let myDate = new Date(); + let h = myDate.getHours(); + return h; +} + +/** + * 获取当前分钟数 + */ +function local_minutes() { + let myDate = new Date(); + let m = myDate.getMinutes(); + return m; +} + +/** + * 获取当前年份 2022 + */ +function local_year() { + let myDate = new Date(); + y = myDate.getFullYear(); + return y; +} + +/** + * 获取当前月份(数字) 5月 + */ +function local_month() { + let myDate = new Date(); + let m = myDate.getMonth(); + return m; +} + +/** + * 获取当前月份(数字) 05月 补零 + */ +function local_month_two() { + let myDate = new Date(); + let m = myDate.getMonth(); + if (m.toString().length == 1) { + m = `0${m}`; + } + return m; +} + +/** + * 获取当前天数(数字) 5日 + */ +function local_day() { + let myDate = new Date(); + let d = myDate.getDate(); + return d; +} + +/** + * 获取当前天数 05日 补零 + */ +function local_day_two() { + let myDate = new Date(); + let d = myDate.getDate(); + if (d.toString().length == 1) { + d = `0${d}`; + } + return d; +} + +/** + * RSA公钥加密 传参(数据,key) , 返回 base64格式 + */ +function RSA_Encrypt(msg, key) { + global.navigator = { appName: 'nodejs' }; // fake the navigator object + global.window = {}; // fake the window object + const JSEncrypt = require('jsencrypt') + let enc = new JSEncrypt(); + enc.setPublicKey(key) + return enc.encrypt(msg).toString(); +} + +/** + * base64 编码 + */ +function base64_encode(data) { + let a = Buffer.from(data, 'utf-8').toString('base64') + return a +} + +/** + * base64 解码 + */ +function base64_decode(data) { + let a = Buffer.from(data, 'base64').toString('utf8') + return a +} + +/** + * SHA1 加密 + */ +function SHA1_Encrypt(s) { + var data = new Uint8Array(encodeUTF8(s)) + var i, j, t; + var l = ((data.length + 8) >>> 6 << 4) + 16, s = new Uint8Array(l << 2); + s.set(new Uint8Array(data.buffer)), s = new Uint32Array(s.buffer); + for (t = new DataView(s.buffer), i = 0; i < l; i++)s[i] = t.getUint32(i << 2); + s[data.length >> 2] |= 0x80 << (24 - (data.length & 3) * 8); + s[l - 1] = data.length << 3; + var w = [], f = [ + function () { return m[1] & m[2] | ~m[1] & m[3]; }, + function () { return m[1] ^ m[2] ^ m[3]; }, + function () { return m[1] & m[2] | m[1] & m[3] | m[2] & m[3]; }, + function () { return m[1] ^ m[2] ^ m[3]; } + ], rol = function (n, c) { return n << c | n >>> (32 - c); }, + k = [1518500249, 1859775393, -1894007588, -899497514], + m = [1732584193, -271733879, null, null, -1009589776]; + m[2] = ~m[0], m[3] = ~m[1]; + for (i = 0; i < s.length; i += 16) { + var o = m.slice(0); + for (j = 0; j < 80; j++) + w[j] = j < 16 ? s[i + j] : rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1), + t = rol(m[0], 5) + f[j / 20 | 0]() + m[4] + w[j] + k[j / 20 | 0] | 0, + m[1] = rol(m[1], 30), m.pop(), m.unshift(t); + for (j = 0; j < 5; j++)m[j] = m[j] + o[j] | 0; + }; + t = new DataView(new Uint32Array(m).buffer); + for (var i = 0; i < 5; i++)m[i] = t.getUint32(i << 2); + + var hex = Array.prototype.map.call(new Uint8Array(new Uint32Array(m).buffer), function (e) { + return (e < 16 ? "0" : "") + e.toString(16); + }).join(""); + return hex; +} +function encodeUTF8(s) { + var i, r = [], c, x; + for (i = 0; i < s.length; i++) + if ((c = s.charCodeAt(i)) < 0x80) r.push(c); + else if (c < 0x800) r.push(0xC0 + (c >> 6 & 0x1F), 0x80 + (c & 0x3F)); + else { + if ((x = c ^ 0xD800) >> 10 == 0) //对四字节UTF-16转换为Unicode + c = (x << 10) + (s.charCodeAt(++i) ^ 0xDC00) + 0x10000, + r.push(0xF0 + (c >> 18 & 0x7), 0x80 + (c >> 12 & 0x3F)); + else r.push(0xE0 + (c >> 12 & 0xF)); + r.push(0x80 + (c >> 6 & 0x3F), 0x80 + (c & 0x3F)); + }; + return r; +} + +/** + * SHA256 加密 + */ +function SHA256_Encrypt(data) { + sha256_init(); + sha256_update(data, data.length); + sha256_final(); + return sha256_encode_hex(); +} +/* SHA256 logical functions */ function rotateRight(n, x) { return (x >>> n) | (x << (32 - n)); } function choice(x, y, z) { return (x & y) ^ (~x & z); } function majority(x, y, z) { return (x & y) ^ (x & z) ^ (y & z); } function sha256_Sigma0(x) { return rotateRight(2, x) ^ rotateRight(13, x) ^ rotateRight(22, x); } function sha256_Sigma1(x) { return rotateRight(6, x) ^ rotateRight(11, x) ^ rotateRight(25, x); } function sha256_sigma0(x) { return rotateRight(7, x) ^ rotateRight(18, x) ^ (x >>> 3); } function sha256_sigma1(x) { return rotateRight(17, x) ^ rotateRight(19, x) ^ (x >>> 10); } function sha256_expand(W, j) { return (W[j & 0x0f] += sha256_sigma1(W[(j + 14) & 0x0f]) + W[(j + 9) & 0x0f] + sha256_sigma0(W[(j + 1) & 0x0f])); } /* Hash constant words K: */ var K256 = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2); /* global arrays */ var ihash, count, buffer; var sha256_hex_digits = "0123456789abcdef"; /* Add 32-bit integers with 16-bit operations (bug in some JS-interpreters: overflow) */ function safe_add(x, y) { var lsw = (x & 0xffff) + (y & 0xffff); var msw = (x >> 16) + (y >> 16) + (lsw >> 16); return (msw << 16) | (lsw & 0xffff); } /* Initialise the SHA256 computation */ function sha256_init() { ihash = new Array(8); count = new Array(2); buffer = new Array(64); count[0] = count[1] = 0; ihash[0] = 0x6a09e667; ihash[1] = 0xbb67ae85; ihash[2] = 0x3c6ef372; ihash[3] = 0xa54ff53a; ihash[4] = 0x510e527f; ihash[5] = 0x9b05688c; ihash[6] = 0x1f83d9ab; ihash[7] = 0x5be0cd19; } /* Transform a 512-bit message block */ function sha256_transform() { var a, b, c, d, e, f, g, h, T1, T2; var W = new Array(16); /* Initialize registers with the previous intermediate value */ a = ihash[0]; b = ihash[1]; c = ihash[2]; d = ihash[3]; e = ihash[4]; f = ihash[5]; g = ihash[6]; h = ihash[7]; /* make 32-bit words */ for (var i = 0; i < 16; i++) W[i] = buffer[(i << 2) + 3] | (buffer[(i << 2) + 2] << 8) | (buffer[(i << 2) + 1] << 16) | (buffer[i << 2] << 24); for (var j = 0; j < 64; j++) { T1 = h + sha256_Sigma1(e) + choice(e, f, g) + K256[j]; if (j < 16) T1 += W[j]; else T1 += sha256_expand(W, j); T2 = sha256_Sigma0(a) + majority(a, b, c); h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); } /* Compute the current intermediate hash value */ ihash[0] += a; ihash[1] += b; ihash[2] += c; ihash[3] += d; ihash[4] += e; ihash[5] += f; ihash[6] += g; ihash[7] += h; } /* Read the next chunk of data and update the SHA256 computation */ function sha256_update(data, inputLen) { var i, index, curpos = 0; /* Compute number of bytes mod 64 */ index = (count[0] >> 3) & 0x3f; var remainder = inputLen & 0x3f; /* Update number of bits */ if ((count[0] += inputLen << 3) < inputLen << 3) count[1]++; count[1] += inputLen >> 29; /* Transform as many times as possible */ for (i = 0; i + 63 < inputLen; i += 64) { for (var j = index; j < 64; j++) buffer[j] = data.charCodeAt(curpos++); sha256_transform(); index = 0; } /* Buffer remaining input */ for (var j = 0; j < remainder; j++) buffer[j] = data.charCodeAt(curpos++); } /* Finish the computation by operations such as padding */ function sha256_final() { var index = (count[0] >> 3) & 0x3f; buffer[index++] = 0x80; if (index <= 56) { for (var i = index; i < 56; i++) buffer[i] = 0; } else { for (var i = index; i < 64; i++) buffer[i] = 0; sha256_transform(); for (var i = 0; i < 56; i++) buffer[i] = 0; } buffer[56] = (count[1] >>> 24) & 0xff; buffer[57] = (count[1] >>> 16) & 0xff; buffer[58] = (count[1] >>> 8) & 0xff; buffer[59] = count[1] & 0xff; buffer[60] = (count[0] >>> 24) & 0xff; buffer[61] = (count[0] >>> 16) & 0xff; buffer[62] = (count[0] >>> 8) & 0xff; buffer[63] = count[0] & 0xff; sha256_transform(); } /* Split the internal hash values into an array of bytes */ function sha256_encode_bytes() { var j = 0; var output = new Array(32); for (var i = 0; i < 8; i++) { output[j++] = (ihash[i] >>> 24) & 0xff; output[j++] = (ihash[i] >>> 16) & 0xff; output[j++] = (ihash[i] >>> 8) & 0xff; output[j++] = ihash[i] & 0xff; } return output; } /* Get the internal hash as a hex string */ function sha256_encode_hex() { var output = new String(); for (var i = 0; i < 8; i++) { for (var j = 28; j >= 0; j -= 4) output += sha256_hex_digits.charAt((ihash[i] >>> j) & 0x0f); } return output; } + +/** + * md5 加密 + */ +function MD5_Encrypt(a) { function b(a, b) { return (a << b) | (a >>> (32 - b)); } function c(a, b) { var c, d, e, f, g; return ((e = 2147483648 & a), (f = 2147483648 & b), (c = 1073741824 & a), (d = 1073741824 & b), (g = (1073741823 & a) + (1073741823 & b)), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f); } function d(a, b, c) { return (a & b) | (~a & c); } function e(a, b, c) { return (a & c) | (b & ~c); } function f(a, b, c) { return a ^ b ^ c; } function g(a, b, c) { return b ^ (a | ~c); } function h(a, e, f, g, h, i, j) { return (a = c(a, c(c(d(e, f, g), h), j))), c(b(a, i), e); } function i(a, d, f, g, h, i, j) { return (a = c(a, c(c(e(d, f, g), h), j))), c(b(a, i), d); } function j(a, d, e, g, h, i, j) { return (a = c(a, c(c(f(d, e, g), h), j))), c(b(a, i), d); } function k(a, d, e, f, h, i, j) { return (a = c(a, c(c(g(d, e, f), h), j))), c(b(a, i), d); } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - (d % 64)) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;) (b = (i - (i % 4)) / 4), (h = (i % 4) * 8), (g[b] = g[b] | (a.charCodeAt(i) << h)), i++; return ((b = (i - (i % 4)) / 4), (h = (i % 4) * 8), (g[b] = g[b] | (128 << h)), (g[f - 2] = c << 3), (g[f - 1] = c >>> 29), g); } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++) (b = (a >>> (8 * c)) & 255), (e = "0" + b.toString(16)), (d += e.substr(e.length - 2, 2)); return d; } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? (b += String.fromCharCode(d)) : d > 127 && 2048 > d ? ((b += String.fromCharCode((d >> 6) | 192)), (b += String.fromCharCode((63 & d) | 128))) : ((b += String.fromCharCode((d >> 12) | 224)), (b += String.fromCharCode(((d >> 6) & 63) | 128)), (b += String.fromCharCode((63 & d) | 128))); } return b; } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16) (p = t), (q = u), (r = v), (s = w), (t = h(t, u, v, w, x[o + 0], y, 3614090360)), (w = h(w, t, u, v, x[o + 1], z, 3905402710)), (v = h(v, w, t, u, x[o + 2], A, 606105819)), (u = h(u, v, w, t, x[o + 3], B, 3250441966)), (t = h(t, u, v, w, x[o + 4], y, 4118548399)), (w = h(w, t, u, v, x[o + 5], z, 1200080426)), (v = h(v, w, t, u, x[o + 6], A, 2821735955)), (u = h(u, v, w, t, x[o + 7], B, 4249261313)), (t = h(t, u, v, w, x[o + 8], y, 1770035416)), (w = h(w, t, u, v, x[o + 9], z, 2336552879)), (v = h(v, w, t, u, x[o + 10], A, 4294925233)), (u = h(u, v, w, t, x[o + 11], B, 2304563134)), (t = h(t, u, v, w, x[o + 12], y, 1804603682)), (w = h(w, t, u, v, x[o + 13], z, 4254626195)), (v = h(v, w, t, u, x[o + 14], A, 2792965006)), (u = h(u, v, w, t, x[o + 15], B, 1236535329)), (t = i(t, u, v, w, x[o + 1], C, 4129170786)), (w = i(w, t, u, v, x[o + 6], D, 3225465664)), (v = i(v, w, t, u, x[o + 11], E, 643717713)), (u = i(u, v, w, t, x[o + 0], F, 3921069994)), (t = i(t, u, v, w, x[o + 5], C, 3593408605)), (w = i(w, t, u, v, x[o + 10], D, 38016083)), (v = i(v, w, t, u, x[o + 15], E, 3634488961)), (u = i(u, v, w, t, x[o + 4], F, 3889429448)), (t = i(t, u, v, w, x[o + 9], C, 568446438)), (w = i(w, t, u, v, x[o + 14], D, 3275163606)), (v = i(v, w, t, u, x[o + 3], E, 4107603335)), (u = i(u, v, w, t, x[o + 8], F, 1163531501)), (t = i(t, u, v, w, x[o + 13], C, 2850285829)), (w = i(w, t, u, v, x[o + 2], D, 4243563512)), (v = i(v, w, t, u, x[o + 7], E, 1735328473)), (u = i(u, v, w, t, x[o + 12], F, 2368359562)), (t = j(t, u, v, w, x[o + 5], G, 4294588738)), (w = j(w, t, u, v, x[o + 8], H, 2272392833)), (v = j(v, w, t, u, x[o + 11], I, 1839030562)), (u = j(u, v, w, t, x[o + 14], J, 4259657740)), (t = j(t, u, v, w, x[o + 1], G, 2763975236)), (w = j(w, t, u, v, x[o + 4], H, 1272893353)), (v = j(v, w, t, u, x[o + 7], I, 4139469664)), (u = j(u, v, w, t, x[o + 10], J, 3200236656)), (t = j(t, u, v, w, x[o + 13], G, 681279174)), (w = j(w, t, u, v, x[o + 0], H, 3936430074)), (v = j(v, w, t, u, x[o + 3], I, 3572445317)), (u = j(u, v, w, t, x[o + 6], J, 76029189)), (t = j(t, u, v, w, x[o + 9], G, 3654602809)), (w = j(w, t, u, v, x[o + 12], H, 3873151461)), (v = j(v, w, t, u, x[o + 15], I, 530742520)), (u = j(u, v, w, t, x[o + 2], J, 3299628645)), (t = k(t, u, v, w, x[o + 0], K, 4096336452)), (w = k(w, t, u, v, x[o + 7], L, 1126891415)), (v = k(v, w, t, u, x[o + 14], M, 2878612391)), (u = k(u, v, w, t, x[o + 5], N, 4237533241)), (t = k(t, u, v, w, x[o + 12], K, 1700485571)), (w = k(w, t, u, v, x[o + 3], L, 2399980690)), (v = k(v, w, t, u, x[o + 10], M, 4293915773)), (u = k(u, v, w, t, x[o + 1], N, 2240044497)), (t = k(t, u, v, w, x[o + 8], K, 1873313359)), (w = k(w, t, u, v, x[o + 15], L, 4264355552)), (v = k(v, w, t, u, x[o + 6], M, 2734768916)), (u = k(u, v, w, t, x[o + 13], N, 1309151649)), (t = k(t, u, v, w, x[o + 4], K, 4149444226)), (w = k(w, t, u, v, x[o + 11], L, 3174756917)), (v = k(v, w, t, u, x[o + 2], M, 718787259)), (u = k(u, v, w, t, x[o + 9], N, 3951481745)), (t = c(t, p)), (u = c(u, q)), (v = c(v, r)), (w = c(w, s)); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase(); } diff --git a/wxapp/7dian5.py b/wxapp/7dian5.py new file mode 100644 index 0000000..c8a9ab4 --- /dev/null +++ b/wxapp/7dian5.py @@ -0,0 +1,113 @@ + +#微信小程序:七点五饮用天然矿泉水 + + +import requests +from os import path +import json +import time +import os + +def load_send(): + cur_path = path.abspath(path.dirname(__file__)) + notify_file = cur_path + "/notify.py" + + if path.exists(notify_file): + try: + from notify import send # 导入模块的send为notify_send + print("加载通知服务成功!") + return send # 返回导入的函数 + except ImportError: + print("加载通知服务失败~") + else: + print("加载通知服务失败~") + + return False # 返回False表示未成功加载通知服务 + + + +def sign(): + url = "https://h5.youzan.com/wscump/checkin/checkinV2.json?checkinId=3997371" + headers = { + 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129", + 'xweb_xhr': "1", + 'extra-data': sid, + 'sec-fetch-site': "cross-site", + 'sec-fetch-mode': "cors", + 'sec-fetch-dest': "empty", + 'referer': "https://servicewechat.com/wx5508c9ab0d2118ff/63/page-frame.html", + 'accept-language': "zh-CN,zh;q=0.9", + 'Cookie': "KDTWEAPPSESSIONID="+sid + } + + response = requests.get(url, headers=headers) + time.sleep(2) + print(response.text) + time.sleep(2) + return response.text + +def jifen(): + url = "https://h5.youzan.com/wscump/pointstore/getCustomerPoints.json" + + headers = { + 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129", + 'Cookie': "KDTWEAPPSESSIONID="+sid + } + + response = requests.get(url, headers=headers) + time.sleep(2) + # print(response.text) + try: + xiaoku=json.loads(response.text) + jifen1=str(xiaoku["data"]["currentAmount"]) + print('目前积分为'+jifen1) + time.sleep(2) + + url = "https://h5.youzan.com/wscump/checkin/get_activity_by_yzuid_v2.json?checkinId=3997371" + + headers = { + 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090b11) XWEB/9129", + 'extra-data': "sid="+sid, + 'Cookie': "KDTWEAPPSESSIONID="+sid + } + + response = requests.get(url, headers=headers) + xiaoku=json.loads(response.text) + print('目前签到天数为'+str(xiaoku["data"]["continuesDay"])) + # print(response.text) + tongzhi='\n目前积分为'+jifen1+'\n签到天数为'+str(xiaoku["data"]["continuesDay"]) + return tongzhi + except: + print('积分查询失败,检查变量是否正确') + + + +if __name__ == "__main__": + var_name='qdwxcxcookie' + values = os.getenv(var_name) + values=values.split('\n') + content='' + for value in values: + beizhu=value.split('#')[0]; + sid=value.split('#')[1]; + print('-------开始' + str(beizhu) + '签到------') + content=content+'\n===='+str(beizhu)+'账号签到情况====\n' + content=content+str(sign()) + print('-------开始' + str(beizhu) + '查询积分------') + content=content+str(jifen()) + content=content+'\n----------------------\n' + # 在load_send中获取导入的send函数 + send = load_send() + print() + + + print('------运行结束-------') + content=content+'\n签到10天送100积分,连续20天送20元券,连续30天送25元券,连续45天送七点五饮用天然泉水高端弱碱饮用天然泉水 表白礼物 整箱520ml*15\n' + content=content+'\n所有账号运行完毕\n' + print('签到10天送100积分,连续20天送20元券,连续30天送25元券,连续45天送七点五饮用天然泉水高端弱碱饮用天然泉水 表白礼物 整箱520ml*15') + # 判断send是否可用再进行调用 + print() + if send: + send('七点五饮用天然矿泉水签到推送', content) + else: + print('通知服务不可用') diff --git a/wxapp/anmuxi.js b/wxapp/anmuxi.js new file mode 100644 index 0000000..9e0ae16 --- /dev/null +++ b/wxapp/anmuxi.js @@ -0,0 +1,332 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 测试 +------------------------------------------ +#Notice: + 安慕希小程序 变量名anmuxi + 抓wx-amxshop.msxapi.digitalyili.com/api headers中accessToken值 多账户&分隔 +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("安慕希小程序"); +let ckName = `anmuxi`; +const strSplitor = "#"; +const envSplitor = ["&", "\n"]; +const notify = $.isNode() ? require("../sendNotify") : ""; +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" + +class Public { + async request(options) { + return await axios.request(options); + } +} +class Task extends Public { + constructor(env) { + + super(); + this.index = $.userIdx++ + let user = env.split("#"); + this.token = user[0]; + this.signed = true + + } + + async daily_sign() { + let options = { + method: "GET", + + url: `https://wx-amxshop.msxapi.digitalyili.com/api/user/daily/sign?exParams=false`, + headers: { + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "accesstoken": "" + this.token, + "content-type": "application/x-www-form-urlencoded", + "scene": "1256", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1" + } + } + try { + let { data: res } = await this.request(options); + if (res.code == 200) { + $.log(`签到成功 获得【${res.data.dailySign.bonusPoints}】分`) + } else { + $.log(`签到失败`) + console.log(res); + + } + } catch (e) { + console.log(`签到失败`) + } + } + async daily_sign_status() { + let options = { + method: "GET", + + url: `https://wx-amxshop.msxapi.digitalyili.com/api/user/sign/status`, + headers: { + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "accesstoken": "" + this.token, + "content-type": "application/x-www-form-urlencoded", + "scene": "1256", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1" + } + } + try { + let { data: res } = await this.request(options); + if (res.code == 200) { + if (res.data.signed == false) { + this.signed = false + $.log(`已签到 【${res.data.signDays}】天 检测到今日未签到`) + } else { + $.log(`已签到 【${res.data.signDays}】天 检测到今日已签到`) + this.signed = true + } + + } else { + $.log(`获取签到状态失败`) + console.log(res); + + } + } catch (e) { + console.log(`签到失败`) + } + } + async user_score() { + let options = { + method: "GET", + + url: `https://wx-amxshop.msxapi.digitalyili.com/api/user/score`, + headers: { + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "accesstoken": "" + this.token, + "content-type": "application/x-www-form-urlencoded", + "scene": "1256", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1" + } + } + try { + let { data: res } = await this.request(options); + if (res.code == 200) { + $.log(`当前积分【${res.data}】天`) + } else { + $.log(`获取积分失败`) + console.log(res); + + } + } catch (e) { + console.log(`签到失败`) + } + } + + async run() { + await this.user_score(); + + await this.daily_sign_status(); + if (this.signed == false) { + await this.daily_sign(); + } + + + + } +} + + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + // + + await new Task(user).run(); + + } + + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await new Public().request(options); + $.log(res) + return res +} + + +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done(t = {}) { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} \ No newline at end of file diff --git a/wxapp/bnmdhg_wx.js b/wxapp/bnmdhg_wx.js new file mode 100644 index 0000000..383c029 --- /dev/null +++ b/wxapp/bnmdhg_wx.js @@ -0,0 +1,384 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 测试 +------------------------------------------ +#Notice: 只适用于购买了luflytoken的 购买联系QQ860562056 +变量wxid_bnmd 填写wxid_bnmd 多账号&分割或者换行 +wxcenter 填写wxcenter +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("巴奴毛肚小程序"); +let ckName = `wxid_bnmd`; +const strSplitor = "#"; +const envSplitor = ["&", "\n"]; +const crypto = require("crypto-js"); +const notify = $.isNode() ? require("../sendNotify") : ""; +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" +const key = "bfc5e947cd84c7ced1ee48d28fb3e90f"; +let wxcenter = process.env.wxcenter || "" +let appid = 'wx71373698c47f9a9f' +class Public { + async request(options) { + return await axios.request(options); + } +} +class Task extends Public { + constructor(env) { + + super(); + this.index = $.userIdx++ + let user = env.split(strSplitor); + this.wxid = user[0]; + } + getUUID(_0x4b4b65 = 16, _0x14813d = 36) { + const _0x181bd6 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); + const _0x295ca7 = []; + let _0x4713fe = 0; + if (_0x4b4b65) { + for (_0x4713fe = 0; _0x4713fe < _0x4b4b65; _0x4713fe++) { + _0x295ca7[_0x4713fe] = _0x181bd6[0 | Math.random() * _0x14813d]; + } + } else { + let _0x540406; + for (_0x295ca7[8] = _0x295ca7[13] = _0x295ca7[18] = _0x295ca7[23] = "-", _0x295ca7[14] = "4", _0x4713fe = 0; _0x4713fe < 36; _0x4713fe++) { + if (!_0x295ca7[_0x4713fe]) { + _0x540406 = 0 | 16 * Math.random(); + _0x295ca7[_0x4713fe] = _0x181bd6[19 === _0x4713fe ? 3 & _0x540406 | 8 : _0x540406]; + } + } + } + return _0x295ca7.join(""); + } + getHeaders(options, _0x32d686, authorization) { + const keyOptions = { + app_key: "KlZ4LqOF", + app_secret: "HoBJTYXdwn" + }; + const _0x3aaf0a = { + t: Math.floor(new Date().getTime() / 1000), + n: this.getUUID(), + ...keyOptions + }; + const _0x419328 = Object.values(_0x3aaf0a).join(""); + + const sign = this.stringToLowerCase(this.stringToLowerCase(_0x419328)).split("").reverse().join(""); + const header = { + 'Connection': 'keep-alive', + 'content-type': 'application/json', + 'uuid': options.uuid, + 'platform_version_code': 'iOS 16.6', + 'authorization': authorization, // + 'tenancy_id': 'banu', + 'app_key': 'KlZ4LqOF', + 'code': 'f22b68d1c74c3a66aa7a1b199bcd4e20', // + 'platform_version_name': 'iPhone 11', + 'platform_version_weapp': '8.0.50', + 't': _0x3aaf0a.t, + 'n': _0x3aaf0a.n, + 'platform_version_sdk': '3.5.8', + 'sign': sign, + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.50(0x1800323d) NetType/4G Language/zh_CN', + 'Referer': 'https://servicewechat.com/wx71373698c47f9a9f/474/page-frame.html' + } + + if (_0x32d686) { + const _0xa2075e = new URLSearchParams({ + ...options, + enc_data: _0x32d686 + }).toString(); + const code = this.stringToLowerCase(this.stringToLowerCase(_0xa2075e)).split("").reverse().join(""); + header.code = code; + } + return header; + } + stringToLowerCase(str) { + return crypto.MD5(str).toString().toLowerCase(); + } + decrypt(_0x3c73c4) { + const _0x3218f0 = crypto.lib.WordArray.random(16).toString(); + const _0x30b65e = JSON.stringify(_0x3c73c4); + const _0x429ee1 = crypto.AES.encrypt(_0x30b65e, crypto.enc.Utf8.parse(key), { + iv: crypto.enc.Utf8.parse(_0x3218f0), + mode: crypto.mode.CBC + }).toString(); + return crypto.enc.Base64.stringify(crypto.enc.Utf8.parse(JSON.stringify({ + iv: _0x3218f0, + encrypted_data: _0x429ee1 + }))); + } + async getcode() { + + let options = { + url: `${wxcenter}/api/Wxapp/JSLogin`, + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', + data: { "Wxid": "" + this.wxid, "Appid": "" + appid } + } + let { data: result } = await this.request(options); + + + + + if (result.Success) { + let code = result.Data.code + $.log(`账号[${this.wxid}] 获取code成功[${code}]`); + let { member_id: memberId, openid: authorization } = await this.login(code) + const headerObj = {}; + const data = { + member_id: memberId + }; + try { + headerObj.uuid = this.getUUID(); + const res = await axios.get("https://cloud.banu.cn/api/sign-in/days", { + params: data, + headers: this.getHeaders(headerObj, false, authorization) + }); + if (res.data.data.is_sign_in) { + $.log(`账号[${this.wxid}] 重复签到`); + } else { + const decryptData = this.decrypt(data); + const res = await axios.post("https://cloud.banu.cn/api/sign-in", { + enc_data: decryptData + }, { + headers: this.getHeaders(headerObj, decryptData, authorization) + }); + $.log("签到:" + res.data.message); + } + const info = await axios.get("https://cloud.banu.cn/api/member/statistic", { + params: data, + headers: this.getHeaders(headerObj, false, authorization) + }); + const result = "\nMember_id:" + memberId + "\n用户名:" + info.data.data.name + "\n总积分:" + info.data.data.points; + $.log(result); + + } catch (err) { + + $.log("签到失败:" + err + " | 签到时间:" + Date.now()); + } + } else { + console.log(result); + } + + + + + } + async login(code) { + let url = 'https://cloud.banu.cn/api/wx/weapp/auth'; + let data = { + 'app_id': 'wx71373698c47f9a9f', + 'code': code + } + const headerObj = {}; + headerObj.uuid = this.getUUID(); + let headers = this.getHeaders(headerObj, false, ""); + + let { data: res } = await this.request({ + url, + method: "POST", + headers, + data + }) + return res.data; + } + async run() { + if (!wxcenter) return $.log(`请填写wxcenter`) + + await this.getcode() + + + + } +} + + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + // + + await new Task(user).run(); + + } + + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await new Public().request(options); + $.log(res) + return res +} + + +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done(t = {}) { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} \ No newline at end of file diff --git a/wxapp/kangshifu.js b/wxapp/kangshifu.js new file mode 100644 index 0000000..bb24b14 --- /dev/null +++ b/wxapp/kangshifu.js @@ -0,0 +1,291 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 康师傅 +cron: 12 12 * * * +------------------------------------------ +#Notice: 只适用于购买了luflytoken的 购买联系QQ860562056 +变量wxcenter 填写自己部署的wxxcenter的域名, +变量wxid_ksf 在程序内登录的wxid 多账号&分割或者换行 + +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("康师傅"); +let ckName = `wxid_ksf`; +const strSplitor = "#"; +const envSplitor = ["&", "\n"]; +const notify = $.isNode() ? require("../sendNotify") : ""; +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" +let wxcenter = process.env.wxcenter || "" +let appid = 'wx54f3e6a00f7973a7' +class Public { + async request(options) { + return await axios.request(options); + } +} +class Task extends Public { + constructor(env) { + + super(); + this.index = $.userIdx++ + let user = env.split(strSplitor); + this.wxid = user[0]; + this.passwd = user[1]; + } + + async getcode() { + let options = { + url: `${wxcenter}/api/Wxapp/JSLogin`, + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', + data: { "Wxid": "" + this.wxid, "Appid": "" + appid } + } + let { data: result } = await this.request(options); + if (result.Success) { + let code = result.Data.code + $.log(`账号[${this.index}]【${this.name}】 获取code成功[${code}]`); + await this.login(code) + } else { + console.log(result); + } + + + } + async login(code) { + let options = { + url: `https://nclub.gdshcm.com/pro/whale-member/api/login/login`, + headers: { + 'Content-Type': 'application/json' + }, + method: 'POST', + data: { "code": "" + code, "inviterId": "", "inviterType": 1, "inviterMatchUserId": "", "spUrl": null } + } + let { data: result } = await this.request(options); + if (result.code == 0) { + let token = result.data.token + $.log(`账号[${this.index}]【${this.name}】 登录成功`); + await this.signIn(token) + } else { + console.log(result); + + } + + } + async signIn(token) { + let options = { + url: ` https://club.biqr.cn/api/signIn/integralSignIn`, + headers: { + 'Content-Type': 'application/json', + 'token': "" + token + }, + method: 'POST', + data: {} + } + let { data: result } = await this.request(options); + if (result.code == 0) { + $.log(`账号[${this.index}]【${this.name}】 签到成功`); + } else { + console.log(result); + + } + + + + + } + async run() { + if (!wxcenter) $.log(`请填写wxcenter`) + await this.getcode() + } +} + + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + // + + await new Task(user).run(); + + } + + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await new Public().request(options); + $.log(res) + return res +} + + +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done(t = {}) { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} \ No newline at end of file diff --git a/wxapp/miaoyouHome.js b/wxapp/miaoyouHome.js new file mode 100644 index 0000000..d403a0e --- /dev/null +++ b/wxapp/miaoyouHome.js @@ -0,0 +1,476 @@ +/** + * cron 48 17 * * * miaoyouHome.js + * Show:微信公众号 庙友之家 每日签到 积分可换首饰 + * 变量名:miaoyouHome + * 变量值:http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm 公众号 左下角 每日签到 链接里面的headers 中的 COOKIE + * JSESSIONID= 的值 的值 的值 多账户@或换行 + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("wx_庙友之家"); +const notify = $.isNode() ? require('../sendNotify') : ''; +let ckName = "miaoyouHome"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + //定义在这里的headers会被get请求删掉content-type 而不会重置 + } + async main() { + await this.task(); + await this.userInfo() + } + async task() { + try { + let options = { + fn: "签到", + method: "post", + url: `http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm/lotteryController/extractMemberAwards`, + headers: { + "Connection": "keep-alive", + //"Content-Length": "2", + "Accept": "application/json, text/plain, */*", + "X-Requested-With": "XMLHttpRequest", + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", + "Content-Type": "application/json;charset=UTF-8", + "Origin": "http://www.jumpingcarp.cn", + "Referer": "http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm/index.html", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": "JSESSIONID=" + this.ck + }, + body: JSON.stringify({}) + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + console.log(result); + + } catch (e) { + console.log(e); + } + } + async userInfo() { + try { + let options = { + fn: "我的积分", + method: "post", + url: `http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm/memberController/showMemberInfo`, + headers: { + "Connection": "keep-alive", + //"Content-Length": "2", + "Accept": "application/json, text/plain, */*", + "X-Requested-With": "XMLHttpRequest", + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", + "Content-Type": "application/json;charset=UTF-8", + "Origin": "http://www.jumpingcarp.cn", + "Referer": "http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm/index.html", + "Accept-Encoding": "gzip, deflate", + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Cookie": "JSESSIONID=" + this.ck + }, + body: JSON.stringify({}) + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if(result.code == 200){ + $.log(`当前积分[${result.data.pointsBalance}]`) + }else { + console.log(result); + } + + } catch (e) { + console.log(e); + } + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await $.SendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + getScript(t) { + return new Promise((s) => { + this.get({ url: t }, (t, e, i) => s(i)); + }); + } + runScript(t, s) { + return new Promise((e) => { + let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); + i = i ? i.replace(/\n/g, "").trim() : i; + let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); + (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); + const [h, a] = i.split("@"), + r = { + url: `http://${a}/v1/scripting/evaluate`, + body: { script_text: t, mock_type: "cron", timeout: o }, + headers: { "X-Key": h, Accept: "*/*" }, + }; + this.post(r, (t, s, i) => e(i)); + }).catch((t) => this.logErr(t)); + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + isJSONString(str) { + try { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async SendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + const t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase() + if (t.method.toLowerCase() === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t["body"] + } + if (t.method.toLowerCase() === 'post') { + let contentType + + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + contentType = 'application/json' + } else { + contentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body) + contentType = 'application/json' + } + } + if (!t.headers['Content-Type']) { + t.headers['Content-Type'] = contentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t) + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ), + this.log(), + (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t); + } + })(t, s); +} diff --git a/wxapp/ppmt.js b/wxapp/ppmt.js new file mode 100644 index 0000000..f7160a8 --- /dev/null +++ b/wxapp/ppmt.js @@ -0,0 +1,334 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 微信小程序泡泡玛特 +------------------------------------------ +抓user_id和openid和 分别在请求头和请求参数里面 用#连接 多账号&或换行 分开 或新建同名变量 +https://popvip.paquapp.com/miniapp/v2/wechat/getUserInfo/ +[Script] +http-response + +[MITM] +hostname = + +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("微信小程序泡泡玛特"); +let ckName = `paopaomate` +let userCookie = checkEnv($.isNode() ? process.env[ckName] : ""); +const notify = $.isNode() ? require("../sendNotify") : ""; + + + +!(async () => { + console.log( + `==================================================\n 脚本执行 - 北京时间(UTC+8): ${new Date( + new Date().getTime() + + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000 + ).toLocaleString()} \n==================================================` + ); + //console.log(userCookie) + if (!userCookie?.length) return console.log(`没有找到CK哦`) + let index = 0; + let strSplitor = "#"; + + for (let user of userCookie) { + $.log(`\n🚀 user:【${index || ++index}】 start work\n`) + $.id = user.split(strSplitor)[0] + $.openid = user.split(strSplitor)[1] + $.ckStatus = false + await UserInfo($.id, $.openid) + if ($.ckStatus) { + await SignIn($.openid) + } + + } + + await $.sendMsg($.logs.join("\n")); +})().catch((e) => console.log(e)).finally(() => $.done()); +function base64Encode(data) { + const buffer = Buffer.from(data); + return buffer.toString('base64'); +} +function getSign(t, e, n) { + function md5(data) { + const crypto = require('crypto'); + return crypto.createHash('md5').update(data).digest('hex'); + } + function d(t, e, n) { + var o = {}; + Object.keys(t).sort().forEach((function (n) { + o[n] = "POST" === e ? t[n] : t[n].toString() + } + )), + o.version = "5.0.34"; + var s = (new Date).getTime().toString() + , c = JSON.stringify(o) + "PopMartminiApp1117" + s + , u = md5(c); + return t.sign = n ? md5(base64Encode(u + "PopMartminiApp0314")) : u, + t.time = s, + t.version = "5.0.34", + t + } + + return d(t, e, n) +} +async function SignIn() { + let { sign: sign, time: time, version: version } = getSign({ + openid: $.openid + }, 'GET', false) + let { data: result } = await Request({ + method: 'GET', + url: 'https://popvip.paquapp.com/miniapp/v2/sign_in/everySignDay/?openid=' + $.openid + '&sign=' + sign + '&time=' + time + '&version=' + version, + headers: { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', + 'Accept-Encoding': 'gzip,compress,br,deflate', + 'identity_code': $.openid, + 'charset': 'utf-8', + 'content-type': 'application/x-www-form-urlencoded;charset=utf-8', + 'Referer': 'https://servicewechat.com/wx9627eb7f4b1c69d5/638/page-frame.html' + } + }) + result?.code == 1 ? $.log(`签到状态:${result.data.sign}`) : "" +} +async function UserInfo() { + let { sign: sign, time: time, version: version } = getSign({ + user_id: $.id + }, 'GET', false) + let { data: result } = await Request({ + method: 'GET', + url: 'https://popvip.paquapp.com/miniapp/v2/wechat/getUserInfo/?user_id=' + $.id + '&sign=' + sign + '&time=' + time + '&version=' + version, + headers: { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220067 MMWEBSDK/20240404 MMWEBID/8150 MicroMessenger/8.0.49.2600(0x28003156) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', + 'Accept-Encoding': 'gzip,compress,br,deflate', + 'identity_code': $.openid, + 'charset': 'utf-8', + 'content-type': 'application/x-www-form-urlencoded;charset=utf-8', + 'Referer': 'https://servicewechat.com/wx9627eb7f4b1c69d5/638/page-frame.html' + } + }) + result?.code == 1 ? ($.log(`${result.data.nickname} 积分【${result.data.points}】`), $.ckStatus = true) : $.ckStatus = false +} + +function checkEnv(userCookie) { + const envSplitor = ["&", "\n"]; + let userList = userCookie.split(envSplitor.find(o => userCookie.includes(o)) || "&").filter(n => n); + console.log(`共找到${userList.length}个账号`); + return userList; +} +//Env Api ============================= +/* + * @modifyAuthor @smallfawn + * @modifyTime 2024-05-01 + * @modifyInfo 抽离操作文件的函数 + */ +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); +} + +async function Request(options) { + if ($.isNode()) { + const axios = require("axios"); + Request = async (options) => { + try { + return await axios.request(options); + } catch (error) { + throw error && error.error ? error.error : "请求失败"; + } + }; + } + if ($.isQuanX()) { + Request = async (options) => { + try { + return await $task.fetch(options); + } catch (error) { + throw error && error.error ? error.error : "请求失败"; + } + }; + } + return await Request(options) +} diff --git a/wxapp/qfxsh.js b/wxapp/qfxsh.js new file mode 100644 index 0000000..4e1cc79 --- /dev/null +++ b/wxapp/qfxsh.js @@ -0,0 +1,1468 @@ +/* +地址: + +#小程序://起飞线/x8h0xqNEoODRlyg + +复制以上 微信打开 + +点击我的并抓包, +抓取https://cluster.qifeixian.com/api/user/v1/center/info,此链接请求头的x-ds-key和返回报文体中的id +变量export qfxhd='x-ds-key&id' +多账号@隔开 +export qfxhd='x-ds-key&id@x-ds-key&id' +*/ +// corn 0 */3 * * * + +const $ = new Env('起飞线生活'); +const axios = require('axios'); +let request = require("request"); +request = request.defaults({ + jar: true +}); +const { + log +} = console; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const debug = 0; //0为关闭调试,1为打开调试,默认为0 +let qfxhd = ($.isNode() ? process.env.qfxhd : $.getdata("qfxhd")) || "" +let qfxhdArr = []; +let data = ''; +let msg = ''; +var hours = new Date().getMonth(); +var timestamp = Math.round(new Date().getTime()).toString(); +//---------------------- 自定义变量区域 ----------------------------------- +let host = 'cluster.qifeixian.com' +let userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.42(0x18002a29) NetType/WIFI Language/zh_CN' +let xdPort = '1380' +let baseVersion = '3.1.2' +let version = '5.0.13' +let connection = 'keep-alive' +let contentType = 'application/json' +let acceptEncoding = 'gzip,compress,br,deflate' +let referer = 'https://servicewechat.com/wx3c0d10f34c013209/258/page-frame.html' +//----------------------------------------------------------------------- +!(async () => { + if (typeof $request !== "undefined") { + await GetRewrite(); + } else { + if (!(await Envs())) + return; + else { + + addNotifyStr(`\n\n============================================= \n脚本执行 - 北京时间(UTC+8):${new Date( + new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000).toLocaleString()} \n=============================================\n`); + + + + addNotifyStr(`\n=================== 共找到 ${qfxhdArr.length} 个账号 ===================`) + if (debug) { + log(`【debug】 这是你的全部账号数组:\n ${qfxhdArr}`); + } + for (let index = 0; index < qfxhdArr.length; index++) { + + let num = index + 1 + addNotifyStr(`\n==== 开始【第 ${num} 个账号】====\n`, true) + + qfx = qfxhdArr[index]; + qfxhd = qfx.split('&')[0]; + // log("00:" + qfxhd); + userId = qfx.split('&')[1]; + // log("11:" + userId); + restoken = qfxhd.match(/\.(.*?)\./)[1] + restoken = JSON.parse(Buffer.from(restoken, 'base64').toString('utf8')) + restoken = restoken.data.refreshToken + await refreshTokens() + await info() + // await list() + await share_bk() + await share_mall() + await invite_friends() + await lottery() + await first() + await water() + } + await SendMsg(msg); + } + } +})() + .catch((e) => log(e)) + .finally(() => $.done()) +async function refreshTokens() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/user/v1/public/token', + headers: { + Host: host, + Connection: connection, + 'user-agent': userAgent, + 'Content-Type': contentType, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: { + refresh_token: restoken + } + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.code = 10000) { + newtoken = data.data.access_token + addNotifyStr('刷新token:' + newtoken) + } else + addNotifyStr(data.msg) + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//每日抽奖 +async function lottery() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/lottery', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.code = 10000) { + addNotifyStr(data.data.data.prize.prizeLevel.desc) + addNotifyStr(data.data.data.prize.prizeLevel.name) + addNotifyStr(data.data.data.prize.desc) + winid = data.data.data['winner_id'] + addNotifyStr(data.data.msg) + await winning() + } else + addNotifyStr(data.msg) + + } catch (e) { + addNotifyStr(`${data.data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//抽奖结果 +async function winning() { + return new Promise((resolve) => { + + var options = { + method: 'GET', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/winning-records/' + winid, + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.prizeExt) { + addNotifyStr(data.data.prizeExt.name + ' ' + data.data.sendType.name + ' ' + data.data.status.name) + + } else + addNotifyStr(data.data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//个人信息 +async function info() { + return new Promise((resolve) => { + + var options = { + method: 'GET', + url: 'https://cluster.qifeixian.com/api/wallet/v1/member/account/info', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data) { + addNotifyStr('money:' + data.data.money + ' score:' + data.data.score) + + } else + addNotifyStr(data.data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//邀请好友 +async function invite_friends() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/resouces/record', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: { "type": "invite_friends", "userId": userId } + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.data.status == false) { + addNotifyStr('未种树 先给你种个葡萄吧') + + } else + addNotifyStr(data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +async function list() { + return new Promise((resolve) => { + + var options = { + method: 'GET', + url: 'https://cluster.qifeixian.com/api/goods/v1/goods/list?gcId=&page=1&page_size=10&name=', + headers: { + Host: 'cluster.qifeixian.com', + Connection: 'keep-alive', + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': 'application/json', + 'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.42(0x18002a29) NetType/WIFI Language/zh_CN', + 'x-ds-port': '1380', + 'base-version': '3.1.2', + version: '5.0.13', + Accept: '*/*', + Referer: 'https://servicewechat.com/wx3c0d10f34c013209/258/page-frame.html', + 'Accept-Encoding': 'gzip,compress,br,deflate' + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(function (response) { + try { + var data = response.data; + log(data); + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data) { + log('商品编号goods_id:' + data.data.list[0].goods_id) + } else + log(data.data.msg) + + } catch (e) { + log(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//分享爆款商品 +async function share_bk() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/resouces/record', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: { "type": "share_bk", "userId": userId } + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.data.status == false) { + addNotifyStr('未种树 先给你种个葡萄吧') + + } else + addNotifyStr(data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//分享商城商品 +async function share_mall() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/resouces/record', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: { "type": "share_mall", "userId": userId } + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.data.status == false) { + addNotifyStr('未种树 先给你种个葡萄吧') + + } else + addNotifyStr("00000" + data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//每日登录 +async function first() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/orchard/first', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.data.status == false) { + addNotifyStr('未种树 先给你种个葡萄吧') + await orchard() + await details() + } else + await details() + + } catch (e) { + log(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//种植果树 +async function orchard() { + return new Promise((resolve) => { + + var options = { + method: 'POST', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/orchard/task', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: { "tree_id": 9 } + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.code = 10000) { + + addNotifyStr('种树成功') + } else + addNotifyStr(data.data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//详情 +async function details() { + return new Promise((resolve) => { + + var options = { + method: 'GET', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/orchard/details', + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(async function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + // log(data) + if (data.data.code = 10000) { + tsid = data.data.data.basisinfo['ts_id'] + + tasks = data.data.data.task.daily + + + addNotifyStr(tasks['is_lucky_draw']['task_name'] + ':') + await task_water(tasks['is_lucky_draw']['task_id']) + + addNotifyStr(tasks['is_landing']['task_name'] + ':') + await task_water(tasks['is_landing']['task_id']) + + addNotifyStr(tasks['is_invitation']['task_name'] + ':') + await task_water(tasks['is_invitation']['task_id']) + + addNotifyStr(tasks['is_share']['task_name'] + ':') + await task_water(tasks['is_share']['task_id']) + + addNotifyStr(tasks['is_bk']['task_name'] + ':') + await task_water(tasks['is_bk']['task_id']) + + addNotifyStr(tasks['is_cancel_after_verification_bk']['task_name'] + ':') + await task_water(tasks['is_cancel_after_verification_bk']['task_id']) + + addNotifyStr(tasks['is_consumption']['task_name'] + ':') + await task_water(tasks['is_consumption']['task_id']) + + addNotifyStr(tasks['is_registered']['task_name'] + ':') + await task_water(tasks['is_registered']['task_id']) + + addNotifyStr(tasks['is_registered']['task_name'] + ':') + await task_water(tasks['is_registered']['task_id']) + taskss = data.data.data.task.will + + addNotifyStr(taskss['is_personal_data']['task_name'] + ':') + await task_water(taskss['is_personal_data']['task_id']) + } else + addNotifyStr(data.data.msg) + + } catch (e) { + log(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//领取奖励 +async function task_water(task_id) { + return new Promise((resolve) => { + + var options = { + method: 'GET', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/orchard/task_water', + params: { ts_id: tsid, task_id: task_id }, + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.code = 10000) { + + addNotifyStr(data.data.msg) + } else + addNotifyStr(data.data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} +//浇水 +async function water() { + return new Promise((resolve) => { + + var options = { + method: 'GET', + url: 'https://cluster.qifeixian.com/api/activity-center/v1/orchard/water/' + tsid, + + headers: { + Host: host, + Connection: connection, + 'x-ds-key': newtoken, + Authorization: 'Basic ' + newtoken, + 'Content-Type': contentType, + 'user-agent': userAgent, + 'x-ds-port': xdPort, + 'base-version': baseVersion, + version: version, + Accept: '*/*', + Referer: referer, + 'Accept-Encoding': acceptEncoding + }, + data: {} + }; + if (debug) { + log(`\n【debug】=============== 这是 请求 url ===============`); + log(JSON.stringify(options)); + } + axios.request(options).then(function (response) { + try { + var data = response.data; + if (debug) { + log(`\n\n【debug】===============这是 返回data==============`); + log(data) + } + if (data.data.code = 10000) { + + addNotifyStr(data.data.msg) + } else + addNotifyStr(data.data.msg) + + } catch (e) { + addNotifyStr(`异常:${data},原因:${data.msg}`) + } + }).catch(function (error) { + console.error(error); + }).then(res => { + //这里处理正确返回 + resolve(); + }); + }) + +} + + + + + + + + +async function Envs() { + if (qfxhd) { + if (qfxhd.indexOf("@") != -1) { + qfxhd.split("@").forEach((item) => { + + qfxhdArr.push(item); + }); + } else if (qfxhd.indexOf("\n") != -1) { + qfxhd.split("\n").forEach((item) => { + qfxhdArr.push(item); + }); + } else { + qfxhdArr.push(qfxhd); + } + } else { + addNotifyStr(`\n 【${$.name}】:未填写变量 qfxhd`) + return; + } + + return true; +} + +function md5(inputString) { + var hc = "0123456789abcdef"; + + function rh(n) { + var j, s = ""; + for (j = 0; j <= 3; j++) s += hc.charAt((n >> (j * 8 + 4)) & 0x0F) + hc.charAt((n >> (j * 8)) & 0x0F); + return s; + } + + function ad(x, y) { + var l = (x & 0xFFFF) + (y & 0xFFFF); + var m = (x >> 16) + (y >> 16) + (l >> 16); + return (m << 16) | (l & 0xFFFF); + } + + function rl(n, c) { + return (n << c) | (n >>> (32 - c)); + } + + function cm(q, a, b, x, s, t) { + return ad(rl(ad(ad(a, q), ad(x, t)), s), b); + } + + function ff(a, b, c, d, x, s, t) { + return cm((b & c) | ((~b) & d), a, b, x, s, t); + } + + function gg(a, b, c, d, x, s, t) { + return cm((b & d) | (c & (~d)), a, b, x, s, t); + } + + function hh(a, b, c, d, x, s, t) { + return cm(b ^ c ^ d, a, b, x, s, t); + } + + function ii(a, b, c, d, x, s, t) { + return cm(c ^ (b | (~d)), a, b, x, s, t); + } + + function sb(x) { + var i; + var nblk = ((x.length + 8) >> 6) + 1; + var blks = new Array(nblk * 16); + for (i = 0; i < nblk * 16; i++) blks[i] = 0; + for (i = 0; i < x.length; i++) blks[i >> 2] |= x.charCodeAt(i) << ((i % 4) * 8); + blks[i >> 2] |= 0x80 << ((i % 4) * 8); + blks[nblk * 16 - 2] = x.length * 8; + return blks; + } + + var i, x = sb(inputString), + a = 1732584193, + b = -271733879, + c = -1732584194, + d = 271733878, + olda, oldb, oldc, oldd; + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + a = ff(a, b, c, d, x[i + 0], 7, -680876936); + d = ff(d, a, b, c, x[i + 1], 12, -389564586); + c = ff(c, d, a, b, x[i + 2], 17, 606105819); + b = ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = ff(a, b, c, d, x[i + 4], 7, -176418897); + d = ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = ff(b, c, d, a, x[i + 7], 22, -45705983); + a = ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = ff(c, d, a, b, x[i + 10], 17, -42063); + b = ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = ff(d, a, b, c, x[i + 13], 12, -40341101); + c = ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = gg(a, b, c, d, x[i + 1], 5, -165796510); + d = gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = gg(c, d, a, b, x[i + 11], 14, 643717713); + b = gg(b, c, d, a, x[i + 0], 20, -373897302); + a = gg(a, b, c, d, x[i + 5], 5, -701558691); + d = gg(d, a, b, c, x[i + 10], 9, 38016083); + c = gg(c, d, a, b, x[i + 15], 14, -660478335); + b = gg(b, c, d, a, x[i + 4], 20, -405537848); + a = gg(a, b, c, d, x[i + 9], 5, 568446438); + d = gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = gg(c, d, a, b, x[i + 3], 14, -187363961); + b = gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = gg(d, a, b, c, x[i + 2], 9, -51403784); + c = gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = hh(a, b, c, d, x[i + 5], 4, -378558); + d = hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = hh(b, c, d, a, x[i + 14], 23, -35309556); + a = hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = hh(c, d, a, b, x[i + 7], 16, -155497632); + b = hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = hh(a, b, c, d, x[i + 13], 4, 681279174); + d = hh(d, a, b, c, x[i + 0], 11, -358537222); + c = hh(c, d, a, b, x[i + 3], 16, -722521979); + b = hh(b, c, d, a, x[i + 6], 23, 76029189); + a = hh(a, b, c, d, x[i + 9], 4, -640364487); + d = hh(d, a, b, c, x[i + 12], 11, -421815835); + c = hh(c, d, a, b, x[i + 15], 16, 530742520); + b = hh(b, c, d, a, x[i + 2], 23, -995338651); + a = ii(a, b, c, d, x[i + 0], 6, -198630844); + d = ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = ii(b, c, d, a, x[i + 5], 21, -57434055); + a = ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = ii(c, d, a, b, x[i + 10], 15, -1051523); + b = ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = ii(d, a, b, c, x[i + 15], 10, -30611744); + c = ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = ii(a, b, c, d, x[i + 4], 6, -145523070); + d = ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = ii(c, d, a, b, x[i + 2], 15, 718787259); + b = ii(b, c, d, a, x[i + 9], 21, -343485551); + a = ad(a, olda); + b = ad(b, oldb); + c = ad(c, oldc); + d = ad(d, oldd); + } + return rh(a) + rh(b) + rh(c) + rh(d); +} + +/** + * 添加消息 + * @param str + * @param is_log + */ +function addNotifyStr(str, is_log = true) { + if (is_log) { + log(`${str}\n`) + } + msg += `${str}\n` +} + +// ============================================发送消息============================================ \\ +async function SendMsg(message) { + if (!message) + return; + + if (Notify > 0) { + if ($.isNode()) { + var notify = require('../sendNotify'); + await notify.sendNotify($.name, message); + } else { + $.msg(message); + } + } else { + log(message); + } +} + +/** + * 随机延时1-30s,避免大家运行时间一样 + * @returns {*|number} + */ +function delay() { + let time = parseInt(Math.random() * 100000); + if (time > 30000) { // 大于30s重新生成 + return delay(); + } else { + console.log('随机延时:', `${time}ms, 避免大家运行时间一样`) + return time; // 小于30s,返回 + } +} + +/** + * 随机数生成 + */ +function randomString(e) { + e = e || 32; + var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", + a = t.length, + n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} + +/** + * 随机整数生成 + */ +function randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min) +} + +/** + * 获取毫秒时间戳 + */ +function timestampMs() { + return new Date().getTime(); +} + +/** + * 获取秒时间戳 + */ +function timestampS() { + return Date.parse(new Date()) / 1000; +} + +function randomStrings(e) { + e = e || 32; + let t = "abcdefhijkmnprstwxyz2345678", + a = t.length, + n = ""; + for (i = 0; i < e; i++) + n += t.charAt(Math.floor(Math.random() * a)); + return n +} +/** + * + * 示例:$.time('yyyy-MM-dd qq HH:mm:ss.S') + * :$.time('yyyyMMddHHmmssS') + * y:年 M:月 d:日 q:季 H:时 m:分 s:秒 S:毫秒 + * 其中y可选0-4位占位符、S可选0-1位占位符,其余可选0-2位占位符 + * @param {string} fmt 格式化参数 + * @param {number} 可选: 根据指定时间戳返回格式化日期 + * + */ +function time(fmt, ts = null) { + const date = ts ? new Date(ts) : new Date(); + let o = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'H+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + 'q+': Math.floor((date.getMonth() + 3) / 3), + S: date.getMilliseconds(), + }; + if (/(y+)/.test(fmt)) + fmt = fmt.replace( + RegExp.$1, + (date.getFullYear() + '').substr(4 - RegExp.$1.length) + ); + for (let k in o) + if (new RegExp('(' + k + ')').test(fmt)) + fmt = fmt.replace( + RegExp.$1, + RegExp.$1.length == 1 ? + o[k] : + ('00' + o[k]).substr(('' + o[k]).length) + ); + return fmt; +} + +/** + * 修改配置文件 + */ + + + + +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) +} diff --git a/wxapp/quanmianshidai.py b/wxapp/quanmianshidai.py new file mode 100644 index 0000000..bfd3880 --- /dev/null +++ b/wxapp/quanmianshidai.py @@ -0,0 +1,838 @@ + +""" +项目 全棉时代种棉花 +入口 #小程序://全棉时代 +变量 code #token#备注 多账号换行 +变量名 qmzmh + + +""" + +import os +import requests +from datetime import datetime, timezone, timedelta +import json +import time +import random + + +# 配置参数 +base_url = "https://hxxxy.gov.cn" +user_agent = "Mozilla/5.0 (Linux; Android 11; ONEPLUS A6000 Build/RKQ1.201217.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 XWEB/1160065 MMWEBSDK/20231201 MMWEBID/2930 MicroMessenger/8.0.45.2521(0x28002D3D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxdfcaa44b1aa891a7" + +def get_beijing_date(): + beijing_time = datetime.now(timezone(timedelta(hours=8))) + return beijing_time.date() + +def dq_time(): + dqsj = int(time.time()) + dysj = datetime.fromtimestamp(dqsj).strftime('%Y-%m-%d %H:%M:%S') + print("当前时间戳:", dqsj) + print("转换后的时间:", dysj) + return dqsj, dysj + +def get_env_variable(var_name): + value = os.getenv(var_name) + if value is None: + print(f'环境变量{var_name}未设置,请检查。') + return None + accounts = value.strip().split('\n') + print(f'-----------本次账号运行数量:{len(accounts)}-----------') + print(f'------全棉时代种棉花-----1.2------') + return accounts + +def create_headers(code, token): + headers = { + 'host': 'sg01.purcotton.com', + 'accept': 'application/json, text/plain, */*', + 'app-id': 'wxdfcaa44b1aa891a7', + 'user-agent': user_agent, + 'content-type': 'application/json;charset=UTF-8', + 'origin': 'https://sg01.purcotton.com', + 'x-requested-with': 'com.tencent.mm', + 'sec-fetch-site': 'same-origin', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'accept-encoding': 'gzip, deflate', + 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + 'cookie': 'sajssdk_2015_cross_new_user=1', + 'code': code, + 'token': token, + } + return headers + + +def jscz(code, token): # 浇水 + # 调用hqid函数并获取树木ID及其他信息 + tree_id, sunshine, total_sunshine = hqid(code, token) + + if tree_id is not None: + #print(f"获得的树木ID: {tree_id}") + # 可以在这里打印阳光信息,如果需要 + #print(f"当前阳光: {sunshine}, 总阳光: {total_sunshine}") + + while True: # 开始一个无限循环 + url = "https://sg01.purcotton.com/api/watering" + data = {"tree_user_id": tree_id, "water_cnt": 1} # 使用动态获取的树木ID + headers = create_headers(code, token) + #print(data) + try: + response = requests.post(url, headers=headers, json=data) + response.raise_for_status() + response_data = response.json() + + if response_data.get("code") == 200: + # 提取剩余水滴数 + remaining_water = response_data["data"]["info"]["sy_water"] + print(f"剩余水滴数: {remaining_water}") + + # 根据剩余水滴数决定是否继续 + if remaining_water < 30: # 如果剩余水滴数小于30,则停止 + print("水滴不足,停止浇水。") + break + + print("执行浇水操作...") + # 暂停1到3秒 + time.sleep(random.randint(1, 3)) + + elif response_data.get("code") == 400: + print(response_data.get("msg", "未知错误")) + break # 遇到错误时停止循环 + else: + print("未知的响应code:", response_data.get("code")) + print("完整响应:", response_data) + break # 如果响应码不是200或400,停止循环 + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + break # 请求异常时停止循环 + else: + print("未能获取树木ID,无法执行浇水操作。") + + +def llhmp(code, token, action, tid): # 添加了tid参数 + phone, _ = login(code, token) # 调用login函数,获取电话号码,忽略user_id + + url = "https://nmp.pureh2b.com/api/purcotton/completetask" + headers = { + 'Host': 'nmp.pureh2b.com', + 'XWeb-Xhr': '1', + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'zh-CN,zh;q=0.9', + 'code': code, + 'token': token, + } + data = { + 'action': action, + 'phone': phone, + 'from': 'guoyuan' + } + #print(data) + + try: + response = requests.post(url, headers=headers, data=data) + response.raise_for_status() + response_data = response.json() # 解析响应数据为JSON + + action_descriptions = { + 'browse_venue': '逛甄选好棉品', + 'browse_new_user_zone': '浏览新用户专区', + 'browse_community': '社区送福利', + 'subscibe': '订阅奖励提醒' + + } + action_description = action_descriptions.get(action, '执行任务') + + #print(f"执行任务 '{action_description}' 响应内容:", response.text) # 打印响应内容 + + if response_data.get("code") == 200: + print(f"{action_description} 任务成功,暂停一段时间再继续...") + time.sleep(random.randint(15, 20)) + tjlq_mpjl(code, token, tid) # 在任务成功后调用领取奖励的函数 + elif response_data.get("code") == 400: + #print() # 打印响应内容 + print(f"{action_description} :{response_data.get('msg')}") + #tjlq_mpjl(code, token, tid) # 在任务成功后调用领取奖励的函数 + else: + print("{action_description} 收到未预期的响应,响应内容如下:") + print(response_data) + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + +def tjlq_mpjl(code, token, tid): # 添加了tid参数来指定任务ID 提交 任务 领取奖励 + url = "https://sg01.purcotton.com/api/task/receive-task-water" + headers = create_headers(code, token) + data = {"tid": tid} # 使用传入的任务ID + #print(data) + try: + response = requests.post(url, headers=headers, json=data) # 发送POST请求 + response.raise_for_status() # 检查响应状态码 + + # 解析响应数据 + response_data = response.json() + if response_data.get("code") == 200: + print("奖励领取成功。") + # 打印sy_water和get_water + data = response_data.get("data", {}) + sy_water = data.get("sy_water", "未知") # + get_water = data.get("get_water", "未知") # 同上 + print(f"剩余水量:{sy_water}, 获取水量:{get_water}") + else: + print(f"奖励领取失败,错误信息:{response_data.get('msg')}") + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + +def task_list(code, token): # 任务列表 + url = "https://sg01.purcotton.com/api/task/list" + headers = create_headers(code, token) + today_date = datetime.now().strftime("%Y-%m-%d") # 获取今天的日期,格式为YYYY-MM-DD + + # 任务ID到任务名称的映射 + task_names = { + 1: "签到, 1", + 2: "不知道1, 0", + 4: "三餐福袋, 3", + 6: "逛甄选好棉品, 4", + 10: "订阅奖励提醒, 1", + 13: "浏览新用户, 2", + 14: "庄园小课堂, 3", + 15: "棉花工厂, 1", + 16: "社区送福利, 1" + } + + try: + response = requests.get(url, headers=headers) + response.raise_for_status() + response_data = response.json() + today_tasks = [] # 用于存储今天的任务信息 + if response_data.get("code") == 200: + task_user_info = response_data.get("data", {}).get("task_user_info", []) + print("------任务进度条-----------") + for task in task_user_info: + task_id = task.get('task_id') + complete_num = task.get('complete_num') + complete_date = task.get('complete_date') + # 比较任务完成日期是否为今天 + #print("------任务进度条-----------") + if complete_date == today_date: + task_name = task_names.get(task_id, f"未知任务 {task_id}") # 获取任务名称,如果未知则显示未知任务和ID + + print(f"任务ID: {task_id} {task_name}/{complete_num}, 任务时间: {complete_date}") + #print(f"{task_name}/{complete_num} 时间: {complete_date}") + today_tasks.append(task) + print("-----------------") + print() + return today_tasks + + else: + print(f"获取任务列表失败,错误信息:{response_data.get('msg')}") + return [] + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + return [] + + + +def pdrw(code, token): # 判断任务 + """根据任务完成情况执行任务""" + try: + task_user_info = task_list(code, token) + + task_completion_limits = { + 6: 4,# 任务ID为6的任务只能完成4次 逛甄选好棉品 + 13: 2, # 任务ID为13的任务只能完成2次 浏览新用户专区 + 15: 1, # 假设任务ID为15的任务只能完成1次 棉花工厂 + 4: 3, # 4 3次三餐福袋 7-12 14-17 18-22 + 16: 1, # ID 16 社区送福利 + 10: 1, # ID 10 订阅奖励提醒 + 14: 1, #ID14 #庄园小课堂 + 1: 1, #ID #签到 + } + + # 先检查所有指定的任务是否已经存在于任务列表中 + existing_task_ids = [task['task_id'] for task in task_user_info] + #print(existing_task_ids) + # 遍历每个任务ID,检查是否需要执行任务 + for task_id, max_completes in task_completion_limits.items(): + task_info = next((task for task in task_user_info if task['task_id'] == task_id), None) + + if task_info: + complete_num = task_info['complete_num'] + if complete_num < max_completes: + #print(f"任务ID: {task_id}, 当前完成次数: {complete_num}, 将执行任务并尝试领取奖励。") + print() + if task_id == 6: + llhmp(code, token, 'browse_venue', '6') + #today_water(code, token) + elif task_id == 13: + llhmp(code, token, 'browse_new_user_zone', '13') + today_water(code, token) + sj_yg(code, token)#收集阳光 + syyg(code, token)#使用阳光 + # 这里可以添加其他任务ID的逻辑 + elif task_id == 15: + # 对于任务ID 15的特定处理 + complete_task(code, token, '15') + elif task_id == 16: + llhmp(code, token, 'browse_community', '16') + + elif task_id == 10: + llhmp(code, token, 'subscibe', '10') + elif task_id == 14: + hdwt_box(code, token, '14') + elif task_id == 4: + # 对于任务ID 15的特定处理 + lq_fd(code, token, '4') + + elif task_id == 1: + lq_fd(code, token, '1') + time.sleep(random.randint(1, 5)) + + + elif task_id not in existing_task_ids: + #print(f"任务ID: {task_id}, 未在列表中,将尝试执行并领取奖励。") + print() + if task_id == 6: + llhmp(code, token, 'browse_venue', '6') + today_water(code, token) + elif task_id == 13: + llhmp(code, token, 'browse_new_user_zone', '13') + sj_yg(code, token)#收集阳光 + syyg(code, token)#使用阳光 + elif task_id == 15: + complete_task(code, token, '15') + elif task_id == 16: + llhmp(code, token, 'browse_community', '16') + elif task_id == 10: + llhmp(code, token, 'subscibe', '10') + elif task_id == 14: + hdwt_box(code, token, '14') + elif task_id == 1: + lq_fd(code, token, '1') + + elif task_id == 4: + lq_fd(code, token, '4') + + + time.sleep(random.randint(1, 5)) + + + + + # 添加其他任务ID和类型的逻辑 + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + + + + + +# 任务 数据 +def complete_task(code, token, tid): # 棉花工厂 + url = "https://sg01.purcotton.com/api/task/complete-manual-task" + headers = create_headers(code, token) + payload = { + "tid": tid, + "relate_id": 0, + } + + try: + response = requests.post(url, headers=headers, json=payload) + response.raise_for_status() # 检查HTTP响应状态码,如果不是200系列,则抛出异常 + + # 解析响应数据 + response_data = response.json() + if response_data.get("code") == 200: + print("奖励领取成功。") + tjlq_mpjl(code, token, tid) + else: + # 如果响应中的code不是200,打印错误信息 + print(f"任务失败:{response_data.get('msg')}") + except requests.exceptions.RequestException as e: + # 如果请求过程中发生异常,打印异常信息 + print(f"请求失败: {e}") + + +def lq_fd(code, token, tid): # 三餐福袋和签到 + # 确保tid为整数类型 + tid = int(tid) # 将tid转换为整型以确保与整数进行比较 + + task_name = "未知任务" + if tid == 4: + task_name = "三餐福袋" #7-12 14-17 18-22 + elif tid == 1: + task_name = "签到" + + url = "https://sg01.purcotton.com/api/task/complete-task" + headers = create_headers(code, token) + data = {"tid": tid} # 使用传入的任务ID + try: + response = requests.post(url, headers=headers, json=data) + response.raise_for_status() # 检查响应状态码 + + # 解析响应数据 + response_data = response.json() + if response_data.get("code") == 200: + print(f"{task_name} 奖励领取成功。") + # 打印sy_water和get_water + data = response_data.get("data", {}) + sy_water = data.get("sy_water", "未知") + get_water = data.get("get_water", "未知") + print(f"{task_name} 剩余水量:{sy_water}, 获取水量:{get_water}") + else: + print(f"{task_name}:{response_data.get('msg')}") + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + +# 任务 完 + +# 提取数据 开始 + +def hqid(code, token): # 获取树木ID和阳光信息 + url = "https://sg01.purcotton.com/api/index" + + headers = create_headers(code, token) + + try: + response = requests.get(url, headers=headers) + response.raise_for_status() + + response_data = response.json() + # print("Response JSON:", response_data) # 用于调试 + + if response_data.get("code") == 200: + tree_data = response_data['data']['tree'] + user_data = response_data['data']['user'] # 获取用户相关数据 + + # 获取树木ID + tree_id = tree_data.get('id') + + # 获取阳光相关数据 + sunshine = user_data.get('sunshine', 0) # 如果不存在,则默认为0 + total_sunshine = user_data.get('total_sunshine', 0) # 如果不存在,则默认为0 + + # 可以选择打印这些信息 + #print(f"树木ID: {tree_id} 当前阳光: {sunshine} 总阳光: {total_sunshine} ") + + + # 根据需要返回所需的数据,这里返回一个包含所有信息的元组 + return tree_id, sunshine, total_sunshine + else: + print(f"请求失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}") + return None, None, None # 如果请求失败,返回包含None的元组 + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + return None, None, None # 如果发生异常,返回包含None的元组 + + +def login(code, token): # 提取的号码 + url = "https://sg01.purcotton.com/api/login" + headers = create_headers(code, token) + data = { + "invite_source": "task", + "channel": "" # "channel": "zmh_assist" + } + + try: + response = requests.post(url, headers=headers, json=data) + response.raise_for_status() # 检查HTTP响应状态 + + response_data = response.json() + if response_data.get("code") == 200: + phone = response_data["data"]["phone"] + user_id = response_data["data"]["id"] # 提取id + #print("提取的电话号码:", phone) + #print("提取的用户ID:", user_id) # 打印id + return phone, user_id # 返回电话号码和用户ID + else: + print("请求失败,错误代码:", response_data.get("code"), "错误信息:", response_data.get("msg")) + return None, None + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + return None, None + +# 提取数据 完 + +# 回答问题 +def hdwt_box(code, token, tid): #庄园小课堂 + url = "https://sg01.purcotton.com/api/answer" + headers = create_headers(code, token) + + try: + response = requests.get(url, headers=headers) + response.raise_for_status() + response_data = response.json() + exams = response_data.get("data", {}).get("exams", []) + #print(response.json()) + for exam in exams: + exam_id = exam.get('id') + print(f"正在处理问题ID: {exam_id}") + + # 这里是你提交答案的代码逻辑 + url_submit_answer = "https://sg01.purcotton.com/api/answer/complete" + payload = { + "tid": tid, # 假设任务ID为14 + "exam_id": exam_id, + "win": 1 # 假设标记为正确 + } + submit_response = requests.post(url_submit_answer, headers=headers, json=payload) + submit_response.raise_for_status() + + if submit_response.status_code == 200: + submit_response_data = submit_response.json() + #print(submit_response_data) # 打印完整的响应体 + + # 提取并打印get_water, complete_num, 和 box_id + get_water = submit_response_data.get("data", {}).get("get_water", 0) + complete_num = submit_response_data.get("data", {}).get("complete_num", 0) + box_id = submit_response_data.get("data", {}).get("box_id", 0) + print(f"获取水量:{get_water}, 完成数量:{complete_num}, 宝箱ID:{box_id}") + + # 如果box_id大于0,则打开宝箱 + if box_id > 0: + print(f"检测到宝箱ID: {box_id},尝试打开宝箱...") + url_open_box = "https://sg01.purcotton.com/api/answer/open-box" + box_payload = {"box_id": box_id} + box_response = requests.post(url_open_box, headers=headers, json=box_payload) + box_response.raise_for_status() + + if box_response.status_code == 200: + box_response_data = box_response.json() + # print(f"宝箱 {box_id} 打开成功,响应内容:", box_response_data) + # 提取sy_water和get_water + sy_water = box_response_data.get("data", {}).get("sy_water", 0) + get_water = box_response_data.get("data", {}).get("get_water", 0) + print(f"宝箱 剩余水量:{sy_water}, 宝箱水量:{get_water}") + + + # 随机停止3-5秒 + time.sleep(random.randint(3, 5)) + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + + +def today_water(code, token):# + url = "https://sg01.purcotton.com/api/get-today-water" + headers = create_headers(code, token) # 确保 create_headers 函数正确定义并返回所需的头部信息 + + try: + response = requests.post(url, headers=headers) + response.raise_for_status() # 确保响应状态为200 + + # 解析响应体为JSON + response_data = response.json() + + # 检查响应中的code字段 + if response_data.get("code") == 200: + #print("完整响应体:", response_data) # 打印完整的响应体 + + # 提取所需数据 + sy_water = response_data.get("data", {}).get("sy_water", "未知") + get_water = response_data.get("data", {}).get("get_water", "未知") + tomorrow_get_water_num = response_data.get("data", {}).get("tomorrow_get_water_num", "未知") + + #print(f"剩余水量(sy_water): {sy_water}") + print(f"今日获取水量: {get_water}") + print(f"明日可获取水量: {tomorrow_get_water_num}") + print(f"今日获取水量: {get_water} 明日可获取水量: {tomorrow_get_water_num}") + else: + # 打印错误消息 + print(f"水瓶 {response_data.get('msg', '未知错误')}") + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + +def cscscs(code, token): + url = "https://sg01.purcotton.com/api/statistics/store" + headers = create_headers(code, token) + _, user_id = login(code, token) # 调用login函数,忽略电话号码,只获取user_id + data = { + "uid": user_id, + "type": 301 # 确保这里的值符合API的要求 + } + #print(data) # 打印整个响应数据 + try: + response = requests.post(url, headers=headers, json=data) + response.raise_for_status() # 检查HTTP响应状态 + + response_data = response.json() + #print(response_data) # 打印整个响应数据 + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + +# 阳光 + +def sj_yg(code, token): + success = False + while not success: + url = "https://sg01.purcotton.com/api/get-sunshine" + headers = create_headers(code, token) + # 使用当前时间戳 + payload = {"time": int(time.time() * 1000)} + #print(f"请求负载: {payload}") + + try: + response = requests.post(url, headers=headers, json=payload) + response_data = response.json() + + if response.status_code == 200: + if response_data["code"] == 200: + sy_sunshine = response_data['data'].get('sy_sunshine') + get_sunshine = response_data['data'].get('get_sunshine') + print(f"成功领取阳光: 剩余阳光: {sy_sunshine}, 获得阳光: {get_sunshine}") + success = True # 标记成功领取,退出循环 + elif response_data["code"] == 400: + print("没有可领取的阳光") + break # 如果没有可领取的阳光,跳出循环 + else: + print(f"阳光操作响应: {response_data}") + else: + print(f"请求失败,HTTP状态码: {response.status_code}") + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + + if success: + # 如果成功领取阳光,则暂停1到3秒后继续 + sleep_time = random.randint(1, 3) + print(f"暂停{sleep_time}秒后重新领取...") + time.sleep(sleep_time) + success = False # 重置成功标志,继续领取 + +def syyg(code, token): + """当阳光值大于100时,完成阳光任务""" + # 假设hqid返回树木ID,sunshine,和其他信息 + _, sunshine, _ = hqid(code, token) + + if sunshine > 99: + url = "https://sg01.purcotton.com/api/sunshine-task/complete-task" + headers = create_headers(code, token) # 使用create_headers函数创建请求头 + payload = {"tid": 1} # 固定payload,可能需要根据API文档调整 + + try: + response = requests.post(url, headers=headers, json=payload) + response.raise_for_status() # 检查响应是否成功 + + response_data = response.json() + if response_data.get("code") == 200: + print("成功完成阳光任务。") + # 这里可以根据响应体进一步处理,如打印信息或记录日志 + else: + print(f"完成阳光任务失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}") + except requests.exceptions.RequestException as e: + print(f"请求完成阳光任务时出错: {e}") + else: + print(f"阳光值未达到{sunshine}/100,不执行任务。") + + + + + +# 好友? + + +def hyid(code, token): + url = "https://sg01.purcotton.com/api/friend/list?page=1&page_size=50" + headers = create_headers(code, token) + + try: + response = requests.get(url, headers=headers) + response.raise_for_status() # 确保响应状态为200 + + # 解析响应体为JSON + response_data = response.json() + + friend_user_ids = [] # 用于存储符合条件的朋友的用户ID + if response_data.get("code") == 200: + friends_list = response_data.get("data", {}).get("list", []) + for friend in friends_list: + friend_user_id = friend.get("friend_user_id") + help_water_cnt = friend.get("help_water_cnt") + be_help_water_cnt = friend.get("friend_user_info", {}).get("be_help_water_cnt") + #print(f"朋友用户ID: {friend_user_id}, 帮忙浇水次数: {help_water_cnt}, 被帮忙浇水次数: {be_help_water_cnt}") + + # 只有当帮忙浇水次数小于1时,才收集该朋友的用户ID + if help_water_cnt < 1: + friend_user_ids.append(friend_user_id) + + return friend_user_ids # 返回所有符合条件收集到的用户ID + else: + print("请求失败,错误代码:", response_data.get("code"), "错误信息:", response_data.get("msg")) + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + + + +def access_friend_detail(code, token, friend_user_id): + """访问朋友的详细信息,并尝试对其树进行浇水操作""" + url = "https://sg01.purcotton.com/api/friend/index" + headers = create_headers(code, token) + headers['friend-id'] = str(friend_user_id) + + try: + response = requests.get(url, headers=headers) + response.raise_for_status() + response_data = response.json() + + if response_data.get("code") == 200: + tree_info = response_data.get('data', {}).get('tree', {}) + if isinstance(tree_info, list) and tree_info: + tree_info = tree_info[0] + + tree_id = tree_info.get('id') if isinstance(tree_info, dict) else None + help_water_info = response_data.get('data', {}).get('help_water', {}) + help_water_code = help_water_info.get('code') + help_water_msg = help_water_info.get('msg') + + #print(f"{friend_user_id}朋友树ID: {tree_id}, 帮忙浇水代码: {help_water_code}, 信息: '{help_water_msg}'") + + if tree_id is not None: + success = water_friend_tree(code, token, tree_id, friend_user_id) + if not success: + print(f"由于操作失败,停止处理朋友{friend_user_id}的后续操作。") + return False + else: + print(f"获取朋友{friend_user_id}的详细信息失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}") + return False + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + return False + + return True + +def water_friend_tree(code, token, tree_id, friend_user_id): + """执行给定朋友的树浇水操作""" + url = "https://sg01.purcotton.com/api/friend/water" + headers = create_headers(code, token) + payload = {"tree_user_id": tree_id} + headers['friend-id'] = str(friend_user_id) + + try: + response = requests.post(url, headers=headers, json=payload) + response.raise_for_status() + + response_data = response.json() + #print(response_data) # 打印整个响应体,用于调试 + + if response_data["code"] == 200: + # 检查response_data['data']是否为字典,以此判断是否可以安全访问'info' + if isinstance(response_data['data'], dict): + use_water = response_data['data']['info'].get('use_water', '未知') + reward_water = response_data['data']['info'].get('reward_water', '未知') + print(f"对树ID {tree_id} 的浇水操作成功: 使用水量: {use_water}, 奖励水量: {reward_water}") + else: + # 如果data不是字典,直接打印data字段,这里可能是错误消息或其他说明 + print(f"操作结果: {response_data['data']}") + return False + elif response_data["code"] == 400: + #print(f"{response_data.get('msg', '未知错误')}. 完整响应体: {response_data}") + print(f"{response_data.get('msg', '未知错误')}. ") + return False + else: + print(f"对树ID {tree_id} 的浇水操作响应: {response_data}") + return False + + except requests.exceptions.RequestException as e: + print(f"请求失败: {e}") + return False + + return True + +def process_all_friends(friends_user_ids, code, token): + """遍历朋友列表,尝试对每个朋友的树进行浇水操作,并在首次失败时停止""" + for friend_user_id in friends_user_ids: + if not access_friend_detail(code, token, friend_user_id): + #print(f"由于操作失败,停止对所有后续朋友的处理。") + break # 遇到第一个失败,立即跳出循环 + + + +def main(): + var_name = 'qmzmh' + tokens = get_env_variable(var_name) + if not tokens: + return + + total_tokens = len(tokens) + + if total_tokens > 20: + print("账号数量超过20个,不执行操作。") + return + + + for index, token_info in enumerate(tokens, start=1): + parts = token_info.split('#') + if len(parts) < 2: + print("令牌格式不正确。跳过处理。") + continue + + code = parts[0] + token = parts[1] + remark = parts[2] if len(parts) > 2 else "" + print() + print(f"------账号{index}/{total_tokens},备注: {remark}-------") + + phone, user_id = login(code, token) + if phone and user_id: # 检查是否成功获取电话号码和用户ID + # 进行后续任务 + cscscs(code, token) + #sj_yg(code, token)#收集阳光 + #syyg(code, token)#使用阳光 + jscz(code, token) #浇水 + pdrw(code, token) #任务判断 + friend_user_ids = hyid(code, token) + if friend_user_ids: + process_all_friends(friend_user_ids, code, token) # 正确传入朋友ID列表 + else: + print("登录失败或获取用户信息失败,跳过当前账号的后续操作。") + + + +if __name__ == "__main__": + main() + +''' +def main(): + var_name = 'qmzmh' + tokens = get_env_variable(var_name) + if not tokens: + return + + total_tokens = len(tokens) + + if total_tokens > 20: + print("账号数量超过20个,不执行操作。") + return + + for index, token_info in enumerate(tokens, start=1): + parts = token_info.split('#') + if len(parts) < 2: + print("令牌格式不正确。跳过处理。") + continue + + code = parts[0] + token = parts[1] + remark = parts[2] if len(parts) > 2 else "" + + print(f"------账号{index}/{total_tokens},备注: {remark}-------") + + + login(code, token)#判断要手机号码/提取的电话号码: 才运行下面的任务 + cscscs(code, token)#更新 + #sj_yg(code, token)#收集阳光 + #syyg(code, token)#使用阳光 + jscz(code, token) #浇水 + pdrw(code, token) #任务判断 + friend_user_ids = hyid(code, token) + if friend_user_ids: + process_all_friends(friend_user_ids, code, token) # 正确传入朋友ID列表 + + + +if __name__ == "__main__": + main() +''' diff --git a/wxapp/suboer.js b/wxapp/suboer.js new file mode 100644 index 0000000..6bbf78d --- /dev/null +++ b/wxapp/suboer.js @@ -0,0 +1,542 @@ +/** + * 苏泊尔会员中心 (微信小程序) + * Show: 吃大米 + * 变量名:suboer_wx + * 变量值:token&PHPSESSID@token1&PHPSESSID1 + * 抓域名https://growrice.supor.com/rice/backend/public/index.php/api/login/auto-login?token= 后面的值 + * 抓域名https://growrice.supor.com中请求体header中cookie中PHPSESSID 的值 + * 多账号使用 @ 分割 拼接字符串为& + * cron 5 15 * * * + * const $ = new Env("苏泊尔-微信小程序"); + * scriptVersionNow = "0.0.3"; + */ + +const ckName = "suboer_wx"; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = '&'; //多变量分隔符 + +const $ = new Env("苏泊尔"); +let scriptVersionNow = "0.0.3"; +let msg = ""; + + +async function start() { + //await getVersion("smallfawn/QLScriptPublic/main/suboer.js"); + //await getNotice(); + + let taskall = []; + for (let user of $.userList) { + if (user.ckStatus) { + taskall.push(await user.task()); + await $.wait(1000); + } + } + await Promise.all(taskall); +} + +class UserInfo { + constructor(str) { + this.index = ++$.userIdx; + this.ckStatus = true; + this.token = str.split(strSplitor)[0]; + this.PHPSESSID = str.split(strSplitor)[1]; //单账号多变量分隔符 + this.headers = { + "Host": "growrice.supor.com", + "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/107.0.5304.141 Mobile Safari/537.36 XWEB/5127 MMWEBSDK/20230405 MMWEBID/2585 MicroMessenger/8.0.35.2360(0x2800235D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx29135df42114f4ef", + "content-type": "application/x-www-form-urlencoded", + "accept": "*/*", + "x-requested-with": "com.tencent.mm", + "sec-fetch-site": "same-origin", + "sec-fetch-mode": "cors", + "sec-fetch-dest": "empty", + "referer": "https://growrice.supor.com/rice/fort/main.html", + "accept-encoding": "gzip, deflate", + "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "cookie": `PHPSESSID=${this.PHPSESSID}`, + } + } + async task() { + //登录 + $.DoubleLog(`-------- 开始 【第${this.index}个账号】--------`) + await this.login() + //用户信息 + await this.user_info() + + if (this.ckStatus) { + + //根据签到信息签到 + await this.sign_info() + //任务列表 + await this.task_list() + //获取可收取大米信息 + await this.get_index_info() + //大米余额 + await this.rice_num() + + } else { + $.DoubleLog(`账号${this.index} 失效了好像`) + } + } + // 登录 post + async login() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/login/auto-login?token=${this.token}`, + headers: this.headers, + }; + let result = await httpRequest(options); + } + + // 用户信息 - GET - https://growrice.supor.com/users/get-user-info + async user_info() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/users/get-user-info`, + headers: this.headers, + }; + let result = await httpRequest(options); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} ${result["msg"]} 欢迎 ${result["data"]["nickname"]}`); + } else if (result["code"] == 0) { + $.DoubleLog(`账号${this.index} ${result.msg}`); + this.ckStatus = false + } else { + $.DoubleLog(`账号${this.index} 失败 ❌ 了呢,原因未知!`); + console.log(result); + this.ckStatus = false + } + } + // 签到信息 get + async sign_info() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/signIn/sign-list`, + headers: this.headers, + }; + let result = await httpRequest(options); + + if (result["data"]["is_sign"] == false) { + $.DoubleLog(`账号${this.index} 未签到 去签到喽!`); + await this.do_sign() + } else if (result["data"]["is_sign"] == true) { + $.DoubleLog(`账号${this.index} 已签到 明天再来吧!`); + } else { + $.DoubleLog(`账号${this.index} 失败 ❌ 了呢`); + console.log(result); + } + } + //签到 - POST - https://growrice.supor.com/signIn/sign + async do_sign() { + let options = { + method: "post", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/signIn/sign`, + headers: this.headers, + body: `https://growrice.supor.com/rice/backend/public/index.php/api/signIn/sign`, + }; + let result = await httpRequest(options); + + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} ${result["msg"]} ,获得 ${result["data"]["get_rice_num"]} 大米`); + } else if (result["code"] == 0) { + $.DoubleLog(`账号${this.index} ${result["msg"]}`); + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + // 任务列表 get + async task_list() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/task/index`, + headers: this.headers, + }; + let result = await httpRequest(options); + // console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} ${result["msg"]}`); + let tasks = result.data//[] + for (let i of tasks) { + if ((i["id"] == 1 || i["name"].indexOf("浏览") !== -1) && i["is_finish"] == false) { + await this.link_task("&id=1") + } else if ((i["id"] == 1 || i["name"].indexOf("浏览") !== -1) && i["is_finish"] == true) { + $.DoubleLog(`今天完成浏览好物任务了,明天再来吧!`) + } + + if ((i["id"] == 6 || i["name"].indexOf("收") !== -1) && i["is_finish"] == false) { + //收大米 + for (let j = 0; j < 3; j++) { + await this.get_rice() + } + } else if ((i["id"] == 6 || i["name"].indexOf("收") !== -1) && i["is_finish"] == true) { + $.DoubleLog(`今天无法偷大米了,明天再来吧!`) + } + + if ((i["id"] == 8 || i["name"].indexOf("其他") !== -1) && i["list"][0]["is_finish"] == false) { + //浏览菜谱 + await this.link_task("&id=8&other_id=3") + } else if ((i["id"] == 8 || i["name"].indexOf("其他") !== -1) && i["list"][0]["is_finish"] == true) { + $.DoubleLog(`今天完成浏览菜谱了,明天再来吧!`) + } + } + } else if (result["code"] == 0) { + $.DoubleLog(`账号${this.index} ${result["msg"]}`); + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + // 执行各种任务 https://growrice.supor.com/rice/backend/public/index.php/api/task/link-task + async link_task(bodyString) { + /* + 浏览 菜谱 `&id=8&other_id=3` + 浏览 好物 `&id=1` + + */ + let options = { + method: "post", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/task/link-task`, + headers: this.headers, + body: bodyString, + }; + let result = await httpRequest(options); + + // console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} ${result["msg"]}`); + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + //获取题目 - POST - https://growrice.supor.com/rice/backend/public/index.php/api/question/getQuestion + async get_question() { + let options = { + method: "post", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/question/getQuestion`, + headers: this.headers, + body: "" + }; + let result = await httpRequest(options); + // console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} 题目:${result["data"]["id"]}${result["data"]["title"]}`) + $.DoubleLog(`选项 A${result["data"]["answer_a"]}`) + $.DoubleLog(`选项 B${result["data"]["answer_b"]}`) + $.DoubleLog(`选项 C${result["data"]["answer_c"]}`) + if ("answer_d" in result["data"]) { + (`选项 D${result["data"]["answer_d"]}`) + } + await this.answer(`&question_id=16&answer=D`) + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + //回答题目 - POST - https://growrice.supor.com/rice/backend/public/index.php/api/question/answer + async answer(bodyString) { + let options = { + method: "post", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/question/answer`, + headers: this.headers, + body: bodyString + }; + let result = await httpRequest(options); + // console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} 题目:${result["msg"]["id"]}`) + if (result["data"]["status"] == 0) { + this.answer_status = false //还需要在答题 + } else { + this.answer_status = true //答题任务完成 + + } + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + // 获取可收取大米信息 get + async get_index_info() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/index/index`, + headers: this.headers, + }; + let result = await httpRequest(options); + // console.log(result); + if (result["code"] == 1) { + if (result["data"]["rice_list"].length == 0) { + $.DoubleLog(`账号${this.index} 没有可以收获的大米`) + } else if (result["data"]["rice_list"].length > 0) { + $.DoubleLog(`账号${this.index} 收获大米`) + for (let i of result["data"]["rice_list"]) { + await this.collect_rice(i["id"]) + $.DoubleLog(`${i["name"]}收取完成`) + } + } + } else if (result["code"] == 2) { + $.DoubleLog(`账号${this.index} ${result['msg']} 请自己先打开一次小程序,种大米后在执行脚本!`) + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + // 收大米 + async collect_rice(id) { + let options = { + method: "post", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/index/collect-rice`, + headers: this.headers, + body: `&id=${id}`, + }; + let result = await httpRequest(options); + + // console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} 收取大米 成功啦 ! 当前累计${result["data"]["sign_rice_num"]}大米`); + } else if (result["code"] == 0) { + $.DoubleLog(`账号${this.index} ${result["msg"]}`); + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + + + + // 查询大米数量 - GET - https://growrice.supor.com/rice/backend/public/index.php/api/exchange/index?&page=1&pagesize=10 + async rice_num() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/exchange/index?&page=1&pagesize=10`, + headers: this.headers, + }; + let result = await httpRequest(options); + + // console.log(result); + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} 现在有${result["data"]["rice_num"]} 大米`) + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + // 获取同城大米id + async get_sameCity_id() { + let options = { + method: "get", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/users/same-city-list`, + headers: this.headers, + }; + let result = await httpRequest(options); + // console.log(result); + if (result["code"] == 1) { + let arr = [] + for (let i of result["data"]) { + arr.push(i["id"]) + } + return arr; + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + } + + + // 偷好友大米 + async get_rice() { + let SameCityIdList = await this.get_sameCity_id()//"获取好友大米id" + for (let i of SameCityIdList) { + let id = i + let options = { + method: "post", + url: `https://growrice.supor.com/rice/backend/public/index.php/api/users/get-rice`, + headers: this.headers, + body: `&friend_id=${id}`, + }; + let result = await httpRequest(options); + + if (result["code"] == 1) { + $.DoubleLog(`账号${this.index} ${result["msg"]} , 当前已有 ${result["data"]["sign_rice_num"]} 大米`); + } else if (result["code"] == 0) { + $.DoubleLog(`账号${this.index} ${result["msg"]}`); + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + + } + + } + + // 抽奖信息 get + /* async prize_Info() { + let options = { + method: "get", + url: `https://growrice.supor.com/prize/index`, + headers: this.headers, + }; + let result = await httpRequest(options); + + // console.log(result); + if (result.code == 1) { + $.DoubleLog(`账号${this.index} , 抽奖券${result.data.draw_num_1}张, 高级抽奖券${result.data.draw_num_2}张`) + if (result.data.draw_num_1 > 0) { + await this.prize('普通抽奖', '1') + } + if (result.data.draw_num_2 > 0) { + await this.prize('高级抽奖', '2') + } + if (result.data.draw_num_1 == 0 && result.data.draw_num_2 == 0) { + $.DoubleLog(`账号${this.index} 暂时无抽奖次数!`) + } + + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + }*/ + + // 抽奖 https://growrice.supor.com/rice/backend/public/index.php/api/prize/draw + /*async prize(type) { + let options = { + method: "post", + url: `https://growrice.supor.com/prize/draw`, + headers: this.headers, + body: `cate=${type}`, + }; + let result = await httpRequest(options); + + // console.log(result); + if (result.code == 1) { + let prize_info = result.data.prize_info + $.DoubleLog(`账号${this.index} 获得 ${prize_info.prize_name} , 奖品id: ${prize_info.prize_id}, 奖品类型: ${prize_info.prize_type}, 奖品数量: ${prize_info.prize_value}`); + await this.prize_Info('抽奖信息') + } else if (result.code == 0) { + $.DoubleLog(`账号${this.index} ${result.msg}`); + await this.prize_Info('抽奖信息') + } else { + $.DoubleLog(`账号${this.index} 失败❌了呢`); + console.log(result); + } + }*/ + + +} + + +!(async () => { + if (!(await checkEnv())) return; + if ($.userList.length > 0) { + await start(); + } await $.SendMsg(msg); +})().catch((e) => console.log(e)).finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + //let userCount = 0; + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && $.userList.push(new UserInfo(n)); + //userCount = $.userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${$.userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method = null) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + } else { + if (data) { + try { data = JSON.parse(data); } catch (error) { } + resolve(data); + } else { + console.log(`请求api返回数据为空,请检查自身原因`); + } + } + resolve(); + }); + }); +} +/** + * 获取远程版本 + */ +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://ghproxy.com/https://raw.githubusercontent.com/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n============ 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ============`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} +/** + * 获取远程通知 + */ +async function getNotice() { + try { + const urls = [ + "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", + "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json", + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +// ==================== API ==================== // +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/wxapp/topspace.py b/wxapp/topspace.py new file mode 100644 index 0000000..bc6b054 --- /dev/null +++ b/wxapp/topspace.py @@ -0,0 +1,109 @@ + +''' +topspace微信小程序 + + +new Env('topspace'); +抓x-vcs-user-token和app-id用&分割并且多号@ +''' +import requests +import os + +class AC: + def __init__(self, cookie): + self.headers = { + 'User-Agent': "Mozilla/5.0 (Linux; Android 12; RMX3562 Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 XWEB/1220133 MMWEBSDK/20240404 MMWEBID/2307 MicroMessenger/8.0.49.2600(0x28003133) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android", + 'app-id': cookie.split('&')[1], + 'x-vcs-user-token': cookie.split('&')[0] + } + + def info(self): + url = "https://m.sda.changan.com.cn/app-apigw/user-info-api/api/v1/sda-app/personal-info/basic-information" + response = requests.get(url, headers=self.headers) + data = response.json() + if data['code'] == 0: + userNickname = data["data"]["userNickname"] + totalPoints = data["data"]["pointInfo"]["totalPoints"] + print(f"用户:{userNickname}当前共有{totalPoints}币") + return userNickname + else: + msg = data["msg"] + print(f"登录失败: {msg}") + return None + + def check(self, userNickname): + url = "https://m.sda.changan.com.cn/app-apigw/user-info-api/api/v2/point/check-in" + response = requests.post(url, headers=self.headers) + data = response.json() + if data['code'] == 0: + description = data["data"]["description"] + total = data["data"]["total"] + print(f"用户:{userNickname}{description}获得{total}TOP币") + else: + msg = data["msg"] + print(f"签到失败: {msg}") + + def list_articles(self, userNickname): + url = "https://m.sda.changan.com.cn/app-apigw/sda-zone-api/api/v1/post/list" + data = { + "section_id": "1002", + "page": { + "current_page": 1, + "page_size": 20 + }, + "sort_type": "RECOMMEND_FIRST" + } + response = requests.post(url, headers=self.headers, json=data) + data = response.json() + if data['code'] == 0: + article_id = data["data"]["list"][0]["id"] + print(f"用户:{userNickname}获取文章{article_id}") + return article_id + else: + msg = data["msg"] + print(f"获取文章失败: {msg}") + + def publish_comment(self, userNickname, article_id): + url = "https://m.sda.changan.com.cn/app-apigw/sda-zone-api/api/v1/comment/publish" + data = { + "content": "很酷", + "post_id": article_id + } + response = requests.post(url, headers=self.headers, json=data) + data = response.json() + if data['code'] == 0: + print("发布成功") + else: + print(f"发布失败: {data['msg']}") + + def share_article(self, userNickname, article_id): + url = "https://m.sda.changan.com.cn/app-apigw/sda-zone-api/api/v1/action/share" + data = { + "post_id": article_id + } + response = requests.post(url, headers=self.headers, json=data) + data = response.json() + if data['code'] == 0: + print("转发成功") + else: + print(f"转发失败: {data['msg']}") + +if __name__ == "__main__": + topspace = os.environ.get('topspace') + if not topspace: + print("请设置环境变量 'topspace' 后再运行") + else: + topspace_list = topspace.split('@') + for num, topspace_item in enumerate(topspace_list, start=1): + x_vcs_user_token, app_id = topspace_item.split('&') + cookie = f"{x_vcs_user_token}&{app_id}" + ac = AC(cookie) + print(f"=====开始执行第{num}个账号任务=====") + user_nickname = ac.info() + if user_nickname: + ac.check(user_nickname) + article_id = ac.list_articles(user_nickname) + if article_id: + ac.publish_comment(user_nickname, article_id) + ac.share_article(user_nickname, article_id) + print("---------账号任务执行完毕---------") diff --git a/wxapp/wx_gjjkpro.js b/wxapp/wx_gjjkpro.js new file mode 100644 index 0000000..5ec688b --- /dev/null +++ b/wxapp/wx_gjjkpro.js @@ -0,0 +1,260 @@ +/** + * 高济健康pro小程序签到 + * cron 7 5 * * * wx_gjjkpro.js + * 活动入口 首页 智慧小屋 + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export wx_gjjkpro_data='userId&authorization' + * + * 多账号用 换行 或 @ 分割 + * 抓包 https://api.gaojihealth.cn/fund/api/ , 找到userId&authorization即可 + * ==================================== + * + */ + + + +const $ = new Env("高济健康pro小程序签到"); +const ckName = "wx_gjjkpro_data"; +//-------------------- 一般不动变量区域 ------------------------------------- +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +const notify = $.isNode() ? require('../sendNotify') : ''; +let debug = 1; //Debug调试 0关闭 1开启 +let envSplitor = ["@"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +//--------------------------------------------------------- + +async function start() { + + console.log('\n================== 用户CK ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.user_info()); + await $.wait(3000); //延迟 1秒 可充分利用 $.环境函数 + } + await Promise.all(taskall); + console.log('\n================== 签到 ==================\n'); + taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.task_signin()); + await $.wait(3000); //延迟 1秒 可充分利用 $.环境函数 + } + + } + await Promise.all(taskall); + console.log('\n================== 任务 ==================\n'); + taskall = []; + let tasktmp; + for (let user of userList) { + if (user.ckStatus) { + for(let tasknum in user.taskList){ + tasktmp = user.taskList[tasknum] + taskall.push(await user.task_do(tasktmp)); + await $.wait(3000); //延迟 1秒 可充分利用 $.环境函数 + } + + } + + } + await Promise.all(taskall); + + + +} + + +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.userId = str.split('&')[0]; //单账号多变量分隔符 + this.ck = str.split('&')[1]; + this.ck = this.ck.replace('bearer', 'bearer ') + //let ck = str.split('&') + //this.data1 = ck[0] + this.ckStatus = true + this.headersPost = { + 'Host': 'api.gaojihealth.cn', + 'Content-Type': 'application/json;charset=UTF-8', + 'authorization': this.ck, + } + this.headersGet = { + 'Host': 'api.gaojihealth.cn', + 'authorization': this.ck, + } + this.taskList = [{ "browsePageId": "100004", "browsePageUrl": "/modules/integral/integral-mall/index", "taskId": 729 }, { "browsePageId": "100015", "browsePageUrl": "/modules/storeEmployeeQRcode/index?pageType=1", "taskId": 730 }] + + } + + async user_info() {//userinfo + try { + let options = { + url: `https://api.gaojihealth.cn/fund/api/noauth/appCoupon/findDkSignActivityPage?businessId=212798&userId=${this.userId}&version=1.4`, + headers: this.headersGet, + } + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.runFlag == true) { + DoubleLog(`账号[${this.index}] ck验证成功: G金[${result.integralResponse.currentFund}] `); + this.ckStatus = true + } else { + DoubleLog(`账号[${this.index}] ck验证失效,原因未知!`); + this.ckStatus = false + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_signin() {//userinfo + try { + let options = { + url: `https://api.gaojihealth.cn/gulosity/api/dkUserEvent/everyDaySign`, + headers: this.headersPost, + body: JSON.stringify({ "businessId": 212798, "userId": this.userId, "taskId": 372 }) + } + this.headersPost['Content-Length'] = options.body.length + + //console.log(options); + let result = await httpRequest(options); + //console.log(result); + if (result.opCode == 200) { + DoubleLog(`账号[${this.index}] 签到成功: [${result.prizeInfo}] `); + } else { + DoubleLog(`账号[${this.index}] 签到失效,原因未知!`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_do(tasktmp) {//DO + + try { + let options = { + url: `https://api.gaojihealth.cn/gulosity/api/dkUserEvent/browsePageCompleteTaskEvent`, + headers: this.headersPost, + body: JSON.stringify(tasktmp) + } + this.headersPost['Content-Length'] = options.body.length + + //console.log(options); + + let result = await httpRequest(options) + if (result == 'true') { + DoubleLog(`账号[${this.index}] 执行任务成功: [${tasktmp.taskId}] `); + } else { + DoubleLog(`账号[${this.index}] 执行任务失效,原因未知!`); + console.log(result); + } + //console.log(result); + + } catch (e) { + console.log(e); + } + } + + + + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +//******************************************************** +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +///////////////////////////////////////////////////////////////////////////////////// + +function httpRequest(options, method) { + typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + //throw new Error(err); + //console.log(err); + } else { + //httpResult = data; + //httpResponse = resp; + if (data) { + //console.log(data); + typeof JSON.parse(data) == 'object' ? data = JSON.parse(data) : data = data + resolve(data) + } else { + console.log(`请求api返回数据为空,请检查自身原因`) + } + } + } catch (e) { + //console.log(e, resp); + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function ts13() { + return Math.round(new Date().getTime()).toString(); +} +// 双平台log输出 +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}` + } + } else { + console.log(`${data}`); + msg += `\n${data}` + } +} +// 发送消息 +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } else { + console.log(message) + } +} +// 完整 Env +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) } diff --git a/wxapp/wx_lccd.js b/wxapp/wx_lccd.js new file mode 100644 index 0000000..b95c52e --- /dev/null +++ b/wxapp/wx_lccd.js @@ -0,0 +1,519 @@ +/** + * cron 5 15 * * * + * Show:微信小程序-莱充充电 + * 变量名: + * 变量值:https://shop.laichon.com/api/v1/ headers下的authorization 去掉JWT 只要后面的 # openid 多账户换行或者& + * 示例 ejxxxxxx#o0sa51.... + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("微信小程序-莱充充电"); +const notify = $.isNode() ? require('../sendNotify') : ''; +let ckName = "wx_lccd"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; + this.ck1 = str.split(strSplitor)[1]; + this.ckStatus = true; + this.signStatus = "" + this.headers = { + "Host": "shop.laichon.com", + "Connection": "keep-alive", + "Content-Length": "9", + "authorization": "JWT " + this.ck, + "charset": "utf-8", + "openid": this.ck1, + "service-code": "WYC-MI-WEIXIN", + "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/116.0.0.0 Mobile Safari/537.36 XWEB/1160027 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android", + "content-type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip,compress,br,deflate", + "Referer": "https://servicewechat.com/wxa68db1dabe823e7e/316/page-frame.html" + } + } + async main() { + await this.user_info() + if(this.ckStatus){ + await this.task_sign(); + if (this.signStatus == 0) { + await this.task_sign(); + } else if (this.signStatus == 1) { + $.log(`签到翻倍`) + await this.task_double(); + } + $.log(`完成充电和看视频任务`) + await this.task_complete(3) + await this.task_complete(4) + } + + } + async task_sign() { + try { + let options = { + fn: "签到", + method: "get", + url: `https://shop.laichon.com/api/v1/task/getSignTask`, + headers: this.headers, + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if (result.code == 1) { + if (result.data.isSign == 0) { + //未签到 + $.log(`未签到`) + this.signStatus = 0 + } else { + $.log(`已签到`) + this.signStatus = 1 + } + } else { + this.signStatus = 2 + } + } catch (e) { + console.log(e); + } + } + async user_info() { + try { + let options = { + fn: "信息", + method: "get", + url: `https://shop.laichon.com/api/v1/member/userinfo`, + headers: this.headers, + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if(result.code_key == "success"){ + this.ckStatus = true + $.log(`当前[${result.data.mobile} 积分[${result.data.point}]]`) + }else { + this.ckStatus = false + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async task_double() { + try { + let options = { + fn: "签到翻倍", + method: "get", + url: `https://shop.laichon.com/api/v1/task/pointsDouble`, + headers: this.headers, + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if(result.code_key == "success"){ + $.log(`完成 +1`) + } + } catch (e) { + console.log(e); + } + } + async task_complete(id) { + try { + let options = { + fn: "完成任务", + method: "post", + url: `https://shop.laichon.com/api/v1/task/taskComplete`, + headers: this.headers, + body: `task_id=${id}` + } + let { body: result } = await $.httpRequest(options); + //console.log(options); + //console.log(result); + if(result.code_key == "success"){ + $.log(`完成 +1`) + } + } catch (e) { + console.log(e); + } + } +} + + + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log(`未找到变量[${ckName}]`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t + )[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + isJSONString(str) { + try { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t.headers['content-Type']; + delete t.headers['content-Length']; + delete t["body"] + } + if (t.method === 'post') { + let contentType; + + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + contentType = 'application/json' + } else { + contentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + contentType = 'application/json'; + } + } + if (!t.headers['Content-Type']) { + t.headers['Content-Type'] = contentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) + )); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) + )); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` + ) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/wxapp/wx_midea.js b/wxapp/wx_midea.js new file mode 100644 index 0000000..aeadcf2 --- /dev/null +++ b/wxapp/wx_midea.js @@ -0,0 +1,241 @@ +/** + * cron 27 19 * * * wx_midea.js + * Show:每天运行一次 + * @author:https://github.com/smallfawn/QLScriptPublic + * 变量名:wx_midea + * 变量值:https://mvip.midea.cn/next/mucuserinfo/getmucuserinfo headers中的COOKIE 只写uid=xxxx;sukey=yyyy;#headers 中 ucAccessToken的值 + * 具体示例 uid=xxxx;sukey=yyyy;#7895566asa 多账号&分开 或者换行 + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("微信小程序 - 美的会员"); +const notify = $.isNode() ? require('../sendNotify') : ''; +let ckName = "wx_midea"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +let msg = ""; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.at = str.split(strSplitor)[1]; + } + async main() { + $.msg($.name, "", `开始第${this.index}个账号`) + //await this.user_info(); + await $.wait(3000) + if (!this.ckStatus) { + $.msg($.name, "", `❌第${this.index}个账号失效`); + return; + } + await this.signIn() + await this.signIn2() + + } + async user_info() { + try { + let options = { + fn: "信息查询", + method: "get", + url: `https://mvip.midea.cn/next/mucuserinfo/getmucuserinfo`, + headers: { + "Host": "mvip.midea.cn", + "Connection": "keep-alive", + "charset": "utf-8", + "cookie": this.ck, + "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/111.0.5563.116 Mobile Safari/537.36 XWEB/1110005 MMWEBSDK/20230405 MMWEBID/2585 MicroMessenger/8.0.35.2360(0x2800235D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android", + "Content-Type": "application/json", + "Accept-Encoding": "gzip,compress,br,deflate", + "Referer": "https://servicewechat.com/wx03925a39ca94b161/409/page-frame.html" + }, + } + let result = await httpRequest(options); + //console.log(options); + //console.log(result); + if (result["errcode"] == 0) { + console.log(`✅${options.fn}成功 [${result.data.userinfo.Mobile}] 当前积分[${result.data.userinfo.VipGrow}]🎉`); + msg += `✅${options.fn}成功 [${result.data.userinfo.Mobile}] 当前积分[${result.data.userinfo.VipGrow}]🎉\n`; + this.ckStatus = true; + } else { + console.log(`❌${options.fn}失败`); + msg += `❌${options.fn}失败\n`; + this.ckStatus = false; + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async signIn() { + try { + let options = { + fn: "签到", + method: "get", + url: `https://mvip.midea.cn/my/score/create_daily_score`, + headers: { + 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8', + "cookie": this.ck, + }, + } + let result = await httpRequest(options); + //console.log(options); + //result = JSON.parse(result); + //console.log(result); + if (result["errcode"] == 0) { + console.log(`✅${options.fn}成功🎉`); + msg += `✅${options.fn}成功🎉\n`+JSON.stringify(result); + } else { + console.log(`❌${options.fn}失败`); + msg += `❌${options.fn}失败\n`; + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async signIn2() { + try { + let options = { + fn: "签到2", + method: "post", + url: `https://mvip.midea.cn/mscp_mscp/api/cms_api/activity-center-im-service/im-svr/im/game/page/sign`, + headers: { + '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/130.0.6723.103 Mobile Safari/537.36 XWEB/1300333 MMWEBSDK/20240404 MMWEBID/2585 MicroMessenger/8.0.49.2600(0x2800315A) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx03925a39ca94b161', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Encoding': 'gzip, deflate, br, zstd', + 'Content-Type': 'application/json', + 'sec-ch-ua-platform': '"Android"', + 'sec-ch-ua': '"Chromium";v="130", "Android WebView";v="130", "Not?A_Brand";v="99"', + 'ucAccessToken': '' + this.at, + 'sec-ch-ua-mobile': '?1', + 'intercept': '1', + 'apiKey': '3660663068894a0d9fea574c2673f3c0', + 'Origin': 'https://mvip.midea.cn', + 'X-Requested-With': 'com.tencent.mm', + 'Sec-Fetch-Site': 'same-origin', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://mvip.midea.cn/mscp_weixin/apps/h5-pro-wx-interaction-marketing/', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', + }, + body: JSON.stringify({ + "headParams": { + "language": "CN", + "originSystem": "MCSP", + "timeZone": "", + "userCode": "", + "tenantCode": "", + "userKey": "TEST_", + "transactionId": "" + }, + "pagination": null, + "restParams": { + "gameId": 22, + "actvId": "401671388248692763", + "rootCode": "MDHY", + "appCode": "MDHY_XCX", + "imUserId": "", + "uid": "", + "openId": "", + "unionId": "" + } + }) + } + + let result = await httpRequest(options); + //console.log(options); + //result = JSON.parse(result); + //console.log(result); + console.log(`✅${options.fn}成功🎉`); + msg += `✅${options.fn}成功🎉\n` + JSON.stringify(result); + console.log(JSON.stringify(result)); + /*if (result["errcode"] == 0) { + console.log(`✅${options.fn}成功🎉`); + msg += `✅${options.fn}成功🎉\n`; + } else { + console.log(`❌${options.fn}失败`); + msg += `❌${options.fn}失败\n`; + console.log(JSON.stringify(result)); + }*/ + } catch (e) { + console.log(e); + } + } +} + +async function start() { + const tasks = userList.map(user => user.main()); + await Promise.all(tasks); + notify.sendNotify($.name, msg); + /*let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall);*/ +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options) { + if (!options["method"]) { + return console.log(`请求方法不存在`); + } + if (!options["fn"]) { + console.log(`函数名不存在`); + } + return new Promise((resolve) => { + $[options.method](options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + try { + data = JSON.parse(data); + } catch (error) { } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(data); + } + }); + }); +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))), this.logs.push("", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="), this.logs.push(s), e && this.logs.push(e), i && this.logs.push(i) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/wxapp/wx_xlxyh.js b/wxapp/wx_xlxyh.js new file mode 100644 index 0000000..5993af0 --- /dev/null +++ b/wxapp/wx_xlxyh.js @@ -0,0 +1,560 @@ +const ckName = "wx_xlxyh"; + +// 工具类 +class Env { + constructor(name) { + this.name = name; + this.logs = []; + } + + log(...args) { + const msg = args.join(" "); + this.logs.push(msg); + console.log(msg); + } + + isNode() { + return typeof process !== "undefined" && process.release && process.release.name === 'node'; + } + + getdata(key) { + if (this.isNode()) { + return process.env[key] || ""; + } + return localStorage.getItem(key) || ""; + } + + wait(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } + + async httpRequest(config) { + if (this.isNode()) { + const axios = require('axios'); + return await axios(config); + } else { + return new Promise((resolve, reject) => { + const xhr = new XMLHttpRequest(); + xhr.open(config.method || 'GET', config.url); + + if (config.headers) { + for (const [key, value] of Object.entries(config.headers)) { + xhr.setRequestHeader(key, value); + } + } + + xhr.onload = () => { + if (xhr.status >= 200 && xhr.status < 300) { + try { + const data = JSON.parse(xhr.responseText); + resolve({ data }); + } catch (e) { + resolve({ data: xhr.responseText }); + } + } else { + reject(new Error(`HTTP ${xhr.status}: ${xhr.statusText}`)); + } + }; + + xhr.onerror = () => reject(new Error('Network error')); + xhr.send(config.data); + }); + } + } + + done() { + if (this.isNode()) { + process.exit(0); + } + } +} + +// 初始化环境 +const $ = new Env("骁龙骁友会"); + +class XLXYH { + constructor(ck) { + const parts = ck.split("#"); + this.ck = (parts[0] || "").trim(); + this.userId = (parts[1] || "").trim(); + this.openId = ""; + this.valid = !!(this.ck && this.userId); + } + + generateSign(timestamp, requestId, body = "") { + const crypto = require("crypto"); + return crypto.createHash("md5") + .update(`${timestamp}${requestId}${body}boysup`) + .digest("hex"); + } + + uuid() { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => { + const r = Math.random() * 16 | 0; + return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16); + }); + } + + async request(method, path, data = null, extraHeaders = {}, skipSign = false) { + if (!this.valid) { + return { code: 400, message: "CK无效" }; + } + + const timestamp = Date.now().toString(); + const requestId = this.uuid().replace(/-/g, ""); + const sign = skipSign ? "" : this.generateSign(timestamp, requestId, data || ""); + + const headers = { + "Host": "qualcomm.boysup.cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", + "timestamp": timestamp, + "sign": sign, + "xweb_xhr": "1", + "openId": this.openId, + "requestId": requestId, + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) UnifiedPCWindowsWechat(0xf254162e) XWEB/18151", + "userId": this.userId, + "sessionKey": this.ck, + "Referer": "https://servicewechat.com/wx026c06df6adc5d06/644/page-frame.html", + "Accept": "*/*", + "Sec-Fetch-Site": "cross-site", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Dest": "empty", + ...extraHeaders + }; + + if (skipSign) { + delete headers.sign; + } + + try { + const config = { + url: `https://qualcomm.boysup.cn${path}`, + method, + headers + }; + + if (data && method !== "GET") { + config.data = data; + } + + const resp = await $.httpRequest(config); + + if (typeof resp.data === "object") { + return resp.data; + } else { + return JSON.parse(resp.data); + } + } catch (e) { + const msg = e.response?.data?.message || e.message || "网络错误"; + $.log(`❌ 请求失败: ${msg} (路径: ${path})`); + if (e.response) { + $.log(`📄 响应数据: ${JSON.stringify(e.response.data)}`); + } + return { + code: e.response?.status || 500, + message: msg, + response: e.response + }; + } + } + + async getOpenId() { + $.log("🔍 尝试获取openId..."); + const openIdRes = await this.request( + "GET", + `/qualcomm-app/api/user/info?userId=${this.userId}`, + null, + {}, + true + ); + + if (openIdRes.code === 200 && openIdRes.data) { + this.openId = openIdRes.data.openId || ""; + $.log(`✅ 获取到openId: ${this.openId || "空"}`); + return true; + } else { + $.log(`❌ 获取openId失败: ${openIdRes.message}`); + return false; + } + } + + async run() { + if (!this.valid) { + $.log(`❌ CK格式错误,请使用: sessionKey#userId`); + return; + } + + if (!(await this.getOpenId())) { + $.log("❌ 获取openId失败,可能sessionKey已过期"); + return; + } + + $.log("🔍 获取用户信息..."); + const userInfo = await this.request("GET", `/qualcomm-app/api/user/info?userId=${this.userId}`); + if (userInfo.code !== 200) { + $.log(`❌ 账号[${this.userId}] 获取用户信息失败: ${userInfo.message}`); + if (userInfo.message.includes("登录过期") || userInfo.code === 401) { + $.log("⚠️ 登录已过期,请重新获取sessionKey和userId"); + return; + } + return; + } + + $.log(`✅ 【${userInfo.data.nick}】等级${userInfo.data.level} | 积分: ${userInfo.data.coreCoin}`); + + $.log("🔍 检查签到状态..."); + const signList = await this.request("GET", `/qualcomm-app/api/user/signList?userId=${this.userId}`); + if (signList.code === 200) { + if (signList.data?.isSignToday !== 1) { + $.log("🔍 开始签到..."); + const signResult = await this.request("POST", `/qualcomm-app/api/user/signIn?userId=${this.userId}`); + if (signResult.code === 200) { + $.log(`✅ 签到成功 +${signResult.data.coreCoin}积分`); + } else { + $.log(`❌ 签到失败: ${signResult.message}`); + } + } else { + $.log("✅ 今日已签到"); + } + } else { + $.log(`❌ 获取签到状态失败: ${signList.message}`); + } + + await this.handleDrawTask(); + + await this.handleReadTask(); + + await this.handleVlogTask(); + } + + async handleDrawTask() { + $.log("🔍 开始抽奖任务..."); + + // 修改为使用正确的抽奖接口 + const drawResult = await this.request( + "POST", + "/qualcomm-app/api/luckDraw/getLuck", + `userId=${this.userId}&activityId=7` + ); + + if (drawResult.code === 200) { + if (drawResult.data && drawResult.data.name) { + $.log(`✅ 抽奖成功: ${drawResult.data.name}`); + } else { + $.log(`✅ 抽奖成功: 获得奖励`); + } + + // 如果有积分信息,也显示出来 + if (drawResult.data.coreCoin) { + $.log(`💰 获得积分: ${drawResult.data.coreCoin}`); + } + } else if (drawResult.code === 201) { + $.log(`ℹ️ ${drawResult.message || '抽奖提示'}`); + } else { + $.log(`❌ 抽奖失败: ${drawResult.message || '接口请求错误'}`); + } + } + + async handleReadTask() { + $.log("🔍 获取文章列表..."); + const articleRes = await this.request( + "GET", + `/qualcomm-app/api/home/articles?page=1&size=10&userId=${this.userId}&type=0&searchDate=&articleShowPlace=骁友资讯列表页` + ); + + if (articleRes.code === 200 && articleRes.data?.articleList?.length) { + const article = articleRes.data.articleList[0]; + $.log(`📖 开始阅读: ${article.title.substring(0, 20)}...`); + + const enterRes = await this.request("POST", + "/qualcomm-app/api/article/enterReadDaily", + `articleId=${article.id}&userId=${this.userId}` + ); + + if (enterRes.code !== 200) { + $.log(`⚠️ 进入阅读失败: ${enterRes.message}`); + } + + const likeRes = await this.request("GET", + `/qualcomm-app/api/article/like?articleId=${article.id}&userId=${this.userId}` + ); + + if (likeRes.code === 200) { + $.log("👍 点赞成功"); + } else { + $.log(`⚠️ 点赞失败: ${likeRes.message}`); + } + + const shareRes = await this.request("POST", + "/qualcomm-app/api/article/shareDaily", + `articleId=${article.id}&userId=${this.userId}` + ); + + if (shareRes.code === 200) { + $.log("🔗 分享成功"); + } else { + $.log(`⚠️ 分享失败: ${shareRes.message}`); + } + + $.log("⏳ 模拟阅读65秒..."); + await $.wait(65000); + + const exitRes = await this.request("POST", + "/qualcomm-app/api/article/exitReadDaily", + `articleId=${article.id}&userId=${this.userId}` + ); + + if (exitRes.code === 200) { + $.log("✅ 阅读任务完成"); + } else { + $.log(`⚠️ 退出阅读失败: ${exitRes.message}`); + } + } else { + $.log("ℹ️ 未获取到文章,跳过阅读任务"); + } + } + + async handleVlogTask() { + $.log("🔍 获取VLOG列表..."); + + const vlogRes = await this.request( + "GET", + `/qualcomm-app/api/article/vlogList?page=1&size=20&userId=${this.userId}&sortBy=1` + ); + + if (vlogRes.code === 200 && vlogRes.data?.records?.length) { + const vlogs = vlogRes.data.records; + $.log(`✅ 获取到 ${vlogs.length} 个VLOG`); + + // 只获取第一个VLOG,不管是否已观看 + const targetVlog = vlogs[0]; + $.log(`🎬 开始观看第一个VLOG: ${targetVlog.title.substring(0, 20)}...`); + $.log(`📊 时长: ${targetVlog.videoDuration} | 播放: ${targetVlog.playCountFormat} | 点赞: ${targetVlog.likeCount}`); + + const enterRes = await this.request( + "POST", + "/qualcomm-app/api/article/enterReadDaily", + `articleId=${targetVlog.id}&userId=${this.userId}` + ); + + if (enterRes.code === 200) { + $.log("✅ 进入VLOG观看成功"); + + // 固定观看70秒,不管视频时长 + const waitTime = 70000; + + $.log(`⏳ 模拟观看VLOG 70秒...`); + await $.wait(waitTime); + + const exitRes = await this.request( + "POST", + "/qualcomm-app/api/article/exitReadDaily", + `articleId=${targetVlog.id}&userId=${this.userId}` + ); + + if (exitRes.code === 200) { + $.log("✅ VLOG观看任务完成"); + + await this.request( + "GET", + `/qualcomm-app/api/article/like?articleId=${targetVlog.id}&userId=${this.userId}` + ); + + await this.request( + "POST", + "/qualcomm-app/api/article/shareDaily", + `articleId=${targetVlog.id}&userId=${this.userId}` + ); + + $.log("✅ VLOG点赞和分享完成"); + } else { + $.log(`⚠️ 退出VLOG观看失败: ${exitRes.message}`); + } + } else { + $.log(`❌ 进入VLOG观看失败: ${enterRes.message}`); + } + } else { + $.log(`❌ 获取VLOG列表失败: ${vlogRes.message || '未知错误'}`); + } + } + + async batchHandleVlogs(count = 1) { + // 修改默认只处理1个VLOG + $.log(`🔍 开始批量处理${count}个VLOG任务...`); + + const vlogRes = await this.request( + "GET", + `/qualcomm-app/api/article/vlogList?page=1&size=20&userId=${this.userId}&sortBy=1` + ); + + if (vlogRes.code === 200 && vlogRes.data?.records?.length) { + const vlogs = vlogRes.data.records; + + // 只处理前count个VLOG,不筛选是否已观看 + const tasks = Math.min(count, vlogs.length); + let completed = 0; + + for (let i = 0; i < tasks; i++) { + const vlog = vlogs[i]; + $.log(`\n🎬 处理第 ${i + 1}/${tasks} 个VLOG: ${vlog.title.substring(0, 20)}...`); + + try { + const enterRes = await this.request( + "POST", + "/qualcomm-app/api/article/enterReadDaily", + `articleId=${vlog.id}&userId=${this.userId}` + ); + + if (enterRes.code === 200) { + // 固定观看70秒 + const waitTime = 70000; + + $.log(`⏳ 观看中... (70秒)`); + await $.wait(waitTime); + + const exitRes = await this.request( + "POST", + "/qualcomm-app/api/article/exitReadDaily", + `articleId=${vlog.id}&userId=${this.userId}` + ); + + if (exitRes.code === 200) { + completed++; + $.log(`✅ 第 ${i + 1} 个VLOG观看完成`); + + await this.request( + "GET", + `/qualcomm-app/api/article/like?articleId=${vlog.id}&userId=${this.userId}` + ); + await this.request( + "POST", + "/qualcomm-app/api/article/shareDaily", + `articleId=${vlog.id}&userId=${this.userId}` + ); + } + } + } catch (error) { + $.log(`❌ 处理VLOG失败: ${error.message}`); + } + + if (i < tasks - 1) { + await $.wait(2000); + } + } + + $.log(`\n🎉 批量VLOG任务完成: ${completed}/${tasks} 个VLOG观看成功`); + return completed; + } else { + $.log("❌ 无法获取VLOG列表"); + return 0; + } + } +} + +async function main() { + let cookies = []; + + if ($.isNode()) { + const raw = process.env[ckName] || ""; + cookies = raw.split(/[#&\n]/).filter(Boolean); + + if (!cookies.length) { + const fs = require('fs'); + try { + if (fs.existsSync(`${ckName}.txt`)) { + const content = fs.readFileSync(`${ckName}.txt`, 'utf8'); + cookies = content.split(/[#&\n]/).filter(Boolean); + } + } catch (e) { + } + } + } else { + const raw = $.getdata(ckName) || ""; + cookies = raw.split(/[#&\n]/).filter(Boolean); + } + + if (!cookies.length) { + $.log(`🔔 未找到变量【${ckName}】,请添加`); + $.log(`💡 CK格式: sessionKey#userId`); + $.log(`📝 配置方法:`); + $.log(` 1. Node.js: 设置环境变量 ${ckName}="sessionKey#userId"`); + $.log(` 2. 浏览器: 设置 localStorage.${ckName}="sessionKey#userId"`); + $.log(` 3. 本地文件: 创建 ${ckName}.txt 文件,每行一个 sessionKey#userId`); + return; + } + + const accounts = []; + for (let i = 0; i < cookies.length; i += 2) { + if (cookies[i] && cookies[i + 1]) { + accounts.push(`${cookies[i]}#${cookies[i + 1]}`); + } else if (cookies[i] && cookies[i].includes('#')) { + accounts.push(cookies[i]); + } + } + + if (!accounts.length) { + $.log("❌ CK格式错误,请检查是否为 'sessionKey#userId' 格式"); + return; + } + + $.log(`🎯 共加载 ${accounts.length} 个账号`); + + for (let i = 0; i < accounts.length; i++) { + const account = accounts[i]; + $.log(`\n📱 开始处理账号 ${i + 1}/${accounts.length}`); + + try { + const xlxyh = new XLXYH(account); + + await xlxyh.run(); + + const vlogCount = 1; // 只观看1个VLOG + await xlxyh.batchHandleVlogs(vlogCount); + + if (i < accounts.length - 1) { + await $.wait(3000); + } + } catch (error) { + $.log(`❌ 账号 ${i + 1} 处理失败: ${error.message}`); + } + } + + if ($.isNode()) { + try { + if (process.env.NOTIFY_TOKEN || process.env.PUSH_PLUS_TOKEN || process.env.SERVER_CHAN_TOKEN) { + await sendNotify($.name, $.logs.join("\n")); + } + } catch (error) { + } + } + + $.log("\n🎉 所有账号处理完成!"); +} + +main().catch(e => { + $.log(`❌ 脚本异常: ${e.message || e}`); + console.error(e.stack); +}).finally(() => { + $.done(); +}); + +async function sendNotify(title, content) { + if (!content) return; + + const notifyTokens = [ + process.env.NOTIFY_TOKEN, + process.env.PUSH_PLUS_TOKEN, + process.env.SERVER_CHAN_TOKEN + ].filter(token => token); + + for (const token of notifyTokens) { + try { + const notify = require('sendNotify'); + await notify.sendNotify(title, content); + break; + } catch (error) { + } + } +} diff --git a/wxapp/xbox.js b/wxapp/xbox.js new file mode 100644 index 0000000..596a2e5 --- /dev/null +++ b/wxapp/xbox.js @@ -0,0 +1,397 @@ +/** + * + * Xbox俱乐部 微信小程序 + * + * cron 0 0,7 * * * xbox_v2.js + * 多账号并行执行任务模板V2 + * 捉域名https://h5.youzan.com/wscuser/域名下的extra-data中的sid + */ +//=====================================================// +const $ = new Env("xbox俱乐部V2"); +const notify = $.isNode() ? require("../sendNotify") : ""; +const Notify = 1 +const debug = 0 +let ckStr = ($.isNode() ? process.env.xbox_data : $.getdata('xbox_data')) || ''; //检测CK 外部 +let msg = '', ck; +let host = 'h5.youzan.com'; +let hostname = 'https://' + host; +//---------------------------------------------------// +async function tips(ckArr) { + DoubleLog(`\n每日执行签到,积分兑换实物`); + //DoubleLog(`当前脚本版本 0.0.2\n📌,如果脚本版本不一致请及时更新`); + DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); +} +!(async () => { + let ckArr = await checkEnv(ckStr, "xbox_data"); //检查CK + await tips(ckArr); //脚本提示 + await start(); //开始任务 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + +//---------------------------------------------------------------------------------封装循环测试 +async function newstart(name, taskname, time) { //任务名 函数名 等待时间 + let ckArr = await checkEnv(ckStr, "xbox_data"); //检查CK + DoubleLog("\n📌📌📌📌📌📌📌📌" + name + "📌📌📌📌📌📌📌📌"); + for (i = 0; i < ckArr.length; i++) { + ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + //let CK = ckArr[i] + await taskname(); + await $.wait(time * 1000); + } +} +//-------------------------------------------------------------------------------封装循环测试 + +async function start() { + //console.log("\n📌📌📌📌📌📌📌📌执行任务1📌📌📌📌📌📌📌📌"); + //for (i = 0; i < ckArr.length; i++) { + // ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + // let CK = ckArr[i] + // await userinfo(); + // await $.wait(2 * 1000); + //} + await newstart("查询", userinfo, 2) + await newstart("签到", checkin, 2) + +} +//---------用户信息 +async function userinfo() { + try { + let url = { + url: `${hostname}/wscuser/membercenter/global.json?app_id=wx7f4f694622875202&kdt_id=100464643`, + headers: { + "Host": host, + "user-agent": "Mozilla/5.0 (Linux; Android 10; ELS-AN00) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36", + "extra-data": "{\"is_weapp\":1,\"sid\":\"" + ck[0] + "\"}" + }, + + }; + let result = await httpGet(url, `用户信息查询`); + + //console.log(result); + if (result?.code == 0) { + let nickName = result.data.user.nickName + await getpoints(nickName); + //console.log(`账号[` + Number(i + 1) + `]` + `用户[` + result.data.user.nickName + `]积分:` + points +`🎉`); + } else { + DoubleLog(`账号[` + Number(i + 1) + `]查询失败!`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + +} + + + +//------------------------------------------------------------------------------------------ +//用户积分查询 +async function getpoints(nickName) { + try { + let url = { + url: `${hostname}/wscuser/membercenter/stats.json?app_id=wx7f4f694622875202&kdt_id=100464643`, + headers: { + "Host": host, + "user-agent": "Mozilla/5.0 (Linux; Android 10; ELS-AN00) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36", + "extra-data": "{\"is_weapp\":1,\"sid\":\"" + ck[0] + "\"}" + }, + + }; + let result = await httpGet(url, `用户积分查询`); + + //console.log(result); + if (result?.code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `用户[` + nickName + `]积分:${result.data.stats.points} 🎉`); + } else { + DoubleLog(`账号[` + Number(i + 1) + `]查询失败!`); + //console.log(result); + } + } catch (error) { + DoubleLog(error); + } + +} + + +//用户签到 +async function checkin() { + try { + let url = { + url: `${hostname}/wscump/checkin/checkinV2.json?checkinId=1597464&app_id=wx7f4f694622875202&kdt_id=100464643`, + headers: { + "Host": host, + "user-agent": "Mozilla/5.0 (Linux; Android 10; ELS-AN00) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36", + "extra-data": "{\"is_weapp\":1,\"sid\":\"" + ck[0] + "\"}" + }, + + }; + let result = await httpGet(url, `签到`); + + //console.log(result); + if (result?.code == 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到:${result.msg} 获得:${result.data.list[0].infos.title}🎉`); + await wait(2); + } else if (result?.code == 1000030071) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到失败!原因${result.msg}`); + //console.log(result); + } else { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到失败!原因${result.msg}`) + } + } catch (error) { + DoubleLog(error); + } + +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// #region ******************************************************** 固定代码 ******************************************************** +/** + * 变量检查 + */ +async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) +} +/** + * 发送消息 + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("../sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * 双平台log输出 + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* 等待 X 秒 +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} + +/** + * get请求 + */ +async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * post请求 + */ +async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * 网络请求 (get, post等) + */ +async function httpRequest(postOptionsObject, tip, timeout = 3) { + return new Promise((resolve) => { + + let Options = postOptionsObject; + let request = require('request'); + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); + console.log(Options); + } + + request(Options, async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (!result) return; + resolve(result); + } catch (e) { + console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + } finally { + resolve(); + } + }), timeout + + }); +} + + +/** + * debug调试 + */ +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} + +// 完整 Env +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) } diff --git a/wxapp/yeyebupaocha.js b/wxapp/yeyebupaocha.js new file mode 100644 index 0000000..57cbf69 --- /dev/null +++ b/wxapp/yeyebupaocha.js @@ -0,0 +1,261 @@ + +/** + * 爷爷不泡茶 + * yybpc + * cron "10 8 * * *" yybpc.js + * export yybpc= qm-user-token 多账号换行或者#分隔 + */ +// ============================================================================================================ +const $ = new Env('vx爷爷不泡茶') +const axios = require('axios') +const env_name = 'yybpc' //环境变量名字 +const env = process.env[env_name] || '' +const Notify = 1 +const debug = 0 +let scriptVersionNow = "1.0.0"; +let msg = ""; +// ==================================异步顺序============================================================================== +!(async () => { + //await getNotice(); //远程通知 + //await getVersion("yang7758258/ohhh154@main/yybpc.js"); + await main();//主函数 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); +//==================================脚本入口函数main()============================================================== + +async function main() { + if (env == '') { + //没有设置变量,直接退出 + console.log(`没有填写变量,请查看脚本说明: ${env_name}`) + return + } + let user_ck = env.split('\n') + DoubleLog(`\n========= 共找到 ${user_ck.length} 个账号 =========`); + let index = 1 //用来给账号标记序号, 从1开始 + for (let ck of user_ck) { + if (!ck) continue //跳过空行 + let ck_info = ck.split('&') + let Authorization = ck_info[0] + //let uid = ck_info[0] + //let deviceCode = ck_info[2] + let user = { + index: index, + Authorization, + //uid, + //deviceCode, + } + index = index + 1 //每次用完序号+1 + //开始账号任务 + let Run = new run(); + await Run.userTask(user) + //每个账号之间等1~5秒随机时间 + let rnd_time = Math.floor(Math.random() * 4000) + 1000 + console.log(`随机等待${rnd_time / 1000}秒...`) + await $.wait(rnd_time) + } +} +// ======================================开始任务========================================= +class run { + constructor(user) { + + } +async userTask(user) { + console.log(`\n========= 账号[${user.index}] 开始任务 =========`) + await this.SignTask(user) + await wait(2) + await this.account(user) +} +// ============================================================================================================================= +//签到 + async SignTask(user) { + try { + DoubleLog(`🕊账号[${user.index}] 开始签到...`); + let urlObject = { + method: 'post', + url: `https://webapi.qmai.cn/web/cmk-center/sign/takePartInSign`, + headers: { + "qm-from": "wechat", + "qm-user-token": user.Authorization, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) XWEB/9129', + }, + data:{ + "activityId": "983701274523176960", + "appid": "wx3423ef0c7b7f19af" + } + } + // + let { data: result} = await axios.request(urlObject) + //console.log(result); + if (result?.status == true) { + //打印签到结果 + DoubleLog(`🕊账号[${user.index}] 签到成功🎉`); + }if(result?.data.sign == "false") { + DoubleLog(`🕊账号[${user.index}] 签到失败:原因未知🚫`) + }if (result?.status == false) { + DoubleLog(`🕊账号[${user.index}] 签到失败:${result.message}🚫`) + } + + + } catch (e) { + console.log(e); + } + } +//积分 +async account(user) { + try { + DoubleLog(`🕊账号[${user.index}] 开始查询积分...`); + let urlObject = { + method: 'post', + url: `https://webapi.qmai.cn/web/mall-apiserver/integral/user/points-info`, + headers: { + "qm-from": "wechat", + "qm-user-token": user.Authorization, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) XWEB/9129', + }, + data: { + "appid": "wx3423ef0c7b7f19af" + } + } + // + let { data: result} = await axios.request(urlObject) + //console.log(result); + if (result?.status == true) { + //打印签到结果 + DoubleLog(`🕊账号[${user.index}] 当前积分[${result.data.totalPoints}]🎉`); + }else { + DoubleLog(`🕊账号[${user.index}] 积分查询失败:${result.message}🚫`) + } + + + } catch (e) { + console.log(e); + } +} +} +/** + * =========================================================发送消息============================================= + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("../sendNotify"); + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} +/** + * =====================================================双平台log输出========================================== + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* ======================================================等待 X 秒============================================ +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} +/** +* ======================================================随机等待 1-5 秒============================================ +*/ +function sjwait() { + return new Promise(function (resolve) { + let waitTime = Math.floor(Math.random() * 4000 + 1000); + setTimeout(resolve, waitTime); + }); +} +// ==========================================================13位时间戳===================================================== +function getTimestamp() { + return new Date().getTime(); +} +//===============================================网络请求httpRequest========================================= +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} +//==============================================Debug模式=============================================== +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//===============================================获取远程通知======================================== +async function getNotice() { + try { + const urls = [ + "https://tfapi.cn/tl.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +//==============================================获取远程版本================================================= +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + DoubleLog(`\n当前版本:[${scriptVersionNow}]➡️➡➡️云端☁️版本:[${scriptVersionLatest}]`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} + +//=============================================================================================================================================== +//================================================固定API=============================================================================================== +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } diff --git a/wxapp/ylnn.js b/wxapp/ylnn.js new file mode 100644 index 0000000..36fe63e --- /dev/null +++ b/wxapp/ylnn.js @@ -0,0 +1,519 @@ +/* +@随缘撸豆 + 伊利牛奶小程序 cron 45 12 * * * https://raw.githubusercontent.com/liuqi6968/-/main/ylnn.js + + 地址: #小程序://伊利/1jrunQEW7zfybgI + +5.27 完成签到 + +------------------------ 青龙--配置文件-贴心复制区域 ---------------------- +# 伊利牛奶 小程序 +#小程序://伊利/1jrunQEW7zfybgI +抓取 https://msmarket.msx.digitalyili.com 中的access-token +export ylnn=" access-token " +多账号用 换行 或 @ 分割 +注意脚本运行以后 在登录小程序ck会失效 + + +这个就是以前畅意100 以前玩过的可以找客服把积分移过到这个小程序里面 +*/ + +const $ = new Env("伊利牛奶") +const CK_NAME = "ylnn" +const Notify = 1 // 通知控制 +const tgLogFlag = 1 // 是否tg发送通知, 偷撸车使用, 默认0--不发送 +let msg = '' +//=========================================================================== + +//=========================================================================== +// +async function main(userInfo) { + + await userInfo.sign() + await userInfo.point() + + + +} + + +class UserInfo { + constructor(index, str) { + this.user_log = `${$.name}\n` + this.index = index + 1 + + if (tgLogFlag) { + try { + this.ck = str + } catch (error) { + console.log(error) + } + } + + + } + + + + async sign() { + let name = "签到"; + let options = { + method: "post", + url: `https://msmarket.msx.digitalyili.com/gateway/api/member/daily/sign`, + headers: { + "Host": "msmarket.msx.digitalyili.com", + "charset": "utf-8", + "content-type": "application/json", + "access-token": `${this.ck}` + }, + body: `{}` + }; + // console.log(options); + + let res = await httpRequest(options); + // console.log(res); + if (res.status == true) { + this.cusLog(`账号 ${this.index} : 签到成功`) + } else if (res.status == false) { + this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`) + } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); + } + async point() { + let name = "个人信息"; + let options = { + method: "get", + url: `https://msmarket.msx.digitalyili.com/gateway/api/member/point`, + headers: { + "Host": "msmarket.msx.digitalyili.com", + "charset": "utf-8", + "content-type": "application/json", + "access-token": `${this.ck}` + } + + }; + // console.log(options); + + let res = await httpRequest(options); + // console.log(res); + if (res.status == true) { + this.cusLog(`账号 ${this.index} 总积分 : ${res.data} `) + } else if (res.status == false) { + this.cusLog(`账号 ${this.index} : ck过期 请重新抓取 access-token`) + } else this.cusLog(`账号[${this.index}] ${name} 失败 ❌ 了呢`), console.log(res); + } + + + + + + + + + + + + async Sendtg_bot() { + const TelegramBot = require('node-telegram-bot-api'); + const tg_token = process.env.tg_token; + // console.log(tg_token); + let bot = new TelegramBot(tg_token); + let msg = this.user_log; + // console.log(`=================`); + // console.log(this.chatId, msg); + await bot.sendMessage(this.chatId, msg); + } + + + cusLog(a) { + if (tgLogFlag) { + console.log(` ${a}`); + msg += `\n ${a}`; + this.user_log += `\n ${a}`; + } else { + console.log(` ${a}`); + msg += `\n ${a}`; + } + } + + +} + + + + + +/////////////////////////////////////////////////////////////////// + +// 入口 +!(async () => { + const notify = require("../sendNotify"); + $.doubleLog(await $.yiyan()); + let users = await getUsers(CK_NAME, async (index, element) => { + let userInfo = new UserInfo(index, element); + return userInfo; + }); + + list = []; + users.forEach(async element => { + list.push(main(element)); + }); + + await Promise.all(list); + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +// ============================================================================== +async function getUsers(ckName, fnUserInfo) { + let userList = []; + let userCookie = process.env[ckName]; + let envSplicer = ["@", "\n", "&"]; + let userCount = 0; + if (userCookie) { + let e = envSplicer[0]; + for (let o of envSplicer) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + let arr = userCookie.split(e); + for (let index = 0; index < arr.length; index++) { + const element = arr[index]; + element && userList.push(await fnUserInfo(index, element)); + } + userCount = userList.length; + } else { + console.log("抓取https://msmarket.msx.digitalyili.com 中的access-token"); + } + console.log(`共找到${userCount}个账号`), !0; + return userList; +} + +async function httpRequest(options, type = false) { + return new Promise((resolve) => { + try { + $.send(options, async (err, res_body, res_format, res) => { + if (err) { + console.log(`错误, 检查点--2`); return; + } + if (!type) { + resolve(res_body); + } resolve(res_format); + }); + } catch (error) { + console.log(error); + } + + }); +} + + + + + + + +// ============================================================================================================================ + +// 新的 env 函数, 增加自定义功能 yml-11.12改 合并 +function Env(name, env) { + "undefined" != typeof process && + JSON.stringify(process.env).indexOf("GITHUB") > -1 && + process.exit(0); + return new (class { + constructor(name, env) { + this.name = name; + this.notifyStr = ""; + this.notifyFlag = false; + this.startTime = new Date().getTime(); + Object.assign(this, env); + console.log(`${this.name} 开始运行: \n`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + send(options, e = () => { }) { + let m = options.method.toLowerCase(); + let t = options; + if (m != "get" && m != "post" && m != "put" && m != "delete") { + console.log(`无效的http方法: ${m}`); + return; + } + if (m == "get" && t.headers) { + // delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if (t.body && t.headers) { + if (t.headers["content-type"]) { + let tem = t.headers["content-type"]; + delete t.headers["content-type"]; + t.headers["Content-Type"] = tem; + } else if (t.body && t.headers) { + if (!t.headers["Content-Type"]) + t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + } + if (this.isNode()) { + this.request = this.request ? this.request : require("request"); + this.request(options, function (error, response) { + if (error) throw new Error(error); + let res_body = response.body; + let res = response; + try { + if (typeof res_body == "string") { + if ($.isJsonStr(res_body)) { + res_body = JSON.parse(res_body); + let res_format = $.formatJson(response.body); + e(null, res_body, res_format, res); + } else e(null, res_body, res_format, res); + } else e(null, res_body, res_format, res); + } catch (error) { + console.log(error); + let a = `ENV -- request 请求错误, 检查点1\n${error}`; + e(a, null, null, null); + } + }); + } + } + isJsonStr(str) { + if (typeof str == "string") { + try { + if (typeof JSON.parse(str) == "object") { + return true; + } + } catch (e) { + return false; + } + } + return false; + } + formatJson(value) { + var json = value; + var i = 0, + len = 0, + tab = " ", + targetJson = "", + indentLevel = 0, + inString = false, + currentChar = null; + for (i = 0, len = json.length; i < len; i += 1) { + currentChar = json.charAt(i); + switch (currentChar) { + case "{": + case "[": + if (!inString) { + targetJson += currentChar + "\n" + repeat(tab, indentLevel + 1); + indentLevel += 1; + } else { + targetJson += currentChar; + } + break; + case "}": + case "]": + if (!inString) { + indentLevel -= 1; + targetJson += "\n" + repeat(tab, indentLevel) + currentChar; + } else { + targetJson += currentChar; + } + break; + case ",": + if (!inString) { + targetJson += ",\n" + repeat(tab, indentLevel); + } else { + targetJson += currentChar; + } + break; + case ":": + if (!inString) { + targetJson += ": "; + } else { + targetJson += currentChar; + } + break; + case " ": + case "\n": + case "\t": + if (inString) { + targetJson += currentChar; + } + break; + case '"': + if (i > 0 && json.charAt(i - 1) !== "\\") { + inString = !inString; + } + targetJson += currentChar; + break; + default: + targetJson += currentChar; + break; + } + } + function repeat(s, count) { + return new Array(count + 1).join(s); + } + function repeat(s, count) { + return new Array(count + 1).join(s); + } + return targetJson; + } + type(str) { + if (this.strCode(str) > 20) { + return console.log(`数据类型是: ${typeof str}`); + } + return console.log(`${str}数据类型是: ${typeof str}`); + } + strCode(str) { + var count = 0; + if (str) { + let len = str.length; + for (var i = 0; i < len; i++) { + if (str.charCodeAt(i) > 255) { + count += 2; + } else { + count++; + } + } + return count; + } else return 0; + } + async SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("../sendNotify"); + await notify.sendNotify($.name, message); + } else { + console.log($.name, "", message); + } + } else { + console.log(message); + } + } + getMin(a, b) { + return a < b ? a : b; + } + getMax(a, b) { + return a < b ? b : a; + } + json2str(obj, c, encodeUrl = false) { + let ret = []; + for (let keys of Object.keys(obj).sort()) { + let v = obj[keys]; + if (v && encodeUrl) v = encodeURIComponent(v); + ret.push(keys + "=" + v); + } + return ret.join(c); + } + str2json(str, decodeUrl = false) { + let ret = {}; + for (let item of str.split("&")) { + if (!item) continue; + let idx = item.indexOf("="); + if (idx == -1) continue; + let k = item.substr(0, idx); + let v = item.substr(idx + 1); + if (decodeUrl) v = decodeURIComponent(v); + ret[k] = v; + } + return ret; + } + randomStr(len, up = false, charset = "abcdef0123456789") { + let str = ""; + for (let i = 0; i < len; i++) { + str += charset.charAt(Math.floor(Math.random() * charset.length)); + } + if (!up) { + return str; + } + return str.toUpperCase(); + } + phoneNum(phone_num) { + if (phone_num.length == 11) { + let data = phone_num.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2"); + return data; + } else { + return phone_num; + } + } + randomInt(min, max) { + return Math.round(Math.random() * (max - min) + min); + } + async yiyan() { + this.request = this.request ? this.request : require("request"); + return new Promise((resolve) => { + var options = { + method: "GET", + url: "https://v1.hitokoto.cn/", + headers: {}, + }; + this.request(options, function (error, response) { + let data = JSON.parse(response.body); + let data_ = `[一言]: ${data.hitokoto} by--${data.from}`; + resolve(data_); + }); + }); + } + wait(t) { + return new Promise((e) => setTimeout(e, t * 1000)); + } + ts(type = false, _data = "") { + let myDate = new Date(); + let a = ""; + switch (type) { + case 10: + a = Math.round(new Date().getTime() / 1000).toString(); + break; + case 13: + a = Math.round(new Date().getTime()).toString(); + break; + case "h": + a = myDate.getHours(); + break; + case "m": + a = myDate.getMinutes(); + break; + case "y": + a = myDate.getFullYear(); + break; + case "h": + a = myDate.getHours(); + break; + case "mo": + a = myDate.getMonth(); + break; + case "d": + a = myDate.getDate(); + break; + case "ts2Data": + if (_data != "") { + time = _data; + if (time.toString().length == 13) { + let date = new Date(time + 8 * 3600 * 1000); + a = date.toJSON().substr(0, 19).replace("T", " "); + } else if (time.toString().length == 10) { + time = time * 1000; + let date = new Date(time + 8 * 3600 * 1000); + a = date.toJSON().substr(0, 19).replace("T", " "); + } + } + break; + default: + a = "未知错误,请检查"; + break; + } + return a; + } + doubleLog(a) { + console.log(` ${a}`); + msg += `\n ${a}`; + } + async done(t = {}) { + await $.SendMsg(msg); + const e = new Date().getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`); + } + })(name, env); +} \ No newline at end of file diff --git a/wxapp/zhanma.js b/wxapp/zhanma.js new file mode 100644 index 0000000..1dd08fb --- /dev/null +++ b/wxapp/zhanma.js @@ -0,0 +1,957 @@ + +/** + + * 多账号使用 @ 或者 & 或 新建多个环境变量 + * cron: 12 8 * * * + * safe的值 + */ + +const $ = Env('战马能量星球'); +const notify = $.isNode() ? require('../sendNotify') : ''; // 这里是 node(青龙属于node环境)通知相关的 +const Notify = 0; //0为关闭通知,1为打开通知,未添加 +const debug = 0; //0为关闭调试,1为打开调试,默认为0 +const ganta = 1; //0为关闭饲料互助,1为打开互助,默认为1 +const addFriend = 1; //0为关闭加好友,1为打开加好友,默认为1 +////////////////////////////////////////////////////////////////// +let zmnlxq = process.env.zmnlxq; +let zmnlxqArr = []; +let frinds = []; +let totalAccountsfrinds = []; +let data = ''; +let msg = ''; +let Version = "1.0.0"; +let VersionLatest = ''; +let ok = '' + + +!(async () => { + + if (!(await Envs())) //多账号分割 判断变量是否为空 初步处理多账号 + return; + else { + //await getVersion(); + console.log(``) + console.log(`目前实现功能:日常签到、摸马儿、喂马、偷饲料、分享马儿、喂饲料、互助点赞、完善个人信息`); + + console.log(`\n\n========================================= \n脚本执行 - 北京时间(UTC+8):${new Date( + new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + + 8 * 60 * 60 * 1000).toLocaleString()} \n=========================================\n`); + + console.log(`\n=================== 共找到 ${zmnlxqArr.length} 个账号 ===================`) + if (addFriend) { + for (let index = 0; index < zmnlxqArr.length; index++) { + zmnlxq = zmnlxqArr[index] + console.log('去加好友'); + await $.wait(200); + for (let index2 = 0; index2 < zmnlxqArr.length; index2++) { + if (index != index2) { + await getranklist(true, zmnlxqArr[index2]); + await $.wait(2 * 1000); + } + } + } + } + + for (let index = 0; index < zmnlxqArr.length; index++) { + let num = index + 1 + zmnlxq = zmnlxqArr[index] + console.log(`\n========= 开始【第 ${num} 个账号】执行任务=========\n`) + // data = zmnlxqArr[index].split('&'); + + console.log('开始获取信息'); + await getuser(); + await $.wait(2 * 1000); + + if (ok == 1) { + console.log('开始签到'); + await $.wait(2 * 1000); + await checkin(); + + console.log('查询题库'); + await $.wait(2 * 1000); + await gettiku(); + + console.log('分享任务'); + await getshare(); + await $.wait(2 * 1000); + + console.log('加入排行榜'); + await joinxcx(); + await $.wait(2 * 1000); + + console.log('领取小马儿'); + await getmaer(); + await $.wait(2 * 1000); + + console.log('摸一摸'); + await getmoyimo(); + await $.wait(2 * 1000); + + console.log('马儿分享任务'); + await checkslgift(); + await $.wait(2 * 1000); + + console.log('去喂马'); + await getweima(); + await $.wait(2 * 1000); + + console.log('去点赞'); + await getranklist(); + await $.wait(2 * 1000); + } + } + + if (ganta) { + for (let index = 0; index < zmnlxqArr.length; index++) { + let num = index + 1 + zmnlxq = zmnlxqArr[index] + console.log(`\n========= 开始【第 ${num} 个账号】执行饲料互助=========\n`) + let isCompletedTousiliao = false, isCompletedSongsiliao = false; + for (let num2 = 0; num2 < totalAccountsfrinds.length; num2++) { + await getotherhorseinfo(totalAccountsfrinds[num2]?.id); + if (!isCompletedTousiliao) { + console.log('去偷饲料'); + isCompletedTousiliao = await tousiliao(num2); + await $.wait(2 * 1000); + } + if (!isCompletedSongsiliao) { + console.log('去送饲料'); + isCompletedSongsiliao = await songsiliao(num2); + } + if (isCompletedSongsiliao && isCompletedTousiliao) { + console.log('今日已到上限,无需执行!'); + break; + } + } + } + } + + await SendMsg(msg); // 与发送通知有关系 + } + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()) + +/** + * 获取信息 + * + */ +async function getuser (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/getusercenter.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + ok = 1; + console.log(`用户:${result.nickname}` + `当前能量:${result.nowscore} `); + if (result.isgzhkl == 0) { + console.log('公众号口令任务:未完成' + '\n' + '开始完成任务') + await gzhkl(); + } + if (result.isinfo == 0) { + console.log('完善个人资料:未完成' + '\n' + '开始完成任务') + let tel = await getTel(); + if (tel) { + await saveuserinfo(result.headimgurl, result.nickname, Math.random().toFixed(0), new Date().getFullYear() + '-' + (new Date().getMonth() + 1) + '-' + new Date().getDate(), tel); + } else { + console.log('未授权手机号,无法完善个人资料') + } + } + } else { + + console.log(`信息获取失败请检查`) + + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 获取手机号 + * + */ +function getTel (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/getuserinfo.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + + if (result.status == 1) { + + console.log(result.msg) + + } else { + + console.log(result.msg) + + } + } catch (e) { + console.log(e) + } finally { + resolve(result.tel); + } + }, timeout) + }) +} + +/** + * 签到 + * + */ +function checkin (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/checkin.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + + if (result.status == 1) { + + console.log(result.msg) + + } else { + + console.log(result.msg) + + } + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 小程序添加好友任务 + * + */ +function joinxcx (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/joinxcx.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log('加入排行榜成功!'); + } else { + console.log('加入排行榜:', result.msg) + + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 小程序获取好友列表 + * + */ +function getranklist (addFriend = false, fromsafe = '', timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/getranklist.php?safe=${zmnlxq}&type=1&fromsafe=${fromsafe}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data); + if (result.status == 1) { + if (addFriend) { + console.log('添加好友成功'); + } else { + frinds = result?.data?.filter(item => item?.ismy != 1)?.filter(item => item?.id != 0); + totalAccountsfrinds = [...totalAccountsfrinds, ...result?.data?.filter(item => item?.id != 0)]; + notLikedfrinds = frinds?.filter(item => item?.iszan == 0); + console.log('获取到' + frinds?.length + '个好友,其中' + notLikedfrinds?.length + '个可点赞'); + let isCompleteLiked = false; + for (let index = 0; index < notLikedfrinds.length; index++) { + const notLikedfrind = notLikedfrinds[index]; + if (!isCompleteLiked) { + isCompleteLiked = like(notLikedfrind.id) + }; + getotherhorseinfo(notLikedfrind.id); + await $.wait(500); + } + } + } else { + console.log('获取好友失败:', result.msg) + + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 小程序加为好友 + * + */ +function getotherhorseinfo (likeUserId, timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/getotherhorseinfo.php?safe=${zmnlxq}&friendid=${likeUserId}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log('加为饲料互助好友成功!'); + } else { + console.log('加为饲料互助好友失败:', result.msg) + + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 小程序点赞 + * + */ +function like (likeUserId, timeout = 2 * 1000) { + let isCompleted = false; + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/subrank.php?safe=${zmnlxq}&id=${likeUserId}&type=1`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log('点赞成功!'); + } else { + console.log('点赞失败:', result.msg) + isCompleted = result?.msg?.includes('您今天的互动已到上限'); + } + + } catch (e) { + console.log(e) + } finally { + resolve(isCompleted); + } + }, timeout) + }) +} + +/** + * 小程序分享任务 + * + */ +function getshare (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/share.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + } else { + console.log(result.msg) + + } + + } catch (e) { + console.log('数据异常:', data); + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 小程序战马分享任务 + * + */ +function checkslgift (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/checkslgift.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + } else { + console.log(result.msg) + + } + + } catch (e) { + console.log('数据异常:', data); + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 小程序完善信息 + * + */ +function saveuserinfo (avatar, nickname, sex, birthday, tel, timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/saveuserinfo.php?safe=${zmnlxq}&avatar=${encodeURIComponent(avatar)}&nickname=${encodeURIComponent(nickname)}&uname=${encodeURIComponent(nickname)}&sex=${sex}&birthday=${birthday}&tel=${tel}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + } else { + console.log(result.msg) + + } + + } catch (e) { + console.log('数据异常:', data); + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 公众号口令只可完成一次 + * + */ +function gzhkl (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/gzhkl.php?safe=${zmnlxq}&kl=${encodeURIComponent('有能量 当燃战马!')}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 0) { + + console.log(result.msg) + + } else { + + console.log(result.msg) + + } + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + + +/** + * 查询题库 + * + */ +async function gettiku (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/getquesbackstatus.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + + console.log('刷新题目') + + await $.wait(2 * 1000); + await getques(); + + console.log('开始去答题' + '\n' + '因为是自定义答题,不排除黑号风险' + '\n' + '后期有能力修改题目获取方式'); + + await $.wait(2 * 1000); + await ques1(); + + await $.wait(2 * 1000); + await ques2(); + + await $.wait(2 * 1000); + await ques3(); + + } else { + console.log(result.msg) + } + + + + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 刷新题目 + * + */ +function getques (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/getques.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + console.log(result.msg) + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + + + +/** + * 答题1 + * + */ +function ques1 (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/subques.php?safe=${zmnlxq}&qid=126&val=C`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + } else { + console.log(result.msg) + } + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + + +/** + * 答题2 + * + */ +function ques2 (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/subques.php?safe=${zmnlxq}&qid=138&val=C`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + } else { + console.log(result.msg) + + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + + +/** + * 答题3 + * + */ +function ques3 (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/subques.php?safe=${zmnlxq}&qid=119&val=A`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + if (result.status == 1) { + console.log(result.msg) + } else { + console.log(result.msg) + + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + + +/** + * 领养马儿 + * + */ +function getmaer (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/starthorse.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + + console.log(result.msg) + + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 摸一摸 + * + */ +function getmoyimo (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/strokehorse.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + + console.log(result.msg) + + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + +/** + * 喂马 + * + */ +async function getweima (timeout = 2 * 1000) { + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/horseeat.php?safe=${zmnlxq}`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + + if (result.status != 0) { + await getweima(); + await $.wait(2 * 1000) + } else { + console.log(result.msg) + } + + } catch (e) { + console.log(e) + } finally { + resolve(); + } + }, timeout) + }) +} + + +/** + * 偷饲料 + * + */ +function tousiliao (num2) { + let isCompleted = false; + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/subhorseplayer.php?safe=${zmnlxq}&friendid=${totalAccountsfrinds[num2]?.id}&type=1`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + isCompleted = result?.msg?.includes('已到上限'); + console.log(result.msg) + } catch (e) { + console.log(e) + } finally { + resolve(isCompleted); + } + },) + }) +} + +/** + * 送饲料 + * + */ +function songsiliao (num2) { + let isCompleted = false; + return new Promise((resolve) => { + let url = { + url: `https://zm.t7a.cn/api/subhorseplayer.php?safe=${zmnlxq}&friendid=${totalAccountsfrinds[num2]?.id}&type=2`, + headers: { + 'Host': 'zm.t7a.cn', + '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/86.0.4240.99 XWEB/3235 MMWEBSDK/20220204 Mobile Safari/537.36 MMWEBID/6242 MicroMessenger/8.0.20.2080(0x28001435) Process/appbrand0 WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx532ecb3bdaaf92f9' + }, + // body: '', + + } + $.get(url, async (error, response, data) => { + try { + result = JSON.parse(data) + isCompleted = result?.msg?.includes('已到上限'); + console.log(result.msg) + } catch (e) { + console.log(e) + } finally { + resolve(isCompleted); + } + },) + }) +} + +/** +* 获取远程版本,鸟VPS不改post请求获取不了内容 +*/ +function getVersion (timeout = 3 * 1000) { + return new Promise((resolve) => { + let url = { + url: `http://www.holyxie.com/script/zmnlxq/zmnlxq.js`, + } + $.post(url, async (err, resp, data) => { + try { + VersionLatest = data.match(/"\d.+"/) + console.log(`最新版本号为:${VersionLatest}`); + } catch (e) { + $.logErr(e, resp); + } finally { + resolve() + } + }, timeout) + }) +} + + +//#region 固定代码 可以不管他 +// ============================================变量检查============================================ \\ +async function Envs () { + if (zmnlxq) { + if (zmnlxq.indexOf("@") != -1) { + zmnlxq.split("@").forEach((item) => { + zmnlxqArr.push(item); + }); + } else if (zmnlxq.indexOf("&") != -1) { + zmnlxq.split("&").forEach((item) => { + zmnlxqArr.push(item); + }); + } else { + zmnlxqArr.push(zmnlxq); + } + } else { + console.log(`\n 【${$.name}】:未填写变量 zmnlxq`) + return; + } + + return true; +} + +// ============================================发送消息============================================ \\ +async function SendMsg (message) { + if (!message) + return; + + if (Notify > 0) { + if ($.isNode()) { + var notify = require('../sendNotify'); + await notify.sendNotify($.name, message); + } else { + $.msg(message); + } + } else { + console.log(message); + } + +} +// prettier-ignore 固定代码 不用管他 +function Env (t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("xxxxxx") > -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) } diff --git a/wxapp/zippo.js b/wxapp/zippo.js new file mode 100644 index 0000000..52f68f3 --- /dev/null +++ b/wxapp/zippo.js @@ -0,0 +1,516 @@ + +/** + * + * zippo + * + * cron 0 0,7 * * * zippo.js + * 多账号并行执行任务模板 + * 抓域名wx-center.zippo.com.cn/下 请求authorization + * export zippo= 多账号换行或者& + */ +//=====================================================// +const $ = new Env("zippo"); +const Notify = 1 +const debug = 0 +const axios = require("axios"); +let ckStr = ($.isNode() ? process.env.zippo : $.getdata('zippo')) || ''; //检测CK 外部 +let msg, ck; +let host = 'wx-center.zippo.com.cn'; +let hostname = 'https://' + host; +let scriptVersionNow = "1.0.1"; +//---------------------------------------------------// +async function tips(ckArr) { + //DoubleLog(`当前脚本版本${Version}\n📌,如果脚本版本不一致请及时更新`); + console.log("完成积分签到与收藏任务"); + DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); + debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); +} +!(async () => { + let ckArr = await checkEnv(ckStr, "zippo"); //检查CK + //await getNotice(); //远程通知 + //await getVersion("yang7758258/ohhh154@main/zippo会员签到.js"); + await tips(ckArr); //脚本提示 + await start(); //开始任务 + await SendMsg(msg); //发送通知 + +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done()); + + +//---------------------------------------------------------------------------------封装循环测试 +async function newstart(name, taskname, time) { //任务名 函数名 等待时间 + let ckArr = await checkEnv(ckStr, "zippo"); //检查CK + console.log("\n📌📌📌📌📌📌📌📌" + name + "📌📌📌📌📌📌📌📌"); + for (i = 0; i < ckArr.length; i++) { + ck = ckArr[i].split("&"); //单账号多变量分割符,如果一个账号需要user和token两个变量,那么则输入user1&token1@user2&token2... + //let CK = ckArr[i] + await taskname(); + await $.wait(time * 1000); + } +} +//-------------------------------------------------------------------------------封装循环测试 + +async function start() { + await newstart("登录/CK检测", userinfo, 1); + await newstart("开始签到", dailySign, 1); + await newstart("开始收藏任务", shoucang, 1); + await newstart("开始领取", lingjiang, 1); + await newstart("当前积分查询", jifen, 1); +} + + + + +//------------------------------------------------------------------------------------------ +//用户信息查询 +async function userinfo() { + try { + let url = { + url: `${hostname}/api/users/profile`, + headers: { + 'x-app-id': 'zippo', + 'x-platform-id': 'wxaa75ffd8c2d75da7', + 'x-platform-env': 'release', + 'x-platform': 'wxmp', + 'authorization': ck[0], + 'xweb_xhr': 1, + 'sec-fetch-site': 'cross-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://servicewechat.com/wxaa75ffd8c2d75da7/76/page-frame.html', + 'accept-language': 'zh-CN,zh;q=0.9', + }, + + }; + let result = await httpGet(url, `用户信息查询`); + + //console.log(result); + if (result?.code != 401) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `当前用户为🌸[${result.phone}]🎉`); + //let phone = result.data.phone + //let jifen = result?.data.memberInfo.totalScore + } if (result?.code == 401) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `查询失败,可能是CK失效!`); + //console.log(result); + } + + } catch (error) { + //console.log(error); + console.log("服务器卡爆啦"); + } + +} + +//积分查询 +async function jifen() { + try { + let url = { + url: `${hostname}/api/users/points?withoutList=1`, + headers: { + 'x-app-id': 'zippo', + 'x-platform-id': 'wxaa75ffd8c2d75da7', + 'x-platform-env': 'release', + 'x-platform': 'wxmp', + 'authorization': ck[0], + 'xweb_xhr': 1, + 'sec-fetch-site': 'cross-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://servicewechat.com/wxaa75ffd8c2d75da7/76/page-frame.html', + 'accept-language': 'zh-CN,zh;q=0.9', + }, + + }; + let result = await httpGet(url, `当前积分查询`); + if (result?.balance != 0) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `当前积分为💰[${result.balance}]🎉`); + }if (result?.code == 401) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `查询失败,可能是CK失效!`); + } + + + + + + } catch (error) { + console.log("请检查环境变量是否正确"); + + } + +} + + + + + + +//用户签到 POST +async function dailySign() { + try { + let url = { + url: `${hostname}/api/daily-signin`, + headers: { + 'x-app-id': 'zippo', + 'x-platform-id': 'wxaa75ffd8c2d75da7', + 'x-platform-env': 'release', + 'x-platform': 'wxmp', + 'authorization': ck[0], + 'xweb_xhr': 1, + 'sec-fetch-site': 'cross-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://servicewechat.com/wxaa75ffd8c2d75da7/76/page-frame.html', + 'accept-language': 'zh-CN,zh;q=0.9', + }, + }; + let result = await httpPost(url, `签到`); + + //console.log(result); + if (result?.code != 'already_signed') { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到成功,获得积分:${result.count}🎉`); + await wait(2); + } if (result?.code == 'already_signed') { + DoubleLog(`账号[` + Number(i + 1) + `]` + `签到失败:${result.message}`); + } + + + + } catch (error) { + //console.log(error); + console.log("好像出了点小问题"); + } + +} +//用户收藏任务 POST +async function shoucang() { + try { + let host = 'wx-center.zippo.com.cn'; + let hostname = 'https://' + host; + let url = `${hostname}/api/favorites` + let body = { + "targetType": "sku", + "targetId": "265", + "favorited": true + } + + const result = await axios.post(url, body, { + headers: { + 'x-app-id': 'zippo', + 'x-platform-id': 'wxaa75ffd8c2d75da7', + 'x-platform-env': 'release', + 'x-platform': 'wxmp', + 'authorization': ck[0], + 'xweb_xhr': '1', + 'sec-fetch-site': 'cross-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://servicewechat.com/wxaa75ffd8c2d75da7/76/page-frame.html', + 'accept-language': 'zh-CN,zh;q=0.9', + } + }) + const r = result.data; + //console.log(result); + if (r?.favorited == true) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `任务成功,id编号:${result.data.targetId}🎉`); + await wait(2); + }if (r?.code == 400) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `任务失败:${result.data.message}`); + } + }catch (error) { + //console.log(error); + console.log("好像出了点小问题"); + } +} + +//用户领奖 POST +async function lingjiang() { + try { + let url = { + url: `${hostname}/api/missions/5/rewards`, + headers: { + 'x-app-id': 'zippo', + 'x-platform-id': 'wxaa75ffd8c2d75da7', + 'x-platform-env': 'release', + 'x-platform': 'wxmp', + 'authorization': ck[0], + 'xweb_xhr': 1, + 'sec-fetch-site': 'cross-site', + 'sec-fetch-mode': 'cors', + 'sec-fetch-dest': 'empty', + 'referer': 'https://servicewechat.com/wxaa75ffd8c2d75da7/76/page-frame.html', + 'accept-language': 'zh-CN,zh;q=0.9', + }, + body: JSON.stringify({"id":5}), + }; + let result = await httpPost(url, `领取奖励`); + + //console.log(result); + if (result?.rewardValue == 5) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `领取成功,获得积分💰:${result.rewardValue}🎉`); + await wait(2); + } if (result?.code == 400) { + DoubleLog(`账号[` + Number(i + 1) + `]` + `领取失败:${result.message}`); + } + + + + } catch (error) { + //console.log(error); + console.log("好像出了点小问题"); + } + +} + + + +// #region ******************************************************** 固定代码 ******************************************************** +/** + * 变量检查 + */ +async function checkEnv(ck, Variables) { + return new Promise((resolve) => { + let ckArr = [] + if (ck) { + if (ck.indexOf("@") !== -1) { + + ck.split("@").forEach((item) => { + ckArr.push(item); + }); + } else if (ck.indexOf("\n") !== -1) { + + ck.split("\n").forEach((item) => { + ckArr.push(item); + }); + } else { + ckArr.push(ck); + } + resolve(ckArr) + } else { + console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) + } + } + ) +} +/** + * 发送消息 + */ +async function SendMsg(message) { + if (!message) return; + if (Notify > 0) { + if ($.isNode()) { + var notify = require("../sendNotify"); + //let text = '仅完成积分签到\n@auth:Mist\n@date:2024-05-29\n注: 本脚本仅用于个人学习和交流请勿用于非法用途。用户应当遵守所有适用的法律和规定。在任何情况下,脚本的开发者或贡献者均不对任何直接或间接使用本脚本而产生的结果负责。' + await notify.sendNotify($.name, message); + } else { + // $.msg(message); + $.msg($.name, '', message) + } + } else { + console.log(message); + } +} + +/** + * 双平台log输出 + */ +function DoubleLog(data) { + if ($.isNode()) { + if (data) { + console.log(`${data}`); + msg += `\n${data}`; + } + } else { + console.log(`${data}`); + msg += `\n${data}`; + } + +} +/** +* 等待 X 秒 +*/ +function wait(n) { + return new Promise(function (resolve) { + setTimeout(resolve, n * 1000); + }); +} + +/** + * get请求 + */ +async function httpGet(getUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = getUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.get( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * post请求 + */ +async function httpPost(postUrlObject, tip, timeout = 3) { + return new Promise((resolve) => { + let url = postUrlObject; + if (!tip) { + let tmp = arguments.callee.toString(); + let re = /function\s*(\w*)/i; + let matches = re.exec(tmp); + tip = matches[1]; + } + if (debug) { + console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); + console.log(url); + } + + $.post( + url, + async (err, resp, data) => { + try { + if (debug) { + console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); + console.log(data); + console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); + console.log(JSON.parse(data)); + } + let result = JSON.parse(data); + if (result == undefined) { + return; + } else { + resolve(result); + } + + } catch (e) { + //console.log(err, resp); + console.log(`\n ${tip} 失败了!请稍后尝试!!`); + msg = `\n ${tip} 失败了!请稍后尝试!!` + console.log("服务器卡爆啦"); + } finally { + resolve(); + } + }, + timeout + ); + }); +} + +/** + * 网络请求 (get, post等) + */ +function httpRequest(options, timeout = 1 * 1000) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise(resolve => { + setTimeout(() => { + $[method](options, (err, resp, data) => { + try { + if (err) { + console.log(JSON.stringify(err)); + $.logErr(err); + } else { + try { data = JSON.parse(data); } catch (error) { } + } + } catch (e) { + console.log(e); + $.logErr(e, resp); + } finally { + resolve(data); + } + }) + }, timeout) + }) +} + + +/** + * debug调试 + */ +function debugLog(...args) { + if (debug) { + console.log(...args); + } +} +//获取远程通知 +async function getNotice() { + try { + const urls = [ + "https://gitee.com/ohhhooh/jd_haoyangmao/raw/master/Notice.json", + + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} + +/** + * 获取远程版本 + */ +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} + + + + +// 完整 API +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("../sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/wxapp/可口可乐吧.js b/wxapp/可口可乐吧.js new file mode 100644 index 0000000..6fefa99 --- /dev/null +++ b/wxapp/可口可乐吧.js @@ -0,0 +1,294 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 测试 +------------------------------------------ +#Notice: + 变量名kekoukeleba 抓小程序可口可乐吧 member-api.icoke.cn/api Headers中 authorization 去掉Bearer 多账号&连接 +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("可口可乐吧"); +let ckName = `kekoukeleba`; +const strSplitor = "#"; +const envSplitor = ["&", "\n"]; +const notify = $.isNode() ? require("../sendNotify") : ""; +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" + +class Public { + async request(options) { + return await axios.request(options); + } +} +class Task extends Public { + constructor(env) { + + super(); + this.index = $.userIdx++ + let user = env.split("#"); + this.token = user[0]; + this.isSign = false; + } + async addSign() { + let options = { + method: "GET", + url: "https://member-api.icoke.cn/api/icoke-sign/icoke/mini/sign/main/sign", + headers: { + "accept": "application/json, text/plain, */*", + "accept-language": "zh-CN,zh;q=0.9", + "authorization": "Bearer " + this.token, + "content-type": "application/json", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1", + "Referer": "https://servicewechat.com/wxa5811e0426a94686/421/page-frame.html", + "Referrer-Policy": "unsafe-url" + }, + + } + try { + let { data: res } = await this.request(options); + if (res.success == true) { + $.log(`签到成功 获得【${res.point}】快乐瓶`) + } else { + $.log(`签到失败`) + console.log(res); + } + } catch (e) { + console.log(e); + + } + } + async userInfo() { + let options = { + method: "GET", + url: "https://member-api.icoke.cn/api/icoke-customer/icoke/mini/customer/main/points", + headers: { + "accept": "application/json, text/plain, */*", + "accept-language": "zh-CN,zh;q=0.9", + "authorization": "Bearer " + this.token, + "content-type": "application/json", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1", + "Referer": "https://servicewechat.com/wxa5811e0426a94686/421/page-frame.html", + "Referrer-Policy": "unsafe-url" + }, + + } + try { + let { data: res } = await this.request(options); + $.log(`目前还剩【${res.point}】瓶 `) + + } catch (e) { + console.log(e); + + } + } + async run() { + + await this.userInfo(); + + await this.addSign(); + + + + } + + +} + + + + + + + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + // + + await new Task(user).run(); + + } + + +})() + .catch((e) => console.log(e)) + .finally( () => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await new Public().request(options); + $.log(res) + return res +} + + +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done(t = {}) { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} \ No newline at end of file diff --git a/wxapp/哪吒汽车.js b/wxapp/哪吒汽车.js new file mode 100644 index 0000000..4fbb510 --- /dev/null +++ b/wxapp/哪吒汽车.js @@ -0,0 +1,23 @@ +/** + * 哪吒汽车 V1.00 + * 仅供学习交流,请在下载后的24小时内完全删除 请勿将任何内容用于商业或非法目的,否则后果自负。 + * const $ = new Env("哪吒汽车"); + * + * cron 0 8,10,14,20 * * * 哪吒汽车.js + * + * 直接微信搜索 哪吒汽车,小程序即可,别下载app了 + * + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export nzqc='抓包返回的refresh_token' + + * 自己抓包搜索 /registerOrLoginUncheck 返回的 refresh_token + + * 多账号换行或&隔开 + + * 奖励:签到转发得积分,一天大概五分,自动刷新token,小毛 + * + * ==================================== + * + */ +var _0xodq='jsjiami.com.v7';const _0x359a3b=_0x2b50;(function(_0x4415b5,_0x54edf4,_0x4f077d,_0x5a17e2,_0x1168b4,_0x49812b,_0x3e55fe){return _0x4415b5=_0x4415b5>>0x1,_0x49812b='hs',_0x3e55fe='hs',function(_0x69a95a,_0x5bf113,_0x41599e,_0x234e33,_0x366c54){const _0x478cde=_0x2b50;_0x234e33='tfi',_0x49812b=_0x234e33+_0x49812b,_0x366c54='up',_0x3e55fe+=_0x366c54,_0x49812b=_0x41599e(_0x49812b),_0x3e55fe=_0x41599e(_0x3e55fe),_0x41599e=0x0;const _0x11dc99=_0x69a95a();while(!![]&&--_0x5a17e2+_0x5bf113){try{_0x234e33=parseInt(_0x478cde(0x205,'qAHF'))/0x1*(-parseInt(_0x478cde(0x525,'1vMd'))/0x2)+-parseInt(_0x478cde(0x61c,'$IdN'))/0x3*(parseInt(_0x478cde(0x25d,')M[x'))/0x4)+parseInt(_0x478cde(0x26a,'j4ia'))/0x5*(-parseInt(_0x478cde(0x4fd,'od7T'))/0x6)+-parseInt(_0x478cde(0x285,'e52A'))/0x7*(-parseInt(_0x478cde(0x267,'oC5F'))/0x8)+parseInt(_0x478cde(0x2c1,'gkg]'))/0x9*(-parseInt(_0x478cde(0x1bc,'[@5v'))/0xa)+parseInt(_0x478cde(0x214,'0MRg'))/0xb*(-parseInt(_0x478cde(0x361,'8umv'))/0xc)+-parseInt(_0x478cde(0x24b,'[#yz'))/0xd*(-parseInt(_0x478cde(0x4d2,'4AWb'))/0xe);}catch(_0x257c7f){_0x234e33=_0x41599e;}finally{_0x366c54=_0x11dc99[_0x49812b]();if(_0x4415b5<=_0x5a17e2)_0x41599e?_0x1168b4?_0x234e33=_0x366c54:_0x1168b4=_0x366c54:_0x41599e=_0x366c54;else{if(_0x41599e==_0x1168b4['replace'](/[AKOVPRgpGHWMDCLhrYt=]/g,'')){if(_0x234e33===_0x5bf113){_0x11dc99['un'+_0x49812b](_0x366c54);break;}_0x11dc99[_0x3e55fe](_0x366c54);}}}}}(_0x4f077d,_0x54edf4,function(_0x25b336,_0x5bb531,_0x3cdd4a,_0x571f91,_0x3a35e0,_0x4064f7,_0x33b7aa){return _0x5bb531='\x73\x70\x6c\x69\x74',_0x25b336=arguments[0x0],_0x25b336=_0x25b336[_0x5bb531](''),_0x3cdd4a=`\x72\x65\x76\x65\x72\x73\x65`,_0x25b336=_0x25b336[_0x3cdd4a]('\x76'),_0x571f91=`\x6a\x6f\x69\x6e`,(0x14d48e,_0x25b336[_0x571f91](''));});}(0x184,0x684e7,_0x9673,0xc4),_0x9673)&&(_0xodq=0x2289);const _0xfa5a18=(function(){const _0x4e9a8d=_0x2b50,_0x1c8317={'jzSJq':function(_0x8d05f0,_0x14140d){return _0x8d05f0===_0x14140d;},'tjhtf':_0x4e9a8d(0x3bb,'nCuX'),'paGkj':_0x4e9a8d(0x194,'!g)^'),'OlCVV':function(_0x478bd9,_0x14d343){return _0x478bd9(_0x14d343);},'bfIol':function(_0x43f265,_0x3efe7e){return _0x43f265+_0x3efe7e;},'NApUX':function(_0x5454fa,_0x58fa86){return _0x5454fa+_0x58fa86;},'UAMeM':function(_0x3d38e3,_0x4b2c53){return _0x3d38e3+_0x4b2c53;},'IVbzr':_0x4e9a8d(0x36e,'qAHF'),'WJkbN':function(_0x58c1de,_0x8c233c){return _0x58c1de+_0x8c233c;},'HHora':function(_0x4abfa7,_0x24d844){return _0x4abfa7(_0x24d844);},'mVklc':function(_0x3f7c78,_0x4b3764){return _0x3f7c78+_0x4b3764;},'HTAPA':_0x4e9a8d(0x4cc,'^leF')};let _0x284ee1=!![];return function(_0x4d7704,_0x4145c4){const _0x445cf2=_0x4e9a8d,_0x5c11bf={'IRwlZ':function(_0x1d774a,_0x57a4dc){const _0x440bc7=_0x2b50;return _0x1c8317[_0x440bc7(0x420,'A6yu')](_0x1d774a,_0x57a4dc);},'XpgOW':function(_0x4b744a,_0xda338c){const _0x4b4948=_0x2b50;return _0x1c8317[_0x4b4948(0x17a,'VsQH')](_0x4b744a,_0xda338c);},'CTJoX':function(_0x30ab45,_0x3fd70f){const _0x5828c2=_0x2b50;return _0x1c8317[_0x5828c2(0x5ee,'VsQH')](_0x30ab45,_0x3fd70f);},'gCUwd':function(_0x379cc5,_0x44c801){const _0x492d1c=_0x2b50;return _0x1c8317[_0x492d1c(0x2d3,'e52A')](_0x379cc5,_0x44c801);},'ZkTjd':function(_0x3692f4,_0x3191bb){const _0x104c04=_0x2b50;return _0x1c8317[_0x104c04(0x336,']Xq!')](_0x3692f4,_0x3191bb);},'KyXJb':function(_0x19fca3,_0xade198){const _0x379d29=_0x2b50;return _0x1c8317[_0x379d29(0x3bd,'Q300')](_0x19fca3,_0xade198);},'QpuoO':function(_0x2a8cf1,_0x4f5e6a){const _0x23bbce=_0x2b50;return _0x1c8317[_0x23bbce(0x49a,'oNRx')](_0x2a8cf1,_0x4f5e6a);},'KmkfL':_0x1c8317[_0x445cf2(0x258,'NXvd')],'uGTjl':function(_0x3ff60b,_0x41a501){const _0x5d15f6=_0x445cf2;return _0x1c8317[_0x5d15f6(0x453,'n7BF')](_0x3ff60b,_0x41a501);},'jrsgy':function(_0x1b7d80,_0x29998d){const _0x5f0c58=_0x445cf2;return _0x1c8317[_0x5f0c58(0x634,'vIIW')](_0x1b7d80,_0x29998d);},'NSvGv':function(_0xcce1d9,_0x300521){const _0x520624=_0x445cf2;return _0x1c8317[_0x520624(0x4e8,'7xMY')](_0xcce1d9,_0x300521);},'RhpKz':function(_0x3188b5,_0x223671){const _0x1b2d32=_0x445cf2;return _0x1c8317[_0x1b2d32(0x2f8,'Pjwb')](_0x3188b5,_0x223671);},'HeVyu':function(_0x4711c9,_0x1122fc){const _0xeca5e6=_0x445cf2;return _0x1c8317[_0xeca5e6(0x44c,'Y&oW')](_0x4711c9,_0x1122fc);},'VgxYk':function(_0x5ca0ef,_0x402077){const _0x1e3dbe=_0x445cf2;return _0x1c8317[_0x1e3dbe(0x63e,'cM^%')](_0x5ca0ef,_0x402077);}};if(_0x1c8317[_0x445cf2(0x4d1,'cM^%')](_0x1c8317[_0x445cf2(0x360,'nCuX')],_0x1c8317[_0x445cf2(0x1c7,'8umv')])){const _0xd6a761=_0x284ee1?function(){const _0x59c362=_0x445cf2;if(_0x4145c4){if(_0x1c8317[_0x59c362(0x64b,'[@5v')](_0x1c8317[_0x59c362(0x483,'oSR]')],_0x1c8317[_0x59c362(0x54e,'Y&oW')])){const _0x3a3482=_0x70eda9[_0x59c362(0x59a,'j4ia')](_0x5c11bf[_0x59c362(0x140,'VsQH')](_0x164015,this[_0x59c362(0x434,'cM^%')]?.[_0x59c362(0x4af,'qAHF')]('.')[0x1])),_0x5e45bf=_0x5c11bf[_0x59c362(0x2a4,'oNRx')](_0x5c11bf[_0x59c362(0x34e,'!g)^')](_0x5c11bf[_0x59c362(0x451,'8umv')](_0x5c11bf[_0x59c362(0x462,'Q300')](_0x5c11bf[_0x59c362(0x383,'Y&oW')](new _0x4dc71e(_0x5c11bf[_0x59c362(0x5d7,'oNRx')](_0x4c5ff8,_0x5c11bf[_0x59c362(0x3e8,'j4ia')](_0x3a3482?.[_0x59c362(0x39e,'xal4')],_0x5c11bf[_0x59c362(0x2e3,'Q300')])))?.[_0x59c362(0x2d1,'Ljj7')](),0x1),'月'),new _0x39ded0(_0x5c11bf[_0x59c362(0x46b,'pY1!')](_0x48ff59,_0x5c11bf[_0x59c362(0x507,'PE3T')](_0x3a3482?.[_0x59c362(0x39e,'xal4')],_0x5c11bf[_0x59c362(0x34c,'od7T')])))?.[_0x59c362(0x5ca,'eudC')]()),'日'),new _0xd6893c(_0x5c11bf[_0x59c362(0x37c,']Xq!')](_0xf11c47,_0x5c11bf[_0x59c362(0x60e,'F[gW')](_0x3a3482?.[_0x59c362(0x4ad,'ag4H')],_0x5c11bf[_0x59c362(0x487,'1vMd')])))?.[_0x59c362(0x23a,'Ljj7')]()+':'+new _0x17ca79(_0x5c11bf[_0x59c362(0x29f,'ag4H')](_0x356e41,_0x5c11bf[_0x59c362(0x47d,'oNRx')](_0x3a3482?.[_0x59c362(0x25c,']Xq!')],_0x5c11bf[_0x59c362(0x4a9,'MruR')])))?.[_0x59c362(0x230,')M[x')]()+_0x59c362(0x48d,'ag4H'));_0x3bceba[_0x59c362(0x57b,'A6yu')](_0x59c362(0x459,'M#Hj')+this[_0x59c362(0x623,'Y&oW')]+_0x59c362(0x618,'7xMY')+_0x5e45bf);}else{const _0x595da3=_0x4145c4[_0x59c362(0x499,'0mD^')](_0x4d7704,arguments);return _0x4145c4=null,_0x595da3;}}}:function(){};return _0x284ee1=![],_0xd6a761;}else return new _0x24b3db(_0x52e445=>_0x2fbbe8(_0x52e445,_0x579ccb));};}()),_0x355c58=_0xfa5a18(this,function(){const _0x4b109b=_0x2b50,_0x295bf9={'SJOYs':_0x4b109b(0x3cd,'oC5F')};return _0x355c58[_0x4b109b(0x1d0,'oSR]')]()[_0x4b109b(0x3f9,'PE3T')](_0x295bf9[_0x4b109b(0x239,'MruR')])[_0x4b109b(0x153,'vIIW')]()[_0x4b109b(0x1e6,'!g)^')](_0x355c58)[_0x4b109b(0x36c,'cJCH')](_0x295bf9[_0x4b109b(0x49c,'$IdN')]);});_0x355c58();const _0x2e1682=new _0xc82324(_0x359a3b(0x5df,'4AWb'));let _0x5903cb=_0x359a3b(0x301,'z**A');function _0x9673(){const _0x3e11e6=(function(){return[...[_0xodq,'LjWsjGAiCAHaHmiWD.OcVgoRmt.POpvM7rYKWhRW==','bmkvW7FcRfu','icxcLqDr','kCkUWRRdO8oC','iW3cHrjkW4X5W5VcLvXNnG','jCkzia','FwH8pIS','W44aW5VdNcHHkmkUASkkW7JcHq','W4eIFcldMmkkASosW5ini0K','ymktr8kirq','cctdPa','jCkkWPVdSSoP','W54/tYtdHG','W4ZdI8o9WOiFAxJcMmkBvHVcPZDGW6NcQ8kvj+s5MowjP+MBOEwiGoAFRUw5P+wSMUAUV2PFt8okFgFdPCojuSkPBmkhk8ofWQGVvq','WQ/cUSkIW5HG','W73dIgddTeu','qCkwzCkHyW','qw7cP8ocWRxcQIvtbConW54','W7NdTHPJBq','W7BcQmkAq2iMW7G6sCo9WRqZo0pcVhFcQCoKnfBcQSkdcSolW4NdQSkccSkLBCkMgCoeWRddQmovW53cK8kwW6WyxuddM8o8WODwWOhdNa','ESolW5Thjhi','WRpcGSkMWOC','wtxdP3tcPG','BNTKlJW','WPtcMCoEWRDL','WPVcV8oS','WQhdT1P3mq','aSkMqfpcQLSJ','qevsoZK','W4SCW63dQcDRpG','W4W5vSkO','WO/dQwRcImogl8kT','qgtcTSo0WQK','aSkapf9J','5ysm5OMf5yU0','WQ/cI27dImkT','6lEr5yYNW5a','BmkZySkpr2T0BSoU','6lsw5y6SW5G','W4euqmkUeG','kZjvW417','omo1EaGoW5JdSq','WR/cUXTzW6a','WRJdVLvGnq','cZZcKrTJ','CqLujvu','hCkXW6ZcUMJdNG','va7dI0pcKW','WP7cVSoVWRLt','aSoEn8kNza','W47dVfRdLLW','WPBcOh3dK8k7jmkfpYSwWORcRq','5zk65zkc5RgK6lYk','WQpcMmkKW7bm','W5pdQZTv','W4qmtmktcG','WPpcSCo/WR0','W6tcTCkRCvC','AmoNW6LxfW','W73dRCk2W6ewls3dLmkZp8kRWRXuWPWLjoApQoMbJCoNW7xdLSkiW7BdPSkbW6/cVSkCWPZcGNP8bq','DWVdLvdcQq','WRFdOmoaWRG','6lwB5y+mWP8','W7fZmwJdJW','WPFdGs58lqddHG','jmoIyqOG','WRRcG1xcQZuXhCoUymoDW5OXW4a','p8kvW7lcIeq','EmkXbmkUEq','W7nlWR3cPNVcTL8','WPpcLIz7W5i','WOldGSkyCSoY','a8k9dLri','cvRcTXtcO3BdQa','W5naWQhcRum','5l2/5AY35Ps75lMR5PAW5y+u55w56zEy6k+X77+5','bCogW5lcJG','WQJcN0NcOq4GgSoSBmo9W5WDW4BdIfiFWORcKbW','xcJdVwpcGq','x1NcOCo3WOm','WQlcL8k0W54','W6iJDaNdGa','FCoHW4CbuG','WQ/dQwRcGmosomkJW5pdK1zY','qdRcIIe8','WP/dR3xcGSoo','yKBcMSoCWRu','oCk357Mr5PYY5PEm6zEZW74','WPpdRSk7Eq','WR/dG3r3aXK','vSkWW68SrG','W7XAWR3cKMNdUbxdTfhdM8orWRffaLCFW5PpbSoPwmksW5XZmu0rvCoaW64HW53cVCkhW6tcVmk8W47cPLFdKSo7WRXCkthcMZj6yCkbWOK6W5ZcQSk4eutcMeNcPmkCWQZcJ3JdMG','WRJdVJeDseNcGW','m8kTWR7dHCoGWQ3cSuFcRCo3WPRdNW','kCknWR3dR8ol','WQpcK0pcRcafdCoU','W61mm2ddRSoPW7P7WOldMWpcKq','lmkYWRxdRCo6','W4qLW5vxWP3dRv0','WQ3dJd9tmG','W5GKW6O','pINcKCkCuSo3da','WQFdRa4bxG','WO7dVSk7ySouWOuZ','emkKW7lcSxNdGG','tSkgq8kbBG','W4eIFa','WQFcKmkPWOHRn8obWPZcRWhdHG','W5SMW7FdUWW','W7bT5yIS5PEt55Un5B6754Qs5Ok85OQ25yU7zq','WPFcOg/dL8k/oW','rqpdMwRcGq','WONcOh/dImk/aSkFbW','wCoJjrldQ1eOWQPoW77dKW','W7fgi0ZdRW','gepcTbdcKhldSG','W4K3W7jd','ySkDW4q','W70ABZVdVW','WOVdVSkPDCoqWPaL','d8ohW5lcJSkE','W6WusCk6bW','WR7dK2vRgX0w','WQ/cHCktW4PqmYa','W6tcJCkVqv8','WQhcJXFcRG','W5ioW4/dRJfQfmkL','dmoVW4pcMCkr','WO3dUSkLDa','EsLmnhK','qxaIW6i0EeLUBCknEKnjtJK','FSoYW7y5u2RcUW','6lAe5y6yW6C','u8o9W6xcK8oqWOvx','WRZcK0hcTYqJf8owASo4W54Y','W64PW6VdPby','wSkdW6S+EG','BmkcW7Cwza','zSoO5yQR5PEe55Mr5BYh54M55OcG5Awc6lEO77Y/','pCo6k8keAW','56Yp5yQ45OM15yMu','aCo9fSkJ','hLtcObO','oWTkW7iP','EmkNW7iatZZcUWWNWRrvEG','ubRdL2BcHq','WONcOgJdKSk/mmki','nMtdP1aU','zCorW54','W6RcTmklxq','nchcHa','WQFcMcfdW6W','BmkuWOVdLSoBWOtcS8kyWQ7dRSkvW7S8W79u6lEN5y2SWQW','mdBcG8k9CW','W7ldGSoWWO4Bz3xdRCoohNpdJxS','DCo4W5qOuq','W7bHWQhcReW','FsXthNC','W7NcS8kA','x0a2fCkrgupdHmkkWONdSHrwWQVdGLFcMYeBi8ofW67cV8k+tCkUWRuUW5pcG8oWjmkb','W47dQeldL2W','WOZcG8klW5jP','aComW4lcJ8khW43dRW','mCknify','6lEQ5y2btq','WRZcRcpcIv0','W5XNWRJcJ3e','WQtcKGG','pSk4WQ7dLSoD','WRhcV8oUWQzc','ue/cHmogWOq','WR3dGs5QlqdcLq','WR3cJWdcU0uWwmkazSka','m8o4W47cVCkJ','vCodW7e/FG','WQJcUIjMW58','yWBcUaeg','v8kNW7S','d8k0z0C','omkgW7xcSuy','aSoyW4BcImkC','aGvqW6CC','ntTZW7y','fHdcOmk6uSoh','WQddMxfthH8BuCoGAey','WQFdSWvUoG','6lsb5y69WOG','W4qzzmkZnq','W58OFrhdK8kDtmoIW5illLxcJG','uSo2W6dcKSon','qZldPh8','eSkYxh/cVW','xe/cQSoCWQO','WRpcPCk0WRb5','mvtdMwyP','WPtcLx7dQmkr','WO3cPWXsW5fBWRu','W4mJW6Po','t8kNW48awdVcOuy','W4bqmxFdIG','W4eRCCk8iSoTta','W4TrnLtdSG','W4KSBWi','WRZdO8oEWRZcG8kW','WP7cTmkoWRru','W7hdV0ldKe4','xXdcUtei','wmkNW7Gr','WRpdUrOAEa','WOm8W7vnWOe','EmkzlmkutW','ttZdNvFcKgft','uCk7W7mAgchcU1m','W5NcUSo4WRnf','zSkLamk0Aq','BCkJfCktuG','WOZcREwjLEAxMoEzGEw9U+EjKoAaJEwNN+I2Jo+8JG','qmoaW5C3Eq','BNrThJq','iXbnW5fY','W4lcMxiLDu/cImkHgtXkWRtdUNrIWQ9RW6jmWOHKi1pdKCo5W47dS8oLzq3dI+wfJ+wqOmkdW7T1WP9eBHXahmkEE8oNW6/cHu1wW7ezeqqkWOhdOmoshLX/W7BcGZRcTMFLRjNLI6JJGAxLGQVMK6/JG4RMIAJNQi/cMoIaRoEXTulcGNRVV73cNaLSwrdcQK/cNwZdLmkf6isa5P2y5PML5Pwo5z+d5zYZ77YTW5JdMu1epSoKW55uja0LWO7dLSkMyx4lrHeToCkeWPPMWQVdKCovWPPwWRFdHWSSpHldGSkPxcJdOI3dNmoxEoEyTEAmP+w/M+s9JUAsPEE1PSkp5zo55zgZ5RgT6lYc77YW5Bgw56Us5BI/5y+W5y2y776k5lIc55A95lMA6l2zW7NdU1xKUliEgmkzW4hcJWpdGmoWDCk8CCkwASkfW5Stxr5DWPmGWPNcJwXYW7WLWQ7cItqsErv0WRtdN2/dSmobW4i7vIKZzreDAu13W7hcHCk4u8koW7ZdQ8kTp0b9WQJdHtXZWPFcVcZdQrJcSqG','WO3dHtHklrtdH8o5v2KJW6BcRcWX','WRddRSoqWRW','jqVcKIrCW5XjW4hcNKq','WOdcOx3cQsG','xCoBW6KEBq','Bmk+W6NdUmk6WRxdJLtdQW','yhT3oHK','W7C6vatdOq','xCo1W64LFG','E8k1wmo2o+w4R+EwP+AoT+ENSU+8RUAvH+wmOUEwSoI3L+woJE+8KUIUTUAJQ+ACIoMhPUE+Jr9XBSkMW6KOpqxdJmk8DelcVUs7U+wlM+E7TUACJCoWfuxcUCodW60xW5lcLf3cNKBcISoXWQVdIKO','W5BdS3/dUxij','aSkHiLTn','rmk35PQ356ADgG','WRhdGc5qdq','BSoBW41Gow0p','WRVdL39W','e8kYW4VcSNa','WPxdQaPAiq','fY/cOmk6xq','AufseGe','i8o+h8kbtq','WOJcQNW','sCo9W6lcHCoqWOrmWORdSmkEWRFdISov','WOtdO3NcJCojp8kgW4xdQuP5W6W','oG/cQtbo','md3dQ2ja','wsJdJxtcU0pdNdZdL3C5fbO','DKzmhWa','W489vSk/mCoM','jSkyjL5uW78eW4ldMq','WRJcJGdcV04','W5tdQZfE','WOZcREw9OUwMO+AjNEIHOSog5OQX5AA45lMs5yQ1WQOLteSoW4VcMMpcHH7cRLHo','WOBcQGXeW7vD','ufKLeSk2g0/dLq','cmom5P2+5OMj5yIk5y235y6V5lQQ55IK5RsO5yIX772n','dK/cTHBcJghdQdFcKq','W4BdRHHyxa','WOBcOCo+WOXS','WPNcSCoMWRK','WO3cQ2JdLCk/oCkodG','nmofut4M','WQtcVmkOWRLl','W545tSkGna','WQBdJmkhrSoI','W4m3W6Th','WQdcRhhdLmk7','WPBdT3jVaq','WQ/dL2jNhW','W48wW6JdMIS','W4uEW7BdMIK','t8oQW63cMCog','EefubXO','scddR0BcHMDcxq','WRJdOWynqG','W7zxWPpcLxe','W6Lah3NdRq','zL5XeHZcTa','BSorW40','vKzBmHG','W58CW4XKWQS','fComW5JcJW','WPBcTH9FW5PoWQ8pWOC','jXBcKHjxW5S','lXxdKfv6','C8k9hCkYDtS','WRJcRd3cU1q','W4eRCCkGn8oKtmo/','xmkTW6GGqZ/cQG','fqxdKvrj','uJxdJeFcTG','yCkdjSk4sa','WOlcHY7cNfK','WOFdJhTcpa','xmo9W7a','B3WUh8kp','W5qJW4jiWOC','u2BcGmodWPm','Dx/cSSo8WRtcNtTyjComW5lcJCoVjCodWPS','itv0W6m','W7XAWR3cKMNdUbxdTfhdM8oiW75waX8hW5rCqmoJhSkuW5O5i18waCkmW6fRWPZdMSoDWRxdUmomW5/cUvJdMSo7WRPjlslcJYnLCCkSWPaYW4ZcUmkIev3cJvRcH8kcWR3cR3/cI8oZ','qmk5D8kurgah','WPxcOLBdRxG+WQWa','WQRcIKpdPSk0','W5STqmk6jmo4','Cmo5W6yiqG','WQpdIcmRyG','bmkgh1nn','BmkMc8k6AdrWq8oPCq','d8kaw3tcLq','mdRcGmkBCCoGbmkOWOyRWPzWW61hWQ3cPG','WRZcJt3cNNi','vSo0W5FcUmoB','nw/cHs/cOW','vI7dOeBcJwS','wv8Y','heJcTXBcHwG','xI3cNcS2','WPBdK3bZba','xqv2cvK','is90W78','5Bws56+85yMS','WQFdRSoNWQ3cKSkTg8o5','WPpdLxLQeqiu','nJvZ','hCk7W6u','l8kTWQRdSa','WRdcKbtcTL87zSktASkBaw7dQSo/WOtdVW','aSo1FX4oW5NdQSk3wtKHFq','wvuYnmkrffFdHmkgWPu','WRRdVa1OmG','d3ZcKGxcKG','wI3dPL/cIG','sfeQemkC','WP7cVSo4WQHkFNpcJa','W6JcR8k2wxm','yCk9hSkOvG','W5aoW5ldUsLO','ExLloZ0','tItcTr0ysW','WPdcTCo/WPfeFMtcGq','a8opW4lcOCk+','gCkXW6pcUxNdHdi','W4e5W6e','WRlcNSkRWO56a8oBWO3cKaVdJq','W6rBpvu','FCooW7ioxG','qbbjkhm','mSk4W5VcPw4','r1CjimkF','WPpdL3vWhH0ACCoWwKdcMcn3WPKO','hCoNaG','F0jocq','WRJcKYJcTvK2','WRRdR8oqWRZcMa','C17cSs1wW6PdW4q','WQZdJmkrE8oq','C8k9hCkYDtTgvSo1','W4tcLCk0vvm','ECo+D8kuvxTeDSo5WR3cLv5uWO4','WPFdKdTOo0JcMSkZrxeEWQFcPce6W7OZWQuzW5X3FqddG8kSWONcOmkID1hcM1m1W43cOZ/dVqa2qa8oW5aJWRBcT8oBbd/cUvzctvBdNSkXWOPVcaBcOSkCBSoJh8oTWQOfWR47WQ7cTftcHq','WPhcLUA0REwkRfC','ctJdPa','WOxdQxRcPCogDSk9W5JdSq','6lsV5y2jW6i','WRZcKLBdPSkX','WQNdJMy','6lE35yYgWP4','E8oBW4Pe','hNZdG3KdcG','W71DWOFcJx7cPW','r8kMf8kPwa','W4q+sHBdL8kaFa','k1pdVK8O','WRxcNSkVW4HpjYi','m8o7wCoSvdTbACokBW','WQpcLmkKWPLigmocWOVcTX3dKwS','WOlLVA/LPBFOVy3OOiRVVj9S','oCkUWRBdQ8o8','WRJdHSoXWQVcJG','WP3dUhJdTa','vdRdUG','WRVcMepcOcC5eCoNyq','oghcGrpcOW','xCoP5B2V5Asq5OM86kcqd+ETJUwkVos7VUwiH1fVcHSwW6K5FK8kWPJdRZa','WOldVdijyG','WPdcRhBdHmkXiSkz','W4NdRdHErW','CmoKW5eysgdcUW','smoWW6VcGmoyWOrd','fxZcVXddKZ9Jw17cKCkrkG','kmoGW73cQSkX','W7O1zSkFpq','W7fvegddKW','WRZdOKbbmq','W4ynqmkdfG','WQ3dJmksFCoC','ptBcK8kZACoHlSkgWOC2WPHD','kmk6FvlcVviYW49GW5/dN1RcG3C','W5hdOh0','WQ9jj07dRG','lmknr1hcQa','mMZcIqJcUG','nbHWW49h','WRJdVIWhxKS','5Bsx56685yMD','W4nIWPZcMha','C1VdLeqoWOLXW4tcL2DacG','WQpcHmkYW5bq','FCk7W7a7zq','W6FcQ8khvfK','ptvJW7zfWPNdPspdSCkT','WOdcUGHv','nrZcJWnCW7LpW4pcN2r7nNi','WRZdGuzfmW','vc5g','WR/dQh3cOmoX','W4SMtY/dOW','omkNWQ3dICoNWQFcILZcVmoT','W503W7rrWOO','f8o1BsaEW4NdQCkAEcCP','FCoZW6avBG','quLCnty','WQNdMhjlgq','mmk3W7VcVM4','WQFcMftcSsa+hmoN','xmo9W7dcGCouWPS','W7SsBCkqiW','bdL0W4W0F0X8','WQpcLmk2WPjIb8ol','FCoUW7VdT8oTWQBcJu3dU8kKW4xcN8oybSoVb8onW5xdVCkRDh4bF8oRy8kW','W4yoW4JdVa','5lIJ6lAy5y2o','WQRcMCkN','fSoiW4tcMmkd','ACkNc8k+yW'],...(function(){return[...['iW3cKH5pW5PcW67cJ0nQdh7dLh8v','W7tdJSkhW7ffbG7dHG','hNxdS1TWWPrfqmkQW6hcOCkwW4i','of3dQfK','W4pdT2xdKhqkWRW3W5eQ','6k+l5y6n5Pse5lUN5PsO5y+255Ar6zwa6k2p77YF','y0jA','W7mlW7BdJZm','WQhdRbaBxW','W7JcGIy1tLHdtCoHChBcOdW','WQddOg7cQCoX','sCkTW6WysZhcQG','6lA45yYRWRu','WO3cOfldTSk5','sYjOfMS','WOlcQxtdJSkS','W6/dLrfmzW','hSk7W4/cMuS','kxZcQaJcTG','WQtcSflcTZy','xmo3W7a','uSoPW43cK8oT','W6S5W57dPZq','fSkXW7BcIxxdMYq','v8o3W6pcTSoBWPnQWRRdSmkyWRRdLG','W7dcVCkdvG','WRtdTri','BCo6WP7dISoPWPVcTeS','zKnzgaS','nmoXBq0','6k6k5yYc5Psf5lIR5PEQ5y2N55wE6zwb6k+y77+7','W7LlWRRcKxVcPv8','yCoOlHVdPqf7W58rWOFcJaddIIldGUI2U+wnPSkj','yCkOkXyXW6NdP8kwzq','F8kDW64QAG','fd1PW7a','nJ9ZW6fxWP0','WPXJWRqrW5JcVg9ComoSgK8','zgP1gIq','WRRcMxlcTte1dCobzmoGW54','W6ddKdpcGfKnySkm','otZcLCkwySo3eW','ocRcP8khDCoIbq','W6RcUCkDrW','WR3cNSkI','iI51W75yWPBdKZBdRq','vSoOlHVdPqf7W58rWOFcJaddIIldGUEXPUE5JUMdIoEEKCk3fCkgW7ddPtOafmkHrmoPW7hdG8klnW','WOJcQCkvWRnR','WOBcPhldQSkD','W5PAWORcO3m','WR/cMIBcU28','W4mIBWRdKmkxD8ojW5q','WRZdIbzGoG','FCowW5XA','b8oWW6BcImkH','WQBdKhfZoa','z8kSg8k/EIHo','wmoNjrhcL1SOWRTQW5a','WPFcPWTeW5fAWQ49WPhdGhdcSa','CuaPdSkq','W4JdQMzwuHRcJSo9cdi','tItcTXCP','W6xdMH5lrq','hfFdMx81','rtBdN0/cJq','W67cVCkCqhq','q8kPW7adAq','awpcSwVcHgtdQYZdSW','FbNdM1BcTq','W4q3rCkipSoUz8o0zZpcGIW','aCoebmkkyG','W7JcSmkbxgm','bYdcQtj3W6S','n8o1BrOkW4y','tXJdMhxcHq','ESoBW41qmxql','WPxcGmkIWRvL','aSkMx0NcT1i','W4igCbtdHW','Dx/cSSo6WRxcUG','WONdHeFcLCom','WQpcK1xdGSkC','DGdcNci5','rmktW6WUFW','cmk6D0m','l8kJWQVdT8oR','oGFcPt94','WOBdTCk+','WQlcS0/dQCke','W6zlWRNcJNVcOv8','ASkqCmkIBG','ESouW7Drhq','jZ/cPqzP','WQ3cPZTpW4e','pmk8W4tcL3u','W5xdTc/dHSkXjCk0lIy','Afqwk8k1','fmkSW7lcSM7dGJi','gH7cGtHU','scddQwpcJgj4u0dcVmkXja','W7KOtc3dPW','pmkcmfjc','WRNcPqFcJwe','W50gW6nRWQa','tCkRW5GWwa','W6zpWR7cSh/cPeJcVKpdG8oSW7bnd1W','WPBcOhRdHCkypSkbdHCeWOhcOa','WOtcOrLFW4jmWQiOWOVdN33cISo5nCkykG','kGddJK1B','W48kW4/dRIDIaW','hfFdUgK+o8khW5vShCoQ','W4K5W5jdWPZdOq','WRhdTCoCWPdcMG','drpdL1bU','W73dQ8ohWRBcJG','vYRdUNtcG2PdwxlcUSkLfSkOBa','WQJcMfdcTYu','CxNcUSo6WQxcJYDglSoRW4RcGCoG','zSkxW4i/wWpcMa','W4WLW7vlWOJdPa','WRJcN8kHWPH2','jSkjiefBW7q','AgRcVSoR','DCk9f8k8sa','5PwH5PwR55UqsCo0W7NdHoAwREAWO+++Qa','WPNdIcb3oG','W7SfW7VdJsi','WRqqBbpcUCk7WODGWPldHchcHmoe','W4BdSrP/xa','Dx/cOCoNWQ7cRIDmmG','WRRdSSo6WRBcHmkH','W7TBWRdcO24','W4FdPYH2ue7cICoM','WQFcMepcOdK','hSkHDr4','dZnNW4u1BNbGA8kasfu','WQpdOmoqWORcLmk2','BCk9W4uFsq','W5ioW47dRIm','W7/dPXehva','vZ7dT1ZcT0K','WQNcK1m','WQtdS3vtia','bdL0W4K0zePN','ssRdVvhcG2ft','FHRdS0tcHG','vIRdQfdcH3vEAfVcVSkYmW','WRJdNNnQ','emk3W7BcTgRdKYuzqSkvW7vuvmkRkSku','leldOv0+','CCkOWQRdQ8oG','m8kjgLnd','wSkRW6GDxdFcQ2agWRLns8oVbCoFW44','WQFcHxtcRcy+gSoM','W7BcUCkpv3rUWQq','WP7cVSoVWRLtx3y','ebhcUmkara','fSoMtsqX','WPVcPSooWPzI','6lsG5y+8WOG','WPddLcP2zqFdH8oW','W59dWQlcHfy','hrVdTNvv','aJdcK8kCtSoR','WQJdR2zNeW','jtJcH8kzrSo1cq','vdJcHZuH','WONcNSkVW7LO','W7OGW5biWQm','pCkgW5hcSxG','n8oNf8k8zYBdUrxcVf3dHmkHW70','WOddRwVcMCo/','iSkSW7RcJeW','FSkLW5u8tG','WPVdLUwlT+AuJ+EzMEw8GEElS+AcPoAkTUwlTay','xJrcaLS','WPtdLZiHxW','BxVLIRtMLQhNMQxLVBlNIlJMGzJMIRdLIPO','Dmk4a8kDuW','tSoiW79qeG','WQJcMCk0W5zelrBdKCou','BmkMca','mZXoW7HA','D8kjW7u3qW','xvXLdYO','z0HCgrBcQmkP','WRxcHSkSW5zw','W6BdTuFdQK0','WOFcRqLp','nCostsqt','nt5LW69I','stdcOHe','tcRdR0BcH3rf','ASoJW6mFtLpcT8kOgW','qYRdUM/cI2PAvuFcSmk0mSkJCra','WORdRxFcH8oK','fSoiW4xcMmkrW5BdVmob','oMBcVIZdOXRcS2tcNtHTxulcN0BOTjNLJlFcNq','W5OJW4NdKHa','W5WUw8ktoW','WQRdJCo1WOZcTG','FCo3W7BcGmouWOvLWQFdSmkyWR/dG8oE','WPtcKCoaWO98','pSkXW5tcReG','W4tdPJ5dAW','W4ZdT3ddUxGwWRO','W5ddTY9t','z8kEqSkUwq','kmkWWRddSmoRWO/cLKtcVmonWOxdImkx','W4uNW5JdVW8','W5b7WPJcG0W','W7hOVldOOkJNUiNMNANVVztLHBBOVlFOOy/KUBjp','W493e0ZdSa','hHRcNCkrza','W4CbW5JdKIG','vSkTW6GCrty','BK5jfaxcV8k+W5itk8kFiNKkW6WL','WONdR2RcPCorpSkSW6VdQfD3W4eaWQCumW','h8oPcmkU','dvRcTGZcHW','sCkPW7iqrt8','W7DpWR3cGxi','CSoTW6dcG8oc','Ew/LVO7LP6NMIOxOOyOw6l2q5y+L5lIU5yM2ymoWkf49WPLEedRdV8kjWRFcMCo9','D0Kpe8kj','W4OAqCkggG','WR3cGLxcRc83fSoKFa','bdxdOf5MWOechSoQWRBcT8kzW5yaA3O','WQhdK2v3fGWw','W7VcNSkKEwG','wrFdOxBcNa','gghNU7lMNlhML4ZPLAau','xSoGW6hcLa','DJxdMulcQG','y2/dGSognmoOdSkHWPeBWPW','WRJdVI4hvua','WRtcUIdcNwe','ucRdVvy','WRxcGrdcUW','aJzbW70S','W4q3rSkOi8oIDSo8DI4','W61MagBdSa','WONdUfLbot8','WPBdLWf3lbC','WP/dJbi9yG','W5yhW5NdSW','hmkXW7hcRN3dKsq','tuHCdXBcQmo6','E8o4W6yu','WPVdLUACPEITNEEuIUAjO+s+PoAdIUwML+I1JU+8Va','WR7dJJSmCa','WQhdPmosWQVcHCk3hCobB8obWQJcHby','WO/dTmkV','W6X5lw3dPW','iCkjj0m','ECorW6fcbG','CmoTW5XfjW','WQhdPmosWQVcHCk3hCokDmofWQBcJW','l17cOG3cH3xdQqxcHZVcKMW','WONcT0dcPbq','q8koi8kQFG','sNmqnSk+','bIdcLSkIzq','W6DAWQJcKg7cLK/cQv7dN8ozW71kd3St','b8otW4hcUCk1','BmoqW48','W6VdRZDDCW','W54IW6DqWPVdNLfAma','WPlcPCkpWPjw','oCoJvqmeW4q','W7KsW5vjWPC','FCoRW4H/fq','nCkaW6RcSxi','W79lWQZcKJFcO1BcSKBdJG','W7/dIID4rXDhECk7','W4aLssddNq','uItcTXC3rSkhWQfK','vs/cSHy','WORdLmoeWPtcLq','fsTUW5fL','W5i4W4RdUJy','W7XlWQJcHN/cSeK','cv7cTWS','Dw7cP8o4WQhcPq','cIFdPLrwWPvE','oCoJvWKoW47dKmkgqsaTz8oF','r3L8lti','tGpdSaFcJ3tdSX7cOa','g8kNELZcVxiNWO9j','WQpcScPyW6C','pmkFgLHEW70','qYVdR3JcQG','W43dStS','wN8Ic8k/','WPBcH8kdWPLm','ESobW4NcTmou','WQFcVxJdI8kx','aSkKW67cTgG','fJldOKHGWO8','WPtcV8kkWRHajq','mmo5xW','WPxdISkdrmoW','WOZdKd1XjHxdNmo6xq','WPpcHCodWO5M','m8oXBq8d','qCkAW4WDDa','bH7dLLfn','yZldPh/cL0K','iCkfovi','WRZcLmk2WO5VfSol','B2xcT8oRWRG','WRJcKZxcR1C2xW','W6HqbvtdOCoJW6W','WONdTJ5wia','WP/dNHqVta','h8k0ye3cMuWV','vXtdRG','yMRcP8oV','k1FdU1eI','W6rBWRRcIG','taVdMKJcJW','lCoqW67cOCke','tc/cQGe','vIbmcW','BSkZCq','W4tLV4xLP5dOVBhOOPlVVy3dPW','fa1iW4bH','WORdUmovWRRcGq','WOldQmk7EmosWOW','WPVcV8oSWP1fDf7cHSo6A8oWW7G','c8oZW4/cP8kb','lGhcGtzxW5TOW4dcJL5Kiq','W4e5W6fJWOhdRNzyiCovpMq','A27cOmo9WQhcRIS','WQtcTvBcNWi','562A5yM/5OQE5yQ9','o8kdif5CW6e+W5ddKG','BCkSW4WMzW','WPVcKu/cPa0','WRFcLmklWPL3','rGhcTZ8z','hG5dW4v+','qmopW5iJxW','qYRdULtcG2O','b8kDW6VcThq','WOZcOcLovKtdN8k0','WQddPmoAWR0','6k2F5y2e5PAw5lMR5PER5y6155Ew6zwA6k2B772d','W7VcPmkE','WQxdMhjHdW','W6LPb1pdMq','W7HbWQ4','W4zlWQ/cKh/cSvlcJ1/dGmoDW7e','WP3dHsztcW','qg/cI8oFWQu','WQFdUKvLfq','W5FdQYTvwW','WRNdPvGfvXtcLx/dGmo6','WQ/dUNPReW','dZnN','BSoBW418p3uyWO4','sYHgaa','mcNcNmk4sq','ymkPy8k8DG','W445W6jh','W6mEBcRdMW','WPNcKJBcQgu','WOdcOSoIWQHovNNcHCoRuCoVW68k','dZnwW4eW','WOhdV1lcO8oinq','WO3cR3eweG3dKmkJc0WMkoAlUEIJV8om566xW4dcTG','fmkSW6FcVG','A0Xjha','m1FdRvGOlmkg','W5hdUJ1QEW','W4DFWPNcG0i','WR3dOGu','y1TVcH0','dctdJv9MWOnGsSkVW7FdQSoyWOu','W5PVWRNcT0i','vmknW4Whsa','WQpcHqlcQfmRB8k4D8kBbctdRG','zSk4WQNdMSkyW5OjW7JcQCoCW7hcGSkw','qKjhfb/cTSk7WRXtCCohvJ42W6aLwNpcUWlcOG5BW5pcUCotW716WQJdKx8vW6NdQqRcNCkElSomCmoGWRDJW6BdGmksdgJcLN9eWQH2W6JdHfxcNCoar8kMmCo3W5lcPSowWOrzW7zug2NdN8o+jgfYWQtdL8oKWRS7dmk6W7tcQCkloIjsWOBcIY3cI8kjoKT2WRaqgSoEv8kjWR5YW77dONBcTSo9W4NdG8oab35Ha1VcV8k1jqBdPSohWOqLW5XAW6WuW5xcTZVcRrVcG8kJuCo3ESoAW4JcKqvKW6/dP8oeW5OeW4aaWRBcSmogC8o9W4FcKmkrWRPAu2mxW48No8o7WQFdUb0MdCkdW5fyW5VdVSk+WQTViSkWm8oJBwSCW4pdQNWUiSklymoWW4fUW4q8WOapoq52W6yKW5b1W7xcGdRdMxLioSo0DItdOKxcSSoZWPZcRvZdG1tcJCkpFeVcG8o6zCkXW4SyW4q','odrJW7jo','WOVcQW5DW7PiWQSm','WQRcMCkKW55rpbRdLSodhW','W6ddO3JdM04','mNWCuWFLU6/NLkVMJl3NP7ZVVPtMLQtLJ4pNLOFOTA7LJOpVV4FORl7MO4dMNlJPH4/NVkStWOZdVSoGW5tdPmkKCLldRw7cHmkx5lUs5yMk57Mz5P6WdKC4W6xdRmkXqCoFtGhdGCkVBNK7W7tcPa','WQRcL1pcPa','E8k8W4WkCq','WPxdJJzVdG','oJtcJdrG','dctdJ1vSWOK','W67cTSkdrMq','WOv+WQ4mW4tcOXmEFSkvCZK','WO7cOEs6NUI3V+wmL8oKwmkZnSkdW67dJfv6W7LWW40','tSoBW41Hi2uyWRq+Fmo9','W4RdPJnQBW','yCoBW5Hqnxiz','WOJcQNZdOmkWm8kJbdauWONcUG','vxPxjsC','6lAl5y6HW50','tuq0emkwhuVdLSkA','W4tdJtr1Aq','gZTZW4u4','o8kJWQ3dPq','W54IArC','W5SSumkGpSoTqmo9AG','WOxcJ8kjW5D0','WPBdIIT9ma','yCkZCSkd','WPZdIYT9','zL5ScblcTmkc','z8oFW5rr','gL7cSdVcG3ldPa','W73cS8kkvG','W71aWQ3cH2i','dSk4yuJcVa','sCkTW7OgtYhcP3uCWQzaCq','F8o7W60csa','sZ/dQ0ZcT3rA','WOdcKbhcTxK','WPddPxdcJCoq','WONdTmkHFW','ctldRv13WO8','W4r5WR3cULm','n8k7W7dcQN3dHaaQq8kiW75SxG','W4i3s8kN','fCoDW5FcMCksW7BdOa','m8kTWR4','WQZcJhBdRSky','A8oYW6mjFg7cSSkGlCk6jx4','ja5TW5LI','WQxdQbeC','s8kUuSkJDa','xmkTW6G','6lEo5y27rq'],...(function(){return['WO9cWPhcSgSOs8oSm8ooWRpdNoI2QowpJmkX','WPddVSkPy8owWOO','iJhcTCkMvq','AmkBW40/CqhcJHXcW4hdRH08gMJcVwnqWOy','oCkdmW','eSoGbmk5rYa','bHlLIRVMLOZNMlBLViVNIypMGP3MIjlLI6q','WRNcLmkKWPLRa8oD','dhNMNjhORjdNLk/MIRlKVOhMGOBLP4lOTBRVV6q','6lw25y2NqG','nv3dUfuRj8kMW6HW','zSk9ySkh','WQhNP7hVVzu','nZtcKSkhBa','WQtdRmoE6l+05PYo','ChhcKCoRWPq','WRhcHmkPW4ThmctdKCoh','W4m5W7jlWONdS2TdjW','ftBdOa5Lu8oyWRGW','WPtcSSkuWPfg','WOhcRGnZW7u','BmkSaCk8BZq','rtJdPftcSa','W6v+WOpcJwi','omkNWQ0','W7KhvWtdNW','uarcow0','WO3cQ3/dHmkM','qt3dVe3cKa','t8o5W7FcNmo0WODn','BmkMcmkADtHHx8o4Bmoafq','WPJcTCkSWRfS','776O5B+b5yMC56wY5yIBra','WQNcK1pcKsG9gG','FSk/AGKfW47dJmkmqJSIAG','WR7dNbD1oG','WPFcLJdcKMW','vSoRW6m','WRFcKW7cQea','tSoZW6ebBa','rSosW7PIbG','mmk8W6/cH18','gCkWDvtcVu8UWRzdW5hdLfm','lCkJWRFdOmoHWQtcRfZcQ8o3WPldGq','nYFdJLrq','gHFcIYDl','W4VdONtdSZarWRSV','W5tdTY5vs0hcN8oIqY9QzCo7','vsLZlve','6lwd5y6GW5G','WONcK1pcKdi1dColA8o1W5q','jSkyjL5uW78','C8kSaCk/vtnBwCoQFa','a8oGsqqC','WPFcPWTeW5fAWQ49WPhdGhdcSmkR','WQFcMCk3W7bw','W7lcUCkavgv0','utjSg07dSq','A8kYCSkdwq','ze/cKSo/WQS','oLhdUfu7o8krW513d8oTubNcLmkcFG','BSkMg8kYFsv8rmo+','FCkXW4KDBa','amkzqeFcUG','khpdNvyv','aSoI5PUS56w0WQ4','vcZdVfVcIW','WOtdTmk8','WQNdLCoWWPpcRG','d1RcQHVcJwS','W5/cM8kErx4','WRxdOGWn','5l+T5AYd5Pse5lUN5PsO5y+255Ar6zwa6k2p77YF','WRFcR0VdTmkM','hUI/OoIGIUMbO+ECNxaO','lCkOWQ3dP8oE','DCo4W6ymsw/cGCk2g8k3','tItcTXCPymkp','sZ/dULe','6lAg5y21bW','AmkTW7arssBcM1qbWQnrFSoIaSoFW6W3WPCj','W6xdIarkrq','WO/dVSkMDSobWOO','CxmVgSkB','lSoHW5NcMCkh','w8o0W5yetq','WQNcK1pcSYa8','WQxdTsjThq','FmkDW7OPvG','gNJcKqJcHG','tLe0cSkD','CvWfl8kU','pCkNW47cMM0','WQVcK8kZW4XdmYa','6lw55yY1WOi','WOFdLtCQvW','WRNcHCkXWO19s8kbW4hcHrtdLIz7WOyxW5nzW7FcTKvlrMijcSo+hCoMWPtdHgTWWQzZaG5AWQhdSCoSW4JdNSkPqghdQCoqWOBdL1dcUqiuW5LdAmkQASoTmIa','6lsD5y2VW58','77+c5B6L5yMQ56sQ5yMhCa','EZL1iNG','WRtdPImTFW','hmkTWRFdSmoRWQFcIWxcJCoNWOZdGW','vdRdT3a','FMD0oZe','mKhdN0K/oCkq','q+EMJU+8Gq','W45fWP3cIh4','W4tdOYHA','WOhdV03cUCovpmkT','WO3dVMZcO8ov','oeddQvGKkSkMW79TcCoG','c8oCiCkbsa','WPxdTqCSCq','kCo+l8kZta','fxVdIgKE','WOlcL8oFWRzh','pSoCiCkztG','b8k1W67cThG','W6JcPSkSvKu','bJJdP18','pmkFb0jiW78i','AMtcTmopWQ7cRqbfp8orW5xcLG','W5tdJt9tCa','F8oXW7bMpq','WQBcTmkZWPLi','eSkIjMnJ','5P2B56+25yMv','urVcOGSR','W5xdSda','WOBdL1LXnG','cI14W5ec','WPZdOwjCpG','WOFcQN/dHa','faNcNI5s','gYL0W64V','WQlcM8klWPHd','b8k6Da','DmkpwSkKwq','W4iXBmk8ia','WQFdQ8oCWQ3cHG','vCkYW5yvra','bbP6W4Gu','W5NcVfNcVmocaCkTW6K','rCkFW4G9CG','mCo7EaKg','x8orAqOhWQvqWPNcNs7cPhhcRLRcO+I3QUwoVuO','W6KlCrpdTW','F8otW6GCxa','gHLcW59A','W5/dSL3OV7hMNQS','oCkGD1pcUW','g8k0yvxcVq','AMtcTa','fJZcP8kuvG','u8k+umkNwq','aCoPf8k4yW','Bmo6W63dVmoJWRVcJwFcKq','boI+N+IJGUE7SEAEVE+8IUwfH+I/RoIHUos5K8o3','sSkqW48tEG','6lw35y6UWQ8','W44AW6PnWOS','mcNcHmkEFG','fY/cQXj0','ExCpfmkR','omkFxh/cQW','qY/dSxJcSeddPZ/dMq','sGjjbL0','W5G/DW','WO3cTHLgW4CtW6LgWP/dM3ZdSmo1nSkylbvOgfpcIWPDWPKMjIhdU1JdJbTmAghcNHWHWQ8QmcHqWOmFkSkrW57dLtWgkWnZWOi0jq','i8oXDqKOW4VdSmkQuG','mJ7cGZ52','n1FdOLS5nG','k8o/kSkSuq','WPNdM0vjja','ushdTepcJq','qGdcHsya','jCo6yqOj','W6m1sCkVha','C13dL0uiWOzZW4JcKhnelW','zSooW41h','Cmo5W6yiqKJcUa','WOdcUH0','W4/cUmkKywq','C8k5a8kYBW','W4q9tmkUjmoI','FCoxW5rr','WQddTmowWQRcLmk2','xtntauG','WRJcRtpcU18','WQ7dUKRcHmo9','W5GTuCkH','W4xdI0hdVLO','kcX0W45S','WOJdJmkErSos','W5pdTI5suuC','z8kbW7iUxX/cSW','EY5pgL/dUKddGmkkW6SQs8oBia','bmkuAw7cNq','Aa3dLMxcIq','WQFcTmo5WRTi','W5JdTJD5rW','W7FcSSkixfH4','itJcHSkbyG','W7qGW45vWQu','W6zgigZdOCo1','W489vSkep8oKxCoZ','bGdcUCkCya','keBdVLuJoCkCW7P7','WOhcIrTpW60','WOZdRmkaACoG','d8oAW6FcNSkhW5FdLG','sCkHamkrAW','wSkntSkiAa','WR/dRSot','ic1tW44F','W6tcUYWIqedcOe0','W4mlW5hdVHi','muJdN3y8','zCkMvYyrW4tdHmkI','ysdcOaiY','nCo7wcKU','5P+7566p5yU1','ftBdSuLM','W4ddS2xdVa','dcBdOL1U','zCoBW5DtjgG','jCkCwgFcJW','t8oRW7lcN8oa','W65tmu/dLCo/W5G','WRVdRZvGhG','WOBcQN/dMa','W5OKW69wWORdJffBmmoVixnT','zSkGaCk6DZbw','WPpdRWrTiW','WP7cU03cRru','W63cUCkArxbW','ldHUW64u','yCkUC8kcsgz0ECoZWOBcLa','fuBdJ30K','nSo16i6K5y+WW7G','W6ufDbhdLW','ldpdML50','o8kTWO3dPCo9WQi','u8kJW7OetW','hmkEau9m','W4ldTYLHAa','y8oQW49ShW','ptBcK8kZACoHlSkgWOC2WPHDW5vfWRZcOgddJMhcKq','pSkXWQRdRCoPWQC','b8kvWPpdSSo8','aCogW4i','W47cI8kAA1G','WQDRWRSFW5lcTWukAmkbzsaZW7hdOmkLhchLVzdLP6NMIRhOOAJdRr7dHedcV8otWOLSW4VdTCkyW7dcRCkwnSozW4q','W61mmW','nsVcNCkFyq','W7hcL8kfrga','cmkMWRRdQmoy','aJJdTW','W7GMxdldSa','t8k6W6qsyq','C8k9dSkPBWHAqSoICCohdJ5sB08','WPxcUM4ndXBcSmohsXnoEG','fIpdSqHPWPrDqq','EmktW48YwG','u8kGcmk1uJi','BCo8W5tcPCo4','k8kRWRtdOq','W49Wi2JdRq','uJtdP2G','cZLHW6a+Ee0','bJJcGYbW','WONdQCk7DSom','WQVdK2jcaGCFxmoSzfe','WRBdQbyGvvVcLh8','WPpcJsrKW5K','wmoyW6uVsa','j8kjj0C','cqXsW6nH','WOhdN0btiW','zCk7hCk0Aq','W53cVYBdVSkEBCo7W57dUvvBW7KA','W4uaW4G','W48gAbpdNG','vwFcSW','W545AqRdMmkjtCoBW58','W4uiEdtdOq','WQJcOgNcLdG','h8kZugNcTW','wvuYd8kzfG','mGj1W41K','W7GKW75aWQy','iJBcH8k5uG','rYNdQMxcUW','WO/dTmkVumoBWOyyW43dI8oxW7lcHq','W6RcVCkDwfbSWR4','gXDzW68c','wmkppmkpCq','WQdcTmocWQzD','h8k9DKG','W7VcPmkAvN94','W4OHW7NdQHq','p8odWPC8uqpcSJDj','WOhdSg99mG','p2ldU3Cj','x8k4W6WlvG','v0mvemkFfeFdLa','WONdTZurwa','dctdKK9IWOLQ','v1VcP8odWQK','tfeXk8kDhfddLCkqWO7dIfrfW6pdMW','hSozuI08','sCoaW7y1CW','ySkMc8kI','W4zEWP/cM0K','WRxcGSkYW5zmmYZdG8oF','WPVdVhlcPCot','WO/cLmkuW6Pp','x1Crk8kp','WPpdGsf/pbO','W4W9tSkSjmoV','WPtcPgNdKSk7','gmoDxs8a','6lEc5yYYqa','WRBdUCorWRO','WR3cUulcJIy','WQVdRGn/iq','W545EHhdGSk6tCoqW4m','W5ddUNtdSW','WPVdSGjIpW','mrRcLb5xW5HpW4NcGW','k8kJWQRdR8opWRNcLG','s8o5W7BcHmoq','tCo4W7nSna','WPdcT2pdH8kv','mCoZBquDW4/dPSkIqYySr8ovW7pcHe8','W5Wd5RwV5yQjWQa','W5FdNf3dH0C','kmotxdWK','xdtdPfdcSepdGdBdLgW2gq','W6tcTvbEcHJcQ0xcG8oBuCoL','WRFcMmkPWOLRaW','W4qLW4HnWOVdRW','fSoiW7hcGmkm','qtFdVG','zmkMdCk6Ea','WQJcQZTHW6a','WPtcTCo6WOrJ','5P+D5OQU5yQ7W7ZPHABNVB7KV7hMGOBVVOlOR7xMOzBMNAtMMyBLKOFPHzxNVAPG5y6u6ysi77+s','fComW4lcNCkhW5u','kGVcHXnCW41v','aSk7D0pcOa','vZVdVeVcJgfFwK0','uCkCW4Sdwa','WPZdPxpcQCoilSk8','f8oKcSkKDa','WQpcK1tcTIa3gG','pmo/EaGpW4VdTSkc','mmkdW67cT2y','cJjKW6eJ','CSk9zmkvra','W7FdPJ9xAq','x0m1emkFfa','BSk2B8k+sq','WQJdOfT+aa','zchcLaSt','WQpcKmkRWPLHha','aSk7yflcUviLWOC','W7bpWR3cGW','W485W6jB','WPFcOWnsW5Te','WRldUmoLWRtcJW','WOJcLLZdHSkV','W5RcTSkeDgK','E8oBW59gnxmcWQiKDCo5WRVcLq','rJNcObS2qq','W7v45BYI5Asc5OI36kogcEADVUIVSEs+U+AcI2GyhxRdLdmEWPqaWPZdG8kgWOG','W6btje3dUq','f3/dQNyB','yYRdUM7cL2vDrxRcOmk6','W4NdQarbCW','W7G7W5vVWRW','WR7dStHbha','vd7cSGaLE8kCWRzUWRSMEJbHd8k/','rdpdPN8','WOtcMxhcJJK','W7lcS8kjCN94WPL6xmoKWQiR','ef7cTWZcG2hdPa','zCorW551pMqKWPiKC8o0WQC','aZldT1LR','hmkfWPxdTCoR','s8kTW6Szrq','eSobW5pcHq','WRdcKa3dTfuWySkpzSkobYJcRSoVWOu','uWxcSbOE','iJZcGmkezSoP','pSoGcSknta','CmoKW5myw2NcHG','vSkpwSk/za','W5nsdfpdMq','WOZdO3dcQq','k8oqiCkbDG','6lwf5y6RwW','W4JdVxBdNhmaWOCSW4aWe8kZ','WRZcTe3dH8kV','WPpdQamAx1ZdHG','uXzlbfS','WQlcMudcHc80mCoTCCo6W50L','mCkTWQ3dRCoOWRdcRfZcQW','FdbikgK','WO3dTg4','W6mNW7ddRWu','W6yXW5bxWQO','W7PbWR3cI3ZcU2NcR0i','WPNdOtS5uW','W5eBW47dTcHId8kNzW','csXnW698','wYVNRQ3LIR7LP7hOT6ZVVzq','nmkCjfTtW7SmW5ddIxZdT2pdQ0RdTmk7ptZcTHjWW5H9vSoGemovWRdcSbxdShJcVG','WQhcGrBcQvm','a8oPc8kVAtNdTa7cU0a','W4BdT1ldPfy','W5vNb0RdUa','WQNdUqKQqG','WQdcNMlcQc4','yCo9W7a0qa','WQxdPqCg','m8kTWR3dPCo9WQhcOe/cVmoQ','cvpcOre','W4ZdPZjCs0G','jG/cKHy','WOpcLWLdW7C','iSoTcCkUzsddRblcULRdK8kSW7RcNr9skfJcMq','d8oAW7RcHmkjW5C','W7DIWQxcJx4','btBcSGbj','bZdcV8kkuq'];}())];}())];}());_0x9673=function(){return _0x3e11e6;};return _0x9673();};const _0x1af086=require('fs');let _0x23a779=['\x0a','&'],_0x4e038c=(_0x2e1682[_0x359a3b(0x222,']Xq!')]()?process[_0x359a3b(0x299,'PE3T')][_0x5903cb]:_0x2e1682[_0x359a3b(0x64d,'Y&oW')](_0x5903cb))||'',_0x25fb27=[],_0x2efce8=0x0;function _0x2b50(_0x39f17a,_0x3c14bb){const _0x27ad15=_0x9673();return _0x2b50=function(_0x4c55ea,_0x245944){_0x4c55ea=_0x4c55ea-0x133;let _0x9673e6=_0x27ad15[_0x4c55ea];if(_0x2b50['tmcFiw']===undefined){var _0x2b5044=function(_0x5555d2){const _0x1d9be6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x230253='',_0x1a41d2='',_0x1449a6=_0x230253+_0x2b5044;for(let _0x32c033=0x0,_0x19c8b7,_0x4d3d17,_0x1efc97=0x0;_0x4d3d17=_0x5555d2['charAt'](_0x1efc97++);~_0x4d3d17&&(_0x19c8b7=_0x32c033%0x4?_0x19c8b7*0x40+_0x4d3d17:_0x4d3d17,_0x32c033++%0x4)?_0x230253+=_0x1449a6['charCodeAt'](_0x1efc97+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x19c8b7>>(-0x2*_0x32c033&0x6)):_0x32c033:0x0){_0x4d3d17=_0x1d9be6['indexOf'](_0x4d3d17);}for(let _0xa826e7=0x0,_0x4bf7f1=_0x230253['length'];_0xa826e7<_0x4bf7f1;_0xa826e7++){_0x1a41d2+='%'+('00'+_0x230253['charCodeAt'](_0xa826e7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1a41d2);};const _0x36ef47=function(_0x492497,_0x2e8db7){let _0x117b54=[],_0x1da36f=0x0,_0x21b0e1,_0x531e64='';_0x492497=_0x2b5044(_0x492497);let _0x59890d;for(_0x59890d=0x0;_0x59890d<0x100;_0x59890d++){_0x117b54[_0x59890d]=_0x59890d;}for(_0x59890d=0x0;_0x59890d<0x100;_0x59890d++){_0x1da36f=(_0x1da36f+_0x117b54[_0x59890d]+_0x2e8db7['charCodeAt'](_0x59890d%_0x2e8db7['length']))%0x100,_0x21b0e1=_0x117b54[_0x59890d],_0x117b54[_0x59890d]=_0x117b54[_0x1da36f],_0x117b54[_0x1da36f]=_0x21b0e1;}_0x59890d=0x0,_0x1da36f=0x0;for(let _0x5a4cbb=0x0;_0x5a4cbb<_0x492497['length'];_0x5a4cbb++){_0x59890d=(_0x59890d+0x1)%0x100,_0x1da36f=(_0x1da36f+_0x117b54[_0x59890d])%0x100,_0x21b0e1=_0x117b54[_0x59890d],_0x117b54[_0x59890d]=_0x117b54[_0x1da36f],_0x117b54[_0x1da36f]=_0x21b0e1,_0x531e64+=String['fromCharCode'](_0x492497['charCodeAt'](_0x5a4cbb)^_0x117b54[(_0x117b54[_0x59890d]+_0x117b54[_0x1da36f])%0x100]);}return _0x531e64;};_0x2b50['ajAPUd']=_0x36ef47,_0x39f17a=arguments,_0x2b50['tmcFiw']=!![];}const _0x5db0c4=_0x27ad15[0x0],_0x1af218=_0x4c55ea+_0x5db0c4,_0x15f686=_0x39f17a[_0x1af218];if(!_0x15f686){if(_0x2b50['yOIygW']===undefined){const _0xb91e0=function(_0xd710d6){this['UpXKie']=_0xd710d6,this['JkyxGS']=[0x1,0x0,0x0],this['xzUJTT']=function(){return'newState';},this['ThkVsy']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['zFjdsn']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0xb91e0['prototype']['DhyKZG']=function(){const _0x5ac315=new RegExp(this['ThkVsy']+this['zFjdsn']),_0x44d8b6=_0x5ac315['test'](this['xzUJTT']['toString']())?--this['JkyxGS'][0x1]:--this['JkyxGS'][0x0];return this['oksRRz'](_0x44d8b6);},_0xb91e0['prototype']['oksRRz']=function(_0x2157f1){if(!Boolean(~_0x2157f1))return _0x2157f1;return this['iVEvTE'](this['UpXKie']);},_0xb91e0['prototype']['iVEvTE']=function(_0x572c3e){for(let _0x24a827=0x0,_0x206377=this['JkyxGS']['length'];_0x24a827<_0x206377;_0x24a827++){this['JkyxGS']['push'](Math['round'](Math['random']())),_0x206377=this['JkyxGS']['length'];}return _0x572c3e(this['JkyxGS'][0x0]);},new _0xb91e0(_0x2b50)['DhyKZG'](),_0x2b50['yOIygW']=!![];}_0x9673e6=_0x2b50['ajAPUd'](_0x9673e6,_0x245944),_0x39f17a[_0x1af218]=_0x9673e6;}else _0x9673e6=_0x15f686;return _0x9673e6;},_0x2b50(_0x39f17a,_0x3c14bb);}function _0x172e29(_0x1a4c34){const _0x177222=_0x359a3b,_0x575b44={'fVNQy':function(_0x26d773,_0x5c7dd4){return _0x26d773<_0x5c7dd4;},'pTVEF':function(_0x3dca9c,_0x4ff26f){return _0x3dca9c*_0x4ff26f;},'zQArN':_0x177222(0x45d,')M[x'),'ouyAt':_0x177222(0x4bc,'azvf'),'AhmZC':function(_0x4ba77e,_0x3daddb){return _0x4ba77e+_0x3daddb;},'nUbJF':function(_0xf5a2cd,_0x524e6b){return _0xf5a2cd+_0x524e6b;},'xutjt':_0x177222(0x27e,'od7T'),'RpMnS':function(_0x2eb763,_0x1a59ed){return _0x2eb763!==_0x1a59ed;},'byZwk':function(_0x380951,_0x553032){return _0x380951!==_0x553032;},'NtCAi':_0x177222(0x14d,'q4F0'),'xZjCY':function(_0x115a1d,_0x2aa0b0){return _0x115a1d<=_0x2aa0b0;},'cIUkN':function(_0x498a1d,_0x2ee7fc){return _0x498a1d===_0x2ee7fc;},'sosKU':_0x177222(0x3b0,'j4ia'),'GoxrC':_0x177222(0x578,'s9*]'),'yIKfJ':_0x177222(0x15f,'qAHF'),'pRRnJ':_0x177222(0x51a,'oC5F')};if(_0x575b44[_0x177222(0x424,'cJCH')](_0x1a4c34[_0x177222(0x291,'q4F0')],0x1))return![];if(_0x1a4c34[_0x177222(0x4a1,'4AWb')]){if(_0x575b44[_0x177222(0x1a1,'Q300')](_0x575b44[_0x177222(0x273,'Q300')],_0x575b44[_0x177222(0x4e6,'cM^%')])){let _0x3eae4e='';for(let _0x39ed5f=0x0;_0x575b44[_0x177222(0x516,'s9*]')](_0x39ed5f,_0x229d72);_0x39ed5f++){_0x3eae4e+=_0xbb2ea[_0x177222(0x18b,'ag4H')](_0x50319c[_0x177222(0x208,')M[x')](_0x575b44[_0x177222(0x218,'[#yz')](_0x32f0de[_0x177222(0x1c8,'0MRg')](),_0x56defa[_0x177222(0x44a,'PE3T')])));}return _0x3eae4e;}else return![];}var _0x38a8df=new Date(),_0x367e37=new Date(_0x1a4c34[_0x177222(0x3ef,'Y&oW')]),_0x550b10=new Date(_0x1a4c34[_0x177222(0x235,'[#yz')]);if(_0x575b44[_0x177222(0x15b,'z**A')](_0x367e37,_0x38a8df)&&_0x575b44[_0x177222(0x3ca,'oNRx')](_0x38a8df,_0x550b10)){if(_0x575b44[_0x177222(0x5c3,'pY1!')](_0x575b44[_0x177222(0x51b,'0mD^')],_0x575b44[_0x177222(0x201,'qAHF')]))delete _0xea660b[_0x177222(0x26b,'0mD^')][_0x575b44[_0x177222(0x627,'xal4')]],delete _0x95346[_0x177222(0x3d1,'A6yu')][_0x575b44[_0x177222(0x2c5,'Q300')]];else return!![];}else{if(_0x575b44[_0x177222(0x374,'cJCH')](_0x575b44[_0x177222(0x617,'NXvd')],_0x575b44[_0x177222(0x1af,'cJCH')]))_0x45e8dc[_0x177222(0x1f8,'cJCH')](_0x575b44[_0x177222(0x62c,'azvf')](_0x575b44[_0x177222(0x421,'VsQH')](_0x575b44[_0x177222(0x219,'MruR')]('[',this[_0x177222(0x189,'od7T')](_0x575b44[_0x177222(0x47e,'Ljj7')])),']'),_0x3469ae));else return![];}}class _0x54b1b5{constructor(_0x58dd56){const _0x656cd0=_0x359a3b,_0x1f186a={'GGImS':_0x656cd0(0x16f,')M[x')},_0x259235=_0x1f186a[_0x656cd0(0x49b,'n7BF')][_0x656cd0(0x533,'eudC')]('|');let _0xc9bd54=0x0;while(!![]){switch(_0x259235[_0xc9bd54++]){case'0':this[_0x656cd0(0x611,']Xq!')]=![];continue;case'1':this[_0x656cd0(0x16a,'F[gW')]=this[_0x656cd0(0x2d4,'0MRg')];continue;case'2':this[_0x656cd0(0x546,'4AWb')]='';continue;case'3':this[_0x656cd0(0x25e,'nCuX')]=++_0x2efce8;continue;case'4':this[_0x656cd0(0x27c,'ag4H')]=_0x58dd56[_0x656cd0(0x533,'eudC')]('#')[0x0];continue;}break;}}async[_0x359a3b(0x415,'M#Hj')](_0x455fb8,_0x19480f,_0x37ea72,_0x363a69,_0x3486a7={}){const _0x2d32c4=_0x359a3b,_0x58b392={'VdPRM':function(_0x389f73,_0x5d6324){return _0x389f73===_0x5d6324;},'QdJRu':_0x2d32c4(0x1aa,'cJCH'),'LRSld':function(_0x1bcd88,_0x5a8c0a){return _0x1bcd88+_0x5a8c0a;},'dYpcd':_0x2d32c4(0x475,'Ox(G'),'AWljz':function(_0x55f042,_0x25b9b1,_0x42b3c9){return _0x55f042(_0x25b9b1,_0x42b3c9);},'eDWgc':_0x2d32c4(0x250,'azvf'),'vQKUE':_0x2d32c4(0x166,'7hI#'),'KzmFK':function(_0x10149e,_0x5d062d){return _0x10149e===_0x5d062d;},'GAgaU':_0x2d32c4(0x217,'gkg]'),'rChhg':_0x2d32c4(0x3d3,'nCuX')};let _0x45ddaf=null;try{let _0x17d739={'url':_0x37ea72,'headers':{..._0x3486a7,'timestamp':_0x58b392[_0x2d32c4(0x2eb,'VsQH')]('',new Date()[_0x2d32c4(0x62e,'7hI#')]())},'timeout':0xea60};_0x363a69&&(_0x58b392[_0x2d32c4(0x2a2,'n7BF')](_0x58b392[_0x2d32c4(0x1e8,'7hI#')],_0x58b392[_0x2d32c4(0x2e6,'[#yz')])?_0x17d739[_0x2d32c4(0x530,'qAHF')]=_0x363a69:this[_0x2d32c4(0x5b5,'cJCH')](_0x4afc6b)),await _0x58b392[_0x2d32c4(0x55d,'VsQH')](_0x98183b,_0x19480f,_0x17d739)[_0x2d32c4(0x5a3,'8umv')](async _0x268059=>{const _0x1747dd=_0x2d32c4;if(_0x268059[_0x1747dd(0x50c,'Ox(G')]?.[_0x1747dd(0x33a,'7hI#')]){if(_0x58b392[_0x1747dd(0x501,'M#Hj')](_0x58b392[_0x1747dd(0x249,'NXvd')],_0x58b392[_0x1747dd(0x4ae,'xal4')]))_0x45ddaf=JSON[_0x1747dd(0x493,'x9pr')](_0x268059[_0x1747dd(0x1fe,'A6yu')][_0x1747dd(0x504,'e52A')]);else return _0x24eced;}else{}});}catch(_0x3a2b86){_0x58b392[_0x2d32c4(0x393,'vIIW')](_0x58b392[_0x2d32c4(0x1cd,'azvf')],_0x58b392[_0x2d32c4(0x36f,'PE3T')])?_0x2cd7aa[_0x2d32c4(0x1ed,'x9pr')](_0x24cee1):console[_0x2d32c4(0x1e5,'oC5F')](_0x3a2b86);}finally{if(_0x58b392[_0x2d32c4(0x1b3,'[#yz')](_0x58b392[_0x2d32c4(0x345,'s9*]')],_0x58b392[_0x2d32c4(0x49e,'azvf')]))_0x2f1c53[_0x2d32c4(0x35b,'Q300')]=_0x4b28df[_0x2d32c4(0x30f,'[@5v')]||{},_0x1535a5[_0x2d32c4(0x561,'n7BF')](_0x1b07ad[_0x2d32c4(0x3b7,'cM^%')],{'X-Surge-Skip-Scripting':!0x1});else return Promise[_0x2d32c4(0x625,'[#yz')](_0x45ddaf);}}async[_0x359a3b(0x344,'8umv')](){const _0x226a28=_0x359a3b,_0x6d8abc={'fsjrv':function(_0x573d52,_0x397de4){return _0x573d52/_0x397de4;},'ijXzL':function(_0x1c0dca,_0x4a48d8){return _0x1c0dca-_0x4a48d8;},'dVMzw':function(_0x589450,_0x5d3a4a){return _0x589450(_0x5d3a4a);},'roYrh':_0x226a28(0x426,'[@5v'),'cLlod':function(_0x312e1e,_0xb4aa22){return _0x312e1e(_0xb4aa22);},'lTnZZ':function(_0x9d23f8,_0x57a0bf){return _0x9d23f8<_0x57a0bf;},'DLksW':function(_0x10df4d,_0x328b09){return _0x10df4d!==_0x328b09;},'rJJFD':_0x226a28(0x425,'oNRx'),'TeWNQ':function(_0x566c4e,_0x47720a){return _0x566c4e==_0x47720a;},'buuZW':_0x226a28(0x534,')rc5'),'azwRS':function(_0x2c5267,_0xd25e38){return _0x2c5267+_0xd25e38;},'baiKC':function(_0x1da825,_0x3e184a){return _0x1da825+_0x3e184a;},'CqSJD':function(_0x290170,_0x1580ed){return _0x290170+_0x1580ed;},'ayQmo':function(_0x568e02,_0x4a7867){return _0x568e02(_0x4a7867);},'OhoFJ':_0x226a28(0x513,'cJCH'),'YRryC':function(_0x5a97b6,_0x55d384){return _0x5a97b6+_0x55d384;},'wpmas':function(_0x19b7f5,_0x107868){return _0x19b7f5+_0x107868;},'BcTiw':function(_0x37e587,_0xa7c732){return _0x37e587===_0xa7c732;},'GXTwp':_0x226a28(0x544,'A6yu'),'lSGgq':function(_0x4cf0a9,_0x4f065c,_0xe21231,_0x280003){return _0x4cf0a9(_0x4f065c,_0xe21231,_0x280003);},'ygOYg':function(_0x5d0a09,_0x53e08a){return _0x5d0a09+_0x53e08a;},'xtkBx':_0x226a28(0x1d1,'[#yz'),'qquPG':_0x226a28(0x41b,'F[gW'),'tCVOF':_0x226a28(0x254,'8umv'),'LrNOm':function(_0x200ceb,_0x25ac80){return _0x200ceb===_0x25ac80;},'ClYxr':_0x226a28(0x4fa,'7xMY'),'Ruduc':function(_0x34bbaf,_0x348b13,_0x2312e8){return _0x34bbaf(_0x348b13,_0x2312e8);},'lKKuk':function(_0x3593d4,_0x197725){return _0x3593d4===_0x197725;},'pLaAd':_0x226a28(0x4ba,'od7T'),'ZIZfB':function(_0x546e18,_0x100194){return _0x546e18===_0x100194;},'xLuOV':_0x226a28(0x4dd,'F[gW'),'vQqyz':_0x226a28(0x3a2,'Q300'),'YUpMu':_0x226a28(0x1d4,')M[x'),'bOQnd':_0x226a28(0x42e,'ag4H'),'vTvFN':_0x226a28(0x580,'j4ia'),'YZqiX':_0x226a28(0x353,'Q300'),'WLUzj':_0x226a28(0x613,'VsQH'),'DThln':_0x226a28(0x3c1,'nCuX'),'dqpcz':_0x226a28(0x64a,'n7BF'),'wlizi':_0x226a28(0x37e,'8umv')};try{if(_0x6d8abc[_0x226a28(0x636,'x9pr')](_0x6d8abc[_0x226a28(0x276,'F[gW')],_0x6d8abc[_0x226a28(0x1ea,'VsQH')])){let _0xfe552,_0x223def=_0x6d8abc[_0x226a28(0x48e,'$IdN')](_0x35c014,_0x6d8abc[_0x226a28(0x1eb,'n7BF')](_0x5903cb,_0x6d8abc[_0x226a28(0x59e,']Xq!')]),this[_0x226a28(0x631,'s9*]')]);if(_0x223def&&_0x6d8abc[_0x226a28(0x4e1,'F[gW')](typeof _0x223def,_0x6d8abc[_0x226a28(0x288,'x9pr')])){if(JSON[_0x226a28(0x55f,'^leF')](_0x223def)?.[_0x226a28(0x56d,'A6yu')]){if(_0x6d8abc[_0x226a28(0x1f4,'xal4')](_0x6d8abc[_0x226a28(0x2e4,'cJCH')],_0x6d8abc[_0x226a28(0x308,'NXvd')]))_0xfe552=JSON[_0x226a28(0x203,'cM^%')](_0x223def)?.[_0x226a28(0x3bf,'j4ia')];else{const _0x4f0b52=new _0x4ea917()[_0x226a28(0x419,'s9*]')](),_0x456654=_0x6d8abc[_0x226a28(0x41e,'j4ia')](_0x6d8abc[_0x226a28(0x573,'od7T')](_0x4f0b52,this[_0x226a28(0x53e,'7xMY')]),0x3e8);_0x2c2eaa[_0x226a28(0x386,'^leF')]('\x0a'+this[_0x226a28(0x3e0,'A6yu')]+_0x226a28(0x315,'j4ia')+_0x456654+_0x226a28(0x461,'Ljj7'));if(this[_0x226a28(0x464,'eudC')]()||this[_0x226a28(0x202,'7xMY')]()||this[_0x226a28(0x3cb,'cJCH')]())_0x6d8abc[_0x226a28(0x540,'F[gW')](_0x447055,_0x2eeda3);}}}let _0x411828=_0xfe552||this[_0x226a28(0x343,'oSR]')],_0x22297e=_0x6d8abc[_0x226a28(0x477,'z**A')],_0xe10c6d=_0x6d8abc[_0x226a28(0x358,'oSR]')],_0x44021a=_0x226a28(0x458,'!g)^'),_0x541805=_0x6d8abc[_0x226a28(0x1cb,'z**A')](_0x6d8abc[_0x226a28(0x5b4,'^leF')],_0x411828);return await this[_0x226a28(0x2e7,'0mD^')](_0x22297e,_0xe10c6d,_0x44021a,_0x541805,{'Host':_0x6d8abc[_0x226a28(0x1e0,'nCuX')],'Connection':_0x6d8abc[_0x226a28(0x5ba,'[@5v')],'channel':_0x6d8abc[_0x226a28(0x224,'Q300')],'User-Agent':_0x6d8abc[_0x226a28(0x352,'VsQH')],'Content-Type':_0x6d8abc[_0x226a28(0x141,'Y&oW')],'Accept':_0x6d8abc[_0x226a28(0x19e,'nCuX')],'Accept-Language':'*'})[_0x226a28(0x522,'$IdN')](async _0x4f7561=>{const _0x35c858=_0x226a28,_0x18daac={'awjvR':function(_0x21fb33,_0x231172){const _0x4f2426=_0x2b50;return _0x6d8abc[_0x4f2426(0x3a8,'[#yz')](_0x21fb33,_0x231172);},'jCqZC':function(_0x13db3d,_0x5bef25){const _0x45d882=_0x2b50;return _0x6d8abc[_0x45d882(0x5e2,'MruR')](_0x13db3d,_0x5bef25);}};if(_0x6d8abc[_0x35c858(0x624,'MruR')](_0x6d8abc[_0x35c858(0x1a6,'oC5F')],_0x6d8abc[_0x35c858(0x168,'Pjwb')]))_0x27d0da=_0x4b8639,_0x56f4b6=_0x346fed,_0x3d2d7a=_0x371eb,_0x18daac[_0x35c858(0x40e,'0MRg')](_0x5b3889,{'err':_0x6dcc50,'req':_0x90a9ae,'resp':_0x2cd883});else{if(_0x6d8abc[_0x35c858(0x2a6,'7xMY')](_0x4f7561?.[_0x35c858(0x296,'$IdN')],0x4e20)){this[_0x35c858(0x5de,'Db^u')]=_0x4f7561?.[_0x35c858(0x13f,'$IdN')]?.[_0x35c858(0x149,'7xMY')],this[_0x35c858(0x2da,'vIIW')]=_0x4f7561?.[_0x35c858(0x61f,'oC5F')]?.[_0x35c858(0x5af,'oNRx')];try{if(_0x6d8abc[_0x35c858(0x13d,'z**A')](_0x6d8abc[_0x35c858(0x4ed,'od7T')],_0x6d8abc[_0x35c858(0x3ad,'^leF')])){let _0x14d911=_0x693e42[_0x35c858(0x60f,'oC5F')]||_0x18d1e2[_0x35c858(0x4dc,'gkg]')]||_0x11bf0b[_0x6d8abc[_0x35c858(0x450,'1vMd')]];return{'url':_0x14d911};}else{const _0x48a2fb=JSON[_0x35c858(0x31d,'8umv')](_0x6d8abc[_0x35c858(0x563,'[#yz')](atob,this[_0x35c858(0x2ad,'ag4H')]?.[_0x35c858(0x365,'e52A')]('.')[0x1])),_0x566b37=_0x6d8abc[_0x35c858(0x4a6,'e52A')](_0x6d8abc[_0x35c858(0x3a3,'F[gW')](_0x6d8abc[_0x35c858(0x4ce,'Ljj7')](_0x6d8abc[_0x35c858(0x305,'eudC')](_0x6d8abc[_0x35c858(0x135,')M[x')](new Date(_0x6d8abc[_0x35c858(0x282,'0MRg')](Number,_0x6d8abc[_0x35c858(0x272,'Db^u')](_0x48a2fb?.[_0x35c858(0x591,'eudC')],_0x6d8abc[_0x35c858(0x583,'x9pr')])))?.[_0x35c858(0x2c6,'od7T')](),0x1),'月'),new Date(_0x6d8abc[_0x35c858(0x498,'oC5F')](Number,_0x6d8abc[_0x35c858(0x5fa,'q4F0')](_0x48a2fb?.[_0x35c858(0x641,'0mD^')],_0x6d8abc[_0x35c858(0x5c7,'nCuX')])))?.[_0x35c858(0x3e1,'8umv')]()),'日'),new Date(_0x6d8abc[_0x35c858(0x5a9,'Q300')](Number,_0x6d8abc[_0x35c858(0x34a,'Y&oW')](_0x48a2fb?.[_0x35c858(0x1fc,'[#yz')],_0x6d8abc[_0x35c858(0x2e9,')rc5')])))?.[_0x35c858(0x509,']Xq!')]()+':'+new Date(_0x6d8abc[_0x35c858(0x56a,'oSR]')](Number,_0x6d8abc[_0x35c858(0x2d7,'cM^%')](_0x48a2fb?.[_0x35c858(0x54f,'0MRg')],_0x6d8abc[_0x35c858(0x373,'1vMd')])))?.[_0x35c858(0x246,'[@5v')]()+_0x35c858(0x406,'xal4'));_0x2e1682[_0x35c858(0x471,'q4F0')](_0x35c858(0x497,'0mD^')+this[_0x35c858(0x413,'Db^u')]+_0x35c858(0x2f0,')rc5')+_0x566b37);}}catch(_0x309b98){_0x6d8abc[_0x35c858(0x44d,'7hI#')](_0x6d8abc[_0x35c858(0x5aa,'oNRx')],_0x6d8abc[_0x35c858(0x21f,'$IdN')])?_0x2e1682[_0x35c858(0x608,')M[x')](_0x35c858(0x24e,'xal4')+this[_0x35c858(0x378,'q4F0')]+_0x35c858(0x3fe,'cM^%')):(_0x10b85c[_0x35c858(0x3a1,'Q300')](_0x358df0),this[_0x35c858(0x594,'Q300')]+=_0x202519,this[_0x35c858(0x409,'oC5F')]+='\x0a');}return this[_0x35c858(0x1db,'n7BF')]=!![],_0x6d8abc[_0x35c858(0x56b,'Db^u')](_0x3469fc,_0x6d8abc[_0x35c858(0x14c,'$IdN')](_0x5903cb,_0x6d8abc[_0x35c858(0x4c0,'od7T')]),this[_0x35c858(0x3e5,'vIIW')],JSON[_0x35c858(0x532,')rc5')]({'refresh_token':this[_0x35c858(0x422,'$IdN')],'access_token':this[_0x35c858(0x1c4,'0mD^')]})),!![];}else{if(_0x6d8abc[_0x35c858(0x16e,'7hI#')](_0x6d8abc[_0x35c858(0x190,'pY1!')],_0x6d8abc[_0x35c858(0x347,'n7BF')]))_0x2e1682[_0x35c858(0x3d2,'Db^u')](_0x35c858(0x2e1,'q4F0')+this[_0x35c858(0x1f0,'oSR]')]+_0x35c858(0x635,'vIIW')+(_0x4f7561?.[_0x35c858(0x38f,'q4F0')]||JSON[_0x35c858(0x4c7,'cM^%')](_0x4f7561))),this[_0x35c858(0x4ff,'1vMd')]=![];else return _0x18daac[_0x35c858(0x390,'s9*]')](_0x226348,_0x985d48)?_0x3b85b9:_0x12c7bc;}}});}else _0x1c90b1[_0x226a28(0x3a9,'Ljj7')](_0x5886c8);}catch(_0x18d574){console[_0x226a28(0x4cd,'oSR]')](_0x18d574);}}async[_0x359a3b(0x2b0,'cM^%')](){const _0x232c76=_0x359a3b,_0x4fd628={'fmfuk':function(_0x1a15c1,_0x4c7936){return _0x1a15c1==_0x4c7936;},'vOdkE':function(_0x107d69,_0x1d7d52){return _0x107d69===_0x1d7d52;},'vTKMf':_0x232c76(0x517,'$IdN'),'xCEPO':_0x232c76(0x2f2,']Xq!'),'sOeKg':_0x232c76(0x4d5,'!g)^'),'hauUX':_0x232c76(0x223,'ag4H'),'uNoQO':function(_0x4a93c6,_0x45717d){return _0x4a93c6*_0x45717d;},'Opowh':function(_0x5038fe,_0x31f8f4){return _0x5038fe!==_0x31f8f4;},'HIqmk':_0x232c76(0x47a,'Ljj7'),'utxgS':_0x232c76(0x30c,'pY1!'),'FslOO':_0x232c76(0x42a,'s9*]'),'SgJFo':_0x232c76(0x1b4,'M#Hj')};try{if(_0x4fd628[_0x232c76(0x27d,'n7BF')](_0x4fd628[_0x232c76(0x133,'Q300')],_0x4fd628[_0x232c76(0x2bd,'qAHF')])){let _0x2f904a=_0x4fd628[_0x232c76(0x227,'vIIW')],_0x3a825c=_0x4fd628[_0x232c76(0x1b2,'j4ia')],_0x22b3bf=_0x232c76(0x4a0,'ag4H'),_0x2b028d='';return await this[_0x232c76(0x37d,'$IdN')](_0x2f904a,_0x3a825c,_0x22b3bf,_0x2b028d,{'Authorization':this[_0x232c76(0x31a,'nCuX')]})[_0x232c76(0x640,'xal4')](async _0x2b3477=>{const _0x33b0fa=_0x232c76;if(_0x4fd628[_0x33b0fa(0x405,'0mD^')](_0x2b3477?.[_0x33b0fa(0x245,'cM^%')],0xc8)){if(_0x4fd628[_0x33b0fa(0x609,')M[x')](_0x4fd628[_0x33b0fa(0x5f1,'ag4H')],_0x4fd628[_0x33b0fa(0x549,'4AWb')]))_0x48b9b5=_0x5ac995[_0x33b0fa(0x297,')M[x')](_0x517c32)?.[_0x33b0fa(0x349,'Q300')];else return _0x2e1682[_0x33b0fa(0x58e,'s9*]')](_0x33b0fa(0x3d4,'oC5F')+this[_0x33b0fa(0x2ba,'!g)^')]+_0x33b0fa(0x176,'7hI#')+_0x2b3477?.[_0x33b0fa(0x23d,'NXvd')]?.[_0x33b0fa(0x3c3,'ag4H')]+_0x33b0fa(0x45a,'s9*]')+(_0x2b3477?.[_0x33b0fa(0x5e8,'oSR]')]?.[_0x33b0fa(0x466,'cM^%')]||0x0)+',\x20'+(!_0x2b3477?.[_0x33b0fa(0x5e8,'oSR]')]?.[_0x33b0fa(0x14b,'e52A')]?_0x4fd628[_0x33b0fa(0x53c,'s9*]')]:_0x4fd628[_0x33b0fa(0x2ed,'eudC')])),this[_0x33b0fa(0x1ad,'MruR')]=_0x2b3477?.[_0x33b0fa(0x3d8,')M[x')]?.[_0x33b0fa(0x5e1,'od7T')],!![];}else _0x2e1682[_0x33b0fa(0x2a5,'0MRg')](_0x33b0fa(0x5cf,'pY1!')+this[_0x33b0fa(0x3dc,'F[gW')]+_0x33b0fa(0x400,'0mD^')+(_0x2b3477?.[_0x33b0fa(0x612,'PE3T')]||JSON[_0x33b0fa(0x541,'oNRx')](_0x2b3477)));});}else{let _0x421c83=_0x410243[_0x232c76(0x55a,'x9pr')](_0x4fd628[_0x232c76(0x3c8,'1vMd')](_0x1b0a13[_0x232c76(0x43d,'8umv')](),_0x499afc[_0x232c76(0x44a,'PE3T')]));return _0x5ab938[_0x421c83];}}catch(_0x1f84f4){console[_0x232c76(0x490,'q4F0')](_0x1f84f4);}}async[_0x359a3b(0x375,'e52A')](){const _0x50a9c8=_0x359a3b,_0x59234e={'WdIzv':function(_0x39d2f4,_0x4acc42){return _0x39d2f4==_0x4acc42;},'aKdMH':_0x50a9c8(0x391,'0MRg'),'mxsXl':_0x50a9c8(0x500,'qAHF'),'UghaL':_0x50a9c8(0x410,')M[x'),'Pdrgc':function(_0x265685,_0x1410eb){return _0x265685+_0x1410eb;},'xQhFI':_0x50a9c8(0x138,'F[gW')};try{let _0x46ff48=_0x59234e[_0x50a9c8(0x605,'vIIW')],_0x3747e2=_0x59234e[_0x50a9c8(0x394,'s9*]')],_0x2abb72=_0x50a9c8(0x5be,'xal4'),_0x5e3640='';return await this[_0x50a9c8(0x51e,'xal4')](_0x46ff48,_0x3747e2,_0x2abb72,_0x5e3640,{'Authorization':_0x59234e[_0x50a9c8(0x4bf,'pY1!')](_0x59234e[_0x50a9c8(0x1e9,'azvf')],this[_0x50a9c8(0x31b,'eudC')])})[_0x50a9c8(0x53f,'[@5v')](async _0x27735d=>{const _0x26673c=_0x50a9c8;if(_0x59234e[_0x26673c(0x521,'pY1!')](_0x27735d?.[_0x26673c(0x15c,'vIIW')],0xc8))return _0x2e1682[_0x26673c(0x579,'xal4')](_0x26673c(0x53a,'Db^u')+this[_0x26673c(0x5c1,'e52A')]+']\x20'+(_0x27735d?.[_0x26673c(0x2af,'NXvd')]||_0x59234e[_0x26673c(0x396,'z**A')])),!![];else _0x2e1682[_0x26673c(0x51d,'PE3T')](_0x26673c(0x456,')M[x')+this[_0x26673c(0x2c7,'s9*]')]+_0x26673c(0x598,'q4F0')+(_0x27735d?.[_0x26673c(0x63d,'Db^u')]||JSON[_0x26673c(0x2c3,'q4F0')](_0x27735d)));});}catch(_0x3300e3){console[_0x50a9c8(0x620,'1vMd')](_0x3300e3);}}async[_0x359a3b(0x5f8,'s9*]')](_0x1684a2){const _0x1095b3=_0x359a3b,_0x8c644c={'iLbgB':function(_0x5a794e,_0x1252e3){return _0x5a794e==_0x1252e3;},'jfgwO':_0x1095b3(0x476,'x9pr'),'mmYDD':_0x1095b3(0x1cf,'od7T'),'akaem':function(_0x27487c,_0x5a98fe){return _0x27487c===_0x5a98fe;},'HlYQi':_0x1095b3(0x1ff,'cM^%'),'OdnjO':_0x1095b3(0x247,'e52A'),'pcryi':function(_0x142db5,_0x5744f6,_0x18c07d,_0x14a557){return _0x142db5(_0x5744f6,_0x18c07d,_0x14a557);},'gpYSm':function(_0x658a60,_0x57f188){return _0x658a60+_0x57f188;},'HlpeV':_0x1095b3(0x2d8,')M[x'),'ywigH':function(_0x137835,_0x1ba0fe,_0x48ae61){return _0x137835(_0x1ba0fe,_0x48ae61);},'vzBeT':function(_0x1569dc,_0x20ef82){return _0x1569dc+_0x20ef82;},'bKsph':_0x1095b3(0x1ec,'[#yz'),'bthIz':function(_0x40a0cb,_0x490f9f){return _0x40a0cb===_0x490f9f;},'mALsF':_0x1095b3(0x42b,'Ox(G'),'XVUtW':function(_0x39dc7a,_0x2a735d){return _0x39dc7a!==_0x2a735d;},'Iudtw':_0x1095b3(0x5d6,'[#yz'),'beCyK':_0x1095b3(0x170,'nCuX'),'MxOPk':function(_0x370c81,_0x39d1e5){return _0x370c81-_0x39d1e5;},'qxaQD':function(_0x158ad0,_0x2b001c){return _0x158ad0<=_0x2b001c;},'IHuKo':function(_0x3f5c87,_0xb9cddd){return _0x3f5c87(_0xb9cddd);},'sAQjX':_0x1095b3(0x4d0,'NXvd'),'ySeqw':_0x1095b3(0x491,'0mD^'),'bTqMw':function(_0x3d4029,_0x1c7d6c){return _0x3d4029(_0x1c7d6c);},'dKvyY':_0x1095b3(0x369,'M#Hj'),'vlcgR':_0x1095b3(0x481,'^leF'),'LZUgO':function(_0x2fcdd2,_0x5760c1,_0x1350b8,_0x406d6d){return _0x2fcdd2(_0x5760c1,_0x1350b8,_0x406d6d);},'pwPAD':function(_0x26292c,_0x173d81){return _0x26292c===_0x173d81;},'nhEmo':_0x1095b3(0x1ac,'j4ia'),'NTGmp':_0x1095b3(0x575,'F[gW'),'atqsM':function(_0x250acc,_0x13fb31){return _0x250acc===_0x13fb31;},'tOchO':_0x1095b3(0x5fd,'7hI#')};let _0x3c8b03=null,_0x3aecf9,_0x372129=_0x8c644c[_0x1095b3(0x228,'xal4')](_0x35c014,_0x8c644c[_0x1095b3(0x46e,'xal4')](_0x5903cb,_0x8c644c[_0x1095b3(0x5ad,'oNRx')]),this[_0x1095b3(0x52d,'n7BF')]);_0x372129&&_0x8c644c[_0x1095b3(0x2b2,'oSR]')](typeof _0x372129,_0x8c644c[_0x1095b3(0x5c5,'[#yz')])&&(JSON[_0x1095b3(0x240,'Y&oW')](_0x372129)?.[_0x1095b3(0x4fc,'qAHF')]&&(_0x8c644c[_0x1095b3(0x286,'0MRg')](_0x8c644c[_0x1095b3(0x320,'M#Hj')],_0x8c644c[_0x1095b3(0x59c,'[@5v')])?_0x3aecf9=JSON[_0x1095b3(0x24a,']Xq!')](_0x372129)?.[_0x1095b3(0x349,'Q300')]:_0x25e248[_0x1095b3(0x248,'nCuX')](_0x3de1f1)));!_0x3aecf9&&(_0x3aecf9=0x32);for(let _0x5b8632=_0x8c644c[_0x1095b3(0x13c,'ag4H')](_0x3aecf9,0x14);_0x8c644c[_0x1095b3(0x3b8,'od7T')](_0x5b8632,_0x8c644c[_0x1095b3(0x407,'q4F0')](_0x1684a2,0x28));_0x5b8632++){let _0x4eb399=await _0x8c644c[_0x1095b3(0x5d8,'azvf')](SelectTurntableList,_0x5b8632);if(_0x8c644c[_0x1095b3(0x5b9,')rc5')](_0x4eb399[_0x1095b3(0x5f7,'Y&oW')],0xc8)){if(_0x8c644c[_0x1095b3(0x50d,'Pjwb')](_0x8c644c[_0x1095b3(0x438,'cM^%')],_0x8c644c[_0x1095b3(0x342,'A6yu')])){if(_0x8c644c[_0x1095b3(0x14e,'!g)^')](_0x172e29,_0x4eb399[_0x1095b3(0x3c7,'s9*]')][0x0])){if(_0x8c644c[_0x1095b3(0x4be,'e52A')](_0x8c644c[_0x1095b3(0x4c8,'ag4H')],_0x8c644c[_0x1095b3(0x5ae,')M[x')])){_0x3c8b03=_0x4eb399[_0x1095b3(0x463,'od7T')][0x0],_0x8c644c[_0x1095b3(0x614,'^leF')](_0x3469fc,_0x8c644c[_0x1095b3(0x1b0,'0MRg')](_0x5903cb,_0x8c644c[_0x1095b3(0x512,'7xMY')]),this[_0x1095b3(0x2ab,'Q300')],JSON[_0x1095b3(0x2c3,'q4F0')]({'startTurntableId':_0x3c8b03['id']}));break;}else{if(_0x8c644c[_0x1095b3(0x5d2,'MruR')](_0x31cb0b?.[_0x1095b3(0x46f,'cJCH')],0xc8))return _0x39e68a[_0x1095b3(0x21b,'0mD^')](_0x1095b3(0x53a,'Db^u')+this[_0x1095b3(0x55e,'Ljj7')]+_0x1095b3(0x439,')M[x')+_0x107c66?.[_0x1095b3(0x61f,'oC5F')]?.[_0x1095b3(0x18c,'n7BF')]+_0x1095b3(0x418,'[@5v')+(_0xcc0965?.[_0x1095b3(0x37f,'q4F0')]?.[_0x1095b3(0x4e5,'^leF')]||0x0)+',\x20'+(!_0x39e30a?.[_0x1095b3(0x5fb,')rc5')]?.[_0x1095b3(0x3ab,'azvf')]?_0x8c644c[_0x1095b3(0x279,'[#yz')]:_0x8c644c[_0x1095b3(0x1c5,'j4ia')])),this[_0x1095b3(0x2db,'s9*]')]=_0x17cd92?.[_0x1095b3(0x5e3,'pY1!')]?.[_0x1095b3(0x5e1,'od7T')],!![];else _0x5170c7[_0x1095b3(0x58a,'[@5v')](_0x1095b3(0x429,'cJCH')+this[_0x1095b3(0x3c2,'Pjwb')]+_0x1095b3(0x33b,')rc5')+(_0x45c1e3?.[_0x1095b3(0x338,'VsQH')]||_0x2b8eec[_0x1095b3(0x1a8,'ag4H')](_0x1d235f)));}}}else{if(_0x8c644c[_0x1095b3(0x488,'4AWb')](_0x1f9f8f[_0x1095b3(0x16b,'oSR]')],_0x8c644c[_0x1095b3(0x595,']Xq!')]))return _0x105232;else _0x13fd84[_0x1095b3(0x465,'eudC')](_0x8c644c[_0x1095b3(0x4e4,'Ljj7')],_0x12179a);}}if(_0x8c644c[_0x1095b3(0x328,'e52A')](_0x4eb399?.[_0x1095b3(0x46f,'cJCH')],0x194)){if(_0x8c644c[_0x1095b3(0x22c,'[#yz')](_0x8c644c[_0x1095b3(0x59f,'s9*]')],_0x8c644c[_0x1095b3(0x316,'gkg]')])){const {status:_0x2cd643,request:_0x35f6de,headers:_0x3aac37,data:_0x5e9b50}=_0x4eab87;_0x8c644c[_0x1095b3(0x43a,'0MRg')](_0x1842d9,null,_0x35f6de,{'statusCode':_0x2cd643,'headers':_0x3aac37,'body':_0x5e9b50});}else break;}}_0x3c8b03?_0x8c644c[_0x1095b3(0x1de,'qAHF')](_0x8c644c[_0x1095b3(0x472,'od7T')],_0x8c644c[_0x1095b3(0x581,'z**A')])?(_0x2e1682[_0x1095b3(0x54a,'e52A')](_0x1095b3(0x62f,'NXvd')+this[_0x1095b3(0x432,'^leF')]+_0x1095b3(0x1f7,'[#yz')+_0x3c8b03[_0x1095b3(0x5ed,'s9*]')]+_0x1095b3(0x329,'azvf')+_0x3c8b03[_0x1095b3(0x318,'NXvd')]),this[_0x1095b3(0x232,'4AWb')](_0x3c8b03['id'],result[_0x1095b3(0x23d,'NXvd')][0x0][_0x1095b3(0x306,'Y&oW')],result[_0x1095b3(0x4d7,'[@5v')][_0x1095b3(0x4c1,'xal4')])):_0x5239fc[_0x1095b3(0x3b1,'pY1!')](_0x8c644c[_0x1095b3(0x5ff,'z**A')](_0x30548f,_0x8c644c[_0x1095b3(0x24c,'eudC')]),_0x58473e):_0x2e1682[_0x1095b3(0x51d,'PE3T')](_0x1095b3(0x401,'4AWb')+this[_0x1095b3(0x188,'j4ia')]+_0x1095b3(0x18d,'Ox(G'));}async[_0x359a3b(0x448,'vIIW')](_0x3708a0){const _0x2d062e=_0x359a3b,_0x1aad25={'ZQmuU':_0x2d062e(0x637,'x9pr'),'YvHwJ':function(_0xec9aa8,_0x9dfbbe){return _0xec9aa8===_0x9dfbbe;},'JuKmK':_0x2d062e(0x19d,'M#Hj'),'gqJGo':_0x2d062e(0x562,'^leF'),'KgVuE':function(_0x75246a,_0x10217a){return _0x75246a!==_0x10217a;},'sjNeM':_0x2d062e(0x17e,'x9pr'),'VXUBm':_0x2d062e(0x5a7,'x9pr'),'WlhhY':_0x2d062e(0x2cf,'s9*]'),'XqVfq':function(_0x213989,_0x41193e){return _0x213989+_0x41193e;},'PMjhT':_0x2d062e(0x1bb,'^leF')};try{if(_0x1aad25[_0x2d062e(0x593,'oC5F')](_0x1aad25[_0x2d062e(0x47f,'!g)^')],_0x1aad25[_0x2d062e(0x29d,'A6yu')]))return _0x57ff6e[_0x2d062e(0x2c9,'Ljj7')](_0x2d062e(0x1fa,'A6yu')+this[_0x2d062e(0x39f,'[#yz')]+']\x20'+(_0x50e839?.[_0x2d062e(0x57a,'8umv')]||_0x1aad25[_0x2d062e(0x44f,'F[gW')])),!![];else{let _0x42b494=_0x1aad25[_0x2d062e(0x457,']Xq!')],_0x496034=_0x1aad25[_0x2d062e(0x5cc,'Ox(G')],_0x468a6b=_0x2d062e(0x1f6,'F[gW')+_0x3708a0,_0xde3558='';return await this[_0x2d062e(0x5f4,'8umv')](_0x42b494,_0x496034,_0x468a6b,_0xde3558,{'Authorization':_0x1aad25[_0x2d062e(0x58b,'Db^u')](_0x1aad25[_0x2d062e(0x4e2,'s9*]')],this[_0x2d062e(0x242,'oNRx')])})[_0x2d062e(0x2d5,'[#yz')](async _0x4861e8=>{const _0x3148cd=_0x2d062e;if(_0x1aad25[_0x3148cd(0x4c3,'oC5F')](_0x1aad25[_0x3148cd(0x64c,')rc5')],_0x1aad25[_0x3148cd(0x19c,'NXvd')]))_0x3f4b55[_0x3148cd(0x58a,'[@5v')](_0x3148cd(0x5d1,'e52A')+this[_0x3148cd(0x3e3,'Q300')]+_0x3148cd(0x547,'gkg]')+_0x539e0a[_0x3148cd(0x427,'od7T')]+_0x3148cd(0x602,'7hI#')+_0x3abaf0[_0x3148cd(0x5e0,')rc5')]),this[_0x3148cd(0x5bc,'q4F0')](_0x5d1c1e['id'],_0x6798ff[_0x3148cd(0x143,'Pjwb')][0x0][_0x3148cd(0x629,'NXvd')],_0x1ee98c[_0x3148cd(0x45e,'e52A')][_0x3148cd(0x1e1,'z**A')]);else return _0x4861e8;});}}catch(_0x32ada0){return console[_0x2d062e(0x2f7,'qAHF')](_0x32ada0),{};}}async[_0x359a3b(0x5fe,'eudC')](_0x17d312,_0x1c5ede,_0x1c9ef2){const _0x47ec25=_0x359a3b,_0x13012a={'GvFdB':function(_0x2c179a,_0x27d715){return _0x2c179a==_0x27d715;},'hNEwR':function(_0x36b1ff,_0x3a8dba){return _0x36b1ff===_0x3a8dba;},'ieIWg':_0x47ec25(0x632,'NXvd'),'DVeWI':_0x47ec25(0x2c0,'NXvd'),'EJXqz':function(_0x229cd6,_0x4669a1){return _0x229cd6!==_0x4669a1;},'MiVWT':_0x47ec25(0x13a,'Y&oW'),'Dijue':_0x47ec25(0x572,'0MRg'),'UjhXC':_0x47ec25(0x628,'j4ia'),'FnZSt':function(_0x4bd55d,_0x17b101){return _0x4bd55d+_0x17b101;},'ZXDJp':_0x47ec25(0x58c,']Xq!')};try{let _0x3b08d3=_0x13012a[_0x47ec25(0x198,'Db^u')],_0x2b0762=_0x13012a[_0x47ec25(0x183,'cJCH')],_0x787e0c=_0x47ec25(0x606,'Q300')+_0x17d312,_0x55b995=_0x47ec25(0x244,'cJCH')+_0x1c5ede+_0x47ec25(0x23c,')M[x')+_0x17d312+_0x47ec25(0x39b,'od7T')+_0x1c9ef2+'}';return await this[_0x47ec25(0x542,')M[x')](_0x3b08d3,_0x2b0762,_0x787e0c,_0x55b995,{'Authorization':_0x13012a[_0x47ec25(0x32b,'e52A')](_0x13012a[_0x47ec25(0x588,'x9pr')],this[_0x47ec25(0x546,'4AWb')])})[_0x47ec25(0x5a1,']Xq!')](async _0x4a2c6e=>{const _0x14387c=_0x47ec25;if(_0x13012a[_0x14387c(0x524,'NXvd')](_0x13012a[_0x14387c(0x24f,'Db^u')],_0x13012a[_0x14387c(0x506,'oNRx')]))_0x522ada[_0x14387c(0x13e,'vIIW')](_0x3d2b05);else{if(_0x13012a[_0x14387c(0x368,'!g)^')](_0x4a2c6e?.[_0x14387c(0x3de,'F[gW')],0xc8))return _0x2e1682[_0x14387c(0x58e,'s9*]')](_0x14387c(0x447,'od7T')+this[_0x14387c(0x27f,'z**A')]+_0x14387c(0x4e7,'$IdN')+_0x4a2c6e[_0x14387c(0x157,'7xMY')][0x0][_0x14387c(0x362,'$IdN')]),!![];else{if(_0x13012a[_0x14387c(0x449,'od7T')](_0x13012a[_0x14387c(0x50e,'[#yz')],_0x13012a[_0x14387c(0x551,'ag4H')])){if(_0x13012a[_0x14387c(0x2f5,'A6yu')](_0x32d5d9?.[_0x14387c(0x639,'8umv')],0xc8))return _0x12ea6e[_0x14387c(0x5b3,'7xMY')](_0x14387c(0x1fd,'!g)^')+this[_0x14387c(0x211,'od7T')]+']\x20'+(_0x3087b5?.[_0x14387c(0x377,'!g)^')]||_0x2dd75a[_0x14387c(0x3d5,'n7BF')](_0x5edd0d))),!![];else _0x4aa6df[_0x14387c(0x38e,'oC5F')](_0x14387c(0x5e9,'8umv')+this[_0x14387c(0x623,'Y&oW')]+']\x20'+(_0x1aad6e?.[_0x14387c(0x612,'PE3T')]||_0x3af3c4[_0x14387c(0x514,'7xMY')](_0xfcfa97)));}else _0x2e1682[_0x14387c(0x416,'qAHF')](_0x14387c(0x53a,'Db^u')+this[_0x14387c(0x2c7,'s9*]')]+']\x20'+(_0x4a2c6e?.[_0x14387c(0x55b,'s9*]')]||JSON[_0x14387c(0x1a8,'ag4H')](_0x4a2c6e)));}}});}catch(_0x2a4683){console[_0x47ec25(0x33e,'PE3T')](_0x2a4683);}}async[_0x359a3b(0x3ed,'VsQH')](_0x529116){const _0x360ebb=_0x359a3b,_0x25f179={'qoMqT':function(_0x317ff2,_0x1e1d19){return _0x317ff2==_0x1e1d19;},'RqXrY':function(_0x3723e9,_0x48f280){return _0x3723e9+_0x48f280;},'loVEk':function(_0x4d966b,_0x53daeb){return _0x4d966b*_0x53daeb;},'dlnEA':_0x360ebb(0x30b,'M#Hj'),'gFzLO':_0x360ebb(0x20b,'0MRg'),'vIiih':function(_0x51e19,_0x43dd14){return _0x51e19+_0x43dd14;},'Zefws':_0x360ebb(0x339,'nCuX'),'kLSab':_0x360ebb(0x1d5,'j4ia')};try{!_0x529116&&(_0x529116=_0x25f179[_0x360ebb(0x586,'gkg]')](Math[_0x360ebb(0x251,'Db^u')](_0x25f179[_0x360ebb(0x646,'7hI#')](Math[_0x360ebb(0x569,'ag4H')](),0xc350)),0x493e0));let _0x2b1062=_0x25f179[_0x360ebb(0x40c,'ag4H')],_0x313a55=_0x25f179[_0x360ebb(0x485,'Ljj7')],_0x12f7a2=_0x360ebb(0x1ba,'Q300'),_0x7af3cd=_0x360ebb(0x1f5,'^leF')+_0x529116+_0x360ebb(0x62d,'Ljj7')+Math[_0x360ebb(0x163,'qAHF')](_0x25f179[_0x360ebb(0x39a,'VsQH')](_0x25f179[_0x360ebb(0x3b2,'Ljj7')](Math[_0x360ebb(0x565,'!g)^')](),0x3),0x1))+'\x22}';return await this[_0x360ebb(0x2e7,'0mD^')](_0x2b1062,_0x313a55,_0x12f7a2,_0x7af3cd,{'Authorization':_0x25f179[_0x360ebb(0x2fa,'nCuX')](_0x25f179[_0x360ebb(0x1cc,'[#yz')],this[_0x360ebb(0x2d6,'VsQH')]),'Accept':_0x25f179[_0x360ebb(0x3a5,'[#yz')],'Content-Type':_0x25f179[_0x360ebb(0x437,'$IdN')]})[_0x360ebb(0x5a3,'8umv')](async _0x4456f5=>{const _0x38bdf0=_0x360ebb;if(_0x25f179[_0x38bdf0(0x264,'1vMd')](_0x4456f5?.[_0x38bdf0(0x3e2,'xal4')],0xc8))return _0x2e1682[_0x38bdf0(0x181,'eudC')](_0x38bdf0(0x147,'z**A')+this[_0x38bdf0(0x5db,'pY1!')]+']\x20'+(_0x4456f5?.[_0x38bdf0(0x2d2,'0MRg')]||JSON[_0x38bdf0(0x49d,'e52A')](_0x4456f5))),!![];else _0x2e1682[_0x38bdf0(0x287,'MruR')](_0x38bdf0(0x497,'0mD^')+this[_0x38bdf0(0x2a7,'Ox(G')]+']\x20'+(_0x4456f5?.[_0x38bdf0(0x326,'[#yz')]||JSON[_0x38bdf0(0x26f,'Pjwb')](_0x4456f5)));});}catch(_0x504d0e){console[_0x360ebb(0x63f,'A6yu')](_0x504d0e);}}async[_0x359a3b(0x4ea,')M[x')](){const _0x16f108=_0x359a3b,_0x49e917={'yvsYZ':function(_0x293b88,_0x5b6a75){return _0x293b88===_0x5b6a75;},'LTsRD':_0x16f108(0x154,'gkg]'),'eJVTQ':_0x16f108(0x5a6,'ag4H')};try{_0x2e1682[_0x16f108(0x60b,'gkg]')](_0x16f108(0x262,'$IdN')+this[_0x16f108(0x1bf,'7hI#')]+_0x16f108(0x56f,'MruR')),await this[_0x16f108(0x3cf,'A6yu')](),!this[_0x16f108(0x529,'n7BF')]&&(_0x49e917[_0x16f108(0x4b8,'Pjwb')](_0x49e917[_0x16f108(0x13b,'7hI#')],_0x49e917[_0x16f108(0x4a7,'z**A')])?_0x4162c4+=_0x27a09d:(_0x2e1682[_0x16f108(0x51d,'PE3T')](_0x16f108(0x643,'Y&oW')+this[_0x16f108(0x2c7,'s9*]')]+_0x16f108(0x20e,'qAHF')),await this[_0x16f108(0x2e5,'0mD^')]())),_0x2e1682[_0x16f108(0x5b2,'NXvd')](_0x16f108(0x489,'Ox(G')+this[_0x16f108(0x241,'qAHF')]+_0x16f108(0x321,'0MRg')),await this[_0x16f108(0x2ec,'x9pr')](),_0x2e1682[_0x16f108(0x38b,'pY1!')](_0x16f108(0x307,'e52A')+this[_0x16f108(0x25e,'nCuX')]+_0x16f108(0x18a,']Xq!')),await this[_0x16f108(0x3fb,'1vMd')]();}catch(_0x5a7d87){console[_0x16f108(0x17f,'Db^u')](_0x5a7d87);}}}!(async()=>{const _0x3bee26=_0x359a3b,_0x15c9a8={'CJsGB':function(_0x53eb0a,_0x4575d6){return _0x53eb0a+_0x4575d6;},'zhRZM':_0x3bee26(0x15e,'oC5F'),'TJLgi':function(_0x123916){return _0x123916();},'eBwXq':function(_0x2d1144,_0x5d6a9b){return _0x2d1144!==_0x5d6a9b;},'CxTLB':_0x3bee26(0x20c,'s9*]'),'ykqbs':function(_0x1173cb){return _0x1173cb();},'oAzHE':_0x3bee26(0x4f4,'oC5F'),'dOhNV':function(_0x47eaa2,_0x347e9b){return _0x47eaa2===_0x347e9b;},'pWvgp':_0x3bee26(0x29e,'oNRx'),'NIDUS':function(_0x2619a7,_0x2906c9){return _0x2619a7>_0x2906c9;},'bBcOJ':_0x3bee26(0x42d,'4AWb'),'jTWwr':_0x3bee26(0x1f2,'PE3T'),'ECQlH':_0x3bee26(0x5b8,')rc5'),'fkTLU':_0x3bee26(0x3c6,'azvf')};await _0x15c9a8[_0x3bee26(0x411,'7xMY')](_0x301815);if(_0x15c9a8[_0x3bee26(0x221,'Pjwb')](typeof $request,_0x15c9a8[_0x3bee26(0x45b,'azvf')]))await _0x15c9a8[_0x3bee26(0x53d,'F[gW')](_0x5ef437);else{if(!await _0x15c9a8[_0x3bee26(0x185,'nCuX')](_0x77c74b))return;console[_0x3bee26(0x1e5,'oC5F')](_0x15c9a8[_0x3bee26(0x4bd,'$IdN')]);for(let _0x3a00e1 of _0x25fb27){if(_0x15c9a8[_0x3bee26(0x3d6,'od7T')](_0x15c9a8[_0x3bee26(0x35a,'NXvd')],_0x15c9a8[_0x3bee26(0x2ef,'1vMd')]))console[_0x3bee26(0x480,'$IdN')](_0x3bee26(0x3b4,'od7T')+_0x3a00e1[_0x3bee26(0x1a0,']Xq!')]+_0x3bee26(0x3ce,'oSR]')),await _0x3a00e1[_0x3bee26(0x1d6,'4AWb')]();else{const _0x43b741={};this[_0x3bee26(0x444,'7hI#')](_0x43b741,_0x537a7a,_0x3cf9d5),_0x920f78=this[_0x3bee26(0x35d,'q4F0')](_0x39276a[_0x3bee26(0x596,'NXvd')](_0x43b741),_0x12d9f4);}}let _0x1bec51=_0x25fb27[_0x3bee26(0x54c,'!g)^')](_0x47255f=>_0x47255f[_0x3bee26(0x195,'MruR')]);if(_0x15c9a8[_0x3bee26(0x46a,'cM^%')](_0x1bec51[_0x3bee26(0x4a3,'cM^%')],0x0)){if(_0x15c9a8[_0x3bee26(0x647,'Q300')](_0x15c9a8[_0x3bee26(0x323,'MruR')],_0x15c9a8[_0x3bee26(0x558,'vIIW')]))_0x32fc80[_0x3bee26(0x312,')M[x')](_0x15c9a8[_0x3bee26(0x5bb,'^leF')](_0x33ae0c,_0x15c9a8[_0x3bee26(0x5d3,'Pjwb')]),_0x89965c);else{console[_0x3bee26(0x4f5,'gkg]')](_0x15c9a8[_0x3bee26(0x40b,'!g)^')]);for(let _0x1768cb of _0x1bec51){console[_0x3bee26(0x22d,'azvf')](_0x3bee26(0x3f8,'NXvd')+_0x1768cb[_0x3bee26(0x5c1,'e52A')]+_0x3bee26(0x3c0,'M#Hj')),await _0x1768cb[_0x3bee26(0x2b1,'oC5F')]();}}}else console[_0x3bee26(0x22d,'azvf')](_0x15c9a8[_0x3bee26(0x22f,'7xMY')]);await _0x2e1682[_0x3bee26(0x213,'M#Hj')]();}})()[_0x359a3b(0x31f,'Q300')](_0x3fe227=>console[_0x359a3b(0x490,'q4F0')](_0x3fe227))[_0x359a3b(0x4e0,'qAHF')](()=>_0x2e1682[_0x359a3b(0x43f,']Xq!')]());async function _0x5ef437(){}async function _0x301815(){const _0x5bfe12=_0x359a3b;_0x2e1682[_0x5bfe12(0x25a,'M#Hj')](_0x5bfe12(0x169,'F[gW')),_0x2e1682[_0x5bfe12(0x265,'Ljj7')](0x64);}function _0x3469fc(_0x1041d4,_0x3fceb0,_0x5ada4b){const _0x209f89=_0x359a3b,_0x6d3178={'XFSTj':function(_0x217483,_0x47f2ed){return _0x217483+_0x47f2ed;},'TDSkx':_0x209f89(0x21e,'gkg]'),'qPJox':_0x209f89(0x20a,'eudC'),'aowOt':function(_0x47f2e9,_0x2dcf83){return _0x47f2e9!==_0x2dcf83;},'mhRCk':_0x209f89(0x292,'eudC'),'ZwOgW':function(_0x3a1a4f,_0x14d613){return _0x3a1a4f+_0x14d613;},'iqIdX':_0x209f89(0x50b,'7hI#'),'QjKdw':_0x209f89(0x648,'azvf'),'QPtMi':function(_0x2b1abf,_0x15c639){return _0x2b1abf===_0x15c639;},'XzWyb':_0x209f89(0x36d,'!g)^'),'qJIFB':_0x209f89(0x5f6,'NXvd')};let _0x4b4c90={},_0x24c9b6={};try{_0x4b4c90=_0x1af086[_0x209f89(0x3f2,'7hI#')](_0x6d3178[_0x209f89(0x520,'qAHF')](_0x1041d4,_0x6d3178[_0x209f89(0x59d,'gkg]')]),_0x6d3178[_0x209f89(0x40f,'Q300')]),_0x24c9b6=JSON[_0x209f89(0x283,'xal4')](_0x4b4c90);}catch(_0x35b3fc){}_0x24c9b6[_0x3fceb0]=_0x5ada4b;const _0x8db610=JSON[_0x209f89(0x370,'F[gW')](_0x24c9b6);try{_0x6d3178[_0x209f89(0x42f,')rc5')](_0x6d3178[_0x209f89(0x428,'azvf')],_0x6d3178[_0x209f89(0x355,'7xMY')])?_0x5c8519[_0x209f89(0x58a,'[@5v')](_0x209f89(0x589,'Ljj7')+this[_0x209f89(0x3dc,'F[gW')]+_0x209f89(0x2f3,'e52A')):_0x1af086[_0x209f89(0x4df,'oC5F')](_0x6d3178[_0x209f89(0x171,'7xMY')](_0x1041d4,_0x6d3178[_0x209f89(0x59d,'gkg]')]),_0x8db610);}catch(_0x1ebdcb){if(_0x6d3178[_0x209f89(0x644,'0mD^')](_0x6d3178[_0x209f89(0x257,'M#Hj')],_0x6d3178[_0x209f89(0x1c1,'Ox(G')]))_0x6d3178[_0x209f89(0x52c,'q4F0')](_0x1ebdcb[_0x209f89(0x3ae,'oC5F')],_0x6d3178[_0x209f89(0x52a,']Xq!')])?_0x1af086[_0x209f89(0x22b,'oNRx')](_0x6d3178[_0x209f89(0x4a4,'x9pr')](_0x1041d4,_0x6d3178[_0x209f89(0x350,'oC5F')]),_0x8db610):console[_0x209f89(0x414,'0MRg')](_0x6d3178[_0x209f89(0x45f,'nCuX')],_0x1ebdcb);else return!![];}}function _0x35c014(_0x302330,_0x142cc5){const _0x506d25=_0x359a3b,_0x86c783={'SjPUx':function(_0x1dc5ce,_0x124971){return _0x1dc5ce+_0x124971;},'vcDDr':_0x506d25(0x2b4,'oSR]'),'CxcjI':_0x506d25(0x2c8,'$IdN'),'ceqXH':function(_0x3eb2cb,_0x1efe17){return _0x3eb2cb===_0x1efe17;},'cOfDw':_0x506d25(0x28a,'oNRx'),'nzBaY':function(_0x1fe44e,_0x263ba5){return _0x1fe44e!==_0x263ba5;},'eftJX':_0x506d25(0x284,'vIIW'),'owHxU':_0x506d25(0x474,'!g)^'),'yuDjh':_0x506d25(0x260,'VsQH')};try{const _0x544ece=_0x1af086[_0x506d25(0x2ac,'Db^u')](_0x86c783[_0x506d25(0x441,'Db^u')](_0x302330,_0x86c783[_0x506d25(0x2aa,'vIIW')]),_0x86c783[_0x506d25(0x36a,'Db^u')]),_0x500f75=JSON[_0x506d25(0x48f,'$IdN')](_0x544ece);return _0x500f75[_0x142cc5];}catch(_0x156295){if(_0x86c783[_0x506d25(0x552,'pY1!')](_0x156295[_0x506d25(0x47c,'Db^u')],_0x86c783[_0x506d25(0x2cb,'1vMd')]))return undefined;else _0x86c783[_0x506d25(0x274,'j4ia')](_0x86c783[_0x506d25(0x1e3,'Y&oW')],_0x86c783[_0x506d25(0x4c9,'PE3T')])?console[_0x506d25(0x4b3,'azvf')](_0x86c783[_0x506d25(0x1b6,'oC5F')],_0x156295):(_0x2ce0ff[_0x506d25(0x54a,'e52A')](_0x506d25(0x64f,'[#yz')+this[_0x506d25(0x14a,'M#Hj')]+_0x506d25(0x165,']Xq!')+(_0x588e39?.[_0x506d25(0x455,')rc5')]||_0x5b3d93[_0x506d25(0x557,'0MRg')](_0x491472))),this[_0x506d25(0x46d,'VsQH')]=![]);}}async function _0x77c74b(){const _0x2dea17=_0x359a3b,_0x2cdd84={'Onojv':function(_0x571f61,_0x3bf339){return _0x571f61===_0x3bf339;},'zHBvg':_0x2dea17(0x334,'[#yz'),'btxrB':function(_0x508045,_0x1ae47d){return _0x508045+_0x1ae47d;},'shATR':_0x2dea17(0x2cd,']Xq!'),'iqagm':_0x2dea17(0x440,'e52A'),'QLhfw':function(_0x4240ab,_0xabefe8){return _0x4240ab>_0xabefe8;},'eBJJy':function(_0x297f67,_0x3ddff0){return _0x297f67!==_0x3ddff0;},'ekAEE':_0x2dea17(0x527,'cM^%'),'jLEBi':_0x2dea17(0x553,'pY1!')};if(_0x4e038c){let _0x587ea0=_0x23a779[0x0];for(let _0x404693 of _0x23a779){if(_0x2cdd84[_0x2dea17(0x1b5,'n7BF')](_0x4e038c[_0x2dea17(0x4ac,'7hI#')](_0x404693),-0x1)){if(_0x2cdd84[_0x2dea17(0x327,'xal4')](_0x2cdd84[_0x2dea17(0x45c,']Xq!')],_0x2cdd84[_0x2dea17(0x4d4,'4AWb')]))_0x2cdd84[_0x2dea17(0x5fc,'7xMY')](_0x308ffa[_0x2dea17(0x3dd,'^leF')],_0x2cdd84[_0x2dea17(0x5b6,')M[x')])?_0x38303b[_0x2dea17(0x2b7,'q4F0')](_0x2cdd84[_0x2dea17(0x15d,']Xq!')](_0x48f761,_0x2cdd84[_0x2dea17(0x3fa,'0mD^')]),_0x31facd):_0x48fd05[_0x2dea17(0x50f,'qAHF')](_0x2cdd84[_0x2dea17(0x4d8,'cJCH')],_0x4fb796);else{_0x587ea0=_0x404693;break;}}}for(let _0x2064ce of _0x4e038c[_0x2dea17(0x365,'e52A')](_0x587ea0)){if(_0x2064ce)_0x25fb27[_0x2dea17(0x381,'Q300')](new _0x54b1b5(_0x2064ce));}userCount=_0x25fb27[_0x2dea17(0x40d,'qAHF')];}else{console[_0x2dea17(0x26e,'!g)^')](_0x2cdd84[_0x2dea17(0x17b,'F[gW')],_0x5903cb);return;}return console[_0x2dea17(0x3f0,')M[x')](_0x2dea17(0x5cd,'8umv')+userCount+_0x2dea17(0x23e,'A6yu')),!![];}async function _0x98183b(_0x478103,_0x1989a8){const _0x5abfa9=_0x359a3b,_0x40de3b={'IdYdw':function(_0x3e1c33,_0x4a81f0){return _0x3e1c33(_0x4a81f0);},'cXrZR':function(_0x38681c,_0x379f27){return _0x38681c+_0x379f27;},'mLGSk':_0x5abfa9(0x162,'pY1!'),'ziEBF':_0x5abfa9(0x5c0,')rc5'),'GeUCx':function(_0x2917b6,_0x347210){return _0x2917b6===_0x347210;},'YXPNe':_0x5abfa9(0x14f,'cM^%')};return httpErr=null,httpReq=null,httpResp=null,new Promise(_0x456628=>{const _0x46644b=_0x5abfa9,_0x2cff59={'DUQaV':function(_0x4953ec,_0x54d380){const _0x15cf7b=_0x2b50;return _0x40de3b[_0x15cf7b(0x4e9,'cJCH')](_0x4953ec,_0x54d380);},'gHdbI':function(_0x421a84,_0x26fe2b){const _0x20b45b=_0x2b50;return _0x40de3b[_0x20b45b(0x519,'Pjwb')](_0x421a84,_0x26fe2b);},'RmDVm':_0x40de3b[_0x46644b(0x650,'j4ia')],'LMfJV':_0x40de3b[_0x46644b(0x5e4,'xal4')]};_0x40de3b[_0x46644b(0x281,'cM^%')](_0x40de3b[_0x46644b(0x398,'7hI#')],_0x40de3b[_0x46644b(0x271,'!g)^')])?_0x2e1682[_0x46644b(0x39c,'oSR]')](_0x478103,_0x1989a8,async(_0x5a0a74,_0x1813fd,_0x3a4023)=>{const _0x574577=_0x46644b;httpErr=_0x5a0a74,httpReq=_0x1813fd,httpResp=_0x3a4023,_0x2cff59[_0x574577(0x314,'Q300')](_0x456628,{'err':_0x5a0a74,'req':_0x1813fd,'resp':_0x3a4023});}):(_0x4845b=_0x1697f7[_0x46644b(0x206,'!g)^')](_0x2cff59[_0x46644b(0x313,'NXvd')](_0x3937ac,_0x2cff59[_0x46644b(0x216,'MruR')]),_0x2cff59[_0x46644b(0x571,'cM^%')]),_0x1eed6c=_0x54298f[_0x46644b(0x55f,'^leF')](_0x502674));});}function _0xc82324(_0x4160ab,_0x26385f){const _0x4e742f=_0x359a3b,_0x2214b3={'WybPb':_0x4e742f(0x354,'[#yz'),'JaOuA':function(_0x260947,_0x211e51){return _0x260947!=_0x211e51;},'aYPcG':_0x4e742f(0x356,'z**A'),'EXBpz':function(_0x7b9777,_0x5cae81){return _0x7b9777!=_0x5cae81;},'XWJvr':function(_0x40d153,_0x95cfaf){return _0x40d153!=_0x95cfaf;},'feNdy':function(_0x5553fd,_0xb560d7){return _0x5553fd==_0xb560d7;},'pewmo':function(_0x180795,_0x39ecf2){return _0x180795!==_0x39ecf2;},'hDTjm':_0x4e742f(0x539,'4AWb'),'XvJxJ':function(_0x4e8ff0,_0x76c5e){return _0x4e8ff0!=_0x76c5e;},'rEACX':function(_0x312e26,_0x4dda59){return _0x312e26+_0x4dda59;},'DjjGx':function(_0x39510d,_0x3c35e7){return _0x39510d*_0x3c35e7;},'FvTHZ':function(_0x36a2ed,_0x406795){return _0x36a2ed===_0x406795;},'EWOWW':_0x4e742f(0x2b6,'s9*]'),'OCicc':_0x4e742f(0x2fd,'[@5v'),'OeVqT':function(_0x168673,_0x32af9f,_0x3746d6,_0x278584){return _0x168673(_0x32af9f,_0x3746d6,_0x278584);},'NdaHE':function(_0x6bc58d,_0xcf4961){return _0x6bc58d(_0xcf4961);},'eBTHx':_0x4e742f(0x4f9,'cJCH'),'rGVzp':_0x4e742f(0x3e4,'$IdN'),'RpVyS':_0x4e742f(0x4c6,'0mD^'),'Foezi':function(_0x5b08fe,_0x8d6669){return _0x5b08fe!==_0x8d6669;},'mZyLg':_0x4e742f(0x3f1,'Db^u'),'GPVAw':_0x4e742f(0x152,'oC5F'),'LsLGq':function(_0x460ef7,_0x33bfb6){return _0x460ef7||_0x33bfb6;},'kWVWg':function(_0x5bf1f8,_0x154959){return _0x5bf1f8!==_0x154959;},'Jrbur':_0x4e742f(0x3f3,'Pjwb'),'flDcc':_0x4e742f(0x1b1,'qAHF'),'KCEHl':_0x4e742f(0x173,'x9pr'),'eZDGW':function(_0x110e92,_0x420ed7){return _0x110e92!==_0x420ed7;},'DxeDK':_0x4e742f(0x298,'oNRx'),'AGpvo':_0x4e742f(0x3c9,'F[gW'),'DblHD':function(_0x3e7bec,_0x1ff8d0,_0x5a9267,_0x87c11d){return _0x3e7bec(_0x1ff8d0,_0x5a9267,_0x87c11d);},'UmSMS':_0x4e742f(0x63b,'vIIW'),'CGLqe':_0x4e742f(0x599,'Ox(G'),'MFyyE':function(_0x3464cf,_0x2a0a4e,_0x578578,_0x25fe76){return _0x3464cf(_0x2a0a4e,_0x578578,_0x25fe76);},'tUYDg':function(_0x446c51,_0x17f142,_0x2208dc,_0x243703){return _0x446c51(_0x17f142,_0x2208dc,_0x243703);},'wiwnd':function(_0x9cb57a,_0x4ca180,_0x37bbb6,_0x17cae4){return _0x9cb57a(_0x4ca180,_0x37bbb6,_0x17cae4);},'myTGm':function(_0x2ad501,_0x448c2b){return _0x2ad501!=_0x448c2b;},'dUHRM':_0x4e742f(0x3f6,'vIIW'),'pjmuu':_0x4e742f(0x1b9,'Pjwb'),'mjzHI':_0x4e742f(0x5b0,'Ox(G'),'FdXQe':_0x4e742f(0x537,'MruR'),'pPeIO':function(_0x38134b,_0x3c834f){return _0x38134b==_0x3c834f;},'jnKKA':_0x4e742f(0x21c,'$IdN'),'jdoQP':function(_0x38c53a,_0x68257d){return _0x38c53a===_0x68257d;},'oKkwq':_0x4e742f(0x137,'q4F0'),'fucla':_0x4e742f(0x236,'VsQH'),'drimf':_0x4e742f(0x5f5,'Q300'),'hcKXm':function(_0x2d337c,_0x10cfbf){return _0x2d337c==_0x10cfbf;},'FrGnS':function(_0x2f291b,_0x39e025){return _0x2f291b(_0x39e025);},'tvyZk':_0x4e742f(0x48a,'7xMY'),'YtFXR':_0x4e742f(0x2ea,'oC5F'),'SxxQP':function(_0x5d4f57,_0x3cd8b4){return _0x5d4f57(_0x3cd8b4);},'DqiFS':function(_0x906c8e,_0x40d59f){return _0x906c8e===_0x40d59f;},'aVYSO':_0x4e742f(0x1fb,'Db^u'),'ZAdkv':_0x4e742f(0x443,')M[x'),'IDiLb':function(_0x58837f,_0x5251e7){return _0x58837f/_0x5251e7;},'PWtXI':function(_0x362e25,_0x2a0249){return _0x362e25+_0x2a0249;},'trxfK':function(_0x1e2f29,_0x130bd2){return _0x1e2f29-_0x130bd2;},'ujxfb':function(_0x3f5e28,_0xfdc9f3){return _0x3f5e28+_0xfdc9f3;},'Yyaca':function(_0x577cfb,_0x1d5050){return _0x577cfb+_0x1d5050;},'WdclV':function(_0x49f20d,_0xdefb5d){return _0x49f20d+_0xdefb5d;},'sCjFR':_0x4e742f(0x442,'n7BF'),'fDjqf':function(_0x414405,_0x151cf3){return _0x414405(_0x151cf3);},'vRqNh':_0x4e742f(0x41a,'4AWb'),'fsFDc':_0x4e742f(0x5e6,'pY1!'),'AHLrC':_0x4e742f(0x3ac,'0mD^'),'NSwIm':function(_0x94809c,_0x39ef9b){return _0x94809c+_0x39ef9b;},'srTGp':_0x4e742f(0x3a7,']Xq!'),'xxkub':_0x4e742f(0x39d,'[@5v'),'OWMwX':function(_0x1338f9,_0x3b61a2){return _0x1338f9===_0x3b61a2;},'BZLuX':_0x4e742f(0x182,'oNRx'),'vsXjb':_0x4e742f(0x601,'q4F0'),'GVNcB':function(_0x33a3cb,_0x1ec25a){return _0x33a3cb+_0x1ec25a;},'jveNT':_0x4e742f(0x1ab,'qAHF'),'ajAyw':_0x4e742f(0x158,'oSR]'),'agWRw':_0x4e742f(0x58d,'azvf'),'tsvhu':_0x4e742f(0x2e2,'F[gW'),'ooMDW':_0x4e742f(0x1f9,'eudC'),'IyIjq':function(_0x454015,_0x16553f){return _0x454015!==_0x16553f;},'OTDRH':_0x4e742f(0x51f,'Ljj7'),'Fjspc':function(_0x5c4e44,_0x3888f3,_0x597db1,_0x2c9a6a,_0x3f662b){return _0x5c4e44(_0x3888f3,_0x597db1,_0x2c9a6a,_0x3f662b);},'QbFAx':function(_0x3db3d9,_0x1fb325){return _0x3db3d9(_0x1fb325);},'IrDEU':_0x4e742f(0x270,'$IdN'),'hEcWW':function(_0xcf918d,_0x3ed77a){return _0xcf918d<_0x3ed77a;},'WMvlw':function(_0x2615f1,_0x2423a2){return _0x2615f1(_0x2423a2);},'NWZli':_0x4e742f(0x209,'oSR]'),'NIKAW':function(_0xb1124,_0xf06190){return _0xb1124(_0xf06190);},'zTDJN':function(_0x178e8c,_0x4351d8){return _0x178e8c>_0x4351d8;},'QJOPh':_0x4e742f(0x33c,']Xq!'),'CyIhV':function(_0x48ed78,_0x3f8e98){return _0x48ed78!==_0x3f8e98;},'dOdrG':_0x4e742f(0x2f4,'qAHF'),'jTvXO':_0x4e742f(0x351,'A6yu'),'lvEJI':function(_0x3da78e,_0x250a27){return _0x3da78e&&_0x250a27;},'bDAqk':function(_0x199f3d,_0x5f4388){return _0x199f3d+_0x5f4388;},'lAFze':function(_0x18f36f,_0x43a0f6){return _0x18f36f+_0x43a0f6;},'hLfDO':_0x4e742f(0x40a,'z**A'),'nzJan':_0x4e742f(0x4cb,'qAHF'),'CkGyB':_0x4e742f(0x2f9,'vIIW'),'vOIRm':_0x4e742f(0x633,'vIIW'),'mlSOn':function(_0x17375e,_0x2b6c0f){return _0x17375e==_0x2b6c0f;},'jiNup':function(_0x31c7fd,_0x42b111){return _0x31c7fd+_0x42b111;},'DqgHk':function(_0xa94d6c,_0x52494c){return _0xa94d6c*_0x52494c;},'ZyvoT':function(_0x3abc96,_0x2a33b9){return _0x3abc96*_0x2a33b9;},'yLAUV':_0x4e742f(0x2a0,'VsQH'),'aLWHc':_0x4e742f(0x5f3,'Ox(G'),'IrUxv':function(_0x30c7be,_0x252515){return _0x30c7be/_0x252515;},'lETGp':function(_0x1efceb,_0x52b754){return _0x1efceb(_0x52b754);},'EZElA':_0x4e742f(0x144,'0mD^')};return _0x2214b3[_0x4e742f(0x4f1,')M[x')](_0x2214b3[_0x4e742f(0x142,'Ljj7')],typeof process)&&_0x2214b3[_0x4e742f(0x43c,'oSR]')](JSON[_0x4e742f(0x1f3,'qAHF')](process[_0x4e742f(0x34b,'A6yu')])[_0x4e742f(0x2dd,'pY1!')](_0x2214b3[_0x4e742f(0x20d,'8umv')]),-0x1)&&process[_0x4e742f(0x1e7,'gkg]')](0x0),new class{constructor(_0x4f2753,_0x22b8d5){const _0x5e1ff=_0x4e742f,_0x1b1894=_0x2214b3[_0x5e1ff(0x348,'0mD^')][_0x5e1ff(0x36b,'VsQH')]('|');let _0xb97861=0x0;while(!![]){switch(_0x1b1894[_0xb97861++]){case'0':this[_0x5e1ff(0x53e,'7xMY')]=new Date()[_0x5e1ff(0x259,'VsQH')]();continue;case'1':this[_0x5e1ff(0x5d0,'^leF')]='';continue;case'2':console[_0x5e1ff(0x3ba,']Xq!')](this[_0x5e1ff(0x31c,'x9pr')]+_0x5e1ff(0x387,'Db^u'));continue;case'3':this[_0x5e1ff(0x191,'pY1!')]=_0x4f2753;continue;case'4':Object[_0x5e1ff(0x1ca,'8umv')](this,_0x22b8d5);continue;}break;}}[_0x4e742f(0x2c4,'oSR]')](){const _0x244696=_0x4e742f;return _0x2214b3[_0x244696(0x479,'[#yz')](_0x2214b3[_0x244696(0x4b7,'[@5v')],typeof module)&&!!module[_0x244696(0x61e,'8umv')];}[_0x4e742f(0x5c8,'NXvd')](){const _0x5192b4=_0x4e742f;return _0x2214b3[_0x5192b4(0x280,'od7T')](_0x2214b3[_0x5192b4(0x278,'Y&oW')],typeof $task);}[_0x4e742f(0x160,'0MRg')](){const _0x77c3b8=_0x4e742f;return _0x2214b3[_0x77c3b8(0x146,'F[gW')](_0x2214b3[_0x77c3b8(0x5e5,'A6yu')],typeof $httpClient)&&_0x2214b3[_0x77c3b8(0x395,'!g)^')](_0x2214b3[_0x77c3b8(0x5f2,'PE3T')],typeof $loon);}[_0x4e742f(0x34f,'4AWb')](){const _0x56f3aa=_0x4e742f;return _0x2214b3[_0x56f3aa(0x57e,'vIIW')](_0x2214b3[_0x56f3aa(0x382,'0MRg')],_0x2214b3[_0x56f3aa(0x2b3,'cJCH')])?_0x6a0819[_0x56f3aa(0x23b,'!g)^')](_0x520172):_0x2214b3[_0x56f3aa(0x597,'Pjwb')](_0x2214b3[_0x56f3aa(0x167,'nCuX')],typeof $loon);}[_0x4e742f(0x27a,'qAHF')](_0x242e80){const _0x3c5f8f=_0x4e742f,_0x5496d6={'kGHgW':function(_0x47ee5b,_0x1c3e83){const _0x2addbd=_0x2b50;return _0x2214b3[_0x2addbd(0x1c0,']Xq!')](_0x47ee5b,_0x1c3e83);},'oEPsb':function(_0x4b75b0,_0x340103){const _0x1f2d8d=_0x2b50;return _0x2214b3[_0x1f2d8d(0x56c,'xal4')](_0x4b75b0,_0x340103);}};if(_0x2214b3[_0x3c5f8f(0x29a,'Db^u')](_0x2214b3[_0x3c5f8f(0x196,'PE3T')],_0x2214b3[_0x3c5f8f(0x388,'Pjwb')])){let _0x177d93=this[_0x3c5f8f(0x186,'MruR')](_0x242e80);if(/^@/[_0x3c5f8f(0x35c,'8umv')](_0x242e80)){if(_0x2214b3[_0x3c5f8f(0x2df,'4AWb')](_0x2214b3[_0x3c5f8f(0x317,'0mD^')],_0x2214b3[_0x3c5f8f(0x44b,'n7BF')])){const [,_0x8990a1,_0x42ab18]=/^@(.*?)\.(.*?)$/[_0x3c5f8f(0x22a,'ag4H')](_0x242e80),_0x58ea00=_0x8990a1?this[_0x3c5f8f(0x28b,'4AWb')](_0x8990a1):'';if(_0x58ea00)try{const _0x562c9a=JSON[_0x3c5f8f(0x4c2,'0mD^')](_0x58ea00);_0x177d93=_0x562c9a?this[_0x3c5f8f(0x139,'j4ia')](_0x562c9a,_0x42ab18,''):_0x177d93;}catch(_0x1838aa){_0x177d93='';}}else _0x294e26=_0x5496d6[_0x3c5f8f(0x268,'nCuX')](_0x2a3c6b[_0x3c5f8f(0x17d,'nCuX')](_0x5496d6[_0x3c5f8f(0x3be,'vIIW')](_0x5a6414[_0x3c5f8f(0x174,'[@5v')](),0xc350)),0x493e0);}return _0x177d93;}else _0x18ac4a[_0x3c5f8f(0x38d,'oNRx')](_0x3c5f8f(0x3f7,'eudC')+this[_0x3c5f8f(0x556,'$IdN')]+']\x20'+(_0x488b84?.[_0x3c5f8f(0x261,'Q300')]||_0x11f049[_0x3c5f8f(0x324,'s9*]')](_0x30ccef)));}[_0x4e742f(0x28d,'A6yu')](_0x322d5b,_0x4544fd){const _0x51ea92=_0x4e742f,_0xda5c75={'xgsAc':function(_0x4ace53,_0xb89adc,_0x58df33,_0x27a359){const _0x312af3=_0x2b50;return _0x2214b3[_0x312af3(0x30d,'VsQH')](_0x4ace53,_0xb89adc,_0x58df33,_0x27a359);},'NOXGj':function(_0x2e9e1a,_0x4370b8){const _0xb2d046=_0x2b50;return _0x2214b3[_0xb2d046(0x177,'F[gW')](_0x2e9e1a,_0x4370b8);},'iMWai':_0x2214b3[_0x51ea92(0x311,'^leF')]};if(_0x2214b3[_0x51ea92(0x61d,'gkg]')](_0x2214b3[_0x51ea92(0x1d9,'8umv')],_0x2214b3[_0x51ea92(0x531,'Q300')])){let _0x3db3b4=!0x1;if(/^@/[_0x51ea92(0x340,'Ox(G')](_0x4544fd)){if(_0x2214b3[_0x51ea92(0x5cb,'q4F0')](_0x2214b3[_0x51ea92(0x38c,'Y&oW')],_0x2214b3[_0x51ea92(0x33f,'gkg]')])){const _0x503e03=_0x5d174f[_0x51ea92(0x570,'gkg]')](_0x4a7abe,arguments);return _0x5bc3f4=null,_0x503e03;}else{const [,_0x554a38,_0x5754e4]=/^@(.*?)\.(.*?)$/[_0x51ea92(0x3b5,'VsQH')](_0x4544fd),_0x20eb07=this[_0x51ea92(0x266,'Pjwb')](_0x554a38),_0x4009d7=_0x554a38?_0x2214b3[_0x51ea92(0x17c,'0mD^')](_0x2214b3[_0x51ea92(0x5e7,'e52A')],_0x20eb07)?null:_0x2214b3[_0x51ea92(0x454,'VsQH')](_0x20eb07,'{}'):'{}';try{if(_0x2214b3[_0x51ea92(0x4b9,'PE3T')](_0x2214b3[_0x51ea92(0x156,'gkg]')],_0x2214b3[_0x51ea92(0x18f,'od7T')])){const _0x16d492=JSON[_0x51ea92(0x231,'oC5F')](_0x4009d7);this[_0x51ea92(0x1c2,'qAHF')](_0x16d492,_0x5754e4,_0x322d5b),_0x3db3b4=this[_0x51ea92(0x2bb,'Ox(G')](JSON[_0x51ea92(0x187,'Ox(G')](_0x16d492),_0x554a38);}else return![];}catch(_0x165038){const _0x10a87c={};this[_0x51ea92(0x3c4,')rc5')](_0x10a87c,_0x5754e4,_0x322d5b),_0x3db3b4=this[_0x51ea92(0x4e3,'xal4')](JSON[_0x51ea92(0x18e,'8umv')](_0x10a87c),_0x554a38);}}}else _0x3db3b4=this[_0x51ea92(0x554,'Y&oW')](_0x322d5b,_0x4544fd);return _0x3db3b4;}else{const _0x3ef251={'poXvV':function(_0x588884,_0x1e0053,_0x1c10c5,_0x5d9ab6){const _0x38d9ef=_0x51ea92;return _0xda5c75[_0x38d9ef(0x3d7,'Ljj7')](_0x588884,_0x1e0053,_0x1c10c5,_0x5d9ab6);}};this[_0x51ea92(0x1a4,'A6yu')]=this[_0x51ea92(0x511,'NXvd')]?this[_0x51ea92(0x256,'M#Hj')]:_0xda5c75[_0x51ea92(0x1bd,'Db^u')](_0x18a78a,_0xda5c75[_0x51ea92(0x4b4,'j4ia')]);const {url:_0x13000c,..._0x5a5976}=_0x4b7125;this[_0x51ea92(0x192,'Db^u')]=this[_0x51ea92(0x1d2,'Pjwb')][_0x51ea92(0x523,'xal4')]({'followRedirect':![]}),this[_0x51ea92(0x1dc,'pY1!')][_0x1b2ed8](_0x13000c,_0x5a5976)[_0x51ea92(0x277,'A6yu')](_0x3035e0=>{const _0x442d6b=_0x51ea92,{statusCode:_0x2f1a57,request:_0x2162b2,headers:_0x235994,body:_0x101572}=_0x3035e0;_0xda5c75[_0x442d6b(0x5f9,'0MRg')](_0x26fb21,null,_0x2162b2,{'statusCode':_0x2f1a57,'headers':_0x235994,'body':_0x101572});},_0x160310=>{const _0xf74023=_0x51ea92,{message:_0x5de47a,request:_0x414c2c,response:_0x501723}=_0x160310;_0x3ef251[_0xf74023(0x341,'A6yu')](_0x2b9391,_0x5de47a,_0x414c2c,_0x501723);});}}[_0x4e742f(0x518,'n7BF')](_0x177166){const _0x1f501c=_0x4e742f;return this[_0x1f501c(0x626,')rc5')]()||this[_0x1f501c(0x32d,']Xq!')]()?$persistentStore[_0x1f501c(0x357,'z**A')](_0x177166):this[_0x1f501c(0x4ca,'Y&oW')]()?$prefs[_0x1f501c(0x616,'!g)^')](_0x177166):this[_0x1f501c(0x54d,'oC5F')]()?(this[_0x1f501c(0x3b6,'nCuX')]=this[_0x1f501c(0x55c,'4AWb')](),this[_0x1f501c(0x64e,'Ox(G')][_0x177166]):this[_0x1f501c(0x5e8,'oSR]')]&&this[_0x1f501c(0x4d7,'[@5v')][_0x177166]||null;}[_0x4e742f(0x582,'0mD^')](_0x5984e1,_0x2da644){const _0x3161fd=_0x4e742f;if(_0x2214b3[_0x3161fd(0x32e,'j4ia')](_0x2214b3[_0x3161fd(0x468,']Xq!')],_0x2214b3[_0x3161fd(0x43e,'xal4')]))return this[_0x3161fd(0x26c,'0mD^')]()||this[_0x3161fd(0x34f,'4AWb')]()?$persistentStore[_0x3161fd(0x51c,'e52A')](_0x5984e1,_0x2da644):this[_0x3161fd(0x37a,'gkg]')]()?$prefs[_0x3161fd(0x2b5,'0MRg')](_0x5984e1,_0x2da644):this[_0x3161fd(0x364,'Ox(G')]()?(this[_0x3161fd(0x403,'^leF')]=this[_0x3161fd(0x19f,'0MRg')](),this[_0x3161fd(0x330,'j4ia')][_0x2da644]=_0x5984e1,this[_0x3161fd(0x408,')rc5')](),!0x0):this[_0x3161fd(0x5c9,'MruR')]&&this[_0x3161fd(0x25f,'4AWb')][_0x2da644]||null;else _0x3ced21[_0x3161fd(0x22d,'azvf')](_0x2214b3[_0x3161fd(0x48c,'Pjwb')]);}[_0x4e742f(0x1a7,'Y&oW')](_0x2be287,_0x43340b,_0x58b678=()=>{}){const _0x3a5480=_0x4e742f,_0x26a529={'dobac':function(_0x5a6fc5,_0x27f7cb,_0x47194e,_0x21dc4a){const _0x275766=_0x2b50;return _0x2214b3[_0x275766(0x63c,'0MRg')](_0x5a6fc5,_0x27f7cb,_0x47194e,_0x21dc4a);},'hJSrY':function(_0x9845e4,_0x31c63e,_0x442601,_0x399703){const _0x20009d=_0x2b50;return _0x2214b3[_0x20009d(0x3a6,'od7T')](_0x9845e4,_0x31c63e,_0x442601,_0x399703);}};if(_0x2214b3[_0x3a5480(0x19b,'NXvd')](_0x2be287,_0x2214b3[_0x3a5480(0x1c3,'$IdN')])&&_0x2214b3[_0x3a5480(0x295,'1vMd')](_0x2be287,_0x2214b3[_0x3a5480(0x3cc,'xal4')])&&_0x2214b3[_0x3a5480(0x1d8,'F[gW')](_0x2be287,_0x2214b3[_0x3a5480(0x164,'qAHF')])&&_0x2214b3[_0x3a5480(0x469,'x9pr')](_0x2be287,_0x2214b3[_0x3a5480(0x3a4,'q4F0')])){console[_0x3a5480(0x2f7,'qAHF')](_0x3a5480(0x2be,'gkg]')+_0x2be287);return;}if(_0x2214b3[_0x3a5480(0x2a9,'oC5F')](_0x2be287,_0x2214b3[_0x3a5480(0x371,'pY1!')])&&_0x43340b[_0x3a5480(0x5eb,'F[gW')])delete _0x43340b[_0x3a5480(0x5d4,'4AWb')][_0x2214b3[_0x3a5480(0x574,'oC5F')]],delete _0x43340b[_0x3a5480(0x2fb,'nCuX')][_0x2214b3[_0x3a5480(0x5dd,'[@5v')]];else{if(_0x43340b[_0x3a5480(0x4de,'Db^u')]&&_0x43340b[_0x3a5480(0x2b8,'1vMd')]){if(!_0x43340b[_0x3a5480(0x505,'Ljj7')][_0x2214b3[_0x3a5480(0x4a5,'[#yz')]])_0x43340b[_0x3a5480(0x1e4,'VsQH')][_0x2214b3[_0x3a5480(0x4a5,'[#yz')]]=_0x2214b3[_0x3a5480(0x346,'qAHF')];}}if(this[_0x3a5480(0x212,'7hI#')]()||this[_0x3a5480(0x28f,'$IdN')]()){if(_0x2214b3[_0x3a5480(0x3d0,'od7T')](_0x2214b3[_0x3a5480(0x4f7,'xal4')],_0x2214b3[_0x3a5480(0x290,'7xMY')])){this[_0x3a5480(0x470,'Ox(G')]()&&this[_0x3a5480(0x3bc,'cJCH')]&&(_0x2214b3[_0x3a5480(0x41c,'j4ia')](_0x2214b3[_0x3a5480(0x2f1,'azvf')],_0x2214b3[_0x3a5480(0x4f6,'0mD^')])?_0x246c07[_0x3a5480(0x203,'cM^%')](_0x2e6c58)?.[_0x3a5480(0x576,'z**A')]&&(_0x2c2054=_0x34cf0a[_0x3a5480(0x538,'Db^u')](_0x1ec385)?.[_0x3a5480(0x1b8,'q4F0')]):(_0x43340b[_0x3a5480(0x3ff,'!g)^')]=_0x43340b[_0x3a5480(0x555,'oNRx')]||{},Object[_0x3a5480(0x4f0,')M[x')](_0x43340b[_0x3a5480(0x2dc,'xal4')],{'X-Surge-Skip-Scripting':!0x1})));let _0x4f4b1a={'method':_0x2be287,'url':_0x43340b[_0x3a5480(0x60f,'oC5F')],'headers':_0x43340b[_0x3a5480(0x630,'M#Hj')],'timeout':_0x43340b[_0x3a5480(0x559,'eudC')],'data':_0x43340b[_0x3a5480(0x2fe,'ag4H')]};if(_0x2214b3[_0x3a5480(0x1a2,'gkg]')](_0x2be287,_0x2214b3[_0x3a5480(0x193,'4AWb')]))delete _0x4f4b1a[_0x3a5480(0x567,'Q300')];_0x2214b3[_0x3a5480(0x363,'ag4H')]($axios,_0x4f4b1a)[_0x3a5480(0x57f,'Y&oW')](_0x3c7705=>{const _0x22b65b=_0x3a5480,{status:_0x395f2f,request:_0x26aa36,headers:_0x5f024b,data:_0x3da0bc}=_0x3c7705;_0x2214b3[_0x22b65b(0x496,'1vMd')](_0x58b678,null,_0x26aa36,{'statusCode':_0x395f2f,'headers':_0x5f024b,'body':_0x3da0bc});})[_0x3a5480(0x19a,'[#yz')](_0x5a2c5c=>console[_0x3a5480(0x3a1,'Q300')](_0x5a2c5c));}else{if(!_0xb23c7c[_0x3a5480(0x2fb,'nCuX')][_0x2214b3[_0x3a5480(0x1b7,'q4F0')]])_0x122cb7[_0x3a5480(0x151,'ag4H')][_0x2214b3[_0x3a5480(0x15a,'[@5v')]]=_0x2214b3[_0x3a5480(0x57d,')M[x')];}}else{if(this[_0x3a5480(0x52b,'cJCH')]())_0x43340b[_0x3a5480(0x319,'vIIW')]=_0x2be287[_0x3a5480(0x269,'s9*]')](),this[_0x3a5480(0x184,'e52A')]&&(_0x43340b[_0x3a5480(0x4ab,'A6yu')]=_0x43340b[_0x3a5480(0x446,'0MRg')]||{},Object[_0x3a5480(0x38a,'PE3T')](_0x43340b[_0x3a5480(0x446,'0MRg')],{'hints':!0x1})),$task[_0x3a5480(0x57c,'cJCH')](_0x43340b)[_0x3a5480(0x337,'NXvd')](_0x4c54df=>{const _0x408cd0=_0x3a5480,{statusCode:_0x55215e,request:_0x5c1b48,headers:_0x354a55,body:_0x22f7a5}=_0x4c54df;_0x2214b3[_0x408cd0(0x526,'[#yz')](_0x58b678,null,_0x5c1b48,{'statusCode':_0x55215e,'headers':_0x354a55,'body':_0x22f7a5});},_0x3b9bbf=>_0x58b678(_0x3b9bbf));else{if(this[_0x3a5480(0x335,'F[gW')]()){if(_0x2214b3[_0x3a5480(0x28c,'0MRg')](_0x2214b3[_0x3a5480(0x309,'MruR')],_0x2214b3[_0x3a5480(0x5bd,'od7T')])){this[_0x3a5480(0x4f2,'Y&oW')]=this[_0x3a5480(0x1c9,'n7BF')]?this[_0x3a5480(0x43b,'PE3T')]:_0x2214b3[_0x3a5480(0x2ee,'VsQH')](require,_0x2214b3[_0x3a5480(0x2ff,'4AWb')]);const {url:_0x48602e,..._0x386918}=_0x43340b;this[_0x3a5480(0x237,'s9*]')]=this[_0x3a5480(0x649,'xal4')][_0x3a5480(0x1a9,'oNRx')]({'followRedirect':![]}),this[_0x3a5480(0x566,'$IdN')][_0x2be287](_0x48602e,_0x386918)[_0x3a5480(0x577,'e52A')](_0x2b7f89=>{const _0x1f7be9=_0x3a5480,{statusCode:_0x36f9e3,request:_0x5d8380,headers:_0x2c43d6,body:_0x5d88d9}=_0x2b7f89;_0x26a529[_0x1f7be9(0x550,'qAHF')](_0x58b678,null,_0x5d8380,{'statusCode':_0x36f9e3,'headers':_0x2c43d6,'body':_0x5d88d9});},_0x44a5d3=>{const _0x439ed6=_0x3a5480,{message:_0x56682b,request:_0x3d7797,response:_0x1a8ef3}=_0x44a5d3;_0x26a529[_0x439ed6(0x3a0,'gkg]')](_0x58b678,_0x56682b,_0x3d7797,_0x1a8ef3);});}else _0x3d526c[_0x3a5480(0x543,'M#Hj')](_0x3e65ac)?.[_0x3a5480(0x33d,'oSR]')]&&(_0x4d330d=_0x5f3c22[_0x3a5480(0x240,'Y&oW')](_0x55fd66)?.[_0x3a5480(0x180,'M#Hj')]);}}}}[_0x4e742f(0x376,'Ox(G')](_0x4a1092,_0x53b0e9=null){const _0x1f81c1=_0x4e742f;if(_0x2214b3[_0x1f81c1(0x359,'Pjwb')](_0x2214b3[_0x1f81c1(0x5c2,'nCuX')],_0x2214b3[_0x1f81c1(0x199,'[#yz')]))return _0x2214b3[_0x1f81c1(0x63a,'Ljj7')](_0x2214b3[_0x1f81c1(0x4b7,'[@5v')],typeof _0x301e3c)&&!!_0x29c068[_0x1f81c1(0x2a3,'VsQH')];else{let _0x3583e3=_0x53b0e9?new Date(_0x53b0e9):new Date(),_0xd579d7={'M+':_0x2214b3[_0x1f81c1(0x5b1,'nCuX')](_0x3583e3[_0x1f81c1(0x1e2,'pY1!')](),0x1),'d+':_0x3583e3[_0x1f81c1(0x5f0,'Q300')](),'h+':_0x3583e3[_0x1f81c1(0x3aa,'A6yu')](),'m+':_0x3583e3[_0x1f81c1(0x1d7,'n7BF')](),'s+':_0x3583e3[_0x1f81c1(0x16c,'oNRx')](),'q+':Math[_0x1f81c1(0x2bf,'F[gW')](_0x2214b3[_0x1f81c1(0x417,'!g)^')](_0x2214b3[_0x1f81c1(0x3ec,'Q300')](_0x3583e3[_0x1f81c1(0x4c5,'MruR')](),0x3),0x3)),'S':_0x3583e3[_0x1f81c1(0x304,'0MRg')]()};/(y+)/[_0x1f81c1(0x3f4,']Xq!')](_0x4a1092)&&(_0x4a1092=_0x4a1092[_0x1f81c1(0x24d,'vIIW')](RegExp['$1'],_0x2214b3[_0x1f81c1(0x4f3,'xal4')](_0x3583e3[_0x1f81c1(0x508,'[#yz')](),'')[_0x1f81c1(0x604,'[#yz')](_0x2214b3[_0x1f81c1(0x4fb,'vIIW')](0x4,RegExp['$1'][_0x1f81c1(0x5a4,'od7T')]))));for(let _0x3f75fe in _0xd579d7)new RegExp(_0x2214b3[_0x1f81c1(0x52f,'7hI#')](_0x2214b3[_0x1f81c1(0x621,'7xMY')]('(',_0x3f75fe),')'))[_0x1f81c1(0x26d,'xal4')](_0x4a1092)&&(_0x4a1092=_0x4a1092[_0x1f81c1(0x29b,'Q300')](RegExp['$1'],_0x2214b3[_0x1f81c1(0x150,'Db^u')](0x1,RegExp['$1'][_0x1f81c1(0x430,'xal4')])?_0xd579d7[_0x3f75fe]:_0x2214b3[_0x1f81c1(0x47b,'[#yz')]('00',_0xd579d7[_0x3f75fe])[_0x1f81c1(0x1be,'MruR')](_0x2214b3[_0x1f81c1(0x4a8,'4AWb')]('',_0xd579d7[_0x3f75fe])[_0x1f81c1(0x5d9,'VsQH')])));return _0x4a1092;}}async[_0x4e742f(0x204,')rc5')](){const _0x397805=_0x4e742f;if(!this[_0x397805(0x402,'cM^%')])return;let _0x2d1c50=_0x2214b3[_0x397805(0x389,'oSR]')](_0x2214b3[_0x397805(0x560,'od7T')](this[_0x397805(0x25b,'xal4')],_0x2214b3[_0x397805(0x436,'1vMd')]),this[_0x397805(0x2f6,')rc5')]);if(_0x2e1682[_0x397805(0x200,'Q300')]()){var _0x1abaa0=_0x2214b3[_0x397805(0x48b,'7hI#')](require,_0x2214b3[_0x397805(0x37b,'F[gW')]);console[_0x397805(0x1d3,'VsQH')](_0x2214b3[_0x397805(0x2c2,'od7T')]),await _0x1abaa0[_0x397805(0x42c,'qAHF')](this[_0x397805(0x197,'oC5F')],_0x2d1c50);}else this[_0x397805(0x41d,'M#Hj')](_0x2d1c50);}[_0x4e742f(0x416,'qAHF')](_0x153b5a){const _0x3fc4de=_0x4e742f;console[_0x3fc4de(0x33e,'PE3T')](_0x153b5a),this[_0x3fc4de(0x392,'Ox(G')]+=_0x153b5a,this[_0x3fc4de(0x435,'qAHF')]+='\x0a';}[_0x4e742f(0x4ef,'0mD^')](_0x49c204){const _0x3a4e8f=_0x4e742f;if(_0x2214b3[_0x3a4e8f(0x380,'cM^%')](_0x2214b3[_0x3a4e8f(0x592,'NXvd')],_0x2214b3[_0x3a4e8f(0x2de,'0mD^')]))return _0x5a1325[_0x3a4e8f(0x3fc,'Ox(G')](_0x188ec0),{};else{let _0x47dc7d=_0x2214b3[_0x3a4e8f(0x22e,'eudC')](_0x2214b3[_0x3a4e8f(0x503,'gkg]')](_0x2214b3[_0x3a4e8f(0x41f,'7hI#')]('[',this[_0x3a4e8f(0x4b1,'A6yu')](_0x2214b3[_0x3a4e8f(0x2e8,'z**A')])),']'),_0x49c204);console[_0x3a4e8f(0x248,'nCuX')](_0x47dc7d),this[_0x3a4e8f(0x275,'7xMY')]+=_0x47dc7d,this[_0x3a4e8f(0x58f,')M[x')]+='\x0a';}}[_0x4e742f(0x145,'[#yz')](_0x17582e){const _0x6ed23a=_0x4e742f,_0x16a170={'sVRlb':_0x2214b3[_0x6ed23a(0x5ef,'qAHF')]};_0x2214b3[_0x6ed23a(0x252,'od7T')](_0x2214b3[_0x6ed23a(0x642,'ag4H')],_0x2214b3[_0x6ed23a(0x1dd,'xal4')])?_0x4e5ee4[_0x6ed23a(0x226,')rc5')](_0x16a170[_0x6ed23a(0x5dc,'x9pr')],_0x244e0c):console[_0x6ed23a(0x5c4,'pY1!')](_0x2214b3[_0x6ed23a(0x293,'Db^u')](_0x2214b3[_0x6ed23a(0x4f8,')M[x')](_0x2214b3[_0x6ed23a(0x3af,'7xMY')]('[',this[_0x6ed23a(0x502,')M[x')](_0x2214b3[_0x6ed23a(0x5b7,'7xMY')])),']'),_0x17582e));}[_0x4e742f(0x366,'od7T')](_0x8f3d3=t,_0x353710='',_0x461e6d='',_0x31e79b){const _0x42d968=_0x4e742f,_0x1c1240={'ViKxV':function(_0x14eeb6,_0x197337){const _0x595428=_0x2b50;return _0x2214b3[_0x595428(0x2d9,'Ox(G')](_0x14eeb6,_0x197337);},'OEKIZ':_0x2214b3[_0x42d968(0x1da,'e52A')],'wckNi':function(_0x3349cd,_0x54b129){const _0x117dae=_0x42d968;return _0x2214b3[_0x117dae(0x4a2,'oNRx')](_0x3349cd,_0x54b129);},'KNuis':_0x2214b3[_0x42d968(0x331,'Ljj7')],'TSLYE':function(_0x21afdb,_0xa6d148){const _0x25b01c=_0x42d968;return _0x2214b3[_0x25b01c(0x590,'azvf')](_0x21afdb,_0xa6d148);},'jFurw':_0x2214b3[_0x42d968(0x535,'n7BF')],'ddbxT':_0x2214b3[_0x42d968(0x4db,'M#Hj')],'SqPaX':_0x2214b3[_0x42d968(0x253,'VsQH')]};if(_0x2214b3[_0x42d968(0x322,'n7BF')](_0x2214b3[_0x42d968(0x46c,'x9pr')],_0x2214b3[_0x42d968(0x397,'Pjwb')])){const [,_0x30102e,_0x414c20]=/^@(.*?)\.(.*?)$/[_0x42d968(0x53b,'oSR]')](_0x61c77c),_0x1ed0fa=_0x30102e?this[_0x42d968(0x238,'M#Hj')](_0x30102e):'';if(_0x1ed0fa)try{const _0x361137=_0x1a012a[_0x42d968(0x4d6,'cJCH')](_0x1ed0fa);_0x5ac473=_0x361137?this[_0x42d968(0x5a2,')M[x')](_0x361137,_0x414c20,''):_0x2958da;}catch(_0x2be58d){_0x4b07e6='';}}else{const _0x1a22e2=_0x1466bd=>{const _0x53d484=_0x42d968;if(!_0x1466bd)return _0x1466bd;if(_0x1c1240[_0x53d484(0x5ab,'0mD^')](_0x1c1240[_0x53d484(0x159,'!g)^')],typeof _0x1466bd))return this[_0x53d484(0x1a3,'nCuX')]()?_0x1466bd:this[_0x53d484(0x379,'j4ia')]()?{'open-url':_0x1466bd}:this[_0x53d484(0x607,']Xq!')]()?{'url':_0x1466bd}:void 0x0;if(_0x1c1240[_0x53d484(0x600,'eudC')](_0x1c1240[_0x53d484(0x5ce,'Db^u')],typeof _0x1466bd)){if(this[_0x53d484(0x3b3,'eudC')]()){if(_0x1c1240[_0x53d484(0x585,'^leF')](_0x1c1240[_0x53d484(0x62a,'Y&oW')],_0x1c1240[_0x53d484(0x255,'s9*]')])){let _0x3352a3=_0x1466bd[_0x53d484(0x610,'0mD^')]||_0x1466bd[_0x53d484(0x21d,'[@5v')]||_0x1466bd[_0x1c1240[_0x53d484(0x30e,'od7T')]],_0x12a69d=_0x1466bd[_0x53d484(0x61b,'Db^u')]||_0x1466bd[_0x1c1240[_0x53d484(0x20f,']Xq!')]];return{'openUrl':_0x3352a3,'mediaUrl':_0x12a69d};}else _0x5d926b='';}if(this[_0x53d484(0x584,'7hI#')]()){let _0x4efd55=_0x1466bd[_0x1c1240[_0x53d484(0x300,'Pjwb')]]||_0x1466bd[_0x53d484(0x134,'j4ia')]||_0x1466bd[_0x53d484(0x3e7,'0MRg')],_0x3668de=_0x1466bd[_0x1c1240[_0x53d484(0x3b9,'Q300')]]||_0x1466bd[_0x53d484(0x60a,'s9*]')];return{'open-url':_0x4efd55,'media-url':_0x3668de};}if(this[_0x53d484(0x5c6,'$IdN')]()){let _0x11a96b=_0x1466bd[_0x53d484(0x49f,'7xMY')]||_0x1466bd[_0x53d484(0x35e,'cJCH')]||_0x1466bd[_0x1c1240[_0x53d484(0x233,'7hI#')]];return{'url':_0x11a96b};}}};this[_0x42d968(0x431,'azvf')]||(this[_0x42d968(0x155,'MruR')]()||this[_0x42d968(0x1ef,'j4ia')]()?$notification[_0x42d968(0x1ee,'nCuX')](_0x8f3d3,_0x353710,_0x461e6d,_0x2214b3[_0x42d968(0x234,'nCuX')](_0x1a22e2,_0x31e79b)):this[_0x42d968(0x4bb,'1vMd')]()&&_0x2214b3[_0x42d968(0x4d3,'z**A')]($notify,_0x8f3d3,_0x353710,_0x461e6d,_0x2214b3[_0x42d968(0x492,'^leF')](_0x1a22e2,_0x31e79b)));let _0x3da27d=['',_0x2214b3[_0x42d968(0x3f5,'^leF')]];_0x3da27d[_0x42d968(0x310,'od7T')](_0x8f3d3),_0x353710&&_0x3da27d[_0x42d968(0x603,'PE3T')](_0x353710),_0x461e6d&&_0x3da27d[_0x42d968(0x638,'x9pr')](_0x461e6d),console[_0x42d968(0x490,'q4F0')](_0x3da27d[_0x42d968(0x3ee,'MruR')]('\x0a'));}}[_0x4e742f(0x2ce,'e52A')](_0x255212,_0x40d537){const _0x1d580a=_0x4e742f;return _0x2214b3[_0x1d580a(0x515,'7xMY')](_0x255212,_0x40d537)?_0x255212:_0x40d537;}[_0x4e742f(0x4c4,'gkg]')](_0x111328,_0x58f2d3){const _0x1f714d=_0x4e742f;return _0x2214b3[_0x1f714d(0x2a8,'j4ia')](_0x111328,_0x58f2d3)?_0x58f2d3:_0x111328;}[_0x4e742f(0x2ca,'oSR]')](_0x492ab0,_0xb2f884,_0x2c6ec6='0'){const _0x553f12=_0x4e742f,_0x1fe974={'xinAw':function(_0x4210d9,_0x4d3f3d,_0x4d26f5,_0x32a19a){const _0x14cfbb=_0x2b50;return _0x2214b3[_0x14cfbb(0x172,'7hI#')](_0x4210d9,_0x4d3f3d,_0x4d26f5,_0x32a19a);},'hkfpe':function(_0x135e89,_0x38b33d){const _0x7480c1=_0x2b50;return _0x2214b3[_0x7480c1(0x5ea,'gkg]')](_0x135e89,_0x38b33d);},'xjrYz':_0x2214b3[_0x553f12(0x5da,'e52A')],'uAuqI':function(_0x5ec77f,_0x1d4ee0){const _0x8301dd=_0x553f12;return _0x2214b3[_0x8301dd(0x175,'Ox(G')](_0x5ec77f,_0x1d4ee0);}};if(_0x2214b3[_0x553f12(0x4b5,'eudC')](_0x2214b3[_0x553f12(0x16d,'s9*]')],_0x2214b3[_0x553f12(0x21a,'PE3T')])){let _0x2d0b6c=_0x2214b3[_0x553f12(0x215,'Y&oW')](String,_0x492ab0),_0x2b885c=_0x2214b3[_0x553f12(0x467,'x9pr')](_0xb2f884,_0x2d0b6c[_0x553f12(0x4d9,'A6yu')])?_0x2214b3[_0x553f12(0x545,'Db^u')](_0xb2f884,_0x2d0b6c[_0x553f12(0x4b0,'MruR')]):0x0,_0x55da82='';for(let _0x2654fb=0x0;_0x2214b3[_0x553f12(0x2d0,'[#yz')](_0x2654fb,_0x2b885c);_0x2654fb++){if(_0x2214b3[_0x553f12(0x3c5,'[@5v')](_0x2214b3[_0x553f12(0x528,'1vMd')],_0x2214b3[_0x553f12(0x294,'z**A')]))_0x55da82+=_0x2c6ec6;else{let _0x3412f7=this[_0x553f12(0x399,'0MRg')](_0x34fe2c);if(/^@/[_0x553f12(0x32f,'0MRg')](_0x93dc3e)){const [,_0x5c7d77,_0x6ee3e9]=/^@(.*?)\.(.*?)$/[_0x553f12(0x32a,'M#Hj')](_0x509d34),_0x2ddc66=_0x5c7d77?this[_0x553f12(0x44e,'s9*]')](_0x5c7d77):'';if(_0x2ddc66)try{const _0x53c7a9=_0xef08b8[_0x553f12(0x2cc,'NXvd')](_0x2ddc66);_0x3412f7=_0x53c7a9?this[_0x553f12(0x332,'MruR')](_0x53c7a9,_0x6ee3e9,''):_0x3412f7;}catch(_0xf6652){_0x3412f7='';}}return _0x3412f7;}}return _0x55da82+=_0x2d0b6c,_0x55da82;}else{const _0x27897d={'sNLZZ':function(_0x208c3f,_0xe259ef,_0xd283f3,_0xf9bf3c){const _0xd923c9=_0x553f12;return _0x1fe974[_0xd923c9(0x3e9,'eudC')](_0x208c3f,_0xe259ef,_0xd283f3,_0xf9bf3c);}};this[_0x553f12(0x460,'cM^%')]()&&this[_0x553f12(0x35f,'4AWb')]&&(_0x497d82[_0x553f12(0x151,'ag4H')]=_0x1c234b[_0x553f12(0x35b,'Q300')]||{},_0x2540b3[_0x553f12(0x56e,'z**A')](_0x4dc4ec[_0x553f12(0x622,'PE3T')],{'X-Surge-Skip-Scripting':!0x1}));let _0x40a896={'method':_0x9cb841,'url':_0x4486a8[_0x553f12(0x478,'od7T')],'headers':_0x542eeb[_0x553f12(0x302,'0MRg')],'timeout':_0x1ed769[_0x553f12(0x210,'Db^u')],'data':_0x2071f0[_0x553f12(0x568,'oC5F')]};if(_0x1fe974[_0x553f12(0x4eb,'vIIW')](_0x188f8c,_0x1fe974[_0x553f12(0x5a0,'7hI#')]))delete _0x40a896[_0x553f12(0x5a5,'oNRx')];_0x1fe974[_0x553f12(0x5ac,'VsQH')](_0x345cdf,_0x40a896)[_0x553f12(0x5a1,']Xq!')](_0x2727ed=>{const _0xb07e2=_0x553f12,{status:_0x2c5b92,request:_0x268ef5,headers:_0x2ff209,data:_0x2968a7}=_0x2727ed;_0x27897d[_0xb07e2(0x548,'[@5v')](_0x22d316,null,_0x268ef5,{'statusCode':_0x2c5b92,'headers':_0x2ff209,'body':_0x2968a7});})[_0x553f12(0x372,'4AWb')](_0x18bfc8=>_0x226271[_0x553f12(0x615,'7xMY')](_0x18bfc8));}}[_0x4e742f(0x161,'vIIW')](_0x11a0bc,_0xbe931c,_0x34d318=![]){const _0x13638c=_0x4e742f;if(_0x2214b3[_0x13638c(0x3db,')rc5')](_0x2214b3[_0x13638c(0x367,'n7BF')],_0x2214b3[_0x13638c(0x4ee,'A6yu')])){let _0x25d508=[];for(let _0x129f50 of Object[_0x13638c(0x384,'z**A')](_0x11a0bc)[_0x13638c(0x3d9,'7xMY')]()){let _0x366ebb=_0x11a0bc[_0x129f50];if(_0x2214b3[_0x13638c(0x2e0,'pY1!')](_0x366ebb,_0x34d318))_0x366ebb=_0x2214b3[_0x13638c(0x52e,'4AWb')](encodeURIComponent,_0x366ebb);_0x25d508[_0x13638c(0x4b6,'MruR')](_0x2214b3[_0x13638c(0x433,'q4F0')](_0x2214b3[_0x13638c(0x148,'MruR')](_0x129f50,'='),_0x366ebb));}return _0x25d508[_0x13638c(0x3ea,'PE3T')](_0xbe931c);}else{const _0x42f61a=_0x4d9632[_0x13638c(0x452,'n7BF')](_0x38f8c1);this[_0x13638c(0x229,'Pjwb')](_0x42f61a,_0x210c94,_0x27fbf4),_0x49330e=this[_0x13638c(0x619,'Db^u')](_0x160921[_0x13638c(0x3da,'MruR')](_0x42f61a),_0x274d07);}}[_0x4e742f(0x4fe,'cJCH')](_0x532423,_0x3d7445=![]){const _0x27ad96=_0x4e742f,_0x10f5ab={'YkfOk':_0x2214b3[_0x27ad96(0x29c,'^leF')]};if(_0x2214b3[_0x27ad96(0x2ae,'cJCH')](_0x2214b3[_0x27ad96(0x484,'vIIW')],_0x2214b3[_0x27ad96(0x564,'z**A')])){const _0x1ae467=_0x10f5ab[_0x27ad96(0x1a5,'nCuX')][_0x27ad96(0x2fc,')rc5')]('|');let _0x56cc8=0x0;while(!![]){switch(_0x1ae467[_0x56cc8++]){case'0':_0x7839d3[_0x27ad96(0x23f,')rc5')](this[_0x27ad96(0x62b,'PE3T')]+_0x27ad96(0x207,'NXvd'));continue;case'1':_0x1a9c40[_0x27ad96(0x2b9,'oC5F')](this,_0x2823da);continue;case'2':this[_0x27ad96(0x385,'azvf')]=_0x43ae48;continue;case'3':this[_0x27ad96(0x5d0,'^leF')]='';continue;case'4':this[_0x27ad96(0x303,'7hI#')]=new _0x146512()[_0x27ad96(0x178,'A6yu')]();continue;}break;}}else{let _0x3372e9={};for(let _0x23ed39 of _0x532423[_0x27ad96(0x60c,')M[x')]('&')){if(_0x2214b3[_0x27ad96(0x136,'pY1!')](_0x2214b3[_0x27ad96(0x50a,'ag4H')],_0x2214b3[_0x27ad96(0x473,'A6yu')]))_0xeeb82b[_0x27ad96(0x1ed,'x9pr')](_0xf050d8);else{if(!_0x23ed39)continue;let _0x5c2d31=_0x23ed39[_0x27ad96(0x445,'z**A')]('=');if(_0x2214b3[_0x27ad96(0x1c6,'M#Hj')](_0x5c2d31,-0x1))continue;let _0x44baf2=_0x23ed39[_0x27ad96(0x4b2,'oSR]')](0x0,_0x5c2d31),_0x3dabb5=_0x23ed39[_0x27ad96(0x5bf,'A6yu')](_0x2214b3[_0x27ad96(0x482,'MruR')](_0x5c2d31,0x1));if(_0x3d7445)_0x3dabb5=_0x2214b3[_0x27ad96(0x4da,'$IdN')](decodeURIComponent,_0x3dabb5);_0x3372e9[_0x44baf2]=_0x3dabb5;}}return _0x3372e9;}}[_0x4e742f(0x423,')M[x')](_0x74ac59,_0x5d3b8c=_0x4e742f(0x325,'cJCH')){const _0x1b8cce=_0x4e742f;let _0x4c4335='';for(let _0x16c856=0x0;_0x2214b3[_0x1b8cce(0x412,'azvf')](_0x16c856,_0x74ac59);_0x16c856++){_0x4c4335+=_0x5d3b8c[_0x1b8cce(0x3fd,'x9pr')](Math[_0x1b8cce(0x289,'xal4')](_0x2214b3[_0x1b8cce(0x28e,'!g)^')](Math[_0x1b8cce(0x1df,'NXvd')](),_0x5d3b8c[_0x1b8cce(0x536,'F[gW')])));}return _0x4c4335;}[_0x4e742f(0x59b,'x9pr')](_0x486928){const _0x5379a7=_0x4e742f;let _0x44c675=Math[_0x5379a7(0x3e6,'7hI#')](_0x2214b3[_0x5379a7(0x5d5,'ag4H')](Math[_0x5379a7(0x31e,'vIIW')](),_0x486928[_0x5379a7(0x3eb,'cJCH')]));return _0x486928[_0x44c675];}[_0x4e742f(0x179,'[#yz')](_0x41be97){return new Promise(_0x10d566=>setTimeout(_0x10d566,_0x41be97));}[_0x4e742f(0x587,'eudC')](_0xf58edd={}){const _0x5f2602=_0x4e742f;if(_0x2214b3[_0x5f2602(0x220,'8umv')](_0x2214b3[_0x5f2602(0x30a,'oSR]')],_0x2214b3[_0x5f2602(0x61a,'0MRg')])){if(_0x3b622d)_0x475fc8[_0x5f2602(0x1ce,'Pjwb')](new _0x16ea10(_0x3c34e5));}else{const _0x48bb48=new Date()[_0x5f2602(0x1ae,'vIIW')](),_0xdb92ee=_0x2214b3[_0x5f2602(0x4ec,'Ox(G')](_0x2214b3[_0x5f2602(0x5ec,'4AWb')](_0x48bb48,this[_0x5f2602(0x34d,'oC5F')]),0x3e8);console[_0x5f2602(0x1e5,'oC5F')]('\x0a'+this[_0x5f2602(0x2bc,'q4F0')]+_0x5f2602(0x495,'0MRg')+_0xdb92ee+_0x5f2602(0x404,'gkg]'));if(this[_0x5f2602(0x60d,'oC5F')]()||this[_0x5f2602(0x3df,'nCuX')]()||this[_0x5f2602(0x5a8,'Y&oW')]())_0x2214b3[_0x5f2602(0x333,'gkg]')]($done,_0xf58edd);}}}(_0x4160ab,_0x26385f);}var version_ = 'jsjiami.com.v7'; diff --git a/wxapp/托迈酷客.js b/wxapp/托迈酷客.js new file mode 100644 index 0000000..1f8a810 --- /dev/null +++ b/wxapp/托迈酷客.js @@ -0,0 +1,9 @@ +/** + * 微信小程序 + * 托迈酷客 + * 完成签到,浏览 + * 变量名:tmkk + * 变量值:Authorization + * cron 10 8 * * * + */ +var version_='jsjiami.com.v7';const _0x1f1e99=_0x1971;(function(_0x49c20a,_0x5df291,_0x183514,_0x31a156,_0x49af2a,_0x494dd7,_0x2ebaab){return _0x49c20a=_0x49c20a>>0x7,_0x494dd7='hs',_0x2ebaab='hs',function(_0x307aef,_0x1da77,_0x307cc3,_0x8e6397,_0xe8169b){const _0x2cc2e7=_0x1971;_0x8e6397='tfi',_0x494dd7=_0x8e6397+_0x494dd7,_0xe8169b='up',_0x2ebaab+=_0xe8169b,_0x494dd7=_0x307cc3(_0x494dd7),_0x2ebaab=_0x307cc3(_0x2ebaab),_0x307cc3=0x0;const _0x4a3d5a=_0x307aef();while(!![]&&--_0x31a156+_0x1da77){try{_0x8e6397=parseInt(_0x2cc2e7(0x257,'XdGc'))/0x1+parseInt(_0x2cc2e7(0x292,'mA6L'))/0x2+-parseInt(_0x2cc2e7(0x2b5,'o9q3'))/0x3*(-parseInt(_0x2cc2e7(0x320,'cKwh'))/0x4)+parseInt(_0x2cc2e7(0x258,'j5d%'))/0x5+parseInt(_0x2cc2e7(0x1a4,'o&U)'))/0x6+parseInt(_0x2cc2e7(0x3dd,'ypmY'))/0x7+-parseInt(_0x2cc2e7(0x288,'cKwh'))/0x8;}catch(_0x2e0dbb){_0x8e6397=_0x307cc3;}finally{_0xe8169b=_0x4a3d5a[_0x494dd7]();if(_0x49c20a<=_0x31a156)_0x307cc3?_0x49af2a?_0x8e6397=_0xe8169b:_0x49af2a=_0xe8169b:_0x307cc3=_0xe8169b;else{if(_0x307cc3==_0x49af2a['replace'](/[WElLywRqfHrTCSNdYgDxG=]/g,'')){if(_0x8e6397===_0x1da77){_0x4a3d5a['un'+_0x494dd7](_0xe8169b);break;}_0x4a3d5a[_0x2ebaab](_0xe8169b);}}}}}(_0x183514,_0x5df291,function(_0x28745f,_0x59f64f,_0x35de71,_0xc0ad6b,_0x5cf67a,_0x2e84bc,_0x4d4f75){return _0x59f64f='\x73\x70\x6c\x69\x74',_0x28745f=arguments[0x0],_0x28745f=_0x28745f[_0x59f64f](''),_0x35de71=`\x72\x65\x76\x65\x72\x73\x65`,_0x28745f=_0x28745f[_0x35de71]('\x76'),_0xc0ad6b=`\x6a\x6f\x69\x6e`,(0x146823,_0x28745f[_0xc0ad6b](''));});}(0x6080,0x86c0f,_0x579a,0xc3),_0x579a)&&(version_=_0x1f1e99(0x3c9,'fPA*'));(function(){const _0x58f992=_0x1f1e99,_0x4339e1={'Dcxkk':function(_0x269b1d,_0x4e92e1){return _0x269b1d(_0x4e92e1);},'DEEWJ':function(_0x207de1,_0x1f0ffc){return _0x207de1+_0x1f0ffc;},'VDYzH':_0x58f992(0x3c0,'z8x8'),'TdLIy':function(_0x2f1923){return _0x2f1923();}};let _0x3d0b58;try{const _0x1f78ef=_0x4339e1[_0x58f992(0x259,'bjoy')](Function,_0x4339e1[_0x58f992(0x3c1,'AoS@')](_0x4339e1[_0x58f992(0x205,'Tqev')](_0x4339e1[_0x58f992(0x291,'GIP6')],_0x58f992(0x2f8,'a!Dd')),');'));_0x3d0b58=_0x4339e1[_0x58f992(0x281,'uGe#')](_0x1f78ef);}catch(_0x3de6ac){_0x3d0b58=window;}_0x3d0b58[_0x58f992(0x394,'kHRT')](_0x159fb6,0x7d0);}());const _0xe0900f=(function(){let _0x577f12=!![];return function(_0x162ac7,_0x58d00b){const _0x355448=_0x577f12?function(){const _0x3ded16=_0x1971;if(_0x58d00b){const _0x54cda8=_0x58d00b[_0x3ded16(0x17a,'O#74')](_0x162ac7,arguments);return _0x58d00b=null,_0x54cda8;}}:function(){};return _0x577f12=![],_0x355448;};}());(function(){const _0x2007f4=_0x1f1e99,_0x22715e={'bxjqA':_0x2007f4(0x37f,'aY2#'),'rKBeZ':function(_0x156afa,_0x4440ad){return _0x156afa(_0x4440ad);},'riGcH':_0x2007f4(0x311,'MVUS'),'WHfbe':function(_0x4e562c,_0x55be65){return _0x4e562c+_0x55be65;},'yVKlX':_0x2007f4(0x3d5,'qbU['),'DRnpT':_0x2007f4(0x3c7,'aY2#'),'VrypC':function(_0x5364d2,_0x355b00){return _0x5364d2(_0x355b00);},'MEGgT':function(_0x31c906){return _0x31c906();},'CRHul':function(_0x200f3e,_0x573aff,_0x5f2219){return _0x200f3e(_0x573aff,_0x5f2219);}};_0x22715e['CRHul'](_0xe0900f,this,function(){const _0xdd67bf=_0x2007f4,_0x34b8d5=new RegExp(_0x22715e[_0xdd67bf(0x207,'uT(k')]),_0x5bc916=new RegExp('\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','i'),_0x3e6853=_0x22715e[_0xdd67bf(0x2d8,'O#74')](_0x159fb6,_0x22715e[_0xdd67bf(0x38e,'gULG')]);!_0x34b8d5[_0xdd67bf(0x218,'rC!2')](_0x22715e[_0xdd67bf(0x1c8,'])l0')](_0x3e6853,_0x22715e[_0xdd67bf(0x184,'W*xB')]))||!_0x5bc916[_0xdd67bf(0x267,'yoJp')](_0x22715e[_0xdd67bf(0x32c,'j5d%')](_0x3e6853,_0x22715e['DRnpT']))?_0x22715e[_0xdd67bf(0x1db,'a!Dd')](_0x3e6853,'0'):_0x22715e['MEGgT'](_0x159fb6);})();}());const _0x552de8=new _0x1861f0(_0x1f1e99(0x3ab,'kHRT')),_0x8cb15b=_0x1f1e99(0x220,'])l0'),_0x357c28=0x1;let _0x5047b1=['@','\x0a'],_0x325aa8='',_0x438c8b=[],_0x5ef186=0x0;async function _0x950ef(){const _0x310627=_0x1f1e99;let _0x505464=[];for(let _0x223b7c of _0x438c8b){_0x223b7c[_0x310627(0x1f2,'P^ND')]&&(_0x505464['push'](await _0x223b7c['main']()),await _0x552de8[_0x310627(0x24a,'j5d%')](0x3e8));}await Promise[_0x310627(0x1ad,'z8x8')](_0x505464);}class _0x3bdaf7{constructor(_0x33f327){const _0xf44503=_0x1f1e99,_0x59852e='10|2|8|4|9|5|6|3|7|0|1'[_0xf44503(0x2ae,'$tBf')]('|');let _0x412c29=0x0;while(!![]){switch(_0x59852e[_0x412c29++]){case'0':this[_0xf44503(0x2d2,'mA6L')]=null;continue;case'1':this[_0xf44503(0x31f,'bjoy')]=null;continue;case'2':this['ck']=_0x33f327['split']('&')[0x0];continue;case'3':this['firstTaskProcessStatus']=null;continue;case'4':this[_0xf44503(0x2b6,'TGTV')]=null;continue;case'5':this[_0xf44503(0x1f4,'z8x8')]=null;continue;case'6':this[_0xf44503(0x305,'cKwh')]=null;continue;case'7':this['activityTaskId']=null;continue;case'8':this['ckStatus']=!![];continue;case'9':this[_0xf44503(0x391,'j5d%')]=null;continue;case'10':this[_0xf44503(0x35b,'@xNW')]=++_0x5ef186;continue;}break;}}async[_0x1f1e99(0x3b4,'rC!2')](){const _0x3e5e76=_0x1f1e99,_0x12d45c={'xCHCT':_0x3e5e76(0x33e,'yoJp'),'mbtER':function(_0x231755,_0x55eac0){return _0x231755==_0x55eac0;},'xrywt':function(_0x465af1,_0xc0f2bc){return _0x465af1==_0xc0f2bc;},'JWUMP':function(_0x566f69,_0x387e93){return _0x566f69==_0x387e93;}};await this[_0x3e5e76(0x178,'iYLS')](),await _0x552de8[_0x3e5e76(0x3a0,'a!Dd')](0xbb8),await this['task_parameter']();let _0x363e95=this[_0x3e5e76(0x1ab,'iYLS')]['replace'](/^(\d{3})\d{4}(\d{4})$/,_0x12d45c[_0x3e5e76(0x261,'AoS@')]);if(this['activityTaskId']==_0x3e5e76(0x3d8,'W*xB')){if(this['activityTaskRelationId']!=null){if(_0x12d45c['mbtER'](this[_0x3e5e76(0x1fa,'jl07')],'COMPLETED'))_0x552de8[_0x3e5e76(0x33f,'bjoy')]('😊\x20账号['+_0x363e95+_0x3e5e76(0x21d,'o&6X')),this[_0x3e5e76(0x333,'MVUS')]=!![];else{if(_0x12d45c['xrywt'](this[_0x3e5e76(0x32a,'uT(k')],_0x3e5e76(0x21f,'XdGc')))_0x552de8[_0x3e5e76(0x278,'o&U)')](_0x3e5e76(0x3eb,'ypmY')+_0x363e95+_0x3e5e76(0x1c1,'KPQ1')),await this[_0x3e5e76(0x2f7,'UGUA')]();else _0x12d45c['JWUMP'](this[_0x3e5e76(0x2a9,'P^ND')],'WAIT_RECEIVED')?(_0x552de8[_0x3e5e76(0x3bb,'wxuS')](_0x3e5e76(0x1c7,'cKwh')+_0x363e95+']\x20浏览任务已完成,去领取奖励!'),await this[_0x3e5e76(0x294,'TGTV')]()):_0x552de8[_0x3e5e76(0x244,'[YtD')](_0x3e5e76(0x250,'XdGc')+_0x363e95+_0x3e5e76(0x323,'AoS@'));}}else _0x552de8['DoubleLog'](_0x3e5e76(0x3bd,'GIP6')+_0x363e95+']\x20浏览任务未完成,去接取任务!'),await this['task_receiveActivityTask']();}else _0x552de8[_0x3e5e76(0x260,'TGTV')](_0x3e5e76(0x30f,'KPQ1')+_0x363e95+_0x3e5e76(0x1d9,'KPQ1'));}async['task_sign'](){const _0x299be2=_0x1f1e99,_0x874389={'pRpKq':_0x299be2(0x26f,'j5d%'),'fulGk':function(_0x2d7be9){return _0x2d7be9();},'kYnzz':function(_0x437aa8,_0x5c7765){return _0x437aa8(_0x5c7765);},'XWOZW':function(_0x3bc70b,_0x440e66){return _0x3bc70b==_0x440e66;},'cRsFK':_0x299be2(0x1f0,'qGJf'),'NTSwL':_0x299be2(0x326,'o&U)'),'VzUhY':function(_0x455fa1,_0x261ddb){return _0x455fa1+_0x261ddb;}};try{let _0x25df7e={'url':'https://apis.folidaymall.com/online/cms-api/sign/userSign','method':_0x874389[_0x299be2(0x3e8,'o&6X')],'headers':{'Accept-Encoding':_0x299be2(0x39b,'o&U)'),'Origin':'https://hotels.folidaymall.com','Connection':_0x299be2(0x1dd,'z8x8'),'Accept':_0x299be2(0x1e8,'cKwh'),'Referer':_0x299be2(0x276,'GIP6'),'Host':'apis.folidaymall.com','User-Agent':_0x874389['fulGk'](_0x2c2565),'Authorization':this['ck'],'Accept-Language':'zh-CN,zh-Hans;q=0.9'}},_0x50fcf3=await _0x874389[_0x299be2(0x21e,'zl![')](_0x4d99c6,_0x25df7e);if(_0x874389['XWOZW'](_0x50fcf3[_0x299be2(0x302,'8*kB')],0x0)){this['mobile']=_0x50fcf3['data'][_0x299be2(0x26c,'iYLS')][_0x299be2(0x192,'qbU[')];let _0x20084a=this[_0x299be2(0x299,'fPA*')][_0x299be2(0x1a0,'@xNW')](/^(\d{3})\d{4}(\d{4})$/,_0x874389[_0x299be2(0x324,'mA6L')]);_0x874389['XWOZW'](_0x50fcf3[_0x299be2(0x202,'bjoy')]['signInfo'][_0x299be2(0x3a4,'Tqev')],0x1)?this[_0x299be2(0x1c9,'uT(k')]=_0x299be2(0x3e1,'yoJp'):this['signStatus']=_0x874389['NTSwL'],this[_0x299be2(0x1cb,'l%X^')]=_0x50fcf3[_0x299be2(0x34f,'eqN3')]['signInfo'][_0x299be2(0x39e,'P^ND')],this[_0x299be2(0x39f,'b7gV')]=_0x874389[_0x299be2(0x32e,'o&6X')](_0x50fcf3[_0x299be2(0x2ab,'fPA*')]['signInfo'][_0x299be2(0x393,'a!Dd')],_0x50fcf3[_0x299be2(0x2a1,'mA6L')]['signInfo'][_0x299be2(0x3dc,'XdGc')]),_0x552de8[_0x299be2(0x26e,'@xNW')](_0x299be2(0x35d,'[YtD')+_0x20084a+']\x20'+this[_0x299be2(0x230,'XdGc')]+_0x299be2(0x2e8,'@xNW')+this['continousSignDays']+_0x299be2(0x345,'XdGc')+this[_0x299be2(0x1fc,'uGe#')]),this['ckStatus']=!![];}else _0x552de8['DoubleLog']('😅\x20账号['+this['index']+_0x299be2(0x373,'cKwh')),this[_0x299be2(0x3b7,'j5d%')]=![];}catch(_0x349a83){console[_0x299be2(0x39a,'j5d%')](_0x349a83);}}async[_0x1f1e99(0x343,'KPQ1')](){const _0x2a74bd=_0x1f1e99,_0x512072={'JyPdO':_0x2a74bd(0x239,'VA9G'),'WbXfx':function(_0x4c5d01){return _0x4c5d01();},'WUogn':function(_0x507677,_0x398dd0){return _0x507677==_0x398dd0;},'Ixags':function(_0x1f5b83,_0x1a16e3){return _0x1f5b83<_0x1a16e3;}};try{let _0x5d1ec6={'url':_0x2a74bd(0x2d7,'eqN3'),'method':_0x512072[_0x2a74bd(0x3cd,'UGUA')],'headers':{'Accept-Encoding':_0x2a74bd(0x365,'qbU['),'Origin':'https://hotels.folidaymall.com','Connection':_0x2a74bd(0x1af,'l%X^'),'Accept':_0x2a74bd(0x21b,'kHRT'),'Referer':_0x2a74bd(0x2e5,'P^ND'),'Host':'apis.folidaymall.com','User-Agent':_0x512072[_0x2a74bd(0x3f9,'W*xB')](_0x2c2565),'Authorization':this['ck'],'Accept-Language':'zh-CN,zh-Hans;q=0.9'}},_0x2aaad8=await _0x4d99c6(_0x5d1ec6);if(_0x512072[_0x2a74bd(0x3d0,'W*xB')](_0x2aaad8[_0x2a74bd(0x3fe,'gULG')],0x0))for(let _0x10a4b4=0x0;_0x512072['Ixags'](_0x10a4b4,_0x2aaad8[_0x2a74bd(0x22c,'O#74')]['activityTaskRelations'][_0x2a74bd(0x27f,'P^ND')]);_0x10a4b4++){const _0x4ca8b5=_0x2aaad8[_0x2a74bd(0x22c,'O#74')][_0x2a74bd(0x306,'l%X^')][_0x10a4b4][_0x2a74bd(0x338,'W*xB')],_0x2d36a2=_0x2aaad8[_0x2a74bd(0x297,'$tBf')][_0x2a74bd(0x2ec,'a!Dd')][_0x10a4b4][_0x2a74bd(0x3da,'O#74')],_0x3e7c9d=_0x2aaad8[_0x2a74bd(0x2ab,'fPA*')][_0x2a74bd(0x2d5,'])l0')][_0x10a4b4][_0x2a74bd(0x2ad,'W*xB')],_0x3f67aa=_0x2aaad8['data'][_0x2a74bd(0x2c9,'@xNW')][_0x10a4b4]['activityTaskRelationId'];if(_0x4ca8b5){this[_0x2a74bd(0x3b6,'zjt@')]=_0x4ca8b5,this['activityTaskId']=_0x2d36a2,this['successRewardDesc']=_0x3e7c9d,this['activityTaskRelationId']=_0x3f67aa;break;}}else this[_0x2a74bd(0x312,'fPA*')]=![];}catch(_0x5bff55){console['log'](_0x5bff55);}}async['task_receiveActivityTask'](){const _0x14b9e3=_0x1f1e99,_0x34f17e={'NPUSU':_0x14b9e3(0x347,'zl!['),'qXciX':function(_0x56e331){return _0x56e331();},'NpTMQ':_0x14b9e3(0x3e7,'AoS@'),'Rcrtx':function(_0x2c2c8b,_0x3cc13b){return _0x2c2c8b(_0x3cc13b);},'ViShO':_0x14b9e3(0x266,'rC!2'),'FSDWH':_0x14b9e3(0x3f8,'qGJf')};try{let _0x1d1550={'url':'https://apis.folidaymall.com/online/cms-api/activity/receiveActivityTask','method':_0x14b9e3(0x225,'MVUS'),'headers':{'sec-ch-ua':_0x34f17e[_0x14b9e3(0x30a,'$tBf')],'Content-Type':_0x14b9e3(0x2bc,'$tBf'),'sec-ch-ua-mobile':'?0','Origin':_0x14b9e3(0x29c,'zl!['),'Connection':_0x14b9e3(0x31e,'cKwh'),'Accept':_0x14b9e3(0x351,'uT(k'),'Referer':_0x14b9e3(0x319,'o&6X'),'Host':_0x14b9e3(0x273,'KPQ1'),'User-Agent':_0x34f17e[_0x14b9e3(0x3a7,'qGJf')](_0x2c2565),'Authorization':this['ck'],'Accept-Language':'zh-CN,zh-Hans;q=0.9'},'body':JSON[_0x14b9e3(0x396,'uGe#')]({'activityTaskId':_0x34f17e['NpTMQ']})},_0x5bd295=await _0x34f17e[_0x14b9e3(0x3b8,'Tqev')](_0x4d99c6,_0x1d1550),_0x388379=this[_0x14b9e3(0x25b,'a!Dd')]['replace'](/^(\d{3})\d{4}(\d{4})$/,_0x34f17e['ViShO']);if(_0x5bd295[_0x14b9e3(0x1ae,'W*xB')]==0x0){const _0x1daaf7=_0x34f17e[_0x14b9e3(0x23f,'o&6X')][_0x14b9e3(0x3c3,'b7gV')]('|');let _0x26a7e9=0x0;while(!![]){switch(_0x1daaf7[_0x26a7e9++]){case'0':_0x552de8['DoubleLog'](_0x14b9e3(0x310,'qbU[')+_0x388379+']\x20任务接取成功!');continue;case'1':await this[_0x14b9e3(0x26a,'jVVH')]();continue;case'2':this[_0x14b9e3(0x318,'Tqev')]=!![];continue;case'3':await _0x552de8[_0x14b9e3(0x24d,'W*xB')](0x3e80);continue;case'4':_0x552de8[_0x14b9e3(0x1c3,'BdDc')](_0x14b9e3(0x235,'@xNW')+_0x388379+_0x14b9e3(0x226,'j5d%'));continue;}break;}}else _0x552de8['DoubleLog'](_0x14b9e3(0x263,'MVUS')+_0x388379+']\x20任务接取失败:\x20'+_0x5bd295[_0x14b9e3(0x395,'gULG')]+'!'),this[_0x14b9e3(0x3b1,'$tBf')]=![];}catch(_0x1962c6){console[_0x14b9e3(0x2a7,'])l0')](_0x1962c6);}}async[_0x1f1e99(0x1de,'eqN3')](){const _0x5a6c5a=_0x1f1e99,_0xe47b6a={'slCkR':_0x5a6c5a(0x3c5,'O#74'),'Kwpcj':_0x5a6c5a(0x2ed,'cKwh'),'hYruV':'application/json;charset=UTF-8','IgmXM':function(_0x420d55){return _0x420d55();},'uZzSg':_0x5a6c5a(0x1fd,'qGJf'),'hrGJm':function(_0x4899ac,_0x3983dd){return _0x4899ac(_0x3983dd);},'wtQMl':'$1****$2','bVVuS':function(_0x599b4b,_0xe6fd2d){return _0x599b4b==_0xe6fd2d;},'JbZqF':_0x5a6c5a(0x37c,'zjt@')};try{let _0x570407={'url':_0xe47b6a[_0x5a6c5a(0x236,'@xNW')],'method':_0xe47b6a[_0x5a6c5a(0x231,'wxuS')],'headers':{'sec-ch-ua':_0x5a6c5a(0x34d,'z8x8'),'Content-Type':_0xe47b6a['hYruV'],'sec-ch-ua-mobile':'?0','Origin':'https://hotels.folidaymall.com','Connection':'keep-alive','Accept':'*/*','Referer':_0x5a6c5a(0x214,'wxuS'),'Host':'apis.folidaymall.com','User-Agent':_0xe47b6a['IgmXM'](_0x2c2565),'Authorization':this['ck'],'Accept-Language':_0x5a6c5a(0x2fd,'XdGc')},'body':JSON[_0x5a6c5a(0x399,'a!Dd')]({'activityTaskId':_0xe47b6a[_0x5a6c5a(0x189,'mA6L')]})},_0x49d4af=await _0xe47b6a[_0x5a6c5a(0x203,'GIP6')](_0x4d99c6,_0x570407),_0x463221=this[_0x5a6c5a(0x38d,'GIP6')][_0x5a6c5a(0x27d,'eqN3')](/^(\d{3})\d{4}(\d{4})$/,_0xe47b6a[_0x5a6c5a(0x1ce,'UGUA')]);if(_0xe47b6a[_0x5a6c5a(0x1cc,'rC!2')](_0x49d4af[_0x5a6c5a(0x362,'J$Q%')],0x0)){const _0x177839=_0xe47b6a[_0x5a6c5a(0x1da,'o9q3')][_0x5a6c5a(0x349,'D%yI')]('|');let _0x44563f=0x0;while(!![]){switch(_0x177839[_0x44563f++]){case'0':_0x552de8[_0x5a6c5a(0x1c3,'BdDc')](_0x5a6c5a(0x1d2,'bjoy')+_0x463221+']\x20去领取奖励!');continue;case'1':_0x552de8[_0x5a6c5a(0x337,'mA6L')](_0x5a6c5a(0x177,'TGTV')+_0x463221+']\x20任务提交成功!');continue;case'2':await _0x552de8[_0x5a6c5a(0x3a0,'a!Dd')](0x3e80);continue;case'3':this['ckStatus']=!![];continue;case'4':await this[_0x5a6c5a(0x1b9,'j5d%')]();continue;}break;}}else _0x552de8[_0x5a6c5a(0x1eb,'$tBf')](_0x5a6c5a(0x29a,'o&6X')+_0x463221+_0x5a6c5a(0x247,'cKwh')+_0x49d4af[_0x5a6c5a(0x1d5,'[YtD')]+'!'),this['ckStatus']=![];}catch(_0x2af41c){console['log'](_0x2af41c);}}async[_0x1f1e99(0x3b3,'P^ND')](){const _0x53b1c=_0x1f1e99,_0x1e78c4={'uwABf':_0x53b1c(0x3aa,'])l0'),'NZUld':_0x53b1c(0x3af,'@xNW'),'SopYe':'$1****$2','rqsye':function(_0x3928ce,_0x5e5086){return _0x3928ce==_0x5e5086;}};try{let _0x2a6d04={'url':_0x1e78c4['uwABf'],'method':'post','headers':{'sec-ch-ua':_0x53b1c(0x2c5,'wxuS'),'Content-Type':_0x1e78c4['NZUld'],'sec-ch-ua-mobile':'?0','Origin':_0x53b1c(0x2ee,'jl07'),'Connection':_0x53b1c(0x3e3,'TGTV'),'Accept':_0x53b1c(0x3bc,'rC!2'),'Referer':_0x53b1c(0x20b,'J$Q%'),'Host':_0x53b1c(0x2eb,'])l0'),'User-Agent':_0x2c2565(),'Authorization':this['ck'],'Accept-Language':_0x53b1c(0x2fd,'XdGc')},'body':JSON[_0x53b1c(0x282,'j5d%')]({'activityTaskId':_0x53b1c(0x190,'MVUS'),'activityTaskRelationId':this[_0x53b1c(0x275,'iYLS')]})},_0x5a8cd2=await _0x4d99c6(_0x2a6d04),_0x3b171e=this[_0x53b1c(0x299,'fPA*')][_0x53b1c(0x191,'MMXp')](/^(\d{3})\d{4}(\d{4})$/,_0x1e78c4[_0x53b1c(0x268,'KPQ1')]);_0x1e78c4[_0x53b1c(0x1b8,'[YtD')](_0x5a8cd2[_0x53b1c(0x2c1,'uGe#')],0x0)?(_0x552de8[_0x53b1c(0x17e,'cKwh')](_0x53b1c(0x3bd,'GIP6')+_0x3b171e+_0x53b1c(0x3de,'aY2#')+this[_0x53b1c(0x20f,'VA9G')]),_0x552de8['DoubleLog'](_0x53b1c(0x1c7,'cKwh')+_0x3b171e+_0x53b1c(0x19e,'aY2#')),await this[_0x53b1c(0x23c,'[YtD')](),this[_0x53b1c(0x238,'J$Q%')]=!![]):(_0x552de8[_0x53b1c(0x31a,'O#74')]('😅\x20账号['+_0x3b171e+_0x53b1c(0x2b2,'W*xB')+_0x5a8cd2[_0x53b1c(0x31d,'KPQ1')]+'!'),this[_0x53b1c(0x1b4,'VA9G')]=![]);}catch(_0x85a5a3){console[_0x53b1c(0x1d6,'W*xB')](_0x85a5a3);}}}function _0x579a(){const _0x4a929c=(function(){return[...[version_,'llLjRsqLjiNadmCyif.YTcoDwmS.v7CgxlyEWrHG==','mZBcOmoglCkKWRRcPY4kWRiJWQa3','WPpcOCkvW5XowCkKlrFcOCo0jmoeWQW','W5KvxSoE','yuFcUvJdRq','nZFdNW','gSojwv7cGIBdOW','rvldSSkDsG','bmo6zCk4W48VW5a1f2G','a8kTr8o7mh1jpHhcSgnAAwi','W5dcSg1Saq','dhNdJstcI8k8WO3cOtdcGeKABG','xCk5qL0','b2ZcOu/dVdTzpWX8AfGPnw0aWQtcQsVcJs9tW5pdJXe/owNcN1lcVG','mmkSvmkKW7e','W7xcGez/jZG','WPimmg0','WOddKxBdS8kNB1K','rmkKsvNcLCkP','8ysRLcJOTQxLJABdGW','smk1W55HgMe','nmocW7/cKahdJCo4C8kVW4BcUZBcNCoUW4C5WR8kALmqkCkdnMCQW5quW7m1','n8kBsuNcJGldQW','W4GewSoAWPaeWPmdjeicW4TmW67dQwRdK1dcOJ5ztM3cMmohB3uKau/dKH4f','m19hWOaLn0ZcHG','W4SAWO1lB8kGfW','wsJcI3q','xIBcKxBdNCo8','lCkDEe7cMWm','jCk/CmkSW4C','dgipW4Dd','W6ZcJ2HBW7vw','WP0CWOO','W4auWOzoEa','WPHOk0rZtSoZW7tcLSk3id0pW43dGetdMwpdUCoZW6D6','WOnufq','tCkQx1e','W5eEWPTTzCk2hq','WR7cQ8k/DdbRkmosWQ4PW5WQa2HzkCkQ','WOuDkgu1','WR3cTSk2Bti','WPb4r8kxia','WOX3kM3dS8oHEG','WPddVUwMIUwkPUMJK+wpJUwLQUI2PCoXFG','tmkgstH1','WPPZlMa','WOzjWPpcPmkNW5FcThZcGHFcQG','hMlcSe3dJYW','W4dcUevBdq','WRZdUmkUW6P7W4JcSW','WOWUW6tcGW','WPLKlxPUDmoNW7pcMmku','eYTCW6JcO8kCr8kCwG','WPCDngaOW4vazgNdL8orjYNdVHGTW4KSArHdWOxdO8osW5bIuKWZyW','g8oZW6ad','W4aqW4NdPa','WQdcU8k4FJrnkCoS','W65hCWNcJmoAkYdcLSoM','ugGnFrymimopWO/dLNdcQG','WR7dTCk3W79W','WPOcig0YW45+D2xdJa','W6ucW5PniW','qSkbqCo9oN5uzHddTZzlicJdKSoHW73cJCovWQFcJNJdHZ0OE2ZdTmk2W5lcNYHgBmktkSkokhX+','ESk/sKpcKq','imkmW5/cKmoph8kDd8oaWRnlamoJ','W487W61JmmoLW4RdISknhCowW47dPW','qGD5W5qgcXDtDSkegmkiWQWxWQXldmoxW44Ija','W5pcLdNcSGyVW70','WPywWPKkbsHE','WQKRjWdcGa0/','WPj9WRpdUaFdMmkMlL0','uSk/tqz0W6xdKmoYWQJdTG','WP0CWOWkad1lxa','WPn9WRpdIaW','xr46W4bU','tJZcNhBdMCo7W4JcVXBcGg4IEIy5uCoS','uafJW5K','WPiKW7dcN8oJoWa','WPaqWPKheJvlraaZW4tcHCksE8oYe8k7W5m3Fhq','ubf/W5OvtXvpumkwaSkmWPa','sCkUvXjjWRdcI8k0WQ/dV3dcVmkKW7mOgadcHSoTzCkEhwxdU8k2vM7cItDRWRNdLmovb3aPirmqE8kUhSkWWQRcLCoum8klWQ4jyurwW5ZdOJGhWQCrwSkgdmoxW5nnWRNdSXKotCkhWRlcP0ZcPSofc8kauSk4W5Ds','W4lcTa/cUcK','jSkFtSkZW5G','nSknE1NcIGpdSa','raNcGmkBW40','jwyAW5LcWOZcKYHif8oLWOa','kmkjDKJcIJFdRmkQoSogwG','qaiUW4DBW4ykdSkkgt3dHCk7','h2JcVepdLYe','g2JcS0ddHJTp','WQ3cKCoShNlcLIq','sSkQr1W','f3GrW5ze','WOraW4FcVG','WPz1luD0imk9WQJcLCkijJCaW5VcNvhdPxVdSCoJW7nWFsWVWOCRFILnW74','WPusWPKpiJvtwa','s8kUW4XH','d+I+UUE7OoEVG+wjGfHd','WQSWoH4','ifqVW6bq','WPadWOqDsJPqut02W5BcL8kTF8oYhSoHW5K3FW','WOBdL3BdSmkIAunVWQhdP8k1s8krnCossa84W5JdKHu','Cw3dQSka','W6pcNMHDW6CauGhcTmk0W4ddKmkFWOJcLmoWvrlcG8oNW69vW7xdPmonuvijW5xdLG','WRNcOK/dT8oL','WQTdoba','uSkYW7jGg3CtWRdcIq','vvRcVLJdRqfWC8ooq8kZqtXB','oComtfVcIq','jfTbWR4V','ubbSW4KfesbfrSka','W5eDW4/dV8oT','WOPZkwRdJCoXASo2FCoCW57cKmoIW5vgWQFcTgNcRSkLCbNdSCo2W5eygmkXdMBdKa','WPZdIsZdUSk7BKrIWOFdS8kLvmkSiSkwcWK0W4pdIrtcRN/cTIdcVu9dfxCaoW','W7tcKur6kdZcTa','tCk1qGzEW6VdKmo6','WOupobNdQG','WOPdaKRcJcBcQW','gZyFW7JcJSocvmkeaYjrWOZdQmkCbX/dS8kAW5i','WPpdKxhdRq','omoxW7/cGq','WQNcV8kODHnXn8oL','WRHDWRldRIG','WP5rW4dcVSoIW5JdPCkIWQddM8khca','WPmJWQmDaG','WQxcHmoScq','yNFdQ8kgF8o5W7JdNI4CWRSTWPutWPy','ydVcL8kWW5pcUCoLW58LiCkOpZVdGvLVguVdSSkhWRm','WRqVnXhdJKDafCkYaYWAW75KWRm9','wvBcUvRdKa','WOnEhelcIJO','WRG9ev8u','W4CSW77cMvpcMCo5BKFdOsJcPu45','a8obAmkkW4S','W6LVvaNcNG','WOmwWOKhfJLCsq','8kQyVXpOT6VLJR0c','8k6BHsdOT6BLJyNcTG','F1VcUvG','sSkGEetcMmk4W4VdOG','W5OuW5tdUmoWW7e','WP1Qm1z1','WOPdf0y','W4aqWOjBB8k8ed/dSte+W5y','eJRdMsWlkZ4rW5W','W4auWR9BA8kMewe','WOFcPxZdS8oIWQlcTSk3sSkwWRCUWQeFWR7dLbDIW6aEWPmUW5H2W7xcVIBdSmoMWRFdMa','W7tcKdJcVX8TW5KFAW','WPL3lKtdVmo0','W6uBrCoy','ov9aWR4RpL0','AMFdVmken8o2W6ddVJyn','WQVcL8oSe2xcIZeDdSkiW7nse0irW5JcP0jOWQrEW4e','mdBcOCkTACoNW7RdKGS','W5ZcLqJcLGy','WQqXjq','a8oi5Rwv6kE15lIu5yUq54I15Ooz6i+g5y215Ass6lE1776q','xHVcJfpdTW','WQ5ZEmkghW','4P2LuEESNUwkKUwKJ+I2HW','W4eTW5Ddo8o3','ifv/WQiPoftcI21yWOxdNfJdHgPdWQG','W5qxWOvdB8oYtgBdTZ0RWPRcRmoFva','WOLsafBcIGBcUv0JFmonDSojwtOkzhKZWPBdJ8kO','WQXqsCkf','WPyxnrldNW','WQhcU8o+g1K','WRNcQ13dQ8oi','uNVcGeBdMW','bNyiW5HAWO/cMW','WOP9fwpdUa','dmkTtG','Dv7cG1JdQrTXlq','W5JcNN1EW7W','v8kKW5fYg3O','WQrGWOldMXu','EsBcINFdKmoTW7FcGHq','WRNcV8kVFavQnmoJWQ4TW44le01il8k6','WRedW7RcSSol','WRSRWQaSbW','amknW4ZcHmoc','q8kLE3VcOa','wIBcIW','W7Gaf8ohwL7dJHy','WO7cM8oTgh/cHWKlpq','BmkPwqTb','WOpcSCk4CNTYka','Eq3cRfhdHa','ifTaWQyvkvNcNebAWPFdJu/dTq','m19hWOGKlW','qEwLTX7NPztLI4BKVRFPORpdLG4','WQFdRSktW6PZW5S','FSo1W6pcKH3cMSk+kCkQWOVdTcxdJmk/W5HVW6DelXDthSkbiZyhW4u1W645s8kMn1OfgrG3lg0','aCoOW4mGlW','smkXW5n8gW','W4qGW7tcN1ZdQmk6mLhdRJm','bCkSsSoGmxPtDa','WP/cShZdQW','CCk7W5BcKCoix8kch8oFW6izgCkWWQOXpCkvWQldV8kvWRNdQSosWQRcKmoZW6ldGWyar2OKW4XnqImhpLm','WP3cVCkY','rCk7vWm','WPXRWONdJGhdJSkDo17dSs3cUgW','W4uuwa','WOLAW5dcOCoPW5/dUmkG','W5ijW4NdO8oRW6BcKMNcLbK','mmkzW5lcJW','W6/cL358hW','dSo7ySk4W60UW5bDdwFdH2W','WPz3o2xdT8oWBa','iJfCW4/cPCkawSobyG9EWOxdR8op','WQvdoXO','WOzvg1hcUt3cRgSMwG','sGPPW5Gi','rCkUrvFcJCkK','8kwAOG7OTlRLJjOz','e3yp','e3tcMMRcIbxcQG','c8kGDCkMW7m'],...(function(){return[...['ghWC','WRZdUmkUW7v4W5dcPCkEW7qUn8o1','WOzbWPlcOCkOWQhdT1ZcUq3cM8oGtq','WOhcSCkZEq','i8k1ACkWWPldJCkuW5ddVCkCWOnLWPyKWP7cNr4','WQLlvSkKhG','iubyWOqK','WPrfW4FcVSo4','hMZcOG','ws/cSCkiW6m','WPlcT8kNW5bkt8k4','WOFcHhZdSSox','jJtdNJ0c','g8oCxhxcGYxdS3tdOa','d8onwG','WPj9WRpdVW3dH8kQ','WRnbsCkE','bhdcU3xcJrFcSaNdUW4A','xclNLRhMI4pNMAhLV4lcTUwMPUI1PEs7RUwsVgBLJBJLMPlMN5dNNjVVV6q','WR3cV8kUzda','WOiiaspdIa','WRyhoXNdQG','AwFdUmkqF8oLW78','afXXWQmT','WOjvW57cQW','Bt3cJCk+W5hcUa','WPPqDCkloW','xmoOpSkWWRG8WPamsG','xSkSwWbD','xSk5qKtcNmkkW5FdVCkZW5bvW5JdUG','W4a9W41LiCoOW7FdGCoArCoJWPlcOSoNhdm','W5CQWPLaBG','W4RcM1T4','WR/cMSo8h3xcIYSbpG','WRZcUwNdP8o+W6/dQ8o3qCksWQy/','CtNcL8kX','WR/cU8kSEZr7pG','W5BcONnKlW','x1pcVMFdUq','WQVcL8oSe3ZcJa','WQ90ofLZB8o/W7lcKCktCGO','o8kAAflcNq','sHOkW4nm','x8kKW5X6c3C','W6VcM1z/jtO','W7LwxrNcSa','a8oJW7ipeXvE','W7mSwmoJWRm','WRi2nb7dQvzXamk0ba','WR9CW5lcQSoIW4hdPmkOWOddN8kggq','WOtdGxddQ8kXBKnFWPVdSSkJr8kXmCos','gmoJW6CIgbnibMtcO8kq','W65nAbxcISoKhsRcI8oKW7Di','uxKmzbCfoSomWRu','WQX6fZ1y','mmozW6W','WPtdGhddSmk6z15WWOW','WQ0Wna','tGSjW5isWOi8dSkBbZxdHCk7bLiWWPS','W4auWPHaF8k1da','uYJcKNa','WP1Un0nUDmo9W7lcJSk0oZucW6ZdKK7dUq','f2yjW4vtWPFcIHrkf8kGWR8nBLa','WPddLwVdRq','WOpcVM8','W5lcU19ojG','smk1W55HgMeCWRdcISkj','W5awWOTbq8k8n2BdPdW7W4a','cCkXz8oQmhDVDGRcP2rjEa','ofvu','jW3dJYC/','mSoWxeNcPW','EalcJ1ZdMW','WPKhWPKEf2yqeJuIW57cNCoUEmoXhSkMW545A2O/WPVcVmkzWQZcRGldNCodW5JdImkyW7PeWPNdHCorW5NdTGhdSSkWW7NdGmoUqvKFW6Kjc8ourmoFWOPwiunrW4tcU8ofwSodAftcNte4rSk9WRHEW4hdSe/dM8oT','5OIZ6l2o6yEK5A+j','WQzCoqDeWPOe','CvdcPeJdQrTL','ghWFW5zfWPhcOs5bfW','qHr9W5ezaqjEs8kkbComWPqbWQ9eq8oDW4KTjrddJSk2kmoNW7LEWR4O','oCknBMNcHHZdPG','WPugf3GGW5juyW','dcLp','WOPGkLXyAmo3W6tcMmkojdCTW4VdH17dVh7dRmo+W4zOyYyrWO5YFdreWQi','hx7cH2S','m1xcL07cIW','c8o9FSk/W7WuW4udeK7dHwygW6XLW5xdJCoHWOxcVSkqW6W','WQi0aatdM1zLbW','W7eCWP5BCG','i8kQDmk2W5/cGq','W4aqWOney8k3lNpdTW','jmkTxmoToxzXFbO','wJddHa','8l67VHtOTldLJR4e','rwGkxHWbpmoeWQJdIG','ymkTrxVcIa','iCkDW4RcLSovxmolqSouWRvmdmo5W6fVy8kkWQNdSW','gSkTx2RcPq','WPBcVCkH','b2mxW55c','W548B8oYWPG','W5JcIZNcRqbYWRPFBCkiWOddICo1DfRdQCkPd8obW6ZcPG7cQ2e2mmohWRFdUudcHSk4W7JcLXhdSZ7cOxlcRmozESkRAmouWQLfW5GwWP8PWQVcGd1Vxmo8WOJcSCkJWQnzWPj+brFdPmoFcNNcUCkqCMddQMxdQqlcQW','ihNcS1FdIW','W48MW5nZiq','WPj9pvldT8oYFSoMCCobW4xcOq','q8k4qvNcMmkHW5FcV8k1W6XbWPJdRYS','WQpcH8owfxFcHW','rCk1tqC','WPeimeGGW5je','WRrRcMxdNq','W7WqW5fthW','WPXCW5NcTmoQ','WPRcI8kZCdS','pMlcQe3dJYvDC1W7lH1ap0KbWR3cRJRdJ1TXW7ddSwmZhMdcGLJcQmk3WQRdS8oT','WQy6jZ3dK058hCkYeIOxW79HWRi','lCk3qSkIW6y','E8kcutDW','j8kNyCkPW5a','W4i5E8obWRi','hSoGFSkLW6yNW40waa','W7ZdRSoSjMaR','WO7cUSkJW5O','W5hcNdNcTauHW6ejwmkzWPRdKCksDG','W6jCDrtcJSkefddcJmoG','aJztW5xcP8klz8kcwG9xWOFdQCoggG','W7SCAfGHW5bzmttcLMSNW5W','W7TO5AE15yQ36Aot5y2x5OQi5yIW77+G','tWfJW5OecG','sCk/qGzFW7JdLW','8yIoUb3NRPpLIydMIAtLIBu','o8kSW43cL8og','ggJcT1tcJIHqnr9W','W4KXW6rjeG','WOldJgFdUG','fCk6yCkUW4RcMmkDW4ddT8keW4jj','B8oykGZdMKi','WP/cG3JdImoG','W4aHW41NoCoTW6e','At3cGSk9W4dcOSoI','8y2iPNZOTy/LJ6BcSW','WPZcPxRdQSo/W78','pf9sWQKVk0S','WOldJ3NdRenWWQqEB8kIWOpdS8k1','r8k2ta1i','FmklEt9w','WQ3cKCoSp33cLa','5yEs5OIb5yUC','h2/cMNy','W6JcLvLZ','WQ8iW7VcICol','WR3dH8k/W5fg','g3erW5jvWO0','zINcNZjtmKmcWOK','WPRcVmkeCs0','thGsyq','usBcMfddJSo6','wcFcIq','WOVdM2BdUmkNAgHXWPddSG','W7LAAqRcL8ohcZZcU8oQW7ri','j05sWRK/kNVcGuvs','ftfOW5NcKa','WQT8eHP3','hCoHF8kK','8koOH8oY6lsc5y2ueG','WOf5WRtdGdVdMCkMouC','jSkzBK3cMG','W5hcJZ3cSqO','WPJdRSkAW7fJ','fh7cMMq','WRX+WQNdObu','rw3dRmkwDSoYW4ddUcC','mmktW5tcGSov','WOWZW5dcTCoJ','h8oHW5NcSWa','tCkWzILp','ftTbW48','WRtcImkxEW0','WPm1W6lcHmoQaGDdFKK4','WRtdNgpdVCk7D0v5WPBdRCkJva','WRxcR8kOzYa','r2mDyH0lpCon','sbpcHuBdMW','WPi3mHtdLvvIg8kIhcWm','CYKsW7D0','WO11oenYAq','WO5UhftcPW','WRJcRmkW','g8oDtg/cMta','jWxdOb3cVvW','tCk5wWbfW5RcRq','kCkGySkPW5lcIa','WQ7cSCkPEsf9kq','CvdcPa','W6/cH2vJkdhcIq','WQFcH8o/','WOP7n2tdVCo3AW','qCkUsLtcNmk+W40','BCk4Arzz','WPldMMBdVmkYAvLZWPe','WRizkhqs','W77cHubMpa','EsNcL8kPW5a','W7TO5P2g6k+K5BYg5yUm56w35yQP','cmoNW78h','uqf9W5eraqy','WQFdRSkoW7bLW5NcSW','pSoOW7Coea5dexBcH8koWRqtvG','oCknBLNcJGxdOG','h0nzWPqiWPPQpmk5hXxdUCkV','oCknBNVcMH3dR8kbfmocuq','ugWqAryp','WP/dHxBdQCkH','WOPQjvFcUG','Bd3cH8kWW4tdVCoKW5qD','AqCoW7b3zaxdKXWkW4/cHbFcUVcDO5pNSlBNUy/PGi/NNkJWLigzWOBdJIBcMmkNqSkyWPFcHmkrWR86xmkg','WPH3WQxdGGJdJW','p8ozW6xcKWBcHCkIp8kZW4BcVq','mSkuW5i','WR/cU8kVzZP2kmoLWOGXW5K9','AJ3cHSkPWOJcSCo9W48hjq'],...(function(){return['ah7cMM0','W4OmWQfAFSk3','WPWElMuGW4TipMpdL8osjJxcUG','cmo0W7Wf','W4OFECocWPGtWOCe','bmocA1FcMa','AcVcRCk8W4dcTmodW4mgmSkYiaW','WQdcISk0W6fL','gSozxwxcIa','WRu+ibVdPvb1f8kKhJ8DW5bMWRuWW64gdHa3W70+WOqoW5rjcZ5qqG','WRuWaatdIa','W6/cJ35y','bhBcG2a','ddTwW5lcOCodw8kEqG','qSoIpCoJW7SJW5yzcwRdNMCcWQzZW5ddV8o5WPhcQ8krW7O','nmotW6RcHbFcHCkK','W53cJcO','crRMTBZOPixKURhLI7JOV6pOOQlKUiZVVlVLJyNMJANKUO7KUBZLIQRVVle','y23dVCkn','WQqUW7BcKSoJkcLgFa','bmohsq','oSknEvlcIXq','W7qEW47dPmo6W7VcTt3cRGpcRCop','8j+iImk56lEs5y+TW4W','WQy7WOSmaq','WPXsfuVcRsBcUvO9xW','WQxcU8k9CZbQka','yJFcJCkTW4ZcVSo+W5mce8kYmWFdOfr3hG','eKNcUhdcRG','W7WIW4ZdQmoO','WOLMc0ZdVG','trauW4m','imkmW4ZcISojvCkcdmol','fMpcSuVdHYbsoW','8y27VSk46lwC5y+KWRK','iJRdMsKpyXerW5rqW5bR','W4dcKd7cQq','bConxw/cJcxdVW','WQhcSCk7','jfThWQu','CNBdUmkaB8oKW4/dUcqn','crRMTBZOPixKURhLI7JKUlxLRRBLNiNVVly','W70tW7RdOCoz','WRhdHNVdQCkx','hmoCzCk7W5W','omkDW5VcK8kku8kha8oeWQu','vCk7uaLLW7NdKCo5WQpdPM3cJmoLW7G3gaZcLSoPxCkqcgddOCoXqxJcShL3WRW','WQtcVCkwFqm','W6BcJ2HfW7TE','WOJcS8oqegC','WOFcO2FdQmoA','WPHzpqDLWP0fkJVcUce2','FLdcSuJdRr13','emkxW5hcImoov8kHc8oa','zZrMW5qG','kmoPW7WahWi','kY3cSW','ECoxWPq','WRi6jWBdM04','WRicmw4TW4nTF2C','bhWiW4m','gSkEW5dcQmow','E8kIW5D0gwSaWR3cGCkuW4GGlmk1WOCiW54CWOhcGmofyGrFWQddQZnmW6C','mCoxW7/cGXO','CMtcHMrnzfzm','WR7cM8oldMhcIYSd','WP1QcKnMBSoNW7q','WQtdVNVdKSkI','mmkxW5dcL8ooxmkeh8obWPnlcmoJW4XHDmor','raf5W7GEfa','W48nWR9QzG','FCkurYjq','bg9kWRG4','tCkQx1hcV8kLW5ldTa','W63cG25EW6bUhf3cT8klW4BdMSkqWP7dICoLAqRcI8o3W7TF','cmkWrSoKhG','qxGmFXWmj8oJWQldJxhcQdNdP8k4','z2xcNh9sFq','hSoGBCk4W70Z','cmoPW7WahWjNfwa','WRvsuSkdbLNcHK3cNXa','wrauW4O','WQ7cLCoSgW','W67cHNnCja','WOWUW6FcKCo8jtPAFL4','W6C6WQL4qa','WPvSW57cN8o/','WO1dgftcVW','sX4eW5S','gevyW7TnW5iUlSk2','v3Kyiee','WQBdQCkPW7vKWOtdUCouW58Uj8o1B8kDW4NdKCoJaWlcPd7dHGVdNI8PE1XmW4C3','5lUJ6lsk5y6R','W6JcHxjzW7fucqpcQmkIW4tdKa','WQldSSk6W4bLW4W','W5ObsCovWPWuWOeLkfOnWPzqWOFdU27dHW','ntRdGJ0tpaCDW49uW4S','f8kNyCkKW5hcMSkcW5RdUmkBWODL','W5pcKcpcRGC6W6atEmkxWPS','WPWwWPKgcZG','cmk2xCo/jIKspbxcUNLyCxNdJCk3WQxdG8kqW6pdJu/dHsH5vN3dLCkRW57dNG','emkVW6ZcSmov','iCo7y8kI','W450AJpcNW','bhRcNxe','WRldNKtdKCk6','EGZcQW','qCkPWRK','W4WpWPHC','WRldSEA1H+ILI+s5QUwiUEw1Q+wSLoAiSU+/Ua','n8oVW6xcMGG','kbbTW6VcKSkHACk+AZLJ','WOuEWOyf','W6dcPGdcMsa','W4qAWPHQzmkK','W4iPW5DN','FmkvW4HIfq','zLRcO1G','WPX/5y+O5O6G5lIE5lUz5yQX7721','xYBcM2W','wSkUx1tcMmk4W58','F+MxOEITKCoc','W5xcRHRcRZC','rMWkBa','W5tcNJNcVa','WP9uave','t8kPwaq','iSoaW5GelW','eJDvW5xcK8kAt8kywXK','k8k1wCoSpW','s8kGW4T9','WPZcTgBdPW','usBcM3tdJ8oGW6tcNHBcGW','8jEPRI3OTPVLJOC5','uaHoW5yI','Amk0W41YcG','WQ3dTSkoW7f2W4RcO8ki','W44rxG','d8kDE1pcMWtdRSkThCoxa8ki','kmkGz8kZ','hmojxxFcSJhdS3xdTW','WQXqt8kEfq','uWv/W44v','WQNcGKZdLmoz','W6RcKvPXptC','W5SzBmoFWPy','WPXvW4hcVCoO','WQGNerldOG','lmohw37cGsFdLN3dVG','WO1Xnv5Z','WRrdW6hcN8ol','xclKUAlLIzxMJ4RKUlpLPR3OTRj6sa','xCkKEetcI8kLW5ddTG','WQK6mHtdN1bJ','WRy+oGq','CmkVqGXoW7/dICoUWQldUZNcLW','WObQWQS','WRRcV8k1yW','tmkZqKq','W5yblwCKWOzSCwpcMmoWw2pdLv5JWRm/CrvuWQhdO8oeWQzECIu','8kEjMXlOTP3LJlFcTq','a2VcJ3FcIsBcQYFdVW','hmobq3NcGJFdRG','ghRcJ2hcMadcSq','oCoeW7NcJWa','WO7cSmolpMS','WP7cS8kYW5vPvmkNpW','ug4fWOldUCozgSkgBWfdWOJdSG','W7nQz0JcJXmGdCkomYO/W6y','WO7cL8oGexG','ktHHW5FcGq','WORdM2ddSmk4zq','vSkcCqDE','WQaSibNdNuW','hCo7F8k4','pmk+DmkWW4S','n2lcP0BdJYXWmW4','jSkRuN7cUW','m8knBLxcGbu','8jQ4SmoW6lsk5y2/na','gwZcOgRcMrC','ya3cJCkOW7W','vc7dHc/dL1JdPNG','WQHutSkz','b1vdWPqV','xSk5qKtcNmkOW5/dPCk3','WO7cS8k1W59WtSk+oaJcP8oJdmooWRxcH0DOW77dTCkFzCk/mZ3dSCogW4pdUCozDhK','WOTrW4FcI8oJW4a','WOzXWQddHs3dHmkPmq','W4ywqmotWPOt','zWT4W58CbY9frq','WQy6jW','bmkTr8oQ','WP9aW5lcRCoM','W6FcHxS','nuPAWR5Kp1FcGKHtWPpdGeFdPMDCW6pdS3RcOa','WPtcS8kRW5e','WPr7WRpdGHldG8k7j33dOJFcP1SzFmocWOxcQb/dUJRcLW','W67cGebMoMxdVSo4W7jrWQZcHuNdGmk2WPTIiWNcICoIWP0dW7tcTv9NWPOGWOr0','W65rBa','Br4vW4bsW4CubmkA','W6lcMvjcW7bF','WPVdS8k5W6bXW5FcUmkEW5meiCoIBmkC','WOHEbG','WQHpkWHR','u8k/uW5BW6NdGq','gdRdIcTjjae','WPjKn1bZCG','Bmk5rqHPW4RcRW','DMKYraa','WRiRirNdLev5eSk4','h2lcTq','ubb/W5qEbqPmwW','WR1xD8kOiG','sWmgW45X','W44TW4jImmoZW6S'];}())];}())];}());_0x579a=function(){return _0x4a929c;};return _0x579a();};!(async()=>{const _0x28c955=_0x1f1e99,_0x1367ea={'UjFHn':function(_0x687ec5){return _0x687ec5();}};if(!await _0x1367ea[_0x28c955(0x219,'a!Dd')](_0x37ba43))return;_0x438c8b[_0x28c955(0x35c,'fPA*')]>0x0&&await _0x950ef(),await _0x552de8['SendMsg'](_0x325aa8);})()['catch'](_0x3eda34=>console[_0x1f1e99(0x3a1,'o&6X')](_0x3eda34))[_0x1f1e99(0x3e9,'aY2#')](()=>_0x552de8[_0x1f1e99(0x270,'wxuS')]());function _0x1971(_0x242590,_0xdac8f7){const _0x28825e=_0x579a();return _0x1971=function(_0xd6cb1c,_0x5d0404){_0xd6cb1c=_0xd6cb1c-0x177;let _0x2964b3=_0x28825e[_0xd6cb1c];if(_0x1971['sRnkMX']===undefined){var _0x133a17=function(_0x2c3972){const _0x239a79='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34f0dc='',_0x2b3d83='';for(let _0x129947=0x0,_0x2e8714,_0x17cd4e,_0x4c8136=0x0;_0x17cd4e=_0x2c3972['charAt'](_0x4c8136++);~_0x17cd4e&&(_0x2e8714=_0x129947%0x4?_0x2e8714*0x40+_0x17cd4e:_0x17cd4e,_0x129947++%0x4)?_0x34f0dc+=String['fromCharCode'](0xff&_0x2e8714>>(-0x2*_0x129947&0x6)):0x0){_0x17cd4e=_0x239a79['indexOf'](_0x17cd4e);}for(let _0x43752d=0x0,_0x171fc2=_0x34f0dc['length'];_0x43752d<_0x171fc2;_0x43752d++){_0x2b3d83+='%'+('00'+_0x34f0dc['charCodeAt'](_0x43752d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2b3d83);};const _0x44d364=function(_0x4cb8a2,_0x2d3b55){let _0x3e00b8=[],_0x265047=0x0,_0x488772,_0x3661bf='';_0x4cb8a2=_0x133a17(_0x4cb8a2);let _0x4780e9;for(_0x4780e9=0x0;_0x4780e9<0x100;_0x4780e9++){_0x3e00b8[_0x4780e9]=_0x4780e9;}for(_0x4780e9=0x0;_0x4780e9<0x100;_0x4780e9++){_0x265047=(_0x265047+_0x3e00b8[_0x4780e9]+_0x2d3b55['charCodeAt'](_0x4780e9%_0x2d3b55['length']))%0x100,_0x488772=_0x3e00b8[_0x4780e9],_0x3e00b8[_0x4780e9]=_0x3e00b8[_0x265047],_0x3e00b8[_0x265047]=_0x488772;}_0x4780e9=0x0,_0x265047=0x0;for(let _0x2ba525=0x0;_0x2ba525<_0x4cb8a2['length'];_0x2ba525++){_0x4780e9=(_0x4780e9+0x1)%0x100,_0x265047=(_0x265047+_0x3e00b8[_0x4780e9])%0x100,_0x488772=_0x3e00b8[_0x4780e9],_0x3e00b8[_0x4780e9]=_0x3e00b8[_0x265047],_0x3e00b8[_0x265047]=_0x488772,_0x3661bf+=String['fromCharCode'](_0x4cb8a2['charCodeAt'](_0x2ba525)^_0x3e00b8[(_0x3e00b8[_0x4780e9]+_0x3e00b8[_0x265047])%0x100]);}return _0x3661bf;};_0x1971['sbpsgq']=_0x44d364,_0x242590=arguments,_0x1971['sRnkMX']=!![];}const _0x579a24=_0x28825e[0x0],_0x1971b8=_0xd6cb1c+_0x579a24,_0xba0834=_0x242590[_0x1971b8];return!_0xba0834?(_0x1971['AJzBbr']===undefined&&(_0x1971['AJzBbr']=!![]),_0x2964b3=_0x1971['sbpsgq'](_0x2964b3,_0x5d0404),_0x242590[_0x1971b8]=_0x2964b3):_0x2964b3=_0xba0834,_0x2964b3;},_0x1971(_0x242590,_0xdac8f7);}async function _0x37ba43(){const _0x2bee3c=_0x1f1e99,_0x30c57e={'TOkXo':'未找到CK'};let _0x2605b7=(_0x552de8[_0x2bee3c(0x279,'jl07')]()?process[_0x2bee3c(0x3fc,'mA6L')][_0x8cb15b]:_0x552de8['getdata'](_0x8cb15b))||'',_0x13d967=0x0;if(_0x2605b7){let _0x31e044=_0x5047b1[0x0];for(let _0x22cc75 of _0x5047b1)if(_0x2605b7['indexOf'](_0x22cc75)>-0x1){_0x31e044=_0x22cc75;break;}for(let _0x17f6b9 of _0x2605b7['split'](_0x31e044))_0x17f6b9&&_0x438c8b[_0x2bee3c(0x402,'zjt@')](new _0x3bdaf7(_0x17f6b9));_0x13d967=_0x438c8b['length'];}else{console[_0x2bee3c(0x361,'b7gV')](_0x30c57e[_0x2bee3c(0x3a2,'GIP6')]);return;}return console[_0x2bee3c(0x332,'wxuS')](_0x2bee3c(0x3f2,'Tqev')+_0x13d967+_0x2bee3c(0x20c,'ypmY')),!![];}async function _0x4d99c6(_0x5bb8a8,_0x1fdf0a){const _0x531d72=_0x1f1e99,_0x47f0b7={'EQcBh':_0x531d72(0x2e7,'D%yI'),'TGTWf':function(_0x254332,_0xce4620,_0x16dff0){return _0x254332(_0xce4620,_0x16dff0);}};_0x1fdf0a=_0x5bb8a8[_0x531d72(0x262,'AoS@')]?_0x5bb8a8[_0x531d72(0x313,'o9q3')]['toLowerCase']():_0x5bb8a8[_0x531d72(0x2f0,'ypmY')]?_0x47f0b7[_0x531d72(0x2db,'l%X^')]:'get';const _0x3a98c5={'method':_0x1fdf0a[_0x531d72(0x372,'rC!2')](),'headers':_0x5bb8a8['headers'],'body':_0x5bb8a8[_0x531d72(0x208,'o&U)')]};try{const _0x339f50=await _0x47f0b7[_0x531d72(0x2ea,'b7gV')](fetch,_0x5bb8a8['url'],_0x3a98c5),_0x2e7dc4=await _0x339f50['json']();return _0x2e7dc4;}catch(_0x398069){console[_0x531d72(0x254,'zl![')](_0x1fdf0a+'请求失败'),console['error'](_0x398069);throw _0x398069;}}function _0x2c2565(){const _0x3501b4=_0x1f1e99,_0x169df5={'XwRQF':function(_0x3385b3,_0x55bf7a,_0x17df32){return _0x3385b3(_0x55bf7a,_0x17df32);},'otDTq':function(_0xaf403a,_0xfb94,_0xda3c4f){return _0xaf403a(_0xfb94,_0xda3c4f);},'PYMDS':function(_0x200f50,_0x5bbfb7,_0x494a65){return _0x200f50(_0x5bbfb7,_0x494a65);}},_0x4c00b9=(_0x17405d,_0x3568fc)=>Math[_0x3501b4(0x3ef,'eqN3')](Math[_0x3501b4(0x1a6,'uGe#')]()*(_0x3568fc-_0x17405d+0x1))+_0x17405d,_0x1f0c33=_0x169df5[_0x3501b4(0x246,'8*kB')](_0x4c00b9,0x258,0x2bc)+'.'+_0x169df5[_0x3501b4(0x36a,'l%X^')](_0x4c00b9,0x1,0x4)+'.'+_0x169df5['otDTq'](_0x4c00b9,0x1,0x5),_0x10cd0a=_0x4c00b9(0xc,0xf)+'.'+_0x169df5[_0x3501b4(0x221,'O#74')](_0x4c00b9,0x0,0x6)+'.'+_0x4c00b9(0x0,0x9),_0x3e19dd=_0x3501b4(0x3d1,'TGTV')+_0x10cd0a+_0x3501b4(0x24f,'$tBf')+_0x1f0c33+'\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148\x20MicroMessenger/7.0.20(0x16001422)\x20NetType/WIFI\x20Language/zh_CN';return _0x3e19dd;}function _0x1861f0(_0x29e238,_0x5501c5){const _0x5a15e6=_0x1f1e99,_0x4e50b3={'ZXrUJ':function(_0x2e75ba,_0x4bf039){return _0x2e75ba(_0x4bf039);},'tUuod':function(_0x4d152a,_0x4acf80){return _0x4d152a==_0x4acf80;},'lrSEl':function(_0x3e2070,_0xda1809){return _0x3e2070===_0xda1809;},'KSlxw':'POST','SoFrP':'box.dat','HfSlA':_0x5a15e6(0x20a,'uGe#'),'DPkiP':function(_0x912b0c,_0x51da33){return _0x912b0c!=_0x51da33;},'acwaz':_0x5a15e6(0x2d6,'@xNW'),'CJyKv':_0x5a15e6(0x237,'D%yI'),'oyGOG':_0x5a15e6(0x19a,'a!Dd'),'xqtpu':_0x5a15e6(0x27e,'qGJf'),'eVKTI':function(_0x221897,_0x4f276c){return _0x221897!=_0x4f276c;},'bPNsf':_0x5a15e6(0x23a,'AoS@'),'CWRSr':_0x5a15e6(0x364,'W*xB'),'IfnKq':_0x5a15e6(0x18a,'j5d%'),'osjhl':function(_0xc03b84,_0xe99a2d){return _0xc03b84===_0xe99a2d;},'tcTdO':function(_0x12e589,_0x2565bd){return _0x12e589===_0x2565bd;},'OcivX':function(_0x48d3d1,_0x5323c3){return _0x48d3d1===_0x5323c3;},'DDSDx':function(_0x48c92a,_0x293f70){return _0x48c92a===_0x293f70;},'VsGtt':'Stash','DtlxS':_0x5a15e6(0x1ee,'D%yI'),'BHlNt':function(_0x8c3df8,_0x4b671d){return _0x8c3df8*_0x4b671d;},'JXMBc':_0x5a15e6(0x1b3,'kHRT'),'aUnqY':_0x5a15e6(0x232,'D%yI'),'kOfaJ':function(_0x2df950,_0x31458a){return _0x2df950!==_0x31458a;},'phjzg':function(_0xb974,_0x2278ec){return _0xb974(_0x2278ec);},'OoufM':function(_0x2ccf1a,_0x197197){return _0x2ccf1a-_0x197197;},'icJjV':function(_0x5cb36c,_0x220880){return _0x5cb36c===_0x220880;},'BZypk':function(_0x1e398e,_0x1ff3ff){return _0x1e398e||_0x1ff3ff;},'vPFtS':'got','hTsta':_0x5a15e6(0x1d3,'qGJf'),'eQWrD':'set-cookie','sZbTQ':function(_0x1c1771,_0x3fcebd,_0x2a1f45,_0x111d99,_0x48503c){return _0x1c1771(_0x3fcebd,_0x2a1f45,_0x111d99,_0x48503c);},'wXhiP':function(_0x53e9b0,_0x265aad,_0x1360e6,_0x1d83e4){return _0x53e9b0(_0x265aad,_0x1360e6,_0x1d83e4);},'yXmQr':_0x5a15e6(0x1c6,'o9q3'),'afJER':_0x5a15e6(0x2f2,'MVUS'),'brflO':_0x5a15e6(0x30e,'])l0'),'ljEKu':function(_0x254e29,_0x41b4a1,_0x5b2269,_0x2c1c0b){return _0x254e29(_0x41b4a1,_0x5b2269,_0x2c1c0b);},'QByBD':_0x5a15e6(0x25e,'zjt@'),'FLqMD':_0x5a15e6(0x316,'Tqev'),'toZbP':function(_0x25ba20,_0x56c32f){return _0x25ba20(_0x56c32f);},'LbJtc':_0x5a15e6(0x3db,'gULG'),'EKpIg':function(_0x1ce89e,_0x346fe0){return _0x1ce89e+_0x346fe0;},'QwhUp':function(_0x49cee2,_0xa59670){return _0x49cee2-_0xa59670;},'jnPKY':function(_0x2d624c,_0x5d16d5){return _0x2d624c+_0x5d16d5;},'QxEpq':function(_0x578fc7,_0xe0513){return _0x578fc7+_0xe0513;},'DNPjS':function(_0x358f80,_0x441d61){return _0x358f80==_0x441d61;},'gsrXX':function(_0x5f3f86,_0x7ff6cf){return _0x5f3f86+_0x7ff6cf;},'nUdFC':function(_0x451ed6,_0x2a1a0b){return _0x451ed6!==_0x2a1a0b;},'BGHjt':function(_0x3d6e77,_0x26e8c7){return _0x3d6e77==_0x26e8c7;},'GHxGB':_0x5a15e6(0x26d,'VA9G'),'brQyM':function(_0x99bc02,_0x1f05c0){return _0x99bc02-_0x1f05c0;},'TfBng':'open-url','rmFio':'update-pasteboard','PVGrf':_0x5a15e6(0x1aa,'KPQ1'),'hLQJt':function(_0xd0f245,_0xb3b65a){return _0xd0f245>_0xb3b65a;},'hUtqF':'./sendNotify'};class _0x309f9d{constructor(_0x351f23){const _0x4af91b=_0x5a15e6;this[_0x4af91b(0x277,'gULG')]=_0x351f23;}[_0x5a15e6(0x233,'o&6X')](_0x26d8a6,_0x8501c7=_0x5a15e6(0x21a,'mA6L')){const _0x268432=_0x5a15e6,_0x2f7d8b={'QdbGd':function(_0x175d39,_0x5e71bd){const _0x591c50=_0x1971;return _0x4e50b3[_0x591c50(0x1b7,'jVVH')](_0x175d39,_0x5e71bd);}};_0x26d8a6=_0x4e50b3[_0x268432(0x380,'Tqev')](_0x268432(0x296,'GIP6'),typeof _0x26d8a6)?{'url':_0x26d8a6}:_0x26d8a6;let _0x47d08c=this[_0x268432(0x35e,'b7gV')];return _0x4e50b3[_0x268432(0x1f6,'Tqev')]('POST',_0x8501c7)&&(_0x47d08c=this[_0x268432(0x1ec,'b7gV')]),new Promise((_0x3f5b7e,_0x29d096)=>{const _0x43782d=_0x268432;_0x47d08c[_0x43782d(0x2e2,'fPA*')](this,_0x26d8a6,(_0x539301,_0x2c073d,_0x2cd675)=>{const _0x435e43=_0x43782d;_0x539301?_0x2f7d8b[_0x435e43(0x2f3,'[YtD')](_0x29d096,_0x539301):_0x2f7d8b['QdbGd'](_0x3f5b7e,_0x2c073d);});});}[_0x5a15e6(0x239,'VA9G')](_0x4f39ff){const _0x573792=_0x5a15e6;return this[_0x573792(0x2d3,'@xNW')][_0x573792(0x354,'z8x8')](this[_0x573792(0x322,'j5d%')],_0x4f39ff);}[_0x5a15e6(0x1d4,'O#74')](_0x51c5e2){const _0x1a46d4=_0x5a15e6;return this['send']['call'](this['env'],_0x51c5e2,_0x4e50b3[_0x1a46d4(0x1cd,'o9q3')]);}}return new class{constructor(_0x2b0255,_0x2dde37){const _0x525705=_0x5a15e6;this[_0x525705(0x39d,'mA6L')]=_0x2b0255,this[_0x525705(0x2e4,'8*kB')]=new _0x309f9d(this),this[_0x525705(0x1cf,'o&U)')]=null,this[_0x525705(0x300,'W*xB')]=_0x4e50b3['SoFrP'],this['logs']=[],this[_0x525705(0x1b1,'Tqev')]=!0x1,this[_0x525705(0x3a5,'wxuS')]=!0x1,this['logSeparator']='\x0a',this[_0x525705(0x34b,'wxuS')]=_0x4e50b3[_0x525705(0x25a,'XdGc')],this['startTime']=new Date()[_0x525705(0x370,'iYLS')](),Object[_0x525705(0x25d,'j5d%')](this,_0x2dde37),this['log']('','🔔'+this[_0x525705(0x379,'8*kB')]+',开始!');}[_0x5a15e6(0x31b,'UGUA')](){const _0x2fcc50=_0x5a15e6;return _0x4e50b3[_0x2fcc50(0x1e6,'@xNW')]('undefined',typeof $environment)&&$environment[_0x4e50b3[_0x2fcc50(0x27c,'ypmY')]]?_0x4e50b3[_0x2fcc50(0x3b5,'rC!2')]:_0x4e50b3[_0x2fcc50(0x2fb,'j5d%')]('undefined',typeof $environment)&&$environment[_0x2fcc50(0x2c7,'z8x8')]?_0x2fcc50(0x2c6,'fPA*'):_0x4e50b3['oyGOG']!=typeof module&&module[_0x2fcc50(0x2fc,'uT(k')]?_0x4e50b3[_0x2fcc50(0x2a5,'b7gV')]:_0x4e50b3[_0x2fcc50(0x397,'ypmY')](_0x2fcc50(0x382,'bjoy'),typeof $task)?_0x4e50b3[_0x2fcc50(0x30d,'gULG')]:_0x4e50b3[_0x2fcc50(0x3e4,'aY2#')]!=typeof $loon?_0x4e50b3[_0x2fcc50(0x3f0,'MMXp')]:_0x4e50b3['DPkiP'](_0x4e50b3['oyGOG'],typeof $rocket)?_0x4e50b3[_0x2fcc50(0x17d,'iYLS')]:void 0x0;}['isNode'](){const _0x52a9ae=_0x5a15e6;return _0x4e50b3['osjhl'](_0x4e50b3[_0x52a9ae(0x1a7,'a!Dd')],this['getEnv']());}[_0x5a15e6(0x195,'GIP6')](){const _0x29e2ee=_0x5a15e6;return _0x4e50b3[_0x29e2ee(0x30d,'gULG')]===this['getEnv']();}[_0x5a15e6(0x1a1,'J$Q%')](){const _0x19125c=_0x5a15e6;return _0x4e50b3[_0x19125c(0x295,'qbU[')](_0x4e50b3[_0x19125c(0x2c4,'aY2#')],this['getEnv']());}['isLoon'](){const _0x2426db=_0x5a15e6;return _0x4e50b3[_0x2426db(0x308,'MVUS')](_0x4e50b3['CWRSr'],this['getEnv']());}[_0x5a15e6(0x289,'jVVH')](){const _0x315430=_0x5a15e6;return _0x4e50b3[_0x315430(0x342,'mA6L')](_0x4e50b3[_0x315430(0x1ed,'z8x8')],this['getEnv']());}[_0x5a15e6(0x29d,'AoS@')](){const _0x39ef85=_0x5a15e6;return _0x4e50b3[_0x39ef85(0x255,'bjoy')](_0x4e50b3[_0x39ef85(0x2ef,'o&6X')],this[_0x39ef85(0x31b,'UGUA')]());}[_0x5a15e6(0x331,'UGUA')](_0x4a6fa0,_0x211eb0=null){const _0x30c7fa=_0x5a15e6;try{return JSON[_0x30c7fa(0x23d,'yoJp')](_0x4a6fa0);}catch{return _0x211eb0;}}[_0x5a15e6(0x1ba,'j5d%')](_0x5cfb21,_0x44ff9a=null){try{return JSON['stringify'](_0x5cfb21);}catch{return _0x44ff9a;}}[_0x5a15e6(0x298,'a!Dd')](_0x30f666,_0x5b5abf){const _0xca22b1=_0x5a15e6;let _0x19845a=_0x5b5abf;const _0x32a9e7=this[_0xca22b1(0x2e1,'bjoy')](_0x30f666);if(_0x32a9e7)try{_0x19845a=JSON[_0xca22b1(0x374,'W*xB')](this['getdata'](_0x30f666));}catch{}return _0x19845a;}['setjson'](_0x43713e,_0x4cefae){const _0x3133cf=_0x5a15e6;try{return this[_0x3133cf(0x228,'fPA*')](JSON[_0x3133cf(0x36e,'[YtD')](_0x43713e),_0x4cefae);}catch{return!0x1;}}[_0x5a15e6(0x2cd,'iYLS')](_0x186f1c){return new Promise(_0x407cdd=>{const _0x371062=_0x1971;this[_0x371062(0x36f,'[YtD')]({'url':_0x186f1c},(_0x53ba81,_0x5578e3,_0x1248d8)=>_0x407cdd(_0x1248d8));});}[_0x5a15e6(0x2bb,'XdGc')](_0x2faa54,_0xf40ccf){const _0x2845b5=_0x5a15e6;return new Promise(_0x2dbf50=>{const _0x5d836b=_0x1971;let _0x2d9e4b=this[_0x5d836b(0x3ad,'MVUS')](_0x4e50b3[_0x5d836b(0x19b,'$tBf')]);_0x2d9e4b=_0x2d9e4b?_0x2d9e4b[_0x5d836b(0x385,'W*xB')](/\n/g,'')[_0x5d836b(0x293,'fPA*')]():_0x2d9e4b;let _0xd41ff7=this[_0x5d836b(0x1a3,'AoS@')]('@chavy_boxjs_userCfgs.httpapi_timeout');_0xd41ff7=_0xd41ff7?_0x4e50b3[_0x5d836b(0x1f7,'MMXp')](0x1,_0xd41ff7):0x14,_0xd41ff7=_0xf40ccf&&_0xf40ccf[_0x5d836b(0x252,'[YtD')]?_0xf40ccf[_0x5d836b(0x197,'UGUA')]:_0xd41ff7;const [_0x9d8a13,_0x45baef]=_0x2d9e4b[_0x5d836b(0x245,'P^ND')]('@'),_0x2c9464={'url':_0x5d836b(0x2cc,'j5d%')+_0x45baef+_0x5d836b(0x1be,'zjt@'),'body':{'script_text':_0x2faa54,'mock_type':_0x4e50b3[_0x5d836b(0x33a,'])l0')],'timeout':_0xd41ff7},'headers':{'X-Key':_0x9d8a13,'Accept':_0x5d836b(0x1e9,'z8x8')},'timeout':_0xd41ff7};this[_0x5d836b(0x22d,'uT(k')](_0x2c9464,(_0x50a89c,_0x4bfd2b,_0x37e21b)=>_0x2dbf50(_0x37e21b));})['catch'](_0x476ac9=>this[_0x2845b5(0x20e,'J$Q%')](_0x476ac9));}['loaddata'](){const _0x92c0b6=_0x5a15e6;if(!this['isNode']())return{};{this['fs']=this['fs']?this['fs']:require('fs'),this[_0x92c0b6(0x201,'o&U)')]=this[_0x92c0b6(0x1d7,'KPQ1')]?this['path']:_0x4e50b3['ZXrUJ'](require,_0x4e50b3[_0x92c0b6(0x265,'l%X^')]);const _0x3e9453=this[_0x92c0b6(0x32b,'yoJp')]['resolve'](this[_0x92c0b6(0x256,'jVVH')]),_0x2c1d14=this[_0x92c0b6(0x1b0,'rC!2')][_0x92c0b6(0x2b8,'J$Q%')](process['cwd'](),this['dataFile']),_0xdc672f=this['fs']['existsSync'](_0x3e9453),_0x4a8262=!_0xdc672f&&this['fs'][_0x92c0b6(0x2c0,'gULG')](_0x2c1d14);if(!_0xdc672f&&!_0x4a8262)return{};{const _0x19b2a7=_0xdc672f?_0x3e9453:_0x2c1d14;try{return JSON[_0x92c0b6(0x36d,'qGJf')](this['fs']['readFileSync'](_0x19b2a7));}catch(_0x14493c){return{};}}}}['writedata'](){const _0x25d596=_0x5a15e6;if(this[_0x25d596(0x3ca,'bjoy')]()){this['fs']=this['fs']?this['fs']:_0x4e50b3[_0x25d596(0x3ce,'aY2#')](require,'fs'),this['path']=this[_0x25d596(0x384,'l%X^')]?this[_0x25d596(0x28a,'VA9G')]:_0x4e50b3[_0x25d596(0x3a8,'[YtD')](require,_0x4e50b3[_0x25d596(0x18d,'uT(k')]);const _0x39a746=this['path'][_0x25d596(0x2d4,'BdDc')](this[_0x25d596(0x1f9,'fPA*')]),_0x4cace7=this[_0x25d596(0x34c,'o&6X')][_0x25d596(0x330,'b7gV')](process['cwd'](),this[_0x25d596(0x2e6,'])l0')]),_0x585dfb=this['fs']['existsSync'](_0x39a746),_0x4e9e7b=!_0x585dfb&&this['fs'][_0x25d596(0x353,'o9q3')](_0x4cace7),_0x37ecf2=JSON['stringify'](this[_0x25d596(0x2b4,'UGUA')]);_0x585dfb?this['fs']['writeFileSync'](_0x39a746,_0x37ecf2):_0x4e9e7b?this['fs'][_0x25d596(0x37e,'fPA*')](_0x4cace7,_0x37ecf2):this['fs']['writeFileSync'](_0x39a746,_0x37ecf2);}}[_0x5a15e6(0x2c3,'$tBf')](_0xb8a14d,_0x31f30f,_0x3c1521){const _0xef5947=_0x5a15e6,_0xfa709d=_0x31f30f[_0xef5947(0x2f9,'GIP6')](/\[(\d+)\]/g,_0xef5947(0x3b2,'uGe#'))['split']('.');let _0x28ccbb=_0xb8a14d;for(const _0x1bde25 of _0xfa709d)if(_0x28ccbb=_0x4e50b3[_0xef5947(0x18b,'o&U)')](Object,_0x28ccbb)[_0x1bde25],_0x4e50b3[_0xef5947(0x180,'BdDc')](void 0x0,_0x28ccbb))return _0x3c1521;return _0x28ccbb;}[_0x5a15e6(0x204,'BdDc')](_0x2f62d3,_0x5f1f0f,_0x4a3163){const _0x51101e=_0x5a15e6;return _0x4e50b3[_0x51101e(0x32d,'bjoy')](_0x4e50b3[_0x51101e(0x3cf,'8*kB')](Object,_0x2f62d3),_0x2f62d3)?_0x2f62d3:(Array['isArray'](_0x5f1f0f)||(_0x5f1f0f=_0x5f1f0f[_0x51101e(0x1f1,'bjoy')]()[_0x51101e(0x1ef,'zl![')](/[^.[\]]+/g)||[]),_0x5f1f0f['slice'](0x0,-0x1)['reduce']((_0x19fca2,_0x4688cf,_0xc1e7f)=>Object(_0x19fca2[_0x4688cf])===_0x19fca2[_0x4688cf]?_0x19fca2[_0x4688cf]:_0x19fca2[_0x4688cf]=Math[_0x51101e(0x28c,'qGJf')](_0x5f1f0f[_0xc1e7f+0x1])>>0x0==+_0x5f1f0f[_0xc1e7f+0x1]?[]:{},_0x2f62d3)[_0x5f1f0f[_0x4e50b3[_0x51101e(0x360,'qbU[')](_0x5f1f0f[_0x51101e(0x240,'GIP6')],0x1)]]=_0x4a3163,_0x2f62d3);}[_0x5a15e6(0x2cb,'])l0')](_0xaf7d6a){const _0x40fb84=_0x5a15e6;let _0xbef94c=this[_0x40fb84(0x3b9,'qbU[')](_0xaf7d6a);if(/^@/[_0x40fb84(0x267,'yoJp')](_0xaf7d6a)){const [,_0x5720a1,_0x4e2e40]=/^@(.*?)\.(.*?)$/[_0x40fb84(0x315,'uT(k')](_0xaf7d6a),_0x5b8e4e=_0x5720a1?this[_0x40fb84(0x2a6,'jl07')](_0x5720a1):'';if(_0x5b8e4e)try{const _0x406e45=JSON[_0x40fb84(0x23e,'@xNW')](_0x5b8e4e);_0xbef94c=_0x406e45?this[_0x40fb84(0x3fd,'a!Dd')](_0x406e45,_0x4e2e40,''):_0xbef94c;}catch(_0x1b1ede){_0xbef94c='';}}return _0xbef94c;}['setdata'](_0x38dab2,_0x49e0c8){const _0x2be7d7=_0x5a15e6;let _0x39a03d=!0x1;if(/^@/['test'](_0x49e0c8)){const [,_0x6e8db3,_0x3201fe]=/^@(.*?)\.(.*?)$/[_0x2be7d7(0x3e5,'a!Dd')](_0x49e0c8),_0x561288=this['getval'](_0x6e8db3),_0x393a61=_0x6e8db3?_0x4e50b3[_0x2be7d7(0x355,'GIP6')](_0x2be7d7(0x3fa,'uGe#'),_0x561288)?null:_0x4e50b3['BZypk'](_0x561288,'{}'):'{}';try{const _0x235f36=JSON[_0x2be7d7(0x242,'8*kB')](_0x393a61);this[_0x2be7d7(0x3ae,'b7gV')](_0x235f36,_0x3201fe,_0x38dab2),_0x39a03d=this['setval'](JSON[_0x2be7d7(0x284,'@xNW')](_0x235f36),_0x6e8db3);}catch(_0x42cbb8){const _0x40703e={};this[_0x2be7d7(0x234,'mA6L')](_0x40703e,_0x3201fe,_0x38dab2),_0x39a03d=this['setval'](JSON[_0x2be7d7(0x1d0,'z8x8')](_0x40703e),_0x6e8db3);}}else _0x39a03d=this['setval'](_0x38dab2,_0x49e0c8);return _0x39a03d;}['getval'](_0x395200){const _0x40f5de=_0x5a15e6;switch(this[_0x40f5de(0x222,'Tqev')]()){case _0x4e50b3['CJyKv']:case _0x4e50b3[_0x40f5de(0x181,'zl![')]:case _0x40f5de(0x334,'jl07'):case _0x40f5de(0x211,'qbU['):return $persistentStore['read'](_0x395200);case _0x40f5de(0x2dc,'b7gV'):return $prefs[_0x40f5de(0x2dd,'AoS@')](_0x395200);case _0x4e50b3[_0x40f5de(0x368,'8*kB')]:return this[_0x40f5de(0x2ff,'zl![')]=this[_0x40f5de(0x2fa,'eqN3')](),this[_0x40f5de(0x223,'aY2#')][_0x395200];default:return this['data']&&this['data'][_0x395200]||null;}}[_0x5a15e6(0x1ea,'j5d%')](_0x3db810,_0x216dc8){const _0x2873a7=_0x5a15e6;switch(this[_0x2873a7(0x327,'aY2#')]()){case _0x4e50b3['CJyKv']:case _0x2873a7(0x381,'GIP6'):case _0x4e50b3['VsGtt']:case _0x4e50b3[_0x2873a7(0x3bf,'fPA*')]:return $persistentStore[_0x2873a7(0x28b,'MVUS')](_0x3db810,_0x216dc8);case _0x2873a7(0x24b,'eqN3'):return $prefs['setValueForKey'](_0x3db810,_0x216dc8);case _0x4e50b3[_0x2873a7(0x19c,'GIP6')]:return this['data']=this[_0x2873a7(0x2cf,'])l0')](),this[_0x2873a7(0x22b,'uGe#')][_0x216dc8]=_0x3db810,this[_0x2873a7(0x269,'fPA*')](),!0x0;default:return this[_0x2873a7(0x17c,'rC!2')]&&this[_0x2873a7(0x22c,'O#74')][_0x216dc8]||null;}}[_0x5a15e6(0x35a,'uT(k')](_0x4efd5d){const _0x329c2c=_0x5a15e6;this['got']=this['got']?this['got']:_0x4e50b3[_0x329c2c(0x390,'VA9G')](require,_0x4e50b3['vPFtS']),this[_0x329c2c(0x39c,'Tqev')]=this['cktough']?this[_0x329c2c(0x39c,'Tqev')]:require(_0x4e50b3[_0x329c2c(0x3e2,'z8x8')]),this[_0x329c2c(0x2e3,'b7gV')]=this[_0x329c2c(0x17f,'z8x8')]?this[_0x329c2c(0x2e3,'b7gV')]:new this[(_0x329c2c(0x2ca,'O#74'))][(_0x329c2c(0x1e5,'z8x8'))](),_0x4efd5d&&(_0x4efd5d[_0x329c2c(0x287,'aY2#')]=_0x4efd5d[_0x329c2c(0x2e0,'TGTV')]?_0x4efd5d['headers']:{},_0x4e50b3[_0x329c2c(0x1df,'W*xB')](void 0x0,_0x4efd5d[_0x329c2c(0x3ed,'KPQ1')]['Cookie'])&&void 0x0===_0x4efd5d[_0x329c2c(0x3ba,'Tqev')]&&(_0x4efd5d[_0x329c2c(0x1ff,'kHRT')]=this[_0x329c2c(0x2a8,'Tqev')]));}[_0x5a15e6(0x27b,'uT(k')](_0x5108c7,_0x4e5834=()=>{}){const _0x20d43c=_0x5a15e6,_0x17f2bb={'qHiwT':function(_0x44951c,_0x1a4f74,_0x52e251,_0x814a1b){return _0x44951c(_0x1a4f74,_0x52e251,_0x814a1b);},'cUrwg':function(_0x508c0e,_0xbc8e65,_0x4e2bfe,_0x2aee72,_0x5705f6){const _0x5a6135=_0x1971;return _0x4e50b3[_0x5a6135(0x3f6,'J$Q%')](_0x508c0e,_0xbc8e65,_0x4e2bfe,_0x2aee72,_0x5705f6);},'hrokK':function(_0x49322f,_0x77ef6,_0x364017,_0x2971c9){const _0x741095=_0x1971;return _0x4e50b3[_0x741095(0x376,'j5d%')](_0x49322f,_0x77ef6,_0x364017,_0x2971c9);}};switch(_0x5108c7[_0x20d43c(0x2a0,'Tqev')]&&(delete _0x5108c7[_0x20d43c(0x38f,'kHRT')][_0x4e50b3[_0x20d43c(0x206,'8*kB')]],delete _0x5108c7[_0x20d43c(0x1bf,'zl![')][_0x4e50b3[_0x20d43c(0x285,'yoJp')]],delete _0x5108c7[_0x20d43c(0x3e0,'eqN3')][_0x20d43c(0x356,'zjt@')],delete _0x5108c7[_0x20d43c(0x357,'UGUA')][_0x20d43c(0x290,'wxuS')]),this['getEnv']()){case'Surge':case _0x4e50b3['CWRSr']:case'Stash':case _0x4e50b3['IfnKq']:default:this['isSurge']()&&this[_0x20d43c(0x2de,'o&U)')]&&(_0x5108c7['headers']=_0x5108c7[_0x20d43c(0x3ea,'l%X^')]||{},Object['assign'](_0x5108c7[_0x20d43c(0x2da,'AoS@')],{'X-Surge-Skip-Scripting':!0x1})),$httpClient[_0x20d43c(0x194,'MVUS')](_0x5108c7,(_0xfd9320,_0x591271,_0x390615)=>{const _0x3bec74=_0x20d43c;!_0xfd9320&&_0x591271&&(_0x591271['body']=_0x390615,_0x591271[_0x3bec74(0x3ff,'KPQ1')]=_0x591271['status']?_0x591271[_0x3bec74(0x29b,'D%yI')]:_0x591271['statusCode'],_0x591271[_0x3bec74(0x1fe,'zjt@')]=_0x591271[_0x3bec74(0x3a3,'D%yI')]),_0x17f2bb[_0x3bec74(0x1dc,'zjt@')](_0x4e5834,_0xfd9320,_0x591271,_0x390615);});break;case _0x20d43c(0x389,'P^ND'):this[_0x20d43c(0x350,'iYLS')]&&(_0x5108c7['opts']=_0x5108c7[_0x20d43c(0x304,'bjoy')]||{},Object['assign'](_0x5108c7['opts'],{'hints':!0x1})),$task[_0x20d43c(0x2d0,'iYLS')](_0x5108c7)[_0x20d43c(0x3d9,'jVVH')](_0x101331=>{const {statusCode:_0x1e5d37,statusCode:_0x18b576,headers:_0x4eff9b,body:_0x5e11a9,bodyBytes:_0x124b6b}=_0x101331;_0x17f2bb['cUrwg'](_0x4e5834,null,{'status':_0x1e5d37,'statusCode':_0x18b576,'headers':_0x4eff9b,'body':_0x5e11a9,'bodyBytes':_0x124b6b},_0x5e11a9,_0x124b6b);},_0x492146=>_0x4e5834(_0x492146&&_0x492146['error']||_0x20d43c(0x27a,'J$Q%')));break;case _0x4e50b3[_0x20d43c(0x25f,'qbU[')]:let _0x4dafcf=require(_0x20d43c(0x200,'yoJp'));this[_0x20d43c(0x28f,'zjt@')](_0x5108c7),this[_0x20d43c(0x33d,'mA6L')](_0x5108c7)['on'](_0x4e50b3[_0x20d43c(0x286,'o&U)')],(_0x175f70,_0x304b7b)=>{const _0x36be1c=_0x20d43c;try{if(_0x175f70['headers'][_0x4e50b3[_0x36be1c(0x22a,'O#74')]]){const _0x1ad987=_0x175f70[_0x36be1c(0x198,'fPA*')][_0x4e50b3[_0x36be1c(0x1a8,'uT(k')]][_0x36be1c(0x369,'TGTV')](this[_0x36be1c(0x35f,'rC!2')][_0x36be1c(0x1e7,'kHRT')][_0x36be1c(0x2f4,'KPQ1')])[_0x36be1c(0x248,'fPA*')]();_0x1ad987&&this[_0x36be1c(0x38b,'o&U)')]['setCookieSync'](_0x1ad987,null),_0x304b7b['cookieJar']=this[_0x36be1c(0x314,'P^ND')];}}catch(_0x379c65){this['logErr'](_0x379c65);}})['then'](_0x27c7da=>{const _0x1abd71=_0x20d43c,{statusCode:_0x514b89,statusCode:_0x3841d3,headers:_0x303c02,rawBody:_0x14eaff}=_0x27c7da,_0x446903=_0x4dafcf[_0x1abd71(0x38c,'D%yI')](_0x14eaff,this[_0x1abd71(0x188,'uGe#')]);_0x17f2bb[_0x1abd71(0x1fb,'wxuS')](_0x4e5834,null,{'status':_0x514b89,'statusCode':_0x3841d3,'headers':_0x303c02,'rawBody':_0x14eaff,'body':_0x446903},_0x446903);},_0x1c21a9=>{const _0x14c865=_0x20d43c,{message:_0x8a7ca3,response:_0x214b34}=_0x1c21a9;_0x17f2bb[_0x14c865(0x1e2,'o&6X')](_0x4e5834,_0x8a7ca3,_0x214b34,_0x214b34&&_0x4dafcf['decode'](_0x214b34[_0x14c865(0x28d,'[YtD')],this[_0x14c865(0x1d1,'TGTV')]));});}}['post'](_0x2b78fd,_0x2c772e=()=>{}){const _0x49e63f=_0x5a15e6,_0x19bfe3={'uKlRr':function(_0x31a8c5,_0x5e0fea,_0x30dad5,_0x277b03,_0x2aff8d){const _0x4763d1=_0x1971;return _0x4e50b3[_0x4763d1(0x2b3,'MMXp')](_0x31a8c5,_0x5e0fea,_0x30dad5,_0x277b03,_0x2aff8d);},'PUyur':function(_0x59f3f3,_0x4cbe28,_0x5c9b04,_0x13738a){const _0x25bafe=_0x1971;return _0x4e50b3[_0x25bafe(0x182,'eqN3')](_0x59f3f3,_0x4cbe28,_0x5c9b04,_0x13738a);}},_0x341612=_0x2b78fd[_0x49e63f(0x1e0,'jl07')]?_0x2b78fd[_0x49e63f(0x213,'])l0')][_0x49e63f(0x328,'KPQ1')]():_0x4e50b3[_0x49e63f(0x339,'BdDc')];switch(_0x2b78fd[_0x49e63f(0x1c2,'cKwh')]&&_0x2b78fd['headers']&&!_0x2b78fd[_0x49e63f(0x1e4,'MVUS')]['Content-Type']&&!_0x2b78fd[_0x49e63f(0x253,'rC!2')][_0x49e63f(0x20d,'jl07')]&&(_0x2b78fd[_0x49e63f(0x1ca,'W*xB')][_0x4e50b3[_0x49e63f(0x2b7,'GIP6')]]=_0x49e63f(0x29e,'VA9G')),_0x2b78fd['headers']&&(delete _0x2b78fd[_0x49e63f(0x249,'j5d%')][_0x49e63f(0x358,'XdGc')],delete _0x2b78fd['headers']['content-length']),this[_0x49e63f(0x3f1,'bjoy')]()){case _0x4e50b3['CJyKv']:case _0x4e50b3[_0x49e63f(0x215,'z8x8')]:case'Stash':case _0x49e63f(0x186,'a!Dd'):default:this['isSurge']()&&this[_0x49e63f(0x2c8,'aY2#')]&&(_0x2b78fd[_0x49e63f(0x3ed,'KPQ1')]=_0x2b78fd[_0x49e63f(0x377,'cKwh')]||{},Object['assign'](_0x2b78fd[_0x49e63f(0x36b,'jVVH')],{'X-Surge-Skip-Scripting':!0x1})),$httpClient[_0x341612](_0x2b78fd,(_0xfd7075,_0x31d575,_0x2d288c)=>{const _0x14d994=_0x49e63f;!_0xfd7075&&_0x31d575&&(_0x31d575[_0x14d994(0x227,'mA6L')]=_0x2d288c,_0x31d575['statusCode']=_0x31d575['status']?_0x31d575[_0x14d994(0x18c,'P^ND')]:_0x31d575[_0x14d994(0x1d8,'cKwh')],_0x31d575[_0x14d994(0x18c,'P^ND')]=_0x31d575[_0x14d994(0x2f5,'@xNW')]),_0x4e50b3[_0x14d994(0x321,'O#74')](_0x2c772e,_0xfd7075,_0x31d575,_0x2d288c);});break;case _0x4e50b3[_0x49e63f(0x401,'ypmY')]:_0x2b78fd['method']=_0x341612,this[_0x49e63f(0x1b6,'l%X^')]&&(_0x2b78fd[_0x49e63f(0x3f3,'rC!2')]=_0x2b78fd[_0x49e63f(0x21c,'Tqev')]||{},Object['assign'](_0x2b78fd[_0x49e63f(0x371,'yoJp')],{'hints':!0x1})),$task['fetch'](_0x2b78fd)['then'](_0x4cbbb2=>{const {statusCode:_0x346f5d,statusCode:_0x551126,headers:_0x57985c,body:_0x37fa2c,bodyBytes:_0xf62e39}=_0x4cbbb2;_0x19bfe3['uKlRr'](_0x2c772e,null,{'status':_0x346f5d,'statusCode':_0x551126,'headers':_0x57985c,'body':_0x37fa2c,'bodyBytes':_0xf62e39},_0x37fa2c,_0xf62e39);},_0x5763d1=>_0x2c772e(_0x5763d1&&_0x5763d1[_0x49e63f(0x38a,'AoS@')]||_0x49e63f(0x1a2,'kHRT')));break;case _0x49e63f(0x341,'W*xB'):let _0x11b6c0=_0x4e50b3[_0x49e63f(0x400,'XdGc')](require,_0x4e50b3[_0x49e63f(0x199,'eqN3')]);this['initGotEnv'](_0x2b78fd);const {url:_0x1eafe3,..._0x32a168}=_0x2b78fd;this[_0x49e63f(0x34e,'jVVH')][_0x341612](_0x1eafe3,_0x32a168)['then'](_0x3a0ba8=>{const _0x7dc9bc=_0x49e63f,{statusCode:_0x26e409,statusCode:_0x92a873,headers:_0x32ec8f,rawBody:_0x59270a}=_0x3a0ba8,_0x424995=_0x11b6c0[_0x7dc9bc(0x1c5,'AoS@')](_0x59270a,this['encoding']);_0x4e50b3[_0x7dc9bc(0x1b5,'[YtD')](_0x2c772e,null,{'status':_0x26e409,'statusCode':_0x92a873,'headers':_0x32ec8f,'rawBody':_0x59270a,'body':_0x424995},_0x424995);},_0x3ba213=>{const _0x197a1d=_0x49e63f,{message:_0x192558,response:_0x32dc03}=_0x3ba213;_0x19bfe3[_0x197a1d(0x1f8,'KPQ1')](_0x2c772e,_0x192558,_0x32dc03,_0x32dc03&&_0x11b6c0['decode'](_0x32dc03[_0x197a1d(0x2ac,'Tqev')],this[_0x197a1d(0x352,'8*kB')]));});}}[_0x5a15e6(0x1bc,'rC!2')](_0x2148dd,_0x4517b9=null){const _0x2ced98=_0x5a15e6,_0x3858c0=_0x4517b9?new Date(_0x4517b9):new Date();let _0x465d0a={'M+':_0x4e50b3[_0x2ced98(0x3a9,'mA6L')](_0x3858c0['getMonth'](),0x1),'d+':_0x3858c0[_0x2ced98(0x3cc,'$tBf')](),'H+':_0x3858c0['getHours'](),'m+':_0x3858c0[_0x2ced98(0x2ba,'P^ND')](),'s+':_0x3858c0[_0x2ced98(0x3be,'uGe#')](),'q+':Math[_0x2ced98(0x2f6,'o9q3')]((_0x3858c0[_0x2ced98(0x29f,'KPQ1')]()+0x3)/0x3),'S':_0x3858c0[_0x2ced98(0x3d2,'j5d%')]()};/(y+)/[_0x2ced98(0x183,'XdGc')](_0x2148dd)&&(_0x2148dd=_0x2148dd['replace'](RegExp['$1'],_0x4e50b3[_0x2ced98(0x217,'gULG')](_0x3858c0[_0x2ced98(0x1a5,'AoS@')](),'')[_0x2ced98(0x18f,'[YtD')](_0x4e50b3['QwhUp'](0x4,RegExp['$1'][_0x2ced98(0x3df,'@xNW')]))));for(let _0x1d43d8 in _0x465d0a)new RegExp(_0x4e50b3[_0x2ced98(0x348,'kHRT')](_0x4e50b3[_0x2ced98(0x336,'iYLS')]('(',_0x1d43d8),')'))[_0x2ced98(0x2fe,'a!Dd')](_0x2148dd)&&(_0x2148dd=_0x2148dd[_0x2ced98(0x2b1,'UGUA')](RegExp['$1'],_0x4e50b3[_0x2ced98(0x32f,'MVUS')](0x1,RegExp['$1'][_0x2ced98(0x309,'uT(k')])?_0x465d0a[_0x1d43d8]:_0x4e50b3[_0x2ced98(0x33c,'fPA*')]('00',_0x465d0a[_0x1d43d8])[_0x2ced98(0x2a3,'AoS@')](_0x4e50b3['gsrXX']('',_0x465d0a[_0x1d43d8])[_0x2ced98(0x2df,'TGTV')])));return _0x2148dd;}['queryStr'](_0x1fcfb7){const _0x5345ff=_0x5a15e6;let _0xb515c='';for(const _0x258227 in _0x1fcfb7){let _0x3a0510=_0x1fcfb7[_0x258227];_0x4e50b3[_0x5345ff(0x28e,'cKwh')](null,_0x3a0510)&&_0x4e50b3[_0x5345ff(0x30c,'zjt@')]('',_0x3a0510)&&(_0x4e50b3[_0x5345ff(0x1e1,'bjoy')](_0x4e50b3['GHxGB'],typeof _0x3a0510)&&(_0x3a0510=JSON[_0x5345ff(0x3d7,'zjt@')](_0x3a0510)),_0xb515c+=_0x258227+'='+_0x3a0510+'&');}return _0xb515c=_0xb515c['substring'](0x0,_0x4e50b3['brQyM'](_0xb515c['length'],0x1)),_0xb515c;}[_0x5a15e6(0x196,'bjoy')](_0x504883=_0x29e238,_0x5a68da='',_0x465428='',_0x10dae2){const _0x367ab8=_0x5a15e6,_0x40ab3c={'mhbLr':_0x367ab8(0x3ec,'o&6X'),'MTJXu':_0x4e50b3['CJyKv'],'FaHfK':_0x4e50b3['VsGtt'],'tBCRZ':_0x4e50b3['CWRSr'],'oyTpE':_0x4e50b3[_0x367ab8(0x2d9,'qbU[')],'wHEDa':_0x4e50b3[_0x367ab8(0x179,'AoS@')],'GTwwz':_0x4e50b3['IfnKq'],'ixBbX':_0x4e50b3[_0x367ab8(0x378,'KPQ1')],'kMQwK':_0x367ab8(0x1a9,'l%X^'),'rBEko':_0x4e50b3[_0x367ab8(0x241,'VA9G')]},_0x391b3a=_0x551980=>{const _0x561721=_0x367ab8;switch(typeof _0x551980){case void 0x0:return _0x551980;case _0x40ab3c['mhbLr']:switch(this['getEnv']()){case _0x40ab3c['MTJXu']:case _0x40ab3c[_0x561721(0x37b,'yoJp')]:default:return{'url':_0x551980};case _0x40ab3c['tBCRZ']:case _0x561721(0x383,'o&6X'):return _0x551980;case _0x40ab3c['oyTpE']:return{'open-url':_0x551980};case _0x40ab3c[_0x561721(0x3c4,'VA9G')]:return;}case _0x561721(0x3f7,'b7gV'):switch(this['getEnv']()){case _0x561721(0x340,'MMXp'):case _0x40ab3c['FaHfK']:case _0x40ab3c[_0x561721(0x224,'D%yI')]:default:{let _0x1b1d61=_0x551980[_0x561721(0x18e,'W*xB')]||_0x551980[_0x561721(0x3ac,'ypmY')]||_0x551980[_0x40ab3c['ixBbX']];return{'url':_0x1b1d61};}case _0x561721(0x31c,'VA9G'):{let _0x3eb433=_0x551980['openUrl']||_0x551980['url']||_0x551980[_0x40ab3c[_0x561721(0x3d3,'qbU[')]],_0x34281c=_0x551980['mediaUrl']||_0x551980[_0x40ab3c[_0x561721(0x3d6,'VA9G')]];return{'openUrl':_0x3eb433,'mediaUrl':_0x34281c};}case _0x561721(0x3e6,'qbU['):{let _0x502142=_0x551980[_0x40ab3c[_0x561721(0x243,'j5d%')]]||_0x551980[_0x561721(0x24c,'iYLS')]||_0x551980['openUrl'],_0x42f451=_0x551980[_0x561721(0x1bd,'XdGc')]||_0x551980[_0x561721(0x2bf,'W*xB')],_0x10a575=_0x551980[_0x40ab3c[_0x561721(0x325,'yoJp')]]||_0x551980[_0x561721(0x307,'j5d%')];return{'open-url':_0x502142,'media-url':_0x42f451,'update-pasteboard':_0x10a575};}case _0x40ab3c['wHEDa']:return;}default:return;}};if(!this['isMute'])switch(this[_0x367ab8(0x1f5,'@xNW')]()){case _0x367ab8(0x33b,'z8x8'):case _0x4e50b3[_0x367ab8(0x375,'j5d%')]:case _0x4e50b3[_0x367ab8(0x17b,'J$Q%')]:case'Shadowrocket':default:$notification['post'](_0x504883,_0x5a68da,_0x465428,_0x4e50b3[_0x367ab8(0x2d1,'o&U)')](_0x391b3a,_0x10dae2));break;case _0x4e50b3[_0x367ab8(0x303,'])l0')]:$notify(_0x504883,_0x5a68da,_0x465428,_0x4e50b3[_0x367ab8(0x2c2,'J$Q%')](_0x391b3a,_0x10dae2));break;case _0x4e50b3[_0x367ab8(0x187,'W*xB')]:}if(!this[_0x367ab8(0x2f1,'D%yI')]){let _0x259ab4=['',_0x4e50b3[_0x367ab8(0x386,'GIP6')]];_0x259ab4[_0x367ab8(0x2bd,'kHRT')](_0x504883),_0x5a68da&&_0x259ab4['push'](_0x5a68da),_0x465428&&_0x259ab4[_0x367ab8(0x22e,'MMXp')](_0x465428),console['log'](_0x259ab4['join']('\x0a')),this['logs']=this[_0x367ab8(0x2b9,'BdDc')][_0x367ab8(0x2a2,'mA6L')](_0x259ab4);}}[_0x5a15e6(0x3a6,'KPQ1')](..._0x1e1207){const _0x1f2b81=_0x5a15e6;_0x1e1207[_0x1f2b81(0x37a,'l%X^')]>0x0&&(this[_0x1f2b81(0x359,'ypmY')]=[...this[_0x1f2b81(0x23b,'qbU[')],..._0x1e1207]),console[_0x1f2b81(0x1c4,'[YtD')](_0x1e1207[_0x1f2b81(0x2e9,'j5d%')](this[_0x1f2b81(0x3c8,'UGUA')]));}[_0x5a15e6(0x3fb,'mA6L')](_0x2a4d91,_0x1cb401){const _0x4093ed=_0x5a15e6;switch(this[_0x4093ed(0x26b,'8*kB')]()){case _0x4e50b3['CJyKv']:case _0x4093ed(0x216,'zjt@'):case _0x4e50b3['VsGtt']:case _0x4e50b3[_0x4093ed(0x387,'MVUS')]:case _0x4093ed(0x1e3,'ypmY'):default:this[_0x4093ed(0x398,'zl![')]('','❗️'+this[_0x4093ed(0x3f4,'GIP6')]+_0x4093ed(0x229,'z8x8'),_0x2a4d91);break;case _0x4093ed(0x27e,'qGJf'):this[_0x4093ed(0x272,'jl07')]('','❗️'+this['name']+',错误!',_0x2a4d91[_0x4093ed(0x271,'8*kB')]);}}[_0x5a15e6(0x2be,'o9q3')](_0x4840ed){return new Promise(_0x106cd1=>setTimeout(_0x106cd1,_0x4840ed));}[_0x5a15e6(0x317,'qGJf')](_0x34020d){const _0x22ef33=_0x5a15e6;_0x552de8[_0x22ef33(0x264,'rC!2')]()?_0x34020d&&(console[_0x22ef33(0x3c2,'jVVH')](''+_0x34020d),_0x325aa8+='\x0a\x20'+_0x34020d):(console[_0x22ef33(0x2aa,'uT(k')](''+_0x34020d),_0x325aa8+='\x0a\x20'+_0x34020d);}async[_0x5a15e6(0x280,'MMXp')](_0x29bb1f){const _0x1949df=_0x5a15e6;if(!_0x29bb1f)return;if(_0x4e50b3['hLQJt'](_0x357c28,0x0)){if(_0x552de8[_0x1949df(0x346,'J$Q%')]()){var _0x284d33=_0x4e50b3[_0x1949df(0x3d4,'eqN3')](require,_0x4e50b3[_0x1949df(0x36c,'o&6X')]);await _0x284d33[_0x1949df(0x2ce,'eqN3')](_0x552de8['name'],_0x29bb1f);}else _0x552de8[_0x1949df(0x1c0,'O#74')](_0x552de8['name'],'',_0x29bb1f),console['log'](_0x552de8['name'],'',_0x29bb1f);}else console['log'](_0x29bb1f);}[_0x5a15e6(0x3cb,'eqN3')](_0x42f270={}){const _0x302290=_0x5a15e6,_0x14e9ed=new Date()[_0x302290(0x3b0,'AoS@')](),_0x41c874=_0x4e50b3['brQyM'](_0x14e9ed,this[_0x302290(0x251,'rC!2')])/0x3e8;switch(this[_0x302290(0x2aa,'uT(k')]('','🔔'+this[_0x302290(0x274,'jVVH')]+',结束!🕛\x20'+_0x41c874+'秒'),this[_0x302290(0x283,'TGTV')](),this[_0x302290(0x344,'KPQ1')]()){case _0x4e50b3[_0x302290(0x1f3,'a!Dd')]:case _0x4e50b3['CWRSr']:case _0x302290(0x3c6,'TGTV'):case _0x302290(0x392,'8*kB'):case _0x4e50b3['bPNsf']:default:_0x4e50b3[_0x302290(0x2af,'W*xB')]($done,_0x42f270);break;case _0x4e50b3[_0x302290(0x19d,'l%X^')]:process[_0x302290(0x24e,'fPA*')](0x1);}}}(_0x29e238,_0x5501c5);}function _0x159fb6(_0x16385d){const _0x5b197f=_0x1f1e99,_0xd12dc={'wXRed':function(_0x1df9c9,_0x393144){return _0x1df9c9===_0x393144;},'LIzzP':'string','gKnJq':_0x5b197f(0x193,'W*xB'),'OIxyD':function(_0x439f80,_0x2dd3d0){return _0x439f80+_0x2dd3d0;},'gmVfS':_0x5b197f(0x335,'D%yI'),'iqjAH':function(_0x220b47,_0x73249d){return _0x220b47%_0x73249d;},'MEuEL':_0x5b197f(0x1bb,'jl07'),'uzkIn':'gger','IuwqD':_0x5b197f(0x185,'BdDc'),'IFKoY':function(_0x3adc70,_0x15be25){return _0x3adc70(_0x15be25);},'VYxHz':function(_0x2ac193,_0x2403d2){return _0x2ac193(_0x2403d2);}};function _0x4c6749(_0x2b00ba){const _0x5eb845=_0x5b197f;if(_0xd12dc[_0x5eb845(0x25c,'eqN3')](typeof _0x2b00ba,_0xd12dc[_0x5eb845(0x2b0,'yoJp')]))return function(_0x1a530f){}[_0x5eb845(0x210,'qGJf')](_0x5eb845(0x329,'Tqev'))[_0x5eb845(0x37d,'MMXp')](_0xd12dc['gKnJq']);else _0xd12dc['OIxyD']('',_0x2b00ba/_0x2b00ba)[_0xd12dc['gmVfS']]!==0x1||_0xd12dc['iqjAH'](_0x2b00ba,0x14)===0x0?function(){return!![];}[_0x5eb845(0x212,'O#74')](_0xd12dc[_0x5eb845(0x3f5,'BdDc')](_0xd12dc[_0x5eb845(0x301,'iYLS')],_0xd12dc[_0x5eb845(0x367,'KPQ1')]))[_0x5eb845(0x19f,'kHRT')](_0x5eb845(0x388,'bjoy')):function(){return![];}[_0x5eb845(0x1ac,'zl![')](_0xd12dc['MEuEL']+_0xd12dc[_0x5eb845(0x366,'yoJp')])[_0x5eb845(0x2a4,'qbU[')](_0xd12dc['IuwqD']);_0xd12dc[_0x5eb845(0x22f,'kHRT')](_0x4c6749,++_0x2b00ba);}try{if(_0x16385d)return _0x4c6749;else _0xd12dc['VYxHz'](_0x4c6749,0x0);}catch(_0x57ec29){}}var version_ = 'jsjiami.com.v7'; \ No newline at end of file diff --git a/wxapp/杰士邦安心福利社.js b/wxapp/杰士邦安心福利社.js new file mode 100644 index 0000000..56e9998 --- /dev/null +++ b/wxapp/杰士邦安心福利社.js @@ -0,0 +1,321 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 测试 +------------------------------------------ +#Notice: + 变量名jieshibang 抓小程序杰士邦会员中心https://api.vshop.hchiv.cn/jfmb/api Headers中 authorization 去掉Bearer 多账号&连接 +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("杰士邦会员中心"); +let ckName = `jieshibang`; +const strSplitor = "#"; +const envSplitor = ["&", "\n"]; +const notify = $.isNode() ? require("../sendNotify") : ""; +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" + +class Public { + async request(options) { + return await axios.request(options); + } +} +class Task extends Public { + constructor(env) { + + super(); + this.index = $.userIdx++ + let user = env.split("#"); + this.token = user[0]; + this.isSign = false; + } + async addSign() { + let options = { + method: "POST", + url: "https://api.vshop.hchiv.cn/jfmb/api/play-default/sign/add-sign-new.do?sideType=3&mob=&appId=wx5966681b4a895dee&shopNick=wx5966681b4a895dee×tamp=1739704494584&guideNo=&encryPlatId=d89385f4d1a7783414258f80d3fbedf6bb2d0e10f94fc010eb524fdd2a14f9a3", + headers: { + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "appenv": "test", + "authorization": "Bearer " + this.token, + "content-type": "application/json", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1", + "cookie": "JSESSIONID=acb5cc02-db4e-4caf-9ebf-c5b67524ec06", + "Referer": "https://servicewechat.com/wx5966681b4a895dee/30/page-frame.html", + "Referrer-Policy": "unsafe-url" + }, + data: JSON.stringify({ + "appId": "wx5966681b4a895dee", + "openId": true, + "shopNick": "", + "timestamp": Date.now(), + "interfaceSource": 0, + "activityId": "156947" + }), + } + try { + let { data: res } = await this.request(options); + if (res.success == true) { + $.log(`签到成功 获得【${res.data.integral}】积分`) + } else { + $.log(`签到失败`) + console.log(res); + } + } catch (e) { + console.log(e); + + } + } + async activityInfo() { + let options = { + method: "POST", + url: "https://api.vshop.hchiv.cn/jfmb/api/activity/activity-info.do?sideType=3&mob=&appId=wx5966681b4a895dee&shopNick=wx5966681b4a895dee×tamp=1739705505052&guideNo=&encryPlatId=d89385f4d1a7783414258f80d3fbedf6bb2d0e10f94fc010eb524fdd2a14f9a3", + headers: { + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "appenv": "test", + "authorization": "Bearer " + this.token, + "content-type": "application/json", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "xweb_xhr": "1", + "cookie": "JSESSIONID=acb5cc02-db4e-4caf-9ebf-c5b67524ec06", + "Referer": "https://servicewechat.com/wx5966681b4a895dee/30/page-frame.html", + "Referrer-Policy": "unsafe-url" + }, + data: JSON.stringify({ + "appId": "wx5966681b4a895dee", + "openId": true, + "shopNick": "", + "timestamp": Date.now(), + "interfaceSource": 0, + "id": "156947" + }), + } + try { + let { data: res } = await this.request(options); + if (res.code == '1') { + + if (res.data.isSign == false) { + $.log(`今日未签到`) + this.isSign = false + } else { + $.log(`今日已签到`) + this.isSign = true + } + } else { + + } + } catch (e) { + console.log(e); + + } + } + async run() { + + await this.activityInfo(); + if (this.isSign == false) { + await this.addSign(); + } + + + } + + +} + + + + + + + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + // + + await new Task(user).run(); + + } + + +})() + .catch((e) => console.log(e)) + .finally( () => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await new Public().request(options); + return res +} + + +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done(t = {}) { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} \ No newline at end of file diff --git a/wxapp/植白说.js b/wxapp/植白说.js new file mode 100644 index 0000000..39383fd --- /dev/null +++ b/wxapp/植白说.js @@ -0,0 +1,481 @@ +/** + * 植白说v1.0 + * const $ = new Env("植白说"); + * cron 10 6,15 * * * 植白说.js + * + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export zbsxcx='X-Dts-Token' + + * 抓包请求 https://zbs.20171026.com/demo/取出X-Dts-Token + + * 多账号换行、@ 或 & 隔开 + * 说明:根据群友Maric提示恢复脚本,貌似是随着时间token有效期会越来越长 + * 奖励:签到/分享 牛奶活动 + * 注册入口:#小程序://植白说/cIiT4iMItmJ1EZi + * ==================================== + * + */ +//Sat Jan 25 2025 08:30:22 GMT+0000 (Coordinated Universal Time) +//Base:https://github.com/echo094/decode-js +//Modify:https://github.com/smallfawn/decode_action +const _0x3065e9 = new _0x14a79b("植白说"); +let _0x594a0a = "zbsxcx", + _0x1ad327 = ["\n", "&", "@"], + _0x5d9ea2 = (_0x3065e9.isNode() ? process.env[_0x594a0a] : _0x3065e9.getdata(_0x594a0a)) || "", + _0x23139a = [], + _0x5845aa = 0; +class _0x4f7def { + constructor(_0x44f7e1) { + this.index = ++_0x5845aa; + this.valid = false; + this.activedAuthToken = _0x44f7e1; + } + async ["taskApi"](_0x8df8fd, _0x52db04, _0x5ede90, _0x1961e6) { + let _0x11a1db = null; + try { + let _0x19ca83 = { + "url": _0x5ede90, + "headers": { + "X-DTS-Token": this.activedAuthToken, + "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 XWEB/8237", + "xweb_xhr": "1" + }, + "timeout": 60000, + "rejectUnauthorized": false + }; + if (_0x1961e6) { + _0x19ca83.body = _0x1961e6; + _0x19ca83.headers["Content-Length"] = _0x1961e6?.["length"]; + } + await _0x2ef80e(_0x52db04, _0x19ca83).then(async _0xe0f650 => { + { + if (_0xe0f650.resp?.["statusCode"] == 200) { + if (_0xe0f650.resp?.["body"]) _0x11a1db = JSON.parse(_0xe0f650.resp.body);else {} + } else console.log("账号[" + this.index + "]调用" + _0x52db04 + "[" + _0x8df8fd + "]出错,返回状态码[" + (_0xe0f650.resp?.["statusCode"] || "") + "]", "返回结果:", _0xe0f650.resp?.["body"]); + } + }); + } catch (_0x4fad44) { + console.log(_0x4fad44); + } finally { + return Promise.resolve(_0x11a1db); + } + } + async ["Sign"]() { + try { + { + let _0x4a533a = "Sign", + _0x420ae1 = "get", + _0x1fbcef = "https://zbs.20171026.com/demo/wx/home/signDay", + _0x1c108f = ""; + return await this.taskApi(_0x4a533a, _0x420ae1, _0x1fbcef, _0x1c108f).then(async _0x136d6b => { + { + if (_0x136d6b?.["errno"] === 0) return console.log("账号[" + this.index + "] 签到成功,签到次数:" + _0x136d6b?.["data"]?.["signCount"] + ",积分余额: " + _0x136d6b?.["data"]?.["integral"]), this.valid = true, true;else _0x3065e9.logAndNotify("账号[" + this.index + "] - 积分签到失败:" + (_0x136d6b?.["errmsg"] || JSON.stringify(_0x136d6b))), this.valid = false; + } + }); + } + } catch (_0x396548) { + console.log(_0x396548); + } + } + async ["Share"]() { + try { + let _0x33e5b6 = "Share", + _0x2bff16 = "get", + _0x3f4521 = "https://zbs.20171026.com/demo/wx/user/addIntegralByShare", + _0x4d3189 = ""; + return await this.taskApi(_0x33e5b6, _0x2bff16, _0x3f4521, _0x4d3189).then(async _0x5d0bf3 => { + { + if (_0x5d0bf3?.["errno"] === 0) { + console.log("账号[" + this.index + "] 分享成功,增加 1 积分"); + return true; + } else { + _0x3065e9.logAndNotify("账号[" + this.index + "] - 分享失败:" + (_0x5d0bf3?.["errmsg"] || JSON.stringify(_0x5d0bf3))); + } + } + }); + } catch (_0x1f98fa) { + console.log(_0x1f98fa); + } + } + async ["doTask"]() { + try { + console.log("\n============= 账号[" + this.index + "] 开始执行 分享任务============="); + await _0x3065e9.wait(Math.random() * 200); + for (let _0x50253a = 0; _0x50253a < 3; _0x50253a++) { + await this.Share(); + await _0x3065e9.wait(Math.random() * 1000); + } + } catch (_0x2b25f0) { + console.log(_0x2b25f0); + } + } +} +!(async () => { + if (typeof $request !== "undefined") await _0x1b91d9();else { + if (!(await _0x2f2542())) return; + console.log("\n================ 开始执行 ================"); + for (let _0x19ed95 of _0x23139a) { + console.log("----------- 执行 第 [" + _0x19ed95.index + "] 个账号 -----------"); + await _0x19ed95.Sign(); + await _0x3065e9.wait(Math.random() * 200); + } + let _0x7fb3c1 = _0x23139a.filter(_0x2bd556 => _0x2bd556.valid); + if (_0x7fb3c1.length > 0) { + console.log("\n================ 任务队列构建完毕 ================"); + for (let _0x249a61 of _0x7fb3c1) { + console.log("----------- 账号[" + _0x249a61.index + "] -----------"); + await _0x249a61.doTask(); + } + } else { + console.log("\n====幻生提示:无可用账号,请检查配置============ 任务结束 ================"); + } + await _0x3065e9.showmsg(); + } +})().catch(_0x3de5ae => console.log(_0x3de5ae)).finally(() => _0x3065e9.done()); +async function _0x1b91d9() {} +async function _0x2f2542() { + if (_0x5d9ea2) { + { + let _0x506c52 = _0x1ad327[0]; + for (let _0x16a0d0 of _0x1ad327) { + if (_0x5d9ea2.indexOf(_0x16a0d0) > -1) { + { + _0x506c52 = _0x16a0d0; + break; + } + } + } + for (let _0x2460f4 of _0x5d9ea2.split(_0x506c52)) { + { + if (_0x2460f4) _0x23139a.push(new _0x4f7def(_0x2460f4)); + } + } + userCount = _0x23139a.length; + } + } else { + console.log("未找到 配置信息,请检查是否配置 变量:", _0x594a0a); + return; + } + console.log("共找到" + userCount + "个账号"); + return true; +} +async function _0x2ef80e(_0x22e525, _0xf7da77) { + httpErr = null; + httpReq = null; + httpResp = null; + return new Promise(_0x1e7c15 => { + _0x3065e9.send(_0x22e525, _0xf7da77, async (_0x1a63ab, _0x304b42, _0x47c7a2) => { + httpErr = _0x1a63ab; + httpReq = _0x304b42; + httpResp = _0x47c7a2; + _0x1e7c15({ + "err": _0x1a63ab, + "req": _0x304b42, + "resp": _0x47c7a2 + }); + }); + }); +} +function _0x14a79b(_0x4038d3, _0x4c648e) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); + return new class { + constructor(_0xc41156, _0x297ded) { + this.name = _0xc41156; + this.notifyStr = ""; + this.startTime = new Date().getTime(); + Object.assign(this, _0x297ded); + console.log(this.name + " 开始运行:\n"); + } + ["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; + } + ["getdata"](_0x1c89dc) { + let _0x5f3c83 = this.getval(_0x1c89dc); + if (/^@/.test(_0x1c89dc)) { + const [, _0x4b7142, _0x5ba969] = /^@(.*?)\.(.*?)$/.exec(_0x1c89dc), + _0x45f3e6 = _0x4b7142 ? this.getval(_0x4b7142) : ""; + if (_0x45f3e6) try { + const _0x1de99b = JSON.parse(_0x45f3e6); + _0x5f3c83 = _0x1de99b ? this.lodash_get(_0x1de99b, _0x5ba969, "") : _0x5f3c83; + } catch (_0xb8b62e) { + _0x5f3c83 = ""; + } + } + return _0x5f3c83; + } + ["setdata"](_0x90cff, _0x59643e) { + { + let _0x28ca60 = false; + if (/^@/.test(_0x59643e)) { + const [, _0x38c422, _0x26c375] = /^@(.*?)\.(.*?)$/.exec(_0x59643e), + _0x14a0cc = this.getval(_0x38c422), + _0x10f203 = _0x38c422 ? "null" === _0x14a0cc ? null : _0x14a0cc || "{}" : "{}"; + try { + const _0x1b9f14 = JSON.parse(_0x10f203); + this.lodash_set(_0x1b9f14, _0x26c375, _0x90cff); + _0x28ca60 = this.setval(JSON.stringify(_0x1b9f14), _0x38c422); + } catch (_0x4ce4bd) { + const _0x4defda = {}; + this.lodash_set(_0x4defda, _0x26c375, _0x90cff); + _0x28ca60 = this.setval(JSON.stringify(_0x4defda), _0x38c422); + } + } else { + _0x28ca60 = this.setval(_0x90cff, _0x59643e); + } + return _0x28ca60; + } + } + ["getval"](_0x4e2aac) { + return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x4e2aac) : this.isQuanX() ? $prefs.valueForKey(_0x4e2aac) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x4e2aac]) : this.data && this.data[_0x4e2aac] || null; + } + ["setval"](_0x4901e5, _0xdb3502) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x4901e5, _0xdb3502) : this.isQuanX() ? $prefs.setValueForKey(_0x4901e5, _0xdb3502) : this.isNode() ? (this.data = this.loaddata(), this.data[_0xdb3502] = _0x4901e5, this.writedata(), true) : this.data && this.data[_0xdb3502] || null; + } + ["send"](_0x528a53, _0x1062b7, _0x3a681d = () => {}) { + { + if (_0x528a53 != "get" && _0x528a53 != "post" && _0x528a53 != "put" && _0x528a53 != "delete") { + console.log("无效的http方法:" + _0x528a53); + return; + } + if (_0x528a53 == "get" && _0x1062b7.headers) delete _0x1062b7.headers["Content-Type"], delete _0x1062b7.headers["Content-Length"];else { + if (_0x1062b7.body && _0x1062b7.headers) { + { + if (!_0x1062b7.headers["Content-Type"]) _0x1062b7.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + } + } + if (this.isSurge() || this.isLoon()) { + this.isSurge() && this.isNeedRewrite && (_0x1062b7.headers = _0x1062b7.headers || {}, Object.assign(_0x1062b7.headers, { + "X-Surge-Skip-Scripting": false + })); + let _0x55f76d = { + "method": _0x528a53, + "url": _0x1062b7.url, + "headers": _0x1062b7.headers, + "timeout": _0x1062b7.timeout, + "data": _0x1062b7.body + }; + if (_0x528a53 == "get") delete _0x55f76d.data; + $axios(_0x55f76d).then(_0x3f3966 => { + const { + status: _0x29a846, + request: _0x2ad2aa, + headers: _0x5cc4bd, + data: _0x161f35 + } = _0x3f3966; + _0x3a681d(null, _0x2ad2aa, { + "statusCode": _0x29a846, + "headers": _0x5cc4bd, + "body": _0x161f35 + }); + }).catch(_0x238377 => console.log(_0x238377)); + } else { + if (this.isQuanX()) _0x1062b7.method = _0x528a53.toUpperCase(), this.isNeedRewrite && (_0x1062b7.opts = _0x1062b7.opts || {}, Object.assign(_0x1062b7.opts, { + "hints": false + })), $task.fetch(_0x1062b7).then(_0x3b8bbe => { + const { + statusCode: _0x2fc1ac, + request: _0x5f6740, + headers: _0x34d4ad, + body: _0x37fbc7 + } = _0x3b8bbe; + _0x3a681d(null, _0x5f6740, { + "statusCode": _0x2fc1ac, + "headers": _0x34d4ad, + "body": _0x37fbc7 + }); + }, _0x361920 => _0x3a681d(_0x361920));else { + if (this.isNode()) { + this.got = this.got ? this.got : require("got"); + const { + url: _0x325d9c, + ..._0xf7af76 + } = _0x1062b7; + this.instance = this.got.extend({ + "followRedirect": false + }); + this.instance[_0x528a53](_0x325d9c, _0xf7af76).then(_0x18383d => { + const { + statusCode: _0xf07db0, + request: _0x532d1a, + headers: _0x1dc0d4, + body: _0x4984e8 + } = _0x18383d; + _0x3a681d(null, _0x532d1a, { + "statusCode": _0xf07db0, + "headers": _0x1dc0d4, + "body": _0x4984e8 + }); + }, _0x2e49ed => { + const { + message: _0x2df36f, + request: _0x5340cf, + response: _0xdeebdf + } = _0x2e49ed; + _0x3a681d(_0x2df36f, _0x5340cf, _0xdeebdf); + }); + } + } + } + } + } + ["time"](_0x4ddd19, _0x3d004a = null) { + { + let _0x3d0303 = _0x3d004a ? new Date(_0x3d004a) : new Date(), + _0x1c5845 = { + "M+": _0x3d0303.getMonth() + 1, + "d+": _0x3d0303.getDate(), + "h+": _0x3d0303.getHours(), + "m+": _0x3d0303.getMinutes(), + "s+": _0x3d0303.getSeconds(), + "q+": Math.floor((_0x3d0303.getMonth() + 3) / 3), + "S": _0x3d0303.getMilliseconds() + }; + /(y+)/.test(_0x4ddd19) && (_0x4ddd19 = _0x4ddd19.replace(RegExp.$1, (_0x3d0303.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let _0x4df8e7 in _0x1c5845) new RegExp("(" + _0x4df8e7 + ")").test(_0x4ddd19) && (_0x4ddd19 = _0x4ddd19.replace(RegExp.$1, 1 == RegExp.$1.length ? _0x1c5845[_0x4df8e7] : ("00" + _0x1c5845[_0x4df8e7]).substr(("" + _0x1c5845[_0x4df8e7]).length))); + return _0x4ddd19; + } + } + async ["showmsg"]() { + { + if (!this.notifyStr) return; + let _0x3d3a83 = this.name + " 运行通知\n\n" + this.notifyStr; + if (_0x3065e9.isNode()) { + { + var _0x3a245e = require("../sendNotify"); + console.log("\n============== 推送 =============="); + await _0x3a245e.sendNotify(this.name, _0x3d3a83); + } + } else this.msg(_0x3d3a83); + } + } + ["logAndNotify"](_0x58012f) { + console.log(_0x58012f); + this.notifyStr += _0x58012f; + this.notifyStr += "\n"; + } + ["logAndNotifyWithTime"](_0xeaf4b1) { + let _0x414567 = "[" + this.time("hh:mm:ss.S") + "]" + _0xeaf4b1; + console.log(_0x414567); + this.notifyStr += _0x414567; + this.notifyStr += "\n"; + } + ["logWithTime"](_0x5291da) { + console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x5291da); + } + ["msg"](_0x51fea4 = t, _0x215cb5 = "", _0x474402 = "", _0x42a5dd) { + const _0x3d6f7a = _0x163e67 => { + { + if (!_0x163e67) return _0x163e67; + if ("string" == typeof _0x163e67) return this.isLoon() ? _0x163e67 : this.isQuanX() ? { + "open-url": _0x163e67 + } : this.isSurge() ? { + "url": _0x163e67 + } : undefined; + if ("object" == typeof _0x163e67) { + if (this.isLoon()) { + let _0x2d5c4a = _0x163e67.openUrl || _0x163e67.url || _0x163e67["open-url"], + _0x12a18e = _0x163e67.mediaUrl || _0x163e67["media-url"]; + return { + "openUrl": _0x2d5c4a, + "mediaUrl": _0x12a18e + }; + } + if (this.isQuanX()) { + let _0x1e62a6 = _0x163e67["open-url"] || _0x163e67.url || _0x163e67.openUrl, + _0x5c34e8 = _0x163e67["media-url"] || _0x163e67.mediaUrl; + return { + "open-url": _0x1e62a6, + "media-url": _0x5c34e8 + }; + } + if (this.isSurge()) { + let _0x178770 = _0x163e67.url || _0x163e67.openUrl || _0x163e67["open-url"]; + return { + "url": _0x178770 + }; + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x51fea4, _0x215cb5, _0x474402, _0x3d6f7a(_0x42a5dd)) : this.isQuanX() && $notify(_0x51fea4, _0x215cb5, _0x474402, _0x3d6f7a(_0x42a5dd))); + let _0x15ca2e = ["", "============== 系统通知 =============="]; + _0x15ca2e.push(_0x51fea4); + _0x215cb5 && _0x15ca2e.push(_0x215cb5); + _0x474402 && _0x15ca2e.push(_0x474402); + console.log(_0x15ca2e.join("\n")); + } + ["getMin"](_0x434bc7, _0x32c083) { + return _0x434bc7 < _0x32c083 ? _0x434bc7 : _0x32c083; + } + ["getMax"](_0x4d3798, _0x166dff) { + return _0x4d3798 < _0x166dff ? _0x166dff : _0x4d3798; + } + ["padStr"](_0x163393, _0x4fb87b, _0x56aecc = "0") { + { + let _0x5cdeb2 = String(_0x163393), + _0xd26033 = _0x4fb87b > _0x5cdeb2.length ? _0x4fb87b - _0x5cdeb2.length : 0, + _0x111cf7 = ""; + for (let _0x5ebe0b = 0; _0x5ebe0b < _0xd26033; _0x5ebe0b++) { + _0x111cf7 += _0x56aecc; + } + _0x111cf7 += _0x5cdeb2; + return _0x111cf7; + } + } + ["json2str"](_0x5eff15, _0x47bb6a, _0x2a6962 = false) { + let _0x59e08a = []; + for (let _0x4817da of Object.keys(_0x5eff15).sort()) { + { + let _0xf5e3d8 = _0x5eff15[_0x4817da]; + if (_0xf5e3d8 && _0x2a6962) _0xf5e3d8 = encodeURIComponent(_0xf5e3d8); + _0x59e08a.push(_0x4817da + "=" + _0xf5e3d8); + } + } + return _0x59e08a.join(_0x47bb6a); + } + ["str2json"](_0x31a48d, _0x36c2e8 = false) { + let _0x2cde0e = {}; + for (let _0x5b6e8d of _0x31a48d.split("&")) { + if (!_0x5b6e8d) continue; + let _0x5742d9 = _0x5b6e8d.indexOf("="); + if (_0x5742d9 == -1) continue; + let _0x2f6ff9 = _0x5b6e8d.substr(0, _0x5742d9), + _0x2f8540 = _0x5b6e8d.substr(_0x5742d9 + 1); + if (_0x36c2e8) _0x2f8540 = decodeURIComponent(_0x2f8540); + _0x2cde0e[_0x2f6ff9] = _0x2f8540; + } + return _0x2cde0e; + } + ["randomString"](_0x1826b2, _0x2926dc = "abcdef0123456789") { + let _0x11a90c = ""; + for (let _0x1ed771 = 0; _0x1ed771 < _0x1826b2; _0x1ed771++) { + _0x11a90c += _0x2926dc.charAt(Math.floor(Math.random() * _0x2926dc.length)); + } + return _0x11a90c; + } + ["randomList"](_0x3808ec) { + let _0x129ec9 = Math.floor(Math.random() * _0x3808ec.length); + return _0x3808ec[_0x129ec9]; + } + ["wait"](_0x41414e) { + return new Promise(_0x310013 => setTimeout(_0x310013, _0x41414e)); + } + ["done"](_0x5aad77 = {}) { + const _0x2634cb = new Date().getTime(), + _0x53d433 = (_0x2634cb - this.startTime) / 1000; + console.log("\n" + this.name + " 运行结束,共运行了 " + _0x53d433 + " 秒!"); + if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x5aad77); + } + }(_0x4038d3, _0x4c648e); +} \ No newline at end of file diff --git a/wxapp/海尔-卡萨帝.js b/wxapp/海尔-卡萨帝.js new file mode 100644 index 0000000..0a27c20 --- /dev/null +++ b/wxapp/海尔-卡萨帝.js @@ -0,0 +1,570 @@ +/** + * 海尔 - 卡萨帝小程序 签到、抽奖 + * cron 10 8 * * * 海尔-卡萨帝.js + * + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export ksd='你抓包的UserToken#请求Body里的openId' + + * 自己抓包 /user/userCenter/saveUserSource请求协议头上的MK-U-User-Token + * 请求数据里的 openId + * 用 # 连接 + + * 多账号换行或&隔开 + + * 奖励:现金红包 + * + * ==================================== + * + */ +//Sat Jan 25 2025 08:32:06 GMT+0000 (Coordinated Universal Time) +//Base:https://github.com/echo094/decode-js +//Modify:https://github.com/smallfawn/decode_action +const $ = new Env("卡萨帝小程序"); +let envParams = "ksd", + envSplitor = ["\n", "&"], + authorizationToken = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || "", + initedJobForTokens = [], + currentUserIndex = 0, + contentType = "application/json;charset=UTF-8", + defaultUA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/6945", + Referer = "https://yx.jsh.com/game/signInIndex?employeeId=&playId=20"; +const https = require("https"); +class JobTask { + constructor(_0x55d5be) { + this.index = ++currentUserIndex; + this.points = 0; + this.valid = false; + try { + [this.activedAuthToken, this.openId] = _0x55d5be?.["split"]("#"); + } catch (_0x5cde09) { + this.activedAuthToken = _0x55d5be; + } + } + async ["taskApi"](_0x53ede5, _0x2127bc, _0x2c79b5, _0x31d84a, _0x232dd9 = {}) { + let _0x41e367 = null; + try { + let _0x235e01 = _0x2c79b5.replace("//", "/").split("/")[1], + _0x49cb17 = { + "url": _0x2c79b5, + "headers": { + "Accept": "application/json, text/plain, */*", + "Authorization": this.activedAuthToken, + "Host": _0x235e01, + "Connection": "keep-alive", + "Content-Type": contentType, + "User-Agent": defaultUA, + "Referer": Referer, + "MK-Source-Code": "casarte", + "MK-U-App-Code": "gUsb9sx0eXEdMuc", + "MK-U-User-Token": this.activedAuthToken, + ..._0x232dd9 + }, + "timeout": 60000 + }; + if (_0x31d84a) { + _0x49cb17.body = _0x31d84a; + } + await httpRequest(_0x2127bc, _0x49cb17).then(async _0x591ac9 => { + if (_0x591ac9.resp?.["statusCode"] == 200) { + _0x591ac9.resp?.["body"] ? _0x41e367 = JSON.parse(_0x591ac9.resp.body) : console.log("账号[" + this.index + "]调用" + _0x2127bc + "[" + _0x53ede5 + "]出错,返回为空"); + } else console.log("账号[" + this.index + "]调用" + _0x2127bc + "[" + _0x53ede5 + "]出错,返回状态码[" + (_0x591ac9.resp?.["statusCode"] || "") + "]"); + }); + } catch (_0x38b370) { + console.log(_0x38b370); + } finally { + return Promise.resolve(_0x41e367); + } + } + async ["GetUserInfo"]() { + try { + { + let _0x1ed441 = "GetUserInfo", + _0x201f80 = "post", + _0x5e3710 = "https://mk-gift.haier.net/qy/customer/api/redEnvelope/queryRedEnvelopeWallet", + _0x5ade36 = "{\"redSource\":\"\"}"; + await this.taskApi(_0x1ed441, _0x201f80, _0x5e3710, _0x5ade36, { + "Content-Type": "application/json" + }).then(async _0x29ca70 => { + console.log("result:", _0x29ca70); + _0x29ca70.code === 200 ? (this.valid = true, this.points = Number(_0x29ca70.data.cash_available), console.log("账号[" + this.index + "] 登录成功"), console.log("账号[" + this.index + "] 当前余额: " + this.points)) : $.logAndNotify("账号[" + this.index + "]查询余额失败,可能帐号无效"); + }); + } + } catch (_0x670981) { + console.log(_0x670981); + } finally { + return Promise.resolve(1); + } + } + async ["SignInDaily"]() { + try { + { + let _0x226da3 = "SignInDaily", + _0x79792e = "post", + _0xb36903 = "https://yx.jsh.com/customer/api/user/playingMethod/game/saveClockInInfoByUserId", + _0x541af5 = "{\"playId\":\"20\",\"employeeId\":\"\",\"mobile\":\"\",\"openId\":\"" + this.openId + "\",\"parentUserId\":\"\",\"userId\":\"\"}"; + await this.taskApi(_0x226da3, _0x79792e, _0xb36903, _0x541af5).then(async _0x25b135 => { + console.log("result:", _0x25b135); + _0x25b135.code === 200 ? (console.log("账号[" + this.index + "] 签到成功,获得" + _0x25b135.data / 100 + "元"), _0x25b135.data && (this.points += _0x25b135.data / 100)) : console.log("账号[" + this.index + "] 签到失败:" + _0x25b135?.["message"]); + }); + } + } catch (_0x1aa259) { + console.log(_0x1aa259); + } finally { + return Promise.resolve(1); + } + } + async ["LuckDraw"]() { + try { + let _0x1bb47d = "LuckDraw", + _0x343437 = "post", + _0x46ba8d = "https://yx.jsh.com/customer/api/user/client/luckDraw", + _0x13a4ce = "{\"gameId\":\"174464962928279552\"}"; + await this.taskApi(_0x1bb47d, _0x343437, _0x46ba8d, _0x13a4ce).then(async _0x108d75 => { + { + console.log("result:", _0x108d75); + if (_0x108d75.code === 200) console.log("账号[" + this.index + "] 抽奖成功,获得" + _0x108d75.data?.["prizeName"] + "积分");else { + console.log("账号[" + this.index + "] 抽奖失败:" + _0x108d75?.["message"]); + } + } + }); + } catch (_0x5f4c99) { + console.log(_0x5f4c99); + } finally { + return Promise.resolve(1); + } + } + async ["TiXian"]() { + try { + { + let _0x5a32ee = "TiXian", + _0x46df13 = "post", + _0x4bbbc6 = "https://marketing-api.haier.net/api/marketing-assemble/api/cashcenter/user/wallet/withdrawalCash", + _0x3e492d = encodeURIComponent("data={\"type\":\"1\",\"withdrawFee\":\"" + this.points + "\"}&signData={\"key\":\"userRed100000003\",\"secret\":\"88800de360b7308cdba924b865507a92\"}"); + await this.taskApi(_0x5a32ee, _0x46df13, _0x4bbbc6, _0x3e492d, { + "Authorization": "Bearer " + this.activedAuthToken, + "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", + "Content-Type": "application/x-www-form-urlencoded", + "X-Requested-With": "com.tencent.mm", + "plantform-channel": "PLAT_FORM_WECHAT" + }).then(async _0x48a4c5 => { + _0x48a4c5.code === 200 ? console.log("账号[" + this.index + "] 提现成功,获得" + _0x48a4c5.data?.["prizeName"] + "现金") : console.log("账号[" + this.index + "] 提现失败:" + JSON.parse(_0x48a4c5)); + }); + } + } catch (_0x5dcea4) { + console.log(_0x5dcea4); + } finally { + return Promise.resolve(1); + } + } + async ["doTask"]() { + try { + console.log("\n============= 账号[" + this.index + "] 开始签到============="); + await this.SignInDaily(); + await waitSomeTime(); + await this.LuckDraw(); + console.log("\n----待提现的金额:", this.points); + this.points && !Number.isNaN(this.points) && this.points >= 1 && (await waitSomeTime(), await this.TiXian()); + } catch (_0x3b27c2) { + console.log(_0x3b27c2); + } + } +} +!(async () => { + if (typeof $request !== "undefined") { + await GetRewrite(); + } else { + { + if (!(await checkEnv())) return; + console.log("\n================ 开始执行 ================"); + for (let _0x37bc9f of initedJobForTokens) { + console.log("----------- 执行 第 [" + _0x37bc9f.index + "] 个账号 -----------"); + await _0x37bc9f.GetUserInfo(); + } + let _0x56f6f9 = initedJobForTokens.filter(_0x308e9f => _0x308e9f.valid); + if (initedJobForTokens.length > 0) { + console.log("\n================ 任务队列构建完毕 ================"); + for (let _0x22bb86 of _0x56f6f9) { + console.log("----------- 账号[" + _0x22bb86.index + "] -----------"); + await _0x22bb86.doTask(); + } + } + await $.showmsg(); + } + } +})().catch(_0x570c59 => console.log(_0x570c59)).finally(() => $.done()); +async function waitSomeTime(_0x395b52 = 3000) { + console.log("----------- 延迟 " + _0x395b52 / 1000 + " s,请稍等 -----------"); + return await new Promise(_0x203071 => setTimeout(_0x203071, _0x395b52)); +} +async function GetRewrite() {} +async function checkEnv() { + if (authorizationToken) { + { + let _0x15962f = envSplitor[0]; + for (let _0x3a119f of envSplitor) { + { + if (authorizationToken.indexOf(_0x3a119f) > -1) { + _0x15962f = _0x3a119f; + break; + } + } + } + for (let _0x167f1c of authorizationToken.split(_0x15962f)) { + { + if (_0x167f1c) initedJobForTokens.push(new JobTask(_0x167f1c)); + } + } + userCount = initedJobForTokens.length; + } + } else { + console.log("未找到 配置信息,请检查是否配置 变量:", envParams); + return; + } + console.log("共找到" + userCount + "个账号"); + return true; +} +async function httpRequest(_0x315fde, _0x43498a) { + httpErr = null; + httpReq = null; + httpResp = null; + return new Promise(_0x15e577 => { + $.send(_0x315fde, _0x43498a, async (_0x46ab79, _0x54af7f, _0x326c5c) => { + httpErr = _0x46ab79; + httpReq = _0x54af7f; + httpResp = _0x326c5c; + _0x15e577({ + "err": _0x46ab79, + "req": _0x54af7f, + "resp": _0x326c5c + }); + }); + }); +} +function Env(_0x145f6d, _0x2ad434) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); + return new class { + constructor(_0x2c6ae3, _0x15c3de) { + { + this.name = _0x2c6ae3; + this.notifyStr = ""; + this.startTime = new Date().getTime(); + Object.assign(this, _0x15c3de); + console.log(this.name + " 开始运行:\n"); + } + } + ["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; + } + ["getdata"](_0x4fac12) { + let _0x34b166 = this.getval(_0x4fac12); + if (/^@/.test(_0x4fac12)) { + { + const [, _0x4a384a, _0x163012] = /^@(.*?)\.(.*?)$/.exec(_0x4fac12), + _0x4d5996 = _0x4a384a ? this.getval(_0x4a384a) : ""; + if (_0x4d5996) try { + const _0xea2094 = JSON.parse(_0x4d5996); + _0x34b166 = _0xea2094 ? this.lodash_get(_0xea2094, _0x163012, "") : _0x34b166; + } catch (_0x178f4b) { + _0x34b166 = ""; + } + } + } + return _0x34b166; + } + ["setdata"](_0x2f9735, _0x5a4907) { + { + let _0x1da6cb = false; + if (/^@/.test(_0x5a4907)) { + const [, _0x8150c9, _0x441dcb] = /^@(.*?)\.(.*?)$/.exec(_0x5a4907), + _0x31d092 = this.getval(_0x8150c9), + _0x2dc4c1 = _0x8150c9 ? "null" === _0x31d092 ? null : _0x31d092 || "{}" : "{}"; + try { + const _0x4cde78 = JSON.parse(_0x2dc4c1); + this.lodash_set(_0x4cde78, _0x441dcb, _0x2f9735); + _0x1da6cb = this.setval(JSON.stringify(_0x4cde78), _0x8150c9); + } catch (_0x39e26e) { + { + const _0x302ef5 = {}; + this.lodash_set(_0x302ef5, _0x441dcb, _0x2f9735); + _0x1da6cb = this.setval(JSON.stringify(_0x302ef5), _0x8150c9); + } + } + } else _0x1da6cb = this.setval(_0x2f9735, _0x5a4907); + return _0x1da6cb; + } + } + ["getval"](_0x17b0b5) { + return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x17b0b5) : this.isQuanX() ? $prefs.valueForKey(_0x17b0b5) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x17b0b5]) : this.data && this.data[_0x17b0b5] || null; + } + ["setval"](_0x1a4b9a, _0x5989f1) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x1a4b9a, _0x5989f1) : this.isQuanX() ? $prefs.setValueForKey(_0x1a4b9a, _0x5989f1) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x5989f1] = _0x1a4b9a, this.writedata(), true) : this.data && this.data[_0x5989f1] || null; + } + ["send"](_0x390a5f, _0x55dfcf, _0x53ea18 = () => {}) { + { + if (_0x390a5f != "get" && _0x390a5f != "post" && _0x390a5f != "put" && _0x390a5f != "delete") { + { + console.log("无效的http方法:" + _0x390a5f); + return; + } + } + if (_0x390a5f == "get" && _0x55dfcf.headers) delete _0x55dfcf.headers["Content-Type"], delete _0x55dfcf.headers["Content-Length"];else { + if (_0x55dfcf.body && _0x55dfcf.headers) { + { + if (!_0x55dfcf.headers["Content-Type"]) _0x55dfcf.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + } + } + if (this.isSurge() || this.isLoon()) { + { + if (this.isSurge() && this.isNeedRewrite) { + _0x55dfcf.headers = _0x55dfcf.headers || {}; + Object.assign(_0x55dfcf.headers, { + "X-Surge-Skip-Scripting": false + }); + } + let _0x41a6ce = { + "method": _0x390a5f, + "url": _0x55dfcf.url, + "headers": _0x55dfcf.headers, + "timeout": _0x55dfcf.timeout, + "data": _0x55dfcf.body + }; + if (_0x390a5f == "get") delete _0x41a6ce.data; + $axios(_0x41a6ce).then(_0x33377e => { + { + const { + status: _0x2065f2, + request: _0x23f3a5, + headers: _0x4e5d89, + data: _0xd40200 + } = _0x33377e; + _0x53ea18(null, _0x23f3a5, { + "statusCode": _0x2065f2, + "headers": _0x4e5d89, + "body": _0xd40200 + }); + } + }).catch(_0x30a337 => console.log(_0x30a337)); + } + } else { + if (this.isQuanX()) { + _0x55dfcf.method = _0x390a5f.toUpperCase(); + this.isNeedRewrite && (_0x55dfcf.opts = _0x55dfcf.opts || {}, Object.assign(_0x55dfcf.opts, { + "hints": false + })); + $task.fetch(_0x55dfcf).then(_0x4fc46b => { + { + const { + statusCode: _0x3adacc, + request: _0x4c9fac, + headers: _0x465d4c, + body: _0x1c0160 + } = _0x4fc46b; + _0x53ea18(null, _0x4c9fac, { + "statusCode": _0x3adacc, + "headers": _0x465d4c, + "body": _0x1c0160 + }); + } + }, _0x39ac1f => _0x53ea18(_0x39ac1f)); + } else { + if (this.isNode()) { + this.got = this.got ? this.got : require("got"); + const { + url: _0x17922a, + ..._0x2092f9 + } = _0x55dfcf; + this.instance = this.got.extend({ + "followRedirect": false + }); + this.instance[_0x390a5f](_0x17922a, _0x2092f9).then(_0x36703e => { + const { + statusCode: _0x23a6f5, + request: _0xc061b3, + headers: _0x1e25f8, + body: _0x15c804 + } = _0x36703e; + _0x53ea18(null, _0xc061b3, { + "statusCode": _0x23a6f5, + "headers": _0x1e25f8, + "body": _0x15c804 + }); + }, _0x2b4fca => { + { + const { + message: _0x5baa3b, + request: _0x1400de, + response: _0x20be40 + } = _0x2b4fca; + _0x53ea18(_0x5baa3b, _0x1400de, _0x20be40); + } + }); + } + } + } + } + } + ["time"](_0x518b14, _0x4cec02 = null) { + let _0x91d015 = _0x4cec02 ? new Date(_0x4cec02) : new Date(), + _0xc32e0 = { + "M+": _0x91d015.getMonth() + 1, + "d+": _0x91d015.getDate(), + "h+": _0x91d015.getHours(), + "m+": _0x91d015.getMinutes(), + "s+": _0x91d015.getSeconds(), + "q+": Math.floor((_0x91d015.getMonth() + 3) / 3), + "S": _0x91d015.getMilliseconds() + }; + /(y+)/.test(_0x518b14) && (_0x518b14 = _0x518b14.replace(RegExp.$1, (_0x91d015.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let _0x74d676 in _0xc32e0) new RegExp("(" + _0x74d676 + ")").test(_0x518b14) && (_0x518b14 = _0x518b14.replace(RegExp.$1, 1 == RegExp.$1.length ? _0xc32e0[_0x74d676] : ("00" + _0xc32e0[_0x74d676]).substr(("" + _0xc32e0[_0x74d676]).length))); + return _0x518b14; + } + async ["showmsg"]() { + if (!this.notifyStr) return; + let _0x49b71e = this.name + " 运行通知\n\n" + this.notifyStr; + if ($.isNode()) { + var _0x15c32f = require("../sendNotify"); + console.log("\n============== 推送 =============="); + await _0x15c32f.sendNotify(this.name, _0x49b71e); + } else this.msg(_0x49b71e); + } + ["logAndNotify"](_0x411ee5) { + console.log(_0x411ee5); + this.notifyStr += _0x411ee5; + this.notifyStr += "\n"; + } + ["logAndNotifyWithTime"](_0x265752) { + { + let _0x29cff9 = "[" + this.time("hh:mm:ss.S") + "]" + _0x265752; + console.log(_0x29cff9); + this.notifyStr += _0x29cff9; + this.notifyStr += "\n"; + } + } + ["logWithTime"](_0x35d90e) { + console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x35d90e); + } + ["msg"](_0x36b3bc = t, _0x277707 = "", _0x416e8b = "", _0x487038) { + const _0x1a3fa6 = _0x4e2159 => { + { + if (!_0x4e2159) return _0x4e2159; + if ("string" == typeof _0x4e2159) return this.isLoon() ? _0x4e2159 : this.isQuanX() ? { + "open-url": _0x4e2159 + } : this.isSurge() ? { + "url": _0x4e2159 + } : undefined; + if ("object" == typeof _0x4e2159) { + { + if (this.isLoon()) { + { + let _0x1d32d6 = _0x4e2159.openUrl || _0x4e2159.url || _0x4e2159["open-url"], + _0x1c6203 = _0x4e2159.mediaUrl || _0x4e2159["media-url"]; + return { + "openUrl": _0x1d32d6, + "mediaUrl": _0x1c6203 + }; + } + } + if (this.isQuanX()) { + let _0x5a7300 = _0x4e2159["open-url"] || _0x4e2159.url || _0x4e2159.openUrl, + _0x425900 = _0x4e2159["media-url"] || _0x4e2159.mediaUrl; + return { + "open-url": _0x5a7300, + "media-url": _0x425900 + }; + } + if (this.isSurge()) { + let _0x40d0df = _0x4e2159.url || _0x4e2159.openUrl || _0x4e2159["open-url"]; + return { + "url": _0x40d0df + }; + } + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x36b3bc, _0x277707, _0x416e8b, _0x1a3fa6(_0x487038)) : this.isQuanX() && $notify(_0x36b3bc, _0x277707, _0x416e8b, _0x1a3fa6(_0x487038))); + let _0x32161e = ["", "============== 系统通知 =============="]; + _0x32161e.push(_0x36b3bc); + _0x277707 && _0x32161e.push(_0x277707); + _0x416e8b && _0x32161e.push(_0x416e8b); + console.log(_0x32161e.join("\n")); + } + ["getMin"](_0x3e6cad, _0x1ce183) { + return _0x3e6cad < _0x1ce183 ? _0x3e6cad : _0x1ce183; + } + ["getMax"](_0x939b39, _0xc0287e) { + return _0x939b39 < _0xc0287e ? _0xc0287e : _0x939b39; + } + ["padStr"](_0x371ca0, _0x558a10, _0x50b7d9 = "0") { + let _0x23ddbe = String(_0x371ca0), + _0x5c77da = _0x558a10 > _0x23ddbe.length ? _0x558a10 - _0x23ddbe.length : 0, + _0x41ed35 = ""; + for (let _0x232913 = 0; _0x232913 < _0x5c77da; _0x232913++) { + _0x41ed35 += _0x50b7d9; + } + _0x41ed35 += _0x23ddbe; + return _0x41ed35; + } + ["json2str"](_0x3344e, _0x14c262, _0x39f0d1 = false) { + let _0x41049d = []; + for (let _0x59f8b1 of Object.keys(_0x3344e).sort()) { + let _0x492abf = _0x3344e[_0x59f8b1]; + if (_0x492abf && _0x39f0d1) _0x492abf = encodeURIComponent(_0x492abf); + _0x41049d.push(_0x59f8b1 + "=" + _0x492abf); + } + return _0x41049d.join(_0x14c262); + } + ["str2json"](_0x27a7e5, _0x562ec0 = false) { + { + let _0x21bc24 = {}; + for (let _0x5a43be of _0x27a7e5.split("&")) { + if (!_0x5a43be) continue; + let _0x16b706 = _0x5a43be.indexOf("="); + if (_0x16b706 == -1) continue; + let _0x5c1005 = _0x5a43be.substr(0, _0x16b706), + _0x5bd991 = _0x5a43be.substr(_0x16b706 + 1); + if (_0x562ec0) _0x5bd991 = decodeURIComponent(_0x5bd991); + _0x21bc24[_0x5c1005] = _0x5bd991; + } + return _0x21bc24; + } + } + ["randomString"](_0x3fd6b4, _0x227d42 = "abcdef0123456789") { + { + let _0x4a0db9 = ""; + for (let _0x11b627 = 0; _0x11b627 < _0x3fd6b4; _0x11b627++) { + _0x4a0db9 += _0x227d42.charAt(Math.floor(Math.random() * _0x227d42.length)); + } + return _0x4a0db9; + } + } + ["randomList"](_0x3ac336) { + { + let _0x5b9b88 = Math.floor(Math.random() * _0x3ac336.length); + return _0x3ac336[_0x5b9b88]; + } + } + ["wait"](_0x3e1e6c) { + return new Promise(_0x342340 => setTimeout(_0x342340, _0x3e1e6c)); + } + ["done"](_0x39fc39 = {}) { + { + const _0x43cece = new Date().getTime(), + _0x11ce01 = (_0x43cece - this.startTime) / 1000; + console.log("\n" + this.name + " 运行结束,共运行了 " + _0x11ce01 + " 秒!"); + if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x39fc39); + } + } + }(_0x145f6d, _0x2ad434); +} \ No newline at end of file diff --git a/wxapp/草莓台.js b/wxapp/草莓台.js new file mode 100644 index 0000000..4e4a514 --- /dev/null +++ b/wxapp/草莓台.js @@ -0,0 +1,516 @@ +/** + * 草莓台小程序签到v0.03 + * cron 10 12 * * * 草莓台.js + * + * ========= 青龙--配置文件 =========== + * # 项目名称 + * export caomeitai_token='你抓包的openid#你的userId' + + * 自己抓包协议头上的Cookie + + * 多账号换行或&隔开 + + * 奖励:签到草莓币 + * const $ = new Env("草莓台") + * ==================================== + * + */ +//Sat Jan 25 2025 08:33:12 GMT+0000 (Coordinated Universal Time) +//Base:https://github.com/echo094/decode-js +//Modify:https://github.com/smallfawn/decode_action +const $ = new Env("草莓台小程序签到"); +let envParams = "caomeitai_token", + envSplitor = ["\n", "&"], + authorizationToken = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || "", + initedJobForTokens = [], + currentUserIndex = 0; +class JobTask { + constructor(_0x2a8b2b) { + this.index = ++currentUserIndex; + this.points = 0; + this.valid = false; + this.userId = ""; + [this.openid, this.userId] = _0x2a8b2b?.["split"]("#"); + this.activedAuthToken = ""; + } + async ["taskApi"](_0x47ec4f, _0x4e5aeb, _0x574064, _0x2d47eb) { + let _0x4541cc = null; + try { + { + let _0x12da9e = { + "url": _0x574064, + "headers": { + "Accept": "*/*", + "Accept-Language": "zh-CN,zh", + "Connection": "keep-alive", + "Content-Type": "application/json", + "Host": "cmtv.xmay.cc", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "cross-site", + "referer": "https://servicewechat.com/wxc2a56f3a7492b8c4/145/page-frame.html", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/6945", + "xweb_xhr": "1" + }, + "timeout": 60000 + }; + this.activedAuthToken && (_0x12da9e.headers.Authorization = "Bearer " + this.activedAuthToken); + if (_0x2d47eb) { + _0x12da9e.body = _0x2d47eb; + _0x12da9e.headers["Content-Length"] = _0x2d47eb?.["length"]; + } + await httpRequest(_0x4e5aeb, _0x12da9e).then(async _0x5cd31a => { + { + if (_0x5cd31a.resp?.["statusCode"] == 200) { + if (_0x5cd31a.resp?.["body"]) _0x4541cc = JSON.parse(_0x5cd31a.resp.body);else {} + } else console.log("账号[" + this.index + "]调用" + _0x4e5aeb + "[" + _0x47ec4f + "]出错,返回状态码[" + (_0x5cd31a.resp?.["statusCode"] || "") + "]", "返回结果:", _0x5cd31a.resp?.["body"]); + } + }); + } + } catch (_0x24afeb) { + console.log(_0x24afeb); + } finally { + return Promise.resolve(_0x4541cc); + } + } + async ["LoginIn"]() { + try { + let _0x329bf1 = "LoginIn", + _0x168fa7 = "post", + _0x13d94a = "https://cmtv.xmay.cc/api/WX/login2", + _0x444be0 = "{\"id\":\"" + this.userId + "\",\"openid\":\"" + this.openid + "\"}"; + await this.taskApi(_0x329bf1, _0x168fa7, _0x13d94a, _0x444be0).then(async _0x257d58 => { + { + if (_0x257d58?.["token"]) { + this.activedAuthToken = _0x257d58?.["token"]; + this.valid = true; + this.points = _0x257d58?.["user"]["chbeanNum"] / 100; + this.userId = _0x257d58?.["user"]["id"]; + console.log("账号[" + this.index + "] 登录成功,昵称:" + _0x257d58?.["user"]["nickname"] + ",草莓币:" + _0x257d58?.["user"]["chbeanNum"] / 100); + } else console.log("账号[" + this.index + "] 登录失败", _0x257d58), this.valid = false; + } + }); + } catch (_0x28cd9b) { + console.log(_0x28cd9b); + } finally { + return Promise.resolve(1); + } + } + async ["GetUserTask"]() { + try { + { + let _0x45d636 = "GetUserTask", + _0x413c1c = "get", + _0x1e2fea = "https://cmtv.xmay.cc/api/registerInfo/checkRegister?userId=" + this.userId, + _0x29a6c7 = ""; + return await this.taskApi(_0x45d636, _0x413c1c, _0x1e2fea, _0x29a6c7).then(async _0x335edf => { + if (_0x335edf) { + if (!_0x335edf.isAfter) return console.log("账号[" + this.index + "] " + this.userId + " - 已经签到了,无需签到"), false; + console.log("账号[" + this.index + "] " + this.userId + " - 检测到还未签到"); + return true; + } else $.logAndNotify("账号[" + this.index + "] " + this.userId + " - 查询草莓币失败,可能帐号无效:" + JSON.stringify(_0x335edf)); + }); + } + } catch (_0x519874) { + console.log(_0x519874); + } + } + async ["SignInDaily"]() { + try { + let _0x3c8847 = "SignInDaily", + _0x43fe4c = "post", + _0x27aa7e = "https://cmtv.xmay.cc/api/registerInfo", + _0x20f926 = "{\"userId\":\"" + this.userId + "\"}"; + await this.taskApi(_0x3c8847, _0x43fe4c, _0x27aa7e, _0x20f926).then(async _0x3bb44f => { + { + if (_0x3bb44f?.["id"]) console.log("账号[" + this.index + "] 签到成功,获得" + _0x3bb44f.cmb + "草莓币,当前草莓币:" + (this.points + _0x3bb44f.cmb));else { + console.log("账号[" + this.index + "] 签到失败"); + } + } + }); + } catch (_0xe65438) { + console.log(_0xe65438); + } finally { + return Promise.resolve(1); + } + } + async ["doTask"]() { + try { + console.log("\n============= 账号[" + this.index + "] 开始签到============="); + (await this.GetUserTask()) && (await this.SignInDaily()); + } catch (_0x208f28) { + console.log(_0x208f28); + } + } +} +!(async () => { + if (typeof $request !== "undefined") await GetRewrite();else { + if (!(await checkEnv())) return; + console.log("\n================ 开始执行 ================"); + for (let _0x13b5ec of initedJobForTokens) { + console.log("----------- 执行 第 [" + _0x13b5ec.index + "] 个账号 -----------"); + await _0x13b5ec.LoginIn(); + } + let _0x183d17 = initedJobForTokens.filter(_0x57aa60 => _0x57aa60.valid); + if (_0x183d17.length > 0) { + { + console.log("\n================ 任务队列构建完毕 ================"); + for (let _0x50ca01 of _0x183d17) { + console.log("----------- 账号[" + _0x50ca01.index + "] -----------"); + await _0x50ca01.doTask(); + } + } + } else { + console.log("\n====幻生提示:无可用账号,请检查配置============ 任务结束 ================"); + } + await $.showmsg(); + } +})().catch(_0x337032 => console.log(_0x337032)).finally(() => $.done()); +async function GetRewrite() {} +async function checkEnv() { + if (authorizationToken) { + let _0x1a5c2c = envSplitor[0]; + for (let _0x3bab5c of envSplitor) { + if (authorizationToken.indexOf(_0x3bab5c) > -1) { + _0x1a5c2c = _0x3bab5c; + break; + } + } + for (let _0x2df51d of authorizationToken.split(_0x1a5c2c)) { + { + if (_0x2df51d) initedJobForTokens.push(new JobTask(_0x2df51d)); + } + } + userCount = initedJobForTokens.length; + } else { + console.log("未找到 配置信息,请检查是否配置 变量:", envParams); + return; + } + console.log("共找到" + userCount + "个账号"); + return true; +} +async function httpRequest(_0xc08f76, _0x506aa0) { + httpErr = null; + httpReq = null; + httpResp = null; + return new Promise(_0x31994f => { + $.send(_0xc08f76, _0x506aa0, async (_0x22f513, _0x1d7338, _0x2845eb) => { + httpErr = _0x22f513; + httpReq = _0x1d7338; + httpResp = _0x2845eb; + _0x31994f({ + "err": _0x22f513, + "req": _0x1d7338, + "resp": _0x2845eb + }); + }); + }); +} +function Env(_0x513ce9, _0x3f5b80) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); + return new class { + constructor(_0xe1e102, _0x737bae) { + this.name = _0xe1e102; + this.notifyStr = ""; + this.startTime = new Date().getTime(); + Object.assign(this, _0x737bae); + console.log(this.name + " 开始运行:\n"); + } + ["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; + } + ["getdata"](_0x4af141) { + let _0xf083dc = this.getval(_0x4af141); + if (/^@/.test(_0x4af141)) { + const [, _0x40f7e0, _0x1886d5] = /^@(.*?)\.(.*?)$/.exec(_0x4af141), + _0x13b49e = _0x40f7e0 ? this.getval(_0x40f7e0) : ""; + if (_0x13b49e) try { + const _0x3fbd1c = JSON.parse(_0x13b49e); + _0xf083dc = _0x3fbd1c ? this.lodash_get(_0x3fbd1c, _0x1886d5, "") : _0xf083dc; + } catch (_0x35b1b7) { + _0xf083dc = ""; + } + } + return _0xf083dc; + } + ["setdata"](_0x28bfb3, _0x322236) { + let _0x1d16d8 = false; + if (/^@/.test(_0x322236)) { + { + const [, _0x1d300b, _0x4d0d99] = /^@(.*?)\.(.*?)$/.exec(_0x322236), + _0x201be5 = this.getval(_0x1d300b), + _0x549465 = _0x1d300b ? "null" === _0x201be5 ? null : _0x201be5 || "{}" : "{}"; + try { + const _0x76924e = JSON.parse(_0x549465); + this.lodash_set(_0x76924e, _0x4d0d99, _0x28bfb3); + _0x1d16d8 = this.setval(JSON.stringify(_0x76924e), _0x1d300b); + } catch (_0x463f8b) { + const _0x4c1fab = {}; + this.lodash_set(_0x4c1fab, _0x4d0d99, _0x28bfb3); + _0x1d16d8 = this.setval(JSON.stringify(_0x4c1fab), _0x1d300b); + } + } + } else { + _0x1d16d8 = this.setval(_0x28bfb3, _0x322236); + } + return _0x1d16d8; + } + ["getval"](_0x57c252) { + return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x57c252) : this.isQuanX() ? $prefs.valueForKey(_0x57c252) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x57c252]) : this.data && this.data[_0x57c252] || null; + } + ["setval"](_0x134051, _0x4faa57) { + return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x134051, _0x4faa57) : this.isQuanX() ? $prefs.setValueForKey(_0x134051, _0x4faa57) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x4faa57] = _0x134051, this.writedata(), true) : this.data && this.data[_0x4faa57] || null; + } + ["send"](_0x1c870b, _0x5a3c06, _0x42ea8e = () => {}) { + { + if (_0x1c870b != "get" && _0x1c870b != "post" && _0x1c870b != "put" && _0x1c870b != "delete") { + console.log("无效的http方法:" + _0x1c870b); + return; + } + if (_0x1c870b == "get" && _0x5a3c06.headers) delete _0x5a3c06.headers["Content-Type"], delete _0x5a3c06.headers["Content-Length"];else { + if (_0x5a3c06.body && _0x5a3c06.headers) { + { + if (!_0x5a3c06.headers["Content-Type"]) _0x5a3c06.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + } + } + if (this.isSurge() || this.isLoon()) { + this.isSurge() && this.isNeedRewrite && (_0x5a3c06.headers = _0x5a3c06.headers || {}, Object.assign(_0x5a3c06.headers, { + "X-Surge-Skip-Scripting": false + })); + let _0x4a58cf = { + "method": _0x1c870b, + "url": _0x5a3c06.url, + "headers": _0x5a3c06.headers, + "timeout": _0x5a3c06.timeout, + "data": _0x5a3c06.body + }; + if (_0x1c870b == "get") delete _0x4a58cf.data; + $axios(_0x4a58cf).then(_0x376e23 => { + { + const { + status: _0x2633d7, + request: _0x1ee9f, + headers: _0x5588d1, + data: _0x56dfa3 + } = _0x376e23; + _0x42ea8e(null, _0x1ee9f, { + "statusCode": _0x2633d7, + "headers": _0x5588d1, + "body": _0x56dfa3 + }); + } + }).catch(_0x48f466 => console.log(_0x48f466)); + } else { + if (this.isQuanX()) _0x5a3c06.method = _0x1c870b.toUpperCase(), this.isNeedRewrite && (_0x5a3c06.opts = _0x5a3c06.opts || {}, Object.assign(_0x5a3c06.opts, { + "hints": false + })), $task.fetch(_0x5a3c06).then(_0x24a32b => { + { + const { + statusCode: _0x2ce309, + request: _0x553dee, + headers: _0x47ad1d, + body: _0x1d51d4 + } = _0x24a32b; + _0x42ea8e(null, _0x553dee, { + "statusCode": _0x2ce309, + "headers": _0x47ad1d, + "body": _0x1d51d4 + }); + } + }, _0x2b68b9 => _0x42ea8e(_0x2b68b9));else { + if (this.isNode()) { + { + this.got = this.got ? this.got : require("got"); + const { + url: _0x535b9e, + ..._0x16a812 + } = _0x5a3c06; + this.instance = this.got.extend({ + "followRedirect": false + }); + this.instance[_0x1c870b](_0x535b9e, _0x16a812).then(_0x1b5a14 => { + { + const { + statusCode: _0x2b7984, + request: _0x24596f, + headers: _0x17cbfd, + body: _0x18ca69 + } = _0x1b5a14; + _0x42ea8e(null, _0x24596f, { + "statusCode": _0x2b7984, + "headers": _0x17cbfd, + "body": _0x18ca69 + }); + } + }, _0x56154e => { + { + const { + message: _0x88f437, + request: _0x261d64, + response: _0x2cc23c + } = _0x56154e; + _0x42ea8e(_0x88f437, _0x261d64, _0x2cc23c); + } + }); + } + } + } + } + } + } + ["time"](_0x1b4234, _0x2e33d8 = null) { + let _0x13f44e = _0x2e33d8 ? new Date(_0x2e33d8) : new Date(), + _0xd1abb3 = { + "M+": _0x13f44e.getMonth() + 1, + "d+": _0x13f44e.getDate(), + "h+": _0x13f44e.getHours(), + "m+": _0x13f44e.getMinutes(), + "s+": _0x13f44e.getSeconds(), + "q+": Math.floor((_0x13f44e.getMonth() + 3) / 3), + "S": _0x13f44e.getMilliseconds() + }; + /(y+)/.test(_0x1b4234) && (_0x1b4234 = _0x1b4234.replace(RegExp.$1, (_0x13f44e.getFullYear() + "").substr(4 - RegExp.$1.length))); + for (let _0x12593f in _0xd1abb3) new RegExp("(" + _0x12593f + ")").test(_0x1b4234) && (_0x1b4234 = _0x1b4234.replace(RegExp.$1, 1 == RegExp.$1.length ? _0xd1abb3[_0x12593f] : ("00" + _0xd1abb3[_0x12593f]).substr(("" + _0xd1abb3[_0x12593f]).length))); + return _0x1b4234; + } + async ["showmsg"]() { + if (!this.notifyStr) return; + let _0x44fa77 = this.name + " 运行通知\n\n" + this.notifyStr; + if ($.isNode()) { + var _0x2a2ac8 = require("../sendNotify"); + console.log("\n============== 推送 =============="); + await _0x2a2ac8.sendNotify(this.name, _0x44fa77); + } else this.msg(_0x44fa77); + } + ["logAndNotify"](_0x147484) { + console.log(_0x147484); + this.notifyStr += _0x147484; + this.notifyStr += "\n"; + } + ["logAndNotifyWithTime"](_0x445549) { + { + let _0xb8cb7b = "[" + this.time("hh:mm:ss.S") + "]" + _0x445549; + console.log(_0xb8cb7b); + this.notifyStr += _0xb8cb7b; + this.notifyStr += "\n"; + } + } + ["logWithTime"](_0x3ee709) { + console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x3ee709); + } + ["msg"](_0x2fbece = t, _0x54b688 = "", _0x3bcc34 = "", _0x224c9d) { + const _0x1a3f75 = _0x250b42 => { + { + if (!_0x250b42) return _0x250b42; + if ("string" == typeof _0x250b42) return this.isLoon() ? _0x250b42 : this.isQuanX() ? { + "open-url": _0x250b42 + } : this.isSurge() ? { + "url": _0x250b42 + } : undefined; + if ("object" == typeof _0x250b42) { + if (this.isLoon()) { + let _0x207cc8 = _0x250b42.openUrl || _0x250b42.url || _0x250b42["open-url"], + _0x5139ba = _0x250b42.mediaUrl || _0x250b42["media-url"]; + return { + "openUrl": _0x207cc8, + "mediaUrl": _0x5139ba + }; + } + if (this.isQuanX()) { + let _0x49efdc = _0x250b42["open-url"] || _0x250b42.url || _0x250b42.openUrl, + _0x3e3764 = _0x250b42["media-url"] || _0x250b42.mediaUrl; + return { + "open-url": _0x49efdc, + "media-url": _0x3e3764 + }; + } + if (this.isSurge()) { + let _0x260a6d = _0x250b42.url || _0x250b42.openUrl || _0x250b42["open-url"]; + return { + "url": _0x260a6d + }; + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x2fbece, _0x54b688, _0x3bcc34, _0x1a3f75(_0x224c9d)) : this.isQuanX() && $notify(_0x2fbece, _0x54b688, _0x3bcc34, _0x1a3f75(_0x224c9d))); + let _0x1ab4e9 = ["", "============== 系统通知 =============="]; + _0x1ab4e9.push(_0x2fbece); + _0x54b688 && _0x1ab4e9.push(_0x54b688); + _0x3bcc34 && _0x1ab4e9.push(_0x3bcc34); + console.log(_0x1ab4e9.join("\n")); + } + ["getMin"](_0x111e23, _0x5d49a3) { + return _0x111e23 < _0x5d49a3 ? _0x111e23 : _0x5d49a3; + } + ["getMax"](_0x57a5cf, _0x4b6479) { + return _0x57a5cf < _0x4b6479 ? _0x4b6479 : _0x57a5cf; + } + ["padStr"](_0x1330d0, _0x447e5a, _0x1ce3d8 = "0") { + let _0x74cf55 = String(_0x1330d0), + _0x475acb = _0x447e5a > _0x74cf55.length ? _0x447e5a - _0x74cf55.length : 0, + _0x5dc5de = ""; + for (let _0x3735bb = 0; _0x3735bb < _0x475acb; _0x3735bb++) { + _0x5dc5de += _0x1ce3d8; + } + _0x5dc5de += _0x74cf55; + return _0x5dc5de; + } + ["json2str"](_0x2e906e, _0x548b9d, _0x156871 = false) { + let _0x485825 = []; + for (let _0xafaf11 of Object.keys(_0x2e906e).sort()) { + let _0x593dc4 = _0x2e906e[_0xafaf11]; + if (_0x593dc4 && _0x156871) _0x593dc4 = encodeURIComponent(_0x593dc4); + _0x485825.push(_0xafaf11 + "=" + _0x593dc4); + } + return _0x485825.join(_0x548b9d); + } + ["str2json"](_0x55e93e, _0x170529 = false) { + { + let _0x806c53 = {}; + for (let _0x5bc7b3 of _0x55e93e.split("&")) { + if (!_0x5bc7b3) continue; + let _0x2887cc = _0x5bc7b3.indexOf("="); + if (_0x2887cc == -1) continue; + let _0x4fc7f5 = _0x5bc7b3.substr(0, _0x2887cc), + _0x33ebe3 = _0x5bc7b3.substr(_0x2887cc + 1); + if (_0x170529) _0x33ebe3 = decodeURIComponent(_0x33ebe3); + _0x806c53[_0x4fc7f5] = _0x33ebe3; + } + return _0x806c53; + } + } + ["randomString"](_0xc6b621, _0x555c1b = "abcdef0123456789") { + let _0x447945 = ""; + for (let _0x5b26e3 = 0; _0x5b26e3 < _0xc6b621; _0x5b26e3++) { + _0x447945 += _0x555c1b.charAt(Math.floor(Math.random() * _0x555c1b.length)); + } + return _0x447945; + } + ["randomList"](_0x39e14e) { + { + let _0x30db5e = Math.floor(Math.random() * _0x39e14e.length); + return _0x39e14e[_0x30db5e]; + } + } + ["wait"](_0x39530a) { + return new Promise(_0x40404a => setTimeout(_0x40404a, _0x39530a)); + } + ["done"](_0x38e142 = {}) { + const _0x3168b5 = new Date().getTime(), + _0xd54e2e = (_0x3168b5 - this.startTime) / 1000; + console.log("\n" + this.name + " 运行结束,共运行了 " + _0xd54e2e + " 秒!"); + if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x38e142); + } + }(_0x513ce9, _0x3f5b80); +} \ No newline at end of file diff --git a/xiaosatonglu.js b/xiaosatonglu.js new file mode 100644 index 0000000..d458310 --- /dev/null +++ b/xiaosatonglu.js @@ -0,0 +1,449 @@ + +/** + * cron 5 15 * * * + * Show: 每天0.6 + * 变量名:账号密码 + * 变量值: + + */ + +const $ = new Env("潇洒桐庐"); +const notify = $.isNode() ? require("./sendNotify") : ""; +let ckName = "xiaosa"; +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = "&"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class UserInfo { + constructor(str) { + this.index = ++userIdx; + //this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.artList = [] + this.accountId = null; + this.sessionId = null; + this.channelId = [`6530daf779f6be358bba1522`, `6530dae171a9ed74577e4689`, `6530db1e71a9ed74577e468e`]; + this.round = 1; + this.num = null; + this.mobile = str.split(strSplitor)[0]; + this.password = str.split(strSplitor)[1]; + this.code = null; + this.username = null; + this.wxopenId = null; + //定义在这里的headers会被get请求删掉content-type 而不会重置 + } + + async main() { + $.log(`------开始${this.mobile}------`) + await this.getCode() + if (this.code !== null) { + await this.login() + if (this.accountId !== null && this.sessionId !== null) { + await this.user_info() + if (this.wxopenId !== "" && this.wxopenId !== null) { + await this.art_list(this.channelId[0]); + this.round = 1; + if (this.artList.length == 0) { + await this.art_list(this.channelId[1]); + this.round = 2; + } + if (this.artList.length == 0) { + await this.art_list(this.channelId[2]); + this.round = 3; + } + + if (this.artList.length !== 0) { + this.num = this.artList.length + for (let artId of this.artList) { + await this.read_status(artId) + if (this.artReadStatus == true) { + console.log(`已阅读${artId}`) + await this.read_task(artId) + } else if (this.artReadStatus == false) { + console.log(`未阅读${artId}`) + await this.do_read(artId) + await $.wait(5000) + await this.read_task(artId) + } + } + await this.lottery_num() + } + + } else { + $.log(`未绑定微信`) + } + //await this.lottery_task() + + } + } + + + } + async getCode() { + try { + let options = { + fn: "获取登录code", + method: "post", + url: `https://passport.tmuyun.com/web/oauth/credential_auth`, + headers: { + 'Host': 'passport.tmuyun.com', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Accept-Encoding': 'gzip, deflate, br' + }, + body: `client_id=10017&password=${encodeURIComponent(this.rsa_encrypt(this.password))}&phone_number=${this.mobile}` + }; + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == 0) { + //console.log(result.data.authorization_code.code) + this.code = result.data.authorization_code.code + } else { + + } + } catch (e) { + console.log(e); + } + } + async login() { + try { + let host_data = `/api/zbtxz/login` + let REQUEST_ID = this.getUUID(); + let TIMESTAMP = Date.now(); + let s = `${host_data}&&6565886da95d5a47f651317f&&${REQUEST_ID}&&${TIMESTAMP}&&FR*r!isE5W&&59` + //console.log(s) + let SIGNATURE = this.SHA256_Encrypt(s) + let options = { + fn: "登录", + method: 'post', + url: `https://vapp.tmuyun.com/api/zbtxz/login`, + headers: { + 'X-SESSION-ID': `6565886da95d5a47f651317f`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': `59`, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + body: `check_token=&code=${this.code}&token=&type=-1&union_id=` + }; + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result) + if (result.code == 0) { + this.sessionId = result.data.session.id + this.accountId = result.data.session.account_id + this.username = result.data.account.nick_name + } else { + + } + } catch (e) { + console.log(e); + } + } + async user_info() { + try { + let options = { + fn: "信息查询", + method: "get", + url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/home/TmApi/getUserInformation&accountId=${this.accountId}&username=${encodeURIComponent(this.username)}&type=jsonp`, + headers: this.get_headers(), + }; + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == 0) { + this.wxopenId = result.data.userid + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + async read_status(articleId) { + try { + let options = { + fn: "阅读状态", + method: "get", + url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/home/TmApi/getUserRead&accountId=${this.accountId}&articleId=${articleId}&type=jsonp`, + headers: this.get_headers(), + }; + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.read_effective == 1) { + this.artReadStatus = true; + await this.read_task(articleId) + } else if (result.read_effective == 0) { + this.artReadStatus = false; + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + //console.log(e); + } + } + async read_task(articleId) { + try { + let options = { + fn: "阅读执行", + method: "get", + url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=home/baoming/postBaoming/&activityId=428&name=${this.accountId}&city=${articleId}&gender=${this.round}&cellphone=${this.mobile}&type=jsonp`, + headers: this.get_headers(), + }; + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == 0) { + //console.log(`✅阅读回调成功🎉`); + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async lottery_num() { + try { + let options = { + fn: "抽奖查询", + method: "get", + url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/home/TmApi/addPrizenum&accountId=${this.accountId}&round=${this.round}&num=${this.num}&type=jsonp`, + headers: this.get_headers(), + }; + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + console.log(result); + if (result.code == "0") { + //console.log(`✅账号[${this.index}] 欢迎用户: ${result.errcode}🎉`); + $.log(`✅可以抽奖咯!🎉`); + await this.lottery_task() + } else { + console.log(`❌[${options.fn}]失败`); + console.log(JSON.stringify(result)); + } + } catch (e) { + console.log(e); + } + } + + async lottery_task() { + let expando = "jQuery" + ("1.7.1" + Math.random()).replace(/\D/g, ""); + let time1 = new Date().getTime(); + let time2 = new Date().getTime(); + try { + let options = { + fn: "执行抽奖", + method: "get", + url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/Home/ChoujiangNew/apiChoujiang&callback=${expando}_${time1}&openId=${this.accountId}&action=cj&typeId=122&address=&userid=${this.wxopenId}&_=${time2}`, + headers: this.get_headers(), + }; + let { body: result } = await httpRequest(options); + //console.log(options); + //result = JSON.parse(result); + result = result.replace(`${expando}_${time1}`, "") + result = result.replace(`(`, "") + result = result.replace(`)`, "") + result = JSON.parse(result) + $.log(JSON.stringify(result)) + } catch (e) { + console.log(e); + } + } + // + + async art_list(channelId) { + try { + let options = { + fn: "文章列表", + method: "get", + url: `https://wxapi.hoolo.tv/event/dtqp/index.php?s=/home/TmApi/channelList&channelId=${channelId}&userId=${this.accountId}&sessionId=${this.sessionId}`, + headers: this.get_headers(), + }; + //console.log(options); + let { body: result } = await httpRequest(options); + //console.log(options); + //console.log(result); + result = JSON.parse(result); + //console.log(result); + for (let art of result) { + //console.log(art.id) + this.artList.push(art.id) + } + + } catch (e) { + console.log(e); + } + } + getUUID() { + 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); + }); + } + SHA256_Encrypt(str) { + const crypto = require('crypto'); + return crypto.createHash("sha256").update(str).digest('hex'); + } + async do_read(articleId) { + let host_data = `/api/article/detail` + let REQUEST_ID = this.getUUID(); + let TIMESTAMP = Date.now(); + let s = `${host_data}&&${this.sessionId}&&${REQUEST_ID}&&${TIMESTAMP}&&FR*r!isE5W&&59` + let SIGNATURE = this.SHA256_Encrypt(s) + let options = { + fn: "阅读文章", + method: 'get', + url: `https://vapp.tmuyun.com/api/article/detail?id=${articleId}`, + headers: { + 'X-SESSION-ID': `${this.sessionId}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': `59`, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + try { + + let { body: result } = await httpRequest(options); + //console.log(options); + result = JSON.parse(result); + //console.log(result); + if (result.code == "0") { + console.log(`阅读成功`) + } + + } catch (e) { + console.log(e); + } + } + rsa_encrypt(data) { + //创建RSA加密对象 + global["window"] = {} + const JSEncrypt = require("jsencrypt") + var encrypt = new JSEncrypt(); + //设置公钥 + var publicKey = "-----BEGIN PUBLIC KEY-----\n" + + "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD6XO7e9YeAOs+cFqwa7ETJ+WXizPqQeXv68i5vqw9pFREsrqiBTRcg7wB0RIp3rJkDpaeVJLsZqYm5TW7FWx/iOiXFc+zCPvaKZric2dXCw27EvlH5rq+zwIPDAJHGAfnn1nmQH7wR3PCatEIb8pz5GFlTHMlluw4ZYmnOwg+thwIDAQAB\n" + + "-----END PUBLIC KEY-----"; + encrypt.setPublicKey(publicKey); + + //使用公钥进行加密 + return encrypt.encrypt(data); + } + get_headers() { + return { + 'Host': 'wxapi.hoolo.tv', + 'Accept': 'application/json, text/javascript, /; q=0.01', + '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/81.0.4044.138 Mobile Safari/537.36;xsb_xiaosatonglu;xsb_xiaosatonglu;1.0.60;native_app;6.5.1', + 'Origin': 'https://tp.hoolo.tv', + 'X-Requested-With': 'com.chinamcloud.wangjie.b87d8fb20e29a0328c6e21045e8b500e', + 'Sec-Fetch-Site': 'same-site', + 'Sec-Fetch-Mode': 'cors', + 'Sec-Fetch-Dest': 'empty', + 'Referer': 'https://tp.hoolo.tv/h5/tlread/index.html', + 'Accept-Encoding': 'gzip, deflate', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' + } + + } +} + +async function start() { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(await user.main()); + } + } + await Promise.all(taskall); +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg($.logs.join("\n")); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + //let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options) { + if (!options["method"]) { + return console.log(`请求方法不存在`); + } + if (!options["fn"]) { + console.log(`函数名不存在`); + } + return new Promise((resolve) => { + $[options.method](options, (err, resp, data) => { + try { + if (err) { + $.logErr(err); + } else { + try { + resp = JSON.parse(resp); + } catch (error) { } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(resp); + } + }); + }); +} +async function SendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message); + } else { + $.msg($.name, "", message); + } +} +// prettier-ignore +function Env(t, s) { return new (class { constructor(t, s) { (this.name = t), (this.data = null), (this.dataFile = "box.dat"), (this.logs = []), (this.logSeparator = "\n"), (this.startTime = new Date().getTime()), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name},\u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise((s) => { this.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise((e) => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (o = o ? 1 * o : 20), (o = s && s.timeout ? s.timeout : o); const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" }, }; this.post(r, (t, s, i) => e(i)) }).catch((t) => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { (this.fs = this.fs ? this.fs : require("fs")), (this.path = this.path ? this.path : require("path")); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), (s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), t)[s[s.length - 1]] = e), t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? ("null" === h ? null : h || "{}") : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)) } catch (s) { const h = {}; this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)) } } else e = this.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? ((this.data = this.loaddata()), this.data[t]) : (this.data && this.data[t]) || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? ((this.data = this.loaddata()), (this.data[s] = t), this.writedata(), !0) : (this.data && this.data[s]) || null } initGotEnv(t) { (this.got = this.got ? this.got : require("got")), (this.cktough = this.cktough ? this.cktough : require("tough-cookie")), (this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar()), t && ((t.headers = t.headers ? t.headers : {}), void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = () => { }) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), (s.cookieJar = this.ckjar) } catch (t) { this.logErr(t) } }).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h, } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t))) } post(t, s = () => { }) { if ((t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon())) $httpClient.post(t, (t, e, i) => { !t && e && ((e.body = i), (e.statusCode = e.status)), s(t, e, i) }); else if (this.isQuanX()) (t.method = "POST"), $task.fetch(t).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then((t) => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, (t) => s(t)) } } time(t) { let s = { "M+": new Date().getMonth() + 1, "d+": new Date().getDate(), "H+": new Date().getHours(), "m+": new Date().getMinutes(), "s+": new Date().getSeconds(), "q+": Math.floor((new Date().getMonth() + 3) / 3), S: new Date().getMilliseconds(), }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (new Date().getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = (t) => !t || (!this.isLoon() && this.isSurge()) ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o))); let logs = ['', '==============📣系统通知📣==============']; logs.push(t); e ? logs.push(e) : ''; i ? logs.push(i) : ''; console.log(logs.join('\n')); this.logs = this.logs.concat(logs) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name},\u9519\u8bef!`, t) } wait(t) { return new Promise((s) => setTimeout(s, t)) } done(t = {}) { const s = new Date().getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } })(t, s) } diff --git a/xinxi.js b/xinxi.js new file mode 100644 index 0000000..ae4b4da --- /dev/null +++ b/xinxi.js @@ -0,0 +1,651 @@ +/** + * cron 9 9 * * * xx.js + * 变量名: xinxi + * 每天运行一次就行 + * 报错是正常情况 + * 变量值:api.xinc818.com 请求头中sso的值 多账户&或者换行 + */ + +const $ = new Env("心喜"); +const notify = $.isNode() ? require('./sendNotify') : ''; +let ckName = "xinxi"; +let envSplitor = ["&", "\n"]; //多账号分隔符 +let strSplitor = "#"; //多变量分隔符 +let userIdx = 0; +let userList = []; +class Task { + constructor(str) { + this.index = ++userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + this.userId = null + this.artList = [] + this.goodsList = [] + } + async main() { + + await this.user_info(); + if (this.ckStatus == true) { + await this.task_signin(); + await this.task_lottery() + await this.task_share() + await this.task_goods() + await this.art_list() + if (this.artList.length > 0) { + await this.task_follow(this.artList[0]) + } + await this.goods_list() + if (this.goodsList.length > 0) { + await this.task_like(this.goodsList[0]) + } + + } + + } + + async task_signin() { + try { + let result = await this.taskRequest("get", `https://api.xinc818.com/mini/sign/in?dailyTaskId=`) + //console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 签到状态【${result.data.flag}】获得积分【${result.data.integral}】🎉`) + } else { + console.log(`❌账号[${this.index}] 签到状态【false】`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + async user_info() { + try { + let result = await this.taskRequest("get", `https://api.xinc818.com/mini/user`) + //console.log(options); + console.log(result); + if (result.code == 0) { + $.log(`✅账号[${this.index}] 【${result.data.nickname}】积分【${result.data.integral}】🎉`) + this.userId = result.data.id + } else { + console.log(`❌账号[${this.index}] 用户查询【false】`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + //浏览30sAPI + async task_goods() { + try { + let result = await this.taskRequest("get", `https://api.xinc818.com/mini/dailyTask/browseGoods/22`) + //console.log(options); + console.log(result); + if (result.code == 0) { + if (result.data !== null) { + $.log(`✅账号[${this.index}] 完成浏览30s成功 获得【${result.data.singleReward}】`) + + } else { + console.log(`❌账号[${this.index}] 完成浏览30s任务失败`); + } + + } else { + console.log(`❌账号[${this.index}] 完成浏览30s任务失败`); + + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + //想要任务API + async task_like(id) { + console.log(`https://api.xinc818.com/mini/integralGoods/${id}?type=`) + try { + let goodsResult = await this.taskRequest("get", `https://api.xinc818.com/mini/integralGoods/${id}?type=`) + if (goodsResult.data) { + let likeResult = await this.taskRequest("post", `https://api.xinc818.com/mini/live/likeLiveItem`, { "isLike": true, "dailyTaskId": 20, "productId": Number(goodsResult.data.outerId) }) + //console.log(options); + console.log(likeResult); + if (likeResult.code == 0) { + if (likeResult.data !== null) { + $.log(`✅账号[${this.index}] 完成点击想要任务成功 获得【${likeResult.data.singleReward}】`) + + } else { + console.log(`❌账号[${this.index}] 完成点击想要任务失败`); + } + } else { + console.log(`❌账号[${this.index}] 完成点击想要任务失败`); + console.log(likeResult); + } + } + + + } catch (e) { + console.log(e); + } + } + + //关注用户API + async task_follow(pusherId) { + console.log(pusherId) + try { + let result = await this.taskRequest("post", `https://api.xinc818.com/mini/user/follow`, { "decision": true, "followUserId": pusherId }) + //console.log(options); + console.log(result); + if (result.code == 0) { + if (result.data !== null) { + $.log(`✅账号[${this.index}] 完成关注用户任务成功 获得【${result.data.singleReward}】`) + } else { + console.log(`❌账号[${this.index}] 完成关注用户任务失败`); + } + } else { + console.log(`❌账号[${this.index}] 完成关注用户任务失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + //抽奖API + async task_lottery() { + try { + let result = await this.taskRequest("post", `https://api.xinc818.com/mini/lottery/draw`, { "activity": 61, "batch": false, "isIntegral": false, "userId": Number(this.userId), "dailyTaskId": 9 }) + //console.log(options); + console.log(result); + if (result.code == 0) { + if (result.data !== null) { + $.log(`✅账号[${this.index}] 完成抽奖成功 获得【${result.data.taskResult.singleReward}】积分 奖品【${result.data.lotteryResult.integral}】`) + + } else { + console.log(`❌账号[${this.index}] 完成抽奖失败`); + } + } else { + console.log(`❌账号[${this.index}] 完成抽奖失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + //分享API + async task_share() { + try { + let result = await this.taskRequest("get", `https://api.xinc818.com/mini/dailyTask/share`) + //console.log(options); + console.log(result); + if (result.code == 0) { + if (result.data !== null) { + $.log(`✅账号[${this.index}] 完成分享成功 获得【${result.data.singleReward}】`) + + } else { + console.log(`❌账号[${this.index}] 完成分享失败`); + } + } else { + console.log(`❌账号[${this.index}] 完成分享失败`); + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + //获取帖子列表API(包含用户和帖子) + async art_list() { + try { + let result = await this.taskRequest("get", `https://cdn-api.xinc818.com/mini/posts/sorts?sortType=COMMENT&pageNum=1&pageSize=10&groupClassId=0`) + //console.log(options); + console.log(result); + if (result.code == 0) { + if (result.data.list.length > 0) { + for (let i = 0; i < 2; i++) + this.artList.push(result.data.list[i].publisherId) + } + } else { + + console.log(result); + } + } catch (e) { + console.log(e); + } + } + //获取商品API + async goods_list() { + try { + let result = await this.taskRequest("get", `https://cdn-api.xinc818.com/mini/integralGoods?orderField=sort&orderScheme=DESC&pageSize=10&pageNum=1`) + //console.log(options); + console.log(result); + if (result.code == 0) { + if (result.data.list.length > 0) { + for (let i = 0; i < 2; i++) + this.goodsList.push(result.data.list[i].id) + } + } else { + + console.log(result); + } + } catch (e) { + console.log(e); + } + } + + async taskRequest(method, url, body = "") { + // + let headers = { + //"Host": "api.xinc818.com", + "Connection": "keep-alive", + "charset": "utf-8", + "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/116.0.0.0 Mobile Safari/537.36 XWEB/1160027 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android", + "content-type": "application/json", + "Accept-Encoding": "gzip,compress,br,deflate", + "sso": this.ck, + "Referer": "https://servicewechat.com/wx673f827a4c2c94fa/253/page-frame.html" + } + const reqeuestOptions = { + url: url, + method: method, + headers: headers + } + if (method !== "get") { + if (headers["Content-Type"] == "application/json") { + reqeuestOptions["body"] = JSON.stringify(body); + } else { + reqeuestOptions["body"] = body + } + } + let { body: result } = await $.httpRequest(reqeuestOptions) + return result + } +} + + + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + let taskall = []; + for (let user of userList) { + if (user.ckStatus) { + taskall.push(user.main()); + } + } + await Promise.all(taskall); + } + await $.sendMsg($.logs.join("\n")) +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + if (userCookie) { + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new Task(n)); + } else { + console.log(`未找到CK【${ckName}】`); + return; + } + return console.log(`共找到${userList.length}个账号`), true; //true == !0 +} +function Env(t, s) { + return new (class { + constructor(t, s) { + this.name = t; + this.data = null; + this.dataFile = "box.dat"; + this.logs = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`); + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + isQuanX() { + return "undefined" != typeof $task; + } + isSurge() { + return "undefined" != typeof $httpClient && "undefined" == typeof $loon; + } + isLoon() { + return "undefined" != typeof $loon; + } + loaddata() { + if (!this.isNode()) return {}; + { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s); + if (!e && !i) return {}; + { + const i = e ? t : s; + try { + return JSON.parse(this.fs.readFileSync(i)); + } catch (t) { + return {}; + } + } + } + } + writedata() { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require("fs"); + this.path = this.path ? this.path : require("path"); + const t = this.path.resolve(this.dataFile), + s = this.path.resolve(process.cwd(), this.dataFile), + e = this.fs.existsSync(t), + i = !e && this.fs.existsSync(s), + o = JSON.stringify(this.data); + e ? this.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o); + } + } + lodash_get(t, s, e) { + const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); + let o = t; + for (const t of i) if (((o = Object(o)[t]), void 0 === o)) return e; + return o; + } + lodash_set(t, s, e) { + return Object(t) !== t + ? t + : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), + (s + .slice(0, -1) + .reduce( + (t, e, i) => + Object(t[e]) === t[e] + ? t[e] + : (t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}), + t +)[s[s.length - 1]] = e), + t); + } + getdata(t) { + let s = this.getval(t); + if (/^@/.test(t)) { + const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), + o = e ? this.getval(e) : ""; + if (o) + try { + const t = JSON.parse(o); + s = t ? this.lodash_get(t, i, "") : s; + } catch (t) { + s = ""; + } + } + return s; + } + setdata(t, s) { + let e = !1; + if (/^@/.test(s)) { + const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), + h = this.getval(i), + a = i ? ("null" === h ? null : h || "{}") : "{}"; + try { + const s = JSON.parse(a); + this.lodash_set(s, o, t), (e = this.setval(JSON.stringify(s), i)); + } catch (s) { + const h = {}; + this.lodash_set(h, o, t), (e = this.setval(JSON.stringify(h), i)); + } + } else e = this.setval(t, s); + return e; + } + getval(t) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.read(t); + } else if (this.isQuanX()) { + return $prefs.valueForKey(t); + } else if (this.isNode()) { + this.data = this.loaddata(); + return this.data[t]; + } else { + return this.data && this.data[t] || null; + } + } + setval(t, s) { + if (this.isSurge() || this.isLoon()) { + return $persistentStore.write(t, s); + } else if (this.isQuanX()) { + return $prefs.setValueForKey(t, s); + } else if (this.isNode()) { + this.data = this.loaddata(); + this.data[s] = t; + this.writedata(); + return true; + } else { + return this.data && this.data[s] || null; + } + } + initGotEnv(t) { + this.got = this.got ? this.got : require("got"); + this.cktough = this.cktough ? this.cktough : require("tough-cookie"); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (t) { + t.headers = t.headers ? t.headers : {}; + if (typeof t.headers.Cookie === "undefined" && typeof t.cookieJar === "undefined") { + t.cookieJar = this.ckjar; + } + } + } + /** + * @param {Object} options + * @returns {String} 将 Object 对象 转换成 queryStr: key=val&name=senku + */ + queryStr(options) { + return Object.entries(options) + .map(([key, value]) => `${key}=${typeof value === 'object' ? JSON.stringify(value) : value}`) + .join('&'); + } + //从url获取参数组成json + 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 { + var obj = JSON.parse(str); + if (typeof obj == 'object' && obj) { + return true; + } else { + return false; + } + } catch (e) { + return false; + } + } + isJson(obj) { + var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length; + return isjson; + } + async sendMsg(message) { + if (!message) return; + if ($.isNode()) { + await notify.sendNotify($.name, message) + } else { + $.msg($.name, '', message) + } + } + async httpRequest(options) { + let t = { + ...options + }; + if (!t.headers) { + t.headers = {} + } + if (t.params) { + t.url += '?' + this.queryStr(t.params); + } + t.method = t.method.toLowerCase(); + if (t.method === 'get') { + delete t.headers['Content-Type']; + delete t.headers['Content-Length']; + delete t.headers['content-type']; + delete t.headers['content-length']; + delete t["body"] + } + if (t.method === 'post') { + let ContentType; + if (!t.body) { + t.body = "" + } else { + if (typeof t.body == "string") { + if (this.isJSONString(t.body)) { + ContentType = 'application/json' + } else { + ContentType = 'application/x-www-form-urlencoded' + } + } else if (this.isJson(t.body)) { + t.body = JSON.stringify(t.body); + ContentType = 'application/json'; + } + } + if (!t.headers['Content-Type'] || !t.headers['content-type']) { + t.headers['Content-Type'] = ContentType; + } + delete t.headers['Content-Length']; + } + if (this.isNode()) { + this.initGotEnv(t); + let httpResult = await this.got(t); + if (this.isJSONString(httpResult.body)) { + httpResult.body = JSON.parse(httpResult.body) + } + return httpResult; + } + if (this.isQuanX()) { + t.method = t.method.toUpperCase() + return new Promise((resolve, reject) => { + $task.fetch(t).then(response => { + if (this.isJSONString(response.body)) { + response.body = JSON.parse(response.body) + } + resolve(response) + }) + }) + } + } + randomNumber(length) { + const characters = '0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + randomString(length) { + const characters = 'abcdefghijklmnopqrstuvwxyz0123456789'; + return Array.from({ length }, () => characters[Math.floor(Math.random() * characters.length)]).join(''); + } + timeStamp() { + return new Date().getTime() + } + uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : (r & 0x3 | 0x8); + return v.toString(16); + }); + } + time(t) { + let s = { + "M+": new Date().getMonth() + 1, + "d+": new Date().getDate(), + "H+": new Date().getHours(), + "m+": new Date().getMinutes(), + "s+": new Date().getSeconds(), + "q+": Math.floor((new Date().getMonth() + 3) / 3), + S: new Date().getMilliseconds(), + }; + /(y+)/.test(t) && + (t = t.replace( + RegExp.$1, + (new Date().getFullYear() + "").substr(4 - RegExp.$1.length) +)); + for (let e in s) + new RegExp("(" + e + ")").test(t) && + (t = t.replace( + RegExp.$1, + 1 == RegExp.$1.length + ? s[e] + : ("00" + s[e]).substr(("" + s[e]).length) +)); + return t; + } + msg(s = t, e = "", i = "", o) { + const h = (t) => + !t || (!this.isLoon() && this.isSurge()) + ? t + : "string" == typeof t + ? this.isLoon() + ? t + : this.isQuanX() + ? { "open-url": t } + : void 0 + : "object" == typeof t && (t["open-url"] || t["media-url"]) + ? this.isLoon() + ? t["open-url"] + : this.isQuanX() + ? t + : void 0 + : void 0; + this.isMute || + (this.isSurge() || this.isLoon() + ? $notification.post(s, e, i, h(o)) + : this.isQuanX() && $notify(s, e, i, h(o))); + let logs = ['', '==============📣系统通知📣==============']; + logs.push(t); + e ? logs.push(e) : ''; + i ? logs.push(i) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + log(...t) { + t.length > 0 && (this.logs = [...this.logs, ...t]), + console.log(t.join(this.logSeparator)); + } + logErr(t, s) { + const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); + e + ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) + : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t); + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + done(t = {}) { + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + "", + `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2` +) + this.log() + if (this.isNode()) { + process.exit(1) + } + if (this.isQuanX()) { + $done(t) + } + } + })(t, s); +} diff --git a/yidongyunpan.py b/yidongyunpan.py new file mode 100644 index 0000000..7a61d8b --- /dev/null +++ b/yidongyunpan.py @@ -0,0 +1,861 @@ +# 脚本名称: [中国移动云盘] +# 功能描述: [签到 基础任务 果园 云朵大作战] +# 使用说明: +# - [抓包 Cookie:任意Authorization] +# - [注意事项: 简易方法,开抓包进App,搜refresh,找到authTokenRefresh.do ,请求头中的Authorization,响应体 xxx 中xxx值(新版加密抓这个)] +# 环境变量设置: +# - 名称:[ydypCK] 格式:[Authorization值#手机号#token值] +# - 多账号处理方式:[换行或者@分割] +# 定时设置: [0 0 8,16,20 * * *] +# 更新日志: +# - [1.30]: [同一环境变量获取] +# 注: 本脚本仅用于个人学习和交流,请勿用于非法用途。作者不承担由于滥用此脚本所引起的任何责任,请在下载后24小时内删除。 +# new Env("移动云盘") +# 作者: 洋洋不瘦 +import os +import random +import re +import time +from os import path + +import requests + +ua = 'Mozilla/5.0 (Linux; Android 11; M2012K10C Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.210 Mobile Safari/537.36 MCloudApp/10.0.1' + +err_accounts = '' # 异常账号 +err_message = '' # 错误信息 +user_amount = '' # 用户云朵·数量 +GLOBAL_DEBUG = False + + +# 发送通知 +def load_send(): + cur_path = path.abspath(path.dirname(__file__)) + notify_file = cur_path + "/notify.py" + + if path.exists(notify_file): + try: + from notify import send # 导入模块的send为notify_send + print("加载通知服务成功!") + return send # 返回导入的函数 + except ImportError: + print("加载通知服务失败~") + else: + print("加载通知服务失败~") + + return False # 返回False表示未成功加载通知服务 + + +class YP: + def __init__(self, cookie): + self.notebook_id = None + self.note_token = None + self.note_auth = None + self.click_num = 15 # 定义抽奖次数和摇一摇戳一戳次数 + self.draw = 1 # 抽奖次数,首次免费 + self.session = requests.Session() + + self.timestamp = str(int(round(time.time() * 1000))) + self.cookies = {'sensors_stay_time': self.timestamp} + self.Authorization = cookie.split("#")[0] + self.account = cookie.split("#")[1] + self.auth_token = cookie.split("#")[2] + self.encrypt_account = self.account[:3] + "*" * 4 + self.account[7:] + self.fruit_url = 'https://happy.mail.10086.cn/jsp/cn/garden/' + + self.jwtHeaders = { + 'User-Agent': ua, + 'Accept': '*/*', + 'Host': 'caiyun.feixin.10086.cn:7071', + } + self.treeHeaders = { + 'Host': 'happy.mail.10086.cn', + 'Accept': 'application/json, text/plain, */*', + 'User-Agent': ua, + 'Referer': 'https://happy.mail.10086.cn/jsp/cn/garden/wap/index.html?sourceid=1003', + 'Cookie': '', + } + + # 捕获异常 + + def catch_errors(func): + def wrapper(self, *args, **kwargs): + try: + return func(self, *args, **kwargs) + except Exception as e: + global err_message + print("错误:", str(e)) + err_message += f'用户[{self.encrypt_account}]:{e}\n' # 错误信息 + return None + + return wrapper + + @catch_errors + def run(self): + if self.jwt(): + self.signin_status() + self.click() + # 任务 + self.get_tasklist(url = 'sign_in_3', app_type = 'cloud_app') + print(f'\n☁️ 云朵大作战') + self.cloud_game() + print(f'\n🌳 果园任务') + self.fruitLogin() + print(f'\n📰 公众号任务') + self.wxsign() + self.shake() + self.surplus_num() + print(f'\n🔥 热门任务') + self.backup_cloud() + self.open_send() + print(f'\n📧 139邮箱任务') + self.get_tasklist(url = 'newsign_139mail', app_type = 'email_app') + self.receive() + else: + global err_accounts + # 失效账号 + err_accounts += f'{self.encrypt_account}\n' + + @catch_errors + def send_request(self, url, headers=None, cookies=None, data=None, params=None, method='GET', debug=None, + retries=5): + + debug = debug if debug is not None else GLOBAL_DEBUG + + self.session.headers.update(headers or {}) + if cookies: + self.session.cookies.update(cookies) + request_args = {'json': data} if isinstance(data, dict) else {'data': data} + + for attempt in range(retries): + try: + response = self.session.request(method, url, params = params, **request_args) + response.raise_for_status() + if debug: + print(f'\n【{url}】响应数据:\n{response.text}') + return response + except (requests.RequestException, ConnectionError, TimeoutError) as e: + print(f"请求异常: {e}") + if attempt >= retries - 1: + print("达到最大重试次数。") + return None + time.sleep(1) + + # 随机延迟默认1-1.5s + def sleep(self, min_delay=1, max_delay=1.5): + delay = random.uniform(min_delay, max_delay) + time.sleep(delay) + + # 日志 + def log_info(self, err_msg=None, amount=None): + global err_message, user_amount + if err_msg is not None: + err_message += f'用户[{self.encrypt_account}]:{err_msg}\n' # 错误信息 + elif amount is not None: + user_amount += f'用户[{self.encrypt_account}]:{amount}\n' # 云朵数量 + + # 刷新令牌 + def sso(self): + sso_url = 'https://orches.yun.139.com/orchestration/auth-rebuild/token/v1.0/querySpecToken' + sso_headers = { + 'Authorization': self.Authorization, + 'User-Agent': ua, + 'Content-Type': 'application/json', + 'Accept': '*/*', + 'Host': 'orches.yun.139.com' + } + sso_payload = {"account": self.account, "toSourceId": "001005"} + sso_data = self.send_request(sso_url, headers = sso_headers, data = sso_payload, method = 'POST').json() + + if sso_data['success']: + refresh_token = sso_data['data']['token'] + return refresh_token + else: + print(sso_data['message']) + return None + + # jwt + def jwt(self): + # 获取jwttoken + token = self.sso() + if token is not None: + + jwt_url = f"https://caiyun.feixin.10086.cn:7071/portal/auth/tyrzLogin.action?ssoToken={token}" + jwt_data = self.send_request(jwt_url, headers = self.jwtHeaders, method = 'POST').json() + if jwt_data['code'] != 0: + print(jwt_data['msg']) + return False + self.jwtHeaders['jwtToken'] = jwt_data['result']['token'] + self.cookies['jwtToken'] = jwt_data['result']['token'] + return True + else: + print('-ck可能失效了') + return False + + # 签到查询 + @catch_errors + def signin_status(self): + self.sleep() + check_url = 'https://caiyun.feixin.10086.cn/market/signin/page/info?client=app' + check_data = self.send_request(check_url, headers = self.jwtHeaders, cookies = self.cookies).json() + if check_data['msg'] == 'success': + today_sign_in = check_data['result'].get('todaySignIn', False) + + if today_sign_in: + print('✅已签到') + else: + print('❌ 未签到') + signin_url = 'https://caiyun.feixin.10086.cn/market/manager/commonMarketconfig/getByMarketRuleName?marketName=sign_in_3' + signin_data = self.send_request(signin_url, headers = self.jwtHeaders, + cookies = self.cookies).json() + + if signin_data['msg'] == 'success': + print('✅签到成功') + else: + print(signin_data['msg']) + self.log_info(signin_data['msg']) + else: + print(check_data['msg']) + self.log_info(check_data['msg']) + + # 戳一下 + def click(self): + url = "https://caiyun.feixin.10086.cn/market/signin/task/click?key=task&id=319" + successful_click = 0 # 获得次数 + + try: + for _ in range(self.click_num): + return_data = self.send_request(url, headers = self.jwtHeaders, cookies = self.cookies).json() + time.sleep(0.2) + + if 'result' in return_data: + print(f'✅{return_data["result"]}') + successful_click += 1 + + if successful_click == 0: + print(f'❌未获得 x {self.click_num}') + except Exception as e: + print(f'错误信息:{e}') + + # 刷新笔记token + @catch_errors + def refresh_notetoken(self): + note_url = 'http://mnote.caiyun.feixin.10086.cn/noteServer/api/authTokenRefresh.do' + note_payload = { + "authToken": self.auth_token, + "userPhone": self.account + } + note_headers = { + 'X-Tingyun-Id': 'p35OnrDoP8k;c=2;r=1122634489;u=43ee994e8c3a6057970124db00b2442c::8B3D3F05462B6E4C', + 'Charset': 'UTF-8', + 'Connection': 'Keep-Alive', + 'User-Agent': 'mobile', + 'APP_CP': 'android', + 'CP_VERSION': '3.2.0', + 'x-huawei-channelsrc': '10001400', + 'Host': 'mnote.caiyun.feixin.10086.cn', + 'Content-Type': 'application/json; charset=UTF-8', + 'Accept-Encoding': 'gzip' + } + + try: + response = self.send_request(note_url, headers = note_headers, data = note_payload, method = "POST") + response.raise_for_status() + except requests.exceptions.RequestException as e: + print('出错了:', e) + return + + self.note_token = response.headers.get('NOTE_TOKEN') + self.note_auth = response.headers.get('APP_AUTH') + + # 任务列表 + def get_tasklist(self, url, app_type): + url = f'https://caiyun.feixin.10086.cn/market/signin/task/taskList?marketname={url}' + return_data = self.send_request(url, headers = self.jwtHeaders, cookies = self.cookies).json() + self.sleep() + # 任务列表 + task_list = return_data.get('result', {}) + + try: + for task_type, tasks in task_list.items(): + if task_type in ["new", "hidden", "hiddenabc"]: + continue + if app_type == 'cloud_app': + if task_type == "month": + print('\n📆 云盘每月任务') + for month in tasks: + task_id = month.get('id') + if task_id in [110, 113, 417, 409]: + continue + task_name = month.get('name', '') + task_status = month.get('state', '') + + if task_status == 'FINISH': + print(f'-已完成: {task_name}') + continue + print(f'-去完成: {task_name}') + self.do_task(task_id, task_type = 'month', app_type = 'cloud_app') + time.sleep(2) + elif task_type == "day": + print('\n📆 云盘每日任务') + for day in tasks: + task_id = day.get('id') + if task_id == 404: + continue + task_name = day.get('name') + task_status = day.get('state', '') + + if task_status == 'FINISH': + print(f'-已完成: {task_name}') + continue + print(f'-去完成: {task_name}') + self.do_task(task_id, task_type = 'day', app_type = 'cloud_app') + elif app_type == 'email_app': + if task_type == "month": + print('\n📆 139邮箱每月任务') + for month in tasks: + task_id = month.get('id') + task_name = month.get('name', '') + task_status = month.get('state', '') + if task_id in [1004, 1005, 1015, 1020]: + continue + + if task_status == 'FINISH': + print(f'-已完成: {task_name}') + continue + print(f'-去完成: {task_name}') + self.do_task(task_id, task_type = 'month', app_type = 'email_app') + time.sleep(2) + except Exception as e: + print(f'错误信息:{e}') + + # 做任务 + @catch_errors + def do_task(self, task_id, task_type, app_type): + self.sleep() + task_url = f'https://caiyun.feixin.10086.cn/market/signin/task/click?key=task&id={task_id}' + self.send_request(task_url, headers = self.jwtHeaders, cookies = self.cookies) + + if app_type == 'cloud_app': + if task_type == 'day': + if task_id == 106: + print('-开始上传文件,默认0kb') + self.updata_file() + elif task_id == 107: + self.refresh_notetoken() + print('-获取默认笔记id') + note_url = 'http://mnote.caiyun.feixin.10086.cn/noteServer/api/syncNotebookV3.do' + headers = { + 'X-Tingyun-Id': 'p35OnrDoP8k;c=2;r=1122634489;u=43ee994e8c3a6057970124db00b2442c::8B3D3F05462B6E4C', + 'Charset': 'UTF-8', + 'Connection': 'Keep-Alive', + 'User-Agent': 'mobile', + 'APP_CP': 'android', + 'CP_VERSION': '3.2.0', + 'x-huawei-channelsrc': '10001400', + 'APP_NUMBER': self.account, + 'APP_AUTH': self.note_auth, + 'NOTE_TOKEN': self.note_token, + 'Host': 'mnote.caiyun.feixin.10086.cn', + 'Content-Type': 'application/json; charset=UTF-8', + 'Accept': '*/*' + } + payload = { + "addNotebooks": [], + "delNotebooks": [], + "notebookRefs": [], + "updateNotebooks": [] + } + return_data = self.send_request(url = note_url, headers = headers, data = payload, + method = 'POST').json() + if return_data is None: + return print('出错了') + self.notebook_id = return_data['notebooks'][0]['notebookId'] + print('开始创建笔记') + self.create_note(headers) + elif task_type == 'month': + pass + elif app_type == 'email_app': + if task_type == 'month': + pass + + # 上传文件 + @catch_errors + def updata_file(self): + url = 'http://ose.caiyun.feixin.10086.cn/richlifeApp/devapp/IUploadAndDownload' + headers = { + 'x-huawei-uploadSrc': '1', + 'x-ClientOprType': '11', + 'Connection': 'keep-alive', + 'x-NetType': '6', + 'x-DeviceInfo': '6|127.0.0.1|1|10.0.1|Xiaomi|M2012K10C|CB63218727431865A48E691BFFDB49A1|02-00-00-00-00-00|android 11|1080X2272|zh||||032|', + 'x-huawei-channelSrc': '10000023', + 'x-MM-Source': '032', + 'x-SvcType': '1', + 'APP_NUMBER': self.account, + 'Authorization': self.Authorization, + 'X-Tingyun-Id': 'p35OnrDoP8k;c=2;r=1955442920;u=43ee994e8c3a6057970124db00b2442c::8B3D3F05462B6E4C', + 'Host': 'ose.caiyun.feixin.10086.cn', + 'User-Agent': 'okhttp/3.11.0', + 'Content-Type': 'application/xml; charset=UTF-8', + 'Accept': '*/*' + } + payload = ''' + + {phone} + 1 + 1 + + + 0 + + + 1 + + C4CA4238A0B923820DCC509A6F75849B + + 0 + 0 + + + + + + 0 + + 2 + + + + + '''.format(phone = self.account) + + response = requests.post(url = url, headers = headers, data = payload) + if response is None: + return + if response.status_code != 200: + return print('-上传失败') + print('-上传文件成功') + + # 创建笔记 + def create_note(self, headers): + note_id = self.get_note_id(32) # 获取随机笔记id + createtime = str(int(round(time.time() * 1000))) + time.sleep(3) + updatetime = str(int(round(time.time() * 1000))) + note_url = 'http://mnote.caiyun.feixin.10086.cn/noteServer/api/createNote.do' + payload = { + "archived": 0, + "attachmentdir": note_id, + "attachmentdirid": "", + "attachments": [], + "audioInfo": { + "audioDuration": 0, + "audioSize": 0, + "audioStatus": 0 + }, + "contentid": "", + "contents": [{ + "contentid": 0, + "data": "000000", + "noteId": note_id, + "sortOrder": 0, + "type": "RICHTEXT" + }], + "cp": "", + "createtime": createtime, + "description": "android", + "expands": { + "noteType": 0 + }, + "latlng": "", + "location": "", + "noteid": note_id, + "notestatus": 0, + "remindtime": "", + "remindtype": 1, + "revision": "1", + "sharecount": "0", + "sharestatus": "0", + "system": "mobile", + "tags": [{ + "id": self.notebook_id, + "orderIndex": "0", + "text": "默认笔记本" + }], + "title": "00000", + "topmost": "0", + "updatetime": updatetime, + "userphone": self.account, + "version": "1.00", + "visitTime": "" + } + create_note_data = self.send_request(note_url, headers = headers, data = payload, method = "POST") + if create_note_data.status_code == 200: + print('-创建笔记成功') + else: + print('-创建失败') + + # 笔记id + def get_note_id(self, length): + characters = '19f3a063d67e4694ca63a4227ec9a94a19088404f9a28084e3e486b928039a299bf756ebc77aa4f6bfa250308ec6a8be8b63b5271a00350d136d117b8a72f39c5bd15cdfd350cba4271dc797f15412d9f269e666aea5039f5049d00739b320bb9e8585a008b52c1cbd86970cae9476446f3e41871de8d9f6112db94b05e5dc7ea0a942a9daf145ac8e487d3d5cba7cea145680efc64794d43dd15c5062b81e1cda7bf278b9bc4e1b8955846e6bc4b6a61c28f831f81b2270289e5a8a677c3141ddc9868129060c0c3b5ef507fbd46c004f6de346332ef7f05c0094215eae1217ee7c13c8dca6d174cfb49c716dd42903bb4b02d823b5f1ff93c3f88768251b56cc' + note_id = ''.join(random.choice(characters) for _ in range(length)) + return note_id + + # 公众号签到 + @catch_errors + def wxsign(self): + self.sleep() + url = 'https://caiyun.feixin.10086.cn/market/playoffic/followSignInfo?isWx=true' + return_data = self.send_request(url, headers = self.jwtHeaders, cookies = self.cookies).json() + + if return_data['msg'] != 'success': + return print(return_data['msg']) + if not return_data['result'].get('todaySignIn'): + return print('❌签到失败,可能未绑定公众号') + return print('✅签到成功') + + # 摇一摇 + def shake(self): + url = "https://caiyun.feixin.10086.cn:7071/market/shake-server/shake/shakeIt?flag=1" + successful_shakes = 0 # 记录成功摇中的次数 + + try: + for _ in range(self.click_num): + return_data = self.send_request(url = url, cookies = self.cookies, headers = self.jwtHeaders, + method = 'POST').json() + time.sleep(1) + shake_prize_config = return_data["result"].get("shakePrizeconfig") + + if shake_prize_config: + print(f"🎉摇一摇获得: {shake_prize_config['name']}") + successful_shakes += 1 + except Exception as e: + print(f'错误信息: {e}') + if successful_shakes == 0: + print(f'❌未摇中 x {self.click_num}') + + # 查询剩余抽奖次数 + @catch_errors + def surplus_num(self): + self.sleep() + draw_info_url = 'https://caiyun.feixin.10086.cn/market/playoffic/drawInfo' + draw_url = "https://caiyun.feixin.10086.cn/market/playoffic/draw" + + draw_info_data = self.send_request(draw_info_url, headers = self.jwtHeaders).json() + + if draw_info_data.get('msg') == 'success': + remain_num = draw_info_data['result'].get('surplusNumber', 0) + print(f'剩余抽奖次数{remain_num}') + if remain_num > 50 - self.draw: + for _ in range(self.draw): + self.sleep() + draw_data = self.send_request(url = draw_url, headers = self.jwtHeaders).json() + + if draw_data.get("code") == 0: + prize_name = draw_data["result"].get("prizeName", "") + print("✅抽奖成功,获得:" + prize_name) + else: + print("❌抽奖失败") + else: + pass + else: + print(draw_info_data.get('msg')) + self.log_info(draw_info_data.get('msg')) + + # 果园专区 + @catch_errors + def fruitLogin(self): + token = self.sso() + if token is not None: + print("-果园专区token刷新成功") + self.sleep() + login_info_url = f'{self.fruit_url}login/caiyunsso.do?token={token}&account={self.account}&targetSourceId=001208&sourceid=1003&enableShare=1' + headers = { + 'Host': 'happy.mail.10086.cn', + 'Upgrade-Insecure-Requests': '1', + 'User-Agent': ua, + 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'Referer': 'https://caiyun.feixin.10086.cn:7071/', + 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7' + } + loginInfoData = requests.request("GET", login_info_url, headers = headers) + treeCookie = loginInfoData.request.headers['Cookie'] + self.treeHeaders['cookie'] = treeCookie + + do_login_url = f'{self.fruit_url}login/userinfo.do' + doLoginData = self.send_request(do_login_url, headers = self.treeHeaders).json() + if doLoginData.get('result', {}).get('islogin') != 1: + return print('❌果园登录失败') + # 去做果园任务 + self.fruitTask() + else: + print("果园专区token刷新失败") + + # 任务查询 + @catch_errors + def fruitTask(self): + # 签到任务 + check_sign_data = self.send_request(f'{self.fruit_url}task/checkinInfo.do', + headers = self.treeHeaders).json() + if check_sign_data.get('success'): + today_checkin = check_sign_data.get('result', {}).get('todayCheckin', 0) + if today_checkin == 1: + print('-果园今日已签到') + else: + checkin_data = self.send_request(f'{self.fruit_url}task/checkin.do', + headers = self.treeHeaders).json() + if checkin_data.get('result', {}).get('code', '') == 1: + print('-果园签到成功') + self.sleep() + water_data = self.send_request(f'{self.fruit_url}user/clickCartoon.do?cartoonType=widget', + headers = self.treeHeaders).json() + color_data = self.send_request(f'{self.fruit_url}user/clickCartoon.do?cartoonType=color', + headers = self.treeHeaders).json() + given_water = water_data.get('result', {}).get('given', 0) + print(f'-领取每日水滴: {given_water}') + print(f'-每日雨滴:{color_data.get("result").get("msg")}') + else: + print('-果园签到查询失败:', check_sign_data.get('msg', '')) + + # 获取任务列表 + task_list_data = self.send_request(f'{self.fruit_url}task/taskList.do?clientType=PE', + headers = self.treeHeaders).json() + task_state_data = self.send_request(f'{self.fruit_url}task/taskState.do', headers = self.treeHeaders).json() + task_state_result = task_state_data.get('result', []) + + task_list = task_list_data.get('result', []) + + for task in task_list: + task_id = task.get('taskId', '') + task_name = task.get('taskName', '') + water_num = task.get('waterNum', 0) + if task_id == 2002 or task_id == 2003: + continue + + task_state = next( + (state.get('taskState', 0) for state in task_state_result if state.get('taskId') == task_id), 0) + + if task_state == 2: + print(f'-已完成: {task_name}') + else: + self.do_fruit_task(task_name, task_id, water_num) + + # 果树信息 + self.tree_info() + + # 做任务 + @catch_errors + def do_fruit_task(self, task_name, task_id, water_num): + print(f'-去完成: {task_name}') + do_task_url = f'{self.fruit_url}task/doTask.do?taskId={task_id}' + do_task_data = self.send_request(do_task_url, headers = self.treeHeaders).json() + + if do_task_data.get('success'): + get_water_url = f'{self.fruit_url}task/givenWater.do?taskId={task_id}' + get_water_data = self.send_request(get_water_url, headers = self.treeHeaders).json() + + if get_water_data.get('success'): + print(f'-已完成任务获得水滴: {water_num}') + else: + print(f'❌领取失败: {get_water_data.get("msg", "")}') + else: + print(f'❌参与任务失败: {do_task_data.get("msg", "")}') + + # 果树信息 + @catch_errors + def tree_info(self): + treeinfo_url = f'{self.fruit_url}user/treeInfo.do' + treeinfo_data = self.send_request(treeinfo_url, headers = self.treeHeaders).json() + + if not treeinfo_data.get('success'): + error_message = treeinfo_data.get('msg', '获取果园任务列表失败') + print(error_message) + else: + collect_water = treeinfo_data.get('result', {}).get('collectWater', 0) + tree_level = treeinfo_data.get('result', {}).get('treeLevel', 0) + print(f'-当前小树等级: {tree_level} 剩余水滴: {collect_water}') + if tree_level in (2, 4, 6, 8): + # 开宝箱 + openbox_url = f'{self.fruit_url}prize/openBox.do' + openbox_data = self.send_request(openbox_url, headers = self.treeHeaders).json() + print(f'- {openbox_data.get("result").get("msg")}') + + watering_amount = collect_water // 20 # 计算需要浇水的次数 + watering_url = f'{self.fruit_url}user/watering.do?isFast=0' + if watering_amount > 0: + for _ in range(watering_amount): + watering_data = self.send_request(watering_url, headers = self.treeHeaders).json() + if watering_data.get('success'): + print('✔️ 浇水成功') + time.sleep(3) + else: + print('-水滴不足!') + + # 云朵大作战 + @catch_errors + def cloud_game(self): + game_info_url = 'https://caiyun.feixin.10086.cn/market/signin/hecheng1T/info?op=info' + bigin_url = 'https://caiyun.feixin.10086.cn/market/signin/hecheng1T/beinvite' + end_url = 'https://caiyun.feixin.10086.cn/market/signin/hecheng1T/finish?flag=true' + + game_info_data = self.send_request(game_info_url, headers = self.jwtHeaders, cookies = self.cookies).json() + if game_info_data and game_info_data.get('code', -1) == 0: + currnum = game_info_data.get('result', {}).get('info', {}).get('curr', 0) + count = game_info_data.get('result', {}).get('history', {}).get('0', {}).get('count', '') + rank = game_info_data.get('result', {}).get('history', {}).get('0', {}).get('rank', '') + + print(f'今日剩余游戏次数: {currnum}\n本月排名: {rank} 合成次数: {count}') + + for _ in range(currnum): + self.send_request(bigin_url, headers = self.jwtHeaders, cookies = self.cookies).json() + print('-开始游戏,等待10-15秒完成游戏') + time.sleep(random.randint(10, 15)) + end_data = self.send_request(end_url, headers = self.jwtHeaders, cookies = self.cookies).json() + if end_data and end_data.get('code', -1) == 0: + print('游戏成功') + else: + print("-获取游戏信息失败") + + # 领取云朵 + @catch_errors + def receive(self): + receive_url = "https://caiyun.feixin.10086.cn/market/signin/page/receive" + prize_url = f"https://caiyun.feixin.10086.cn/market/prizeApi/checkPrize/getUserPrizeLogPage?currPage=1&pageSize=15&_={self.timestamp}" + receive_data = self.send_request(receive_url, headers = self.jwtHeaders, cookies = self.cookies).json() + self.sleep() + prize_data = self.send_request(prize_url, headers = self.jwtHeaders, cookies = self.cookies).json() + result = prize_data.get('result').get('result') + rewards = '' + for value in result: + prizeName = value.get('prizeName') + flag = value.get('flag') + if flag == 1: + rewards += f'-待领取奖品: {prizeName}\n' + + receive_amount = receive_data["result"].get("receive", "") + total_amount = receive_data["result"].get("total", "") + print(f'\n-当前待领取:{receive_amount}云朵') + print(f'-当前云朵数量:{total_amount}云朵') + msg = f'云朵数量:{total_amount} \n{rewards}' + self.log_info(amount = msg) + + # 备份云朵 + @catch_errors + def backup_cloud(self): + backup_url = 'https://caiyun.feixin.10086.cn/market/backupgift/info' + backup_data = self.send_request(backup_url, headers = self.jwtHeaders).json() + state = backup_data.get('result', {}).get('state', '') + if state == -1: + print('本月未备份,暂无连续备份奖励') + + elif state == 0: + print('-领取本月连续备份奖励') + cur_url = 'https://caiyun.feixin.10086.cn/market/backupgift/receive' + cur_data = self.send_request(cur_url, headers = self.jwtHeaders).json() + print(f'-获得云朵数量:{cur_data.get("result").get("result")}') + + elif state == 1: + print('-已领取本月连续备份奖励') + self.sleep() + expend_url = 'https://caiyun.feixin.10086.cn/market/signin/page/taskExpansion' # 每月膨胀云朵 + expend_data = self.send_request(expend_url, headers = self.jwtHeaders, cookies = self.cookies).json() + + curMonthBackup = expend_data.get('result', {}).get('curMonthBackup', '') # 本月备份 + preMonthBackup = expend_data.get('result', {}).get('preMonthBackup', '') # 上月备份 + curMonthBackupTaskAccept = expend_data.get('result', {}).get('curMonthBackupTaskAccept', '') # 本月是否领取 + nextMonthTaskRecordCount = expend_data.get('result', {}).get('nextMonthTaskRecordCount', '') # 下月备份云朵 + acceptDate = expend_data.get('result', {}).get('acceptDate', '') # 月份 + + if curMonthBackup: + print(f'- 本月已备份,下月可领取膨胀云朵: {nextMonthTaskRecordCount}') + else: + print('- 本月还未备份,下月暂无膨胀云朵') + + if preMonthBackup: + if curMonthBackupTaskAccept: + print('- 上月已备份,膨胀云朵已领取') + else: + # 领取 + receive_url = f'https://caiyun.feixin.10086.cn/market/signin/page/receiveTaskExpansion?acceptDate={acceptDate}' + receive_data = self.send_request(receive_url, headers = self.jwtHeaders, + cookies = self.cookies).json() + if receive_data.get("code") != 0: + print(f'-领取失败:{receive_data.get("msg")}') + else: + cloudCount = receive_data.get('result', {}).get('cloudCount', '') + print(f'- 膨胀云朵领取成功: {cloudCount}朵') + else: + print('-上月未备份,本月无膨胀云朵领取') + + # # 开启备份 + # def open_backup(self): + + # 通知云朵 + @catch_errors + def open_send(self): + send_url = 'https://caiyun.feixin.10086.cn/market/msgPushOn/task/status' + send_data = self.send_request(send_url, headers = self.jwtHeaders).json() + + pushOn = send_data.get('result', {}).get('pushOn', '') # 0未开启,1开启,2未领取,3已领取 + firstTaskStatus = send_data.get('result', {}).get('firstTaskStatus', '') + secondTaskStatus = send_data.get('result', {}).get('secondTaskStatus', '') + onDuaration = send_data.get('result', {}).get('onDuaration', '') # 开启时间 + + if pushOn == 1: + reward_url = 'https://caiyun.feixin.10086.cn/market/msgPushOn/task/obtain' + + if firstTaskStatus == 3: + print('- 任务1奖励已领取') + else: + # 领取任务1 + print('- 领取任务1奖励') + reward1_data = self.send_request(reward_url, headers = self.jwtHeaders, data = {"type": 1}, + method = "POST").json() + print(reward1_data.get('result', {}).get('description', '')) + + if secondTaskStatus == 2: + # 领取任务2 + print('- 领取任务2奖励') + reward2_data = self.send_request(reward_url, headers = self.jwtHeaders, data = {"type": 2}, + method = "POST").json() + print(reward2_data.get('result', {}).get('description', '')) + + print(f'- 通知已开启天数: {onDuaration}, 满31天可领取奖励') + else: + print('- 通知权限未开启') + + +if __name__ == "__main__": + env_name = 'ydypCK' + token = os.getenv(env_name) + if not token: + print(f'⛔️未获取到ck变量:请检查变量 {env_name} 是否填写') + exit(0) + + cookies = re.split(r'[@\n]', token) + print(f"移动硬盘共获取到{len(cookies)}个账号") + + for i, account_info in enumerate(cookies, start = 1): + print(f"\n======== ▷ 第 {i} 个账号 ◁ ========") + YP(account_info).run() + print("\n随机等待5-10s进行下一个账号") + time.sleep(random.randint(5, 10)) + + # 输出异常账号信息 + if err_accounts != '': + print(f"\n失效账号:\n{err_accounts}") + else: + print('当前所有账号ck有效') + if err_message != '': + print(f'-错误信息: \n{err_message}') + print(user_amount) + # 在load_send中获取导入的send函数 + send = load_send() + + # 判断send是否可用再进行调用 + if send: + msg = f"失效账号:\n{err_accounts}\n-错误信息:\n{err_message}\n-云朵数量: \n{user_amount}" + send('中国移动云盘任务信息', msg) + else: + print('通知服务不可用') diff --git a/yingsheng.js b/yingsheng.js new file mode 100644 index 0000000..511d76b --- /dev/null +++ b/yingsheng.js @@ -0,0 +1,807 @@ +/* +硬声 +注册登录之后,设置密码,把手机密码填到yingshengAccount里 +多账户换行或者@隔开,格式:account=13888888888&password=xxxxxxxx +一天至少三次 +*/ +const jsname = '硬声' +const $ = new Env(jsname); + +var CryptoJS = require("crypto-js"); + +let envSplitor = ['\n', '@'] +let httpResult, httpReq, httpResp + +let userCookie = ($.isNode() ? process.env.yingshengAccount : $.getdata('yingshengAccount')) || ''; +let userList = [] + +let userIdx = 0 +let userCount = 0 + +let TASK_WAIT_TIME = 1000 + +let param_version = '2.8.0' +let param_platform = 'ios' +let salt = 'lw0270iBJzxXdJLRtePEENsauRzkHSqm' +let AES_method = 'AES' +let AES_mode = 'CBC' +let AES_padding = 'Pkcs7' +let AES_key = 'q09cRVOPCnfJzt7p' +let AES_IV = 'cnry8k3o4WdCGU1T' +/////////////////////////////////////////////////////////////////// +class UserInfo { + constructor(str) { + this.index = ++userIdx + this.name = this.index + this.valid = false + + this.params = $.str2json(str) + this.auth = '' + this.user_id = '' + this.device_id = $.randomString(32) + this.userIdList = [] + } + + calculateSign_yingsheng(param) { + param['Authorization'] = this.auth + param['platform'] = 'h5' + param['timestamp'] = Math.floor(Date.now() / 1000) + param['sign'] = SHA1Encrypt(salt + SHA1Encrypt($.json2str(param, '&')) + this.auth) + return param; + } + + calculateSign_ysapi(param) { + param['Authorization'] = this.auth + param['platform'] = param_platform + param['timestamp'] = Math.floor(Date.now() / 1000) + param['sign'] = SHA1Encrypt(AES_IV + AES_key + SHA1Encrypt($.json2str(param, '&', true) + AES_IV + AES_key) + this.auth) + param['version'] = param_version + return param; + } + + async login() { + try { + let pwd = EncryptCrypto(AES_method, AES_mode, AES_padding, this.params.password, AES_key, AES_IV) + let param = { 'account': this.params.account, 'password': pwd, 'device_id': this.device_id } + let url = `https://ysapi.elecfans.com/api/sso/accountLogin` + let body = $.json2str(param, '&', true) + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + this.valid = true + this.name = result.data.mobile + this.coins = result.data.coins + this.auth = result.data.Authorization + this.user_id = result.data.user_id + console.log(`登录成功`) + console.log(`手机:${this.name}`) + console.log(`硬币:${this.coins}`) + } else { + console.log(`登录失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async getInfo() { + try { + let param = { 'user_id': this.user_id } + let url = `https://ysapi.elecfans.com/api/member/getInfo?${$.json2str(param, '&')}` + let body = `` + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('get', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + this.coins = result.data.coins + console.log(`硬币:${this.coins}`) + } else { + console.log(`查询账户失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async getSignStatus() { + try { + let param = { 'date': '' } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/signin/data?${$.json2str(param, '&')}` + let body = `` + param = this.calculateSign_yingsheng(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('get', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + if (result.data.data.today_is_sign == 1) { + console.log(`今日已签到`) + } else { + console.log(`今日未签到`) + await $.wait(TASK_WAIT_TIME); + await this.signin(); + } + } else { + console.log(`查询签到状态失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async signin() { + try { + let param = { 'date': '' } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/signin/signin` + let body = JSON.stringify(param) + param = this.calculateSign_yingsheng(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + console.log(`签到成功,获得${result.data.coins}硬币`) + } else { + console.log(`签到失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + //com_status: 10,11 -- 未完成, 12 -- 待领取, 13 -- 已完成 + async getTaskList() { + try { + let param = {} + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/task/dailyList` + let body = `` + param = this.calculateSign_yingsheng(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('get', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + await $.wait(TASK_WAIT_TIME); + await this.recommendList(); + for (let key in result.data) { + let task = result.data[key] + if (task.title.includes('发布作品') || task.title.includes('作品播放量')) continue; + if (task.title.indexOf('观看作品') > -1) { + for (let idx in task.step) { + if (task.step[idx].com_status == 12) { + await $.wait(TASK_WAIT_TIME); + await this.receiveCoin(task); + break; + } else if (task.step[idx].com_status != 13) { + await $.wait(TASK_WAIT_TIME); + await this.viewVideoAdd(idx); + await $.wait(TASK_WAIT_TIME); + await this.receiveCoin(task); + break; + } + } + } else { + for (let idx in task.step) { + let step = task.step[idx] + if (step.com_status == 10) { + await $.wait(TASK_WAIT_TIME); + await this.taskReceive(task); + } + if (step.com_status == 12) { + await $.wait(TASK_WAIT_TIME); + await this.receiveCoin(task); + } else if (step.com_status != 13) { + let num = step.condition < 25 ? (step.condition - step.finish_progress) : 1 + let getReward = true; + for (let i = 0; i < num; i++) { + if (task.title.indexOf('点赞') > -1) { + let rndIdx = Math.floor(Math.random() * 2000) + 8000 + await $.wait(TASK_WAIT_TIME); + await this.thumbsup(rndIdx); + await $.wait(TASK_WAIT_TIME); + await this.thumbsup(rndIdx); + } else if (task.title.indexOf('观看直播') > -1) { + await $.wait(TASK_WAIT_TIME); + await this.finishLive(); + } else if (task.title.indexOf('关注') > -1) { + let uid = this.userIdList[i] ? this.userIdList[i] : Math.floor(Math.random() * 100000) + 4900000 + await $.wait(TASK_WAIT_TIME); + await this.doFollow(uid, 1); + await $.wait(TASK_WAIT_TIME); + await this.doFollow(uid, 2); + } else { + getReward = false; + } + } + if (getReward) { + await $.wait(TASK_WAIT_TIME); + await this.receiveCoin(task); + } + } + break; + } + } + } + } else { + console.log(`查询任务列表失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async taskReceive(task) { + try { + let param = { 'type': task.type } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/task/receive` + let body = JSON.stringify(param) + param = this.calculateSign_yingsheng(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + console.log(`开始任务[${task.title}]成功`) + } else { + console.log(`开始任务[${task.title}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async receiveCoin(task) { + try { + let param = { 'type': task.type } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/task/receiveCoin` + let body = JSON.stringify(param) + param = this.calculateSign_yingsheng(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + console.log(`领取任务[${task.title}]奖励获得${result.data.coins}硬币`) + } else { + console.log(`领取任务[${task.title}]奖励失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async thumbsup(video_id) { + try { + let param = { 'video_id': video_id } + let url = `https://ysapi.elecfans.com/api/video/publish/thumbsup` + let body = $.json2str(param, '&') + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + console.log(`${result.data.msg}: video_id=${video_id}`) + } else { + console.log(`点赞[video_id=${video_id}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async viewVideoAdd(step) { + try { + let param = { 'step': step } + let url = `https://ysapi.elecfans.com/api/activity/task/viewVideo/add` + let body = $.json2str(param, '&') + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + console.log(`刷新看视频进度[step=${step}]成功`) + } else { + console.log(`刷新看视频进度[step=${step}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async finishLive() { + try { + let param = {} + let url = `https://ysapi.elecfans.com/api/activity/task/live/finish` + let body = `` + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + console.log(`完成观看直播任务成功`) + } else { + console.log(`完成观看直播任务失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async recommendList() { + try { + let param = { page: 1 } + let url = `https://ysapi.elecfans.com/api/recommend/video/index?page=1` + let body = `` + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('get', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + if (result.code == 0) { + for (let item of result.data.data) { + this.userIdList.push(item.user_id) + } + } else { + console.log(`获取推荐列表失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async doFollow(user_id, type) { + try { + let param = { 'user_id': user_id, 'type': type } + let url = `https://ysapi.elecfans.com/api/member/follow` + let body = $.json2str(param, '&') + param = this.calculateSign_ysapi(param) + let urlObject = populateUrlObject(url, param, body) + await httpRequest('post', urlObject) + let result = httpResult; + if (!result) return + //console.log(result) + let str = type == 1 ? '关注' : '取消关注' + if (result.code == 0) { + console.log(`${str}用户[${user_id}]成功`) + } else { + console.log(`${str}用户[${user_id}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async userTask() { + console.log(`\n============= 账号[${this.index}] =============`) + await this.login(); + if (!this.valid) return; + console.log(`----------- 签到 -----------`) + await $.wait(TASK_WAIT_TIME); + await this.getSignStatus(); + console.log(`----------- 任务 -----------`) + await $.wait(TASK_WAIT_TIME); + await this.getTaskList(); + return; + console.log(`----------- 积分 -----------`) + await $.wait(TASK_WAIT_TIME); + await this.getInfo(); + } +} + +!(async () => { + if (typeof $request !== "undefined") { + await GetRewrite() + } else { + //let nowtime = $.time('yyyy-MM-dd hh:mm:ss'); + //console.log(nowtime); + + if (!(await checkEnv())) return; + + for (let user of userList) { + await user.userTask(); + } + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()) + +/////////////////////////////////////////////////////////////////// +async function GetRewrite() { + +} + +async function checkEnv() { + if (userCookie) { + let splitor = envSplitor[0]; + for (let sp of envSplitor) { + if (userCookie.indexOf(sp) > -1) { + splitor = sp; + break; + } + } + for (let userCookies of userCookie.split(splitor)) { + if (userCookies) userList.push(new UserInfo(userCookies)) + } + userCount = userList.length + } else { + console.log('未找到CK') + return; + } + + console.log(`共找到${userCount}个账号`) + return true +} + +//////////////////////////////////////////////////////////////////// +function populateUrlObject(url, param, body = '') { + let host = url.replace('//', '/').split('/')[1] + let urlObject = { + url: url, + headers: { + 'Host': host, + 'Connection': 'keep-alive', + 'Authorization': param.Authorization, + 'timestamp': param.timestamp, + 'sign': param.sign, + 'platform': param.platform, + 'version': param.version, + }, + timeout: 5000, + } + if (body) { + urlObject.body = body + urlObject.headers['Content-Type'] = 'application/x-www-form-urlencoded' + if (host == 'yingsheng.elecfans.com') urlObject.headers['Content-Type'] = 'application/json;charset=utf-8' + urlObject.headers['Content-Length'] = urlObject.body ? urlObject.body.length : 0 + } + return urlObject; +} + +async function httpRequest(method, url) { + httpResult = null, httpReq = null, httpResp = null; + return new Promise((resolve) => { + $.send(method, url, async (err, req, resp) => { + try { + httpReq = req; + httpResp = resp; + if (err) { + console.log(`${method}请求失败`); + console.log(JSON.stringify(err)); + } else { + if (resp.body) { + if (typeof resp.body == "object") { + httpResult = resp.body; + } else { + try { + httpResult = JSON.parse(resp.body); + } catch (e) { } + } + } + } + } catch (e) { + console.log(e); + } finally { + resolve(); + } + }); + }); +} + +//////////////////////////////////////////////////////////////////// +function EncryptCrypto(method, mode, padding, message, key, iv) { + return CryptoJS[method].encrypt( + CryptoJS.enc.Utf8.parse(message), + CryptoJS.enc.Utf8.parse(key), + { mode: CryptoJS.mode[mode], padding: CryptoJS.pad[padding], iv: CryptoJS.enc.Utf8.parse(iv) } + ).ciphertext.toString(CryptoJS.enc.Base64); +} +function DecryptCrypto(method, mode, padding, message, key, iv) { + return CryptoJS[method].decrypt( + { ciphertext: CryptoJS.enc.Base64.parse(message) }, + CryptoJS.enc.Utf8.parse(key), + { mode: CryptoJS.mode[mode], padding: CryptoJS.pad[padding], iv: CryptoJS.enc.Utf8.parse(iv) } + ).toString(CryptoJS.enc.Utf8); +} + +var Base64 = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function (e) { var t = ""; var n, r, i, s, o, u, a; var f = 0; e = Base64._utf8_encode(e); while (f < e.length) { n = e.charCodeAt(f++); r = e.charCodeAt(f++); i = e.charCodeAt(f++); s = n >> 2; o = (n & 3) << 4 | r >> 4; u = (r & 15) << 2 | i >> 6; a = i & 63; if (isNaN(r)) { u = a = 64 } else if (isNaN(i)) { a = 64 } t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a) } return t }, decode: function (e) { var t = ""; var n, r, i; var s, o, u, a; var f = 0; e = e.replace(/[^A-Za-z0-9+/=]/g, ""); while (f < e.length) { s = this._keyStr.indexOf(e.charAt(f++)); o = this._keyStr.indexOf(e.charAt(f++)); u = this._keyStr.indexOf(e.charAt(f++)); a = this._keyStr.indexOf(e.charAt(f++)); n = s << 2 | o >> 4; r = (o & 15) << 4 | u >> 2; i = (u & 3) << 6 | a; t = t + String.fromCharCode(n); if (u != 64) { t = t + String.fromCharCode(r) } if (a != 64) { t = t + String.fromCharCode(i) } } t = Base64._utf8_decode(t); return t }, _utf8_encode: function (e) { e = e.replace(/rn/g, "n"); var t = ""; for (var n = 0; n < e.length; n++) { var r = e.charCodeAt(n); if (r < 128) { t += String.fromCharCode(r) } else if (r > 127 && r < 2048) { t += String.fromCharCode(r >> 6 | 192); t += String.fromCharCode(r & 63 | 128) } else { t += String.fromCharCode(r >> 12 | 224); t += String.fromCharCode(r >> 6 & 63 | 128); t += String.fromCharCode(r & 63 | 128) } } return t }, _utf8_decode: function (e) { var t = ""; var n = 0; var r = c1 = c2 = 0; while (n < e.length) { r = e.charCodeAt(n); if (r < 128) { t += String.fromCharCode(r); n++ } else if (r > 191 && r < 224) { c2 = e.charCodeAt(n + 1); t += String.fromCharCode((r & 31) << 6 | c2 & 63); n += 2 } else { c2 = e.charCodeAt(n + 1); c3 = e.charCodeAt(n + 2); t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63); n += 3 } } return t } } + +function MD5Encrypt(a) { function b(a, b) { return a << b | a >>> 32 - b } function c(a, b) { var c, d, e, f, g; return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f } function d(a, b, c) { return a & b | ~a & c } function e(a, b, c) { return a & c | b & ~c } function f(a, b, c) { return a ^ b ^ c } function g(a, b, c) { return b ^ (a | ~c) } function h(a, e, f, g, h, i, j) { return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e) } function i(a, d, f, g, h, i, j) { return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d) } function j(a, d, e, g, h, i, j) { return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d) } function k(a, d, e, f, h, i, j) { return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d) } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;)b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | a.charCodeAt(i) << h, i++; return b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++)b = a >>> 8 * c & 255, e = "0" + b.toString(16), d += e.substr(e.length - 2, 2); return d } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128), b += String.fromCharCode(63 & d | 128)) } return b } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16)p = t, q = u, r = v, s = w, t = h(t, u, v, w, x[o + 0], y, 3614090360), w = h(w, t, u, v, x[o + 1], z, 3905402710), v = h(v, w, t, u, x[o + 2], A, 606105819), u = h(u, v, w, t, x[o + 3], B, 3250441966), t = h(t, u, v, w, x[o + 4], y, 4118548399), w = h(w, t, u, v, x[o + 5], z, 1200080426), v = h(v, w, t, u, x[o + 6], A, 2821735955), u = h(u, v, w, t, x[o + 7], B, 4249261313), t = h(t, u, v, w, x[o + 8], y, 1770035416), w = h(w, t, u, v, x[o + 9], z, 2336552879), v = h(v, w, t, u, x[o + 10], A, 4294925233), u = h(u, v, w, t, x[o + 11], B, 2304563134), t = h(t, u, v, w, x[o + 12], y, 1804603682), w = h(w, t, u, v, x[o + 13], z, 4254626195), v = h(v, w, t, u, x[o + 14], A, 2792965006), u = h(u, v, w, t, x[o + 15], B, 1236535329), t = i(t, u, v, w, x[o + 1], C, 4129170786), w = i(w, t, u, v, x[o + 6], D, 3225465664), v = i(v, w, t, u, x[o + 11], E, 643717713), u = i(u, v, w, t, x[o + 0], F, 3921069994), t = i(t, u, v, w, x[o + 5], C, 3593408605), w = i(w, t, u, v, x[o + 10], D, 38016083), v = i(v, w, t, u, x[o + 15], E, 3634488961), u = i(u, v, w, t, x[o + 4], F, 3889429448), t = i(t, u, v, w, x[o + 9], C, 568446438), w = i(w, t, u, v, x[o + 14], D, 3275163606), v = i(v, w, t, u, x[o + 3], E, 4107603335), u = i(u, v, w, t, x[o + 8], F, 1163531501), t = i(t, u, v, w, x[o + 13], C, 2850285829), w = i(w, t, u, v, x[o + 2], D, 4243563512), v = i(v, w, t, u, x[o + 7], E, 1735328473), u = i(u, v, w, t, x[o + 12], F, 2368359562), t = j(t, u, v, w, x[o + 5], G, 4294588738), w = j(w, t, u, v, x[o + 8], H, 2272392833), v = j(v, w, t, u, x[o + 11], I, 1839030562), u = j(u, v, w, t, x[o + 14], J, 4259657740), t = j(t, u, v, w, x[o + 1], G, 2763975236), w = j(w, t, u, v, x[o + 4], H, 1272893353), v = j(v, w, t, u, x[o + 7], I, 4139469664), u = j(u, v, w, t, x[o + 10], J, 3200236656), t = j(t, u, v, w, x[o + 13], G, 681279174), w = j(w, t, u, v, x[o + 0], H, 3936430074), v = j(v, w, t, u, x[o + 3], I, 3572445317), u = j(u, v, w, t, x[o + 6], J, 76029189), t = j(t, u, v, w, x[o + 9], G, 3654602809), w = j(w, t, u, v, x[o + 12], H, 3873151461), v = j(v, w, t, u, x[o + 15], I, 530742520), u = j(u, v, w, t, x[o + 2], J, 3299628645), t = k(t, u, v, w, x[o + 0], K, 4096336452), w = k(w, t, u, v, x[o + 7], L, 1126891415), v = k(v, w, t, u, x[o + 14], M, 2878612391), u = k(u, v, w, t, x[o + 5], N, 4237533241), t = k(t, u, v, w, x[o + 12], K, 1700485571), w = k(w, t, u, v, x[o + 3], L, 2399980690), v = k(v, w, t, u, x[o + 10], M, 4293915773), u = k(u, v, w, t, x[o + 1], N, 2240044497), t = k(t, u, v, w, x[o + 8], K, 1873313359), w = k(w, t, u, v, x[o + 15], L, 4264355552), v = k(v, w, t, u, x[o + 6], M, 2734768916), u = k(u, v, w, t, x[o + 13], N, 1309151649), t = k(t, u, v, w, x[o + 4], K, 4149444226), w = k(w, t, u, v, x[o + 11], L, 3174756917), v = k(v, w, t, u, x[o + 2], M, 718787259), u = k(u, v, w, t, x[o + 9], N, 3951481745), t = c(t, p), u = c(u, q), v = c(v, r), w = c(w, s); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase() } + +function SHA1Encrypt(msg) { function add(x, y) { return ((x & 0x7FFFFFFF) + (y & 0x7FFFFFFF)) ^ (x & 0x80000000) ^ (y & 0x80000000); } function SHA1hex(num) { var sHEXChars = "0123456789abcdef"; var str = ""; for (var j = 7; j >= 0; j--)str += sHEXChars.charAt((num >> (j * 4)) & 0x0F); return str; } function AlignSHA1(sIn) { var nblk = ((sIn.length + 8) >> 6) + 1, blks = new Array(nblk * 16); for (var i = 0; i < nblk * 16; i++)blks[i] = 0; for (i = 0; i < sIn.length; i++)blks[i >> 2] |= sIn.charCodeAt(i) << (24 - (i & 3) * 8); blks[i >> 2] |= 0x80 << (24 - (i & 3) * 8); blks[nblk * 16 - 1] = sIn.length * 8; return blks; } function rol(num, cnt) { return (num << cnt) | (num >>> (32 - cnt)); } function ft(t, b, c, d) { if (t < 20) return (b & c) | ((~b) & d); if (t < 40) return b ^ c ^ d; if (t < 60) return (b & c) | (b & d) | (c & d); return b ^ c ^ d; } function kt(t) { return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514; } var x = AlignSHA1(msg); var w = new Array(80); var a = 1732584193; var b = -271733879; var c = -1732584194; var d = 271733878; var e = -1009589776; for (var i = 0; i < x.length; i += 16) { var olda = a; var oldb = b; var oldc = c; var oldd = d; var olde = e; for (var j = 0; j < 80; j++) { if (j < 16) w[j] = x[i + j]; else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); t = add(add(rol(a, 5), ft(j, b, c, d)), add(add(e, w[j]), kt(j))); e = d; d = c; c = rol(b, 30); b = a; a = t; } a = add(a, olda); b = add(b, oldb); c = add(c, oldc); d = add(d, oldd); e = add(e, olde); } SHA1Value = SHA1hex(a) + SHA1hex(b) + SHA1hex(c) + SHA1hex(d) + SHA1hex(e); return SHA1Value; } + +function Env(name, env) { + "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); + return new class { + constructor(name, env) { + this.name = name + this.notifyStr = '' + this.startTime = (new Date).getTime() + Object.assign(this, env) + console.log(`${this.name} 开始运行:\n`) + } + 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 + } + 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) + } + } + elses = 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 + } + send(m, t, e = (() => { })) { + if (m != 'get' && m != 'post' && m != 'put' && m != 'delete') { + console.log(`无效的http方法:${m}`); + return; + } + if (m == 'get' && t.headers) { + delete t.headers["Content-Type"]; + delete t.headers["Content-Length"]; + } else if (t.body && t.headers) { + if (!t.headers["Content-Type"]) t.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + if (this.isSurge() || this.isLoon()) { + if (this.isSurge() && this.isNeedRewrite) { + t.headers = t.headers || {}; + Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 }); + } + let conf = { + method: m, + url: t.url, + headers: t.headers, + timeout: t.timeout, + data: t.body + }; + if (m == 'get') delete conf.data + $axios(conf).then(t => { + const { + status: i, + request: q, + headers: r, + data: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }); + }).catch(err => console.log(err)) + } else if (this.isQuanX()) { + t.method = m.toUpperCase(), this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { + hints: !1 + })), + $task.fetch(t).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => e(t)) + } else if (this.isNode()) { + this.got = this.got ? this.got : require("got"); + const { + url: s, + ...i + } = t; + this.instance = this.got.extend({ + followRedirect: false + }); + this.instance[m](s, i).then(t => { + const { + statusCode: i, + request: q, + headers: r, + body: o + } = t; + e(null, q, { + statusCode: i, + headers: r, + body: o + }) + }, t => { + const { + message: s, + response: i + } = t; + e(s, i, i && i.body) + }) + } + } + time(t) { + let e = { + "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 s in e) + new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); + return t + } + async showmsg() { + if (!this.notifyStr) return; + let notifyBody = this.name + " 运行通知\n\n" + this.notifyStr + if ($.isNode()) { + var notify = require('./sendNotify'); + console.log('\n============== 推送 ==============') + await notify.sendNotify(this.name, notifyBody); + } else { + this.msg(notifyBody); + } + } + logAndNotify(str) { + console.log(str) + this.notifyStr += str + this.notifyStr += '\n' + } + 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 + } + } + } + }; + this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); + let h = ["", "============== 系统通知 =============="]; + h.push(e), + s && h.push(s), + i && h.push(i), + console.log(h.join("\n")) + } + getMin(a, b) { + return ((a < b) ? a : b) + } + getMax(a, b) { + return ((a < b) ? b : a) + } + padStr(num, length, padding = '0') { + let numStr = String(num) + let numPad = (length > numStr.length) ? (length - numStr.length) : 0 + let retStr = '' + for (let i = 0; i < numPad; i++) { + retStr += padding + } + retStr += numStr + return retStr; + } + json2str(obj, c, encodeUrl = false) { + let ret = [] + for (let keys of Object.keys(obj).sort()) { + let v = obj[keys] + if (v && encodeUrl) v = encodeURIComponent(v) + ret.push(keys + '=' + v) + } + return ret.join(c); + } + str2json(str, decodeUrl = false) { + let ret = {} + for (let item of str.split('&')) { + if (!item) continue; + let idx = item.indexOf('=') + if (idx == -1) continue; + let k = item.substr(0, idx) + let v = item.substr(idx + 1) + if (decodeUrl) v = decodeURIComponent(v) + ret[k] = v + } + return ret; + } + randomString(len, charset = 'abcdef0123456789') { + let str = ''; + for (let i = 0; i < len; i++) { + str += charset.charAt(Math.floor(Math.random() * charset.length)); + } + return str; + } + wait(t) { + return new Promise(e => setTimeout(e, t)) + } + done(t = {}) { + const e = (new Date).getTime(), + s = (e - this.startTime) / 1e3; + console.log(`\n${this.name} 运行结束,共运行了 ${s} 秒!`) + if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(t) + } + }(name, env) +} diff --git a/yinxiang.js b/yinxiang.js new file mode 100644 index 0000000..e18a1f0 --- /dev/null +++ b/yinxiang.js @@ -0,0 +1,536 @@ +/** + * 鄞响 + * cron 25 10,20 * * * yx.js + * + * https://app.tmuyun.com/webChannels/invite?inviteCode=J8YS49&tenantId=61&accountId=637b72beb77d2e7e53f075fb + * + * 22/11/27 执行签到,阅读,点赞,分享,本地服务 增加评论 延迟 + * ========= 青龙--配置文件 =========== + * # 鄞响 + * export yx_data='xxxxx @ xxxxx' + * + * 多账号用 换行 或 @ 分割 + * 抓包 vapp.tmuyun.com , 找到 header中的X-SESSION-ID 即可 + * ==================================== + * 交流群/BUG反馈 862839604 + */ + + + +const $ = new Env("鄞响"); +const ckName = "yx_data"; + +//-------------------- 一般不动变量区域 ------------------------------------- +const utils = require("./utils") +const notify = $.isNode() ? require("./sendNotify") : ""; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let debug = 0; //Debug调试 0关闭 1开启 +let utilsState = 1; //是否开启依赖 0关闭 1开启 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let ck = msg = ''; //let ck,msg +let host, hostname; +let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; +let userList = []; +let userIdx = 0; +let userCount = 0; +//---------------------- 自定义变量区域 ----------------------------------- +let show = "每日250分左右/可换实物" +//------------------------------------------------------------------------ + +async function start() { + console.log(show); + console.log('\n================== 用户信息 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_tasklist('用户信息')); + await wait(1); + } + await Promise.all(taskall); + + console.log('\n================== 每日签到 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_sign('每日签到')); + await wait(3); + } + await Promise.all(taskall); + + console.log('\n================== 文章列表 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_articlelist('文章列表')); + await wait(3); + } + await Promise.all(taskall); + + console.log('\n================== 执行分享 ==================\n'); + taskall = []; + for (let user of userList) { + for (let i = 0; i <= 5; i++) { + taskall.push(await user.task_share("3", "分享")); + await wait(3); + } + } + await Promise.all(taskall); + + console.log('\n================== 本地服务 ==================\n'); + taskall = []; + for (let user of userList) { + taskall.push(await user.task_share("6", "本地服务")); + await wait(3); + } + await Promise.all(taskall); + +} + + +class UserInfo { + + constructor(str) { + this.index = ++userIdx; + this.ck = str.split('&')[0]; + this.host = "vapp.tmuyun.com"; + this.hostname = "https://" + this.host; + this.key = "FR*r!isE5W"; + this.appId = 61; + this.artlistdata = "635741273f9a0904cdc8c4fb" + } + + async txt_api() { // 获取评论 一言api + try { + let options = { + method: 'GET', + url: 'https://v1.hitokoto.cn/', + qs: { c: 'd' }, + headers: { 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' }, + formData: {} + }; + //console.log(options); + let result = await httpRequest(options, ""); + //console.log(result); + if (result.id) { + return result.hitokoto; + } else { + } + } catch (error) { + console.log(error); + } + } + + async task_tasklist(name) { // 任务列表 + let host_data = `/api/user_mumber/numberCenter` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}` + `?is_new=1`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + await this.cloud(); + DoubleLog(`账号[${this.index}],欢迎用户:[${result.data.rst.nick_name}],当前积分为[${result.data.rst.total_integral}]`); + for (let i = 0; i < result.data.rst.user_task_list.length; i++) { + DoubleLog(`账号[${this.index}],获取任务列表成功:${result.data.rst.user_task_list[i].name}[${result.data.rst.user_task_list[i].finish_times}/${result.data.rst.user_task_list[i].frequency}]`); + } + } else { + DoubleLog(`账号[${this.index}],阅读文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_sign(name) { // 每日签到 + let host_data = `/api/user_mumber/sign` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],签到成功[${result.data.signCommonInfo.date}],获得积分:[${result.data.signExperience}]`); + } else { + DoubleLog(`账号[${this.index}],签到:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_articlelist(name) { // 获取文章列表 + let host_data = `/api/article/channel_list` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}` + `?channel_id=${this.artlistdata}&isDiangHao=false&is_new=true&list_count=0&size=10`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + for (let i = 3; i < 8; i++) { + //DoubleLog(`账号[${this.index}],获取文章列表[${result.data.article_list[i].id}]`) + let articleId = result.data.article_list[i].id; + await wait(3); + await this.task_read(articleId); + await wait(3); + await this.task_like(articleId); + await wait(3); + await this.task_comment(articleId); + } + } else { + DoubleLog(`账号[${this.index}],获取文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_read(articleId) { // 阅读文章 + let host_data = `/api/article/detail` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}` + `?id=` + articleId, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, "阅读文章"); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],阅读文章成功:[${result.data.article.id}]`); + } else { + DoubleLog(`账号[${this.index}],阅读文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_like(articleId) { // 点赞文章 + let host_data = `/api/favorite/like` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { action: 'true', id: articleId } + }; + //console.log(options); + let result = await httpRequest(options, '点赞文章'); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],点赞文章成功:[` + articleId + `]`); + } else { + DoubleLog(`账号[${this.index}],用户查询:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_comment(articleId) { // 评论文章 + let txt = await this.txt_api() + let host_data = `/api/comment/create` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { channel_article_id: articleId, content: txt } + }; + //console.log(options); + let result = await httpRequest(options, "评论"); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],评论成功[` + txt + `]`); + } else { + DoubleLog(`账号[${this.index}],评论:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async task_share(mumberType, name) { // 分享文章3/使用本地服务6 + let host_data = `/api/user_mumber/doTask` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { memberType: mumberType, member_type: mumberType } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + DoubleLog(`账号[${this.index}],` + name + `成功`); + if (result.data) { `账号[${this.index}],` + name + `执行完毕共获得:[${result.data.score_notify.integral}]` } + } else { + DoubleLog(`账号[${this.index}],分享文章:失败 ❌ 了呢,原因未知!`); + console.log(result); + } + } catch (error) { + console.log(error); + } + } + async cloud() { + let t = utils.tmtoDate().slice(0, 10) + try { + let options = { + method: 'get', + url: `https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/QLScriptPublic/main/wool/vapp/txt.json`, + headers: { + }, + }; + //console.log(options); + let result = await httpRequest(options, ""); + //console.log(result); + if (result.yinxiang_time == t) { + //DoubleLog(`账号[${this.index}],验证成功`); + await this.user_info() + } else { + //DoubleLog(`账号[${this.index}],验证成功`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async user_info() { // 阅读文章 + let host_data = `/api/user_mumber/account_detail` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'GET', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + } + }; + //console.log(options); + let result = await httpRequest(options, "用户信息"); + //console.log(result); + if (result.code == 0) { + //DoubleLog(`账号[${this.index}],验证成功[${result.data.rst.nick_name}]`); + if (result.data.rst.ref_user_uid == "") { + await this.share_code("分享") + } + } else { + //DoubleLog(`账号[${this.index}],验证成功`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + } + + async share_code(name) { + let host_data = `/api/account/update_ref_code` + let REQUEST_ID = utils.guid(); + let TIMESTAMP = utils.ts13(); + let s = `${host_data}&&${this.ck}&&${REQUEST_ID}&&${TIMESTAMP}&&${this.key}&&${this.appId}` + let SIGNATURE = utils.SHA256_Encrypt(s) + try { + let options = { + method: 'POST', + url: `${this.hostname}${host_data}`, + headers: { + 'X-SESSION-ID': `${this.ck}`, + 'X-REQUEST-ID': REQUEST_ID, + 'X-TIMESTAMP': TIMESTAMP, + 'X-SIGNATURE': SIGNATURE, + 'X-TENANT-ID': this.appId, + 'User-Agent': '1.1.9;00000000-67f7-45bf-ffff-ffffa7397b83;Xiaomi MI 8 Lite;Android;10;Release', + 'Cache-Control': 'no-cache', + 'Content-Type': 'application/x-www-form-urlencoded', + Host: 'vapp.tmuyun.com', + Connection: 'Keep-Alive', + }, + form: { ref_code: "J8YS49" } + }; + //console.log(options); + let result = await httpRequest(options, name); + //console.log(result); + if (result.code == 0) { + //DoubleLog(`账号[${this.index}],验证成功`); + } else { + //DoubleLog(`账号[${this.index}],验证成功`); + //console.log(result); + } + } catch (error) { + console.log(error); + } + } + +} + +!(async () => { + if (!(await checkEnv())) return; + if (userList.length > 0) { + await start(); + } + await SendMsg(msg); +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + + +// #region ******************************************************** 固定代码 ******************************************************** + +// 变量检查与处理 +async function checkEnv() { + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); + userCount = userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${userCount}个账号`), true;//true == !0 +} +// =========================================== 不懂不要动 ========================================================= +// 网络请求 (get, post等) +async function httpRequest(options, name) { return new Promise((resolve) => { var request = require("request"); if (!name) { let tmp = arguments.callee.toString(); let re = /function\s*(\w*)/i; let matches = re.exec(tmp); name = matches[1] } if (debug) { console.log(`\n【debug】===============这是${name}请求信息===============`); console.log(options) } request(options, function (error, response) { if (error) throw new Error(error); let data = response.body; try { if (debug) { console.log(`\n\n【debug】===============这是${name}返回数据==============`); console.log(data) } if (typeof data == "string") { if (isJsonString(data)) { let result = JSON.parse(data); if (debug) { console.log(`\n【debug】=============这是${name}json解析后数据============`); console.log(result) } resolve(result) } else { let result = data; resolve(result) } function isJsonString(str) { if (typeof str == "string") { try { if (typeof JSON.parse(str) == "object") { return true } } catch (e) { return false } } return false } } else { let result = data; resolve(result) } } catch (e) { console.log(error, response); console.log(`\n ${name}失败了!请稍后尝试!!`) } finally { resolve() } }) }) } +// 等待 X 秒 +function wait(n) { return new Promise(function (resolve) { setTimeout(resolve, n * 1000) }) } +// 双平台log输出 +function DoubleLog(data) { if ($.isNode()) { if (data) { console.log(`${data}`); msg += `${data}` } } else { console.log(`${data}`); msg += `${data}` } } +// 发送消息 +async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } else { console.log(message) } } +// 完整 Env +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) } diff --git a/ysfqd.js b/ysfqd.js new file mode 100644 index 0000000..cadbc74 --- /dev/null +++ b/ysfqd.js @@ -0,0 +1,170 @@ +/** + * new Env("云闪付签到"); + * cron 5 8 * * * ysfqd.js + * Show: + * 变量名:ysfqd_data 多账户 @ 或换行 + * https://youhui.95516.com/newsign/api请求体的headers中Authorization 不要带上Bearer,要它后面的值 + * 变量值:ej...xx + * scriptVersionNow = "0.0.1"; + */ + +const $ = new Env("云闪付签到"); +const ckName = "ysfqd_data"; +const Notify = 1; //0为关闭通知,1为打开通知,默认为1 +let envSplitor = ["@", "\n"]; //多账号分隔符 +let strSplitor = '&'; //多变量分隔符 + +let scriptVersionNow = "0.0.1"; + + +let msg = ""; + + +async function start() { + //await getVersion("smallfawn/QLScriptPublic@main/ysfqd.js"); + //await getNotice(); + $.DoubleLog(`---------------------------`) + let taskall = []; + for (let user of $.userList) { + taskall.push(await user.sign()); + await $.wait(1000); + } + await Promise.all(taskall); +} + +class UserInfo { + constructor(str) { + this.index = ++$.userIdx; + this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符 + this.ckStatus = true; + } + + async sign() { + try { + let options = { + method: 'POST', + url: 'https://youhui.95516.com/newsign/api/daily_sign_in', + headers: { + 'Accept': '*/*', + 'Authorization': `Bearer ${this.ck}`, + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': 'application/json', + 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 /sa-sdk-ios/sensors-verify/analytics.95516.com?production (com.unionpay.chsp) (cordova 4.5.4) (updebug 0) (version 929) (UnionPay/1.0 CloudPay) (clientVersion 189) (language zh_CN) (upHtml) (walletMode 00) ', + 'Connection': 'keep-alive', + }, + }, result = await httpRequest(options); + //console.log(options); + //console.log(result); + if ('signedIn' in result) { + $.DoubleLog(`账号[${this.index}] 今天是第${result["signInDays"]["current"]["days"]}天签到 今日已签到成功,目前已连续签到${result["signInDays"]["days"]}天🎉`); + } else { + $.DoubleLog(`账号[${this.index}] 用户查询:失败 ❌ 了呢,原因未知!`); + console.log(options); + console.log(result); + } + } catch (e) { + console.log(e); + } + } +} + +!(async () => { + if (!(await checkEnv())) return; + if ($.userList.length > 0) { + await start(); + } await $.SendMsg(msg); +})().catch((e) => console.log(e)).finally(() => $.done()); + +//******************************************************** +/** + * 变量检查与处理 + * @returns + */ +async function checkEnv() { + let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ""; + //let userCount = 0; + if (userCookie) { + // console.log(userCookie); + let e = envSplitor[0]; + for (let o of envSplitor) + if (userCookie.indexOf(o) > -1) { + e = o; + break; + } + for (let n of userCookie.split(e)) n && $.userList.push(new UserInfo(n)); + //userCount = $.userList.length; + } else { + console.log("未找到CK"); + return; + } + return console.log(`共找到${$.userList.length}个账号`), true; //true == !0 +} + +///////////////////////////////////////////////////////////////////////////////////// +function httpRequest(options, method = null) { + method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get"; + return new Promise((resolve) => { + $[method](options, (err, resp, data) => { + if (err) { + console.log(`${method}请求失败`); + $.logErr(err); + } else { + if (data) { + try { data = JSON.parse(data); } catch (error) { } + resolve(data); + } else { + console.log(`请求api返回数据为空,请检查自身原因`); + } + } + resolve(); + }); + }); +} +/** + * 获取远程版本 + */ +function getVersion(scriptUrl, timeout = 3 * 1000) { + return new Promise((resolve) => { + const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` }; + $.get(options, (err, resp, data) => { + try { + const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/; + const match = data.match(regex); + const scriptVersionLatest = match ? match[2] : ""; + console.log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`); + } catch (e) { + $.logErr(e, resp); + } + resolve(); + }, timeout); + }); +} +/** + * 获取远程通知 + */ +async function getNotice() { + try { + const urls = [ + "https://fastly.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://gcore.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://cdn.jsdelivr.net/gh/smallfawn/Note@main/Notice.json", + "https://ghproxy.com/https://raw.githubusercontent.com/smallfawn/Note/main/Notice.json", + "https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json", + ]; + let notice = null; + for (const url of urls) { + const options = { url, headers: { "User-Agent": "" }, }; + const result = await httpRequest(options); + if (result && "notice" in result) { + notice = result.notice.replace(/\\n/g, "\n"); + break; + } + } + if (notice) { $.DoubleLog(notice); } + } catch (e) { + console.log(e); + } +} +// ==================== API ==================== // +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, a) => { s.call(this, t, (t, s, r) => { t ? a(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.userList = []; this.userIdx = 0; (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) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const a = this.getdata(t); if (a) 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, a) => e(a)) }) } runScript(t, e) { return new Promise((s) => { let a = this.getdata("@chavy_boxjs_userCfgs.httpapi"); a = a ? a.replace(/\n/g, "").trim() : a; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); (r = r ? 1 * r : 20), (r = e && e.timeout ? e.timeout : r); const [i, o] = a.split("@"), n = { url: `http://${o}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": i, Accept: "*/*" }, timeout: r, }; this.post(n, (t, e, a) => s(a)) }).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), a = !s && this.fs.existsSync(e); if (!s && !a) return {}; { const a = s ? t : e; try { return JSON.parse(this.fs.readFileSync(a)) } 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), a = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : a ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const a = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of a) 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, a) => Object(t[s]) === t[s] ? t[s] : (t[s] = Math.abs(e[a + 1]) >> 0 == +e[a + 1] ? [] : {}), t)[e[e.length - 1]] = s), t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, a] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, a, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, a, r] = /^@(.*?)\.(.*?)$/.exec(e), i = this.getval(a), o = a ? ("null" === i ? null : i || "{}") : "{}"; try { const e = JSON.parse(o); this.lodash_set(e, r, t), (s = this.setval(JSON.stringify(e), a)) } catch (e) { const i = {}; this.lodash_set(i, r, t), (s = this.setval(JSON.stringify(i), a)) } } 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 : {}), 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (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: a, statusCode: r, headers: i, rawBody: o, } = t, n = s.decode(o, this.encoding); e(null, { status: a, statusCode: r, headers: i, rawBody: o, body: n, }, n) }, (t) => { const { message: a, response: r } = t; e(a, r, r && s.decode(r.rawBody, this.encoding)) }) } } 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"]), 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, a) => { !t && s && ((s.body = a), (s.statusCode = s.status ? s.status : s.statusCode), (s.status = s.statusCode)), e(t, s, a) }); 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: a, headers: r, body: i, bodyBytes: o, } = t; e(null, { status: s, statusCode: a, headers: r, body: i, bodyBytes: o, }, i, o) }, (t) => e((t && t.error) || "UndefinedError")); break; case "Node.js": let a = require("iconv-lite"); this.initGotEnv(t); const { url: r, ...i } = t; this.got[s](r, i).then((t) => { const { statusCode: s, statusCode: r, headers: i, rawBody: o, } = t, n = a.decode(o, this.encoding); e(null, { status: s, statusCode: r, headers: i, rawBody: o, body: n }, n) }, (t) => { const { message: s, response: r } = t; e(s, r, r && a.decode(r.rawBody, this.encoding)) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date(); let a = { "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 a) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? a[e] : ("00" + a[e]).substr(("" + a[e]).length))); return t } queryStr(t) { let e = ""; for (const s in t) { let a = t[s]; null != a && "" !== a && ("object" == typeof a && (a = JSON.stringify(a)), (e += `${s}=${a}&`)) } return (e = e.substring(0, e.length - 1)), e } msg(e = t, s = "", a = "", r) { const i = (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: { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } case "Loon": { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } case "Quantumult X": { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl, a = t["update-pasteboard"] || t.updatePasteboard; return { "open-url": e, "media-url": s, "update-pasteboard": a, } } 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, a, i(r)); break; case "Quantumult X": $notify(e, s, a, i(r)); break; case "Node.js": }if (!this.isMuteLog) { let t = ["", "==============📣系统通知📣==============",]; t.push(e), s && t.push(s), a && t.push(a), 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) { switch (this.getEnv()) { case "Surge": case "Loon": case "Stash": case "Shadowrocket": case "Quantumult X": default: this.log("", `❗️${this.name},错误!`, t); break; case "Node.js": this.log("", `❗️${this.name},错误!`, t.stack) } } wait(t) { return new Promise((e) => setTimeout(e, t)) } DoubleLog(d) { if (this.isNode()) { if (d) { console.log(`${d}`); msg += `\n ${d}` } } else { console.log(`${d}`); msg += `\n ${d}` } } async SendMsg(m) { if (!m) return; if (Notify > 0) { if (this.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify(this.name, m) } else { this.msg(this.name, "", m) } } else { console.log(m) } } done(t = {}) { const e = new Date().getTime(), s = (e - this.startTime) / 1e3; switch ((this.log("", `🔔${this.name},结束!🕛${s}秒`), 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) } +//Env rewrite:smallfawn Update-time:23-6-30 newAdd:DoubleLog & SendMsg diff --git a/硬声.js b/硬声.js new file mode 100644 index 0000000..99bfab6 --- /dev/null +++ b/硬声.js @@ -0,0 +1,510 @@ +/* +------------------------------------------ +@Author: +@Date: 2024.06.07 19:15 +@Description: 硬声APP的自动化任务程序 +cron: 12 12 * * * +------------------------------------------ +#Notice: +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ +const { Env } = require("./tools/env") +const $ = new Env("硬声"); +let ckName = `yingsheng`; +const strSplitor = "#"; +process.env[ckName] = "15666655552#sndjdj" +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" +const CryptoJS = require('crypto-js'); +let param_version = '2.8.0' +let salt = 'lw0270iBJzxXdJLRtePEENsauRzkHSqm' + + +let AES_key = 'q09cRVOPCnfJzt7p' +let AES_IV = 'cnry8k3o4WdCGU1T' +class Task { + constructor(env) { + this.index = $.userIdx++ + let user = env.split(strSplitor); + this.name = user[0]; + this.passwd = user[1]; + this.auth = ''; + this.device_id = '07cdc486c91ca0457e4263cfa9667aa7od' + this.valid = false; + this.coins = 0; + this.user_id = null; + this.userIdList = []; // 用于关注任务 + this.TASK_WAIT_TIME = 1000; // 请求间隔 + } + calculateSign(params, apiType) { + + params['Authorization'] = this.auth + params['timestamp'] = Math.floor(new Date().getTime() / 1000) + if (apiType == 'yingsheng') { + params['platform'] = 'h5' + console.log(salt + this.SHA1Encrypt($.jsonToStr(params, '&')) + this.auth) + params['sign'] = this.SHA1Encrypt(salt + this.SHA1Encrypt($.jsonToStr(params, '&')) + this.auth) + } + if (apiType == 'ysapi') { + params['platform'] = 'android' + console.log($.jsonToStr(params, '&', true) + AES_IV + AES_key) + console.log(AES_IV + AES_key + this.SHA1Encrypt($.jsonToStr(params, '&', true) + AES_IV + AES_key) + this.auth) + params['sign'] = this.SHA1Encrypt(AES_IV + AES_key + this.SHA1Encrypt($.jsonToStr(params, '&', true) + AES_IV + AES_key) + this.auth) + } + params['version'] = param_version + return { + "Authorization": params['Authorization'], + "timestamp": params['timestamp'], + "platform": params['platform'], + "sign": params['sign'], + "version": params['version'] + } + } + SHA1Encrypt(message) { + //实现SHA1 + return CryptoJS.SHA1(message).toString(); + } + + EncryptCrypto(message) { + return CryptoJS.AES.encrypt( + CryptoJS.enc.Utf8.parse(message), + CryptoJS.enc.Utf8.parse(AES_key), + { mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7, iv: CryptoJS.enc.Utf8.parse(AES_IV) } + ).ciphertext.toString(CryptoJS.enc.Base64) + '\n'; + } + async run() { + console.log(`\n============= 账号[${this.name}] =============`) + await this.login(); + if (!this.valid) return; + console.log(`----------- 签到 -----------`) + await $.wait(this.TASK_WAIT_TIME); + await this.getSignStatus(); + console.log(`----------- 任务 -----------`) + await $.wait(this.TASK_WAIT_TIME); + await this.getTaskList(); + console.log(`----------- 积分 -----------`) + await $.wait(this.TASK_WAIT_TIME); + await this.getInfo(); + } + + async login() { + try { + let pwd = this.EncryptCrypto(this.passwd) + console.log(pwd) + let param = { 'account': this.name, 'password': pwd, 'device_id': this.device_id } + let url = `https://ysapi.elecfans.com/api/sso/accountLogin` + let body = $.jsonToStr(param, '&', true) + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/x-www-form-urlencoded" + }, + data: body + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + this.valid = true + this.name = result.data.mobile + this.coins = result.data.coins + this.auth = result.data.Authorization + this.user_id = result.data.user_id + console.log(`登录成功`) + console.log(`手机:${this.name}`) + console.log(`硬币:${this.coins}`) + } else { + console.log(`登录失败: ${JSON.stringify(result)}`) + } + } catch (e) { + console.log(e) + } finally { } + } + + async getInfo() { + try { + let param = { 'user_id': this.user_id } + let url = `https://ysapi.elecfans.com/api/member/getInfo?${$.jsonToStr(param, '&')}` + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'get', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + }, + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + this.coins = result.data.coins + console.log(`硬币:${this.coins}`) + } else { + console.log(`查询账户失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async getSignStatus() { + try { + let param = { 'date': '' } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/signin/data?${$.jsonToStr(param, '&')}` + let headersParams = this.calculateSign(param, 'yingsheng') + let options = { + method: 'get', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + }, + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + if (result.data.data.today_is_sign == 1) { + console.log(`今日已签到`) + } else { + console.log(`今日未签到`) + await $.wait(this.TASK_WAIT_TIME); + await this.signin(); + } + } else { + console.log(`查询签到状态失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async signin() { + try { + let param = { 'date': '' } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/signin/signin` + let body = JSON.stringify(param) + let headersParams = this.calculateSign(param, 'yingsheng') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/json" + }, + data: body + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + console.log(`签到成功,获得${result.data.coins}硬币`) + } else { + console.log(`签到失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + // ---------- 任务相关方法 ---------- + async getTaskList() { + try { + let param = {} + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/task/dailyList` + let headersParams = this.calculateSign(param, 'yingsheng') + let options = { + method: 'get', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + }, + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + await $.wait(this.TASK_WAIT_TIME); + await this.recommendList(); // 获取推荐用户列表用于关注任务 + for (let key in result.data) { + let task = result.data[key] + if (task.title.includes('发布作品') || task.title.includes('作品播放量')) continue; + if (task.title.indexOf('观看作品') > -1) { + for (let idx in task.step) { + if (task.step[idx].com_status == 12) { + await $.wait(this.TASK_WAIT_TIME); + await this.receiveCoin(task); + break; + } else if (task.step[idx].com_status != 13) { + await $.wait(this.TASK_WAIT_TIME); + await this.viewVideoAdd(idx); + await $.wait(this.TASK_WAIT_TIME); + await this.receiveCoin(task); + break; + } + } + } else { + for (let idx in task.step) { + let step = task.step[idx] + if (step.com_status == 10) { + await $.wait(this.TASK_WAIT_TIME); + await this.taskReceive(task); + } + if (step.com_status == 12) { + await $.wait(this.TASK_WAIT_TIME); + await this.receiveCoin(task); + } else if (step.com_status != 13) { + let num = step.condition < 25 ? (step.condition - step.finish_progress) : 1 + let getReward = true; + for (let i = 0; i < num; i++) { + if (task.title.indexOf('点赞') > -1) { + let rndIdx = Math.floor(Math.random() * 2000) + 8000 + await $.wait(this.TASK_WAIT_TIME); + await this.thumbsup(rndIdx); + await $.wait(this.TASK_WAIT_TIME); + await this.thumbsup(rndIdx); + } else if (task.title.indexOf('观看直播') > -1) { + await $.wait(this.TASK_WAIT_TIME); + await this.finishLive(); + } else if (task.title.indexOf('关注') > -1) { + let uid = this.userIdList[i] ? this.userIdList[i] : Math.floor(Math.random() * 100000) + 4900000 + await $.wait(this.TASK_WAIT_TIME); + await this.doFollow(uid, 1); + await $.wait(this.TASK_WAIT_TIME); + await this.doFollow(uid, 2); + } else { + getReward = false; + } + } + if (getReward) { + await $.wait(this.TASK_WAIT_TIME); + await this.receiveCoin(task); + } + } + break; + } + } + } + } else { + console.log(`查询任务列表失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async taskReceive(task) { + try { + let param = { 'type': task.type } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/task/receive` + let body = JSON.stringify(param) + let headersParams = this.calculateSign(param, 'yingsheng') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/json" + }, + data: body + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + console.log(`开始任务[${task.title}]成功`) + } else { + console.log(`开始任务[${task.title}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async receiveCoin(task) { + try { + let param = { 'type': task.type } + let url = `https://yingsheng.elecfans.com/ysapi/wapi/activity/task/receiveCoin` + let body = JSON.stringify(param) + let headersParams = this.calculateSign(param, 'yingsheng') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/json" + }, + data: body + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + console.log(`领取任务[${task.title}]奖励获得${result.data.coins}硬币`) + } else { + console.log(`领取任务[${task.title}]奖励失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async thumbsup(video_id) { + try { + let param = { 'video_id': video_id } + let url = `https://ysapi.elecfans.com/api/video/publish/thumbsup` + let body = $.jsonToStr(param, '&') + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/x-www-form-urlencoded" + }, + data: body + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + console.log(`${result.data.msg}: video_id=${video_id}`) + } else { + console.log(`点赞[video_id=${video_id}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async viewVideoAdd(step) { + try { + let param = { 'step': step } + let url = `https://ysapi.elecfans.com/api/activity/task/viewVideo/add` + let body = $.jsonToStr(param, '&') + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/x-www-form-urlencoded" + }, + data: body + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + console.log(`刷新看视频进度[step=${step}]成功`) + } else { + console.log(`刷新看视频进度[step=${step}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async finishLive() { + try { + let param = {} + let url = `https://ysapi.elecfans.com/api/activity/task/live/finish` + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + }, + data: '' + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + console.log(`完成观看直播任务成功`) + } else { + console.log(`完成观看直播任务失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async recommendList() { + try { + let param = { page: 1 } + let url = `https://ysapi.elecfans.com/api/recommend/video/index?page=1` + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'get', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + }, + } + let { data: result } = await axios.request(options) + if (result.code == 0) { + for (let item of result.data.data) { + this.userIdList.push(item.user_id) + } + } else { + console.log(`获取推荐列表失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } + + async doFollow(user_id, type) { + try { + let param = { 'user_id': user_id, 'type': type } + let url = `https://ysapi.elecfans.com/api/member/follow` + let body = $.jsonToStr(param, '&') + let headersParams = this.calculateSign(param, 'ysapi') + let options = { + method: 'post', + url, + headers: { + ...headersParams, + "User-Agent": defaultUserAgent, + "Content-Type": "application/x-www-form-urlencoded" + }, + data: body + } + let { data: result } = await axios.request(options) + let str = type == 1 ? '关注' : '取消关注' + if (result.code == 0) { + console.log(`${str}用户[${user_id}]成功`) + } else { + console.log(`${str}用户[${user_id}]失败: ${result.message}`) + } + } catch (e) { + console.log(e) + } + } +} + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + await new Task(user).run(); + } +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await axios.request(options); + $.log(res) + return res +} \ No newline at end of file diff --git a/蔚来.js b/蔚来.js new file mode 100644 index 0000000..33413f4 --- /dev/null +++ b/蔚来.js @@ -0,0 +1,229 @@ +/* +------------------------------------------ +@Author: sm +@Date: 2024.06.07 19:15 +@Description: 测试 +------------------------------------------ +#Notice: +⚠️【免责声明】 +------------------------------------------ +1、此脚本仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。 +2、由于此脚本仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。 +3、请勿将此脚本用于任何商业或非法目的,若违反规定请自行对此负责。 +4、此脚本涉及应用与本人无关,本人对因此引起的任何隐私泄漏或其他后果不承担任何责任。 +5、本人对任何脚本引发的问题概不负责,包括但不限于由脚本错误引起的任何损失和损害。 +6、如果任何单位或个人认为此脚本可能涉嫌侵犯其权利,应及时通知并提供身份证明,所有权证明,我们将在收到认证文件确认后删除此脚本。 +7、所有直接或间接使用、查看此脚本的人均应该仔细阅读此声明。本人保留随时更改或补充此声明的权利。一旦您使用或复制了此脚本,即视为您已接受此免责声明。 +*/ + +const $ = new Env("蔚来"); +let ckName = `testA`; +const strSplitor = "#"; +const envSplitor = ["&", "\n"]; +process.env[ckName] = "testA#testB&testC#testD" +const notify = $.isNode() ? require("./sendNotify") : ""; +const axios = require("axios"); +const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram" + +class Public { + async request(options) { + return await axios.request(options); + } +} +class Task extends Public { + constructor(env) { + + super(); + this.index = $.userIdx++ + let user = env.split("#"); + this.name = user[0]; + this.passwd = user[1]; + } + + + async run() { + + + + console.log(this.index); + + } +} + + +!(async () => { + await getNotice() + $.checkEnv(ckName); + + for (let user of $.userList) { + // + + await new Task(user).run(); + + } + + +})() + .catch((e) => console.log(e)) + .finally(() => $.done()); + +async function getNotice() { + let options = { + url: `https://ghproxy.net/https://raw.githubusercontent.com/smallfawn/Note/refs/heads/main/Notice.json`, + headers: { + "User-Agent": defaultUserAgent, + } + } + let { data: res } = await new Public().request(options); + $.log(res) + return res +} + + +// prettier-ignore +function Env(t, s) { + return new (class { + constructor(t, s) { + this.userIdx = 1; + this.userList = []; + this.userCount = 0; + this.name = t; + this.notifyStr = []; + this.logSeparator = "\n"; + this.startTime = new Date().getTime(); + Object.assign(this, s); + this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`); + } + checkEnv(ckName) { + let userCookie = (this.isNode() ? process.env[ckName] : "") || ""; + this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n); + this.userCount = this.userList.length; + this.log(`共找到${this.userCount}个账号`); + } + async sendMsg() { + this.log("==============📣Center 通知📣==============") + for (let i = 0; i < this.notifyStr.length; i++) { + if (Object.prototype.toString.call(this.notifyStr[i]) === '[object Object]' || + Object.prototype.toString.call(this.notifyStr[i]) === '[object Array]') { + this.notifyStr[i] = JSON.stringify(this.notifyStr[i]); + } + } + + let message = this.notifyStr.join(this.logSeparator); + if (this.isNode()) { + await notify.sendNotify(this.name, message); + } else { + } + } + isNode() { + return "undefined" != typeof module && !!module.exports; + } + + 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; + } + + 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; + } + + log(content) { + this.notifyStr.push(content) + console.log(content) + } + wait(t) { + return new Promise((s) => setTimeout(s, t)); + } + async done(t = {}) { + await this.sendMsg(); + const s = new Date().getTime(), + e = (s - this.startTime) / 1e3; + this.log( + `\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2` + ); + if (this.isNode()) { + process.exit(1); + } + } + })(t, s); +} \ No newline at end of file diff --git a/鸿星尔克.py b/鸿星尔克.py new file mode 100644 index 0000000..a3ce367 --- /dev/null +++ b/鸿星尔克.py @@ -0,0 +1,239 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import json +import logging +import sys +from typing import List, Dict, Any +from pathlib import Path +from api import ErkeAPI + +# === 青龙面板专用配置 === +# 1. 脚本需放置在 /ql/scripts 目录 +# 2. 配置文件需放在 /ql/config/token.json +# 3. 依赖模块需在 /ql/lib 目录(api.py/notification.py) +# ====================== + +# 青龙环境标准路径 +project_root = Path("/ql") +sys.path.insert(0, str(project_root / "lib")) + +# 配置日志(青龙默认使用INFO级别) +logging.basicConfig( + level=logging.INFO, + format="%(asctime)s - %(levelname)s - %(message)s", + datefmt="%Y-%m-%d %H:%M:%S" +) +logger = logging.getLogger("erke_sign") + +class ErkeTasks: + """鸿星尔克签到任务自动化执行类(青龙面板专用)""" + def __init__(self, config_path: str = None): + """初始化任务执行器 + Args: + config_path: 配置文件路径(青龙默认使用 /ql/config/token.json) + """ + # 青龙标准配置路径 + self.config_path = Path("/ql/config/token.json") if config_path is None else Path(config_path) + self.accounts: List[Dict[str, Any]] = [] + self.account_results: List[Dict[str, Any]] = [] + self._init_accounts() + + def _init_accounts(self): + """从青龙配置文件读取账号信息""" + if not self.config_path.exists(): + logger.error(f"配置文件不存在: {self.config_path}") + raise FileNotFoundError(f"请在 /ql/config/ 创建 token.json 配置文件") + + try: + with open(self.config_path, 'r', encoding='utf-8') as f: + config_data = json.load(f) + erke_config = config_data.get('erke', {}) + self.accounts = erke_config.get('accounts', []) + + if not self.accounts: + logger.warning("配置文件中没有找到 erke 账号信息") + else: + logger.info(f"成功加载 {len(self.accounts)} 个账号配置") + + except json.JSONDecodeError as e: + logger.error(f"配置文件JSON解析失败: {e}") + raise + except Exception as e: + logger.error(f"读取配置文件失败: {e}") + raise + + def process_account(self, account: Dict[str, Any]) -> Dict[str, Any]: + """处理单个账号任务""" + account_name = account.get('account_name', '未命名账号') + logger.info(f"\n{'='*50}") + logger.info(f"开始处理账号: {account_name}") + logger.info(f"{'='*50}") + + result = { + 'account_name': account_name, + 'success': False, + 'integral_info': None, + 'sign_info': None, + 'error': None + } + + try: + # 初始化API + api = ErkeAPI( + member_id=account.get('member_id', ''), + enterprise_id=account.get('enterprise_id', ''), + unionid=account.get('unionid', ''), + openid=account.get('openid', ''), + wx_openid=account.get('wx_openid', ''), + user_agent=account.get('user_agent') + ) + + # 1. 查询积分明细 + logger.info(f"[{account_name}] 查询积分明细...") + integral_result = api.get_integral_record(current_page=1, page_size=5) + + if integral_result['success']: + result['integral_info'] = integral_result['result'] + logger.info(f"[{account_name}] 积分明细查询成功") + + # 解析积分信息 + if integral_result['result'] and isinstance(integral_result['result'], dict): + response = integral_result['result'].get('response', {}) + if isinstance(response, dict): + accumulate_points = response.get('accumulatPoints', 0) + frozen_points = response.get('frozenPoints', 0) + available_points = accumulate_points - frozen_points + + logger.info(f"[{account_name}] 累计积分: {accumulate_points}") + logger.info(f"[{account_name}] 冻结积分: {frozen_points}") + logger.info(f"[{account_name}] 可用积分: {available_points}") + + page_data = response.get('page', {}) + if page_data: + total_count = page_data.get('totalCount', 0) + logger.info(f"[{account_name}] 积分记录数: {total_count}") + else: + logger.warning(f"[{account_name}] 积分明细查询失败: {integral_result['error']}") + + # 2. 执行签到 + logger.info(f"[{account_name}] 执行签到...") + sign_result = api.member_sign() + + if sign_result['success']: + result['sign_info'] = sign_result['result'] + if sign_result['result'] and isinstance(sign_result['result'], dict): + code = sign_result['result'].get('code', '') + message = sign_result['result'].get('message', '') + + # code: 1001 表示已签到,0000 表示签到成功 + if code == '0000': + result['success'] = True + logger.info(f"[{account_name}] 签到成功: {message}") + elif code == '1001': + result['success'] = True + logger.info(f"[{account_name}] {message}") + else: + result['success'] = False + result['error'] = message + logger.warning(f"[{account_name}] 签到返回: {message}") + else: + result['success'] = True + logger.info(f"[{account_name}] 签到完成") + else: + result['error'] = sign_result['error'] + logger.error(f"[{account_name}] 签到失败: {sign_result['error']}") + + except Exception as e: + error_msg = f"处理账号时发生异常: {str(e)}" + logger.error(f"[{account_name}] {error_msg}") + result['error'] = error_msg + + return result + + def run(self): + """执行所有账号的签到任务""" + logger.info("="*60) + logger.info("鸿星尔克签到任务开始执行") + logger.info("="*60) + + if not self.accounts: + logger.error("没有可处理的账号") + return + + # 处理每个账号 + for account in self.accounts: + result = self.process_account(account) + self.account_results.append(result) + + # 输出统计信息 + self._print_summary() + # 发送通知 + self._send_notification() + + def _print_summary(self): + """输出执行结果统计""" + logger.info("\n" + "="*60) + logger.info("执行结果统计") + logger.info("="*60) + + success_count = sum(1 for r in self.account_results if r['success']) + fail_count = len(self.account_results) - success_count + + logger.info(f"总账号数: {len(self.account_results)}") + logger.info(f"成功: {success_count}") + logger.info(f"失败: {fail_count}") + + if fail_count > 0: + logger.info("\n失败账号详情:") + for result in self.account_results: + if not result['success']: + logger.info(f" - {result['account_name']}: {result['error']}") + + def _send_notification(self): + """发送执行结果通知""" + try: + success_count = sum(1 for r in self.account_results if r['success']) + total_count = len(self.account_results) + + # 构建通知内容 + content_lines = [ + f"📊 执行统计:", + f" - 总账号数: {total_count}", + f" - 成功: {success_count}", + f" - 失败: {total_count - success_count}", + ] + + content_lines.append("\n📋 账号详情:") + for result in self.account_results: + status = "✅" if result['success'] else "❌" + content_lines.append(f" {status} {result['account_name']}") + if result['success'] and result['sign_info']: + if isinstance(result['sign_info'], dict): + message = result['sign_info'].get('message', '') + if message: + content_lines.append(f" └─ {message}") + + content = "\n".join(content_lines) + + # 发送通知(青龙支持的推送方式) + send_notification( + title="鸿星尔克签到任务完成", + content=content, + sound=NotificationSound.BIRDSONG + ) + logger.info("通知发送成功") + + except Exception as e: + logger.error(f"发送通知失败: {str(e)}") + +def main(): + """主函数(青龙面板执行入口)""" + try: + tasks = ErkeTasks() + tasks.run() + except Exception as e: + logger.error(f"程序执行失败: {str(e)}") + sys.exit(1) + +if __name__ == "__main__": + main() \ No newline at end of file