├── README.md ├── ql ├── notify.py ├── gqcqxcx.js ├── wmrsapp.js ├── ktxcx.js └── ttl.js ├── jk └── notify.py └── levi19831005.boxjs.json /README.md: -------------------------------------------------------------------------------- 1 | # 自用备份 2 | 3 | levi19831005's Scripts 4 | 5 | 这里的脚本只是自己学习 js 的一个实践,大多数是为了方便获取ck的qx重写. 6 | 7 | 仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断. 8 | 9 | 仓库内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。 10 | 11 | levi19831005 对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害. 12 | 13 | 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, levi19831005 对于由此引起的任何隐私泄漏或其他后果概不负责. 14 | 15 | 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本. 16 | 17 | 任何以任何方式查看此项目的人或直接或间接使用该Script项目的任何脚本的使用者都应仔细阅读此声明。 levi19831005 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明. 18 | 19 | 您必须在下载后的24小时内从计算机或手机中完全删除以上内容. 20 | -------------------------------------------------------------------------------- /ql/notify.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # _*_ coding:utf-8 _*_ 3 | import base64 4 | import hashlib 5 | import hmac 6 | import json 7 | import os 8 | import re 9 | import threading 10 | import time 11 | import urllib.parse 12 | 13 | import requests 14 | 15 | # 原先的 print 函数和主线程的锁 16 | _print = print 17 | mutex = threading.Lock() 18 | 19 | 20 | # 定义新的 print 函数 21 | def print(text, *args, **kw): 22 | """ 23 | 使输出有序进行,不出现多线程同一时间输出导致错乱的问题。 24 | """ 25 | with mutex: 26 | _print(text, *args, **kw) 27 | 28 | 29 | # 通知服务 30 | # fmt: off 31 | push_config = { 32 | 'HITOKOTO': False, # 启用一言(随机句子) 33 | 34 | 'BARK_PUSH': '', # bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ 35 | 'BARK_ARCHIVE': '', # bark 推送是否存档 36 | 'BARK_GROUP': '', # bark 推送分组 37 | 'BARK_SOUND': '', # bark 推送声音 38 | 39 | 'CONSOLE': True, # 控制台输出 40 | 41 | 'DD_BOT_SECRET': '', # 钉钉机器人的 DD_BOT_SECRET 42 | 'DD_BOT_TOKEN': '', # 钉钉机器人的 DD_BOT_TOKEN 43 | 44 | 'FSKEY': '', # 飞书机器人的 FSKEY 45 | 46 | 'GOBOT_URL': '', # go-cqhttp 47 | # 推送到个人QQ:http://127.0.0.1/send_private_msg 48 | # 群:http://127.0.0.1/send_group_msg 49 | 'GOBOT_QQ': '', # go-cqhttp 的推送群或用户 50 | # GOBOT_URL 设置 /send_private_msg 时填入 user_id=个人QQ 51 | # /send_group_msg 时填入 group_id=QQ群 52 | 'GOBOT_TOKEN': '', # go-cqhttp 的 access_token 53 | 54 | 'GOTIFY_URL': '', # gotify地址,如https://push.example.de:8080 55 | 'GOTIFY_TOKEN': '', # gotify的消息应用token 56 | 'GOTIFY_PRIORITY': 0, # 推送消息优先级,默认为0 57 | 58 | 'IGOT_PUSH_KEY': '', # iGot 聚合推送的 IGOT_PUSH_KEY 59 | 60 | 'PUSH_KEY': '', # server 酱的 PUSH_KEY,兼容旧版与 Turbo 版 61 | 62 | 'PUSH_PLUS_TOKEN': '', # push+ 微信推送的用户令牌 63 | 'PUSH_PLUS_USER': '', # push+ 微信推送的群组编码 64 | 65 | 'QMSG_KEY': '', # qmsg 酱的 QMSG_KEY 66 | 'QMSG_TYPE': '', # qmsg 酱的 QMSG_TYPE 67 | 68 | 'QYWX_AM': '', # 企业微信应用 69 | 70 | 'QYWX_KEY': '', # 企业微信机器人 71 | 72 | 'TG_BOT_TOKEN': '', # tg 机器人的 TG_BOT_TOKEN,例:1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ 73 | 'TG_USER_ID': '', # tg 机器人的 TG_USER_ID,例:1434078534 74 | 'TG_API_HOST': '', # tg 代理 api 75 | 'TG_PROXY_AUTH': '', # tg 代理认证参数 76 | 'TG_PROXY_HOST': '', # tg 机器人的 TG_PROXY_HOST 77 | 'TG_PROXY_PORT': '', # tg 机器人的 TG_PROXY_PORT 78 | } 79 | notify_function = [] 80 | # fmt: on 81 | 82 | # 首先读取 面板变量 或者 github action 运行变量 83 | for k in push_config: 84 | if os.getenv(k): 85 | v = os.getenv(k) 86 | push_config[k] = v 87 | 88 | 89 | def bark(title: str, content: str) -> None: 90 | """ 91 | 使用 bark 推送消息。 92 | """ 93 | if not push_config.get("BARK_PUSH"): 94 | print("bark 服务的 BARK_PUSH 未设置!!\n取消推送") 95 | return 96 | print("bark 服务启动") 97 | 98 | if push_config.get("BARK_PUSH").startswith("http"): 99 | url = f'{push_config.get("BARK_PUSH")}/{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}' 100 | else: 101 | url = f'https://api.day.app/{push_config.get("BARK_PUSH")}/{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}' 102 | 103 | bark_params = { 104 | "BARK_ARCHIVE": "isArchive", 105 | "BARK_GROUP": "group", 106 | "BARK_SOUND": "sound", 107 | } 108 | params = "" 109 | for pair in filter( 110 | lambda pairs: pairs[0].startswith("BARK_") 111 | and pairs[0] != "BARK_PUSH" 112 | and pairs[1] 113 | and bark_params.get(pairs[0]), 114 | push_config.items(), 115 | ): 116 | params += f"{bark_params.get(pair[0])}={pair[1]}&" 117 | if params: 118 | url = url + "?" + params.rstrip("&") 119 | response = requests.get(url).json() 120 | 121 | if response["code"] == 200: 122 | print("bark 推送成功!") 123 | else: 124 | print("bark 推送失败!") 125 | 126 | 127 | def console(title: str, content: str) -> None: 128 | """ 129 | 使用 控制台 推送消息。 130 | """ 131 | print(f"{title}\n\n{content}") 132 | 133 | 134 | def dingding_bot(title: str, content: str) -> None: 135 | """ 136 | 使用 钉钉机器人 推送消息。 137 | """ 138 | if not push_config.get("DD_BOT_SECRET") or not push_config.get("DD_BOT_TOKEN"): 139 | print("钉钉机器人 服务的 DD_BOT_SECRET 或者 DD_BOT_TOKEN 未设置!!\n取消推送") 140 | return 141 | print("钉钉机器人 服务启动") 142 | 143 | timestamp = str(round(time.time() * 1000)) 144 | secret_enc = push_config.get("DD_BOT_SECRET").encode("utf-8") 145 | string_to_sign = "{}\n{}".format(timestamp, push_config.get("DD_BOT_SECRET")) 146 | string_to_sign_enc = string_to_sign.encode("utf-8") 147 | hmac_code = hmac.new( 148 | secret_enc, string_to_sign_enc, digestmod=hashlib.sha256 149 | ).digest() 150 | sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) 151 | url = f'https://oapi.dingtalk.com/robot/send?access_token={push_config.get("DD_BOT_TOKEN")}×tamp={timestamp}&sign={sign}' 152 | headers = {"Content-Type": "application/json;charset=utf-8"} 153 | data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} 154 | response = requests.post( 155 | url=url, data=json.dumps(data), headers=headers, timeout=15 156 | ).json() 157 | 158 | if not response["errcode"]: 159 | print("钉钉机器人 推送成功!") 160 | else: 161 | print("钉钉机器人 推送失败!") 162 | 163 | 164 | def feishu_bot(title: str, content: str) -> None: 165 | """ 166 | 使用 飞书机器人 推送消息。 167 | """ 168 | if not push_config.get("FSKEY"): 169 | print("飞书 服务的 FSKEY 未设置!!\n取消推送") 170 | return 171 | print("飞书 服务启动") 172 | 173 | url = f'https://open.feishu.cn/open-apis/bot/v2/hook/{push_config.get("FSKEY")}' 174 | data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}} 175 | response = requests.post(url, data=json.dumps(data)).json() 176 | 177 | if response.get("StatusCode") == 0: 178 | print("飞书 推送成功!") 179 | else: 180 | print("飞书 推送失败!错误信息如下:\n", response) 181 | 182 | 183 | def go_cqhttp(title: str, content: str) -> None: 184 | """ 185 | 使用 go_cqhttp 推送消息。 186 | """ 187 | if not push_config.get("GOBOT_URL") or not push_config.get("GOBOT_QQ"): 188 | print("go-cqhttp 服务的 GOBOT_URL 或 GOBOT_QQ 未设置!!\n取消推送") 189 | return 190 | print("go-cqhttp 服务启动") 191 | 192 | url = f'{push_config.get("GOBOT_URL")}?access_token={push_config.get("GOBOT_TOKEN")}&{push_config.get("GOBOT_QQ")}&message=标题:{title}\n内容:{content}' 193 | response = requests.get(url).json() 194 | 195 | if response["status"] == "ok": 196 | print("go-cqhttp 推送成功!") 197 | else: 198 | print("go-cqhttp 推送失败!") 199 | 200 | 201 | def gotify(title:str,content:str) -> None: 202 | """ 203 | 使用 gotify 推送消息。 204 | """ 205 | if not push_config.get("GOTIFY_URL") or not push_config.get("GOTIFY_TOKEN"): 206 | print("gotify 服务的 GOTIFY_URL 或 GOTIFY_TOKEN 未设置!!\n取消推送") 207 | return 208 | print("gotify 服务启动") 209 | 210 | url = f'{push_config.get("GOTIFY_URL")}/message?token={push_config.get("GOTIFY_TOKEN")}' 211 | data = {"title": title,"message": content,"priority": push_config.get("GOTIFY_PRIORITY")} 212 | response = requests.post(url,data=data).json() 213 | 214 | if response.get("id"): 215 | print("gotify 推送成功!") 216 | else: 217 | print("gotify 推送失败!") 218 | 219 | 220 | def iGot(title: str, content: str) -> None: 221 | """ 222 | 使用 iGot 推送消息。 223 | """ 224 | if not push_config.get("IGOT_PUSH_KEY"): 225 | print("iGot 服务的 IGOT_PUSH_KEY 未设置!!\n取消推送") 226 | return 227 | print("iGot 服务启动") 228 | 229 | url = f'https://push.hellyw.com/{push_config.get("IGOT_PUSH_KEY")}' 230 | data = {"title": title, "content": content} 231 | headers = {"Content-Type": "application/x-www-form-urlencoded"} 232 | response = requests.post(url, data=data, headers=headers).json() 233 | 234 | if response["ret"] == 0: 235 | print("iGot 推送成功!") 236 | else: 237 | print(f'iGot 推送失败!{response["errMsg"]}') 238 | 239 | 240 | def serverJ(title: str, content: str) -> None: 241 | """ 242 | 通过 serverJ 推送消息。 243 | """ 244 | if not push_config.get("PUSH_KEY"): 245 | print("serverJ 服务的 PUSH_KEY 未设置!!\n取消推送") 246 | return 247 | print("serverJ 服务启动") 248 | 249 | data = {"text": title, "desp": content.replace("\n", "\n\n")} 250 | if push_config.get("PUSH_KEY").index("SCT") != -1: 251 | url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send' 252 | else: 253 | url = f'https://sc.ftqq.com/${push_config.get("PUSH_KEY")}.send' 254 | response = requests.post(url, data=data).json() 255 | 256 | if response.get("errno") == 0 or response.get("code") == 0: 257 | print("serverJ 推送成功!") 258 | else: 259 | print(f'serverJ 推送失败!错误码:{response["message"]}') 260 | 261 | 262 | def pushplus_bot(title: str, content: str) -> None: 263 | """ 264 | 通过 push+ 推送消息。 265 | """ 266 | if not push_config.get("PUSH_PLUS_TOKEN"): 267 | print("PUSHPLUS 服务的 PUSH_PLUS_TOKEN 未设置!!\n取消推送") 268 | return 269 | print("PUSHPLUS 服务启动") 270 | 271 | url = "http://www.pushplus.plus/send" 272 | data = { 273 | "token": push_config.get("PUSH_PLUS_TOKEN"), 274 | "title": title, 275 | "content": content, 276 | "topic": push_config.get("PUSH_PLUS_USER"), 277 | } 278 | body = json.dumps(data).encode(encoding="utf-8") 279 | headers = {"Content-Type": "application/json"} 280 | response = requests.post(url=url, data=body, headers=headers).json() 281 | 282 | if response["code"] == 200: 283 | print("PUSHPLUS 推送成功!") 284 | 285 | else: 286 | 287 | url_old = "http://pushplus.hxtrip.com/send" 288 | headers["Accept"] = "application/json" 289 | response = requests.post(url=url_old, data=body, headers=headers).json() 290 | 291 | if response["code"] == 200: 292 | print("PUSHPLUS(hxtrip) 推送成功!") 293 | 294 | else: 295 | print("PUSHPLUS 推送失败!") 296 | 297 | 298 | def qmsg_bot(title: str, content: str) -> None: 299 | """ 300 | 使用 qmsg 推送消息。 301 | """ 302 | if not push_config.get("QMSG_KEY") or not push_config.get("QMSG_TYPE"): 303 | print("qmsg 的 QMSG_KEY 或者 QMSG_TYPE 未设置!!\n取消推送") 304 | return 305 | print("qmsg 服务启动") 306 | 307 | url = f'https://qmsg.zendee.cn/{push_config.get("QMSG_TYPE")}/{push_config.get("QMSG_KEY")}' 308 | payload = {"msg": f'{title}\n\n{content.replace("----", "-")}'.encode("utf-8")} 309 | response = requests.post(url=url, params=payload).json() 310 | 311 | if response["code"] == 0: 312 | print("qmsg 推送成功!") 313 | else: 314 | print(f'qmsg 推送失败!{response["reason"]}') 315 | 316 | 317 | def wecom_app(title: str, content: str) -> None: 318 | """ 319 | 通过 企业微信 APP 推送消息。 320 | """ 321 | if not push_config.get("QYWX_AM"): 322 | print("QYWX_AM 未设置!!\n取消推送") 323 | return 324 | QYWX_AM_AY = re.split(",", push_config.get("QYWX_AM")) 325 | if 4 < len(QYWX_AM_AY) > 5: 326 | print("QYWX_AM 设置错误!!\n取消推送") 327 | return 328 | print("企业微信 APP 服务启动") 329 | 330 | corpid = QYWX_AM_AY[0] 331 | corpsecret = QYWX_AM_AY[1] 332 | touser = QYWX_AM_AY[2] 333 | agentid = QYWX_AM_AY[3] 334 | try: 335 | media_id = QYWX_AM_AY[4] 336 | except IndexError: 337 | media_id = "" 338 | wx = WeCom(corpid, corpsecret, agentid) 339 | # 如果没有配置 media_id 默认就以 text 方式发送 340 | if not media_id: 341 | message = title + "\n\n" + content 342 | response = wx.send_text(message, touser) 343 | else: 344 | response = wx.send_mpnews(title, content, media_id, touser) 345 | 346 | if response == "ok": 347 | print("企业微信推送成功!") 348 | else: 349 | print("企业微信推送失败!错误信息如下:\n", response) 350 | 351 | 352 | class WeCom: 353 | def __init__(self, corpid, corpsecret, agentid): 354 | self.CORPID = corpid 355 | self.CORPSECRET = corpsecret 356 | self.AGENTID = agentid 357 | 358 | def get_access_token(self): 359 | url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken" 360 | values = { 361 | "corpid": self.CORPID, 362 | "corpsecret": self.CORPSECRET, 363 | } 364 | req = requests.post(url, params=values) 365 | data = json.loads(req.text) 366 | return data["access_token"] 367 | 368 | def send_text(self, message, touser="@all"): 369 | send_url = ( 370 | "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" 371 | + self.get_access_token() 372 | ) 373 | send_values = { 374 | "touser": touser, 375 | "msgtype": "text", 376 | "agentid": self.AGENTID, 377 | "text": {"content": message}, 378 | "safe": "0", 379 | } 380 | send_msges = bytes(json.dumps(send_values), "utf-8") 381 | respone = requests.post(send_url, send_msges) 382 | respone = respone.json() 383 | return respone["errmsg"] 384 | 385 | def send_mpnews(self, title, message, media_id, touser="@all"): 386 | send_url = ( 387 | "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" 388 | + self.get_access_token() 389 | ) 390 | send_values = { 391 | "touser": touser, 392 | "msgtype": "mpnews", 393 | "agentid": self.AGENTID, 394 | "mpnews": { 395 | "articles": [ 396 | { 397 | "title": title, 398 | "thumb_media_id": media_id, 399 | "author": "Author", 400 | "content_source_url": "", 401 | "content": message.replace("\n", "
"), 402 | "digest": message, 403 | } 404 | ] 405 | }, 406 | } 407 | send_msges = bytes(json.dumps(send_values), "utf-8") 408 | respone = requests.post(send_url, send_msges) 409 | respone = respone.json() 410 | return respone["errmsg"] 411 | 412 | 413 | def wecom_bot(title: str, content: str) -> None: 414 | """ 415 | 通过 企业微信机器人 推送消息。 416 | """ 417 | if not push_config.get("QYWX_KEY"): 418 | print("企业微信机器人 服务的 QYWX_KEY 未设置!!\n取消推送") 419 | return 420 | print("企业微信机器人服务启动") 421 | 422 | url = f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={push_config.get('QYWX_KEY')}" 423 | headers = {"Content-Type": "application/json;charset=utf-8"} 424 | data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} 425 | response = requests.post( 426 | url=url, data=json.dumps(data), headers=headers, timeout=15 427 | ).json() 428 | 429 | if response["errcode"] == 0: 430 | print("企业微信机器人推送成功!") 431 | else: 432 | print("企业微信机器人推送失败!") 433 | 434 | 435 | def telegram_bot(title: str, content: str) -> None: 436 | """ 437 | 使用 telegram 机器人 推送消息。 438 | """ 439 | if not push_config.get("TG_BOT_TOKEN") or not push_config.get("TG_USER_ID"): 440 | print("tg 服务的 bot_token 或者 user_id 未设置!!\n取消推送") 441 | return 442 | print("tg 服务启动") 443 | 444 | if push_config.get("TG_API_HOST"): 445 | url = f"https://{push_config.get('TG_API_HOST')}/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" 446 | else: 447 | url = ( 448 | f"https://api.telegram.org/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" 449 | ) 450 | headers = {"Content-Type": "application/x-www-form-urlencoded"} 451 | payload = { 452 | "chat_id": str(push_config.get("TG_USER_ID")), 453 | "text": f"{title}\n\n{content}", 454 | "disable_web_page_preview": "true", 455 | } 456 | proxies = None 457 | if push_config.get("TG_PROXY_HOST") and push_config.get("TG_PROXY_PORT"): 458 | if push_config.get("TG_PROXY_AUTH") is not None and "@" not in push_config.get( 459 | "TG_PROXY_HOST" 460 | ): 461 | push_config["TG_PROXY_HOST"] = ( 462 | push_config.get("TG_PROXY_AUTH") 463 | + "@" 464 | + push_config.get("TG_PROXY_HOST") 465 | ) 466 | proxyStr = "http://{}:{}".format( 467 | push_config.get("TG_PROXY_HOST"), push_config.get("TG_PROXY_PORT") 468 | ) 469 | proxies = {"http": proxyStr, "https": proxyStr} 470 | response = requests.post( 471 | url=url, headers=headers, params=payload, proxies=proxies 472 | ).json() 473 | 474 | if response["ok"]: 475 | print("tg 推送成功!") 476 | else: 477 | print("tg 推送失败!") 478 | 479 | 480 | def one() -> str: 481 | """ 482 | 获取一条一言。 483 | :return: 484 | """ 485 | url = "https://v1.hitokoto.cn/" 486 | res = requests.get(url).json() 487 | return res["hitokoto"] + " ----" + res["from"] 488 | 489 | 490 | if push_config.get("BARK_PUSH"): 491 | notify_function.append(bark) 492 | if push_config.get("CONSOLE"): 493 | notify_function.append(console) 494 | if push_config.get("DD_BOT_TOKEN") and push_config.get("DD_BOT_SECRET"): 495 | notify_function.append(dingding_bot) 496 | if push_config.get("FSKEY"): 497 | notify_function.append(feishu_bot) 498 | if push_config.get("GOBOT_URL") and push_config.get("GOBOT_QQ"): 499 | notify_function.append(go_cqhttp) 500 | if push_config.get("GOTIFY_URL") and push_config.get("GOTIFY_TOKEN"): 501 | notify_function.append(gotify) 502 | if push_config.get("IGOT_PUSH_KEY"): 503 | notify_function.append(iGot) 504 | if push_config.get("PUSH_KEY"): 505 | notify_function.append(serverJ) 506 | if push_config.get("PUSH_PLUS_TOKEN"): 507 | notify_function.append(pushplus_bot) 508 | if push_config.get("QMSG_KEY") and push_config.get("QMSG_TYPE"): 509 | notify_function.append(qmsg_bot) 510 | if push_config.get("QYWX_AM"): 511 | notify_function.append(wecom_app) 512 | if push_config.get("QYWX_KEY"): 513 | notify_function.append(wecom_bot) 514 | if push_config.get("TG_BOT_TOKEN") and push_config.get("TG_USER_ID"): 515 | notify_function.append(telegram_bot) 516 | 517 | 518 | def send(title: str, content: str) -> None: 519 | if not content: 520 | print(f"{title} 推送内容为空!") 521 | return 522 | 523 | hitokoto = push_config.get("HITOKOTO") 524 | 525 | text = one() if hitokoto else "" 526 | content += "\n\n" + text 527 | 528 | ts = [ 529 | threading.Thread(target=mode, args=(title, content), name=mode.__name__) 530 | for mode in notify_function 531 | ] 532 | [t.start() for t in ts] 533 | [t.join() for t in ts] 534 | 535 | 536 | def main(): 537 | send("title", "content") 538 | 539 | 540 | if __name__ == "__main__": 541 | main() 542 | -------------------------------------------------------------------------------- /jk/notify.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # _*_ coding:utf-8 _*_ 3 | import base64 4 | import hashlib 5 | import hmac 6 | import json 7 | import os 8 | import re 9 | import threading 10 | import time 11 | import urllib.parse 12 | 13 | import requests 14 | 15 | # 原先的 print 函数和主线程的锁 16 | _print = print 17 | mutex = threading.Lock() 18 | 19 | 20 | # 定义新的 print 函数 21 | def print(text, *args, **kw): 22 | """ 23 | 使输出有序进行,不出现多线程同一时间输出导致错乱的问题。 24 | """ 25 | with mutex: 26 | _print(text, *args, **kw) 27 | 28 | 29 | # 通知服务 30 | # fmt: off 31 | push_config = { 32 | 'HITOKOTO': False, # 启用一言(随机句子) 33 | 34 | 'BARK_PUSH': 'https://api.day.app/C9V7TY4rS27GxfrK8mXvC5/麦斯威尔库存', # bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ 35 | 'BARK_ARCHIVE': '', # bark 推送是否存档 36 | 'BARK_GROUP': '', # bark 推送分组 37 | 'BARK_SOUND': '', # bark 推送声音 38 | 39 | 'CONSOLE': True, # 控制台输出 40 | 41 | 'DD_BOT_SECRET': '', # 钉钉机器人的 DD_BOT_SECRET 42 | 'DD_BOT_TOKEN': '', # 钉钉机器人的 DD_BOT_TOKEN 43 | 44 | 'FSKEY': '', # 飞书机器人的 FSKEY 45 | 46 | 'GOBOT_URL': '', # go-cqhttp 47 | # 推送到个人QQ:http://127.0.0.1/send_private_msg 48 | # 群:http://127.0.0.1/send_group_msg 49 | 'GOBOT_QQ': '', # go-cqhttp 的推送群或用户 50 | # GOBOT_URL 设置 /send_private_msg 时填入 user_id=个人QQ 51 | # /send_group_msg 时填入 group_id=QQ群 52 | 'GOBOT_TOKEN': '', # go-cqhttp 的 access_token 53 | 54 | 'GOTIFY_URL': '', # gotify地址,如https://push.example.de:8080 55 | 'GOTIFY_TOKEN': '', # gotify的消息应用token 56 | 'GOTIFY_PRIORITY': 0, # 推送消息优先级,默认为0 57 | 58 | 'IGOT_PUSH_KEY': '', # iGot 聚合推送的 IGOT_PUSH_KEY 59 | 60 | 'PUSH_KEY': '', # server 酱的 PUSH_KEY,兼容旧版与 Turbo 版 61 | 62 | 'PUSH_PLUS_TOKEN': '', # push+ 微信推送的用户令牌 63 | 'PUSH_PLUS_USER': '', # push+ 微信推送的群组编码 64 | 65 | 'QMSG_KEY': '', # qmsg 酱的 QMSG_KEY 66 | 'QMSG_TYPE': '', # qmsg 酱的 QMSG_TYPE 67 | 68 | 'QYWX_AM': '', # 企业微信应用 69 | 70 | 'QYWX_KEY': '', # 企业微信机器人 71 | 72 | 'TG_BOT_TOKEN': '', # tg 机器人的 TG_BOT_TOKEN,例:1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ 73 | 'TG_USER_ID': '', # tg 机器人的 TG_USER_ID,例:1434078534 74 | 'TG_API_HOST': '', # tg 代理 api 75 | 'TG_PROXY_AUTH': '', # tg 代理认证参数 76 | 'TG_PROXY_HOST': '', # tg 机器人的 TG_PROXY_HOST 77 | 'TG_PROXY_PORT': '', # tg 机器人的 TG_PROXY_PORT 78 | } 79 | notify_function = [] 80 | # fmt: on 81 | 82 | # 首先读取 面板变量 或者 github action 运行变量 83 | for k in push_config: 84 | if os.getenv(k): 85 | v = os.getenv(k) 86 | push_config[k] = v 87 | 88 | 89 | def bark(title: str, content: str) -> None: 90 | """ 91 | 使用 bark 推送消息。 92 | """ 93 | if not push_config.get("BARK_PUSH"): 94 | print("bark 服务的 BARK_PUSH 未设置!!\n取消推送") 95 | return 96 | print("bark 服务启动") 97 | 98 | if push_config.get("BARK_PUSH").startswith("http"): 99 | url = f'{push_config.get("BARK_PUSH")}/{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}' 100 | else: 101 | url = f'https://api.day.app/{push_config.get("BARK_PUSH")}/{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}' 102 | 103 | bark_params = { 104 | "BARK_ARCHIVE": "isArchive", 105 | "BARK_GROUP": "group", 106 | "BARK_SOUND": "sound", 107 | } 108 | params = "" 109 | for pair in filter( 110 | lambda pairs: pairs[0].startswith("BARK_") 111 | and pairs[0] != "BARK_PUSH" 112 | and pairs[1] 113 | and bark_params.get(pairs[0]), 114 | push_config.items(), 115 | ): 116 | params += f"{bark_params.get(pair[0])}={pair[1]}&" 117 | if params: 118 | url = url + "?" + params.rstrip("&") 119 | response = requests.get(url).json() 120 | 121 | if response["code"] == 200: 122 | print("bark 推送成功!") 123 | else: 124 | print("bark 推送失败!") 125 | 126 | 127 | def console(title: str, content: str) -> None: 128 | """ 129 | 使用 控制台 推送消息。 130 | """ 131 | print(f"{title}\n\n{content}") 132 | 133 | 134 | def dingding_bot(title: str, content: str) -> None: 135 | """ 136 | 使用 钉钉机器人 推送消息。 137 | """ 138 | if not push_config.get("DD_BOT_SECRET") or not push_config.get("DD_BOT_TOKEN"): 139 | print("钉钉机器人 服务的 DD_BOT_SECRET 或者 DD_BOT_TOKEN 未设置!!\n取消推送") 140 | return 141 | print("钉钉机器人 服务启动") 142 | 143 | timestamp = str(round(time.time() * 1000)) 144 | secret_enc = push_config.get("DD_BOT_SECRET").encode("utf-8") 145 | string_to_sign = "{}\n{}".format(timestamp, push_config.get("DD_BOT_SECRET")) 146 | string_to_sign_enc = string_to_sign.encode("utf-8") 147 | hmac_code = hmac.new( 148 | secret_enc, string_to_sign_enc, digestmod=hashlib.sha256 149 | ).digest() 150 | sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) 151 | url = f'https://oapi.dingtalk.com/robot/send?access_token={push_config.get("DD_BOT_TOKEN")}×tamp={timestamp}&sign={sign}' 152 | headers = {"Content-Type": "application/json;charset=utf-8"} 153 | data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} 154 | response = requests.post( 155 | url=url, data=json.dumps(data), headers=headers, timeout=15 156 | ).json() 157 | 158 | if not response["errcode"]: 159 | print("钉钉机器人 推送成功!") 160 | else: 161 | print("钉钉机器人 推送失败!") 162 | 163 | 164 | def feishu_bot(title: str, content: str) -> None: 165 | """ 166 | 使用 飞书机器人 推送消息。 167 | """ 168 | if not push_config.get("FSKEY"): 169 | print("飞书 服务的 FSKEY 未设置!!\n取消推送") 170 | return 171 | print("飞书 服务启动") 172 | 173 | url = f'https://open.feishu.cn/open-apis/bot/v2/hook/{push_config.get("FSKEY")}' 174 | data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}} 175 | response = requests.post(url, data=json.dumps(data)).json() 176 | 177 | if response.get("StatusCode") == 0: 178 | print("飞书 推送成功!") 179 | else: 180 | print("飞书 推送失败!错误信息如下:\n", response) 181 | 182 | 183 | def go_cqhttp(title: str, content: str) -> None: 184 | """ 185 | 使用 go_cqhttp 推送消息。 186 | """ 187 | if not push_config.get("GOBOT_URL") or not push_config.get("GOBOT_QQ"): 188 | print("go-cqhttp 服务的 GOBOT_URL 或 GOBOT_QQ 未设置!!\n取消推送") 189 | return 190 | print("go-cqhttp 服务启动") 191 | 192 | url = f'{push_config.get("GOBOT_URL")}?access_token={push_config.get("GOBOT_TOKEN")}&{push_config.get("GOBOT_QQ")}&message=标题:{title}\n内容:{content}' 193 | response = requests.get(url).json() 194 | 195 | if response["status"] == "ok": 196 | print("go-cqhttp 推送成功!") 197 | else: 198 | print("go-cqhttp 推送失败!") 199 | 200 | 201 | def gotify(title:str,content:str) -> None: 202 | """ 203 | 使用 gotify 推送消息。 204 | """ 205 | if not push_config.get("GOTIFY_URL") or not push_config.get("GOTIFY_TOKEN"): 206 | print("gotify 服务的 GOTIFY_URL 或 GOTIFY_TOKEN 未设置!!\n取消推送") 207 | return 208 | print("gotify 服务启动") 209 | 210 | url = f'{push_config.get("GOTIFY_URL")}/message?token={push_config.get("GOTIFY_TOKEN")}' 211 | data = {"title": title,"message": content,"priority": push_config.get("GOTIFY_PRIORITY")} 212 | response = requests.post(url,data=data).json() 213 | 214 | if response.get("id"): 215 | print("gotify 推送成功!") 216 | else: 217 | print("gotify 推送失败!") 218 | 219 | 220 | def iGot(title: str, content: str) -> None: 221 | """ 222 | 使用 iGot 推送消息。 223 | """ 224 | if not push_config.get("IGOT_PUSH_KEY"): 225 | print("iGot 服务的 IGOT_PUSH_KEY 未设置!!\n取消推送") 226 | return 227 | print("iGot 服务启动") 228 | 229 | url = f'https://push.hellyw.com/{push_config.get("IGOT_PUSH_KEY")}' 230 | data = {"title": title, "content": content} 231 | headers = {"Content-Type": "application/x-www-form-urlencoded"} 232 | response = requests.post(url, data=data, headers=headers).json() 233 | 234 | if response["ret"] == 0: 235 | print("iGot 推送成功!") 236 | else: 237 | print(f'iGot 推送失败!{response["errMsg"]}') 238 | 239 | 240 | def serverJ(title: str, content: str) -> None: 241 | """ 242 | 通过 serverJ 推送消息。 243 | """ 244 | if not push_config.get("PUSH_KEY"): 245 | print("serverJ 服务的 PUSH_KEY 未设置!!\n取消推送") 246 | return 247 | print("serverJ 服务启动") 248 | 249 | data = {"text": title, "desp": content.replace("\n", "\n\n")} 250 | if push_config.get("PUSH_KEY").index("SCT") != -1: 251 | url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send' 252 | else: 253 | url = f'https://sc.ftqq.com/${push_config.get("PUSH_KEY")}.send' 254 | response = requests.post(url, data=data).json() 255 | 256 | if response.get("errno") == 0 or response.get("code") == 0: 257 | print("serverJ 推送成功!") 258 | else: 259 | print(f'serverJ 推送失败!错误码:{response["message"]}') 260 | 261 | 262 | def pushplus_bot(title: str, content: str) -> None: 263 | """ 264 | 通过 push+ 推送消息。 265 | """ 266 | if not push_config.get("PUSH_PLUS_TOKEN"): 267 | print("PUSHPLUS 服务的 PUSH_PLUS_TOKEN 未设置!!\n取消推送") 268 | return 269 | print("PUSHPLUS 服务启动") 270 | 271 | url = "http://www.pushplus.plus/send" 272 | data = { 273 | "token": push_config.get("PUSH_PLUS_TOKEN"), 274 | "title": title, 275 | "content": content, 276 | "topic": push_config.get("PUSH_PLUS_USER"), 277 | } 278 | body = json.dumps(data).encode(encoding="utf-8") 279 | headers = {"Content-Type": "application/json"} 280 | response = requests.post(url=url, data=body, headers=headers).json() 281 | 282 | if response["code"] == 200: 283 | print("PUSHPLUS 推送成功!") 284 | 285 | else: 286 | 287 | url_old = "http://pushplus.hxtrip.com/send" 288 | headers["Accept"] = "application/json" 289 | response = requests.post(url=url_old, data=body, headers=headers).json() 290 | 291 | if response["code"] == 200: 292 | print("PUSHPLUS(hxtrip) 推送成功!") 293 | 294 | else: 295 | print("PUSHPLUS 推送失败!") 296 | 297 | 298 | def qmsg_bot(title: str, content: str) -> None: 299 | """ 300 | 使用 qmsg 推送消息。 301 | """ 302 | if not push_config.get("QMSG_KEY") or not push_config.get("QMSG_TYPE"): 303 | print("qmsg 的 QMSG_KEY 或者 QMSG_TYPE 未设置!!\n取消推送") 304 | return 305 | print("qmsg 服务启动") 306 | 307 | url = f'https://qmsg.zendee.cn/{push_config.get("QMSG_TYPE")}/{push_config.get("QMSG_KEY")}' 308 | payload = {"msg": f'{title}\n\n{content.replace("----", "-")}'.encode("utf-8")} 309 | response = requests.post(url=url, params=payload).json() 310 | 311 | if response["code"] == 0: 312 | print("qmsg 推送成功!") 313 | else: 314 | print(f'qmsg 推送失败!{response["reason"]}') 315 | 316 | 317 | def wecom_app(title: str, content: str) -> None: 318 | """ 319 | 通过 企业微信 APP 推送消息。 320 | """ 321 | if not push_config.get("QYWX_AM"): 322 | print("QYWX_AM 未设置!!\n取消推送") 323 | return 324 | QYWX_AM_AY = re.split(",", push_config.get("QYWX_AM")) 325 | if 4 < len(QYWX_AM_AY) > 5: 326 | print("QYWX_AM 设置错误!!\n取消推送") 327 | return 328 | print("企业微信 APP 服务启动") 329 | 330 | corpid = QYWX_AM_AY[0] 331 | corpsecret = QYWX_AM_AY[1] 332 | touser = QYWX_AM_AY[2] 333 | agentid = QYWX_AM_AY[3] 334 | try: 335 | media_id = QYWX_AM_AY[4] 336 | except IndexError: 337 | media_id = "" 338 | wx = WeCom(corpid, corpsecret, agentid) 339 | # 如果没有配置 media_id 默认就以 text 方式发送 340 | if not media_id: 341 | message = title + "\n\n" + content 342 | response = wx.send_text(message, touser) 343 | else: 344 | response = wx.send_mpnews(title, content, media_id, touser) 345 | 346 | if response == "ok": 347 | print("企业微信推送成功!") 348 | else: 349 | print("企业微信推送失败!错误信息如下:\n", response) 350 | 351 | 352 | class WeCom: 353 | def __init__(self, corpid, corpsecret, agentid): 354 | self.CORPID = corpid 355 | self.CORPSECRET = corpsecret 356 | self.AGENTID = agentid 357 | 358 | def get_access_token(self): 359 | url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken" 360 | values = { 361 | "corpid": self.CORPID, 362 | "corpsecret": self.CORPSECRET, 363 | } 364 | req = requests.post(url, params=values) 365 | data = json.loads(req.text) 366 | return data["access_token"] 367 | 368 | def send_text(self, message, touser="@all"): 369 | send_url = ( 370 | "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" 371 | + self.get_access_token() 372 | ) 373 | send_values = { 374 | "touser": touser, 375 | "msgtype": "text", 376 | "agentid": self.AGENTID, 377 | "text": {"content": message}, 378 | "safe": "0", 379 | } 380 | send_msges = bytes(json.dumps(send_values), "utf-8") 381 | respone = requests.post(send_url, send_msges) 382 | respone = respone.json() 383 | return respone["errmsg"] 384 | 385 | def send_mpnews(self, title, message, media_id, touser="@all"): 386 | send_url = ( 387 | "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" 388 | + self.get_access_token() 389 | ) 390 | send_values = { 391 | "touser": touser, 392 | "msgtype": "mpnews", 393 | "agentid": self.AGENTID, 394 | "mpnews": { 395 | "articles": [ 396 | { 397 | "title": title, 398 | "thumb_media_id": media_id, 399 | "author": "Author", 400 | "content_source_url": "", 401 | "content": message.replace("\n", "
"), 402 | "digest": message, 403 | } 404 | ] 405 | }, 406 | } 407 | send_msges = bytes(json.dumps(send_values), "utf-8") 408 | respone = requests.post(send_url, send_msges) 409 | respone = respone.json() 410 | return respone["errmsg"] 411 | 412 | 413 | def wecom_bot(title: str, content: str) -> None: 414 | """ 415 | 通过 企业微信机器人 推送消息。 416 | """ 417 | if not push_config.get("QYWX_KEY"): 418 | print("企业微信机器人 服务的 QYWX_KEY 未设置!!\n取消推送") 419 | return 420 | print("企业微信机器人服务启动") 421 | 422 | url = f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={push_config.get('QYWX_KEY')}" 423 | headers = {"Content-Type": "application/json;charset=utf-8"} 424 | data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} 425 | response = requests.post( 426 | url=url, data=json.dumps(data), headers=headers, timeout=15 427 | ).json() 428 | 429 | if response["errcode"] == 0: 430 | print("企业微信机器人推送成功!") 431 | else: 432 | print("企业微信机器人推送失败!") 433 | 434 | 435 | def telegram_bot(title: str, content: str) -> None: 436 | """ 437 | 使用 telegram 机器人 推送消息。 438 | """ 439 | if not push_config.get("TG_BOT_TOKEN") or not push_config.get("TG_USER_ID"): 440 | print("tg 服务的 bot_token 或者 user_id 未设置!!\n取消推送") 441 | return 442 | print("tg 服务启动") 443 | 444 | if push_config.get("TG_API_HOST"): 445 | url = f"https://{push_config.get('TG_API_HOST')}/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" 446 | else: 447 | url = ( 448 | f"https://api.telegram.org/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" 449 | ) 450 | headers = {"Content-Type": "application/x-www-form-urlencoded"} 451 | payload = { 452 | "chat_id": str(push_config.get("TG_USER_ID")), 453 | "text": f"{title}\n\n{content}", 454 | "disable_web_page_preview": "true", 455 | } 456 | proxies = None 457 | if push_config.get("TG_PROXY_HOST") and push_config.get("TG_PROXY_PORT"): 458 | if push_config.get("TG_PROXY_AUTH") is not None and "@" not in push_config.get( 459 | "TG_PROXY_HOST" 460 | ): 461 | push_config["TG_PROXY_HOST"] = ( 462 | push_config.get("TG_PROXY_AUTH") 463 | + "@" 464 | + push_config.get("TG_PROXY_HOST") 465 | ) 466 | proxyStr = "http://{}:{}".format( 467 | push_config.get("TG_PROXY_HOST"), push_config.get("TG_PROXY_PORT") 468 | ) 469 | proxies = {"http": proxyStr, "https": proxyStr} 470 | response = requests.post( 471 | url=url, headers=headers, params=payload, proxies=proxies 472 | ).json() 473 | 474 | if response["ok"]: 475 | print("tg 推送成功!") 476 | else: 477 | print("tg 推送失败!") 478 | 479 | 480 | def one() -> str: 481 | """ 482 | 获取一条一言。 483 | :return: 484 | """ 485 | url = "https://v1.hitokoto.cn/" 486 | res = requests.get(url).json() 487 | return res["hitokoto"] + " ----" + res["from"] 488 | 489 | 490 | if push_config.get("BARK_PUSH"): 491 | notify_function.append(bark) 492 | if push_config.get("CONSOLE"): 493 | notify_function.append(console) 494 | if push_config.get("DD_BOT_TOKEN") and push_config.get("DD_BOT_SECRET"): 495 | notify_function.append(dingding_bot) 496 | if push_config.get("FSKEY"): 497 | notify_function.append(feishu_bot) 498 | if push_config.get("GOBOT_URL") and push_config.get("GOBOT_QQ"): 499 | notify_function.append(go_cqhttp) 500 | if push_config.get("GOTIFY_URL") and push_config.get("GOTIFY_TOKEN"): 501 | notify_function.append(gotify) 502 | if push_config.get("IGOT_PUSH_KEY"): 503 | notify_function.append(iGot) 504 | if push_config.get("PUSH_KEY"): 505 | notify_function.append(serverJ) 506 | if push_config.get("PUSH_PLUS_TOKEN"): 507 | notify_function.append(pushplus_bot) 508 | if push_config.get("QMSG_KEY") and push_config.get("QMSG_TYPE"): 509 | notify_function.append(qmsg_bot) 510 | if push_config.get("QYWX_AM"): 511 | notify_function.append(wecom_app) 512 | if push_config.get("QYWX_KEY"): 513 | notify_function.append(wecom_bot) 514 | if push_config.get("TG_BOT_TOKEN") and push_config.get("TG_USER_ID"): 515 | notify_function.append(telegram_bot) 516 | 517 | 518 | def send(title: str, content: str) -> None: 519 | if not content: 520 | print(f"{title} 推送内容为空!") 521 | return 522 | 523 | hitokoto = push_config.get("HITOKOTO") 524 | 525 | text = one() if hitokoto else "" 526 | content += "\n\n" + text 527 | 528 | ts = [ 529 | threading.Thread(target=mode, args=(title, content), name=mode.__name__) 530 | for mode in notify_function 531 | ] 532 | [t.start() for t in ts] 533 | [t.join() for t in ts] 534 | 535 | 536 | def main(): 537 | send("title", "content") 538 | 539 | 540 | if __name__ == "__main__": 541 | main() 542 | 543 | -------------------------------------------------------------------------------- /ql/gqcqxcx.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 请勿烂分享脚本 3 | * 广汽传祺 vx小程序 4 | * 5 | * cron 30 7 * * * 请自定义时间 每日一次 ck有效期测试了3天未掉 6 | * 2022-9-28 广汽传祺wx小程序,每天登陆有30G豆 7 | * 感谢各群里位大佬的模板和指导-@hhx 8 | * 9 | * ========= 青龙--配置文件 ========= 10 | * 抓域名mall.gacmotor.com下请求头下的token填入变量,DS-AT开头的 11 | * 变量格式: export gqcq_token="token@token"多个账号换行 或用 @ 分割 12 | * 13 | */ 14 | 15 | const $ = new Env("广汽传祺小程序"); 16 | const notify = $.isNode() ? require("./sendNotify") : ""; 17 | const Notify = 1 //0为关闭通知,1为打开通知,默认为1 18 | const debug = 0 //0为关闭调试,1为打开调试,默认为0 19 | /////////////////////////////////////////////////////////////////// 20 | let ckStr = process.env.gqcq_token; 21 | let msg = ""; 22 | let ck = ""; 23 | let host = "mall.gacmotor.com"; 24 | let hostname = "https://" + host; 25 | 26 | /** 27 | * 模块不要动------------------------------------------------------------------- 28 | */ 29 | 30 | 31 | 32 | 33 | async function tips(ckArr) { 34 | 35 | console.log(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); 36 | msg += `\n =============== 共找到 ${ckArr.length} 个账号 ===============` 37 | debugLog(`【debug】 这是你的账号数组: \n ${ckArr} `); 38 | } 39 | 40 | !(async () => { 41 | let ckArr = await getCks(ckStr, "gqcq_token"); 42 | await tips(ckArr); 43 | for (let index = 0; index < ckArr.length; index++) { 44 | qckf_num = index + 1; 45 | console.log(`\n------------- 开始【第 ${qckf_num} 个账号】------------- `); 46 | msg += `\n------------- 开始【第 ${qckf_num} 个账号】------------- ` 47 | ck = ckArr[index].split("&"); 48 | debugLog(`【debug】 这是你第 ${qckf_num} 账号信息: ${ck} `); 49 | await start(); 50 | } 51 | await SendMsg(msg); 52 | })() 53 | .catch((e) => $.logErr(e)) 54 | .finally(() => $.done()); 55 | /** 56 | * 模块不要动------------------------------------------------------------------- 57 | */ 58 | 59 | 60 | 61 | /** 62 | * 整个任务执行的流程------------------------------------------------------------------- 63 | */ 64 | async function start() { 65 | 66 | console.log("\n ----------每日签到----------"); 67 | await sign(); 68 | 69 | 70 | console.log("\n ----------用户信息----------"); 71 | await gdxx(); 72 | 73 | } 74 | 75 | /** 76 | * 整个任务执行的流程-------------------------------------------------------------------- 77 | */ 78 | 79 | 80 | // ************************************************************* 封装函数 ************************************************************* 81 | /** 82 | * 签到 POST 83 | 84 | * 85 | * 86 | */ 87 | async function sign() { 88 | let options = { 89 | method: 'POST', 90 | url: `${hostname}/center-current-app/fronted/myHomePage/checkLoginSendGdou`, 91 | headers: { 92 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 93 | 'content-type' : `application/json`, 94 | 'Connection' : `keep-alive`, 95 | 'Host': host, 96 | 'version' : `3.1.2`, 97 | 'token': `${ck[0]}` 98 | }, 99 | body: JSON.stringify({}) 100 | }; 101 | let result = await httpRequest(options, `签到`); 102 | 103 | if (result.data.gdouNum == 30) { 104 | console.log(`\n 签到获得30G豆`); 105 | msg += `\n 签到获得30G豆`; 106 | } else if (result.data.gdouNum == 0) { 107 | console.log(`\n 今日已签`); 108 | msg += `\n 今日已签`; 109 | } 110 | } 111 | 112 | 113 | /** 114 | * G豆信息 GET 115 | * 116 | */ 117 | async function gdxx() { 118 | let options = { 119 | method: 'POST', 120 | url: `${hostname}/center-current-app/fronted/myHomePage/myInfo`, 121 | headers: { 122 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 123 | 'content-type' : `application/json`, 124 | 'Connection' : `keep-alive`, 125 | 'Host': host, 126 | 'version' : `3.1.2`, 127 | 'token': `${ck[0]}` 128 | }, 129 | body: JSON.stringify({}) 130 | }; 131 | let result = await httpRequest(options, `G豆总数`); 132 | 133 | if (result.code == 0000) { 134 | console.log(`\n G豆总数: ${result.data.gDou}`); 135 | msg += `\n G豆总数: ${result.data.gDou}`; 136 | } 137 | } 138 | 139 | 140 | 141 | 142 | 143 | 144 | // ************************************************************* 封装函数 ************************************************************* 145 | 146 | 147 | 148 | 149 | 150 | 151 | // #region ************************************************************* 固定代码 ************************************************************* 152 | /** 153 | * 变量检查 154 | */ 155 | async function getCks(ck, str) { 156 | return new Promise((resolve) => { 157 | let ckArr = [] 158 | if (ck) { 159 | if (ck.indexOf("@") !== -1) { 160 | 161 | ck.split("@").forEach((item) => { 162 | ckArr.push(item); 163 | }); 164 | } else if (ck.indexOf("\n") !== -1) { 165 | 166 | ck.split("\n").forEach((item) => { 167 | ckArr.push(item); 168 | }); 169 | } else { 170 | ckArr.push(ck); 171 | } 172 | resolve(ckArr) 173 | } else { 174 | console.log(` :未填写变量 ${str}`) 175 | } 176 | } 177 | ) 178 | } 179 | 180 | 181 | 182 | /** 183 | * 发送消息 184 | */ 185 | async function SendMsg(message) { 186 | if (!message) return; 187 | 188 | if (Notify > 0) { 189 | if ($.isNode()) { 190 | var notify = require("./sendNotify"); 191 | await notify.sendNotify($.name, message); 192 | } else { 193 | $.msg(message); 194 | } 195 | } else { 196 | console.log(message); 197 | } 198 | } 199 | 200 | /** 201 | * 随机数生成 202 | */ 203 | 204 | function randomString(e) { 205 | e = e || 32; 206 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", 207 | a = t.length, 208 | n = ""; 209 | 210 | for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); 211 | return n; 212 | } 213 | 214 | /** 215 | * 随机整数生成 216 | */ 217 | 218 | function randomInt(min, max) { 219 | return Math.round(Math.random() * (max - min) + min); 220 | } 221 | 222 | 223 | /** 224 | * 时间戳 13位 225 | */ 226 | function ts13() { 227 | return Math.round(new Date().getTime()).toString(); 228 | } 229 | 230 | /** 231 | * 时间戳 10位 232 | */ 233 | function ts10() { 234 | return Math.round(new Date().getTime() / 1000).toString(); 235 | } 236 | 237 | /** 238 | * 获取当前小时数 239 | */ 240 | function local_hours() { 241 | let myDate = new Date(); 242 | h = myDate.getHours(); 243 | return h; 244 | } 245 | 246 | /** 247 | * 获取当前分钟数 248 | */ 249 | function local_minutes() { 250 | let myDate = new Date(); 251 | m = myDate.getMinutes(); 252 | return m; 253 | } 254 | 255 | 256 | /** 257 | * 等待 X 秒 258 | */ 259 | function wait(n) { 260 | return new Promise(function (resolve) { 261 | setTimeout(resolve, n * 1000); 262 | }); 263 | } 264 | 265 | 266 | 267 | /** 268 | * get请求 269 | */ 270 | async function httpGet(getUrlObject, tip, timeout = 3) { 271 | return new Promise((resolve) => { 272 | let url = getUrlObject; 273 | if (!tip) { 274 | let tmp = arguments.callee.toString(); 275 | let re = /function\s*(\w*)/i; 276 | let matches = re.exec(tmp); 277 | tip = matches[1]; 278 | } 279 | if (debug) { 280 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 281 | console.log(url); 282 | } 283 | 284 | $.get( 285 | url, 286 | async (err, resp, data) => { 287 | try { 288 | if (debug) { 289 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 290 | console.log(data); 291 | console.log(`======`); 292 | console.log(JSON.parse(data)); 293 | } 294 | let result = JSON.parse(data); 295 | if (result == undefined) { 296 | return; 297 | } else { 298 | resolve(result); 299 | } 300 | 301 | } catch (e) { 302 | console.log(err, resp); 303 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 304 | msg += `\n ${tip} 失败了!请稍后尝试!!` 305 | } finally { 306 | resolve(); 307 | } 308 | }, 309 | timeout 310 | ); 311 | }); 312 | } 313 | 314 | /** 315 | * post请求 316 | */ 317 | async function httpPost(postUrlObject, tip, timeout = 3) { 318 | return new Promise((resolve) => { 319 | let url = postUrlObject; 320 | if (!tip) { 321 | let tmp = arguments.callee.toString(); 322 | let re = /function\s*(\w*)/i; 323 | let matches = re.exec(tmp); 324 | tip = matches[1]; 325 | } 326 | if (debug) { 327 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 328 | console.log(url); 329 | } 330 | 331 | $.post( 332 | url, 333 | async (err, resp, data) => { 334 | try { 335 | if (debug) { 336 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 337 | console.log(data); 338 | console.log(`======`); 339 | console.log(JSON.parse(data)); 340 | } 341 | let result = JSON.parse(data); 342 | if (result == undefined) { 343 | return; 344 | } else { 345 | resolve(result); 346 | } 347 | 348 | } catch (e) { 349 | console.log(err, resp); 350 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 351 | msg += `\n ${tip} 失败了!请稍后尝试!!` 352 | } finally { 353 | resolve(); 354 | } 355 | }, 356 | timeout 357 | ); 358 | }); 359 | } 360 | 361 | /** 362 | * 网络请求 (get, post等) 363 | */ 364 | async function httpRequest(postOptionsObject, tip, timeout = 3) { 365 | return new Promise((resolve) => { 366 | 367 | let options = postOptionsObject; 368 | let request = require('request'); 369 | if (!tip) { 370 | let tmp = arguments.callee.toString(); 371 | let re = /function\s*(\w*)/i; 372 | let matches = re.exec(tmp); 373 | tip = matches[1]; 374 | } 375 | if (debug) { 376 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); 377 | console.log(options); 378 | } 379 | 380 | request(options, async (err, resp, data) => { 381 | try { 382 | if (debug) { 383 | console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); 384 | console.log(data); 385 | console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); 386 | console.log(JSON.parse(data)); 387 | } 388 | let result = JSON.parse(data); 389 | if (!result) return; 390 | resolve(result); 391 | } catch (e) { 392 | console.log(err, resp); 393 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 394 | msg += `\n ${tip} 失败了!请稍后尝试!!` 395 | } finally { 396 | resolve(); 397 | } 398 | }), timeout 399 | 400 | }); 401 | } 402 | 403 | 404 | /** 405 | * debug调试 406 | */ 407 | function debugLog(...args) { 408 | if (debug) { 409 | console.log(...args); 410 | } 411 | } 412 | 413 | // /** 414 | // * 单名字 Env 415 | // */ 416 | // function Env() { 417 | // return new class { 418 | // isNode() { 419 | // return "undefined" != typeof module && !!module.exports 420 | // } 421 | // }() 422 | // } 423 | 424 | 425 | 426 | // 完整 Env 427 | 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) } 428 | 429 | //#endregion -------------------------------------------------------------------------------- /ql/wmrsapp.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | * ========= 青龙--配置文件 作者HHX========= 4 | * 完美人生app 抓包https://member.cignacmb.com下的Authorization值得,填入变量wmrs_ck中,多账号@或换行 5 | 6 | */ 7 | 8 | const $ = new Env("🔱完美人生🔱"); 9 | const notify = $.isNode() ? require("./sendNotify") : ""; 10 | const Notify = 1 //0为关闭通知,1为打开通知,默认为1 11 | const debug = 0 //0为关闭调试,1为打开调试,默认为0 12 | 13 | /////////////////////////////////////////////////////////////////// 14 | let ckStr = process.env.wmrs_ck; 15 | const {log} = console; 16 | let msg = ""; 17 | let ck = ""; 18 | ; 19 | 20 | 21 | async function tips(ckArr) { 22 | 23 | console.log(`\n=============== 共找到 ${ckArr.length} 个账号 ===============`); 24 | msg += `\n =============== 共找到 ${ckArr.length} 个账号 ===============` 25 | debugLog(`【debug】 这是你的账号数组: \n ${ckArr} `); 26 | } 27 | 28 | !(async () => { 29 | let ckArr = await getCks(ckStr, "wmrs_ck"); 30 | 31 | await poem(); 32 | await tips(ckArr); 33 | for (let index = 0; index < ckArr.length; index++) { 34 | ks_num = index + 1; 35 | console.log(`\n------------- 开始【第 ${ks_num} 个账号】------------- `); 36 | msg += `\n------------- 开始【第 ${ks_num} 个账号】------------- ` 37 | ck = ckArr[index].split("&"); 38 | debugLog(`【debug】 这是你第 ${ks_num} 账号信息: ${ck} `); 39 | await start(); 40 | } 41 | await SendMsg(msg); 42 | })() 43 | .catch((e) => $.logErr(e)) 44 | .finally(() => $.done()); 45 | 46 | async function start() { 47 | 48 | 49 | console.log("\n =======用户信息======="); 50 | await yonghu(); 51 | await $.wait(1000) 52 | 53 | console.log("\n =========签到========="); 54 | await sign(); 55 | await $.wait(1000) 56 | 57 | 58 | console.log("\n =======打卡======="); 59 | await daka(); 60 | await $.wait(1000) 61 | 62 | console.log("\n =======诺米信息======="); 63 | await nuomi(); 64 | await $.wait(1000) 65 | 66 | console.log(`\n 🍁任务完成🍁`); 67 | msg += `\n 🍁任务完成🍁`; 68 | 69 | } 70 | 71 | 72 | ////////////////////////////////////////////////////////封装函数 73 | 74 | //用户信息 获取不到昵称,只能获取手机号分辨了 75 | async function yonghu() { 76 | let options = { 77 | method: 'POST', 78 | url: `https://member.cignacmb.com/shop/member/interface/queryUserMobile`, 79 | headers: { 80 | 'X-Requested-With' : `XMLHttpRequest`, 81 | 'Connection' : `keep-alive`, 82 | 'Accept-Encoding' : `gzip, deflate, br`, 83 | 'Content-Type' : `application/x-www-form-urlencoded`, 84 | 'Authorization' : `${ck[0]}`, 85 | 'Host' : `member.cignacmb.com`, 86 | 'Accept' : `application/json, text/plain, */*` 87 | }, 88 | body: `param=e30%3D` 89 | }; 90 | let result = await httpRequest(options, `签到情况`); 91 | 92 | if (result.respCode == 00) { 93 | console.log(`\n 用户信息📞: ${result.respData.mobileCode}`); 94 | msg += `\n 用户信息📞: ${result.respData.mobileCode}`; 95 | } 96 | } 97 | 98 | 99 | 100 | 101 | 102 | //签到 103 | async function sign() { 104 | let options = { 105 | method: 'POST', 106 | url: `https://member.cignacmb.com/shop/member/interface/submitSign`, 107 | headers: { 108 | 'X-Requested-With' : `XMLHttpRequest`, 109 | 'Connection' : `keep-alive`, 110 | 'Accept-Encoding' : `gzip, deflate, br`, 111 | 'Content-Type' : `application/x-www-form-urlencoded`, 112 | 'Authorization' : `${ck[0]}`, 113 | 'Host' : `member.cignacmb.com`, 114 | 'Accept' : `application/json, text/plain, */*` 115 | }, 116 | body: `param=eyJhY3Rpb24iOiJNQiJ9` 117 | }; 118 | let result = await httpRequest(options, `签到情况`); 119 | 120 | if (result.respCode == 00) { 121 | console.log(`\n 签到结果📕: ${result.respDesc}`); 122 | msg += `\n 签到结果📕: ${result.respDesc}`; 123 | } else if (result.respCode == 03) { 124 | console.log(`\n 签到结果📕: ${result.respDesc}`); 125 | msg += `\n 签到结果📕: ${result.respDesc}`; 126 | } 127 | } 128 | 129 | //打卡 130 | async function daka() { 131 | let options = { 132 | method: 'GET', 133 | url: `https://hms.cignacmb.com/activity/checkin/dailyCheckin?operateType=0`, 134 | headers: { 135 | 'Accept' : `application/json, text/plain, */*`, 136 | 'Accept-Encoding' : `gzip, deflate, br`, 137 | 'Connection' : `keep-alive`, 138 | 'Content-Type' : `application/x-www-form-urlencoded;charset=utf-8`, 139 | 'Host' : `hms.cignacmb.com`, 140 | 'Authorization' : `${ck[0]}`, 141 | }, 142 | body: `` 143 | }; 144 | let result = await httpRequest(options, `分享第次`); 145 | 146 | if (result.statusCode == 0) { 147 | console.log(`\n 打卡结果📙: ${result.msg}`); 148 | msg += `\n 打卡结果📙: ${result.msg}`; 149 | } else if (result.statusCode == 1) { 150 | console.log(`\n 打卡结果📙: ${result.msg}`); 151 | msg += `\n 打卡结果📙: ${result.msg}`; 152 | } 153 | } 154 | 155 | //当前诺米信息 156 | async function nuomi() { 157 | let options = { 158 | method: 'POST', 159 | url: `https://member.cignacmb.com/shop/member/interface/initPageData`, 160 | headers: { 161 | 'X-Requested-With' : `XMLHttpRequest`, 162 | 'Connection' : `keep-alive`, 163 | 'Accept-Encoding' : `gzip, deflate, br`, 164 | 'Content-Type' : `application/x-www-form-urlencoded`, 165 | 'Authorization' : `${ck[0]}`, 166 | 'Host' : `member.cignacmb.com`, 167 | 'Accept' : `application/json, text/plain, */*` 168 | }, 169 | body: `param=eyJhY3Rpb24iOiJNQiIsImFkdmVydFR5cGUiOiJBMDE3In0%3D` 170 | }; 171 | let result = await httpRequest(options, `签到情况`); 172 | 173 | if (result.respCode == 00) { 174 | console.log(`\n 当前诺米🍙: ${result.respData.totalScore}`); 175 | msg += `\n 当前诺米🍙: ${result.respData.totalScore}`; 176 | } 177 | } 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | // #region ************************************************************* 固定代码 ************************************************************* 187 | /** 188 | * 变量检查 189 | */ 190 | async function getCks(ck, str) { 191 | return new Promise((resolve) => { 192 | let ckArr = [] 193 | if (ck) { 194 | if (ck.indexOf("@") !== -1) { 195 | 196 | ck.split("@").forEach((item) => { 197 | ckArr.push(item); 198 | }); 199 | } else if (ck.indexOf("\n") !== -1) { 200 | 201 | ck.split("\n").forEach((item) => { 202 | ckArr.push(item); 203 | }); 204 | } else { 205 | ckArr.push(ck); 206 | } 207 | resolve(ckArr) 208 | } else { 209 | console.log(` :未填写变量 ${str}`) 210 | } 211 | } 212 | ) 213 | } 214 | 215 | /** 216 | * 获取随机诗词 217 | */ 218 | function poem(timeout = 3 * 1000) { 219 | return new Promise((resolve) => { 220 | let url = { 221 | url: `https://v1.jinrishici.com/all.json` 222 | } 223 | $.get(url, async (err, resp, data) => { 224 | try { 225 | data = JSON.parse(data) 226 | log(`${data.content} \n————《${data.origin}》${data.author}`); 227 | add_comment_text = data.content //获取随机古诗词,并定义为变量add_comment_text 228 | } catch (e) { 229 | log(e, resp); 230 | } finally { 231 | resolve() 232 | } 233 | }, timeout) 234 | }) 235 | } 236 | 237 | /** 238 | * 发送消息 239 | */ 240 | async function SendMsg(message) { 241 | if (!message) return; 242 | 243 | if (Notify > 0) { 244 | if ($.isNode()) { 245 | var notify = require("./sendNotify"); 246 | await notify.sendNotify($.name, message); 247 | } else { 248 | $.msg(message); 249 | } 250 | } else { 251 | console.log(message); 252 | } 253 | } 254 | 255 | /** 256 | * 随机数生成 257 | */ 258 | 259 | function randomString(e) { 260 | e = e || 32; 261 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", 262 | a = t.length, 263 | n = ""; 264 | 265 | for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); 266 | return n; 267 | } 268 | 269 | /** 270 | * 随机整数生成 271 | */ 272 | 273 | function randomInt(min, max) { 274 | return Math.round(Math.random() * (max - min) + min); 275 | } 276 | 277 | 278 | /** 279 | * 时间戳 13位 280 | */ 281 | function ts13() { 282 | return Math.round(new Date().getTime()).toString(); 283 | } 284 | 285 | /** 286 | * 时间戳 10位 287 | */ 288 | function ts10() { 289 | return Math.round(new Date().getTime() / 1000).toString(); 290 | } 291 | 292 | /** 293 | * 获取当前小时数 294 | */ 295 | function local_hours() { 296 | let myDate = new Date(); 297 | h = myDate.getHours(); 298 | return h; 299 | } 300 | 301 | /** 302 | * 获取当前分钟数 303 | */ 304 | function local_minutes() { 305 | let myDate = new Date(); 306 | m = myDate.getMinutes(); 307 | return m; 308 | } 309 | 310 | 311 | /** 312 | * 等待 X 秒 313 | */ 314 | function wait(n) { 315 | return new Promise(function (resolve) { 316 | setTimeout(resolve, n * 1000); 317 | }); 318 | } 319 | 320 | 321 | 322 | /** 323 | * get请求 324 | */ 325 | async function httpGet(getUrlObject, tip, timeout = 3) { 326 | return new Promise((resolve) => { 327 | let url = getUrlObject; 328 | if (!tip) { 329 | let tmp = arguments.callee.toString(); 330 | let re = /function\s*(\w*)/i; 331 | let matches = re.exec(tmp); 332 | tip = matches[1]; 333 | } 334 | if (debug) { 335 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 336 | console.log(url); 337 | } 338 | 339 | $.get( 340 | url, 341 | async (err, resp, data) => { 342 | try { 343 | if (debug) { 344 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 345 | console.log(data); 346 | console.log(`======`); 347 | console.log(JSON.parse(data)); 348 | } 349 | let result = JSON.parse(data); 350 | if (result == undefined) { 351 | return; 352 | } else { 353 | resolve(result); 354 | } 355 | 356 | } catch (e) { 357 | console.log(err, resp); 358 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 359 | msg += `\n ${tip} 失败了!请稍后尝试!!` 360 | } finally { 361 | resolve(); 362 | } 363 | }, 364 | timeout 365 | ); 366 | }); 367 | } 368 | 369 | /** 370 | * post请求 371 | */ 372 | async function httpPost(postUrlObject, tip, timeout = 3) { 373 | return new Promise((resolve) => { 374 | let url = postUrlObject; 375 | if (!tip) { 376 | let tmp = arguments.callee.toString(); 377 | let re = /function\s*(\w*)/i; 378 | let matches = re.exec(tmp); 379 | tip = matches[1]; 380 | } 381 | if (debug) { 382 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 383 | console.log(url); 384 | } 385 | 386 | $.post( 387 | url, 388 | async (err, resp, data) => { 389 | try { 390 | if (debug) { 391 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 392 | console.log(data); 393 | console.log(`======`); 394 | console.log(JSON.parse(data)); 395 | } 396 | let result = JSON.parse(data); 397 | if (result == undefined) { 398 | return; 399 | } else { 400 | resolve(result); 401 | } 402 | 403 | } catch (e) { 404 | console.log(err, resp); 405 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 406 | msg += `\n ${tip} 失败了!请稍后尝试!!` 407 | } finally { 408 | resolve(); 409 | } 410 | }, 411 | timeout 412 | ); 413 | }); 414 | } 415 | 416 | /** 417 | * 网络请求 (get, post等) 418 | */ 419 | async function httpRequest(postOptionsObject, tip, timeout = 3) { 420 | return new Promise((resolve) => { 421 | 422 | let options = postOptionsObject; 423 | let request = require('request'); 424 | if (!tip) { 425 | let tmp = arguments.callee.toString(); 426 | let re = /function\s*(\w*)/i; 427 | let matches = re.exec(tmp); 428 | tip = matches[1]; 429 | } 430 | if (debug) { 431 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); 432 | console.log(options); 433 | } 434 | 435 | request(options, async (err, resp, data) => { 436 | try { 437 | if (debug) { 438 | console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); 439 | console.log(data); 440 | console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); 441 | console.log(JSON.parse(data)); 442 | } 443 | let result = JSON.parse(data); 444 | if (!result) return; 445 | resolve(result); 446 | } catch (e) { 447 | console.log(err, resp); 448 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 449 | msg += `\n ${tip} 失败了!请稍后尝试!!` 450 | } finally { 451 | resolve(); 452 | } 453 | }), timeout 454 | 455 | }); 456 | } 457 | 458 | 459 | /** 460 | * debug调试 461 | */ 462 | function debugLog(...args) { 463 | if (debug) { 464 | console.log(...args); 465 | } 466 | } 467 | 468 | // /** 469 | // * 单名字 Env 470 | // */ 471 | // function Env() { 472 | // return new class { 473 | // isNode() { 474 | // return "undefined" != typeof module && !!module.exports 475 | // } 476 | // }() 477 | // } 478 | 479 | 480 | 481 | // 完整 Env 482 | 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) } 483 | 484 | //#endregion 485 | -------------------------------------------------------------------------------- /ql/ktxcx.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 请勿烂分享脚本 3 | * 可推小程序 wx小程序 4 | *10.15 无需刷步,领取步数红包 5 | * 获取ck: 打开小程序中间步数即可------ 6 | * 重写:https://api.ketui.cn/video-helper/tep/balance url script-request-header https://raw.githubusercontent.com/levi19831005/js/main/ktxcxck.js 7 | * 主机名:api.ketui.cn 8 | * 感谢各群里位大佬的模板和指导-@hhx 9 | 10 | * ========= 青龙--配置文件 ========= 11 | * 抓域名https://api.ketui.cn/video-helper/tep/balance下请求头下的Authorization填入变量, 12 | * 变量格式: export ktxcx_auth="Authorization@Authorization"多个账号换行 或用 @ 分割 13 | * 14 | */ 15 | 16 | const $ = new Env("可推小程序"); 17 | const notify = $.isNode() ? require("./sendNotify") : ""; 18 | const Notify = 1 //0为关闭通知,1为打开通知,默认为1 19 | const debug = 0 //0为关闭调试,1为打开调试,默认为0 20 | /////////////////////////////////////////////////////////////////// 21 | let ckStr = process.env.ktxcx_auth; 22 | let msg = ""; 23 | let ck = ""; 24 | let host = "api.ketui.cn"; 25 | let hostname = "https://" + host; 26 | 27 | /** 28 | * 模块不要动------------------------------------------------------------------- 29 | */ 30 | async function tips(ckArr) { 31 | 32 | console.log(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); 33 | msg += `\n =============== 共找到 ${ckArr.length} 个账号 ===============` 34 | debugLog(`【debug】 这是你的账号数组: \n ${ckArr} `); 35 | } 36 | 37 | !(async () => { 38 | let ckArr = await getCks(ckStr, "ktxcx_auth"); 39 | await tips(ckArr); 40 | for (let index = 0; index < ckArr.length; index++) { 41 | qckf_num = index + 1; 42 | console.log(`\n------------- 开始【第 ${qckf_num} 个账号】------------- `); 43 | msg += `\n------------- 开始【第 ${qckf_num} 个账号】------------- ` 44 | ck = ckArr[index].split("&"); 45 | debugLog(`【debug】 这是你第 ${qckf_num} 账号信息: ${ck} `); 46 | await start(); 47 | } 48 | await SendMsg(msg); 49 | })() 50 | .catch((e) => $.logErr(e)) 51 | .finally(() => $.done()); 52 | /** 53 | * 模块不要动------------------------------------------------------------------- 54 | */ 55 | 56 | 57 | 58 | /** 59 | * 整个任务执行的流程------------------------------------------------------------------- 60 | */ 61 | async function start() { 62 | console.log("\n ----------刷新今日步数----------"); 63 | await shuaxin(); 64 | console.log("\n ----------兑换步数红包----------"); 65 | await ymao(); 66 | await emao(); 67 | await wmao(); 68 | 69 | 70 | console.log("\n ----------红包金额----------"); 71 | await zongshu(); 72 | 73 | } 74 | 75 | /** 76 | * 整个任务执行的流程-------------------------------------------------------------------- 77 | */ 78 | 79 | 80 | // ************************************************************* 封装函数 ************************************************************* 81 | /** 82 | * 83 | */ 84 | async function shuaxin() { 85 | let options = { 86 | method: 'GET', 87 | url: `${hostname}/video-helper/tep/todayExchangeStepNum`, 88 | headers: { 89 | 'osType' : `miniapp`, 90 | 'content-type' : `application/json`, 91 | 'Connection' : `keep-alive`, 92 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 93 | 'Host' : host, 94 | 'signature' : ``, 95 | 'appId' : `vh`, 96 | 'Authorization': `${ck[0]}` 97 | }, 98 | body: JSON.stringify({}) 99 | }; 100 | let result = await httpRequest(options, `刷新今日步数`); 101 | 102 | if (result.errCode == 0) { 103 | console.log(`\n 刷新今日步数: ${result.errMsg}`); 104 | msg += `\n 刷新今日步数: ${result.errMsg}`; 105 | } 106 | } 107 | 108 | 109 | async function ymao() { 110 | let options = { 111 | method: 'GET', 112 | url: `${hostname}/video-helper/tep/exchange?taskId=step1000&num=1000`, 113 | headers: { 114 | 'osType' : `miniapp`, 115 | 'content-type' : `application/json`, 116 | 'Connection' : `keep-alive`, 117 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 118 | 'Host' : host, 119 | 'signature' : ``, 120 | 'appId' : `vh`, 121 | 'Authorization': `${ck[0]}` 122 | }, 123 | body: JSON.stringify({}) 124 | }; 125 | let result = await httpRequest(options, `兑换0.1元`); 126 | 127 | if (result.errCode == 0) { 128 | console.log(`\n 兑换0.1元成功`); 129 | msg += `\n 兑换0.1元成功`; 130 | } else if (result.errCode == 9999) { 131 | console.log(`\n 已领取或步数不足`); 132 | msg += `\n 已领取或步数不足`; 133 | } 134 | } 135 | 136 | async function emao() { 137 | let options = { 138 | method: 'GET', 139 | url: `${hostname}/video-helper/tep/exchange?taskId=step5000&num=5000`, 140 | headers: { 141 | 'osType' : `miniapp`, 142 | 'content-type' : `application/json`, 143 | 'Connection' : `keep-alive`, 144 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 145 | 'Host' : host, 146 | 'signature' : ``, 147 | 'appId' : `vh`, 148 | 'Authorization': `${ck[0]}` 149 | }, 150 | body: JSON.stringify({}) 151 | }; 152 | let result = await httpRequest(options, `兑换0.2元`); 153 | 154 | if (result.errCode == 0) { 155 | console.log(`\n 兑换0.2元成功`); 156 | msg += `\n 兑换0.2元成功`; 157 | } else if (result.errCode == 9999) { 158 | console.log(`\n 已领取或步数不足`); 159 | msg += `\n 已领取或步数不足`; 160 | } 161 | } 162 | 163 | async function wmao() { 164 | let options = { 165 | method: 'GET', 166 | url: `${hostname}/video-helper/tep/exchange?taskId=step10000&num=10000`, 167 | headers: { 168 | 'osType' : `miniapp`, 169 | 'content-type' : `application/json`, 170 | 'Connection' : `keep-alive`, 171 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 172 | 'Host' : host, 173 | 'signature' : ``, 174 | 'appId' : `vh`, 175 | 'Authorization': `${ck[0]}` 176 | }, 177 | body: JSON.stringify({}) 178 | }; 179 | let result = await httpRequest(options, `兑换0.5元`); 180 | 181 | if (result.errCode == 0) { 182 | console.log(`\n 兑换0.5元成功`); 183 | msg += `\n 兑换0.5元成功`; 184 | } else if (result.errCode == 9999) { 185 | console.log(`\n 已领取或步数不足`); 186 | msg += `\n 已领取或步数不足`; 187 | } 188 | } 189 | 190 | 191 | 192 | 193 | async function zongshu() { 194 | let options = { 195 | method: 'GET', 196 | url: `${hostname}/video-helper/tep/balance`, 197 | headers: { 198 | 'osType' : `miniapp`, 199 | 'content-type' : `application/json`, 200 | 'Connection' : `keep-alive`, 201 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 202 | 'Host' : host, 203 | 'signature' : ``, 204 | 'appId' : `vh`, 205 | 'Authorization': `${ck[0]}` 206 | }, 207 | body: JSON.stringify({}) 208 | }; 209 | let result = await httpRequest(options, `红包金额`); 210 | 211 | if (result.errCode == 0) { 212 | console.log(`\n 签到情况: ${result.data.balance}`); 213 | msg += `\n 签到情况: ${result.data.balance}`; 214 | } 215 | } 216 | 217 | 218 | 219 | // ************************************************************* 封装函数 ************************************************************* 220 | 221 | 222 | 223 | 224 | 225 | 226 | // #region ************************************************************* 固定代码 ************************************************************* 227 | /** 228 | * 变量检查 229 | */ 230 | async function getCks(ck, str) { 231 | return new Promise((resolve) => { 232 | let ckArr = [] 233 | if (ck) { 234 | if (ck.indexOf("@") !== -1) { 235 | 236 | ck.split("@").forEach((item) => { 237 | ckArr.push(item); 238 | }); 239 | } else if (ck.indexOf("\n") !== -1) { 240 | 241 | ck.split("\n").forEach((item) => { 242 | ckArr.push(item); 243 | }); 244 | } else { 245 | ckArr.push(ck); 246 | } 247 | resolve(ckArr) 248 | } else { 249 | console.log(` :未填写变量 ${str}`) 250 | } 251 | } 252 | ) 253 | } 254 | 255 | 256 | 257 | /** 258 | * 发送消息 259 | */ 260 | async function SendMsg(message) { 261 | if (!message) return; 262 | 263 | if (Notify > 0) { 264 | if ($.isNode()) { 265 | var notify = require("./sendNotify"); 266 | await notify.sendNotify($.name, message); 267 | } else { 268 | $.msg(message); 269 | } 270 | } else { 271 | console.log(message); 272 | } 273 | } 274 | 275 | /** 276 | * 随机数生成 277 | */ 278 | 279 | function randomString(e) { 280 | e = e || 32; 281 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", 282 | a = t.length, 283 | n = ""; 284 | 285 | for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); 286 | return n; 287 | } 288 | 289 | /** 290 | * 随机整数生成 291 | */ 292 | 293 | function randomInt(min, max) { 294 | return Math.round(Math.random() * (max - min) + min); 295 | } 296 | 297 | 298 | /** 299 | * 时间戳 13位 300 | */ 301 | function ts13() { 302 | return Math.round(new Date().getTime()).toString(); 303 | } 304 | 305 | /** 306 | * 时间戳 10位 307 | */ 308 | function ts10() { 309 | return Math.round(new Date().getTime() / 1000).toString(); 310 | } 311 | 312 | /** 313 | * 获取当前小时数 314 | */ 315 | function local_hours() { 316 | let myDate = new Date(); 317 | h = myDate.getHours(); 318 | return h; 319 | } 320 | 321 | /** 322 | * 获取当前分钟数 323 | */ 324 | function local_minutes() { 325 | let myDate = new Date(); 326 | m = myDate.getMinutes(); 327 | return m; 328 | } 329 | 330 | 331 | /** 332 | * 等待 X 秒 333 | */ 334 | function wait(n) { 335 | return new Promise(function (resolve) { 336 | setTimeout(resolve, n * 1000); 337 | }); 338 | } 339 | 340 | 341 | 342 | /** 343 | * get请求 344 | */ 345 | async function httpGet(getUrlObject, tip, timeout = 3) { 346 | return new Promise((resolve) => { 347 | let url = getUrlObject; 348 | if (!tip) { 349 | let tmp = arguments.callee.toString(); 350 | let re = /function\s*(\w*)/i; 351 | let matches = re.exec(tmp); 352 | tip = matches[1]; 353 | } 354 | if (debug) { 355 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 356 | console.log(url); 357 | } 358 | 359 | $.get( 360 | url, 361 | async (err, resp, data) => { 362 | try { 363 | if (debug) { 364 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 365 | console.log(data); 366 | console.log(`======`); 367 | console.log(JSON.parse(data)); 368 | } 369 | let result = JSON.parse(data); 370 | if (result == undefined) { 371 | return; 372 | } else { 373 | resolve(result); 374 | } 375 | 376 | } catch (e) { 377 | console.log(err, resp); 378 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 379 | msg += `\n ${tip} 失败了!请稍后尝试!!` 380 | } finally { 381 | resolve(); 382 | } 383 | }, 384 | timeout 385 | ); 386 | }); 387 | } 388 | 389 | /** 390 | * post请求 391 | */ 392 | async function httpPost(postUrlObject, tip, timeout = 3) { 393 | return new Promise((resolve) => { 394 | let url = postUrlObject; 395 | if (!tip) { 396 | let tmp = arguments.callee.toString(); 397 | let re = /function\s*(\w*)/i; 398 | let matches = re.exec(tmp); 399 | tip = matches[1]; 400 | } 401 | if (debug) { 402 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 403 | console.log(url); 404 | } 405 | 406 | $.post( 407 | url, 408 | async (err, resp, data) => { 409 | try { 410 | if (debug) { 411 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 412 | console.log(data); 413 | console.log(`======`); 414 | console.log(JSON.parse(data)); 415 | } 416 | let result = JSON.parse(data); 417 | if (result == undefined) { 418 | return; 419 | } else { 420 | resolve(result); 421 | } 422 | 423 | } catch (e) { 424 | console.log(err, resp); 425 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 426 | msg += `\n ${tip} 失败了!请稍后尝试!!` 427 | } finally { 428 | resolve(); 429 | } 430 | }, 431 | timeout 432 | ); 433 | }); 434 | } 435 | 436 | /** 437 | * 网络请求 (get, post等) 438 | */ 439 | async function httpRequest(postOptionsObject, tip, timeout = 3) { 440 | return new Promise((resolve) => { 441 | 442 | let options = postOptionsObject; 443 | let request = require('request'); 444 | if (!tip) { 445 | let tmp = arguments.callee.toString(); 446 | let re = /function\s*(\w*)/i; 447 | let matches = re.exec(tmp); 448 | tip = matches[1]; 449 | } 450 | if (debug) { 451 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); 452 | console.log(options); 453 | } 454 | 455 | request(options, async (err, resp, data) => { 456 | try { 457 | if (debug) { 458 | console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); 459 | console.log(data); 460 | console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); 461 | console.log(JSON.parse(data)); 462 | } 463 | let result = JSON.parse(data); 464 | if (!result) return; 465 | resolve(result); 466 | } catch (e) { 467 | console.log(err, resp); 468 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 469 | msg += `\n ${tip} 失败了!请稍后尝试!!` 470 | } finally { 471 | resolve(); 472 | } 473 | }), timeout 474 | 475 | }); 476 | } 477 | 478 | 479 | /** 480 | * debug调试 481 | */ 482 | function debugLog(...args) { 483 | if (debug) { 484 | console.log(...args); 485 | } 486 | } 487 | 488 | // /** 489 | // * 单名字 Env 490 | // */ 491 | // function Env() { 492 | // return new class { 493 | // isNode() { 494 | // return "undefined" != typeof module && !!module.exports 495 | // } 496 | // }() 497 | // } 498 | 499 | 500 | 501 | // 完整 Env 502 | 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) } 503 | 504 | //#endregion -------------------------------------------------------------------------------- /ql/ttl.js: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | * ========= 青龙--配置文件 作者HHX========= 4 | * 太太乐领鲜社 只支持青龙 5 | * 获取ck: 打开软件即可------export ttltoken='apitoken',多账号换行或@分开 ck十几分钟失效 6 | * 重写:https://tcapi.totole.com.cn/api/v1/consumer url script-request-header https://raw.githubusercontent.com/levi19831005/js/main/ttlck.js 7 | * 主机名:tcapi.totole.com.cn 8 | */ 9 | 10 | const $ = new Env("🔱太太乐领鲜社🔱"); 11 | const notify = $.isNode() ? require("./sendNotify") : ""; 12 | const Notify = 1 //0为关闭通知,1为打开通知,默认为1 13 | const debug = 0 //0为关闭调试,1为打开调试,默认为0 14 | 15 | /////////////////////////////////////////////////////////////////// 16 | let ckStr = process.env.ttltoken; 17 | const {log} = console; 18 | let msg = ""; 19 | let ck = ""; 20 | let host = "tcapi.totole.com.cn"; 21 | let hostname = "https://" + host; 22 | 23 | 24 | 25 | async function tips(ckArr) { 26 | 27 | console.log(`\n=============== 共找到 ${ckArr.length} 个账号 ===============`); 28 | msg += `\n =============== 共找到 ${ckArr.length} 个账号 ===============` 29 | debugLog(`【debug】 这是你的账号数组: \n ${ckArr} `); 30 | } 31 | 32 | !(async () => { 33 | let ckArr = await getCks(ckStr, "ttltoken"); 34 | 35 | await poem(); 36 | await tips(ckArr); 37 | for (let index = 0; index < ckArr.length; index++) { 38 | ks_num = index + 1; 39 | console.log(`\n------------- 开始【第 ${ks_num} 个账号】------------- `); 40 | msg += `\n------------- 开始【第 ${ks_num} 个账号】------------- ` 41 | ck = ckArr[index].split("&"); 42 | debugLog(`【debug】 这是你第 ${ks_num} 账号信息: ${ck} `); 43 | await start(); 44 | } 45 | await SendMsg(msg); 46 | })() 47 | .catch((e) => $.logErr(e)) 48 | .finally(() => $.done()); 49 | 50 | async function start() { 51 | 52 | 53 | console.log("\n =======用户信息======="); 54 | await yonghu(); 55 | await $.wait(1000) 56 | 57 | 58 | 59 | console.log("\n =========签到========="); 60 | await sign(); 61 | await $.wait(1000) 62 | 63 | 64 | 65 | 66 | console.log("\n =======浏览======="); 67 | await liulan(); 68 | await $.wait(1000) 69 | 70 | 71 | 72 | console.log(`\n 🍁任务完成🍁`); 73 | msg += `\n 🍁任务完成🍁`; 74 | 75 | } 76 | 77 | 78 | //封装函数 79 | 80 | //签到 81 | async function sign() { 82 | let options = { 83 | method: 'POST', 84 | url: `${hostname}/api/v1/sign`, 85 | headers: { 86 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 87 | 'content-type' : `application/x-www-form-urlencoded`, 88 | 'Connection' : `keep-alive`, 89 | 'actcode' : ``, 90 | 'Referer' : `https://servicewechat.com/wx247be1bfb0f133e9/27/page-frame.html`, 91 | 'Host' : `tcapi.totole.com.cn`, 92 | 'User-Agent' : `Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.16(0x18001042) NetType/WIFI Language/zh_CN`, 93 | 'apitoken' : `${ck[0]}` 94 | }, 95 | body: `type=0` 96 | }; 97 | let result = await httpRequest(options, `签到情况`); 98 | 99 | if (result.code == 200) { 100 | console.log(`\n 签到结果📝: ${result.msg}`); 101 | msg += `\n 签到结果📝: ${result.msg}`; 102 | } else if (result.code == 500) { 103 | console.log(`\n 签到结果📝: ${result.msg}`); 104 | msg += `\n 签到结果📝: ${result.msg}`; 105 | } 106 | } 107 | 108 | 109 | 110 | //用户信息 111 | async function yonghu() { 112 | let options = { 113 | method: 'GET', 114 | url: `${hostname}/api/v1/consumer`, 115 | headers: { 116 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 117 | 'content-type' : `application/x-www-form-urlencoded`, 118 | 'Connection' : `keep-alive`, 119 | 'actcode' : ``, 120 | 'Referer' : `https://servicewechat.com/wx247be1bfb0f133e9/27/page-frame.html`, 121 | 'Host' : `tcapi.totole.com.cn`, 122 | 'User-Agent' : `Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.16(0x18001042) NetType/WIFI Language/zh_CN`, 123 | 'apitoken' : `${ck[0]}` 124 | }, 125 | body: `` 126 | }; 127 | let result = await httpRequest(options, `用户信息`); 128 | 129 | if (result.code == 200) { 130 | console.log(`\n 用户昵称😊: ${result.data.nick_name}`); 131 | msg += `\n 用户昵称😊: ${result.data.nick_name}`; 132 | console.log(`\n 当前积分📕: ${result.data.total_integral}`); 133 | msg += `\n 当前积分📕: ${result.data.total_integral}`; 134 | } 135 | } 136 | 137 | //浏览 138 | async function liulan() { 139 | let options = { 140 | method: 'POST', 141 | url: `${hostname}/api/v1/consumer/task/article`, 142 | headers: { 143 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 144 | 'content-type' : `application/json-patch+json`, 145 | 'Connection' : `keep-alive`, 146 | 'actcode' : ``, 147 | 'Referer' : `https://servicewechat.com/wx247be1bfb0f133e9/27/page-frame.html`, 148 | 'Host' : `tcapi.totole.com.cn`, 149 | 'User-Agent' : `Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.28(0x18001c2e) NetType/WIFI Language/zh_CN`, 150 | 'apitoken' : `${ck[0]}` 151 | }, 152 | body: `{"article_id":"AT202205131405261","id":"8152a856-84be-4964-baea-8e85a0e46667"}` 153 | }; 154 | let result = await httpRequest(options, `签到情况`); 155 | 156 | if (result.code == 200) { 157 | console.log(`\n 浏览结果📝: ${result.msg}`); 158 | msg += `\n 浏览结果📝: ${result.msg}`; 159 | } else if (result.code == 500) { 160 | console.log(`\n 浏览结果📝: ${result.msg}`); 161 | msg += `\n 浏览结果📝: ${result.msg}`; 162 | } 163 | } 164 | 165 | //浏览 166 | async function zhuli() { 167 | let options = { 168 | method: 'POST', 169 | url: `${hostname}/api/v1/consumer/task/article`, 170 | headers: { 171 | 'Accept-Encoding' : `gzip,compress,br,deflate`, 172 | 'content-type' : `application/json-patch+json`, 173 | 'Connection' : `keep-alive`, 174 | 'actcode' : ``, 175 | 'Referer' : `https://servicewechat.com/wx247be1bfb0f133e9/27/page-frame.html`, 176 | 'Host' : `tcapi.totole.com.cn`, 177 | 'User-Agent' : `Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.28(0x18001c2e) NetType/WIFI Language/zh_CN`, 178 | 'apitoken' : `${ck[0]}` 179 | }, 180 | body: `{"share_user_id":"M0053291","id":"fbf55948-e4af-4ecd-aa68-1d53400699aa"}` 181 | }; 182 | let result = await httpRequest(options, `签到情况`); 183 | 184 | if (result.code == 200) { 185 | console.log(`\n 助力结果📝: ${result.msg}`); 186 | msg += `\n 助力结果📝: ${result.msg}`; 187 | } else if (result.code == 500) { 188 | console.log(`\n 助力结果📝: ${result.msg}`); 189 | msg += `\n 助力结果📝: ${result.msg}`; 190 | } 191 | } 192 | 193 | 194 | 195 | 196 | // #region ************************************************************* 固定代码 ************************************************************* 197 | /** 198 | * 变量检查 199 | */ 200 | async function getCks(ck, str) { 201 | return new Promise((resolve) => { 202 | let ckArr = [] 203 | if (ck) { 204 | if (ck.indexOf("@") !== -1) { 205 | 206 | ck.split("@").forEach((item) => { 207 | ckArr.push(item); 208 | }); 209 | } else if (ck.indexOf("\n") !== -1) { 210 | 211 | ck.split("\n").forEach((item) => { 212 | ckArr.push(item); 213 | }); 214 | } else { 215 | ckArr.push(ck); 216 | } 217 | resolve(ckArr) 218 | } else { 219 | console.log(` :未填写变量 ${str}`) 220 | } 221 | } 222 | ) 223 | } 224 | 225 | /** 226 | * 获取随机诗词 227 | */ 228 | function poem(timeout = 3 * 1000) { 229 | return new Promise((resolve) => { 230 | let url = { 231 | url: `https://v1.jinrishici.com/all.json` 232 | } 233 | $.get(url, async (err, resp, data) => { 234 | try { 235 | data = JSON.parse(data) 236 | log(`${data.content} \n————《${data.origin}》${data.author}`); 237 | add_comment_text = data.content //获取随机古诗词,并定义为变量add_comment_text 238 | } catch (e) { 239 | log(e, resp); 240 | } finally { 241 | resolve() 242 | } 243 | }, timeout) 244 | }) 245 | } 246 | 247 | /** 248 | * 发送消息 249 | */ 250 | async function SendMsg(message) { 251 | if (!message) return; 252 | 253 | if (Notify > 0) { 254 | if ($.isNode()) { 255 | var notify = require("./sendNotify"); 256 | await notify.sendNotify($.name, message); 257 | } else { 258 | $.msg(message); 259 | } 260 | } else { 261 | console.log(message); 262 | } 263 | } 264 | 265 | /** 266 | * 随机数生成 267 | */ 268 | 269 | function randomString(e) { 270 | e = e || 32; 271 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", 272 | a = t.length, 273 | n = ""; 274 | 275 | for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); 276 | return n; 277 | } 278 | 279 | /** 280 | * 随机整数生成 281 | */ 282 | 283 | function randomInt(min, max) { 284 | return Math.round(Math.random() * (max - min) + min); 285 | } 286 | 287 | 288 | /** 289 | * 时间戳 13位 290 | */ 291 | function ts13() { 292 | return Math.round(new Date().getTime()).toString(); 293 | } 294 | 295 | /** 296 | * 时间戳 10位 297 | */ 298 | function ts10() { 299 | return Math.round(new Date().getTime() / 1000).toString(); 300 | } 301 | 302 | /** 303 | * 获取当前小时数 304 | */ 305 | function local_hours() { 306 | let myDate = new Date(); 307 | h = myDate.getHours(); 308 | return h; 309 | } 310 | 311 | /** 312 | * 获取当前分钟数 313 | */ 314 | function local_minutes() { 315 | let myDate = new Date(); 316 | m = myDate.getMinutes(); 317 | return m; 318 | } 319 | 320 | 321 | /** 322 | * 等待 X 秒 323 | */ 324 | function wait(n) { 325 | return new Promise(function (resolve) { 326 | setTimeout(resolve, n * 1000); 327 | }); 328 | } 329 | 330 | 331 | 332 | /** 333 | * get请求 334 | */ 335 | async function httpGet(getUrlObject, tip, timeout = 3) { 336 | return new Promise((resolve) => { 337 | let url = getUrlObject; 338 | if (!tip) { 339 | let tmp = arguments.callee.toString(); 340 | let re = /function\s*(\w*)/i; 341 | let matches = re.exec(tmp); 342 | tip = matches[1]; 343 | } 344 | if (debug) { 345 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 346 | console.log(url); 347 | } 348 | 349 | $.get( 350 | url, 351 | async (err, resp, data) => { 352 | try { 353 | if (debug) { 354 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 355 | console.log(data); 356 | console.log(`======`); 357 | console.log(JSON.parse(data)); 358 | } 359 | let result = JSON.parse(data); 360 | if (result == undefined) { 361 | return; 362 | } else { 363 | resolve(result); 364 | } 365 | 366 | } catch (e) { 367 | console.log(err, resp); 368 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 369 | msg += `\n ${tip} 失败了!请稍后尝试!!` 370 | } finally { 371 | resolve(); 372 | } 373 | }, 374 | timeout 375 | ); 376 | }); 377 | } 378 | 379 | /** 380 | * post请求 381 | */ 382 | async function httpPost(postUrlObject, tip, timeout = 3) { 383 | return new Promise((resolve) => { 384 | let url = postUrlObject; 385 | if (!tip) { 386 | let tmp = arguments.callee.toString(); 387 | let re = /function\s*(\w*)/i; 388 | let matches = re.exec(tmp); 389 | tip = matches[1]; 390 | } 391 | if (debug) { 392 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 393 | console.log(url); 394 | } 395 | 396 | $.post( 397 | url, 398 | async (err, resp, data) => { 399 | try { 400 | if (debug) { 401 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 402 | console.log(data); 403 | console.log(`======`); 404 | console.log(JSON.parse(data)); 405 | } 406 | let result = JSON.parse(data); 407 | if (result == undefined) { 408 | return; 409 | } else { 410 | resolve(result); 411 | } 412 | 413 | } catch (e) { 414 | console.log(err, resp); 415 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 416 | msg += `\n ${tip} 失败了!请稍后尝试!!` 417 | } finally { 418 | resolve(); 419 | } 420 | }, 421 | timeout 422 | ); 423 | }); 424 | } 425 | 426 | /** 427 | * 网络请求 (get, post等) 428 | */ 429 | async function httpRequest(postOptionsObject, tip, timeout = 3) { 430 | return new Promise((resolve) => { 431 | 432 | let options = postOptionsObject; 433 | let request = require('request'); 434 | if (!tip) { 435 | let tmp = arguments.callee.toString(); 436 | let re = /function\s*(\w*)/i; 437 | let matches = re.exec(tmp); 438 | tip = matches[1]; 439 | } 440 | if (debug) { 441 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 信息 ===============`); 442 | console.log(options); 443 | } 444 | 445 | request(options, async (err, resp, data) => { 446 | try { 447 | if (debug) { 448 | console.log(`\n\n 【debug】===============这是 ${tip} 返回数据==============`); 449 | console.log(data); 450 | console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); 451 | console.log(JSON.parse(data)); 452 | } 453 | let result = JSON.parse(data); 454 | if (!result) return; 455 | resolve(result); 456 | } catch (e) { 457 | console.log(err, resp); 458 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 459 | msg += `\n ${tip} 失败了!请稍后尝试!!` 460 | } finally { 461 | resolve(); 462 | } 463 | }), timeout 464 | 465 | }); 466 | } 467 | 468 | 469 | /** 470 | * debug调试 471 | */ 472 | function debugLog(...args) { 473 | if (debug) { 474 | console.log(...args); 475 | } 476 | } 477 | 478 | // /** 479 | // * 单名字 Env 480 | // */ 481 | // function Env() { 482 | // return new class { 483 | // isNode() { 484 | // return "undefined" != typeof module && !!module.exports 485 | // } 486 | // }() 487 | // } 488 | 489 | 490 | 491 | // 完整 Env 492 | 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) } 493 | 494 | //#endregion 495 | 496 | -------------------------------------------------------------------------------- /levi19831005.boxjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "levi19831005.app.sub", 3 | "name": "hhx自用 脚本订阅", 4 | "author": "levi", 5 | "icon": "https://s2.loli.net/2022/09/26/leyBXMwIPs98Ouz.jpg", 6 | "repo": "https://github.com/levi9831005/js", 7 | "apps": [ 8 | { 9 | "id": "shapp", 10 | "name": "上海类app", 11 | "keys": ["shappck"], 12 | "settings": [{ 13 | "id": "shappck", 14 | "name": "CK 列表", 15 | "val": "", 16 | "type": "textarea", 17 | "autoGrow": true, 18 | "rows": 50, 19 | "desc": "shappck" 20 | }], 21 | "author": "@hhx", 22 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/shappck.js", 23 | "icons": ["https://s2.loli.net/2023/05/22/9Hpbfc2ojlFsi3y.jpg","https://s2.loli.net/2023/05/22/9Hpbfc2ojlFsi3y.jpg"], 24 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/shappck.js" 25 | }, 26 | { 27 | "id": "bjxd", 28 | "name": "北京现代", 29 | "keys": ["bjxdck"], 30 | "settings": [{ 31 | "id": "bjxdck", 32 | "name": "CK 列表", 33 | "val": "", 34 | "type": "textarea", 35 | "autoGrow": true, 36 | "rows": 20, 37 | "desc": "bjxdck" 38 | }], 39 | "author": "@hhx", 40 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/bjxdck.js", 41 | "icons": ["https://s2.loli.net/2023/02/08/zPFtgGqNI6BYa3c.jpg","https://s2.loli.net/2023/02/08/zPFtgGqNI6BYa3c.jpg"], 42 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/bjxdck.js" 43 | } , 44 | { 45 | "id": "ymxk", 46 | "name": "悦马星空", 47 | "keys": ["ymxkck"], 48 | "settings": [{ 49 | "id": "ymxkck", 50 | "name": "CK 列表", 51 | "val": "", 52 | "type": "textarea", 53 | "autoGrow": true, 54 | "rows": 20, 55 | "desc": "ymxkck" 56 | }], 57 | "author": "@hhx", 58 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/ymxkck.js", 59 | "icons": ["https://s2.loli.net/2023/05/22/yq5OlL1XxaBHFDf.jpg","https://s2.loli.net/2023/05/22/yq5OlL1XxaBHFDf.jpg"], 60 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/ymxkck.js" 61 | }, 62 | 63 | { 64 | "id": "elm", 65 | "name": "饿了么", 66 | "keys": ["elmallck"], 67 | "settings": [{ 68 | "id": "elmallck", 69 | "name": "CK 列表", 70 | "val": "", 71 | "type": "textarea", 72 | "autoGrow": true, 73 | "rows": 8, 74 | "desc": "elmallck" 75 | }], 76 | "author": "@hhx", 77 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/elmall.js", 78 | "icons": ["https://s2.loli.net/2022/11/24/Glw5uTNJtcXsknU.jpg","https://s2.loli.net/2022/11/24/Glw5uTNJtcXsknU.jpg"], 79 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/elmall.js" 80 | } , 81 | 82 | { 83 | "id": "yili", 84 | "name": "伊利牛奶", 85 | "keys": ["yilick"], 86 | "settings": [{ 87 | "id": "yilick", 88 | "name": "CK 列表", 89 | "val": "", 90 | "type": "textarea", 91 | "autoGrow": true, 92 | "rows": 10, 93 | "desc": "yilick" 94 | }], 95 | "author": "@hhx", 96 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/yilick.js", 97 | "icons": ["https://s2.loli.net/2023/01/20/GKrOS1kgRwznt6o.jpg","https://s2.loli.net/2023/01/20/GKrOS1kgRwznt6o.jpg"], 98 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/yilick.js" 99 | } , 100 | { 101 | "id": "hxek", 102 | "name": "鸿星尔克", 103 | "keys": ["hxekck"], 104 | "settings": [{ 105 | "id": "hxekck", 106 | "name": "CK 列表", 107 | "val": "", 108 | "type": "textarea", 109 | "autoGrow": true, 110 | "rows": 20, 111 | "desc": "hxekck" 112 | }], 113 | "author": "@hhx", 114 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/hxekck.js", 115 | "icons": ["https://s2.loli.net/2023/02/25/Av7pCKQLrkfJxdM.jpg","https://s2.loli.net/2023/02/25/Av7pCKQLrkfJxdM.jpg"], 116 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/hxekck.js" 117 | } , 118 | { 119 | "id": "sgs", 120 | "name": "申工社", 121 | "keys": ["sgsck"], 122 | "settings": [{ 123 | "id": "sgsck", 124 | "name": "CK 列表", 125 | "val": "", 126 | "type": "textarea", 127 | "autoGrow": true, 128 | "rows": 20, 129 | "desc": "sgsck" 130 | }], 131 | "author": "@hhx", 132 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/sgsck.js", 133 | "icons": ["https://s2.loli.net/2023/05/28/7JxPmfsTdkYKXbe.jpg","https://s2.loli.net/2023/05/28/7JxPmfsTdkYKXbe.jpg"], 134 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/sgsck.js" 135 | }, 136 | { 137 | "id": "szw", 138 | "name": " 深圳湾春茧未来荟", 139 | "keys": ["szwck"], 140 | "settings": [{ 141 | "id": "szwck", 142 | "name": "CK 列表", 143 | "val": "", 144 | "type": "textarea", 145 | "autoGrow": true, 146 | "rows": 20, 147 | "desc": "szwck" 148 | }], 149 | "author": "@hhx", 150 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/szwck.js", 151 | "icons": ["https://s2.loli.net/2023/07/05/e9Rw4i5GnrkXsD7.jpg","https://s2.loli.net/2023/07/05/e9Rw4i5GnrkXsD7.jpg"], 152 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/szwck.js" 153 | }, 154 | 155 | { 156 | "id": "fy", 157 | "name": "福域", 158 | "keys": ["fyck"], 159 | "settings": [{ 160 | "id": "fyck", 161 | "name": "CK 列表", 162 | "val": "", 163 | "type": "textarea", 164 | "autoGrow": true, 165 | "rows": 20, 166 | "desc": "fyck" 167 | }], 168 | "author": "@hhx", 169 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/fyck.js", 170 | "icons": ["https://s2.loli.net/2023/08/29/zOf5XhBL8MIE9wx.jpg","https://s2.loli.net/2023/08/29/zOf5XhBL8MIE9wx.jpg"], 171 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/fyck.js" 172 | }, 173 | { 174 | "id": "xx", 175 | "name": "心喜", 176 | "keys": ["xxck"], 177 | "settings": [{ 178 | "id": "xxck", 179 | "name": "CK 列表", 180 | "val": "", 181 | "type": "textarea", 182 | "autoGrow": true, 183 | "rows": 20, 184 | "desc": "xxck" 185 | }], 186 | "author": "@hhx", 187 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/xxck.js", 188 | "icons": ["https://s2.loli.net/2023/09/06/a2pIYoiHXcDCtbs.jpg","https://s2.loli.net/2023/09/06/a2pIYoiHXcDCtbs.jpg"], 189 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/xxck.js" 190 | }, 191 | { 192 | "id": "dls", 193 | "name": "杜蕾斯", 194 | "keys": ["dlsck"], 195 | "settings": [{ 196 | "id": "dlsck", 197 | "name": "CK 列表", 198 | "val": "", 199 | "type": "textarea", 200 | "autoGrow": true, 201 | "rows": 10, 202 | "desc": "dlsck" 203 | }], 204 | "author": "@hhx", 205 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/dlsck.js", 206 | "icons": ["https://s2.loli.net/2023/11/27/NOrXvc9BYteA8EU.jpg","https://s2.loli.net/2023/11/27/NOrXvc9BYteA8EU.jpg"], 207 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/dlsck.js" 208 | }, 209 | { 210 | "id": "hrj", 211 | "name": "好人家美味生活馆", 212 | "keys": ["hrjck"], 213 | "settings": [{ 214 | "id": "hrjck", 215 | "name": "CK 列表", 216 | "val": "", 217 | "type": "textarea", 218 | "autoGrow": true, 219 | "rows": 8, 220 | "desc": "hrjck" 221 | }], 222 | "author": "@hhx", 223 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/hrjck.js", 224 | "icons": ["https://s2.loli.net/2023/12/21/eDBC38KHgVhf4Op.jpg","https://s2.loli.net/2023/12/21/eDBC38KHgVhf4Op.jpg"], 225 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/hrjck.js" 226 | }, 227 | 228 | { 229 | "id": "qqm", 230 | "name": "情趣猫", 231 | "keys": ["qqmck"], 232 | "settings": [{ 233 | "id": "qqmck", 234 | "name": "CK 列表", 235 | "val": "", 236 | "type": "textarea", 237 | "autoGrow": true, 238 | "rows": 8, 239 | "desc": "qqmck" 240 | }], 241 | "author": "@hhx", 242 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/qqmck.js", 243 | "icons": ["https://s2.loli.net/2024/02/28/PlFWvKLVYr9NSG8.jpg","https://s2.loli.net/2024/02/28/PlFWvKLVYr9NSG8.jpg"], 244 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/qqmck.js" 245 | } , 246 | { 247 | "id": "jlzx", 248 | "name": "江铃智行", 249 | "keys": ["jlzxck"], 250 | "settings": [{ 251 | "id": "jlzxck", 252 | "name": "CK 列表", 253 | "val": "", 254 | "type": "textarea", 255 | "autoGrow": true, 256 | "rows": 8, 257 | "desc": "jlzxck" 258 | }], 259 | "author": "@hhx", 260 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/jlzxck.js", 261 | "icons": ["https://s2.loli.net/2024/02/28/eruGqjlSCWYa14f.jpg","https://s2.loli.net/2024/02/28/eruGqjlSCWYa14f.jpg"], 262 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/jlzxck.js" 263 | } , 264 | { 265 | "id": "xyh", 266 | "name": "骁友会", 267 | "keys": ["xyhck"], 268 | "settings": [{ 269 | "id": "xyhck", 270 | "name": "CK 列表", 271 | "val": "", 272 | "type": "textarea", 273 | "autoGrow": true, 274 | "rows": 8, 275 | "desc": "xyhck" 276 | }], 277 | "author": "@hhx", 278 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/xyhck.js", 279 | "icons": ["https://s2.loli.net/2024/03/10/wRXWTBiAKy1ua8h.jpg","https://s2.loli.net/2024/03/10/wRXWTBiAKy1ua8h.jpg"], 280 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/xyhck.js" 281 | } , 282 | { 283 | "id": "bbb", 284 | "name": "八佰伴", 285 | "keys": ["bbbck"], 286 | "settings": [{ 287 | "id": "bbbck", 288 | "name": "CK 列表", 289 | "val": "", 290 | "type": "textarea", 291 | "autoGrow": true, 292 | "rows": 8, 293 | "desc": "bbbck" 294 | }], 295 | "author": "@hhx", 296 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/bbbck.js", 297 | "icons": ["https://s2.loli.net/2024/05/21/2DLlpsbH6F3BZvh.jpg","https://s2.loli.net/2024/05/21/2DLlpsbH6F3BZvh.jpg"], 298 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/bbbck.js" 299 | } , 300 | { 301 | "id": "jph", 302 | "name": "君品荟", 303 | "keys": ["jphck"], 304 | "settings": [{ 305 | "id": "jphck", 306 | "name": "CK 列表", 307 | "val": "", 308 | "type": "textarea", 309 | "autoGrow": true, 310 | "rows": 8, 311 | "desc": "jphck" 312 | }], 313 | "author": "@hhx", 314 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/jphck.js", 315 | "icons": ["https://s2.loli.net/2024/05/21/KcblPSRiGeYdkT4.jpg","https://s2.loli.net/2024/05/21/KcblPSRiGeYdkT4.jpg"], 316 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/jphck.js" 317 | } , 318 | 319 | { 320 | "id": "drwx", 321 | "name": "电热蚊香", 322 | "keys": ["drwxck"], 323 | "settings": [{ 324 | "id": "drwxck", 325 | "name": "CK 列表", 326 | "val": "", 327 | "type": "textarea", 328 | "autoGrow": true, 329 | "rows": 8, 330 | "desc": "drwxck" 331 | }], 332 | "author": "@hhx", 333 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/drwxck.js", 334 | "icons": ["https://s2.loli.net/2024/06/14/waHDbj8gX9dRctr.jpg","https://s2.loli.net/2024/06/14/waHDbj8gX9dRctr.jpg"], 335 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/drwxck.js" 336 | } , 337 | { 338 | "id": "snjk", 339 | "name": "三诺健康", 340 | "keys": ["snjkck"], 341 | "settings": [{ 342 | "id": "snjkck", 343 | "name": "CK 列表", 344 | "val": "", 345 | "type": "textarea", 346 | "autoGrow": true, 347 | "rows": 8, 348 | "desc": "snjkck" 349 | }], 350 | "author": "@hhx", 351 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/snjkck.js", 352 | "icons": ["https://s2.loli.net/2024/06/22/FmIhuEvVRoiPLbC.jpg","https://s2.loli.net/2024/06/22/FmIhuEvVRoiPLbC.jpg"], 353 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/snjkck.js" 354 | } , 355 | 356 | { 357 | "id": "amhy", 358 | "name": "爱玛会员", 359 | "keys": ["amhyck"], 360 | "settings": [{ 361 | "id": "amhyck", 362 | "name": "CK 列表", 363 | "val": "", 364 | "type": "textarea", 365 | "autoGrow": true, 366 | "rows": 8, 367 | "desc": "amhyck" 368 | }], 369 | "author": "@hhx", 370 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/amhyck.js", 371 | "icons": ["https://s2.loli.net/2024/06/28/g1mblWT9wRYi8BL.jpg","https://s2.loli.net/2024/06/28/g1mblWT9wRYi8BL.jpg"], 372 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/amhyck.js" 373 | } , 374 | 375 | { 376 | "id": "wc", 377 | "name": "望潮", 378 | "keys": ["wcck"], 379 | "settings": [{ 380 | "id": "wcck", 381 | "name": "CK 列表", 382 | "val": "", 383 | "type": "textarea", 384 | "autoGrow": true, 385 | "rows": 8, 386 | "desc": "wcck" 387 | }], 388 | "author": "@hhx", 389 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/wcck.js", 390 | "icons": ["https://s2.loli.net/2024/07/23/T6ExYMwh7z1dUuV.jpg","https://s2.loli.net/2024/07/23/T6ExYMwh7z1dUuV.jpg"], 391 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/wcck.js" 392 | }, 393 | { 394 | "id": "xstl", 395 | "name": "潇洒桐庐", 396 | "keys": ["xstlck"], 397 | "settings": [{ 398 | "id": "xstlck", 399 | "name": "CK 列表", 400 | "val": "", 401 | "type": "textarea", 402 | "autoGrow": true, 403 | "rows": 8, 404 | "desc": "xstlck" 405 | }], 406 | "author": "@hhx", 407 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/xstlck.js", 408 | "icons": ["https://s2.loli.net/2024/07/23/uWEpBLCNA6t9R8r.jpg","https://s2.loli.net/2024/07/23/uWEpBLCNA6t9R8r.jpg"], 409 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/xstlck.js" 410 | }, 411 | { 412 | "id": "zxjl", 413 | "name": "尊享金陵", 414 | "keys": ["zxjlck"], 415 | "settings": [{ 416 | "id": "zxjlck", 417 | "name": "CK 列表", 418 | "val": "", 419 | "type": "textarea", 420 | "autoGrow": true, 421 | "rows": 8, 422 | "desc": "zxjlck" 423 | }], 424 | "author": "@hhx", 425 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/zxjlck.js", 426 | "icons": ["https://s2.loli.net/2024/08/05/M9IXhro2ARVW364.jpg","https://s2.loli.net/2024/08/05/M9IXhro2ARVW364.jpg"], 427 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/zxjlck.js" 428 | }, 429 | 430 | { 431 | "id": "gjjj", 432 | "name": "顾家家居", 433 | "keys": ["gjjjck"], 434 | "settings": [{ 435 | "id": "gjjjck", 436 | "name": "CK 列表", 437 | "val": "", 438 | "type": "textarea", 439 | "autoGrow": true, 440 | "rows": 8, 441 | "desc": "gjjjck" 442 | }], 443 | "author": "@hhx", 444 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/gjjjck.js", 445 | "icons": ["https://s2.loli.net/2024/08/05/FbCmxp6rn28fHvJ.jpg","https://s2.loli.net/2024/08/05/FbCmxp6rn28fHvJ.jpg"], 446 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/gjjjck.js" 447 | }, 448 | { 449 | "id": "jja", 450 | "name": "久久爱", 451 | "keys": ["jjack"], 452 | "settings": [{ 453 | "id": "jjack", 454 | "name": "CK 列表", 455 | "val": "", 456 | "type": "textarea", 457 | "autoGrow": true, 458 | "rows": 8, 459 | "desc": "jjack" 460 | }], 461 | "author": "@hhx", 462 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/jjack.js", 463 | "icons": ["https://s2.loli.net/2024/08/19/yXTEnml276qYS8B.jpg","https://s2.loli.net/2024/08/19/yXTEnml276qYS8B.jpg"], 464 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/jjack.js" 465 | }, 466 | 467 | { 468 | "id": "ybs", 469 | "name": "牙博士口腔", 470 | "keys": ["ybsck"], 471 | "settings": [{ 472 | "id": "ybsck", 473 | "name": "CK 列表", 474 | "val": "", 475 | "type": "textarea", 476 | "autoGrow": true, 477 | "rows": 8, 478 | "desc": "ybsck" 479 | }], 480 | "author": "@hhx", 481 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/ybsck.js", 482 | "icons": ["https://s2.loli.net/2024/09/05/uxKRMCoejbd634E.jpg","https://s2.loli.net/2024/09/05/uxKRMCoejbd634E.jpg"], 483 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/ybsck.js" 484 | }, 485 | { 486 | "id": "ztkd", 487 | "name": "中通快递", 488 | "keys": ["ztkdck"], 489 | "settings": [{ 490 | "id": "ztkdck", 491 | "name": "CK 列表", 492 | "val": "", 493 | "type": "textarea", 494 | "autoGrow": true, 495 | "rows": 8, 496 | "desc": "ztkdck" 497 | }], 498 | "author": "@hhx", 499 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/ztkdck.js", 500 | "icons": ["https://s2.loli.net/2024/12/27/wkujDpQC5VNKSyO.jpg","https://s2.loli.net/2024/12/27/wkujDpQC5VNKSyO.jpg"], 501 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/ztkdck.js" 502 | }, 503 | { 504 | "id": "fyh", 505 | "name": "复游会", 506 | "keys": ["fyhck"], 507 | "settings": [{ 508 | "id": "fyhck", 509 | "name": "CK 列表", 510 | "val": "", 511 | "type": "textarea", 512 | "autoGrow": true, 513 | "rows": 8, 514 | "desc": "fyhck" 515 | }], 516 | "author": "@hhx", 517 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/fyhck.js", 518 | "icons": ["https://s2.loli.net/2024/12/27/alXk4L3ZbOCQzP8.jpg","https://s2.loli.net/2024/12/27/alXk4L3ZbOCQzP8.jpg"], 519 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/fyhck.js" 520 | }, 521 | 522 | { 523 | "id": "gjjk", 524 | "name": "高济健康", 525 | "keys": ["gjjkck"], 526 | "settings": [{ 527 | "id": "gjjkck", 528 | "name": "CK 列表", 529 | "val": "", 530 | "type": "textarea", 531 | "autoGrow": true, 532 | "rows": 8, 533 | "desc": "gjjkck" 534 | }], 535 | "author": "@hhx", 536 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/gjjkck.js", 537 | "icons": ["https://s2.loli.net/2024/12/27/SEaCzhAmyYXRxbV.jpg","https://s2.loli.net/2024/12/27/SEaCzhAmyYXRxbV.jpg"], 538 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/gjjkck.js" 539 | }, 540 | 541 | { 542 | "id": "tongcheng", 543 | "name": "同程", 544 | "keys": ["tcck"], 545 | "settings": [{ 546 | "id": "tcck", 547 | "name": "CK 列表", 548 | "val": "", 549 | "type": "textarea", 550 | "autoGrow": true, 551 | "rows": 8, 552 | "desc": "tcck" 553 | }], 554 | "author": "@hhx", 555 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/tcck.js", 556 | "icons": ["https://s2.loli.net/2025/03/11/lgAaDHBxpCXSsiU.png","https://s2.loli.net/2025/03/11/lgAaDHBxpCXSsiU.png"], 557 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/tcck.js" 558 | }, 559 | 560 | { 561 | "id": "jingcai", 562 | "name": "鲸才招聘", 563 | "keys": ["jczpck"], 564 | "settings": [{ 565 | "id": "jczpck", 566 | "name": "CK 列表", 567 | "val": "", 568 | "type": "textarea", 569 | "autoGrow": true, 570 | "rows": 8, 571 | "desc": "jczpck" 572 | }], 573 | "author": "@hhx", 574 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/jczpck.js", 575 | "icons": ["https://s2.loli.net/2025/03/11/Ez9iZd1krfupFWn.png","https://s2.loli.net/2025/03/11/Ez9iZd1krfupFWn.png"], 576 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/jczpck.js" 577 | }, 578 | 579 | { 580 | "id": "babycare", 581 | "name": "Babycare", 582 | "keys": ["bbck"], 583 | "settings": [{ 584 | "id": "bbck", 585 | "name": "CK 列表", 586 | "val": "", 587 | "type": "textarea", 588 | "autoGrow": true, 589 | "rows": 8, 590 | "desc": "bbck" 591 | }], 592 | "author": "@hhx", 593 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/bbck.js", 594 | "icons": ["https://s2.loli.net/2025/03/15/ADxgdvtXH53qEks.jpg","https://s2.loli.net/2025/03/15/ADxgdvtXH53qEks.jpg"], 595 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/bbck.js" 596 | }, 597 | 598 | { 599 | "id": "mxbc", 600 | "name": "蜜雪冰城", 601 | "keys": ["mxbcck"], 602 | "settings": [{ 603 | "id": "mxbcck", 604 | "name": "CK 列表", 605 | "val": "", 606 | "type": "textarea", 607 | "autoGrow": true, 608 | "rows": 8, 609 | "desc": "mxbcck" 610 | }], 611 | "author": "@hhx", 612 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/mxbcck.js", 613 | "icons": ["https://s2.loli.net/2025/03/15/TDIdEFoZnsVylgM.jpg","https://s2.loli.net/2025/03/15/TDIdEFoZnsVylgM.jpg"], 614 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/mxbcck.js" 615 | }, 616 | 617 | { 618 | "id": "picc", 619 | "name": "中国人保", 620 | "keys": ["piccck"], 621 | "settings": [{ 622 | "id": "piccck", 623 | "name": "CK 列表", 624 | "val": "", 625 | "type": "textarea", 626 | "autoGrow": true, 627 | "rows": 8, 628 | "desc": "piccck" 629 | }], 630 | "author": "@hhx", 631 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/piccck.js", 632 | "icons": ["https://s2.loli.net/2025/03/15/ANJWYSRUnqGVovc.jpg","https://s2.loli.net/2025/03/15/ANJWYSRUnqGVovc.jpg"], 633 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/piccck.js" 634 | }, 635 | 636 | { 637 | "id": "xmyx", 638 | "name": "星妈优选", 639 | "keys": ["xmyxck"], 640 | "settings": [{ 641 | "id": "xmyxck", 642 | "name": "CK 列表", 643 | "val": "", 644 | "type": "textarea", 645 | "autoGrow": true, 646 | "rows": 8, 647 | "desc": "xmyxck" 648 | }], 649 | "author": "@hhx", 650 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/xmyxck.js", 651 | "icons": ["https://s2.loli.net/2025/03/15/cRSMiO73npE9bva.jpg","https://s2.loli.net/2025/03/15/cRSMiO73npE9bva.jpg"], 652 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/xmyxck.js" 653 | }, 654 | 655 | { 656 | "id": "shfy", 657 | "name": "山海福烟", 658 | "keys": ["shfyck"], 659 | "settings": [{ 660 | "id": "shfyck", 661 | "name": "CK 列表", 662 | "val": "", 663 | "type": "textarea", 664 | "autoGrow": true, 665 | "rows": 8, 666 | "desc": "shfyck" 667 | }], 668 | "author": "@hhx", 669 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/shfyck.js", 670 | "icons": ["https://s2.loli.net/2025/03/25/jA635DGkKT7PRry.png","https://s2.loli.net/2025/03/25/jA635DGkKT7PRry.png"], 671 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/shfyck.js" 672 | }, 673 | 674 | { 675 | "id": "akb", 676 | "name": "艾客帮", 677 | "keys": ["akbck"], 678 | "settings": [{ 679 | "id": "akbck", 680 | "name": "CK 列表", 681 | "val": "", 682 | "type": "textarea", 683 | "autoGrow": true, 684 | "rows": 8, 685 | "desc": "akbck" 686 | }], 687 | "author": "@hhx", 688 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/akbck.js", 689 | "icons": ["https://s2.loli.net/2025/03/25/HtgXClqZnVBzIsc.png","https://s2.loli.net/2025/03/25/HtgXClqZnVBzIsc.png"], 690 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/akbck.js" 691 | }, 692 | 693 | { 694 | "id": "qcjlb", 695 | "name": "雀巢俱乐部", 696 | "keys": ["qcck"], 697 | "settings": [{ 698 | "id": "qcck", 699 | "name": "CK 列表", 700 | "val": "", 701 | "type": "textarea", 702 | "autoGrow": true, 703 | "rows": 8, 704 | "desc": "qcck" 705 | }], 706 | "author": "@hhx", 707 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/qcck.js", 708 | "icons": ["https://s2.loli.net/2025/04/01/EpmafGs9PH8x54c.png","https://s2.loli.net/2025/04/01/EpmafGs9PH8x54c.png"], 709 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/qcck.js" 710 | }, 711 | 712 | { 713 | "id": "yzsc", 714 | "name": "有赞商城", 715 | "keys": ["yzck"], 716 | "settings": [{ 717 | "id": "yzck", 718 | "name": "CK 列表", 719 | "val": "", 720 | "type": "textarea", 721 | "autoGrow": true, 722 | "rows": 8, 723 | "desc": "yzck" 724 | }], 725 | "author": "@hhx", 726 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/yzck.js", 727 | "icons": ["https://s2.loli.net/2025/04/14/lwqXvHnitQ6ARrW.jpg","https://s2.loli.net/2025/04/14/lwqXvHnitQ6ARrW.jpg"], 728 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/yzck.js" 729 | }, 730 | 731 | { 732 | "id": "jjj", 733 | "name": "999会员中心", 734 | "keys": ["jjjck"], 735 | "settings": [{ 736 | "id": "jjjck", 737 | "name": "CK 列表", 738 | "val": "", 739 | "type": "textarea", 740 | "autoGrow": true, 741 | "rows": 8, 742 | "desc": "jjjck" 743 | }], 744 | "author": "@hhx", 745 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/jjjck.js", 746 | "icons": ["https://s2.loli.net/2025/07/07/IYXBCHbWgo4Qhve.jpg","https://s2.loli.net/2025/07/07/IYXBCHbWgo4Qhve.jpg"], 747 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/jjjck.js" 748 | }, 749 | 750 | { 751 | "id": "txq", 752 | "name": "汤星球", 753 | "keys": ["txqck"], 754 | "settings": [{ 755 | "id": "txqck", 756 | "name": "CK 列表", 757 | "val": "", 758 | "type": "textarea", 759 | "autoGrow": true, 760 | "rows": 8, 761 | "desc": "txqck" 762 | }], 763 | "author": "@hhx", 764 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/txqck.js", 765 | "icons": ["https://s2.loli.net/2025/07/07/GpCtuqb4RxPlVZ2.jpg","https://s2.loli.net/2025/07/07/GpCtuqb4RxPlVZ2.jpg"], 766 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/txqck.js" 767 | }, 768 | 769 | { 770 | "id": "zmrs", 771 | "name": "中免日上", 772 | "keys": ["zmrsck"], 773 | "settings": [{ 774 | "id": "zmrsck", 775 | "name": "CK 列表", 776 | "val": "", 777 | "type": "textarea", 778 | "autoGrow": true, 779 | "rows": 8, 780 | "desc": "zmrsck" 781 | }], 782 | "author": "@hhx", 783 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/zmrsck.js", 784 | "icons": ["https://s2.loli.net/2025/07/07/leqoXghxKLmDnYC.png","https://s2.loli.net/2025/07/07/leqoXghxKLmDnYC.png"], 785 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/zmrsck.js" 786 | }, 787 | 788 | { 789 | "id": "nyg", 790 | "name": "牛游谷", 791 | "keys": ["nygck"], 792 | "settings": [{ 793 | "id": "nygck", 794 | "name": "CK 列表", 795 | "val": "", 796 | "type": "textarea", 797 | "autoGrow": true, 798 | "rows": 8, 799 | "desc": "nygck" 800 | }], 801 | "author": "@hhx", 802 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/nygck.js", 803 | "icons": ["https://s2.loli.net/2025/07/07/sT5Vu7QcOMo1NbA.jpg","https://s2.loli.net/2025/07/07/sT5Vu7QcOMo1NbA.jpg"], 804 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/nygck.js" 805 | }, 806 | 807 | { 808 | "id": "fxh", 809 | "name": "丰享会", 810 | "keys": ["fxhck"], 811 | "settings": [{ 812 | "id": "fxhck", 813 | "name": "CK 列表", 814 | "val": "", 815 | "type": "textarea", 816 | "autoGrow": true, 817 | "rows": 8, 818 | "desc": "fxhck" 819 | }], 820 | "author": "@hhx", 821 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/fxhck.js", 822 | "icons": ["https://s2.loli.net/2025/07/07/TUtNAySvDJH8i6O.png","https://s2.loli.net/2025/07/07/TUtNAySvDJH8i6O.png"], 823 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/fxhck.js" 824 | }, 825 | 826 | { 827 | "id": "yyzx", 828 | "name": "银鱼质享", 829 | "keys": ["yyzxck"], 830 | "settings": [{ 831 | "id": "yyzxck", 832 | "name": "CK 列表", 833 | "val": "", 834 | "type": "textarea", 835 | "autoGrow": true, 836 | "rows": 8, 837 | "desc": "yyzxck" 838 | }], 839 | "author": "@hhx", 840 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/yyzxck.js", 841 | "icons": ["https://s2.loli.net/2025/07/11/xkZwWq7bcDQo1RF.jpg","https://s2.loli.net/2025/07/11/xkZwWq7bcDQo1RF.jpg"], 842 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/yyzxck.js" 843 | }, 844 | 845 | { 846 | "id": "shzg", 847 | "name": "上海职工", 848 | "keys": ["shzgck"], 849 | "settings": [{ 850 | "id": "shzgck", 851 | "name": "CK 列表", 852 | "val": "", 853 | "type": "textarea", 854 | "autoGrow": true, 855 | "rows": 8, 856 | "desc": "shzgck" 857 | }], 858 | "author": "@hhx", 859 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/shzgck.js", 860 | "icons": ["https://s2.loli.net/2025/07/23/2KJgTD6mocbXFLC.png","https://s2.loli.net/2025/07/23/2KJgTD6mocbXFLC.png"], 861 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/shzgck.js" 862 | }, 863 | 864 | { 865 | "id": "phwd", 866 | "name": "平和味道", 867 | "keys": ["phwdck"], 868 | "settings": [{ 869 | "id": "phwdck", 870 | "name": "CK 列表", 871 | "val": "", 872 | "type": "textarea", 873 | "autoGrow": true, 874 | "rows": 8, 875 | "desc": "phwdck" 876 | }], 877 | "author": "@hhx", 878 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/phwdck.js", 879 | "icons": ["https://s2.loli.net/2025/09/04/hqiYtl9orKXu2Ef.jpg","https://s2.loli.net/2025/09/04/hqiYtl9orKXu2Ef.jpg"], 880 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/phwdck.js" 881 | }, 882 | 883 | { 884 | "id": "tcsy", 885 | "name": "同程私域", 886 | "keys": ["tcsyck"], 887 | "settings": [{ 888 | "id": "tcsyck", 889 | "name": "CK 列表", 890 | "val": "", 891 | "type": "textarea", 892 | "autoGrow": true, 893 | "rows": 8, 894 | "desc": "tcsyck" 895 | }], 896 | "author": "@hhx", 897 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/tcsyck.js", 898 | "icons": ["https://s2.loli.net/2025/03/11/lgAaDHBxpCXSsiU.png","https://s2.loli.net/2025/03/11/lgAaDHBxpCXSsiU.png"], 899 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/tcsyck.js" 900 | }, 901 | 902 | { 903 | "id": "trsj", 904 | "name": "甜润世界", 905 | "keys": ["trsjck"], 906 | "settings": [{ 907 | "id": "trsjck", 908 | "name": "CK 列表", 909 | "val": "", 910 | "type": "textarea", 911 | "autoGrow": true, 912 | "rows": 8, 913 | "desc": "trsjck" 914 | }], 915 | "author": "@hhx", 916 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/trsjck.js", 917 | "icons": ["https://s2.loli.net/2025/09/11/smyg8xBoIKvpnER.jpg","https://s2.loli.net/2025/09/11/smyg8xBoIKvpnER.jpg"], 918 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/trsjck.js" 919 | }, 920 | 921 | { 922 | "id": "bsd", 923 | "name": "波司登", 924 | "keys": ["bsdck"], 925 | "settings": [{ 926 | "id": "bsdck", 927 | "name": "CK 列表", 928 | "val": "", 929 | "type": "textarea", 930 | "autoGrow": true, 931 | "rows": 8, 932 | "desc": "bsdck" 933 | }], 934 | "author": "@hhx", 935 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/bsdck.js", 936 | "icons": ["https://s2.loli.net/2025/09/16/2daYPuoIbE6ZjF3.jpg","https://s2.loli.net/2025/09/16/2daYPuoIbE6ZjF3.jpg"], 937 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/bsdck.js" 938 | }, 939 | 940 | { 941 | "id": "mltz", 942 | "name": "名龙堂造", 943 | "keys": ["mltzck"], 944 | "settings": [{ 945 | "id": "mltzck", 946 | "name": "CK 列表", 947 | "val": "", 948 | "type": "textarea", 949 | "autoGrow": true, 950 | "rows": 8, 951 | "desc": "mltzck" 952 | }], 953 | "author": "@hhx", 954 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/mltzck.js", 955 | "icons": ["https://s2.loli.net/2025/10/28/zxXrKmwhUDFNap8.jpg","https://s2.loli.net/2025/10/28/zxXrKmwhUDFNap8.jpg"], 956 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/mltzck.js" 957 | }, 958 | 959 | { 960 | "id": "lbdq", 961 | "name": "老板电器", 962 | "keys": ["lbdqck"], 963 | "settings": [{ 964 | "id": "lbdqck", 965 | "name": "CK 列表", 966 | "val": "", 967 | "type": "textarea", 968 | "autoGrow": true, 969 | "rows": 8, 970 | "desc": "lbdqck" 971 | }], 972 | "author": "@hhx", 973 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/lbdqck.js", 974 | "icons": ["https://s2.loli.net/2025/10/28/aRJ6MuhW4G3yerl.jpg","https://s2.loli.net/2025/10/28/aRJ6MuhW4G3yerl.jpg"], 975 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/lbdqck.js" 976 | }, 977 | 978 | { 979 | "id": "jlc", 980 | "name": "嘉立创", 981 | "keys": ["jlcck"], 982 | "settings": [{ 983 | "id": "jlcck", 984 | "name": "CK 列表", 985 | "val": "", 986 | "type": "textarea", 987 | "autoGrow": true, 988 | "rows": 8, 989 | "desc": "jlcck" 990 | }], 991 | "author": "@hhx", 992 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/jlcck.js", 993 | "icons": ["https://s2.loli.net/2025/11/22/7OrZGJpwbU2S3HM.jpg","https://s2.loli.net/2025/11/22/7OrZGJpwbU2S3HM.jpg"], 994 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/jlcck.js" 995 | }, 996 | 997 | { 998 | "id": "hz", 999 | "name": "媓钻", 1000 | "keys": ["hzck"], 1001 | "settings": [{ 1002 | "id": "hzck", 1003 | "name": "CK 列表", 1004 | "val": "", 1005 | "type": "textarea", 1006 | "autoGrow": true, 1007 | "rows": 8, 1008 | "desc": "hzck" 1009 | }], 1010 | "author": "@hhx", 1011 | "repo": "https://raw.githubusercontent.com/levi19831005/js/main/hzck.js", 1012 | "icons": ["https://s2.loli.net/2025/11/22/CzoVBxlZrK9GiqU.png","https://s2.loli.net/2025/11/22/CzoVBxlZrK9GiqU.png"], 1013 | "script": "https://raw.githubusercontent.com/levi19831005/js/main/hzck.js" 1014 | } 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | ] 1023 | } 1024 | --------------------------------------------------------------------------------