Compare commits

...

7 Commits

Author SHA1 Message Date
smallfawn
bd6077fd32 风三得利修复 2025-02-16 20:13:55 +08:00
smallfawn
2515a72923 可口可乐修复 2025-02-16 20:06:06 +08:00
smallfawn
a78649c37d Update wx_xlxyh.js 2025-02-16 19:53:39 +08:00
smallfawn
73b60f33f8 Update 杰士邦安心福利社.js 2025-02-16 19:39:48 +08:00
smallfawn
86c5e030fc 1 2025-02-16 19:12:09 +08:00
smallfawn
9f7cd0e7d5 Merge branch 'main' of https://github.com/smallfawn/QLScriptPublic 2025-02-16 18:53:32 +08:00
smallfawn
605e1f81cf 1 2025-02-16 18:53:27 +08:00
9 changed files with 1030 additions and 714 deletions

80
Coca.py
View File

@ -1,80 +0,0 @@
# -*- encoding: utf-8 -*-
# @Time : 18:57
# @Author : yuxian
# @Email : 1503889663@qq.com
# @File : Coca.py
# @SoftWare : PyCharm
# 可口可乐吧小程序,抓包authorization(全部内容 copy即可),填入环境变量Coca中,多账号换行或@隔开
import json, os, hashlib, random, time, requests as r
def UF(): return f"Mozilla/5.0 (iPhone; CPU iPhone OS {f'{random.randint(12, 15)}.{random.randint(0, 6)}.{random.randint(0, 9)}'} like Mac OS X) AppleWebKit/{f'{random.randint(600, 700)}.{random.randint(1, 4)}.{random.randint(1, 5)}'} (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.20(0x16001422) NetType/WIFI Language/zh_CN"
def generate_random_string_and_timestamp():
T = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8))
d = str(int(time.time() * 1000))
return T, d
def sha256_encrypt(data):
hash_object = hashlib.sha256()
hash_object.update(data.encode('utf-8'))
hex_dig = hash_object.hexdigest()
return hex_dig
def get_header(url1):
T, d = generate_random_string_and_timestamp()
message = url1.replace("https://koplus.icoke.cn/cre-bff", "")
encrypted_data = sha256_encrypt(message + T + d + "apyuc3#7%m4*")
headers = {"x-sg-id": T, "x-sg-timestamp": d, "x-sg-signature": encrypted_data}
return headers
U = "https://koplus.icoke.cn/cre-bff/wechat/"
P = os.environ.get("Coca")
if P and P != "":
C = P.split("\n") if "\n" in P else P.split("@")
A = 1
for B in C:
try:
H = {
"Host": "koplus.icoke.cn",
"Connection": "keep-alive",
"xweb_xhr": "1",
"Authorization": B,
"User-Agent": UF(),
"Content-Type": "application/json",
"Accept": "*/*",
"Accept-Language": "*",
"Sec-Fetch-Site": "cross-site",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Dest": "empty",
"Referer": "https://servicewechat.com/wxa5811e0426a94686/364/page-frame.html",
"Accept-Encoding": "gzip, deflate, br"
}
url = f"{U}checkin"
H.update(get_header(url))
signReq = r.post(url=url, headers=H)
signResp = json.loads(signReq.text)
print(f"🎉开始签到账号:{A}🎉")
A += 1
if signResp["meta"]["transactionPoint"]:
print(f"⭕签到成功,获得{str(int(signResp['meta']['transactionPoint']) / 10)}个快乐瓶⭕")
elif signResp["meta"]["transactionPoint"] is None:
print("❗今日已签到,请勿重复签到❗")
else:
print("❌出现未知错误,签到失败❌")
time.sleep(3)
url = f"{U}profile"
H.update(get_header(url))
qReq = r.get(url=url, headers=H)
qResp = json.loads(qReq.text)
print(f"🎉开始查询账号积分🎉")
if qResp["data"]:
print(f"🎆账号快乐瓶总额:{str(int(qResp['data']['point']) / 10)}🎆")
else:
print("❌出现未知错误,查询失败❌")
except:
print("⚠️⚠️⚠️脚本报错执行下一个账号⚠️⚠️⚠️")

295
anmuxi.py
View File

@ -1,295 +0,0 @@
# !/usr/bin/python3
# -- coding: utf-8 --
# cron "30 9 * * *" script-path=xxx.py,tag=匹配cron用
# const $ = new Env('安慕希小程序')
import json
import os
import random
import time
from datetime import datetime, time as times
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
# 禁用安全请求警告
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
IS_DEV = False
if os.path.isfile('DEV_ENV.py'):
import DEV_ENV
IS_DEV = True
if os.path.isfile('notify.py'):
from notify import send
print("加载通知服务成功!")
else:
print("加载通知服务失败!")
send_msg = ''
one_msg = ''
def Log(cont=''):
global send_msg, one_msg
print(cont)
if cont:
one_msg += f'{cont}\n'
send_msg += f'{cont}\n'
class RUN:
def __init__(self, info, index):
global one_msg
one_msg = ''
split_info = info.split('@')
self.access_token = split_info[0]
len_split_info = len(split_info)
last_info = split_info[len_split_info - 1]
self.send_UID = None
if len_split_info > 0 and "UID_" in last_info:
print('检测到设置了UID')
print(last_info)
self.send_UID = last_info
self.index = index + 1
# print(self.access_token)
self.UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309080f) XWEB/8555'
# if ENV_NAME == 'YL_ZXBQL':
# appid = "wx06af0ef532292cd3"
# scene = "1037"
# scene = "1037"
self.headers = {
'Host': 'amxshop.yili.com',
'accesstoken': self.access_token,
'scene': '1302',
'xweb_xhr': '1',
'user-agent': self.UA,
'content-type': 'application/x-www-form-urlencoded',
'accept': '*/*',
'sec-fetch-site': 'cross-site',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': 'https://servicewechat.com/wxf2a6206f7e2fd712/664/page-frame.html',
'accept-language': 'zh-CN,zh;q=0.9',
}
self.s = requests.session()
self.s.verify = False
self.baseUrl = 'https://amxshop.yili.com/api/'
def make_request(self, url, method='post', headers={}, data={}, params=None):
if headers == {}:
headers = self.headers
try:
if method.lower() == 'get':
response = self.s.get(url, headers=headers, verify=False, params=params)
elif method.lower() == 'post':
response = self.s.post(url, headers=headers, json=data, params=params, verify=False)
else:
raise ValueError("不支持的请求方法❌: " + method)
return response.json()
except requests.exceptions.RequestException as e:
print("请求异常❌:", e)
except ValueError as e:
print("值错误或不支持的请求方法❌:", e)
except Exception as e:
print("发生了未知错误❌:", e)
def get_user_info(self):
act_name = '获取用户信息'
Log(f'\n====== {act_name} ======')
url = f"{self.baseUrl}user/getUser"
response = self.make_request(url,method='get')
if response.get('code', -1) == 200:
print(f'{act_name}成功!✅')
data = response.get('data',{})
user = data.get('user',{})
user_id = user.get('id')
user_name = user.get('name')
mobilePhone = user.get('mobilePhone')
myCode = user.get('myCode')
mobile = mobilePhone[:3] + "*" * 4 + mobilePhone[7:]
Log(f">用户名:{user_name}\n>手机号:{mobile}")
return True
elif not response:
print(f">账号 {self.index}: ck过期 请重新抓取 access-token")
return False
else:
print(response)
return False
def get_Point(self,END=False):
act_name = '获取积分信息'
if not END:Log(f'\n====== {act_name} ======')
url = f"{self.baseUrl}user/score"
response = self.make_request(url,method='get')
if response.get('code', -1) == 200:
data = response.get('data', '')
print(f'{act_name}成功!✅')
if END:
Log(f'执行后积分:【{data}')
else:
Log(f'当前积分:【{data}')
return True
else:
print(response)
return False
def daily_sign(self):
act_name = '签到'
Log(f'\n====== {act_name} ======')
url = f"{self.baseUrl}user/daily/sign?exParams=false"
response = self.make_request(url,method='get')
if response.get('code', -1) == 200:
data = response.get('data',{})
point = data.get('dailySign', {}).get('bonusPoint', '')
print(f'{act_name}成功!✅')
Log(f'获得积分:【{point}')
return True
else:
print(response)
return False
def get_sign_status(self):
act_name = '获取签到信息'
Log(f'\n====== {act_name} ======')
url = f"{self.baseUrl}user/sign/status"
response = self.make_request(url,method='get')
if response.get('code', -1) == 200:
data = response.get('data',{})
signed = data.get('signed','')
signDays = data.get('signDays','')
print(f'{act_name}成功!✅')
Log(f'今日:【{"已签到" if signed else "未签到"}')
print(f'累计签到:【{signDays}】天')
if not signed:
self.daily_sign()
return True
else:
print(response)
return False
def main(self):
Log(f"\n开始执行第{self.index}个账号--------------->>>>>")
if self.get_user_info():
# random_delay()
self.get_Point()
random_delay()
self.get_sign_status()
random_delay()
self.get_Point(True)
# self.daily_sign()
self.sendMsg()
return True
else:
self.sendMsg()
return False
def sendMsg(self):
if self.send_UID:
push_res = CHERWIN_TOOLS.wxpusher(self.send_UID, one_msg, APP_NAME)
print(push_res)
def random_delay(min_delay=1, max_delay=5):
"""
在min_delay和max_delay之间产生一个随机的延时时间然后暂停执行
参数:
min_delay (int/float): 最小延时时间
max_delay (int/float): 最大延时时间
"""
delay = random.uniform(min_delay, max_delay)
print(f">本次随机延迟:【{delay:.2f}】 秒.....")
time.sleep(delay)
def down_file(filename, file_url):
print(f'开始下载:{filename},下载地址:{file_url}')
try:
response = requests.get(file_url, verify=False, timeout=10)
response.raise_for_status()
with open(filename + '.tmp', 'wb') as f:
f.write(response.content)
print(f'{filename}】下载完成!')
# 检查临时文件是否存在
temp_filename = filename + '.tmp'
if os.path.exists(temp_filename):
# 删除原有文件
if os.path.exists(filename):
os.remove(filename)
# 重命名临时文件
os.rename(temp_filename, filename)
print(f'{filename}】重命名成功!')
return True
else:
print(f'{filename}】临时文件不存在!')
return False
except Exception as e:
print(f'{filename}】下载失败:{str(e)}')
return False
def import_Tools():
global CHERWIN_TOOLS, ENV, APP_INFO, TIPS, TIPS_HTML, amxCode
import CHERWIN_TOOLS
ENV, APP_INFO, TIPS, TIPS_HTML, amxCode = CHERWIN_TOOLS.main(APP_NAME, local_script_name, ENV_NAME,local_version)
if __name__ == '__main__':
APP_NAME = '安慕希小程序'
ENV_NAME = 'AMX'
CK_URL = 'amxshop.yili.com请求头'
CK_NAME = 'accesstoken'
CK_EX = 'wTUhu5IlL9uQDRelKgMRbao2bxii+O8+4FffOnxxxxxxx'
print(f'''
{APP_NAME}脚本
功能
积分签到
抓包步骤
打开{APP_NAME}
授权登陆
打开抓包工具
{CK_URL}{CK_NAME}
参数示例{CK_EX}
wxpusher一对一推送功能
需要定义变量export WXPUSHER=wxpusher的app_token不设置则不启用wxpusher一对一推送
需要在{ENV_NAME}变量最后添加@wxpusher的UID
设置青龙变量
export {ENV_NAME}='{CK_NAME}参数值'多账号#或&分割
export SCRIPT_UPDATE = 'False' 关闭脚本自动更新默认开启
注意抓完CK没事儿别打开小程序重新打开小程序请重新抓包
推荐cron5 7,11,15,20 * * *
''')
local_script_name = os.path.basename(__file__)
local_version = '2024.05.23'
if IS_DEV:
import_Tools()
else:
if os.path.isfile('amx.py'):
import_Tools()
else:
if down_file('amx.py', 'amx.py'):
print('脚本检测完成')
import_Tools()
else:
print(
'脚本检测失败')
exit()
print(TIPS)
token = ''
token = ENV if ENV else token
if not token:
print(f"未填写{ENV_NAME}变量\n青龙可在环境变量设置 {ENV_NAME} 或者在本脚本文件上方将{CK_NAME}填入token =''")
exit()
tokens = CHERWIN_TOOLS.ENV_SPLIT(token)
# print(tokens)
if len(tokens) > 0:
print(f"\n>>>>>>>>>>共获取到{len(tokens)}个账号<<<<<<<<<<")
access_token = []
for index, infos in enumerate(tokens):
run_result = RUN(infos, index).main()
if not run_result: continue
if send: send(f'{APP_NAME}挂机通知', send_msg + TIPS_HTML)

View File

@ -9,7 +9,7 @@
*/ */
const $ = new Env("北京汽车"); const $ = new Env("北京汽车");
const notify = $.isNode() ? require('./sendNotify') : ''; const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "bjevAuth"; let ckName = "bjevAuth";
let envSplitor = ["@", "\n"]; //多账号分隔符 let envSplitor = ["@", "\n"]; //多账号分隔符
let strSplitor = "&"; //多变量分隔符 let strSplitor = "&"; //多变量分隔符

View File

@ -280,7 +280,7 @@ async function SendMsg(message) {
if (!message) return; if (!message) return;
if (Notify > 0) { if (Notify > 0) {
if ($.isNode()) { if ($.isNode()) {
var notify = require("./sendNotify"); var notify = require("../sendNotify");
await notify.sendNotify($.name, message) await notify.sendNotify($.name, message)
} else { } else {
$.msg($.name, '', message) $.msg($.name, '', message)

242
fsdlb.js
View File

@ -4,64 +4,26 @@
* Fsdlb * Fsdlb
* Date: 2024-07-31 * Date: 2024-07-31
* cron "58 59 1 * * *" fsdlb.js * cron "58 59 1 * * *" fsdlb.js
* export fsdlb= Authorization 多账号换行或者#分隔 * export fsdlb= Authorization 多账号&分开 去掉Bearer
*/ */
// ============================================================================================================ // ============================================================================================================
const $ = new Env('逢三得利吧') const $ = new Env('逢三得利吧')
const axios = require('axios') const axios = require('axios')
const env_name = 'fsdlb' //环境变量名字 const env_name = 'fsdlb' //环境变量名字
const env = process.env[env_name] || '' const env = process.env[env_name] || ''
const Notify = 1 const Notify = 1
const debug = 0 const debug = 0
let scriptVersionNow = "1.0.0"; let scriptVersionNow = "1.0.0";
let msg = ""; let msg = "";
// ==================================异步顺序============================================================================== // ==================================异步顺序==============================================================================
!(async () => {
//await getNotice();
//await getVersion("yang7758258/ohhh154@main/fsdlb.js");
await main();
await SendMsg(msg);
})()
.catch((e) => $.logErr(e))
.finally(() => $.done());
//==================================脚本入口函数main()============================================================== //==================================脚本入口函数main()==============================================================
async function main() {
if (env == '') {
//没有设置变量,直接退出
console.log(`没有填写变量,请查看脚本说明: ${env_name}`)
return
}
let user_ck = env.split('\n')
DoubleLog(`\n========= 共找到 ${user_ck.length} 个账号 =========`);
let index = 1 //用来给账号标记序号, 从1开始
for (let ck of user_ck) {
if (!ck) continue //跳过空行
let ck_info = ck.split('&')
let Authorization = ck_info[0]
//let ticket = ck_info[1]
//let deviceCode = ck_info[2]
let user = {
index: index,
Authorization,
//ticket,
//deviceCode,
}
index = index + 1 //每次用完序号+1
//开始账号任务
let Run = new run(user);
await Run.userTask(user)
//每个账号之间等1~5秒随机时间
let rnd_time = Math.floor(Math.random() * 4000) + 1000
console.log(`随机等待${rnd_time / 1000}秒...`)
await $.wait(rnd_time)
}
}
// ======================================开始任务========================================= // ======================================开始任务=========================================
class run { class AAA {
constructor(user) { constructor(user) {
let timestamp = Date.now() let timestamp = Date.now()
this.headers = { this.headers = {
@ -74,18 +36,18 @@ class run {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36",
} }
} }
async userTask(user) { async userTask(user) {
console.log(`\n========= 账号[${user.index}]开始任务 =========`) console.log(`\n========= 账号[${user.index}]开始任务 =========`)
await this.sign(user) await this.sign(user)
await this.account(user) await this.account(user)
} }
// ============================================================================================================================= // =============================================================================================================================
// //
async sign(user) { async sign(user) {
try { try {
DoubleLog(`🕊账号[${user.index}] 开始签到...`); DoubleLog(`🕊账号[${user.index}] 开始签到...`);
//console.log(formattedDate); //console.log(formattedDate);
let urlObject = { let urlObject = {
method: 'post', method: 'post',
@ -93,48 +55,86 @@ async userTask(user) {
headers: this.headers, headers: this.headers,
data: { data: {
"miniappId": 159 "miniappId": 159
} }
} }
//console.log(urlObject); //console.log(urlObject);
let { data: result} = await axios.request(urlObject) let { data: result } = await axios.request(urlObject)
//console.log(result); //console.log(result);
if (result?.code == 200) { if (result?.code == 200) {
//打印签到结果 //打印签到结果
DoubleLog(`🕊账号[${user.index}] 签到成功:[${result.data.integralToastText}]🎉`); DoubleLog(`🕊账号[${user.index}] 签到成功:[${result.data.integralToastText}]🎉`);
}else{ } else {
DoubleLog(`🕊账号[${user.index}] 签到失败:${result.msg}🚫`) DoubleLog(`🕊账号[${user.index}] 签到失败:${result.msg}🚫`)
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
} }
// //
async account(user) { async account(user) {
try { try {
DoubleLog(`🕊账号[${user.index}] 开始查询...`); DoubleLog(`🕊账号[${user.index}] 开始查询...`);
let urlObject = { let urlObject = {
method: 'get', method: 'get',
url: `https://xiaodian.miyatech.com/api/user/auth/member/integral/union/flow/list?pageNo=1&pageSize=10&dataType=SCORE`, url: `https://xiaodian.miyatech.com/api/user/auth/member/integral/union/flow/list?pageNo=1&pageSize=10&dataType=SCORE`,
headers: this.headers, headers: this.headers,
} }
//console.log(urlObject); //console.log(urlObject);
let { data: result} = await axios.request(urlObject) let { data: result } = await axios.request(urlObject)
//console.log(result); //console.log(result);
if (result?.code == 200) { if (result?.code == 200) {
//打印签到结果 //打印签到结果
DoubleLog(`🕊账号[${user.index}] 查询成功:总积分[${result.data.totalScore}]🎉`); DoubleLog(`🕊账号[${user.index}] 查询成功:总积分[${result.data.totalScore}]🎉`);
}else { } else {
DoubleLog(`🕊账号[${user.index}] 查询失败:${result.msg}🚫`) DoubleLog(`🕊账号[${user.index}] 查询失败:${result.msg}🚫`)
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
} }
} }
async function main() {
if (env == '') {
//没有设置变量,直接退出
console.log(`没有填写变量,请查看脚本说明: ${env_name}`)
return
}
let user_ck = env.split('&')
DoubleLog(`\n========= 共找到 ${user_ck.length} 个账号 =========`);
let index = 1 //用来给账号标记序号, 从1开始
for (let ck of user_ck) {
if (!ck) continue //跳过空行
let ck_info = ck.split('#')
let Authorization = 'Bearer ' + ck_info[0]
//let ticket = ck_info[1]
//let deviceCode = ck_info[2]
let user = {
index: index,
Authorization,
//ticket,
//deviceCode,
}
index = index + 1 //每次用完序号+1
//开始账号任务
let Run = new AAA(user);
await Run.userTask(user)
//每个账号之间等1~5秒随机时间
let rnd_time = Math.floor(Math.random() * 4000) + 1000
console.log(`随机等待${rnd_time / 1000}秒...`)
await $.wait(rnd_time)
}
}
!(async () => {
await main();
await SendMsg(msg);
})()
.catch((e) => $.logErr(e))
.finally(() => $.done());
/** /**
* =========================================================发送消息============================================= * =========================================================发送消息=============================================
*/ */
@ -170,91 +170,17 @@ function DoubleLog(data) {
/** /**
* ======================================================等待 X ============================================ * ======================================================等待 X ============================================
*/ */
function wait(n) {
return new Promise(function (resolve) {
setTimeout(resolve, n * 1000);
});
}
/**
* ======================================================随机等待 1-5 ============================================
*/
function sjwait() {
return new Promise(function (resolve) {
let waitTime = Math.floor(Math.random() * 4000 + 1000);
setTimeout(resolve, waitTime);
});
}
// ==========================================================13位时间戳===================================================== // ==========================================================13位时间戳=====================================================
function getTimestamp() {
return new Date().getTime();
}
//===============================================网络请求httpRequest========================================= //===============================================网络请求httpRequest=========================================
function httpRequest(options, timeout = 1 * 1000) {
method = options.method ? options.method.toLowerCase() : options.body ? "post" : "get";
return new Promise(resolve => {
setTimeout(() => {
$[method](options, (err, resp, data) => {
try {
if (err) {
console.log(JSON.stringify(err));
$.logErr(err);
} else {
try { data = JSON.parse(data); } catch (error) { }
}
} catch (e) {
console.log(e);
$.logErr(e, resp);
} finally {
resolve(data);
}
})
}, timeout)
})
}
//==============================================Debug模式=============================================== //==============================================Debug模式===============================================
function debugLog(...args) {
if (debug) {
console.log(...args);
}
}
//===============================================获取远程通知======================================== //===============================================获取远程通知========================================
async function getNotice() {
try {
const urls = [
"https:tl.json",
];
let notice = null;
for (const url of urls) {
const options = { url, headers: { "User-Agent": "" }, };
const result = await httpRequest(options);
if (result && "notice" in result) {
notice = result.notice.replace(/\\n/g, "\n");
break;
}
}
if (notice) { $.DoubleLog(notice); }
} catch (e) {
console.log(e);
}
}
//==============================================获取远程版本================================================= //==============================================获取远程版本=================================================
function getVersion(scriptUrl, timeout = 3 * 1000) {
return new Promise((resolve) => {
const options = { url: `https://fastly.jsdelivr.net/gh/${scriptUrl}` };
$.get(options, (err, resp, data) => {
try {
const regex = /scriptVersionNow\s*=\s*(["'`])([\d.]+)\1/;
const match = data.match(regex);
const scriptVersionLatest = match ? match[2] : "";
DoubleLog(`\n当前版本:[${scriptVersionNow}]>>>云端☁️版本:[${scriptVersionLatest}]`);
} catch (e) {
$.logErr(e, resp);
}
resolve();
}, timeout);
});
}
//=============================================================================================================================================== //===============================================================================================================================================
//================================================固定API=============================================================================================== //================================================固定API===============================================================================================

326
wxapp/anmuxi.js Normal file
View File

@ -0,0 +1,326 @@
/*
------------------------------------------
@Author: sm
@Date: 2024.06.07 19:15
@Description: 测试
------------------------------------------
#Notice:
安慕希小程序 变量名anmuxi
抓wx-amxshop.msxapi.digitalyili.com/api headers中accessToken值 多账户&分隔
免责声明
------------------------------------------
1此脚本仅用于学习研究不保证其合法性准确性有效性请根据情况自行判断本人对此不承担任何保证责任
2由于此脚本仅用于学习研究您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除若违反规定引起任何事件本人对此均不负责
3请勿将此脚本用于任何商业或非法目的若违反规定请自行对此负责
4此脚本涉及应用与本人无关本人对因此引起的任何隐私泄漏或其他后果不承担任何责任
5本人对任何脚本引发的问题概不负责包括但不限于由脚本错误引起的任何损失和损害
6如果任何单位或个人认为此脚本可能涉嫌侵犯其权利应及时通知并提供身份证明所有权证明我们将在收到认证文件确认后删除此脚本
7所有直接或间接使用查看此脚本的人均应该仔细阅读此声明本人保留随时更改或补充此声明的权利一旦您使用或复制了此脚本即视为您已接受此免责声明
*/
const $ = new Env("安慕希小程序");
let ckName = `anmuxi`;
const strSplitor = "#";
const envSplitor = ["&", "\n"];
const notify = $.isNode() ? require("./sendNotify") : "";
const axios = require("axios");
const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram"
class Public {
async request(options) {
return await axios.request(options);
}
}
class Task extends Public {
constructor(env) {
super();
this.index = $.userIdx++
let user = env.split("#");
this.token = user[0];
this.signed = true
}
async daily_sign() {
let options = {
method: "GET",
url: `https://wx-amxshop.msxapi.digitalyili.com/api/user/daily/sign?exParams=false`,
headers: {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9",
"accesstoken": "" + this.token,
"content-type": "application/x-www-form-urlencoded",
"scene": "1256",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site",
"xweb_xhr": "1"
}
}
try {
let { data: res } = await this.request(options);
if (res.code == 200) {
$.log(`签到成功 获得【${res.data.dailySign.bonusPoints}】分`)
} else {
$.log(`签到失败`)
console.log(res);
}
} catch (e) {
console.log(`签到失败`)
}
}
async daily_sign_status() {
let options = {
method: "GET",
url: `https://wx-amxshop.msxapi.digitalyili.com/api/user/sign/status`,
headers: {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9",
"accesstoken": "" + this.token,
"content-type": "application/x-www-form-urlencoded",
"scene": "1256",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site",
"xweb_xhr": "1"
}
}
try {
let { data: res } = await this.request(options);
if (res.code == 200) {
if (res.data.signed == false) {
this.signed = false
$.log(`已签到 【${res.data.signDays}】天 检测到今日未签到`)
} else {
$.log(`已签到 【${res.data.signDays}】天 检测到今日已签到`)
this.signed = true
}
} else {
$.log(`获取签到状态失败`)
console.log(res);
}
} catch (e) {
console.log(`签到失败`)
}
}
async user_score() {
let options = {
method: "GET",
url: `https://wx-amxshop.msxapi.digitalyili.com/api/user/score`,
headers: {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9",
"accesstoken": "" + this.token,
"content-type": "application/x-www-form-urlencoded",
"scene": "1256",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site",
"xweb_xhr": "1"
}
}
try {
let { data: res } = await this.request(options);
if (res.code == 200) {
$.log(`当前积分【${res.data}】天`)
} else {
$.log(`获取积分失败`)
console.log(res);
}
} catch (e) {
console.log(`签到失败`)
}
}
async run() {
await this.user_score();
await this.daily_sign_status();
if (this.signed == false) {
await this.daily_sign();
}
}
}
!(async () => {
await getNotice()
$.checkEnv(ckName);
for (let user of $.userList) {
//
await new Task(user).run();
}
})()
.catch((e) => console.log(e))
.finally(() => $.done());
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}
}
let { data: res } = await new Public().request(options);
return res
}
// prettier-ignore
function Env(t, s) {
return new (class {
constructor(t, s) {
this.userIdx = 1;
this.userList = [];
this.userCount = 0;
this.name = t;
this.notifyStr = [];
this.logSeparator = "\n";
this.startTime = new Date().getTime();
Object.assign(this, s);
this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`);
}
checkEnv(ckName) {
let userCookie = (this.isNode() ? process.env[ckName] : "") || "";
this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n);
this.userCount = this.userList.length;
this.log(`共找到${this.userCount}个账号`);
}
async sendMsg() {
this.log("==============📣Center 通知📣==============")
let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) {
await notify.sendNotify(this.name, message);
} else {
}
}
isNode() {
return "undefined" != typeof module && !!module.exports;
}
queryStr(options) {
return Object.entries(options)
.map(
([key, value]) =>
`${key}=${typeof value === "object" ? JSON.stringify(value) : value
}`
)
.join("&");
}
getURLParams(url) {
const params = {};
const queryString = url.split("?")[1];
if (queryString) {
const paramPairs = queryString.split("&");
paramPairs.forEach((pair) => {
const [key, value] = pair.split("=");
params[key] = value;
});
}
return params;
}
isJSONString(str) {
try {
return JSON.parse(str) && typeof JSON.parse(str) === "object";
} catch (e) {
return false;
}
}
isJson(obj) {
var isjson =
typeof obj == "object" &&
Object.prototype.toString.call(obj).toLowerCase() ==
"[object object]" &&
!obj.length;
return isjson;
}
randomNumber(length) {
const characters = "0123456789";
return Array.from(
{ length },
() => characters[Math.floor(Math.random() * characters.length)]
).join("");
}
randomString(length) {
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
return Array.from(
{ length },
() => characters[Math.floor(Math.random() * characters.length)]
).join("");
}
uuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
/[xy]/g,
function (c) {
var r = (Math.random() * 16) | 0,
v = c == "x" ? r : (r & 0x3) | 0x8;
return v.toString(16);
}
);
}
time(t) {
let s = {
"M+": new Date().getMonth() + 1,
"d+": new Date().getDate(),
"H+": new Date().getHours(),
"m+": new Date().getMinutes(),
"s+": new Date().getSeconds(),
"q+": Math.floor((new Date().getMonth() + 3) / 3),
S: new Date().getMilliseconds(),
};
/(y+)/.test(t) &&
(t = t.replace(
RegExp.$1,
(new Date().getFullYear() + "").substr(4 - RegExp.$1.length)
));
for (let e in s) {
new RegExp("(" + e + ")").test(t) &&
(t = t.replace(
RegExp.$1,
1 == RegExp.$1.length
? s[e]
: ("00" + s[e]).substr(("" + s[e]).length)
));
}
return t;
}
log(content) {
this.notifyStr.push(content)
console.log(content)
}
wait(t) {
return new Promise((s) => setTimeout(s, t));
}
done(t = {}) {
this.sendMsg();
const s = new Date().getTime(),
e = (s - this.startTime) / 1e3;
this.log(
`\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`
);
if (this.isNode()) {
process.exit(1);
}
}
})(t, s);
}

View File

@ -3,14 +3,16 @@
* Show:重写请求函数 在got环境或axios环境都可以请求 * Show:重写请求函数 在got环境或axios环境都可以请求
* 微信小程序_骁龙骁友会 每日签到 点赞分享文章 免费抽奖一次 阅读和看视频以后更新 * 微信小程序_骁龙骁友会 每日签到 点赞分享文章 免费抽奖一次 阅读和看视频以后更新
* 变量名:wx_xlxyh * 变量名:wx_xlxyh
* 变量值:https://qualcomm.growthideadata.com/qualcomm-app/ * 变量值:https://qualcomm.boysup.cn/qualcomm-app/
* headers请求头中 sessionkey的值和userid的值 #拼接 #拼接 #拼接 * headers请求头中 sessionkey的值和userid的值 #拼接 #拼接 #拼接
* 多账号&拼接
* 需要手动进一次抽奖界面 进行抽奖后再来运行脚本 * 需要手动进一次抽奖界面 进行抽奖后再来运行脚本
* scriptVersionNow = "0.0.1"; * scriptVersionNow = "0.0.2";
*/ */
const $ = new Env("微信小程序_骁龙骁友会"); const $ = new Env("微信小程序_骁龙骁友会");
const notify = $.isNode() ? require('../sendNotify') : ''; process.env.wx_xlxyh = 'I5Elqfeb+gGwKVEKXD95Tg==#297212'
const notify = $.isNode() ? require('./sendNotify') : '';
let ckName = "wx_xlxyh"; let ckName = "wx_xlxyh";
let envSplitor = ["&", "\n"]; //多账号分隔符 let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符 let strSplitor = "#"; //多变量分隔符
@ -48,12 +50,15 @@ class Task {
} }
async taskRequest(method, url, body = "") { async taskRequest(method, url, body = "") {
let headers = { let headers = {
//"requestId": "88bd9fdf29c845be8e41a1e122337d6b", //"requestId": "88bd9fdf29c845be8e41a1e122337d6b",
//timestamp: 1711330339720, //timestamp: 1711330339720,
//xweb_xhr: 1, //xweb_xhr: 1,
"Host": "qualcomm.growthideadata.com", //"openid": "o2jYV5ZUH59H9uGcY04vSdV0Rbso",
//"sign": "34bd7bc53e90128e6aba9d96dba5e40f",
//"timestamp": "1739706208412",
"Host": "qualcomm.boysup.cn",
//sign: "478d557229cdd6ac89128648a2a61e63", //sign: "478d557229cdd6ac89128648a2a61e63",
Accept: "*/*", Accept: "*/*",
"User-Agent": this.UA, "User-Agent": this.UA,
@ -62,6 +67,7 @@ class Task {
"sessionKey": this.ck, "sessionKey": this.ck,
"userId": Number(this.userId), "userId": Number(this.userId),
} }
this.openId !== "" ? Object.assign(headers, { "openId": this.openId }) : "" this.openId !== "" ? Object.assign(headers, { "openId": this.openId }) : ""
const reqeuestOptions = { const reqeuestOptions = {
url: url, url: url,
@ -75,11 +81,13 @@ class Task {
} }
async LuckDrawApi() { async LuckDrawApi() {
try { try {
let LuckDrawNumResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/luckDraw/list?userId=${this.userId}&activityId=7`) let LuckDrawNumResult = await this.taskRequest("get", `https://qualcomm.boysup.cn/qualcomm-app/api/luckDraw/list?userId=297212&activityId=7`)
if (LuckDrawNumResult.code == 200) { if (LuckDrawNumResult.code == 200) {
//当前剩余签到次数 == 总数 //可以免费抽奖一次 //当前剩余签到次数 == 总数 //可以免费抽奖一次
if (LuckDrawNumResult.data.luckDrawCount == LuckDrawNumResult.data.luckDrawSumCount) { if (LuckDrawNumResult.data.luckDrawCount == LuckDrawNumResult.data.luckDrawSumCount) {
let LuckDrawTaskResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/luckDraw/getLuck?userId=${this.userId}&activityId=7`) let LuckDrawTaskResult = await this.taskRequest("post", `https://qualcomm.boysup.cn/qualcomm-app/api/luckDraw/getLuck`,
'userId=297212&activityId=7'
)
if (LuckDrawTaskResult.code == 200) { if (LuckDrawTaskResult.code == 200) {
$.log(`账号[${this.userId}] 抽奖成功 获得[${LuckDrawTaskResult.data.name}]🎉`) $.log(`账号[${this.userId}] 抽奖成功 获得[${LuckDrawTaskResult.data.name}]🎉`)
} else { } else {
@ -95,8 +103,8 @@ class Task {
} }
} }
async updateClick(body) { async updateClick(body) {
try { /*try {
let Result = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/buryPointApp/save`, body) let Result = await this.taskRequest("post", `https://qualcomm.boysup.cn/qualcomm-app/api/messageSubscribeApp/save`, body)
if (Result.code == 200) { if (Result.code == 200) {
$.log(`账号[${this.userId}] 上传点击成功`); $.log(`账号[${this.userId}] 上传点击成功`);
} else { } else {
@ -104,11 +112,11 @@ class Task {
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }*/
} }
async UserInfoApi() { async UserInfoApi() {
try { try {
let UserInfoResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/user/info?userId=${this.userId}`) let UserInfoResult = await this.taskRequest("get", `https://qualcomm.boysup.cn/qualcomm-app/api/user/info?userId=${this.userId}`)
if (UserInfoResult.code == 200) { if (UserInfoResult.code == 200) {
$.log(`✅账号[${this.userId}] 【昵称】[${UserInfoResult.data.nick}] 【等级】[${UserInfoResult.data.level}] 【现有积分】${UserInfoResult.data.coreCoin} 【累计获得】${UserInfoResult.data.cumulativeCoreCoin}🎉`); $.log(`✅账号[${this.userId}] 【昵称】[${UserInfoResult.data.nick}] 【等级】[${UserInfoResult.data.level}] 【现有积分】${UserInfoResult.data.coreCoin} 【累计获得】${UserInfoResult.data.cumulativeCoreCoin}🎉`);
this.openId = UserInfoResult.data.openId this.openId = UserInfoResult.data.openId
@ -123,7 +131,7 @@ class Task {
} }
async ReadStartApi(articleId) { async ReadStartApi(articleId) {
try { try {
let ReadStartApi = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/enterReadDaily`, `articleId=${articleId}&userId=${this.userId}`) let ReadStartApi = await this.taskRequest("post", `https://qualcomm.boysup.cn/qualcomm-app/api/article/enterReadDaily`, `articleId=${articleId}&userId=${this.userId}`)
if (ReadStartApi.code == 200) { if (ReadStartApi.code == 200) {
$.log(`✅账号[${this.userId}] 阅读文章开始上传成功🎉`); $.log(`✅账号[${this.userId}] 阅读文章开始上传成功🎉`);
@ -137,7 +145,7 @@ class Task {
} }
async ReadEndApi(articleId) { async ReadEndApi(articleId) {
try { try {
let ReadEndApi = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/exitReadDaily`, `articleId=${articleId}&userId=${this.userId}`) let ReadEndApi = await this.taskRequest("post", `https://qualcomm.boysup.cn/qualcomm-app/api/article/exitReadDaily`, `articleId=${articleId}&userId=${this.userId}`)
if (ReadEndApi.code == 200) { if (ReadEndApi.code == 200) {
$.log(`✅账号[${this.userId}] 阅读文章结束上传成功🎉`); $.log(`✅账号[${this.userId}] 阅读文章结束上传成功🎉`);
@ -150,7 +158,7 @@ class Task {
} }
async ShareApi(articleId) { async ShareApi(articleId) {
try { try {
let ShareResult = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/shareDaily`, `articleId=${articleId}&userId=${this.userId}`) let ShareResult = await this.taskRequest("post", `https://qualcomm.boysup.cn/qualcomm-app/api/article/shareDaily`, `articleId=${articleId}&userId=${this.userId}`)
if (ShareResult.code == 200) { if (ShareResult.code == 200) {
$.log(`✅账号[${this.userId}] 分享文章成功`) $.log(`✅账号[${this.userId}] 分享文章成功`)
} else { } else {
@ -162,7 +170,7 @@ class Task {
} }
async LikeApi(articleId) { async LikeApi(articleId) {
try { try {
let LikeResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/like?articleId=${articleId}&userId=${this.userId}`) let LikeResult = await this.taskRequest("get", `https://qualcomm.boysup.cn/qualcomm-app/api/article/like?articleId=${articleId}&userId=${this.userId}`)
if (LikeResult.code == 200) { if (LikeResult.code == 200) {
$.log(`✅账号[${this.userId}] 点赞文章成功`) $.log(`✅账号[${this.userId}] 点赞文章成功`)
} else { } else {
@ -174,7 +182,7 @@ class Task {
} }
async ArticleListApi() { async ArticleListApi() {
try { try {
let ArticleListResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/home/articles?page=1&size=20&userId=${this.userId}&type=0&searchDate=&articleShowPlace=%E9%AA%81%E5%8F%8B%E8%B5%84%E8%AE%AF%E5%88%97%E8%A1%A8%E9%A1%B5`) let ArticleListResult = await this.taskRequest("get", `https://qualcomm.boysup.cn/qualcomm-app/api/home/articles?page=1&size=20&userId=${this.userId}&type=0&searchDate=&articleShowPlace=%E9%AA%81%E5%8F%8B%E8%B5%84%E8%AE%AF%E5%88%97%E8%A1%A8%E9%A1%B5`)
if (ArticleListResult.code == 200) { if (ArticleListResult.code == 200) {
$.log(`✅账号[${this.userId}] 获取文章${ArticleListResult.message} 准备阅读/点赞/分享🎉`); $.log(`✅账号[${this.userId}] 获取文章${ArticleListResult.message} 准备阅读/点赞/分享🎉`);
@ -188,12 +196,12 @@ class Task {
} }
async SignInApi() { async SignInApi() {
try { try {
let SignInListResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/user/signList?userId=${this.userId}`) let SignInListResult = await this.taskRequest("get", `https://qualcomm.boysup.cn/qualcomm-app/api/user/signList?userId=${this.userId}`)
if (SignInListResult.code == 200) { if (SignInListResult.code == 200) {
if (SignInListResult.data.isSignToday == 1) { if (SignInListResult.data.isSignToday == 1) {
$.log(`✅账号[${this.userId}] 今天已经签到过了`); $.log(`✅账号[${this.userId}] 今天已经签到过了`);
} else { } else {
let SignInResult = await this.taskRequest("get", `https://qualcomm.growthideadata.com/qualcomm-app/api/user/signIn?userId=${this.userId}`) let SignInResult = await this.taskRequest("get", `https://qualcomm.boysup.cn/qualcomm-app/api/user/signIn?userId=${this.userId}`)
if (SignInResult.code == 200) { if (SignInResult.code == 200) {
$.log(`✅账号[${this.userId}] 签到成功[${SignInResult.data.coreCoin}]🎉`); $.log(`✅账号[${this.userId}] 签到成功[${SignInResult.data.coreCoin}]🎉`);
} else { } else {

288
wxapp/可口可乐吧.js Normal file
View File

@ -0,0 +1,288 @@
/*
------------------------------------------
@Author: sm
@Date: 2024.06.07 19:15
@Description: 测试
------------------------------------------
#Notice:
变量名kekoukeleba 抓小程序可口可乐吧 member-api.icoke.cn/api Headers中 authorization 去掉Bearer 多账号&连接
免责声明
------------------------------------------
1此脚本仅用于学习研究不保证其合法性准确性有效性请根据情况自行判断本人对此不承担任何保证责任
2由于此脚本仅用于学习研究您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除若违反规定引起任何事件本人对此均不负责
3请勿将此脚本用于任何商业或非法目的若违反规定请自行对此负责
4此脚本涉及应用与本人无关本人对因此引起的任何隐私泄漏或其他后果不承担任何责任
5本人对任何脚本引发的问题概不负责包括但不限于由脚本错误引起的任何损失和损害
6如果任何单位或个人认为此脚本可能涉嫌侵犯其权利应及时通知并提供身份证明所有权证明我们将在收到认证文件确认后删除此脚本
7所有直接或间接使用查看此脚本的人均应该仔细阅读此声明本人保留随时更改或补充此声明的权利一旦您使用或复制了此脚本即视为您已接受此免责声明
*/
const $ = new Env("可口可乐吧");
let ckName = `kekoukeleba`;
const strSplitor = "#";
const envSplitor = ["&", "\n"];
const notify = $.isNode() ? require("./sendNotify") : "";
const axios = require("axios");
const defaultUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.31(0x18001e31) NetType/WIFI Language/zh_CN miniProgram"
class Public {
async request(options) {
return await axios.request(options);
}
}
class Task extends Public {
constructor(env) {
super();
this.index = $.userIdx++
let user = env.split("#");
this.token = user[0];
this.isSign = false;
}
async addSign() {
let options = {
method: "GET",
url: "https://member-api.icoke.cn/api/icoke-sign/icoke/mini/sign/main/sign",
headers: {
"accept": "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9",
"authorization": "Bearer " + this.token,
"content-type": "application/json",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site",
"xweb_xhr": "1",
"Referer": "https://servicewechat.com/wxa5811e0426a94686/421/page-frame.html",
"Referrer-Policy": "unsafe-url"
},
}
try {
let { data: res } = await this.request(options);
if (res.success == true) {
$.log(`签到成功 获得【${res.point}】快乐瓶`)
} else {
$.log(`签到失败`)
console.log(res);
}
} catch (e) {
console.log(e);
}
}
async userInfo() {
let options = {
method: "GET",
url: "https://member-api.icoke.cn/api/icoke-customer/icoke/mini/customer/main/points",
headers: {
"accept": "application/json, text/plain, */*",
"accept-language": "zh-CN,zh;q=0.9",
"authorization": "Bearer " + this.token,
"content-type": "application/json",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site",
"xweb_xhr": "1",
"Referer": "https://servicewechat.com/wxa5811e0426a94686/421/page-frame.html",
"Referrer-Policy": "unsafe-url"
},
}
try {
let { data: res } = await this.request(options);
$.log(`目前还剩【${res.point}】瓶 `)
} catch (e) {
console.log(e);
}
}
async run() {
await this.userInfo();
await this.addSign();
}
}
!(async () => {
await getNotice()
$.checkEnv(ckName);
for (let user of $.userList) {
//
await new Task(user).run();
}
})()
.catch((e) => console.log(e))
.finally(() => $.done());
async function getNotice() {
let options = {
url: `https://gitee.com/smallfawn/Note/raw/main/Notice.json`,
headers: {
"User-Agent": defaultUserAgent,
}
}
let { data: res } = await new Public().request(options);
return res
}
// prettier-ignore
function Env(t, s) {
return new (class {
constructor(t, s) {
this.userIdx = 1;
this.userList = [];
this.userCount = 0;
this.name = t;
this.notifyStr = [];
this.logSeparator = "\n";
this.startTime = new Date().getTime();
Object.assign(this, s);
this.log(`\ud83d\udd14${this.name},\u5f00\u59cb!`);
}
checkEnv(ckName) {
let userCookie = (this.isNode() ? process.env[ckName] : "") || "";
this.userList = userCookie.split(envSplitor.find((o) => userCookie.includes(o)) || "&").filter((n) => n);
this.userCount = this.userList.length;
this.log(`共找到${this.userCount}个账号`);
}
async sendMsg() {
this.log("==============📣Center 通知📣==============")
let message = this.notifyStr.join(this.logSeparator);
if (this.isNode()) {
await notify.sendNotify(this.name, message);
} else {
}
}
isNode() {
return "undefined" != typeof module && !!module.exports;
}
queryStr(options) {
return Object.entries(options)
.map(
([key, value]) =>
`${key}=${typeof value === "object" ? JSON.stringify(value) : value
}`
)
.join("&");
}
getURLParams(url) {
const params = {};
const queryString = url.split("?")[1];
if (queryString) {
const paramPairs = queryString.split("&");
paramPairs.forEach((pair) => {
const [key, value] = pair.split("=");
params[key] = value;
});
}
return params;
}
isJSONString(str) {
try {
return JSON.parse(str) && typeof JSON.parse(str) === "object";
} catch (e) {
return false;
}
}
isJson(obj) {
var isjson =
typeof obj == "object" &&
Object.prototype.toString.call(obj).toLowerCase() ==
"[object object]" &&
!obj.length;
return isjson;
}
randomNumber(length) {
const characters = "0123456789";
return Array.from(
{ length },
() => characters[Math.floor(Math.random() * characters.length)]
).join("");
}
randomString(length) {
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
return Array.from(
{ length },
() => characters[Math.floor(Math.random() * characters.length)]
).join("");
}
uuid() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
/[xy]/g,
function (c) {
var r = (Math.random() * 16) | 0,
v = c == "x" ? r : (r & 0x3) | 0x8;
return v.toString(16);
}
);
}
time(t) {
let s = {
"M+": new Date().getMonth() + 1,
"d+": new Date().getDate(),
"H+": new Date().getHours(),
"m+": new Date().getMinutes(),
"s+": new Date().getSeconds(),
"q+": Math.floor((new Date().getMonth() + 3) / 3),
S: new Date().getMilliseconds(),
};
/(y+)/.test(t) &&
(t = t.replace(
RegExp.$1,
(new Date().getFullYear() + "").substr(4 - RegExp.$1.length)
));
for (let e in s) {
new RegExp("(" + e + ")").test(t) &&
(t = t.replace(
RegExp.$1,
1 == RegExp.$1.length
? s[e]
: ("00" + s[e]).substr(("" + s[e]).length)
));
}
return t;
}
log(content) {
this.notifyStr.push(content)
console.log(content)
}
wait(t) {
return new Promise((s) => setTimeout(s, t));
}
done(t = {}) {
this.sendMsg();
const s = new Date().getTime(),
e = (s - this.startTime) / 1e3;
this.log(
`\ud83d\udd14${this.name},\u7ed3\u675f!\ud83d\udd5b ${e}\u79d2`
);
if (this.isNode()) {
process.exit(1);
}
}
})(t, s);
}

File diff suppressed because one or more lines are too long