Compare commits

...

26 Commits

Author SHA1 Message Date
smallfawn
c850c0453a 脱密 2025-01-25 16:42:28 +08:00
smallfawn
745de23884 脱密 2025-01-25 16:33:53 +08:00
smallfawn
8cbf0a2ca9 1 2025-01-25 16:21:48 +08:00
smallfawn
3b904280dd . 2025-01-25 16:18:24 +08:00
smallfawn
c9944896cb . 2025-01-25 15:30:43 +08:00
smallfawn
246d9782e6
Create chaoxinwen.js 2025-01-25 13:19:34 +08:00
smallfawn
30eb73abb2
Create bawangchaji.js 2025-01-25 13:18:43 +08:00
smallfawn
9e29938ce4
Create xipigou.js 2025-01-25 13:17:50 +08:00
smallfawn
57244a1238
Create piaopiaochaoshi.js 2025-01-25 13:16:51 +08:00
smallfawn
14dd2fb486
Create quzanmi.js 2025-01-25 13:16:04 +08:00
smallfawn
8e2f88d8b7
Create shangzhanwangluo.js 2025-01-25 13:15:24 +08:00
smallfawn
d07cf65438
Create quanzhan.py 2025-01-25 13:14:36 +08:00
smallfawn
85b4ed49b1
Create quanmianshidai.py 2025-01-25 13:13:51 +08:00
smallfawn
ff4228d3d1
Create xiaosatonglu.js 2025-01-25 13:12:28 +08:00
smallfawn
24c3c83a5b
Rename enshan.js to enshan.py 2025-01-25 13:11:46 +08:00
smallfawn
50060e5002
Rename bilibili.js to bilibili.py 2025-01-25 13:10:55 +08:00
smallfawn
6b2b454bf6
Rename aliyunpan.js to aliyunpan.py 2025-01-25 13:10:39 +08:00
smallfawn
681ef3eb01
Create wangchao.py 2025-01-25 13:09:37 +08:00
smallfawn
4bbcc6819d
Create liyingyunjie.js 2025-01-25 13:08:54 +08:00
smallfawn
53abfe7073
Create hongxingerke.js 2025-01-25 13:08:12 +08:00
smallfawn
b56337fb0e
Create shangshaban.js 2025-01-25 13:07:17 +08:00
smallfawn
d22bd76d34
Create yaejia.js 2025-01-25 13:06:44 +08:00
smallfawn
46be3b4e75
Create zhanma.js 2025-01-25 13:06:12 +08:00
smallfawn
f2cbd330f1
Create aliyunpan.js 2025-01-25 13:05:21 +08:00
smallfawn
b109637169
Create bilibili.js 2025-01-25 13:04:37 +08:00
smallfawn
b0898f4bf8
Create enshan.js 2025-01-25 13:03:52 +08:00
56 changed files with 21691 additions and 1447 deletions

80
aliyunpan.py Normal file
View File

@ -0,0 +1,80 @@
import json
import os
import requests
import urllib3
from dailycheckin import CheckIn
urllib3.disable_warnings()
class AliYun(CheckIn):
name = "阿里云盘"
def __init__(self, check_item: dict):
self.check_item = check_item
def update_token(self, refresh_token):
url = "https://auth.aliyundrive.com/v2/account/token"
data = {"grant_type": "refresh_token", "refresh_token": refresh_token}
response = requests.post(url=url, json=data).json()
access_token = response.get("access_token")
return access_token
def sign(self, access_token):
url = "https://member.aliyundrive.com/v1/activity/sign_in_list"
headers = {"Authorization": access_token, "Content-Type": "application/json"}
result = requests.post(url=url, headers=headers, json={}).json()
sign_days = result["result"]["signInCount"]
data = {"signInDay": sign_days}
url_reward = "https://member.aliyundrive.com/v1/activity/sign_in_reward"
requests.post(url=url_reward, headers=headers, data=json.dumps(data))
if "success" in result:
print("签到成功")
for i, j in enumerate(result["result"]["signInLogs"]):
if j["status"] == "miss":
day_json = result["result"]["signInLogs"][i - 1]
if not day_json["isReward"]:
msg = [
{
"name": "阿里云盘",
"value": "签到成功,今日未获得奖励",
}
]
else:
msg = [
{
"name": "累计签到",
"value": result["result"]["signInCount"],
},
{
"name": "阿里云盘",
"value": "获得奖励:{}{}".format(
day_json["reward"]["name"],
day_json["reward"]["description"],
),
},
]
return msg
def main(self):
refresh_token = self.check_item.get("refresh_token")
access_token = self.update_token(refresh_token)
if not access_token:
return [{"name": "阿里云盘", "value": "token 过期"}]
msg = self.sign(access_token)
msg = "\n".join([f"{one.get('name')}: {one.get('value')}" for one in msg])
return msg
if __name__ == "__main__":
with open(
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.json"),
encoding="utf-8",
) as f:
datas = json.loads(f.read())
_check_item = datas.get("ALIYUN", [])[0]
print(AliYun(check_item=_check_item).main())

View File

@ -183,7 +183,7 @@ const SaltConfig = {
//---------------------------------------------------------
async function start() {
await getVersion("smallfawn/QLScriptPublic/main/mys.js");
//await getVersion("smallfawn/QLScriptPublic/main/mys.js");
log(`todoList:此次版本更新为过渡版本,以后将增加米游币的任务`)
log(`tips:更新双变量模式,两个网址获取的两个cookie用&分割`)
log(`\n====== 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ======`);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

925
bhxcy.js

File diff suppressed because one or more lines are too long

445
bilibili.py Normal file
View File

@ -0,0 +1,445 @@
import json
import os
import time
import requests
from dailycheckin import CheckIn
class BiliBili(CheckIn):
name = "Bilibili"
def __init__(self, check_item: dict):
self.check_item = check_item
@staticmethod
def get_nav(session):
url = "https://api.bilibili.com/x/web-interface/nav"
ret = session.get(url=url).json()
uname = ret.get("data", {}).get("uname")
uid = ret.get("data", {}).get("mid")
is_login = ret.get("data", {}).get("isLogin")
coin = ret.get("data", {}).get("money")
vip_type = ret.get("data", {}).get("vipType")
current_exp = ret.get("data", {}).get("level_info", {}).get("current_exp")
return uname, uid, is_login, coin, vip_type, current_exp
@staticmethod
def get_today_exp(session: requests.Session) -> list:
"""GET 获取今日经验信息
:param requests.Session session:
:return list: 今日经验信息列表
"""
url = "https://api.bilibili.com/x/member/web/exp/log?jsonp=jsonp"
today = time.strftime("%Y-%m-%d", time.localtime())
return list(
filter(
lambda x: x["time"].split()[0] == today,
session.get(url=url).json().get("data").get("list"),
)
)
@staticmethod
def vip_privilege_my(session) -> dict:
"""取B站大会员硬币经验信息"""
url = "https://api.bilibili.com/x/vip/privilege/my"
ret = session.get(url=url).json()
return ret
@staticmethod
def reward(session) -> dict:
"""取B站经验信息"""
url = "https://api.bilibili.com/x/member/web/exp/log?jsonp=jsonp"
today = time.strftime("%Y-%m-%d", time.localtime())
return list(
filter(
lambda x: x["time"].split()[0] == today,
session.get(url=url).json().get("data").get("list"),
)
)
@staticmethod
def live_sign(session) -> dict:
"""B站直播签到"""
try:
url = "https://api.live.bilibili.com/xlive/web-ucenter/v1/sign/DoSign"
ret = session.get(url=url).json()
if ret["code"] == 0:
msg = f'签到成功,{ret["data"]["text"]},特别信息:{ret["data"]["specialText"]},本月已签到{ret["data"]["hadSignDays"]}'
elif ret["code"] == 1011040:
msg = "今日已签到过,无法重复签到"
else:
msg = f'签到失败,信息为: {ret["message"]}'
except Exception as e:
msg = f"签到异常,原因为{str(e)}"
print(msg)
return msg
@staticmethod
def manga_sign(session, platform="android") -> dict:
"""
模拟B站漫画客户端签到
"""
try:
url = "https://manga.bilibili.com/twirp/activity.v1.Activity/ClockIn"
post_data = {"platform": platform}
ret = session.post(url=url, data=post_data).json()
if ret["code"] == 0:
msg = "签到成功"
elif ret["msg"] == "clockin clockin is duplicate":
msg = "今天已经签到过了"
else:
msg = f'签到失败,信息为({ret["msg"]})'
print(msg)
except Exception as e:
msg = f"签到异常,原因为: {str(e)}"
print(msg)
return msg
@staticmethod
def vip_privilege_receive(session, bili_jct, receive_type: int = 1) -> dict:
"""
领取B站大会员权益
receive_type int 权益类型1为B币劵2为优惠券
"""
url = "https://api.bilibili.com/x/vip/privilege/receive"
post_data = {"type": receive_type, "csrf": bili_jct}
ret = session.post(url=url, data=post_data).json()
return ret
@staticmethod
def vip_manga_reward(session) -> dict:
"""获取漫画大会员福利"""
url = "https://manga.bilibili.com/twirp/user.v1.User/GetVipReward"
ret = session.post(url=url, json={"reason_id": 1}).json()
return ret
@staticmethod
def report_task(session, bili_jct, aid: int, cid: int, progres: int = 300) -> dict:
"""
B站上报视频观看进度
aid int 视频av号
cid int 视频cid号
progres int 观看秒数
"""
url = "http://api.bilibili.com/x/v2/history/report"
post_data = {"aid": aid, "cid": cid, "progres": progres, "csrf": bili_jct}
ret = session.post(url=url, data=post_data).json()
return ret
@staticmethod
def share_task(session, bili_jct, aid) -> dict:
"""
分享指定av号视频
aid int 视频av号
"""
url = "https://api.bilibili.com/x/web-interface/share/add"
post_data = {"aid": aid, "csrf": bili_jct}
ret = session.post(url=url, data=post_data).json()
return ret
@staticmethod
def get_followings(
session,
uid: int,
pn: int = 1,
ps: int = 50,
order: str = "desc",
order_type: str = "attention",
) -> dict:
"""
获取指定用户关注的up主
uid int 账户uid默认为本账户非登录账户只能获取20个*5
pn int 页码默认第一页
ps int 每页数量默认50
order str 排序方式默认desc
order_type 排序类型默认attention
"""
params = {
"vmid": uid,
"pn": pn,
"ps": ps,
"order": order,
"order_type": order_type,
}
url = "https://api.bilibili.com/x/relation/followings"
ret = session.get(url=url, params=params).json()
return ret
@staticmethod
def space_arc_search(
session,
uid: int,
pn: int = 1,
ps: int = 30,
tid: int = 0,
order: str = "pubdate",
keyword: str = "",
) -> dict:
"""
获取指定up主空间视频投稿信息
uid int 账户uid默认为本账户
pn int 页码默认第一页
ps int 每页数量默认50
tid int 分区 默认为0(所有分区)
order str 排序方式默认pubdate
keyword str 关键字默认为空
"""
params = {
"mid": uid,
"pn": pn,
"Ps": ps,
"tid": tid,
"order": order,
"keyword": keyword,
}
url = "https://api.bilibili.com/x/space/arc/search"
ret = session.get(url=url, params=params).json()
count = 2
data_list = [
{
"aid": one.get("aid"),
"cid": 0,
"title": one.get("title"),
"owner": one.get("author"),
}
for one in ret.get("data", {}).get("list", {}).get("vlist", [])[:count]
]
return data_list, count
@staticmethod
def elec_pay(session, bili_jct, uid: int, num: int = 50) -> dict:
"""
用B币给up主充电
uid int up主uid
num int 充电电池数量
"""
url = "https://api.bilibili.com/x/ugcpay/trade/elec/pay/quick"
post_data = {
"elec_num": num,
"up_mid": uid,
"otype": "up",
"oid": uid,
"csrf": bili_jct,
}
ret = session.post(url=url, data=post_data).json()
return ret
@staticmethod
def coin_add(
session, bili_jct, aid: int, num: int = 1, select_like: int = 1
) -> dict:
"""
给指定 av 号视频投币
aid int 视频av号
num int 投币数量
select_like int 是否点赞
"""
url = "https://api.bilibili.com/x/web-interface/coin/add"
post_data = {
"aid": aid,
"multiply": num,
"select_like": select_like,
"cross_domain": "true",
"csrf": bili_jct,
}
ret = session.post(url=url, data=post_data).json()
return ret
@staticmethod
def live_status(session) -> dict:
"""B站直播获取金银瓜子状态"""
url = "https://api.live.bilibili.com/pay/v1/Exchange/getStatus"
ret = session.get(url=url).json()
data = ret.get("data")
silver = data.get("silver", 0)
gold = data.get("gold", 0)
coin = data.get("coin", 0)
msg = [
{"name": "硬币数量", "value": coin},
{"name": "金瓜子数", "value": gold},
{"name": "银瓜子数", "value": silver},
]
return msg
@staticmethod
def get_region(session, rid=1, num=6) -> dict:
"""
获取 B站分区视频信息
rid int 分区号
num int 获取视频数量
"""
url = (
"https://api.bilibili.com/x/web-interface/dynamic/region?ps="
+ str(num)
+ "&rid="
+ str(rid)
)
ret = session.get(url=url).json()
data_list = [
{
"aid": one.get("aid"),
"cid": one.get("cid"),
"title": one.get("title"),
"owner": one.get("owner", {}).get("name"),
}
for one in ret.get("data", {}).get("archives", [])
]
return data_list
@staticmethod
def silver2coin(session, bili_jct) -> dict:
"""B站银瓜子换硬币"""
url = "https://api.live.bilibili.com/xlive/revenue/v1/wallet/silver2coin"
post_data = {"csrf": bili_jct}
ret = session.post(url=url, data=post_data).json()
return ret
def main(self):
bilibili_cookie = {
item.split("=")[0]: item.split("=")[1]
for item in self.check_item.get("cookie").split("; ")
}
bili_jct = bilibili_cookie.get("bili_jct")
coin_num = self.check_item.get("coin_num", 0)
coin_type = self.check_item.get("coin_type", 1)
silver2coin = self.check_item.get("silver2coin", False)
session = requests.session()
requests.utils.add_dict_to_cookiejar(session.cookies, bilibili_cookie)
session.headers.update(
{
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.64",
"Referer": "https://www.bilibili.com/",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
"Connection": "keep-alive",
}
)
success_count = 0
uname, uid, is_login, coin, vip_type, current_exp = self.get_nav(
session=session
)
if is_login:
manhua_msg = self.manga_sign(session=session)
live_msg = self.live_sign(session=session)
aid_list = self.get_region(session=session)
vip_privilege_my_ret = self.vip_privilege_my(session=session)
welfare_list = vip_privilege_my_ret.get("data", {}).get("list", [])
for welfare in welfare_list:
if welfare.get("state") == 0 and welfare.get("vip_type") == vip_type:
vip_privilege_receive_ret = self.vip_privilege_receive(
session=session,
bili_jct=bili_jct,
receive_type=welfare.get("type"),
)
print(vip_privilege_receive_ret)
coins_av_count = len(
list(
filter(
lambda x: x["reason"] == "视频投币奖励",
self.get_today_exp(session=session),
)
)
)
coin_num = coin_num - coins_av_count
coin_num = coin_num if coin_num < coin else coin
if coin_type == 1:
following_list = self.get_followings(session=session, uid=uid)
count = 0
for following in following_list.get("data", {}).get("list"):
mid = following.get("mid")
if mid:
tmplist, tmpcount = self.space_arc_search(
session=session, uid=mid
)
aid_list += tmplist
count += tmpcount
if count > coin_num:
print("已获取足够关注用户的视频")
break
else:
aid_list += self.get_region(session=session)
for one in aid_list[::-1]:
print(one)
if coin_num > 0:
for aid in aid_list[::-1]:
ret = self.coin_add(
session=session, aid=aid.get("aid"), bili_jct=bili_jct
)
if ret["code"] == 0:
coin_num -= 1
print(f'成功给{aid.get("title")}投一个币')
success_count += 1
elif ret["code"] == 34005:
print(f'投币{aid.get("title")}失败,原因为{ret["message"]}')
continue
# -104 硬币不够了 -111 csrf 失败 34005 投币达到上限
else:
print(f'投币{aid.get("title")}失败,原因为{ret["message"]},跳过投币')
break
if coin_num <= 0:
break
coin_msg = f"今日成功投币{success_count + coins_av_count}/{self.check_item.get('coin_num', 5)}"
else:
coin_msg = (
f"今日成功投币{coins_av_count}/{self.check_item.get('coin_num', 5)}"
)
aid = aid_list[0].get("aid")
cid = aid_list[0].get("cid")
title = aid_list[0].get("title")
report_ret = self.report_task(
session=session, bili_jct=bili_jct, aid=aid, cid=cid
)
if report_ret.get("code") == 0:
report_msg = f"观看《{title}》300秒"
else:
report_msg = "任务失败"
share_ret = self.share_task(session=session, bili_jct=bili_jct, aid=aid)
if share_ret.get("code") == 0:
share_msg = f"分享《{title}》成功"
else:
share_msg = "分享失败"
print(share_msg)
s2c_msg = "不兑换硬币"
if silver2coin:
silver2coin_ret = self.silver2coin(session=session, bili_jct=bili_jct)
s2c_msg = silver2coin_ret["message"]
if silver2coin_ret["code"] != 0:
print(s2c_msg)
else:
s2c_msg = ""
live_stats = self.live_status(session=session)
uname, uid, is_login, new_coin, vip_type, new_current_exp = self.get_nav(
session=session
)
today_exp = sum(
map(lambda x: x["delta"], self.get_today_exp(session=session))
)
update_data = (28800 - new_current_exp) // (today_exp if today_exp else 1)
msg = [
{"name": "帐号信息", "value": uname},
{"name": "漫画签到", "value": manhua_msg},
{"name": "直播签到", "value": live_msg},
{"name": "登陆任务", "value": "今日已登陆"},
{"name": "观看视频", "value": report_msg},
{"name": "分享任务", "value": share_msg},
{"name": "瓜子兑换", "value": s2c_msg},
{"name": "投币任务", "value": coin_msg},
{"name": "今日经验", "value": today_exp},
{"name": "当前经验", "value": new_current_exp},
{"name": "升级还需", "value": f"{update_data}"},
] + live_stats
msg = "\n".join([f"{one.get('name')}: {one.get('value')}" for one in msg])
return msg
if __name__ == "__main__":
with open(
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.json"),
encoding="utf-8",
) as f:
datas = json.loads(f.read())
_check_item = datas.get("BILIBILI", [])[0]
print(BiliBili(check_item=_check_item).main())

1841
chaoxinwen.js Normal file

File diff suppressed because it is too large Load Diff

68
enshan.py Normal file
View File

@ -0,0 +1,68 @@
import json
import os
import re
import requests
import urllib3
from dailycheckin import CheckIn
urllib3.disable_warnings()
class EnShan(CheckIn):
name = "恩山无线论坛"
def __init__(self, check_item):
self.check_item = check_item
@staticmethod
def sign(cookie):
msg = []
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.125 Safari/537.36",
"Cookie": cookie,
}
response = requests.get(
url="https://www.right.com.cn/FORUM/home.php?mod=spacecp&ac=credit&showcredit=1",
headers=headers,
verify=False,
)
try:
coin = re.findall("恩山币: </em>(.*?)&nbsp;", response.text)[0]
point = re.findall("<em>积分: </em>(.*?)<span", response.text)[0]
msg = [
{
"name": "恩山币",
"value": coin,
},
{
"name": "积分",
"value": point,
},
]
except Exception as e:
msg = [
{
"name": "签到失败",
"value": str(e),
}
]
return msg
def main(self):
cookie = self.check_item.get("cookie")
msg = self.sign(cookie=cookie)
msg = "\n".join([f"{one.get('name')}: {one.get('value')}" for one in msg])
return msg
if __name__ == "__main__":
with open(
os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.json"),
encoding="utf-8",
) as f:
datas = json.loads(f.read())
_check_item = datas.get("ENSHAN", [])[0]
print(EnShan(check_item=_check_item).main())

603
hongxingerke.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -22,9 +22,9 @@ let msg = "";
//let hostname = 'https://' + host;
// ==================================异步顺序==============================================================================
!(async () => {
await getNotice(); //远程通知
//await getNotice(); //远程通知
await getVersion("yang7758258/ohhh154@main/好奇车生活.js");
//await getVersion("yang7758258/ohhh154@main/好奇车生活.js");
await main();//主函数
await SendMsg(msg); //发送通知

310
jlqc.js

File diff suppressed because one or more lines are too long

349
liyingyunjie.js Normal file

File diff suppressed because one or more lines are too long

907
piaopiaochaoshi.js Normal file
View File

@ -0,0 +1,907 @@
/*
朴朴超市 v1.01每天跑一两次即可
使用扫码或自己想办法捉refreshToken
扫码获取token: (先微信进入朴朴超市小程序并登录注册过账号再扫码)
https://service.leafxxx.win/pupu/login.html
把获取的refreshToken和备注(非必须)填到文件pupuCookie.txt里(第一次运行会自动创建), 多账号换行或&@隔开
export pupuCookie="refreshToken#备注"
cron: 26 8,19 * * *
const $ = new Env("朴朴超市");
*/
//Sat Jan 25 2025 08:19:48 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const _0x37cb99 = _0x128935("朴朴超市"),
_0x2561d9 = require("fs"),
_0x493a69 = require("got"),
_0x5e14f3 = "pupu",
_0x464627 = _0x5e14f3 + "Cookie.txt",
_0x10d311 = 20000,
_0x229b73 = 3,
_0x452dab = 1.01,
_0x13e27e = "pupu",
_0x198ea4 = "https://leafxcy.coding.net/api/user/leafxcy/project/validcode/shared-depot/validCode/git/blob/master/code.json",
_0x4b9874 = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.46(0x18002e2c) NetType/WIFI Language/zh_CN miniProgram/wx122ef876a7132eb4",
_0x5b285d = 2000,
_0x592e57 = 5;
class _0x5dc3bb {
constructor() {
this.index = _0x37cb99.userIdx++;
this.name = "";
this.valid = false;
const _0x342f7b = {
"limit": 0
},
_0x260c9f = {
"Connection": "keep-alive"
},
_0x183859 = {
"retry": _0x342f7b,
"timeout": _0x10d311,
"followRedirect": false,
"headers": _0x260c9f
};
this.got = _0x493a69.extend(_0x183859);
}
["get_prefix"](_0x466d81 = {}) {
var _0x25bcfe = "",
_0x58253a = _0x37cb99.userCount.toString().length;
if (this.index) {
_0x25bcfe += "账号[" + _0x37cb99.padStr(this.index, _0x58253a) + "]";
}
this.name && (_0x25bcfe += "[" + this.name + "]");
return _0x25bcfe;
}
["log"](_0x2823be, _0x505d2b = {}) {
let _0x58575f = this.get_prefix();
_0x37cb99.log(_0x58575f + _0x2823be, _0x505d2b);
}
async ["request"](_0x255811) {
const _0x294299 = ["RequestError"],
_0x3a5f49 = ["TimeoutError"];
let _0x32629d = _0x37cb99.copy(_0x255811),
_0x5c5716 = {};
try {
let _0x18c492 = null,
_0x79cf4 = 0,
_0xb07dc5 = _0x32629d.fn || _0x32629d.url,
_0x2273dc = _0x32629d.valid_code || [200];
if (_0x32629d.form) {
for (let _0x44c099 in _0x32629d.form) {
typeof _0x32629d.form[_0x44c099] == "object" && (_0x32629d.form[_0x44c099] = JSON.stringify(_0x32629d.form[_0x44c099]));
}
}
_0x32629d.method = _0x32629d?.["method"]?.["toUpperCase"]() || "GET";
if (_0x32629d.searchParams) {
for (let _0x1849ad in _0x32629d.searchParams) {
typeof _0x32629d.searchParams[_0x1849ad] == "object" && (_0x32629d.searchParams[_0x1849ad] = JSON.stringify(_0x32629d.searchParams[_0x1849ad]));
}
}
let _0x57abb8 = _0x32629d.got_client || this.got;
_0x32629d.debug_in && console.log(_0x32629d);
while (_0x79cf4 < _0x229b73) {
{
if (_0x79cf4 > 0) {
{
await _0x37cb99.wait(_0x5b285d * _0x79cf4);
let _0x206c9d = _0x37cb99.get(_0x32629d, "retryer", null);
if (_0x206c9d) {
{
let _0xea2977 = _0x37cb99.get(_0x32629d, "retryer_opt", {});
await _0x206c9d(_0x32629d, _0xea2977);
}
}
}
}
_0x79cf4++;
let _0x4099ee = null;
try {
{
let _0x53cb34 = Number(_0x32629d?.["timeout"]?.["request"] || _0x32629d?.["timeout"] || _0x10d311),
_0xc7e067 = false,
_0x4c54be = Date.now(),
_0x2cebd4 = _0x57abb8(_0x32629d),
_0x47999c = setTimeout(() => {
_0xc7e067 = true;
_0x2cebd4.cancel();
}, _0x53cb34);
await _0x2cebd4.then(_0x35805b => {
_0x18c492 = _0x35805b;
}, _0x588975 => {
_0x4099ee = _0x588975;
_0x18c492 = _0x588975.response;
}).finally(() => clearTimeout(_0x47999c));
let _0x4208c7 = Date.now(),
_0x5964c4 = _0x4208c7 - _0x4c54be,
_0x367073 = _0x18c492?.["statusCode"] || null;
if (_0xc7e067 || _0x3a5f49.includes(_0x4099ee?.["name"])) {
let _0x51e18e = "";
_0x4099ee?.["code"] && (_0x51e18e += "(" + _0x4099ee.code, _0x4099ee?.["event"] && (_0x51e18e += ":" + _0x4099ee.event), _0x51e18e += ")");
this.log("[" + _0xb07dc5 + "]请求超时" + _0x51e18e + "(" + _0x5964c4 + "ms),重试第" + _0x79cf4 + "次");
} else {
if (_0x294299.includes(_0x4099ee?.["name"])) this.log("[" + _0xb07dc5 + "]请求错误(" + _0x4099ee.code + ")(" + _0x5964c4 + "ms),重试第" + _0x79cf4 + "次"); else {
if (_0x367073) _0x4099ee && !_0x2273dc.includes(_0x367073) && this.log("请求[" + _0xb07dc5 + "]返回[" + _0x367073 + "]"); else {
{
let {
code = "unknown",
name = "unknown"
} = _0x4099ee || {};
this.log("请求[" + _0xb07dc5 + "]错误[" + code + "][" + name + "]");
}
}
break;
}
}
}
} catch (_0x331f48) {
this.log("[" + _0xb07dc5 + "]请求错误(" + _0x331f48.message + "),重试第" + _0x79cf4 + "次");
}
}
}
if (_0x18c492 === null || _0x18c492 === undefined) {
const _0x101fe9 = {
"statusCode": -1,
"headers": null,
"result": null
};
return _0x101fe9;
}
let {
statusCode: _0x222546,
headers: _0x1c90a6,
body: _0x8a6fcb
} = _0x18c492,
_0x3dfa2d = _0x37cb99.get(_0x32629d, "decode_json", true);
if (_0x8a6fcb && _0x3dfa2d) try {
_0x8a6fcb = JSON.parse(_0x8a6fcb);
} catch { }
const _0x599d2a = {
"statusCode": _0x222546,
"headers": _0x1c90a6,
"result": _0x8a6fcb
};
_0x5c5716 = _0x599d2a;
_0x32629d.debug_out && console.log(_0x5c5716);
} catch (_0x1f4ea0) {
console.log(_0x1f4ea0);
} finally {
return _0x5c5716;
}
}
}
let _0x2f36fb = new _0x5dc3bb();
class _0x5f4758 extends _0x5dc3bb {
constructor(_0xd62677) {
super();
let _0x437f12 = _0xd62677.split("#");
this.refresh_token = _0x437f12[0];
this.remark = _0x437f12?.[1] || "";
this.team_code = "";
this.team_need_help = false;
this.team_can_help = true;
this.team_max_help = 0;
this.team_helped_count = 0;
const _0x3b21d0 = {
"User-Agent": _0x4b9874
},
_0x3cc29f = {
"headers": _0x3b21d0
};
this.got = this.got.extend(_0x3cc29f);
}
async ["user_refresh_token"](_0x3f839b = {}) {
let _0x57f045 = false;
try {
const _0xcfd606 = {
"refresh_token": this.refresh_token
},
_0x129563 = {
"fn": "user_refresh_token",
"method": "put",
"url": "https://cauth.pupuapi.com/clientauth/user/refresh_token",
"json": _0xcfd606
};
let {
result: _0x17b9bc,
statusCode: _0x552fe2
} = await this.request(_0x129563),
_0xa4b7a2 = _0x37cb99.get(_0x17b9bc, "errcode", _0x552fe2);
if (_0xa4b7a2 == 0) {
this.valid = true;
let {
access_token: _0x18168d,
refresh_token: _0x6e7d9c,
user_id: _0x5aa331,
nick_name: _0x1e294a
} = _0x17b9bc?.["data"];
this.access_token = _0x18168d;
this.refresh_token = _0x6e7d9c;
this.user_id = _0x5aa331;
this.name = this.remark || _0x1e294a;
this.got = this.got.extend({
"headers": {
"Authorization": "Bearer " + _0x18168d,
"pp-userid": _0x5aa331
}
});
_0x57f045 = true;
await this.user_info();
_0x163725();
} else {
{
let _0x1ee005 = _0x37cb99.get(_0x17b9bc, "errmsg", "");
this.log("刷新token失败[" + _0xa4b7a2 + "]: " + _0x1ee005);
}
}
} catch (_0x16f7bf) {
console.log(_0x16f7bf);
} finally {
return _0x57f045;
}
}
async ["user_info"](_0x37e9d7 = {}) {
try {
{
const _0x41f1e7 = {
"fn": "user_info",
"method": "get",
"url": "https://cauth.pupuapi.com/clientauth/user/info"
};
let {
result: _0x282576,
statusCode: _0x2322fa
} = await this.request(_0x41f1e7),
_0x37b606 = _0x37cb99.get(_0x282576, "errcode", _0x2322fa);
if (_0x37b606 == 0) {
{
let {
phone: _0x3a0b9d,
invite_code: _0x5d7d43
} = _0x282576?.["data"];
this.phone = _0x3a0b9d;
this.name = this.remark || _0x3a0b9d || this.name;
this.invite_code = _0x5d7d43;
this.log("登录成功");
}
} else {
{
let _0x1de728 = _0x37cb99.get(_0x282576, "errmsg", "");
this.log("查询用户信息失败[" + _0x37b606 + "]: " + _0x1de728);
}
}
}
} catch (_0x25386f) {
console.log(_0x25386f);
}
}
async ["near_location_by_city"](_0xd9db95 = {}) {
try {
let _0x590682 = {
"fn": "near_location_by_city",
"method": "get",
"url": "https://j1.pupuapi.com/client/store/place/near_location_by_city/v2",
"searchParams": {
"lng": "119.31" + _0x37cb99.randomString(4, _0x37cb99.ALL_DIGIT),
"lat": "26.06" + _0x37cb99.randomString(4, _0x37cb99.ALL_DIxxx)
}
},
{
result: _0x497e92,
statusCode: _0x4904b7
} = await this.request(_0x590682),
_0x51d54e = _0x37cb99.get(_0x497e92, "errcode", _0x4904b7);
if (_0x51d54e == 0) {
let _0x17d37e = _0x497e92?.["data"];
this.location = _0x37cb99.randomList(_0x17d37e);
let {
service_store_id: _0x21f4da,
city_zip: _0x47ff14,
lng_x: _0x354923,
lat_y: _0x56e13f
} = this.location;
this.store_id = _0x21f4da;
this.zip = _0x47ff14;
this.lng = _0x354923;
this.lat = _0x56e13f;
const _0x21dcb6 = {
"pp_storeid": _0x21f4da,
"pp-cityzip": _0x47ff14
},
_0x3653b1 = {
"headers": _0x21dcb6
};
this.got = this.got.extend(_0x3653b1);
} else {
let _0x486379 = _0x37cb99.get(_0x497e92, "errmsg", "");
this.log("选取随机地点失败[" + _0x51d54e + "]: " + _0x486379);
}
} catch (_0x42ba02) {
console.log(_0x42ba02);
}
}
async ["sign_index"](_0x1df67a = {}) {
try {
{
const _0x40887f = {
"fn": "sign_index",
"method": "get",
"url": "https://j1.pupuapi.com/client/game/sign/v2/index"
};
let {
result: _0x436794,
statusCode: _0x1e17d9
} = await this.request(_0x40887f),
_0x2f89de = _0x37cb99.get(_0x436794, "errcode", _0x1e17d9);
if (_0x2f89de == 0) {
let {
is_signed: _0x27aff5
} = _0x436794?.["data"];
_0x27aff5 ? this.log("今天已签到") : await this.do_sign();
} else {
let _0x2eb155 = _0x37cb99.get(_0x436794, "errmsg", "");
this.log("查询签到信息失败[" + _0x2f89de + "]: " + _0x2eb155);
}
}
} catch (_0x426dcb) {
console.log(_0x426dcb);
}
}
async ["do_sign"](_0x27be4a = {}) {
try {
{
const _0x47dfdc = {
"supplement_id": ""
},
_0x524760 = {
"fn": "do_sign",
"method": "post",
"url": "https://j1.pupuapi.com/client/game/sign/v2",
"searchParams": _0x47dfdc
};
let {
result: _0x26654d,
statusCode: _0x4a962a
} = await this.request(_0x524760),
_0x4dc165 = _0x37cb99.get(_0x26654d, "errcode", _0x4a962a);
if (_0x4dc165 == 0) {
let {
daily_sign_coin: _0x396d3a,
coupon_list = []
} = _0x26654d?.["data"],
_0x36902b = [];
_0x36902b.push(_0x396d3a + "积分");
for (let _0x38da97 of coupon_list) {
let _0x47bcc8 = (_0x38da97.condition_amount / 100).toFixed(2),
_0x1f50ce = (_0x38da97.discount_amount / 100).toFixed(2);
_0x36902b.push("满" + _0x47bcc8 + "减" + _0x1f50ce + "券");
}
this.log("签到成功: " + _0x36902b.join(", "));
} else {
let _0x186f1e = _0x37cb99.get(_0x26654d, "errmsg", "");
this.log("签到失败[" + _0x4dc165 + "]: " + _0x186f1e);
}
}
} catch (_0x2f2635) {
console.log(_0x2f2635);
}
}
async ["get_team_code"](_0x5a9711 = {}) {
try {
const _0x594529 = {
"fn": "get_team_code",
"method": "post",
"url": "https://j1.pupuapi.com/client/game/coin_share/team"
};
let {
result: _0x180ac5,
statusCode: _0x2f6b4a
} = await this.request(_0x594529),
_0x5663a6 = _0x37cb99.get(_0x180ac5, "errcode", _0x2f6b4a);
if (_0x5663a6 == 0) {
this.team_code = _0x180ac5?.["data"] || "";
await this.check_my_team();
} else {
let _0x18bee7 = _0x37cb99.get(_0x180ac5, "errmsg", "");
this.log("获取组队码失败[" + _0x5663a6 + "]: " + _0x18bee7);
}
} catch (_0x40a25c) {
console.log(_0x40a25c);
}
}
async ["check_my_team"](_0x4cfbe7 = {}) {
try {
const _0x52ef47 = {
"fn": "check_my_team",
"method": "get",
"url": "https://j1.pupuapi.com/client/game/coin_share/teams/" + this.team_code
};
let {
result: _0x109ef3,
statusCode: _0x59e5ac
} = await this.request(_0x52ef47),
_0x50be1f = _0x37cb99.get(_0x109ef3, "errcode", _0x59e5ac);
if (_0x50be1f == 0) {
let {
status: _0x568d34,
target_team_member_num: _0x35b6d0,
current_team_member_num: _0x4dbf5e,
current_user_reward_coin: _0xb760e0
} = _0x109ef3?.["data"];
switch (_0x568d34) {
case 10:
{
this.team_need_help = true;
this.team_max_help = _0x35b6d0;
this.team_helped_count = _0x4dbf5e;
this.log("组队未完成: " + _0x4dbf5e + "/" + _0x35b6d0);
break;
}
case 30:
{
{
this.log("已组队成功, 获得了" + _0xb760e0 + "积分");
break;
}
}
default:
{
this.log("组队状态[" + _0x568d34 + "]");
this.log(": " + JSON.stringify(_0x109ef3?.["data"]));
}
}
} else {
let _0x14267a = _0x37cb99.get(_0x109ef3, "errmsg", "");
this.log("查询组队信息失败[" + _0x50be1f + "]: " + _0x14267a);
}
} catch (_0x449624) {
console.log(_0x449624);
}
}
async ["join_team"](_0xe8e195, _0x2413f5 = {}) {
try {
const _0xba4af9 = {
"fn": "join_team",
"method": "post",
"url": "https://j1.pupuapi.com/client/game/coin_share/teams/" + _0xe8e195.team_code + "/join"
};
let {
result: _0x24d532,
statusCode: _0x5158c4
} = await this.request(_0xba4af9),
_0x6bd189 = _0x37cb99.get(_0x24d532, "errcode", _0x5158c4);
if (_0x6bd189 == 0) {
this.team_can_help = false;
_0xe8e195.team_helped_count += 1;
this.log("加入账号[" + _0xe8e195.index + "][" + _0xe8e195.name + "]队伍成功: " + _0xe8e195.team_helped_count + "/" + _0xe8e195.team_max_help);
_0xe8e195.team_helped_count >= _0xe8e195.team_max_help && (_0xe8e195.team_need_help = false, _0xe8e195.log("组队已满"));
} else {
let _0x2679d1 = _0x37cb99.get(_0x24d532, "errmsg", "");
this.log("加入账号[" + _0xe8e195.index + "][" + _0xe8e195.name + "]队伍失败[" + _0x6bd189 + "]: " + _0x2679d1);
switch (_0x6bd189) {
case 100007:
{
_0xe8e195.team_need_help = false;
break;
}
case 100009:
{
this.team_can_help = false;
break;
}
}
}
} catch (_0x3628ee) {
console.log(_0x3628ee);
}
}
async ["query_coin"](_0x58cb1c = {}) {
try {
const _0x4dbbef = {
"fn": "query_coin",
"method": "get",
"url": "https://j1.pupuapi.com/client/coin"
};
let {
result: _0x5005ab,
statusCode: _0x3eff61
} = await this.request(_0x4dbbef),
_0x1a1a65 = _0x37cb99.get(_0x5005ab, "errcode", _0x3eff61);
if (_0x1a1a65 == 0) {
let {
balance: _0xbc080f,
expiring_coin: _0x765d14,
expire_time: _0x5ac40e
} = _0x5005ab?.["data"];
const _0x256dad = {
"notify": true
};
this.log("朴分: " + _0xbc080f, _0x256dad);
if (_0x765d14 && _0x5ac40e) {
let _0xc30380 = _0x37cb99.time("yyyy-MM-dd", _0x5ac40e);
const _0x4aecf0 = {
"notify": true
};
this.log("有" + _0x765d14 + "朴分将于" + _0xc30380 + "过期", _0x4aecf0);
}
} else {
let _0x4e9401 = _0x37cb99.get(_0x5005ab, "errmsg", "");
const _0x7aa566 = {
"notify": true
};
this.log("查询朴分失败[" + _0x1a1a65 + "]: " + _0x4e9401, _0x7aa566);
}
} catch (_0x2555f1) {
console.log(_0x2555f1);
}
}
async ["userTask"](_0x148947 = {}) {
await this.user_info();
await this.near_location_by_city();
await this.sign_index();
await this.get_team_code();
}
}
function _0x3a159d() {
if (_0x2561d9.existsSync("./" + _0x464627)) {
{
const _0x3873e5 = {
"flag": "r",
"encoding": "utf-8"
};
let _0x8b4d57 = _0x2561d9.readFileSync("./" + _0x464627, _0x3873e5);
_0x8b4d57 = _0x8b4d57?.["replace"](/\r/g, "")?.["split"]("\n")?.["filter"](_0x147e39 => _0x147e39) || [];
for (let _0x38c8a8 of _0x8b4d57) {
_0x37cb99.userList.push(new _0x5f4758(_0x38c8a8));
}
}
} else {
const _0x512a6f = {
"flag": "w",
"encoding": "utf-8"
};
_0x2561d9.writeFileSync("./" + _0x464627, "", _0x512a6f);
_0x37cb99.log("CK文件[" + _0x464627 + "]不存在, 默认为你新建一个, 如有需要请填入ck");
}
_0x37cb99.userCount = _0x37cb99.userList.length;
if (!_0x37cb99.userCount) {
const _0x571655 = {
"notify": true
};
_0x37cb99.log("未找到变量,请检查文件[" + _0x464627 + "]", _0x571655);
return false;
}
_0x37cb99.log("共找到" + _0x37cb99.userCount + "个账号");
return true;
}
function _0x163725() {
let _0x197ba7 = [];
for (let _0x100649 of _0x37cb99.userList) {
let _0xe8f3c8 = _0x100649.remark || _0x100649.mobile || _0x100649.name || "",
_0x5c22cf = _0x100649.refresh_token;
_0x197ba7.push(_0x5c22cf + "#" + _0xe8f3c8);
}
if (_0x197ba7.length) {
{
const _0x5001d9 = {
"flag": "w",
"encoding": "utf-8"
};
_0x2561d9.writeFileSync("./" + _0x464627, _0x197ba7.join("\n"), _0x5001d9);
}
}
}
!(async () => {
if (!_0x3a159d()) return;
_0x37cb99.log("\n------------------- 登录 -------------------");
for (let _0x4bce87 of _0x37cb99.userList) {
await _0x4bce87.user_refresh_token();
}
let _0x2bff96 = _0x37cb99.userList.filter(_0x46c21f => _0x46c21f.valid);
_0x37cb99.log("\n------------------- 签到组队 -------------------");
for (let _0x1aba85 of _0x2bff96) {
await _0x1aba85.userTask();
}
_0x37cb99.log("\n------------------- 助力 -------------------");
for (let _0x2919b6 of _0x2bff96.filter(_0x191825 => _0x191825.team_need_help)) {
for (let _0x4ffbb1 of _0x2bff96.filter(_0xb62fdc => _0xb62fdc.team_can_help && _0xb62fdc.index != _0x2919b6.index)) {
{
if (!_0x2919b6.team_need_help) break;
await _0x4ffbb1.join_team(_0x2919b6);
}
}
}
_0x37cb99.log("\n------------------- 查询 -------------------");
for (let _0xdb80ed of _0x2bff96) {
await _0xdb80ed.query_coin();
}
})().catch(_0x1b424f => _0x37cb99.log(_0x1b424f)).finally(() => _0x37cb99.exitNow());
async function _0x5d7660(_0x1b8190 = 0) {
let _0xdaab27 = false;
try {
const _0x27f9dc = {
"fn": "auth",
"method": "get",
"url": _0x198ea4,
"timeout": 20000
};
let {
statusCode: _0x52b798,
result: _0x1736ff
} = await _0x2f36fb.request(_0x27f9dc);
if (_0x52b798 != 200) return _0x1b8190++ < _0x592e57 && (_0xdaab27 = await _0x5d7660(_0x1b8190)), _0xdaab27;
if (_0x1736ff?.["code"] == 0) {
_0x1736ff = JSON.parse(_0x1736ff.data.file.data);
if (_0x1736ff?.["commonNotify"] && _0x1736ff.commonNotify.length > 0) {
{
const _0x5eb35d = {
"notify": true
};
_0x37cb99.log(_0x1736ff.commonNotify.join("\n") + "\n", _0x5eb35d);
}
}
_0x1736ff?.["commonMsg"] && _0x1736ff.commonMsg.length > 0 && _0x37cb99.log(_0x1736ff.commonMsg.join("\n") + "\n");
if (_0x1736ff[_0x13e27e]) {
let _0x512139 = _0x1736ff[_0x13e27e];
_0x512139.status == 0 ? _0x452dab >= _0x512139.version ? (_0xdaab27 = true, _0x37cb99.log(_0x512139.msg[_0x512139.status]), _0x37cb99.log(_0x512139.updateMsg), _0x37cb99.log("现在运行的脚本版本是:" + _0x452dab + ",最新脚本版本:" + _0x512139.latestVersion)) : _0x37cb99.log(_0x512139.versionMsg) : _0x37cb99.log(_0x512139.msg[_0x512139.status]);
} else _0x37cb99.log(_0x1736ff.errorMsg);
} else _0x1b8190++ < _0x592e57 && (_0xdaab27 = await _0x5d7660(_0x1b8190));
} catch (_0x15684c) {
_0x37cb99.log(_0x15684c);
} finally {
return _0xdaab27;
}
}
function _0x128935(_0x133fcf) {
return new class {
constructor(_0x22f2f1) {
this.name = _0x22f2f1;
this.startTime = Date.now();
const _0x4329c4 = {
"time": true
};
this.log("[" + this.name + "]开始运行\n", _0x4329c4);
this.notifyStr = [];
this.notifyFlag = true;
this.userIdx = 0;
this.userList = [];
this.userCount = 0;
this.default_timestamp_len = 13;
this.default_wait_interval = 1000;
this.default_wait_limit = 3600000;
this.default_wait_ahead = 0;
this.ALL_DIGIT = "0123456789";
this.ALL_ALPHABET = "qwertyuiopasdfghjklzxcvbnm";
this.ALL_CHAR = this.ALL_DIGIT + this.ALL_ALPHABET + this.ALL_ALPHABET.toUpperCase();
}
["log"](_0x5ed9bd, _0xa31129 = {}) {
{
const _0x40ab3a = {
"console": true
};
Object.assign(_0x40ab3a, _0xa31129);
if (_0x40ab3a.time) {
{
let _0x4158c7 = _0x40ab3a.fmt || "hh:mm:ss";
_0x5ed9bd = "[" + this.time(_0x4158c7) + "]" + _0x5ed9bd;
}
}
if (_0x40ab3a.notify) {
this.notifyStr.push(_0x5ed9bd);
}
_0x40ab3a.console && console.log(_0x5ed9bd);
}
}
["get"](_0x4a0197, _0x5bc0e3, _0x65088b = "") {
{
let _0x3a8752 = _0x65088b;
_0x4a0197?.["hasOwnProperty"](_0x5bc0e3) && (_0x3a8752 = _0x4a0197[_0x5bc0e3]);
return _0x3a8752;
}
}
["pop"](_0x5b3b03, _0x2e0b21, _0x26b148 = "") {
let _0x130cdb = _0x26b148;
_0x5b3b03?.["hasOwnProperty"](_0x2e0b21) && (_0x130cdb = _0x5b3b03[_0x2e0b21], delete _0x5b3b03[_0x2e0b21]);
return _0x130cdb;
}
["copy"](_0xb07980) {
return Object.assign({}, _0xb07980);
}
["read_env"](_0x2c60e8) {
let _0x339a04 = ckNames.map(_0x438ba7 => process.env[_0x438ba7]);
for (let _0x433e1a of _0x339a04.filter(_0x48e3b9 => !!_0x48e3b9)) {
for (let _0x18bd74 of _0x433e1a.split(envSplitor).filter(_0x4cea01 => !!_0x4cea01)) {
this.userList.push(new _0x2c60e8(_0x18bd74));
}
}
this.userCount = this.userList.length;
if (!this.userCount) {
{
const _0x3061bb = {
"notify": true
};
this.log("未找到变量,请检查变量" + ckNames.map(_0x208341 => "[" + _0x208341 + "]").join("或"), _0x3061bb);
return false;
}
}
this.log("共找到" + this.userCount + "个账号");
return true;
}
["time"](_0x52e5de, _0x4f7f33 = null) {
{
let _0x5f10bb = _0x4f7f33 ? new Date(_0x4f7f33) : new Date(),
_0x3f41ab = {
"M+": _0x5f10bb.getMonth() + 1,
"d+": _0x5f10bb.getDate(),
"h+": _0x5f10bb.getHours(),
"m+": _0x5f10bb.getMinutes(),
"s+": _0x5f10bb.getSeconds(),
"q+": Math.floor((_0x5f10bb.getMonth() + 3) / 3),
"S": this.padStr(_0x5f10bb.getMilliseconds(), 3)
};
/(y+)/.test(_0x52e5de) && (_0x52e5de = _0x52e5de.replace(RegExp.$1, (_0x5f10bb.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let _0x1b559f in _0x3f41ab) new RegExp("(" + _0x1b559f + ")").test(_0x52e5de) && (_0x52e5de = _0x52e5de.replace(RegExp.$1, 1 == RegExp.$1.length ? _0x3f41ab[_0x1b559f] : ("00" + _0x3f41ab[_0x1b559f]).substr(("" + _0x3f41ab[_0x1b559f]).length)));
return _0x52e5de;
}
}
async ["showmsg"]() {
{
if (!this.notifyFlag) return;
if (!this.notifyStr.length) return;
try {
var _0x22b9af = require("./sendNotify");
this.log("\n============== 推送 ==============");
await _0x22b9af.sendNotify(this.name, this.notifyStr.join("\n"));
} catch {
this.log("\n=================================");
this.log("读取推送依赖[sendNotify.js]失败, 请检查同目录下是否有依赖");
}
}
}
["padStr"](_0x4ae638, _0x1c7784, _0xe2f31e = {}) {
let _0x770f27 = _0xe2f31e.padding || "0",
_0x1d1c49 = _0xe2f31e.mode || "l",
_0x62f962 = String(_0x4ae638),
_0x20beba = _0x1c7784 > _0x62f962.length ? _0x1c7784 - _0x62f962.length : 0,
_0x172728 = "";
for (let _0x410f80 = 0; _0x410f80 < _0x20beba; _0x410f80++) {
_0x172728 += _0x770f27;
}
_0x1d1c49 == "r" ? _0x62f962 = _0x62f962 + _0x172728 : _0x62f962 = _0x172728 + _0x62f962;
return _0x62f962;
}
["json2str"](_0x2da2cd, _0x2b612b, _0x214672 = false) {
let _0x2ea7fe = [];
for (let _0x5b44d0 of Object.keys(_0x2da2cd).sort()) {
let _0x24381e = _0x2da2cd[_0x5b44d0];
_0x24381e && _0x214672 && (_0x24381e = encodeURIComponent(_0x24381e));
_0x2ea7fe.push(_0x5b44d0 + "=" + _0x24381e);
}
return _0x2ea7fe.join(_0x2b612b);
}
["str2json"](_0x84ca70, _0x258dfd = false) {
let _0x585f03 = {};
for (let _0x933506 of _0x84ca70.split("&")) {
{
if (!_0x933506) continue;
let _0x5e7143 = _0x933506.indexOf("=");
if (_0x5e7143 == -1) {
continue;
}
let _0x132718 = _0x933506.substr(0, _0x5e7143),
_0x27fab0 = _0x933506.substr(_0x5e7143 + 1);
_0x258dfd && (_0x27fab0 = decodeURIComponent(_0x27fab0));
_0x585f03[_0x132718] = _0x27fab0;
}
}
return _0x585f03;
}
["randomPattern"](_0xe4ee69, _0x307c10 = "abcdef0123456789") {
let _0x5a9be2 = "";
for (let _0x12c4d1 of _0xe4ee69) {
_0x12c4d1 == "x" ? _0x5a9be2 += _0x307c10.charAt(Math.floor(Math.random() * _0x307c10.length)) : _0x12c4d1 == "X" ? _0x5a9be2 += _0x307c10.charAt(Math.floor(Math.random() * _0x307c10.length)).toUpperCase() : _0x5a9be2 += _0x12c4d1;
}
return _0x5a9be2;
}
["randomUuid"]() {
return this.randomPattern("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
}
["randomString"](_0x1b0986, _0x86ce03 = "abcdef0123456789") {
let _0x523de8 = "";
for (let _0x1bb6dc = 0; _0x1bb6dc < _0x1b0986; _0x1bb6dc++) {
_0x523de8 += _0x86ce03.charAt(Math.floor(Math.random() * _0x86ce03.length));
}
return _0x523de8;
}
["randomList"](_0x40dcc2) {
{
let _0x4bf2a9 = Math.floor(Math.random() * _0x40dcc2.length);
return _0x40dcc2[_0x4bf2a9];
}
}
["wait"](_0xe226a) {
return new Promise(_0x4431b5 => setTimeout(_0x4431b5, _0xe226a));
}
async ["exitNow"]() {
await this.showmsg();
let _0x2902d9 = Date.now(),
_0x40d1e7 = (_0x2902d9 - this.startTime) / 1000;
this.log("");
const _0x2c3a93 = {
"time": true
};
this.log("[" + this.name + "]运行结束,共运行了" + _0x40d1e7 + "秒", _0x2c3a93);
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
process.exit(0);
}
["normalize_time"](_0x32340e, _0x664105 = {}) {
let _0x1ec72c = _0x664105.len || this.default_timestamp_len;
_0x32340e = _0x32340e.toString();
let _0x2315f8 = _0x32340e.length;
while (_0x2315f8 < _0x1ec72c) {
_0x32340e += "0";
}
_0x2315f8 > _0x1ec72c && (_0x32340e = _0x32340e.slice(0, 13));
return parseInt(_0x32340e);
}
async ["wait_until"](_0x1aa220, _0x1eb17d = {}) {
{
let _0xab0674 = _0x1eb17d.logger || this,
_0x5e3682 = _0x1eb17d.interval || this.default_wait_interval,
_0x2d5861 = _0x1eb17d.limit || this.default_wait_limit,
_0xf356ab = _0x1eb17d.ahead || this.default_wait_ahead;
if (typeof _0x1aa220 == "string" && _0x1aa220.includes(":")) {
{
if (_0x1aa220.includes("-")) _0x1aa220 = new Date(_0x1aa220).getTime(); else {
let _0x33b76b = this.time("yyyy-MM-dd ");
_0x1aa220 = new Date(_0x33b76b + _0x1aa220).getTime();
}
}
}
let _0x122583 = this.normalize_time(_0x1aa220) - _0xf356ab,
_0x49a222 = this.time("hh:mm:ss.S", _0x122583),
_0x344296 = Date.now();
_0x344296 > _0x122583 && (_0x122583 += 86400000);
let _0x4224c2 = _0x122583 - _0x344296;
if (_0x4224c2 > _0x2d5861) {
const _0x1110a1 = {
"time": true
};
_0xab0674.log("离目标时间[" + _0x49a222 + "]大于" + _0x2d5861 / 1000 + "秒,不等待", _0x1110a1);
} else {
const _0x496b47 = {
"time": true
};
_0xab0674.log("离目标时间[" + _0x49a222 + "]还有" + _0x4224c2 / 1000 + "秒,开始等待", _0x496b47);
while (_0x4224c2 > 0) {
let _0xfd1a7b = Math.min(_0x4224c2, _0x5e3682);
await this.wait(_0xfd1a7b);
_0x344296 = Date.now();
_0x4224c2 = _0x122583 - _0x344296;
}
const _0x183ff5 = {
"time": true
};
_0xab0674.log("已完成等待", _0x183ff5);
}
}
}
async ["wait_gap_interval"](_0x4982ab, _0x2439a0) {
let _0x5340bd = Date.now() - _0x4982ab;
_0x5340bd < _0x2439a0 && (await this.wait(_0x2439a0 - _0x5340bd));
}
}(_0x133fcf);
}

838
quanmianshidai.py Normal file
View File

@ -0,0 +1,838 @@
"""
项目 全棉时代种棉花
入口 #小程序://全棉时代
变量 code #token#备注 多账号换行
变量名 qmzmh
"""
import os
import requests
from datetime import datetime, timezone, timedelta
import json
import time
import random
# 配置参数
base_url = "https://hxxxy.gov.cn"
user_agent = "Mozilla/5.0 (Linux; Android 11; ONEPLUS A6000 Build/RKQ1.201217.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 XWEB/1160065 MMWEBSDK/20231201 MMWEBID/2930 MicroMessenger/8.0.45.2521(0x28002D3D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wxdfcaa44b1aa891a7"
def get_beijing_date():
beijing_time = datetime.now(timezone(timedelta(hours=8)))
return beijing_time.date()
def dq_time():
dqsj = int(time.time())
dysj = datetime.fromtimestamp(dqsj).strftime('%Y-%m-%d %H:%M:%S')
print("当前时间戳:", dqsj)
print("转换后的时间:", dysj)
return dqsj, dysj
def get_env_variable(var_name):
value = os.getenv(var_name)
if value is None:
print(f'环境变量{var_name}未设置,请检查。')
return None
accounts = value.strip().split('\n')
print(f'-----------本次账号运行数量:{len(accounts)}-----------')
print(f'------全棉时代种棉花-----1.2------')
return accounts
def create_headers(code, token):
headers = {
'host': 'sg01.purcotton.com',
'accept': 'application/json, text/plain, */*',
'app-id': 'wxdfcaa44b1aa891a7',
'user-agent': user_agent,
'content-type': 'application/json;charset=UTF-8',
'origin': 'https://sg01.purcotton.com',
'x-requested-with': 'com.tencent.mm',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'accept-encoding': 'gzip, deflate',
'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'cookie': 'sajssdk_2015_cross_new_user=1',
'code': code,
'token': token,
}
return headers
def jscz(code, token): # 浇水
# 调用hqid函数并获取树木ID及其他信息
tree_id, sunshine, total_sunshine = hqid(code, token)
if tree_id is not None:
#print(f"获得的树木ID: {tree_id}")
# 可以在这里打印阳光信息,如果需要
#print(f"当前阳光: {sunshine}, 总阳光: {total_sunshine}")
while True: # 开始一个无限循环
url = "https://sg01.purcotton.com/api/watering"
data = {"tree_user_id": tree_id, "water_cnt": 1} # 使用动态获取的树木ID
headers = create_headers(code, token)
#print(data)
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status()
response_data = response.json()
if response_data.get("code") == 200:
# 提取剩余水滴数
remaining_water = response_data["data"]["info"]["sy_water"]
print(f"剩余水滴数: {remaining_water}")
# 根据剩余水滴数决定是否继续
if remaining_water < 30: # 如果剩余水滴数小于30则停止
print("水滴不足,停止浇水。")
break
print("执行浇水操作...")
# 暂停1到3秒
time.sleep(random.randint(1, 3))
elif response_data.get("code") == 400:
print(response_data.get("msg", "未知错误"))
break # 遇到错误时停止循环
else:
print("未知的响应code:", response_data.get("code"))
print("完整响应:", response_data)
break # 如果响应码不是200或400停止循环
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
break # 请求异常时停止循环
else:
print("未能获取树木ID无法执行浇水操作。")
def llhmp(code, token, action, tid): # 添加了tid参数
phone, _ = login(code, token) # 调用login函数获取电话号码忽略user_id
url = "https://nmp.pureh2b.com/api/purcotton/completetask"
headers = {
'Host': 'nmp.pureh2b.com',
'XWeb-Xhr': '1',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'zh-CN,zh;q=0.9',
'code': code,
'token': token,
}
data = {
'action': action,
'phone': phone,
'from': 'guoyuan'
}
#print(data)
try:
response = requests.post(url, headers=headers, data=data)
response.raise_for_status()
response_data = response.json() # 解析响应数据为JSON
action_descriptions = {
'browse_venue': '逛甄选好棉品',
'browse_new_user_zone': '浏览新用户专区',
'browse_community': '社区送福利',
'subscibe': '订阅奖励提醒'
}
action_description = action_descriptions.get(action, '执行任务')
#print(f"执行任务 '{action_description}' 响应内容:", response.text) # 打印响应内容
if response_data.get("code") == 200:
print(f"{action_description} 任务成功,暂停一段时间再继续...")
time.sleep(random.randint(15, 20))
tjlq_mpjl(code, token, tid) # 在任务成功后调用领取奖励的函数
elif response_data.get("code") == 400:
#print() # 打印响应内容
print(f"{action_description} {response_data.get('msg')}")
#tjlq_mpjl(code, token, tid) # 在任务成功后调用领取奖励的函数
else:
print("{action_description} 收到未预期的响应,响应内容如下:")
print(response_data)
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
def tjlq_mpjl(code, token, tid): # 添加了tid参数来指定任务ID 提交 任务 领取奖励
url = "https://sg01.purcotton.com/api/task/receive-task-water"
headers = create_headers(code, token)
data = {"tid": tid} # 使用传入的任务ID
#print(data)
try:
response = requests.post(url, headers=headers, json=data) # 发送POST请求
response.raise_for_status() # 检查响应状态码
# 解析响应数据
response_data = response.json()
if response_data.get("code") == 200:
print("奖励领取成功。")
# 打印sy_water和get_water
data = response_data.get("data", {})
sy_water = data.get("sy_water", "未知") #
get_water = data.get("get_water", "未知") # 同上
print(f"剩余水量:{sy_water}, 获取水量:{get_water}")
else:
print(f"奖励领取失败,错误信息:{response_data.get('msg')}")
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
def task_list(code, token): # 任务列表
url = "https://sg01.purcotton.com/api/task/list"
headers = create_headers(code, token)
today_date = datetime.now().strftime("%Y-%m-%d") # 获取今天的日期格式为YYYY-MM-DD
# 任务ID到任务名称的映射
task_names = {
1: "签到, 1",
2: "不知道1, 0",
4: "三餐福袋, 3",
6: "逛甄选好棉品, 4",
10: "订阅奖励提醒, 1",
13: "浏览新用户, 2",
14: "庄园小课堂, 3",
15: "棉花工厂, 1",
16: "社区送福利, 1"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
response_data = response.json()
today_tasks = [] # 用于存储今天的任务信息
if response_data.get("code") == 200:
task_user_info = response_data.get("data", {}).get("task_user_info", [])
print("------任务进度条-----------")
for task in task_user_info:
task_id = task.get('task_id')
complete_num = task.get('complete_num')
complete_date = task.get('complete_date')
# 比较任务完成日期是否为今天
#print("------任务进度条-----------")
if complete_date == today_date:
task_name = task_names.get(task_id, f"未知任务 {task_id}") # 获取任务名称如果未知则显示未知任务和ID
print(f"任务ID: {task_id} {task_name}/{complete_num}, 任务时间: {complete_date}")
#print(f"{task_name}/{complete_num} 时间: {complete_date}")
today_tasks.append(task)
print("-----------------")
print()
return today_tasks
else:
print(f"获取任务列表失败,错误信息:{response_data.get('msg')}")
return []
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
return []
def pdrw(code, token): # 判断任务
"""根据任务完成情况执行任务"""
try:
task_user_info = task_list(code, token)
task_completion_limits = {
6: 4,# 任务ID为6的任务只能完成4次 逛甄选好棉品
13: 2, # 任务ID为13的任务只能完成2次 浏览新用户专区
15: 1, # 假设任务ID为15的任务只能完成1次 棉花工厂
4: 3, # 4 3次三餐福袋 7-12 14-17 18-22
16: 1, # ID 16 社区送福利
10: 1, # ID 10 订阅奖励提醒
14: 1, #ID14 #庄园小课堂
1: 1, #ID #签到
}
# 先检查所有指定的任务是否已经存在于任务列表中
existing_task_ids = [task['task_id'] for task in task_user_info]
#print(existing_task_ids)
# 遍历每个任务ID检查是否需要执行任务
for task_id, max_completes in task_completion_limits.items():
task_info = next((task for task in task_user_info if task['task_id'] == task_id), None)
if task_info:
complete_num = task_info['complete_num']
if complete_num < max_completes:
#print(f"任务ID: {task_id}, 当前完成次数: {complete_num}, 将执行任务并尝试领取奖励。")
print()
if task_id == 6:
llhmp(code, token, 'browse_venue', '6')
#today_water(code, token)
elif task_id == 13:
llhmp(code, token, 'browse_new_user_zone', '13')
today_water(code, token)
sj_yg(code, token)#收集阳光
syyg(code, token)#使用阳光
# 这里可以添加其他任务ID的逻辑
elif task_id == 15:
# 对于任务ID 15的特定处理
complete_task(code, token, '15')
elif task_id == 16:
llhmp(code, token, 'browse_community', '16')
elif task_id == 10:
llhmp(code, token, 'subscibe', '10')
elif task_id == 14:
hdwt_box(code, token, '14')
elif task_id == 4:
# 对于任务ID 15的特定处理
lq_fd(code, token, '4')
elif task_id == 1:
lq_fd(code, token, '1')
time.sleep(random.randint(1, 5))
elif task_id not in existing_task_ids:
#print(f"任务ID: {task_id}, 未在列表中,将尝试执行并领取奖励。")
print()
if task_id == 6:
llhmp(code, token, 'browse_venue', '6')
today_water(code, token)
elif task_id == 13:
llhmp(code, token, 'browse_new_user_zone', '13')
sj_yg(code, token)#收集阳光
syyg(code, token)#使用阳光
elif task_id == 15:
complete_task(code, token, '15')
elif task_id == 16:
llhmp(code, token, 'browse_community', '16')
elif task_id == 10:
llhmp(code, token, 'subscibe', '10')
elif task_id == 14:
hdwt_box(code, token, '14')
elif task_id == 1:
lq_fd(code, token, '1')
elif task_id == 4:
lq_fd(code, token, '4')
time.sleep(random.randint(1, 5))
# 添加其他任务ID和类型的逻辑
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
# 任务 数据
def complete_task(code, token, tid): # 棉花工厂
url = "https://sg01.purcotton.com/api/task/complete-manual-task"
headers = create_headers(code, token)
payload = {
"tid": tid,
"relate_id": 0,
}
try:
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() # 检查HTTP响应状态码如果不是200系列则抛出异常
# 解析响应数据
response_data = response.json()
if response_data.get("code") == 200:
print("奖励领取成功。")
tjlq_mpjl(code, token, tid)
else:
# 如果响应中的code不是200打印错误信息
print(f"任务失败:{response_data.get('msg')}")
except requests.exceptions.RequestException as e:
# 如果请求过程中发生异常,打印异常信息
print(f"请求失败: {e}")
def lq_fd(code, token, tid): # 三餐福袋和签到
# 确保tid为整数类型
tid = int(tid) # 将tid转换为整型以确保与整数进行比较
task_name = "未知任务"
if tid == 4:
task_name = "三餐福袋" #7-12 14-17 18-22
elif tid == 1:
task_name = "签到"
url = "https://sg01.purcotton.com/api/task/complete-task"
headers = create_headers(code, token)
data = {"tid": tid} # 使用传入的任务ID
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status() # 检查响应状态码
# 解析响应数据
response_data = response.json()
if response_data.get("code") == 200:
print(f"{task_name} 奖励领取成功。")
# 打印sy_water和get_water
data = response_data.get("data", {})
sy_water = data.get("sy_water", "未知")
get_water = data.get("get_water", "未知")
print(f"{task_name} 剩余水量:{sy_water}, 获取水量:{get_water}")
else:
print(f"{task_name}{response_data.get('msg')}")
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
# 任务 完
# 提取数据 开始
def hqid(code, token): # 获取树木ID和阳光信息
url = "https://sg01.purcotton.com/api/index"
headers = create_headers(code, token)
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
response_data = response.json()
# print("Response JSON:", response_data) # 用于调试
if response_data.get("code") == 200:
tree_data = response_data['data']['tree']
user_data = response_data['data']['user'] # 获取用户相关数据
# 获取树木ID
tree_id = tree_data.get('id')
# 获取阳光相关数据
sunshine = user_data.get('sunshine', 0) # 如果不存在则默认为0
total_sunshine = user_data.get('total_sunshine', 0) # 如果不存在则默认为0
# 可以选择打印这些信息
#print(f"树木ID: {tree_id} 当前阳光: {sunshine} 总阳光: {total_sunshine} ")
# 根据需要返回所需的数据,这里返回一个包含所有信息的元组
return tree_id, sunshine, total_sunshine
else:
print(f"请求失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}")
return None, None, None # 如果请求失败返回包含None的元组
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
return None, None, None # 如果发生异常返回包含None的元组
def login(code, token): # 提取的号码
url = "https://sg01.purcotton.com/api/login"
headers = create_headers(code, token)
data = {
"invite_source": "task",
"channel": "" # "channel": "zmh_assist"
}
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status() # 检查HTTP响应状态
response_data = response.json()
if response_data.get("code") == 200:
phone = response_data["data"]["phone"]
user_id = response_data["data"]["id"] # 提取id
#print("提取的电话号码:", phone)
#print("提取的用户ID:", user_id) # 打印id
return phone, user_id # 返回电话号码和用户ID
else:
print("请求失败,错误代码:", response_data.get("code"), "错误信息:", response_data.get("msg"))
return None, None
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
return None, None
# 提取数据 完
# 回答问题
def hdwt_box(code, token, tid): #庄园小课堂
url = "https://sg01.purcotton.com/api/answer"
headers = create_headers(code, token)
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
response_data = response.json()
exams = response_data.get("data", {}).get("exams", [])
#print(response.json())
for exam in exams:
exam_id = exam.get('id')
print(f"正在处理问题ID: {exam_id}")
# 这里是你提交答案的代码逻辑
url_submit_answer = "https://sg01.purcotton.com/api/answer/complete"
payload = {
"tid": tid, # 假设任务ID为14
"exam_id": exam_id,
"win": 1 # 假设标记为正确
}
submit_response = requests.post(url_submit_answer, headers=headers, json=payload)
submit_response.raise_for_status()
if submit_response.status_code == 200:
submit_response_data = submit_response.json()
#print(submit_response_data) # 打印完整的响应体
# 提取并打印get_water, complete_num, 和 box_id
get_water = submit_response_data.get("data", {}).get("get_water", 0)
complete_num = submit_response_data.get("data", {}).get("complete_num", 0)
box_id = submit_response_data.get("data", {}).get("box_id", 0)
print(f"获取水量:{get_water}, 完成数量:{complete_num}, 宝箱ID{box_id}")
# 如果box_id大于0则打开宝箱
if box_id > 0:
print(f"检测到宝箱ID: {box_id},尝试打开宝箱...")
url_open_box = "https://sg01.purcotton.com/api/answer/open-box"
box_payload = {"box_id": box_id}
box_response = requests.post(url_open_box, headers=headers, json=box_payload)
box_response.raise_for_status()
if box_response.status_code == 200:
box_response_data = box_response.json()
# print(f"宝箱 {box_id} 打开成功,响应内容:", box_response_data)
# 提取sy_water和get_water
sy_water = box_response_data.get("data", {}).get("sy_water", 0)
get_water = box_response_data.get("data", {}).get("get_water", 0)
print(f"宝箱 剩余水量:{sy_water}, 宝箱水量:{get_water}")
# 随机停止3-5秒
time.sleep(random.randint(3, 5))
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
def today_water(code, token):#
url = "https://sg01.purcotton.com/api/get-today-water"
headers = create_headers(code, token) # 确保 create_headers 函数正确定义并返回所需的头部信息
try:
response = requests.post(url, headers=headers)
response.raise_for_status() # 确保响应状态为200
# 解析响应体为JSON
response_data = response.json()
# 检查响应中的code字段
if response_data.get("code") == 200:
#print("完整响应体:", response_data) # 打印完整的响应体
# 提取所需数据
sy_water = response_data.get("data", {}).get("sy_water", "未知")
get_water = response_data.get("data", {}).get("get_water", "未知")
tomorrow_get_water_num = response_data.get("data", {}).get("tomorrow_get_water_num", "未知")
#print(f"剩余水量sy_water: {sy_water}")
print(f"今日获取水量: {get_water}")
print(f"明日可获取水量: {tomorrow_get_water_num}")
print(f"今日获取水量: {get_water} 明日可获取水量: {tomorrow_get_water_num}")
else:
# 打印错误消息
print(f"水瓶 {response_data.get('msg', '未知错误')}")
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
def cscscs(code, token):
url = "https://sg01.purcotton.com/api/statistics/store"
headers = create_headers(code, token)
_, user_id = login(code, token) # 调用login函数忽略电话号码只获取user_id
data = {
"uid": user_id,
"type": 301 # 确保这里的值符合API的要求
}
#print(data) # 打印整个响应数据
try:
response = requests.post(url, headers=headers, json=data)
response.raise_for_status() # 检查HTTP响应状态
response_data = response.json()
#print(response_data) # 打印整个响应数据
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
# 阳光
def sj_yg(code, token):
success = False
while not success:
url = "https://sg01.purcotton.com/api/get-sunshine"
headers = create_headers(code, token)
# 使用当前时间戳
payload = {"time": int(time.time() * 1000)}
#print(f"请求负载: {payload}")
try:
response = requests.post(url, headers=headers, json=payload)
response_data = response.json()
if response.status_code == 200:
if response_data["code"] == 200:
sy_sunshine = response_data['data'].get('sy_sunshine')
get_sunshine = response_data['data'].get('get_sunshine')
print(f"成功领取阳光: 剩余阳光: {sy_sunshine}, 获得阳光: {get_sunshine}")
success = True # 标记成功领取,退出循环
elif response_data["code"] == 400:
print("没有可领取的阳光")
break # 如果没有可领取的阳光,跳出循环
else:
print(f"阳光操作响应: {response_data}")
else:
print(f"请求失败HTTP状态码: {response.status_code}")
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
if success:
# 如果成功领取阳光则暂停1到3秒后继续
sleep_time = random.randint(1, 3)
print(f"暂停{sleep_time}秒后重新领取...")
time.sleep(sleep_time)
success = False # 重置成功标志,继续领取
def syyg(code, token):
"""当阳光值大于100时完成阳光任务"""
# 假设hqid返回树木IDsunshine和其他信息
_, sunshine, _ = hqid(code, token)
if sunshine > 99:
url = "https://sg01.purcotton.com/api/sunshine-task/complete-task"
headers = create_headers(code, token) # 使用create_headers函数创建请求头
payload = {"tid": 1} # 固定payload可能需要根据API文档调整
try:
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status() # 检查响应是否成功
response_data = response.json()
if response_data.get("code") == 200:
print("成功完成阳光任务。")
# 这里可以根据响应体进一步处理,如打印信息或记录日志
else:
print(f"完成阳光任务失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}")
except requests.exceptions.RequestException as e:
print(f"请求完成阳光任务时出错: {e}")
else:
print(f"阳光值未达到{sunshine}/100不执行任务。")
# 好友?
def hyid(code, token):
url = "https://sg01.purcotton.com/api/friend/list?page=1&page_size=50"
headers = create_headers(code, token)
try:
response = requests.get(url, headers=headers)
response.raise_for_status() # 确保响应状态为200
# 解析响应体为JSON
response_data = response.json()
friend_user_ids = [] # 用于存储符合条件的朋友的用户ID
if response_data.get("code") == 200:
friends_list = response_data.get("data", {}).get("list", [])
for friend in friends_list:
friend_user_id = friend.get("friend_user_id")
help_water_cnt = friend.get("help_water_cnt")
be_help_water_cnt = friend.get("friend_user_info", {}).get("be_help_water_cnt")
#print(f"朋友用户ID: {friend_user_id}, 帮忙浇水次数: {help_water_cnt}, 被帮忙浇水次数: {be_help_water_cnt}")
# 只有当帮忙浇水次数小于1时才收集该朋友的用户ID
if help_water_cnt < 1:
friend_user_ids.append(friend_user_id)
return friend_user_ids # 返回所有符合条件收集到的用户ID
else:
print("请求失败,错误代码:", response_data.get("code"), "错误信息:", response_data.get("msg"))
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
def access_friend_detail(code, token, friend_user_id):
"""访问朋友的详细信息,并尝试对其树进行浇水操作"""
url = "https://sg01.purcotton.com/api/friend/index"
headers = create_headers(code, token)
headers['friend-id'] = str(friend_user_id)
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
response_data = response.json()
if response_data.get("code") == 200:
tree_info = response_data.get('data', {}).get('tree', {})
if isinstance(tree_info, list) and tree_info:
tree_info = tree_info[0]
tree_id = tree_info.get('id') if isinstance(tree_info, dict) else None
help_water_info = response_data.get('data', {}).get('help_water', {})
help_water_code = help_water_info.get('code')
help_water_msg = help_water_info.get('msg')
#print(f"{friend_user_id}朋友树ID: {tree_id}, 帮忙浇水代码: {help_water_code}, 信息: '{help_water_msg}'")
if tree_id is not None:
success = water_friend_tree(code, token, tree_id, friend_user_id)
if not success:
print(f"由于操作失败,停止处理朋友{friend_user_id}的后续操作。")
return False
else:
print(f"获取朋友{friend_user_id}的详细信息失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}")
return False
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
return False
return True
def water_friend_tree(code, token, tree_id, friend_user_id):
"""执行给定朋友的树浇水操作"""
url = "https://sg01.purcotton.com/api/friend/water"
headers = create_headers(code, token)
payload = {"tree_user_id": tree_id}
headers['friend-id'] = str(friend_user_id)
try:
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
response_data = response.json()
#print(response_data) # 打印整个响应体,用于调试
if response_data["code"] == 200:
# 检查response_data['data']是否为字典,以此判断是否可以安全访问'info'
if isinstance(response_data['data'], dict):
use_water = response_data['data']['info'].get('use_water', '未知')
reward_water = response_data['data']['info'].get('reward_water', '未知')
print(f"对树ID {tree_id} 的浇水操作成功: 使用水量: {use_water}, 奖励水量: {reward_water}")
else:
# 如果data不是字典直接打印data字段这里可能是错误消息或其他说明
print(f"操作结果: {response_data['data']}")
return False
elif response_data["code"] == 400:
#print(f"{response_data.get('msg', '未知错误')}. 完整响应体: {response_data}")
print(f"{response_data.get('msg', '未知错误')}. ")
return False
else:
print(f"对树ID {tree_id} 的浇水操作响应: {response_data}")
return False
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
return False
return True
def process_all_friends(friends_user_ids, code, token):
"""遍历朋友列表,尝试对每个朋友的树进行浇水操作,并在首次失败时停止"""
for friend_user_id in friends_user_ids:
if not access_friend_detail(code, token, friend_user_id):
#print(f"由于操作失败,停止对所有后续朋友的处理。")
break # 遇到第一个失败,立即跳出循环
def main():
var_name = 'qmzmh'
tokens = get_env_variable(var_name)
if not tokens:
return
total_tokens = len(tokens)
if total_tokens > 20:
print("账号数量超过20个不执行操作。")
return
for index, token_info in enumerate(tokens, start=1):
parts = token_info.split('#')
if len(parts) < 2:
print("令牌格式不正确。跳过处理。")
continue
code = parts[0]
token = parts[1]
remark = parts[2] if len(parts) > 2 else ""
print()
print(f"------账号{index}/{total_tokens},备注: {remark}-------")
phone, user_id = login(code, token)
if phone and user_id: # 检查是否成功获取电话号码和用户ID
# 进行后续任务
cscscs(code, token)
#sj_yg(code, token)#收集阳光
#syyg(code, token)#使用阳光
jscz(code, token) #浇水
pdrw(code, token) #任务判断
friend_user_ids = hyid(code, token)
if friend_user_ids:
process_all_friends(friend_user_ids, code, token) # 正确传入朋友ID列表
else:
print("登录失败或获取用户信息失败,跳过当前账号的后续操作。")
if __name__ == "__main__":
main()
'''
def main():
var_name = 'qmzmh'
tokens = get_env_variable(var_name)
if not tokens:
return
total_tokens = len(tokens)
if total_tokens > 20:
print("账号数量超过20个不执行操作。")
return
for index, token_info in enumerate(tokens, start=1):
parts = token_info.split('#')
if len(parts) < 2:
print("令牌格式不正确。跳过处理。")
continue
code = parts[0]
token = parts[1]
remark = parts[2] if len(parts) > 2 else ""
print(f"------账号{index}/{total_tokens},备注: {remark}-------")
login(code, token)#判断要手机号码/提取的电话号码: 才运行下面的任务
cscscs(code, token)#更新
#sj_yg(code, token)#收集阳光
#syyg(code, token)#使用阳光
jscz(code, token) #浇水
pdrw(code, token) #任务判断
friend_user_ids = hyid(code, token)
if friend_user_ids:
process_all_friends(friend_user_ids, code, token) # 正确传入朋友ID列表
if __name__ == "__main__":
main()
'''

233
quanzhan.py Normal file
View File

@ -0,0 +1,233 @@
"""
小程序搜 泉站大桶订水桶装水同城送水
变量 authcode # authorization #备注 (没有备注 也可以运行)
变量名 qztoken
项目 泉站订水
"""
import os
import requests
from datetime import datetime, timezone, timedelta
import json
import sys
import time
import random
from io import StringIO
enable_notification =1 # 控制是否启用通知的变量 0 不发送 1 发
# 只有在需要发送通知时才尝试导入notify模块
if enable_notification == 1:
try:
from notify import send
except ModuleNotFoundError:
print("警告未找到notify.py模块。它不是一个依赖项请勿错误安装。程序将退出。")
sys.exit(1)
#---------解--的简化0.2框架--------
# 配置参数
base_url = "https://microuser.quanzhan888.com" # 实际的基础URL
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309080f)XWEB/8519"
def get_beijing_date(): # 获取北京日期的函数
beijing_time = datetime.now(timezone(timedelta(hours=8)))
return beijing_time.date()
def timestamp_to_beijing_time(timestamp):
utc_zone = timezone.utc
beijing_zone = timezone(timedelta(hours=8))
utc_time = datetime.fromtimestamp(timestamp, utc_zone)
beijing_time = utc_time.astimezone(beijing_zone)
return beijing_time.strftime("%Y-%m-%d %H:%M:%S")
def get_env_variable(var_name):
value = os.getenv(var_name)
if value is None:
print(f'环境变量{var_name}未设置,请检查。')
return None
accounts = value.strip().split('\n') # 使用 \n 分割
num_accounts = len(accounts)
print(f'-----------本次账号运行数量:{num_accounts}-----------')
print(f'泉站大桶订水--QGh3amllamll ')
return accounts
#113.28824159502027
#23.103660007697727
def fz_hs(auth_code, authorization, user_agent, sign): #封装headers
return {
'Host': 'microuser.quanzhan888.com',
'Connection': 'keep-alive',
'Content-Length': '2',
'charset': 'utf-8',
'product': "shop",
'authcode': auth_code,
'authorization': authorization,
'user-agent': user_agent,
'sign': sign,
'Accept-Encoding': 'gzip,compress,br,deflate',
'platform': "wx",
'x-requested-with': 'xmlhttprequest',
'content-type': 'application/x-www-form-urlencoded',
}
def wdqbsj(auth_code, authorization): # 个人信息/钱包
url = f"{base_url}/user/get-wallet-info"
headers = fz_hs(auth_code, authorization, user_agent, "99914b932bd37a50b983c5e7c90ae93b")
data = json.dumps({}) # 发送空的JSON数据
#print(url)
try:
response = requests.post(url, headers=headers, data=data)
response.raise_for_status()
response_data = response.json()
#print("解析的JSON数据", response_data)
# 判断code并提取所需数据
if response_data.get('code') == 0:
user_id = response_data['data']['wallet_info'].get('user_id')
total_balance = response_data['data']['wallet_info'].get('total_balance')
today_income = response_data['data']['wallet_info'].get('today_income')
#print(f"用户ID: {user_id}, 总余额: {total_balance}, 今日收入: {today_income}")
print(f"🆔: {user_id}, 总💸: {total_balance}, 今日: {today_income}")
# 判断今日收入是否大于0
if float(today_income) > 0:
print("今日已有收入,不需要签到")
#tj_sign(auth_code, authorization)#测试提交签到
else:
print("今日无收入,需要签到")
tj_sign(auth_code, authorization)
else:
print("响应代码不为0完整响应体", response_data)
except ValueError:
print("响应不是有效的JSON格式。")
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
def tj_sign(auth_code, authorization): # 提交签到
url = f"{base_url}/user/do-sign"
headers = fz_hs(auth_code, authorization, user_agent, "99914b932bd37a50b983c5e7c90ae93b")
data = json.dumps({}) # 发送空的JSON数据
try:
response = requests.post(url, headers=headers, data=data)
response.raise_for_status()
response_data = response.json()
#print("解析的JSON数据", response_data)
# 提取所需数据并转换时间戳
if 'data' in response_data and len(response_data['data']) > 0:
for item in response_data['data']:
user_id = item.get('user_id')
sign_date = timestamp_to_beijing_time(item.get('sign_date'))
sign_time = timestamp_to_beijing_time(item.get('sign_time'))
#print(f"用户: {user_id}, 签名日期: {sign_date}, 签到时间: {sign_time}")
print(f" 签名日期: {sign_date}, 签到🎉: {sign_time}")
return response_data
except ValueError:
print("响应不是有效的JSON格式。")
return None
except requests.exceptions.RequestException as e:
print(f"请求失败: {e}")
return None
#------------通知开始-----------
class Tee:
def __init__(self, *files):
self.files = files
def write(self, obj):
for file in self.files:
file.write(obj)
file.flush() # 确保及时输出
def flush(self):
for file in self.files:
file.flush()
#------------通知结束-----------
def main():
string_io = StringIO()
original_stdout = sys.stdout
try:
sys.stdout = Tee(sys.stdout, string_io)
var_name = 'qztoken' # 环境变量名
accounts = get_env_variable(var_name)
if not accounts:
return
print(f'找到 {len(accounts)} 个账号的令牌。')
total_tokens = len(accounts)
for index, account in enumerate(accounts, start=1):
parts = account.split('#')
auth_code, authorization = parts[0], parts[1]
remark = None if len(parts) == 2 else parts[2] # 检查是否有备注
remark_info = f" --- 备注: {remark}" if remark else ""
print(f"------账号 {index}/{total_tokens}{remark_info} ------")
wdqbsj(auth_code, authorization) # 个人信息/钱包
# 暂停3到5秒
time.sleep(random.randint(3, 5))
finally:
sys.stdout = original_stdout
output_content = string_io.getvalue()
if enable_notification:
send("-泉站大桶订水-通知", output_content)
if __name__ == "__main__":
main()
"""
#本地测试用
os.environ['qztoken'] = '''
authcode # authorization
'''
def main():
var_name = 'qztoken' # 环境变量名
accounts = get_env_variable(var_name)
if not accounts:
return
print(f'找到 {len(accounts)} 个账号的令牌。')
total_tokens = len(accounts)
for index, account in enumerate(accounts, start=1):
parts = account.split('#')
auth_code, authorization = parts[0], parts[1]
remark = None if len(parts) == 2 else parts[2] # 检查是否有备注
remark_info = f" --- 备注: {remark}" if remark else ""
print(f"------账号 {index}/{total_tokens}{remark_info} ------")
wdqbsj(auth_code, authorization)# 个人信息/钱包
if __name__ == "__main__":
main()
"""

427
quzanmi.js Normal file
View File

@ -0,0 +1,427 @@
/**
变量名 qzmCookie 抓包 x-qzm-token 每天0.6满10提现绑定支付宝时会自动提现0.3秒到
*/
const $ = new ENV("趣攒米视频任务", ["qzmCookie"]);
const cookieArr = $.qzmCookie.split("&");
class QZM {
constructor(ck, index) {
this.ck = ck.split("#")[0];
this.index = ++index;
this.oaid = this.randomString(16);
this.androidId = this.randomString(16);
}
randomString(length) {
// const table = "0123456789ABCDEF";
const table = "0123456789abcdef";
const _0x5ddc9a = {
length: length
};
return Array.from(_0x5ddc9a, () => table[Math.floor(Math.random() * table.length)]).join("");
}
randomStringNum(length) {
// const table = "0123456789ABCDEF";
const table = "0123456789";
const _0x5ddc9a = {
length: length
};
return Array.from(_0x5ddc9a, () => table[Math.floor(Math.random() * table.length)]).join("");
}
async main() {
const info = await this.getUserInfo();
if (!info) {
return void 0;
}
try {
$.log(`账号[${this.index}]【${this.nickName}】 获取任务列表`)
const tasks = await this.taskList()
$.log(`账号[${this.index}]【${this.nickName}】 刷新令牌`)
await this.access()
for (const task of tasks) {
const source = task.source;
$.log(`账号[${this.index}]【${this.nickName}】 开始任务 ${task.name}`)
for (let i = 0; i < 10; i++) {
try {
$.log(`账号[${this.index}]【${this.nickName}】 假装看广告 ${i+1}`)
await this.ecpm();
}catch (e) {
console.log(e)
}
await $.wait(10000)
}
try {
$.log(`账号[${this.index}]【${this.nickName}】 领取奖励`)
const re = await this.reward(source)
if (re){
$.log(`账号[${this.index}]【${this.nickName}】 领取奖励成功`)
}else {
$.log(`账号[${this.index}]【${this.nickName}】 领取奖励失败`)
}
}catch (e) {
console.log(e)
}
}
} catch (e) {
console.log(e)
}
try {
$.log(`账号[${this.index}]【${this.nickName}】 兑换金币`)
await this.getUserInfo()
if (this.point>=1000){
await this.trade(this.point)
}else {
$.log(`账号[${this.index}]【${this.nickName}】 当前金币数量不可兑换`)
}
}catch (e) {
console.log(e)
}
}
async getUserInfo() {
const options = {
'method': 'GET',
'url': 'https://api.quzanmi.com/api/user/info/mine',
'headers': {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Origin': 'http://anh5.quzanmi.com',
'Pragma': 'no-cache',
'Referer': 'http://anh5.quzanmi.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950',
'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'x-qzm-aid': `|${this.oaid}|${this.androidId}`,
'x-qzm-bundle': 'com.zhangwen.quzanmi|Xiaomi|13|1.0.0',
'x-qzm-device': 'android',
'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(),
'x-qzm-token': this.ck,
}
};
const res = await $.request(options);
if (res.code === 2000) {
this.id = res.data.id;
this.phone = res.data.phone_number;
this.nickName = res.data.nickname;
this.realName = res.data.realname;
this.score = res.data.score;
this.today_income = res.data.today_income;
this.banlance = res.data.balance;
this.payment_num = res.data.payment_num;
this.point = res.data.point;
this.total_balance = res.data.total_balance;
// console.log( res.data)
$.log(`账号[${this.index}]【${this.nickName}】 真名: ${this.realName} 手机号: ${this.phone}`);
$.log(`账号[${this.index}]【${this.nickName}】 余额: ${this.banlance} 金币: ${this.point}`);
return true;
} else {
$.log(`获取用户信息失败: ${res.message}`);
return false;
}
}
async taskList() {
const options = {
'method': 'GET',
'url': 'https://api.quzanmi.com/api/ad/android/list',
'headers': {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Origin': 'http://anh5.quzanmi.com',
'Pragma': 'no-cache',
'Referer': 'http://anh5.quzanmi.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950',
'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'x-qzm-aid': `|${this.oaid}|${this.androidId}`,
'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1',
'x-qzm-device': 'android',
'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(),
'x-qzm-token': this.ck,
}
};
const res = await $.request(options);
if (res.code === 2000) {
const list = res.data.filter(item => item.source.includes("videoad"));
// console.log(list)
return list
} else {
$.log(`账号[${this.index}]【${this.nickName}】 获取任务列表 ${res.msg}`);
return false;
}
}
async access() {
const options = {
'method': 'POST',
'url': 'https://api.aibianxian.net/igame/api/v1.0/cplApi/access',
'headers': {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Origin': 'http://anh5.quzanmi.com',
'Pragma': 'no-cache',
'Referer': 'http://anh5.quzanmi.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950',
'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'x-qzm-aid': `|${this.oaid}|${this.androidId}`,
'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1',
'x-qzm-device': 'android',
'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(),
'x-qzm-token': this.ck,
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryZnyXeBEEvBYSL7mL'
},
formData: {
'app_key': '142793900',
'device': 'android',
'device_info': this.oaid,
'target_id': this.id
}
};
const res = await $.request(options);
// console.log(res)
if (res.code == 200) {
this.token = res.data.token;
// console.log(this.token)
return true
} else {
$.log(`账号[${this.index}]【${this.nickName}】 刷新令牌 ${res.msg}`);
return false;
}
}
randomEcpm(min, max) {
// 生成一个介于min和max之间的随机整数
const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
// 将随机数转换为字符串
return randomNumber.toString();
}
async reward(source) {
const options = {
url: `https://api.quzanmi.com/api/ad/android/reward`,
method: 'POST',
headers: {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Origin': 'http://anh5.quzanmi.com',
'Pragma': 'no-cache',
'Referer': 'http://anh5.quzanmi.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'Content-Type': 'application/json;charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950',
'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'x-qzm-aid': `|${this.oaid}|${this.androidId}`,
'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1',
'x-qzm-device': 'android',
'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(),
'x-qzm-token': this.ck,
},
body: JSON.stringify({"source": source})
}
const res = await $.request(options);
if (res.code === 2000) {
return true
} else {
$.log(`账号[${this.index}]【${this.nickName}】 领取奖励 ${res.msg}`);
return false;
}
}
async ecpm() {
const options = {
url: `https://api.quzanmi.com/api/ad/app/ecpm`,
method: 'POST',
headers: {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Origin': 'http://anh5.quzanmi.com',
'Pragma': 'no-cache',
'Referer': 'http://anh5.quzanmi.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'Content-Type': 'application/json;charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950',
'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'x-qzm-aid': `|${this.oaid}|${this.androidId}`,
'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1',
'x-qzm-device': 'android',
'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(),
'x-qzm-token': this.ck,
},
body: JSON.stringify({"ecpm": this.randomEcpm(100000,800000)+".0", "source": "android", "kind": "rewardAd", "rit_id": "1"+this.randomStringNum(8)})
}
const res = await $.request(options);
if (res.code === 2000) {
return true
} else {
return false;
}
}
async trade(point){
const options = {
url: 'https://api.quzanmi.com/api/user/point/trade',
method: 'POST',
headers: {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
'Origin': 'http://anh5.quzanmi.com',
'Pragma': 'no-cache',
'Referer': 'http://anh5.quzanmi.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'cross-site',
'User-Agent': 'Mozilla/5.0 (Linux; Android 14; 22081212C Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.3 Mobile Safari/537.36 AgentWeb/5.0.8 UCBrowser/11.6.4.950',
'sec-ch-ua': '"Android WebView";v="125", "Chromium";v="125", "Not.A/Brand";v="24"',
'sec-ch-ua-mobile': '?1',
'sec-ch-ua-platform': '"Android"',
'x-qzm-aid': `|${this.oaid}|${this.androidId}`,
'x-qzm-bundle': 'com.zhangwen.quzanmi|Redmi|14|1.0.1',
'x-qzm-device': 'android',
'x-qzm-time': parseInt((Date.now() / 1000).toString()).toString(),
'x-qzm-token': this.ck,
},
body: JSON.stringify({
"point": Math.floor(point / 1000) * 1000
})
}
// console.log(options)
const res = await $.request(options);
// console.log(res)
if (res.code === 2000) {
$.log(`账号[${this.index}]【${this.nickName}】 兑换金币成功`);
return true
} else {
$.log(`账号[${this.index}]【${this.nickName}】 兑换金币 ${res.msg}`);
return false;
}
}
};
(async () => {
const qzm = [];
for (const index in cookieArr) {
qzm.push(new QZM(cookieArr[index], index));
}
for (const qzmElement of qzm) {
try {
await qzmElement.main();
} catch (e) {
console.log(e)
}
}
})();
function ENV(name, envNames) {
const request = require("request");
const cryptoJS = require("crypto-js");
return new class {
constructor(name, envNames = []) {
this.name = name;
this.envNames = envNames;
this.startTime = Date.now();
this.logs = [];
if (this.envNames.length > 0) {
for (const envName of envNames) {
this[envName] = process.env[envName];
}
}
this.log(`🔔${this.name},开始!`)
}
log(...args) {
args.length > 0 && (this.logs = [...this.logs, ...args])
console.log(...args)
}
md5(str) {
return cryptoJS.MD5(str).toString()
}
sha256(str) {
return cryptoJS.SHA256(str).toString()
}
aesCBCEncrypt(data, key, iv) {
const n = cryptoJS.enc.Hex.parse(key);
const r = cryptoJS.enc.Hex.parse(iv);
const o = cryptoJS.AES.encrypt(data, n, {
iv: r,
mode: cryptoJS.mode.CBC,
padding: cryptoJS.pad.Pkcs7
});
return cryptoJS.enc.Base64.stringify(o.ciphertext);
}
aesCBCDecrypt(data, key, iv) {
const n = cryptoJS.enc.Hex.parse(key);
const r = cryptoJS.enc.Hex.parse(iv);
const o = cryptoJS.AES.decrypt(data, n, {
iv: r,
mode: cryptoJS.mode.CBC,
padding: cryptoJS.pad.Pkcs7
});
return o.toString(cryptoJS.enc.Utf8);
}
request(options) {
options.gzip = true;
return new Promise((resolve, reject) => {
request(options, (error, response, body) => {
if (error) {
resolve(error)
}
try {
const objBody = JSON.parse(body);
resolve(objBody);
} catch (e) {
resolve(body)
}
})
})
}
wait(time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
}(name, envNames)
}

550
shangshaban.js Normal file

File diff suppressed because one or more lines are too long

583
shangzhanwangluo.js Normal file
View File

@ -0,0 +1,583 @@
/**
* 商战网络签到V1.1
* cron 10 8,12 * * * 商战网络.js 一天5分满2元提现
* const $ = new Env("商战网络签到");
* ========= 青龙--配置文件 ===========
* # 项目名称
* export szwl='你抓包的token#你抓包的Client_ip'
* 你抓包的Client_ip可以为空软件会随机生成一个ip也就是export szwl='你抓包的token'
* 新增提示
* 格式支持以下几种自己选
* export szwl='就一个token'
* 或者 export szwl='你抓包的token#你抓包的Client_ip'
* 或者 export szwl='手机号#密码'推荐这种因为账号密码不会过期
* 或者 export szwl='手机号#密码#你抓包的Client_ip'推荐这种因为账号密码不会过期
* 自己抓包协议头上的Authorization
* 多账号换行或&隔开
* 奖励签到得红包满1提现
*
* ====================================
*
*/
//Sat Jan 25 2025 08:25:03 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const $ = new Env("商战网络签到");
let envParams = "szwl",
envSplitor = ["\n", "&"];
const fs = require("fs");
let authorizationToken = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || "",
initedJobForTokens = [],
currentUserIndex = 0;
class JobTask {
constructor(_0x321952) {
this.index = ++currentUserIndex;
this.points = 0;
this.valid = false;
try {
const _0xf52f29 = _0x321952?.["split"]("#");
_0xf52f29?.["length"] === 2 ? ([this.activedAuthToken, this.ip] = _0xf52f29, !isValidIP(this.ip) && ([this.account, this.password] = _0xf52f29, this.ip = "", this.activedAuthToken = "")) : ([this.account, this.password, this.ip] = _0xf52f29, this.activedAuthToken = "");
} catch (_0x8cdf76) {
this.activedAuthToken = _0x321952;
}
if (isValidIP(this.ip)) {} else {
{
this.ip = readValueFromFile(envParams + "_config", "fakeIp");
if (this.ip) {
console.log("账号[" + this.index + "]从缓存读取IP地址成功 " + this.ip);
return;
}
const _0x561a3f = generateRandomIP(true);
this.ip = _0x561a3f;
console.log("账号[" + this.index + "]未检测到设置的IP开始随机生成一个 " + _0x561a3f);
saveValueToFile(envParams + "_config", "fakeIp", _0x561a3f);
}
}
}
async ["taskApi"](_0x339def, _0x14c334, _0x31cbec, _0x11dee4) {
let _0x50b064 = null;
try {
let _0x5c3a04 = _0x31cbec.replace("//", "/").split("/")[1],
_0x2cf074 = {
"url": _0x31cbec,
"headers": {
"User-Agent": "Mozilla/5.0 (Linux; Android 13; M2012K11AC Build/TKQ1.220829.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5127 MMWEBSDK/20230504 MMWEBID/1105 MicroMessenger/8.0.37.2380(0x2800255B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64",
"Host": _0x5c3a04,
"Connection": "Keep-Alive",
"Origin": "https://" + _0x5c3a04,
"Authorization": this.activedAuthToken,
"Referer": "https://www.qqkami.com/umobile/pages/Home/sign_in/sign_in",
"Client_ip": this.ip,
"X-forwarded-for": this.ip,
"accept-language": "zh-CN:zh;q=0.9",
"accept": "*/*"
},
"timeout": 60000
};
_0x11dee4 && (_0x2cf074.body = _0x11dee4, _0x2cf074.headers["content-length"] = _0x11dee4?.["length"], _0x2cf074.headers["Content-Type"] = "application/json");
await httpRequest(_0x14c334, _0x2cf074).then(async _0x4fb40f => {
_0x4fb40f.resp?.["statusCode"] == 200 ? _0x4fb40f.resp?.["body"] ? _0x50b064 = JSON.parse(_0x4fb40f.resp.body) : console.log("账号[" + this.index + "]调用" + _0x14c334 + "[" + _0x339def + "]出错,返回为空") : console.log("账号[" + this.index + "]调用" + _0x14c334 + "[" + _0x339def + "]出错,返回状态码[" + (_0x4fb40f.resp?.["statusCode"] || "") + "]");
});
} catch (_0x32b0b5) {
console.log(_0x32b0b5);
} finally {
return Promise.resolve(_0x50b064);
}
}
async ["Login"]() {
try {
{
let _0x31be00 = "Login",
_0x3d53e7 = "post",
_0x28a0f3 = "https://www.qqkami.com/mobile/User/accountLogin",
_0x36ee7f = "{\"mobile\":\"" + this.account + "\",\"password\":\"" + this.password + "\"}";
await this.taskApi(_0x31be00, _0x3d53e7, _0x28a0f3, _0x36ee7f).then(async _0x520e18 => {
if (_0x520e18.code === 200) this.valid = true, this.activedAuthToken = _0x520e18?.["data"]?.["token"], this.points = _0x520e18.data.income, console.log("账号[" + this.index + "] 登录成功");else {
$.logAndNotify("账号[" + this.index + "]登录失败:" + _0x520e18.msg);
}
});
}
} catch (_0x49065c) {
console.log(_0x49065c);
} finally {
return Promise.resolve(1);
}
}
async ["GetUserBalance"]() {
try {
let _0x57bb0c = "GetUserBalance",
_0x22e5da = "get",
_0x50de32 = "https://www.qqkami.com/mobile/UserCenter/getInfo",
_0x433551 = "";
await this.taskApi(_0x57bb0c, _0x22e5da, _0x50de32, _0x433551).then(async _0x5347fb => {
if (_0x5347fb.code === 200) {
this.valid = true;
this.points = _0x5347fb.data.income;
console.log("账号[" + this.index + "] 当前佣金: " + this.points);
} else {
$.logAndNotify("账号[" + this.index + "]查询佣金失败,可能帐号无效");
}
});
} catch (_0x52d760) {
console.log(_0x52d760);
} finally {
return Promise.resolve(1);
}
}
async ["SignInDaily"]() {
try {
let _0x1fd3c4 = "SignInDaily",
_0x52354d = "post",
_0x553bf1 = "https://www.qqkami.com/mobile/UserSign/sign",
_0x50854a = "{}";
await this.taskApi(_0x1fd3c4, _0x52354d, _0x553bf1, _0x50854a).then(async _0x36d6f8 => {
{
console.log("result:", _0x36d6f8);
if (_0x36d6f8.code === 200) console.log("账号[" + this.index + "] 签到成功,得到了多少钱懒得查,你猜?等我钱够了再看看能不能增加自动提现,先这样吧");else {
console.log("账号[" + this.index + "] 签到失败:" + _0x36d6f8?.["msg"]);
}
}
});
} catch (_0x5e2b62) {
console.log(_0x5e2b62);
} finally {
return Promise.resolve(1);
}
}
async ["doTask"]() {
try {
await waitSomeTime(1000);
console.log("\n============= 账号[" + this.index + "] 开始签到=============");
await this.SignInDaily();
} catch (_0x53e322) {
console.log(_0x53e322);
}
}
}
!(async () => {
if (typeof $request !== "undefined") {
await GetRewrite();
} else {
if (!(await checkEnv())) return;
console.log("\n================ 开始执行 ================");
for (let _0x1dd15c of initedJobForTokens) {
console.log("----------- 执行 第 [" + _0x1dd15c.index + "] 个账号 -----------");
_0x1dd15c.account && (await _0x1dd15c.Login());
await _0x1dd15c.GetUserBalance();
}
let _0x12010f = initedJobForTokens.filter(_0x36450b => _0x36450b.valid);
if (_0x12010f.length > 0) {
console.log("\n================ 任务队列构建完毕 ================");
for (let _0x30a1f1 of _0x12010f) {
console.log("----------- 账号[" + _0x30a1f1.index + "] -----------");
await _0x30a1f1.doTask();
}
} else console.log("\n================ 未检测到帐号请先注册https://www.qqkami.com?parent_code=917816 ================");
await $.showmsg();
}
})().catch(_0x6d06c2 => console.log(_0x6d06c2)).finally(() => $.done());
function isValidIP(_0x527f2a) {
const _0x3d78a1 = /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
return _0x3d78a1.test(_0x527f2a);
}
function generateRandomIP(_0x3cd366 = true) {
const _0x36687c = _0x3cd366 ? "1.1.1.1" : "0.0.0.0",
_0x2a4761 = _0x3cd366 ? "223.255.255.255" : "255.255.255.255",
_0x1ea1fa = _0x36687c.split(".").map(Number),
_0x201ea0 = _0x2a4761.split(".").map(Number),
_0xc707c6 = _0x1ea1fa.map((_0xb937ff, _0x5ce7b3) => {
const _0x1066b6 = _0x201ea0[_0x5ce7b3];
return Math.floor(Math.random() * (_0x1066b6 - _0xb937ff + 1)) + _0xb937ff;
});
return _0xc707c6.join(".");
}
function saveValueToFile(_0x41737a, _0x4237dd, _0x324624) {
const _0x5a84f8 = {};
_0x5a84f8[_0x4237dd] = _0x324624;
const _0x3ac9f8 = JSON.stringify(_0x5a84f8);
try {
fs.writeFileSync(_0x41737a + ".json", _0x3ac9f8);
} catch (_0x44781d) {
_0x44781d.code === "ENOENT" ? fs.writeFileSync(_0x41737a + ".json", _0x3ac9f8) : console.error("保存文件时发生错误:", _0x44781d);
}
}
function readValueFromFile(_0x14867e, _0x2a03bd) {
try {
{
const _0x25b11b = fs.readFileSync(_0x14867e + ".json", "utf8"),
_0x35d86a = JSON.parse(_0x25b11b);
return _0x35d86a[_0x2a03bd];
}
} catch (_0x2f213e) {
if (_0x2f213e.code === "ENOENT") return undefined;else {
console.error("读取文件时发生错误:", _0x2f213e);
}
}
}
async function waitSomeTime(_0x15970 = 3000) {
console.log("----------- 延迟 " + _0x15970 / 1000 + " s请稍等 -----------");
return await new Promise(_0x45b3bc => setTimeout(_0x45b3bc, _0x15970));
}
async function GetRewrite() {}
async function checkEnv() {
if (authorizationToken) {
let _0x16df9a = envSplitor[0];
for (let _0x5e5133 of envSplitor) {
if (authorizationToken.indexOf(_0x5e5133) > -1) {
_0x16df9a = _0x5e5133;
break;
}
}
for (let _0x2e8d92 of authorizationToken.split(_0x16df9a)) {
if (_0x2e8d92) initedJobForTokens.push(new JobTask(_0x2e8d92));
}
userCount = initedJobForTokens.length;
} else {
console.log("未找到 配置信息,请检查是否配置 变量:", envParams);
return;
}
console.log("共找到" + userCount + "个账号");
return true;
}
async function httpRequest(_0x3e5fe1, _0x53c55a) {
httpErr = null;
httpReq = null;
httpResp = null;
return new Promise(_0x42f16d => {
$.send(_0x3e5fe1, _0x53c55a, async (_0x4d229d, _0x3540f2, _0x2197fb) => {
httpErr = _0x4d229d;
httpReq = _0x3540f2;
httpResp = _0x2197fb;
_0x42f16d({
"err": _0x4d229d,
"req": _0x3540f2,
"resp": _0x2197fb
});
});
});
}
function Env(_0x2e2edc, _0xaf9573) {
"undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
return new class {
constructor(_0x528d58, _0x5623ab) {
this.name = _0x528d58;
this.notifyStr = "";
this.startTime = new Date().getTime();
Object.assign(this, _0x5623ab);
console.log(this.name + " 开始运行:\n");
}
["isNode"]() {
return "undefined" != typeof module && !!module.exports;
}
["isQuanX"]() {
return "undefined" != typeof $task;
}
["isSurge"]() {
return "undefined" != typeof $httpClient && "undefined" == typeof $loon;
}
["isLoon"]() {
return "undefined" != typeof $loon;
}
["getdata"](_0x25b180) {
{
let _0x5620e7 = this.getval(_0x25b180);
if (/^@/.test(_0x25b180)) {
const [, _0x5829f2, _0x2ca6fa] = /^@(.*?)\.(.*?)$/.exec(_0x25b180),
_0xa30f22 = _0x5829f2 ? this.getval(_0x5829f2) : "";
if (_0xa30f22) try {
const _0x1e06d2 = JSON.parse(_0xa30f22);
_0x5620e7 = _0x1e06d2 ? this.lodash_get(_0x1e06d2, _0x2ca6fa, "") : _0x5620e7;
} catch (_0x21c3e4) {
_0x5620e7 = "";
}
}
return _0x5620e7;
}
}
["setdata"](_0x3d493b, _0x538660) {
let _0x35736f = false;
if (/^@/.test(_0x538660)) {
const [, _0x551cb4, _0x4cd412] = /^@(.*?)\.(.*?)$/.exec(_0x538660),
_0x4ccf62 = this.getval(_0x551cb4),
_0x1ab297 = _0x551cb4 ? "null" === _0x4ccf62 ? null : _0x4ccf62 || "{}" : "{}";
try {
const _0x4555ad = JSON.parse(_0x1ab297);
this.lodash_set(_0x4555ad, _0x4cd412, _0x3d493b);
_0x35736f = this.setval(JSON.stringify(_0x4555ad), _0x551cb4);
} catch (_0x482b16) {
const _0x147fe0 = {};
this.lodash_set(_0x147fe0, _0x4cd412, _0x3d493b);
_0x35736f = this.setval(JSON.stringify(_0x147fe0), _0x551cb4);
}
} else _0x35736f = this.setval(_0x3d493b, _0x538660);
return _0x35736f;
}
["getval"](_0x2ef2c9) {
return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x2ef2c9) : this.isQuanX() ? $prefs.valueForKey(_0x2ef2c9) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x2ef2c9]) : this.data && this.data[_0x2ef2c9] || null;
}
["setval"](_0x356d42, _0x313ffe) {
return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x356d42, _0x313ffe) : this.isQuanX() ? $prefs.setValueForKey(_0x356d42, _0x313ffe) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x313ffe] = _0x356d42, this.writedata(), true) : this.data && this.data[_0x313ffe] || null;
}
["send"](_0x2dc029, _0x4d5c7, _0x41f8d2 = () => {}) {
if (_0x2dc029 != "get" && _0x2dc029 != "post" && _0x2dc029 != "put" && _0x2dc029 != "delete") {
console.log("无效的http方法" + _0x2dc029);
return;
}
if (_0x2dc029 == "get" && _0x4d5c7.headers) delete _0x4d5c7.headers["Content-Type"], delete _0x4d5c7.headers["Content-Length"];else {
if (_0x4d5c7.body && _0x4d5c7.headers) {
{
if (!_0x4d5c7.headers["Content-Type"]) _0x4d5c7.headers["Content-Type"] = "application/x-www-form-urlencoded";
}
}
}
if (this.isSurge() || this.isLoon()) {
this.isSurge() && this.isNeedRewrite && (_0x4d5c7.headers = _0x4d5c7.headers || {}, Object.assign(_0x4d5c7.headers, {
"X-Surge-Skip-Scripting": false
}));
let _0x21d29c = {
"method": _0x2dc029,
"url": _0x4d5c7.url,
"headers": _0x4d5c7.headers,
"timeout": _0x4d5c7.timeout,
"data": _0x4d5c7.body
};
if (_0x2dc029 == "get") delete _0x21d29c.data;
$axios(_0x21d29c).then(_0x4c56df => {
{
const {
status: _0x85b449,
request: _0x17bc19,
headers: _0x1002a0,
data: _0x1ed5b9
} = _0x4c56df;
_0x41f8d2(null, _0x17bc19, {
"statusCode": _0x85b449,
"headers": _0x1002a0,
"body": _0x1ed5b9
});
}
}).catch(_0x102b4f => console.log(_0x102b4f));
} else {
if (this.isQuanX()) {
_0x4d5c7.method = _0x2dc029.toUpperCase();
this.isNeedRewrite && (_0x4d5c7.opts = _0x4d5c7.opts || {}, Object.assign(_0x4d5c7.opts, {
"hints": false
}));
$task.fetch(_0x4d5c7).then(_0x1e60d1 => {
const {
statusCode: _0x4ad189,
request: _0x5e1c4b,
headers: _0x56d9ea,
body: _0xcb2776
} = _0x1e60d1;
_0x41f8d2(null, _0x5e1c4b, {
"statusCode": _0x4ad189,
"headers": _0x56d9ea,
"body": _0xcb2776
});
}, _0x836de0 => _0x41f8d2(_0x836de0));
} else {
if (this.isNode()) {
{
this.got = this.got ? this.got : require("got");
const {
url: _0x27d2c1,
..._0x3afab2
} = _0x4d5c7;
this.instance = this.got.extend({
"followRedirect": false
});
this.instance[_0x2dc029](_0x27d2c1, _0x3afab2).then(_0x4edbfb => {
const {
statusCode: _0x551862,
request: _0xd5dcf7,
headers: _0x6c6cb5,
body: _0x2804b4
} = _0x4edbfb;
_0x41f8d2(null, _0xd5dcf7, {
"statusCode": _0x551862,
"headers": _0x6c6cb5,
"body": _0x2804b4
});
}, _0x27d7c5 => {
{
const {
message: _0x5005b1,
request: _0x55c246,
response: _0x5aa1d1
} = _0x27d7c5;
_0x41f8d2(_0x5005b1, _0x55c246, _0x5aa1d1);
}
});
}
}
}
}
}
["time"](_0x462247, _0x51c3c0 = null) {
{
let _0x3eae05 = _0x51c3c0 ? new Date(_0x51c3c0) : new Date(),
_0x5c7045 = {
"M+": _0x3eae05.getMonth() + 1,
"d+": _0x3eae05.getDate(),
"h+": _0x3eae05.getHours(),
"m+": _0x3eae05.getMinutes(),
"s+": _0x3eae05.getSeconds(),
"q+": Math.floor((_0x3eae05.getMonth() + 3) / 3),
"S": _0x3eae05.getMilliseconds()
};
/(y+)/.test(_0x462247) && (_0x462247 = _0x462247.replace(RegExp.$1, (_0x3eae05.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let _0xe1640f in _0x5c7045) new RegExp("(" + _0xe1640f + ")").test(_0x462247) && (_0x462247 = _0x462247.replace(RegExp.$1, 1 == RegExp.$1.length ? _0x5c7045[_0xe1640f] : ("00" + _0x5c7045[_0xe1640f]).substr(("" + _0x5c7045[_0xe1640f]).length)));
return _0x462247;
}
}
async ["showmsg"]() {
{
if (!this.notifyStr) return;
let _0x1b7e91 = this.name + " 运行通知\n\n" + this.notifyStr;
if ($.isNode()) {
{
var _0x41833d = require("./sendNotify");
console.log("\n============== 推送 ==============");
await _0x41833d.sendNotify(this.name, _0x1b7e91);
}
} else this.msg(_0x1b7e91);
}
}
["logAndNotify"](_0x488913) {
console.log(_0x488913);
this.notifyStr += _0x488913;
this.notifyStr += "\n";
}
["logAndNotifyWithTime"](_0x1ba822) {
{
let _0xb80445 = "[" + this.time("hh:mm:ss.S") + "]" + _0x1ba822;
console.log(_0xb80445);
this.notifyStr += _0xb80445;
this.notifyStr += "\n";
}
}
["logWithTime"](_0x5ea8c9) {
console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x5ea8c9);
}
["msg"](_0x2e5f95 = t, _0x12dfda = "", _0x3efdde = "", _0x457114) {
{
const _0x5ec49d = _0x39e5c4 => {
{
if (!_0x39e5c4) return _0x39e5c4;
if ("string" == typeof _0x39e5c4) return this.isLoon() ? _0x39e5c4 : this.isQuanX() ? {
"open-url": _0x39e5c4
} : this.isSurge() ? {
"url": _0x39e5c4
} : undefined;
if ("object" == typeof _0x39e5c4) {
{
if (this.isLoon()) {
{
let _0x5997fa = _0x39e5c4.openUrl || _0x39e5c4.url || _0x39e5c4["open-url"],
_0x546a40 = _0x39e5c4.mediaUrl || _0x39e5c4["media-url"];
return {
"openUrl": _0x5997fa,
"mediaUrl": _0x546a40
};
}
}
if (this.isQuanX()) {
let _0x1687ce = _0x39e5c4["open-url"] || _0x39e5c4.url || _0x39e5c4.openUrl,
_0x4b6a40 = _0x39e5c4["media-url"] || _0x39e5c4.mediaUrl;
return {
"open-url": _0x1687ce,
"media-url": _0x4b6a40
};
}
if (this.isSurge()) {
let _0x2dbe0d = _0x39e5c4.url || _0x39e5c4.openUrl || _0x39e5c4["open-url"];
return {
"url": _0x2dbe0d
};
}
}
}
}
};
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x2e5f95, _0x12dfda, _0x3efdde, _0x5ec49d(_0x457114)) : this.isQuanX() && $notify(_0x2e5f95, _0x12dfda, _0x3efdde, _0x5ec49d(_0x457114)));
let _0x3d2a40 = ["", "============== 系统通知 =============="];
_0x3d2a40.push(_0x2e5f95);
_0x12dfda && _0x3d2a40.push(_0x12dfda);
_0x3efdde && _0x3d2a40.push(_0x3efdde);
console.log(_0x3d2a40.join("\n"));
}
}
["getMin"](_0x589a0b, _0x40bd64) {
return _0x589a0b < _0x40bd64 ? _0x589a0b : _0x40bd64;
}
["getMax"](_0x2d827a, _0x33778b) {
return _0x2d827a < _0x33778b ? _0x33778b : _0x2d827a;
}
["padStr"](_0x4d7afa, _0xcce158, _0x26b4c9 = "0") {
{
let _0x4045e2 = String(_0x4d7afa),
_0x3d1754 = _0xcce158 > _0x4045e2.length ? _0xcce158 - _0x4045e2.length : 0,
_0x58e6ea = "";
for (let _0x131d77 = 0; _0x131d77 < _0x3d1754; _0x131d77++) {
_0x58e6ea += _0x26b4c9;
}
_0x58e6ea += _0x4045e2;
return _0x58e6ea;
}
}
["json2str"](_0x2ff6ea, _0x3c3183, _0x3ceb0c = false) {
{
let _0x5c7ce3 = [];
for (let _0xc8c555 of Object.keys(_0x2ff6ea).sort()) {
let _0x2e9ea8 = _0x2ff6ea[_0xc8c555];
if (_0x2e9ea8 && _0x3ceb0c) _0x2e9ea8 = encodeURIComponent(_0x2e9ea8);
_0x5c7ce3.push(_0xc8c555 + "=" + _0x2e9ea8);
}
return _0x5c7ce3.join(_0x3c3183);
}
}
["str2json"](_0x3c6807, _0x1987d9 = false) {
{
let _0x51c564 = {};
for (let _0x3c3447 of _0x3c6807.split("&")) {
if (!_0x3c3447) continue;
let _0x537abe = _0x3c3447.indexOf("=");
if (_0x537abe == -1) continue;
let _0x4d62ae = _0x3c3447.substr(0, _0x537abe),
_0x1bf54f = _0x3c3447.substr(_0x537abe + 1);
if (_0x1987d9) _0x1bf54f = decodeURIComponent(_0x1bf54f);
_0x51c564[_0x4d62ae] = _0x1bf54f;
}
return _0x51c564;
}
}
["randomString"](_0x136e7d, _0xd4496c = "abcdef0123456789") {
{
let _0x50cf7e = "";
for (let _0x32cdcb = 0; _0x32cdcb < _0x136e7d; _0x32cdcb++) {
_0x50cf7e += _0xd4496c.charAt(Math.floor(Math.random() * _0xd4496c.length));
}
return _0x50cf7e;
}
}
["randomList"](_0x786fb7) {
let _0x11fea2 = Math.floor(Math.random() * _0x786fb7.length);
return _0x786fb7[_0x11fea2];
}
["wait"](_0x41e8e8) {
return new Promise(_0x2b9afb => setTimeout(_0x2b9afb, _0x41e8e8));
}
["done"](_0x42ad6d = {}) {
const _0x2075ca = new Date().getTime(),
_0x5cd3f6 = (_0x2075ca - this.startTime) / 1000;
console.log("\n" + this.name + " 运行结束,共运行了 " + _0x5cd3f6 + " 秒!");
if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x42ad6d);
}
}(_0x2e2edc, _0xaf9573);
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -12,10 +12,8 @@ const Notify = 1
const debug = 0
let ckStr = ($.isNode() ? process.env.sytt_data : $.getdata('sytt_data')) || ''; //检测CK 外部
let msg, ck;
let host = 'xxx.xxx.xxx';
let hostname = 'https://' + host;
let rand = randomInt(0, 14)
let rand1 = randomInt(0, 9)
let replytxtArr = ["好的政府办好事", "美丽十堰", "十堰欢迎大家", "我爱十堰", "十堰真的好美"];
let randReply = randomInt(0, 4)
let replytxt = replytxtArr[randReply]

334
wangchao.py Normal file
View File

@ -0,0 +1,334 @@
import hashlib
import math
import time
import requests
import datetime
import os
from urllib.parse import urlparse, parse_qs
import random
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
import base64
from requests.adapters import HTTPAdapter
from urllib3.util.retry import Retry
import urllib.parse
debug=0
def jm(password):
public_key_base64 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD6XO7e9YeAOs+cFqwa7ETJ+WXizPqQeXv68i5vqw9pFREsrqiBTRcg7wB0RIp3rJkDpaeVJLsZqYm5TW7FWx/iOiXFc+zCPvaKZric2dXCw27EvlH5rq+zwIPDAJHGAfnn1nmQH7wR3PCatEIb8pz5GFlTHMlluw4ZYmnOwg+thwIDAQAB"
public_key_der = base64.b64decode(public_key_base64)
key = RSA.importKey(public_key_der)
cipher = PKCS1_v1_5.new(key)
password_bytes = password.encode('utf-8')
encrypted_password = cipher.encrypt(password_bytes)
encrypted_password_base64 = base64.b64encode(encrypted_password).decode('utf-8')
url_encoded_data = urllib.parse.quote(encrypted_password_base64)
return url_encoded_data
#生成设备号
def generate_random_uuid():
# 设备号其实可以写死,保险起见选择随机生成
uuid_str = '00000000-{:04x}-{:04x}-0000-0000{:08x}'.format(
random.randint(0, 0xfff) | 0x4000,
random.randint(0, 0x3fff) | 0x8000,
random.getrandbits(32)
)
return uuid_str
# 签名并获取认证码
def sign(phone, password):
url_encoded_data = jm(password)
url = "https://passport.tmuyun.com/web/oauth/credential_auth"
payload = f"client_id=10019&password={url_encoded_data}&phone_number={phone}"
headers = {
'User-Agent': "ANDROID;13;10019;6.0.2;1.0;null;MEIZU 20",
'Connection': "Keep-Alive",
'Accept-Encoding': "gzip",
'Content-Type': "application/x-www-form-urlencoded",
'Cache-Control': "no-cache",
'X-SIGNATURE': "185d21c6f3e9ec4af43e0065079b8eb7f1bb054134481e57926fcc45e304b896",
}
response = requests.post(url, data=payload, headers=headers)
try:
code = response.json()['data']['authorization_code']['code']
url = "https://vapp.taizhou.com.cn/api/zbtxz/login"
payload = f"check_token=&code={code}&token=&type=-1&union_id="
headers = {
'User-Agent': "6.0.2;{deviceid};Meizu MEIZU 20;Android;13;tencent;6.10.0",
'Connection': "Keep-Alive",
'Accept-Encoding': "gzip",
'Content-Type': "application/x-www-form-urlencoded",
'X-SESSION-ID': "66586b383f293a7173e4c8f4",
'X-REQUEST-ID': "110c1987-1637-4f4e-953e-e35272bb891e",
'X-TIMESTAMP': "1717072109065",
'X-SIGNATURE': "a69f171e284594a5ecc4baa1b2299c99167532b9795122bae308f27592e94381",
'X-TENANT-ID': "64",
'Cache-Control': "no-cache"
}
response = requests.post(url, data=payload, headers=headers)
message = response.json()['message']
account_id = response.json()['data']['account']['id']
session_id = response.json()['data']['session']['id']
name = response.json()['data']['account']['nick_name']
return message, account_id, session_id, name
except Exception:
print('出错啦!')
return None, None, None, None
#生成验证码
def generate_md5(input_str):
md5_obj = hashlib.md5()
input_str_encoded = input_str.encode('utf-8')
md5_obj.update(input_str_encoded)
return md5_obj.hexdigest()
#获取阅读的JSESSIONID
def get_special_cookie():
special_cookie_url = f'https://xmt.taizhou.com.cn/prod-api/user-read/app/login?id={account_id}&sessionId={session_id}&deviceId={deviceid}'
headers = {
'Host': 'xmt.taizhou.com.cn',
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
'Accept': '*/*',
'X-Requested-With': 'com.shangc.tiennews.taizhou',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
}
response = requests.get(special_cookie_url, headers=headers)
if debug and response.status_code == 200:
print('执行任务获取阅读jse')
print('下面是访问的url\n',special_cookie_url)
print('下面是访问的headers\n',headers)
print('下面是返回的response\n',response.headers)
if response.status_code == 200 and response.headers['Set-Cookie']:
jsessionid1 =response.headers['Set-Cookie'].split(';')[0]+';'
print('获取特殊cookie成功',jsessionid1)
return response.headers['Set-Cookie']
else:
print('获取jsesesionid失败',response.headers)
#获取日期
def get_current_date():
now = datetime.datetime.now()
year_str = str(now.year)
month_str = f"0{now.month}" if now.month < 10 else str(now.month)
day_str = f"0{now.day}" if now.day < 10 else str(now.day)
print(f"当前日期{year_str}{month_str}{day_str}")
return year_str + month_str + day_str
#获取阅读列表
def fetch_article_list():
headers = {
'Host': 'xmt.taizhou.com.cn',
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
'Accept': '*/*',
'X-Requested-With': 'com.shangc.tiennews.taizhou',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'cookie': f'{special_cookie};'
}
url=f'https://xmt.taizhou.com.cn/prod-api/user-read/list/{get_current_date()}'
response = requests.get(url, headers=headers)
if debug and response.status_code == 200:
print('执行任务获取阅读列表')
print('下面是访问的url\n',url)
print('下面是访问的headers\n',headers)
print('下面是返回的response\n',response.headers)
msg = response.json()['msg']
print(msg)
return response.json()
#阅读文章
def mark_article_as_read(article_id,retry_count=3):
headers = {
'Host': 'xmt.taizhou.com.cn',
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
'Accept': '*/*',
'X-Requested-With': 'com.shangc.tiennews.taizhou',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'cookie': f'{special_cookie}',
}
timestamp_str = str(math.floor(time.time() * 1000))
signature = generate_md5('&&' + str(article_id) + '&&TlGFQAOlCIVxnKopQnW&&' + timestamp_str)
url = f'https://xmt.taizhou.com.cn/prod-api/already-read/article?articid={article_id}&timestamp={timestamp_str}&signature={signature}'
# 创建一个包含重试策略的会话
session = requests.Session()
retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504])
session.mount('https://', HTTPAdapter(max_retries=retries))
for attempt in range(retry_count):
try:
response = session.get(url, headers=headers, timeout=10)
if response.status_code == 200:
print(response.text)
return
else:
print(f"请求失败,状态码: {response.status_code}, 响应内容: {response.text}")
except requests.exceptions.RequestException as e:
print(f"请求失败 (尝试 {attempt + 1}/{retry_count}): {e}")
time.sleep(2) # 在重试前增加延迟
# 登录并获取抽奖JSESSIONID
def login(account_id, session_id, retry_count=3):
base_url = 'https://srv-app.taizhou.com.cn'
url = f'{base_url}/tzrb/user/loginWC'
headers = {
'Host': 'srv-app.taizhou.com.cn',
'Connection': 'keep-alive',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
'Accept': '*/*',
'X-Requested-With': 'com.shangc.tiennews.taizhou',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://srv-app.taizhou.com.cn/luckdraw/',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'
}
params = {
'accountId': account_id,
'sessionId': session_id
}
# 创建一个包含重试策略的会话
session = requests.Session()
retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504])
session.mount('https://', HTTPAdapter(max_retries=retries))
for attempt in range(retry_count):
try:
response = session.get(url, params=params, headers=headers, timeout=10)
if response.status_code == 200:
cookies_dict = response.cookies.get_dict()
s_JSESSIONID = '; '.join([f'{k}={v}' for k, v in cookies_dict.items()])
return s_JSESSIONID
else:
print(f"请求失败,状态码: {response.status_code}, 响应内容: {response.text}")
except requests.exceptions.RequestException as e:
print(f"请求失败 (尝试 {attempt + 1}/{retry_count}): {e}")
time.sleep(2) # 在重试前增加延迟
return None
#抽奖
def cj(jsessionid, retry_count=3):
url = "https://srv-app.taizhou.com.cn/tzrb/userAwardRecordUpgrade/saveUpdate"
payload = "activityId=67&sessionId=undefined&sig=undefined&token=undefined"
headers = {
'Host': 'srv-app.taizhou.com.cn',
'Connection': 'keep-alive',
'Content-Length': '63',
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
'Content-type': 'application/x-www-form-urlencoded',
'Accept': '*/*',
'Origin': 'https://srv-app.taizhou.com.cn',
'X-Requested-With': 'com.shangc.tiennews.taizhou',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://srv-app.taizhou.com.cn/luckdraw-ra-1/',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cookie': f'{jsessionid}'
}
# 创建一个包含重试策略的会话
session = requests.Session()
retries = Retry(total=4, backoff_factor=1, status_forcelist=[502, 503, 504])
session.mount('https://', HTTPAdapter(max_retries=retries))
for attempt in range(retry_count):
try:
response = session.post(url, data=payload, headers=headers, timeout=10)
if response.status_code == 200:
print(response.text)
display_draw_results(jsessionid)
return # 成功则退出函数
else:
print(f"POST 请求失败,状态码: {response.status_code}, 响应内容: {response.text}")
except requests.exceptions.RequestException as e:
print(f"POST 请求失败 (尝试 {attempt + 1}/{retry_count}): {e}")
time.sleep(2) # 在重试前增加延迟
#查询抽奖结果
def display_draw_results(cookies):
draw_result_headers = {
'Host': 'srv-app.taizhou.com.cn',
'Connection': 'keep-alive',
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
'Accept': '*/*',
'X-Requested-With': 'com.shangc.tiennews.taizhou',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://srv-app.taizhou.com.cn/luckdraw-awsc-231023/',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
'Cookie': f'{cookies}',
}
result_url = 'https://srv-app.taizhou.com.cn/tzrb/userAwardRecordUpgrade/pageList?pageSize=10&pageNum=1&activityId=67'
result_data = requests.get(result_url, headers=draw_result_headers).json()["data"]["records"]
for record in result_data:
create_time_str = str(record["createTime"])
award_name_str = str(record["awardName"])
print(f"{create_time_str}---------{award_name_str}")
# 从环境变量中读取账户和密码
accounts = os.getenv("wangchaoAccount")
if not accounts:
print("❌未找到环境变量!")
else:
accounts_list = accounts.split("&")
print(f"一共在环境变量中获取到 {len(accounts_list)} 个账号")
for account in accounts_list:
password, phone = account.split("#")
message, account_id, session_id, name = sign(phone, password)
deviceid = generate_random_uuid()
if account_id and session_id:
mobile = phone[:3] + "*" * 4 + phone[7:]
print(f"账号 {mobile} 登录成功")
special_cookie = get_special_cookie()
print(f"账号 {mobile} 获取阅读列表")
article_list = fetch_article_list()
for article in article_list['data']['articleIsReadList']:
article_title = article['title']
if article['isRead'] == True :
print(f"√文章{article_title}已读")
time.sleep(0.5)
continue
else:
time.sleep(random.uniform(3.5, 4.5))
article_id = article['id']
print(f"账号 {mobile} 阅读文章 {article_title}")
mark_article_as_read(article_id)
time.sleep(1)
jsessionid = login(account_id, session_id)
if jsessionid:
print('去抽奖')
cj(jsessionid)
else:
print(f"获取 JSESSIONID 失败")
else:
print(f"账号 {phone} 登录失败")
# 每个账号登录后延迟...
print("等待 5 秒后继续下一个账号...")
time.sleep(5)
print("所有账号处理完毕")

715
wxapp/bawangchaji.js Normal file
View File

@ -0,0 +1,715 @@
/*
霸王茶姬 v1.0.3
微信小程序-霸王茶姬
积分可以换券
授权注册后, webapi.qmai.cn 域名请求头里面的 Qm-User-Token, 填到变量 bwcjCookie 里面
多账号换行或@&隔开
export bwcjCookie="G3YT33xad2xxxxxxxxxxxxxxxxxx"
cron: 46 8,20 * * *
const $ = new Env("霸王茶姬");
*/
//Sat Jan 25 2025 08:29:02 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const _0x22822c = _0x2fbb6b("霸王茶姬"),
_0x30bd4a = require("got"),
_0x411cd3 = "bwcj",
_0x4e95c6 = /[\n\&\@]/,
_0x25b427 = [_0x411cd3 + "Cookie"],
_0x182083 = 20000,
_0xe9ef74 = 3,
_0x34947f = 1.02,
_0x5edf7d = "bwcj",
_0x3a487f = "https://leafxcy.coding.net/api/user/leafxcy/project/validcode/shared-depot/validCode/git/blob/master/code.json",
_0x51003c = "https://leafxcy.coding.net/api/user/leafxcy/project/validcode/shared-depot/validCode/git/blob/master/" + _0x5edf7d + ".json",
_0x36a3ce = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.40(0x18002831) NetType/WIFI Language/zh_CN",
_0x1adc03 = "https://servicewechat.com/wxafec6f8422cb357b/87/page-frame.html",
_0x50be96 = "wxafec6f8422cb357b",
_0x1f020e = 5;
class _0x4c79d9 {
constructor() {
this.index = _0x22822c.userIdx++;
this.name = "";
this.valid = false;
const _0x16f1db = {
"limit": 0
},
_0x41e123 = {
"Connection": "keep-alive"
},
_0x24ef82 = {
"retry": _0x16f1db,
"timeout": _0x182083,
"followRedirect": false,
"headers": _0x41e123
};
this.got = _0x30bd4a.extend(_0x24ef82);
}
["log"](_0x131350, _0x4fad5a = {}) {
var _0x196077 = "",
_0x45fd52 = _0x22822c.userCount.toString().length;
this.index && (_0x196077 += "账号[" + _0x22822c.padStr(this.index, _0x45fd52) + "]");
this.name && (_0x196077 += "[" + this.name + "]");
_0x22822c.log(_0x196077 + _0x131350, _0x4fad5a);
}
async ["request"](_0x2c476b) {
const _0x15a3b6 = ["ECONNRESET", "EADDRINUSE", "ENOTFOUND", "EAI_AGAIN"],
_0x57c026 = ["TimeoutError"];
var _0x2d2118 = null,
_0x43077e = 0,
_0x1692ef = _0x2c476b.fn || _0x2c476b.url;
_0x2c476b.method = _0x2c476b?.["method"]?.["toUpperCase"]() || "GET";
let _0x15759f;
while (_0x43077e < _0xe9ef74) {
try {
_0x43077e++;
_0x15759f = null;
let _0x5a4ec4 = null,
_0x1952e1 = _0x2c476b?.["timeout"] || this.got?.["defaults"]?.["options"]?.["timeout"]?.["request"] || _0x182083,
_0x59ef9f = false;
await new Promise(async _0x421556 => {
setTimeout(() => {
_0x59ef9f = true;
_0x421556();
}, _0x1952e1);
await this.got(_0x2c476b).then(_0x1d84cb => {
_0x2d2118 = _0x1d84cb;
}, _0x12ec6e => {
_0x5a4ec4 = _0x12ec6e;
_0x2d2118 = _0x12ec6e.response;
_0x15759f = _0x5a4ec4?.["code"];
});
_0x421556();
});
if (_0x59ef9f) {
this.log("[" + _0x1692ef + "]请求超时(" + _0x1952e1 / 1000 + "秒),重试第" + _0x43077e + "次");
} else {
{
if (_0x57c026.includes(_0x5a4ec4?.["name"])) this.log("[" + _0x1692ef + "]请求超时(" + _0x5a4ec4.code + "),重试第" + _0x43077e + "次");else {
if (_0x15a3b6.includes(_0x5a4ec4?.["code"])) {
this.log("[" + _0x1692ef + "]请求错误(" + _0x5a4ec4.code + "),重试第" + _0x43077e + "次");
} else {
let _0x499f44 = _0x2d2118?.["statusCode"] || 999,
_0x487bac = _0x499f44 / 100 | 0;
_0x487bac > 3 && this.log("请求[" + _0x1692ef + "]返回[" + _0x499f44 + "]");
if (_0x487bac <= 4) {
break;
}
}
}
}
}
} catch (_0x553de8) {
_0x553de8.name == "TimeoutError" ? this.log("[" + _0x1692ef + "]请求超时,重试第" + _0x43077e + "次") : this.log("[" + _0x1692ef + "]请求错误(" + _0x553de8.message + "),重试第" + _0x43077e + "次");
}
}
if (_0x2d2118 == null) return Promise.resolve({
"statusCode": _0x15759f || -1,
"headers": null,
"result": null
});
let {
statusCode: _0x15e772,
headers: _0x2501a2,
body: _0x204398
} = _0x2d2118;
if (_0x204398) try {
_0x204398 = JSON.parse(_0x204398);
} catch {}
const _0x21a81f = {
"statusCode": _0x15e772,
"headers": _0x2501a2,
"result": _0x204398
};
return Promise.resolve(_0x21a81f);
}
}
let _0x133ad6 = new _0x4c79d9();
class _0x5026b8 extends _0x4c79d9 {
constructor(_0x23d65b) {
super();
this.token = _0x23d65b;
this.got = this.got.extend({
"cookieJar": this.cookieJar,
"headers": {
"User-Agent": _0x36a3ce,
"work-wechat-userid": "",
"multi-store-id": "",
"gdt-vid": "",
"qz-gtd": "",
"scene": "1006",
"Qm-From": "wechat",
"store-id": 49006,
"Qm-User-Token": this.token,
"channelCode": "",
"Qm-From-Type": "catering",
"promotion-code": "",
"work-staff-name": "",
"work-staff-id": "",
"Accept": "v=1.0",
"Accept-Encoding": "gzip,compress,br,deflate",
"Referer": _0x1adc03
}
});
}
async ["personal_info"](_0x598608 = {}) {
let _0x24397b = false;
try {
const _0x496d1a = {
"appid": _0x50be96
},
_0x18d4d1 = {
"fn": "personal_info",
"method": "get",
"url": "https://webapi.qmai.cn/web/catering/crm/personal-info",
"searchParams": _0x496d1a
};
let {
result: _0x19b336,
statusCode: _0xdca021
} = await this.request(_0x18d4d1),
_0x1de7e8 = _0x22822c.get(_0x19b336, "code", _0xdca021);
if (_0x1de7e8 == 0) {
{
_0x24397b = this.valid = true;
let {
mobilePhone: _0x419254,
name: _0x5ab967
} = _0x19b336?.["data"];
this.name = _0x419254;
this.userName = _0x5ab967;
}
} else {
let _0x1a9fa8 = _0x22822c.get(_0x19b336, "message", "");
this.log("登录失败: " + _0x1a9fa8);
}
} catch (_0x5cc7a1) {
console.log(_0x5cc7a1);
} finally {
return _0x24397b;
}
}
async ["sign_detail"](_0x12d61d = {}) {
try {
{
const _0x4f8226 = {
"appid": _0x50be96
},
_0x5bc0c4 = {
"fn": "sign_detail",
"method": "post",
"url": "https://webapi.qmai.cn/web/catering/integral/sign/detail",
"json": _0x4f8226
};
let {
result: _0xdbe43a,
statusCode: _0x8c7f96
} = await this.request(_0x5bc0c4),
_0x57fa7a = _0x22822c.get(_0xdbe43a, "code", _0x8c7f96);
if (_0x57fa7a == 0) {
{
let {
continuityTotal: _0x2f384b,
signInDateList: _0x5e7d20,
activityId: _0x403c0d
} = _0xdbe43a?.["data"],
_0x5928f0 = false,
_0x20dde1 = _0x22822c.time("yyyy-MM-dd");
_0x5e7d20?.["includes"](_0x20dde1) && (_0x5928f0 = true);
this.log("旧版签到今天" + (_0x5928f0 ? "已" : "未") + "签到, 已连续签到" + _0x2f384b + "天");
!_0x5928f0 && (await this.signIn(_0x403c0d));
}
} else {
let _0x4f3aad = _0x22822c.get(_0xdbe43a, "message", "");
this.log("查询旧版签到失败[" + _0x57fa7a + "]: " + _0x4f3aad);
}
}
} catch (_0xfd690) {
console.log(_0xfd690);
}
}
async ["signIn"](_0xc779dc, _0x4c2bd6 = {}) {
try {
const _0x36f663 = {
"activityId": _0xc779dc,
"mobilePhone": this.name,
"userName": this.userName,
"appid": _0x50be96
},
_0x4568f1 = {
"fn": "signIn",
"method": "post",
"url": "https://webapi.qmai.cn/web/catering/integral/sign/signIn",
"json": _0x36f663
};
let {
result: _0x3d114b,
statusCode: _0x48d383
} = await this.request(_0x4568f1),
_0x568177 = _0x22822c.get(_0x3d114b, "code", _0x48d383);
if (_0x568177 == 0) {
{
const _0x16c8af = {
"notify": true
};
this.log("旧版签到成功", _0x16c8af);
}
} else {
let _0x27ff9f = _0x22822c.get(_0x3d114b, "message", "");
this.log("旧版签到失败[" + _0x568177 + "]: " + _0x27ff9f);
}
} catch (_0x2ac68e) {
console.log(_0x2ac68e);
}
}
async ["userSignStatistics"](_0x4bab26 = {}) {
try {
const _0x3e6e34 = {
"activityId": "947079313798000641",
"appid": _0x50be96
},
_0x13122a = {
"fn": "userSignStatistics",
"method": "post",
"url": "https://webapi.qmai.cn/web/cmk-center/sign/userSignStatistics",
"json": _0x3e6e34
};
let {
result: _0x594c54,
statusCode: _0x27479a
} = await this.request(_0x13122a),
_0x20ca00 = _0x22822c.get(_0x594c54, "code", _0x27479a);
if (_0x20ca00 == 0) {
{
let {
signDays: _0x585f14,
signStatus: _0x22aedb
} = _0x594c54?.["data"],
_0x4fd81b = _0x22aedb == 1;
this.log("新版签到今天" + (_0x4fd81b ? "已" : "未") + "签到, 已连续签到" + _0x585f14 + "天");
!_0x4fd81b && (await this.takePartInSign());
}
} else {
let _0x310cbd = _0x22822c.get(_0x594c54, "message", "");
this.log("查询新版签到失败[" + _0x20ca00 + "]: " + _0x310cbd);
}
} catch (_0x20b0e4) {
console.log(_0x20b0e4);
}
}
async ["takePartInSign"](_0x48efd6 = {}) {
try {
const _0x44b325 = {
"activityId": "947079313798000641",
"appid": _0x50be96
},
_0x2733ab = {
"fn": "takePartInSign",
"method": "post",
"url": "https://webapi.qmai.cn/web/cmk-center/sign/takePartInSign",
"json": _0x44b325
};
let {
result: _0x285c82,
statusCode: _0x148e52
} = await this.request(_0x2733ab),
_0x4f6bec = _0x22822c.get(_0x285c82, "code", _0x148e52);
if (_0x4f6bec == 0) {
{
const _0x3a28c6 = {
"notify": true
};
this.log("新版签到成功", _0x3a28c6);
}
} else {
let _0x439e4a = _0x22822c.get(_0x285c82, "message", "");
this.log("新版签到失败[" + _0x4f6bec + "]: " + _0x439e4a);
}
} catch (_0x57f683) {
console.log(_0x57f683);
}
}
async ["points_info"](_0x11c245 = {}) {
try {
const _0x4418a9 = {
"appid": _0x50be96
},
_0x4a3968 = {
"fn": "points_info",
"method": "post",
"url": "https://webapi.qmai.cn/web/catering/crm/points-info",
"json": _0x4418a9
};
let {
result: _0x333894,
statusCode: _0x41c61b
} = await this.request(_0x4a3968),
_0x4ac555 = _0x22822c.get(_0x333894, "code", _0x41c61b);
if (_0x4ac555 == 0) {
let {
soonExpiredPoints: _0x1ee018,
totalPoints: _0x5d3ffb,
expiredTime: _0x271e92
} = _0x333894?.["data"];
const _0x36151a = {
"notify": true
};
this.log("积分: " + _0x5d3ffb, _0x36151a);
if (_0x1ee018) {
const _0x1b318e = {
"notify": true
};
this.log("有" + _0x1ee018 + "积分将于[" + _0x271e92 + "]过期", _0x1b318e);
}
} else {
{
let _0x4f796a = _0x22822c.get(_0x333894, "message", "");
this.log("查询积分失败[" + _0x4ac555 + "]: " + _0x4f796a);
}
}
} catch (_0x333089) {
console.log(_0x333089);
}
}
async ["userTask"](_0x585f25 = {}) {
if (!(await this.personal_info())) {
return;
}
await this.sign_detail();
await this.userSignStatistics();
await this.points_info();
}
}
!(async () => {
_0x22822c.read_env(_0x5026b8);
for (let _0x481d4c of _0x22822c.userList) {
await _0x481d4c.userTask();
}
})().catch(_0x40193d => _0x22822c.log(_0x40193d)).finally(() => _0x22822c.exitNow());
async function _0x1300b9(_0x13b3c8 = 0) {
let _0x24ed10 = false;
try {
const _0x5742b3 = {
"fn": "auth",
"method": "get",
"url": _0x3a487f,
"timeout": 20000
};
let {
statusCode: _0xca4918,
result: _0x23869e
} = await _0x133ad6.request(_0x5742b3);
if (_0xca4918 != 200) {
_0x13b3c8++ < _0x1f020e && (_0x24ed10 = await _0x1300b9(_0x13b3c8));
return _0x24ed10;
}
if (_0x23869e?.["code"] == 0) {
_0x23869e = JSON.parse(_0x23869e.data.file.data);
if (_0x23869e?.["commonNotify"] && _0x23869e.commonNotify.length > 0) {
const _0x556cf9 = {
"notify": true
};
_0x22822c.log(_0x23869e.commonNotify.join("\n") + "\n", _0x556cf9);
}
_0x23869e?.["commonMsg"] && _0x23869e.commonMsg.length > 0 && _0x22822c.log(_0x23869e.commonMsg.join("\n") + "\n");
if (_0x23869e[_0x5edf7d]) {
{
let _0xf08380 = _0x23869e[_0x5edf7d];
_0xf08380.status == 0 ? _0x34947f >= _0xf08380.version ? (_0x24ed10 = true, _0x22822c.log(_0xf08380.msg[_0xf08380.status]), _0x22822c.log(_0xf08380.updateMsg), _0x22822c.log("现在运行的脚本版本是:" + _0x34947f + ",最新脚本版本:" + _0xf08380.latestVersion)) : _0x22822c.log(_0xf08380.versionMsg) : _0x22822c.log(_0xf08380.msg[_0xf08380.status]);
}
} else {
_0x22822c.log(_0x23869e.errorMsg);
}
} else _0x13b3c8++ < _0x1f020e && (_0x24ed10 = await _0x1300b9(_0x13b3c8));
} catch (_0xcd516c) {
_0x22822c.log(_0xcd516c);
} finally {
return _0x24ed10;
}
}
async function _0x449e65() {
let _0x2a3f7c = false;
try {
const _0x289fd7 = {
"fn": "auth",
"method": "get",
"url": _0x51003c
};
let {
statusCode: _0x5b19e8,
result: _0x5420a0
} = await _0x133ad6.request(_0x289fd7);
if (_0x5b19e8 != 200) {
return Promise.resolve();
}
if (_0x5420a0?.["code"] == 0) {
_0x5420a0 = JSON.parse(_0x5420a0.data.file.data);
ownerId = _0x5420a0?.["ownerId"] || ownerId;
share_app = _0x5420a0?.["share_app"] || share_app;
for (let _0x2a6212 of _0x5420a0.chdTask.simple) {
!task_chd_simple_list.filter(_0x2d0f4f => _0x2d0f4f.missionDefId == _0x2a6212.missionDefId && _0x2d0f4f.missionCollectionId == _0x2a6212.missionCollectionId).length && task_chd_simple_list.push(_0x2a6212);
}
for (let _0x323d3b of _0x5420a0.chdTask.pageview) {
!task_chd_pageview_list.filter(_0x5f5151 => _0x5f5151.missionDefId == _0x323d3b.missionDefId && _0x5f5151.missionCollectionId == _0x323d3b.missionCollectionId).length && task_chd_pageview_list.push(_0x323d3b);
}
for (let _0x55488a of _0x5420a0.tkjTask.simple) {
!task_tkj_simple_list.filter(_0x5c1c82 => _0x5c1c82.missionDefId == _0x55488a.missionDefId && _0x5c1c82.missionCollectionId == _0x55488a.missionCollectionId).length && task_tkj_simple_list.push(_0x55488a);
}
for (let _0x3a0b02 of _0x5420a0.tkjTask.pageview) {
!task_tkj_pageview_list.filter(_0x676cd6 => _0x676cd6.missionDefId == _0x3a0b02.missionDefId && _0x676cd6.missionCollectionId == _0x3a0b02.missionCollectionId).length && task_tkj_pageview_list.push(_0x3a0b02);
}
}
} catch (_0x2f90c3) {
_0x22822c.log(_0x2f90c3);
} finally {
return Promise.resolve(_0x2a3f7c);
}
}
function _0x2fbb6b(_0x5a60f2) {
return new class {
constructor(_0x550e45) {
this.name = _0x550e45;
this.startTime = Date.now();
const _0x5da069 = {
"time": true
};
this.log("[" + this.name + "]开始运行\n", _0x5da069);
this.notifyStr = [];
this.notifyFlag = true;
this.userIdx = 0;
this.userList = [];
this.userCount = 0;
this.default_timestamp_len = 13;
this.default_wait_interval = 1000;
this.default_wait_limit = 3600000;
this.default_wait_ahead = 0;
}
["log"](_0x5dd587, _0x28ad17 = {}) {
const _0xa88ce4 = {
"console": true
};
Object.assign(_0xa88ce4, _0x28ad17);
if (_0xa88ce4.time) {
let _0x4b5660 = _0xa88ce4.fmt || "hh:mm:ss";
_0x5dd587 = "[" + this.time(_0x4b5660) + "]" + _0x5dd587;
}
_0xa88ce4.notify && this.notifyStr.push(_0x5dd587);
_0xa88ce4.console && console.log(_0x5dd587);
}
["get"](_0xde4086, _0x22838d, _0x2abb13 = "") {
{
let _0x40cf9a = _0x2abb13;
_0xde4086?.["hasOwnProperty"](_0x22838d) && (_0x40cf9a = _0xde4086[_0x22838d]);
return _0x40cf9a;
}
}
["pop"](_0x4b85cf, _0x3962d5, _0x1069d0 = "") {
let _0x28a076 = _0x1069d0;
_0x4b85cf?.["hasOwnProperty"](_0x3962d5) && (_0x28a076 = _0x4b85cf[_0x3962d5], delete _0x4b85cf[_0x3962d5]);
return _0x28a076;
}
["copy"](_0x396bf8) {
return Object.assign({}, _0x396bf8);
}
["read_env"](_0x2e93f3) {
{
let _0x381a6b = _0x25b427.map(_0x47ab17 => process.env[_0x47ab17]);
for (let _0x43c049 of _0x381a6b.filter(_0x1285c3 => !!_0x1285c3)) {
for (let _0x46a19a of _0x43c049.split(_0x4e95c6).filter(_0x1a9a0b => !!_0x1a9a0b)) {
if (this.userList.includes(_0x46a19a)) continue;
this.userList.push(new _0x2e93f3(_0x46a19a));
}
}
this.userCount = this.userList.length;
if (!this.userCount) {
const _0x3608c4 = {
"notify": true
};
this.log("未找到变量,请检查变量" + _0x25b427.map(_0x357aa2 => "[" + _0x357aa2 + "]").join("或"), _0x3608c4);
return false;
}
this.log("共找到" + this.userCount + "个账号");
return true;
}
}
["time"](_0x3f533b, _0x4227ff = null) {
{
let _0x2c9a96 = _0x4227ff ? new Date(_0x4227ff) : new Date(),
_0x2f82c8 = {
"M+": _0x2c9a96.getMonth() + 1,
"d+": _0x2c9a96.getDate(),
"h+": _0x2c9a96.getHours(),
"m+": _0x2c9a96.getMinutes(),
"s+": _0x2c9a96.getSeconds(),
"q+": Math.floor((_0x2c9a96.getMonth() + 3) / 3),
"S": this.padStr(_0x2c9a96.getMilliseconds(), 3)
};
/(y+)/.test(_0x3f533b) && (_0x3f533b = _0x3f533b.replace(RegExp.$1, (_0x2c9a96.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let _0x58d9a1 in _0x2f82c8) new RegExp("(" + _0x58d9a1 + ")").test(_0x3f533b) && (_0x3f533b = _0x3f533b.replace(RegExp.$1, 1 == RegExp.$1.length ? _0x2f82c8[_0x58d9a1] : ("00" + _0x2f82c8[_0x58d9a1]).substr(("" + _0x2f82c8[_0x58d9a1]).length)));
return _0x3f533b;
}
}
async ["showmsg"]() {
{
if (!this.notifyFlag) return;
if (!this.notifyStr.length) return;
var _0x29aa8f = require("./sendNotify");
this.log("\n============== 推送 ==============");
await _0x29aa8f.sendNotify(this.name, this.notifyStr.join("\n"));
}
}
["padStr"](_0x3e358a, _0x3981da, _0x180e22 = {}) {
let _0x498d14 = _0x180e22.padding || "0",
_0x5623a2 = _0x180e22.mode || "l",
_0x6ddb3f = String(_0x3e358a),
_0xc35a53 = _0x3981da > _0x6ddb3f.length ? _0x3981da - _0x6ddb3f.length : 0,
_0x240fce = "";
for (let _0x4d8451 = 0; _0x4d8451 < _0xc35a53; _0x4d8451++) {
_0x240fce += _0x498d14;
}
_0x5623a2 == "r" ? _0x6ddb3f = _0x6ddb3f + _0x240fce : _0x6ddb3f = _0x240fce + _0x6ddb3f;
return _0x6ddb3f;
}
["json2str"](_0x69c92d, _0x3f4b18, _0x5a0d0f = false) {
let _0x4db271 = [];
for (let _0x1dda5e of Object.keys(_0x69c92d).sort()) {
{
let _0x428726 = _0x69c92d[_0x1dda5e];
_0x428726 && _0x5a0d0f && (_0x428726 = encodeURIComponent(_0x428726));
_0x4db271.push(_0x1dda5e + "=" + _0x428726);
}
}
return _0x4db271.join(_0x3f4b18);
}
["str2json"](_0x4ef120, _0x5116b7 = false) {
let _0x3ff4b1 = {};
for (let _0x2c2c0d of _0x4ef120.split("&")) {
if (!_0x2c2c0d) continue;
let _0x3f58d7 = _0x2c2c0d.indexOf("=");
if (_0x3f58d7 == -1) {
continue;
}
let _0x5c0461 = _0x2c2c0d.substr(0, _0x3f58d7),
_0x324223 = _0x2c2c0d.substr(_0x3f58d7 + 1);
_0x5116b7 && (_0x324223 = decodeURIComponent(_0x324223));
_0x3ff4b1[_0x5c0461] = _0x324223;
}
return _0x3ff4b1;
}
["randomPattern"](_0x16140f, _0x213ac1 = "abcdef0123456789") {
let _0x16b674 = "";
for (let _0xc4493c of _0x16140f) {
{
if (_0xc4493c == "x") _0x16b674 += _0x213ac1.charAt(Math.floor(Math.random() * _0x213ac1.length));else {
_0xc4493c == "X" ? _0x16b674 += _0x213ac1.charAt(Math.floor(Math.random() * _0x213ac1.length)).toUpperCase() : _0x16b674 += _0xc4493c;
}
}
}
return _0x16b674;
}
["randomUuid"]() {
return this.randomPattern("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
}
["randomString"](_0x3b342b, _0xb68c8b = "abcdef0123456789") {
let _0x5555ab = "";
for (let _0xcaef55 = 0; _0xcaef55 < _0x3b342b; _0xcaef55++) {
_0x5555ab += _0xb68c8b.charAt(Math.floor(Math.random() * _0xb68c8b.length));
}
return _0x5555ab;
}
["randomList"](_0x470a5f) {
let _0x411d03 = Math.floor(Math.random() * _0x470a5f.length);
return _0x470a5f[_0x411d03];
}
["wait"](_0x5c7c0c) {
return new Promise(_0x3351a0 => setTimeout(_0x3351a0, _0x5c7c0c));
}
async ["exitNow"]() {
await this.showmsg();
let _0x18decd = Date.now(),
_0x430aef = (_0x18decd - this.startTime) / 1000;
this.log("");
const _0xd410dc = {
"time": true
};
this.log("[" + this.name + "]运行结束,共运行了" + _0x430aef + "秒", _0xd410dc);
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
console.log("=>=>=>=>____来自 By 幼稚园小妹妹 (顶级插件售后服务951584089)丨Autman订阅源:Lxg-021002丨期待为您服务<=<=<=<=");
process.exit(0);
}
["normalize_time"](_0x22f45c, _0x55a4f8 = {}) {
{
let _0x264a22 = _0x55a4f8.len || this.default_timestamp_len;
_0x22f45c = _0x22f45c.toString();
let _0x552842 = _0x22f45c.length;
while (_0x552842 < _0x264a22) {
_0x22f45c += "0";
}
_0x552842 > _0x264a22 && (_0x22f45c = _0x22f45c.slice(0, 13));
return parseInt(_0x22f45c);
}
}
async ["wait_until"](_0xe30940, _0x5833a2 = {}) {
let _0x417d24 = _0x5833a2.logger || this,
_0x4d19f9 = _0x5833a2.interval || this.default_wait_interval,
_0x126ddf = _0x5833a2.limit || this.default_wait_limit,
_0x852c0e = _0x5833a2.ahead || this.default_wait_ahead;
if (typeof _0xe30940 == "string" && _0xe30940.includes(":")) {
{
if (_0xe30940.includes("-")) _0xe30940 = new Date(_0xe30940).getTime();else {
let _0x4bd7fc = this.time("yyyy-MM-dd ");
_0xe30940 = new Date(_0x4bd7fc + _0xe30940).getTime();
}
}
}
let _0x5de99b = this.normalize_time(_0xe30940) - _0x852c0e,
_0x2a58dd = this.time("hh:mm:ss.S", _0x5de99b),
_0x3d2ee4 = Date.now();
_0x3d2ee4 > _0x5de99b && (_0x5de99b += 86400000);
let _0x5f0c85 = _0x5de99b - _0x3d2ee4;
if (_0x5f0c85 > _0x126ddf) {
const _0x48e0d9 = {
"time": true
};
_0x417d24.log("离目标时间[" + _0x2a58dd + "]大于" + _0x126ddf / 1000 + "秒,不等待", _0x48e0d9);
} else {
{
const _0x2536f0 = {
"time": true
};
_0x417d24.log("离目标时间[" + _0x2a58dd + "]还有" + _0x5f0c85 / 1000 + "秒,开始等待", _0x2536f0);
while (_0x5f0c85 > 0) {
{
let _0x138b1c = Math.min(_0x5f0c85, _0x4d19f9);
await this.wait(_0x138b1c);
_0x3d2ee4 = Date.now();
_0x5f0c85 = _0x5de99b - _0x3d2ee4;
}
}
const _0x6e1051 = {
"time": true
};
_0x417d24.log("已完成等待", _0x6e1051);
}
}
}
async ["wait_gap_interval"](_0x5f35a4, _0x3c7f4a) {
{
let _0x52cef1 = Date.now() - _0x5f35a4;
_0x52cef1 < _0x3c7f4a && (await this.wait(_0x3c7f4a - _0x52cef1));
}
}
}(_0x5a60f2);
}

View File

@ -8,7 +8,7 @@
*/
const $ = new Env("wx_庙友之家");
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "miaoyouHome";
let envSplitor = ["@", "\n"]; //多账号分隔符
let strSplitor = "&"; //多变量分隔符

View File

@ -26,7 +26,7 @@ hostname =
const $ = new Env("微信小程序泡泡玛特");
let ckName = `paopaomate`
let userCookie = checkEnv($.isNode() ? process.env[ckName] : "");
const notify = $.isNode() ? require("./sendNotify") : "";
const notify = $.isNode() ? require("../sendNotify") : "";

View File

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

File diff suppressed because one or more lines are too long

View File

@ -18,7 +18,7 @@ const $ = new Env("高济健康pro小程序签到");
const ckName = "wx_gjjkpro_data";
//-------------------- 一般不动变量区域 -------------------------------------
const Notify = 1; //0为关闭通知,1为打开通知,默认为1
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let debug = 1; //Debug调试 0关闭 1开启
let envSplitor = ["@"]; //多账号分隔符
let ck = msg = ''; //let ck,msg

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
*/
const $ = new Env("微信小程序-莱充充电");
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "wx_lccd";
let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符

View File

@ -8,7 +8,7 @@
*/
const $ = new Env("微信小程序 - 美的会员");
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "wx_midea";
let envSplitor = ["@", "\n"]; //多账号分隔符
let strSplitor = "&"; //多变量分隔符

View File

@ -10,7 +10,7 @@
*/
const $ = new Env("微信小程序_骁龙骁友会");
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "wx_xlxyh";
let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符

View File

@ -8,7 +8,7 @@
*/
const $ = new Env("微信小程序ZIWI+");
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "ZIWIAUTH";
let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符

View File

@ -1,6 +1,6 @@
/**
*
* Xbox俱乐部
* Xbox俱乐部 微信小程序
*
* cron 0 0,7 * * * xbox_v2.js
* 多账号并行执行任务模板V2
@ -8,7 +8,7 @@
*/
//=====================================================//
const $ = new Env("xbox俱乐部V2");
const notify = $.isNode() ? require("./sendNotify") : "";
const notify = $.isNode() ? require("../sendNotify") : "";
const Notify = 1
const debug = 0
let ckStr = ($.isNode() ? process.env.xbox_data : $.getdata('xbox_data')) || ''; //检测CK 外部
@ -212,7 +212,7 @@ async function SendMsg(message) {
if (!message) return;
if (Notify > 0) {
if ($.isNode()) {
var notify = require("./sendNotify");
var notify = require("../sendNotify");
await notify.sendNotify($.name, message);
} else {
// $.msg(message);

File diff suppressed because one or more lines are too long

View File

@ -146,7 +146,7 @@ class UserInfo {
// 入口
!(async () => {
const notify = require("./sendNotify");
const notify = require("../sendNotify");
$.doubleLog(await $.yiyan());
let users = await getUsers(CK_NAME, async (index, element) => {
let userInfo = new UserInfo(index, element);
@ -382,7 +382,7 @@ function Env(name, env) {
if (!message) return;
if (Notify > 0) {
if ($.isNode()) {
var notify = require("./sendNotify");
var notify = require("../sendNotify");
await notify.sendNotify($.name, message);
} else {
console.log($.name, "", message);

956
wxapp/zhanma.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@
*/
const $ = new Env("杰士邦安心福利社-小程序");
const notify = $.isNode() ? require('./sendNotify') : '';
const notify = $.isNode() ? require('../sendNotify') : '';
let ckName = "jsbaxfls";
let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符

481
wxapp/植白说.js Normal file
View File

@ -0,0 +1,481 @@
/**
* 植白说v1.0
* const $ = new Env("植白说");
* cron 10 6,15 * * * 植白说.js
*
* ========= 青龙--配置文件 ===========
* # 项目名称
* export zbsxcx='X-Dts-Token'
* 抓包请求 https://zbs.20171026.com/demo/取出X-Dts-Token
* 多账号换行@ & 隔开
* 说明根据群友Maric提示恢复脚本貌似是随着时间token有效期会越来越长
* 奖励签到/分享 牛奶活动
* 注册入口#小程序://植白说/cIiT4iMItmJ1EZi
* ====================================
*
*/
//Sat Jan 25 2025 08:30:22 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const _0x3065e9 = new _0x14a79b("植白说");
let _0x594a0a = "zbsxcx",
_0x1ad327 = ["\n", "&", "@"],
_0x5d9ea2 = (_0x3065e9.isNode() ? process.env[_0x594a0a] : _0x3065e9.getdata(_0x594a0a)) || "",
_0x23139a = [],
_0x5845aa = 0;
class _0x4f7def {
constructor(_0x44f7e1) {
this.index = ++_0x5845aa;
this.valid = false;
this.activedAuthToken = _0x44f7e1;
}
async ["taskApi"](_0x8df8fd, _0x52db04, _0x5ede90, _0x1961e6) {
let _0x11a1db = null;
try {
let _0x19ca83 = {
"url": _0x5ede90,
"headers": {
"X-DTS-Token": this.activedAuthToken,
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/8237",
"xweb_xhr": "1"
},
"timeout": 60000,
"rejectUnauthorized": false
};
if (_0x1961e6) {
_0x19ca83.body = _0x1961e6;
_0x19ca83.headers["Content-Length"] = _0x1961e6?.["length"];
}
await _0x2ef80e(_0x52db04, _0x19ca83).then(async _0xe0f650 => {
{
if (_0xe0f650.resp?.["statusCode"] == 200) {
if (_0xe0f650.resp?.["body"]) _0x11a1db = JSON.parse(_0xe0f650.resp.body);else {}
} else console.log("账号[" + this.index + "]调用" + _0x52db04 + "[" + _0x8df8fd + "]出错,返回状态码[" + (_0xe0f650.resp?.["statusCode"] || "") + "]", "返回结果:", _0xe0f650.resp?.["body"]);
}
});
} catch (_0x4fad44) {
console.log(_0x4fad44);
} finally {
return Promise.resolve(_0x11a1db);
}
}
async ["Sign"]() {
try {
{
let _0x4a533a = "Sign",
_0x420ae1 = "get",
_0x1fbcef = "https://zbs.20171026.com/demo/wx/home/signDay",
_0x1c108f = "";
return await this.taskApi(_0x4a533a, _0x420ae1, _0x1fbcef, _0x1c108f).then(async _0x136d6b => {
{
if (_0x136d6b?.["errno"] === 0) return console.log("账号[" + this.index + "] 签到成功,签到次数:" + _0x136d6b?.["data"]?.["signCount"] + ",积分余额: " + _0x136d6b?.["data"]?.["integral"]), this.valid = true, true;else _0x3065e9.logAndNotify("账号[" + this.index + "] - 积分签到失败:" + (_0x136d6b?.["errmsg"] || JSON.stringify(_0x136d6b))), this.valid = false;
}
});
}
} catch (_0x396548) {
console.log(_0x396548);
}
}
async ["Share"]() {
try {
let _0x33e5b6 = "Share",
_0x2bff16 = "get",
_0x3f4521 = "https://zbs.20171026.com/demo/wx/user/addIntegralByShare",
_0x4d3189 = "";
return await this.taskApi(_0x33e5b6, _0x2bff16, _0x3f4521, _0x4d3189).then(async _0x5d0bf3 => {
{
if (_0x5d0bf3?.["errno"] === 0) {
console.log("账号[" + this.index + "] 分享成功,增加 1 积分");
return true;
} else {
_0x3065e9.logAndNotify("账号[" + this.index + "] - 分享失败:" + (_0x5d0bf3?.["errmsg"] || JSON.stringify(_0x5d0bf3)));
}
}
});
} catch (_0x1f98fa) {
console.log(_0x1f98fa);
}
}
async ["doTask"]() {
try {
console.log("\n============= 账号[" + this.index + "] 开始执行 分享任务=============");
await _0x3065e9.wait(Math.random() * 200);
for (let _0x50253a = 0; _0x50253a < 3; _0x50253a++) {
await this.Share();
await _0x3065e9.wait(Math.random() * 1000);
}
} catch (_0x2b25f0) {
console.log(_0x2b25f0);
}
}
}
!(async () => {
if (typeof $request !== "undefined") await _0x1b91d9();else {
if (!(await _0x2f2542())) return;
console.log("\n================ 开始执行 ================");
for (let _0x19ed95 of _0x23139a) {
console.log("----------- 执行 第 [" + _0x19ed95.index + "] 个账号 -----------");
await _0x19ed95.Sign();
await _0x3065e9.wait(Math.random() * 200);
}
let _0x7fb3c1 = _0x23139a.filter(_0x2bd556 => _0x2bd556.valid);
if (_0x7fb3c1.length > 0) {
console.log("\n================ 任务队列构建完毕 ================");
for (let _0x249a61 of _0x7fb3c1) {
console.log("----------- 账号[" + _0x249a61.index + "] -----------");
await _0x249a61.doTask();
}
} else {
console.log("\n====幻生提示:无可用账号,请检查配置============ 任务结束 ================");
}
await _0x3065e9.showmsg();
}
})().catch(_0x3de5ae => console.log(_0x3de5ae)).finally(() => _0x3065e9.done());
async function _0x1b91d9() {}
async function _0x2f2542() {
if (_0x5d9ea2) {
{
let _0x506c52 = _0x1ad327[0];
for (let _0x16a0d0 of _0x1ad327) {
if (_0x5d9ea2.indexOf(_0x16a0d0) > -1) {
{
_0x506c52 = _0x16a0d0;
break;
}
}
}
for (let _0x2460f4 of _0x5d9ea2.split(_0x506c52)) {
{
if (_0x2460f4) _0x23139a.push(new _0x4f7def(_0x2460f4));
}
}
userCount = _0x23139a.length;
}
} else {
console.log("未找到 配置信息,请检查是否配置 变量:", _0x594a0a);
return;
}
console.log("共找到" + userCount + "个账号");
return true;
}
async function _0x2ef80e(_0x22e525, _0xf7da77) {
httpErr = null;
httpReq = null;
httpResp = null;
return new Promise(_0x1e7c15 => {
_0x3065e9.send(_0x22e525, _0xf7da77, async (_0x1a63ab, _0x304b42, _0x47c7a2) => {
httpErr = _0x1a63ab;
httpReq = _0x304b42;
httpResp = _0x47c7a2;
_0x1e7c15({
"err": _0x1a63ab,
"req": _0x304b42,
"resp": _0x47c7a2
});
});
});
}
function _0x14a79b(_0x4038d3, _0x4c648e) {
"undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
return new class {
constructor(_0xc41156, _0x297ded) {
this.name = _0xc41156;
this.notifyStr = "";
this.startTime = new Date().getTime();
Object.assign(this, _0x297ded);
console.log(this.name + " 开始运行:\n");
}
["isNode"]() {
return "undefined" != typeof module && !!module.exports;
}
["isQuanX"]() {
return "undefined" != typeof $task;
}
["isSurge"]() {
return "undefined" != typeof $httpClient && "undefined" == typeof $loon;
}
["isLoon"]() {
return "undefined" != typeof $loon;
}
["getdata"](_0x1c89dc) {
let _0x5f3c83 = this.getval(_0x1c89dc);
if (/^@/.test(_0x1c89dc)) {
const [, _0x4b7142, _0x5ba969] = /^@(.*?)\.(.*?)$/.exec(_0x1c89dc),
_0x45f3e6 = _0x4b7142 ? this.getval(_0x4b7142) : "";
if (_0x45f3e6) try {
const _0x1de99b = JSON.parse(_0x45f3e6);
_0x5f3c83 = _0x1de99b ? this.lodash_get(_0x1de99b, _0x5ba969, "") : _0x5f3c83;
} catch (_0xb8b62e) {
_0x5f3c83 = "";
}
}
return _0x5f3c83;
}
["setdata"](_0x90cff, _0x59643e) {
{
let _0x28ca60 = false;
if (/^@/.test(_0x59643e)) {
const [, _0x38c422, _0x26c375] = /^@(.*?)\.(.*?)$/.exec(_0x59643e),
_0x14a0cc = this.getval(_0x38c422),
_0x10f203 = _0x38c422 ? "null" === _0x14a0cc ? null : _0x14a0cc || "{}" : "{}";
try {
const _0x1b9f14 = JSON.parse(_0x10f203);
this.lodash_set(_0x1b9f14, _0x26c375, _0x90cff);
_0x28ca60 = this.setval(JSON.stringify(_0x1b9f14), _0x38c422);
} catch (_0x4ce4bd) {
const _0x4defda = {};
this.lodash_set(_0x4defda, _0x26c375, _0x90cff);
_0x28ca60 = this.setval(JSON.stringify(_0x4defda), _0x38c422);
}
} else {
_0x28ca60 = this.setval(_0x90cff, _0x59643e);
}
return _0x28ca60;
}
}
["getval"](_0x4e2aac) {
return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x4e2aac) : this.isQuanX() ? $prefs.valueForKey(_0x4e2aac) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x4e2aac]) : this.data && this.data[_0x4e2aac] || null;
}
["setval"](_0x4901e5, _0xdb3502) {
return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x4901e5, _0xdb3502) : this.isQuanX() ? $prefs.setValueForKey(_0x4901e5, _0xdb3502) : this.isNode() ? (this.data = this.loaddata(), this.data[_0xdb3502] = _0x4901e5, this.writedata(), true) : this.data && this.data[_0xdb3502] || null;
}
["send"](_0x528a53, _0x1062b7, _0x3a681d = () => {}) {
{
if (_0x528a53 != "get" && _0x528a53 != "post" && _0x528a53 != "put" && _0x528a53 != "delete") {
console.log("无效的http方法" + _0x528a53);
return;
}
if (_0x528a53 == "get" && _0x1062b7.headers) delete _0x1062b7.headers["Content-Type"], delete _0x1062b7.headers["Content-Length"];else {
if (_0x1062b7.body && _0x1062b7.headers) {
{
if (!_0x1062b7.headers["Content-Type"]) _0x1062b7.headers["Content-Type"] = "application/x-www-form-urlencoded";
}
}
}
if (this.isSurge() || this.isLoon()) {
this.isSurge() && this.isNeedRewrite && (_0x1062b7.headers = _0x1062b7.headers || {}, Object.assign(_0x1062b7.headers, {
"X-Surge-Skip-Scripting": false
}));
let _0x55f76d = {
"method": _0x528a53,
"url": _0x1062b7.url,
"headers": _0x1062b7.headers,
"timeout": _0x1062b7.timeout,
"data": _0x1062b7.body
};
if (_0x528a53 == "get") delete _0x55f76d.data;
$axios(_0x55f76d).then(_0x3f3966 => {
const {
status: _0x29a846,
request: _0x2ad2aa,
headers: _0x5cc4bd,
data: _0x161f35
} = _0x3f3966;
_0x3a681d(null, _0x2ad2aa, {
"statusCode": _0x29a846,
"headers": _0x5cc4bd,
"body": _0x161f35
});
}).catch(_0x238377 => console.log(_0x238377));
} else {
if (this.isQuanX()) _0x1062b7.method = _0x528a53.toUpperCase(), this.isNeedRewrite && (_0x1062b7.opts = _0x1062b7.opts || {}, Object.assign(_0x1062b7.opts, {
"hints": false
})), $task.fetch(_0x1062b7).then(_0x3b8bbe => {
const {
statusCode: _0x2fc1ac,
request: _0x5f6740,
headers: _0x34d4ad,
body: _0x37fbc7
} = _0x3b8bbe;
_0x3a681d(null, _0x5f6740, {
"statusCode": _0x2fc1ac,
"headers": _0x34d4ad,
"body": _0x37fbc7
});
}, _0x361920 => _0x3a681d(_0x361920));else {
if (this.isNode()) {
this.got = this.got ? this.got : require("got");
const {
url: _0x325d9c,
..._0xf7af76
} = _0x1062b7;
this.instance = this.got.extend({
"followRedirect": false
});
this.instance[_0x528a53](_0x325d9c, _0xf7af76).then(_0x18383d => {
const {
statusCode: _0xf07db0,
request: _0x532d1a,
headers: _0x1dc0d4,
body: _0x4984e8
} = _0x18383d;
_0x3a681d(null, _0x532d1a, {
"statusCode": _0xf07db0,
"headers": _0x1dc0d4,
"body": _0x4984e8
});
}, _0x2e49ed => {
const {
message: _0x2df36f,
request: _0x5340cf,
response: _0xdeebdf
} = _0x2e49ed;
_0x3a681d(_0x2df36f, _0x5340cf, _0xdeebdf);
});
}
}
}
}
}
["time"](_0x4ddd19, _0x3d004a = null) {
{
let _0x3d0303 = _0x3d004a ? new Date(_0x3d004a) : new Date(),
_0x1c5845 = {
"M+": _0x3d0303.getMonth() + 1,
"d+": _0x3d0303.getDate(),
"h+": _0x3d0303.getHours(),
"m+": _0x3d0303.getMinutes(),
"s+": _0x3d0303.getSeconds(),
"q+": Math.floor((_0x3d0303.getMonth() + 3) / 3),
"S": _0x3d0303.getMilliseconds()
};
/(y+)/.test(_0x4ddd19) && (_0x4ddd19 = _0x4ddd19.replace(RegExp.$1, (_0x3d0303.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let _0x4df8e7 in _0x1c5845) new RegExp("(" + _0x4df8e7 + ")").test(_0x4ddd19) && (_0x4ddd19 = _0x4ddd19.replace(RegExp.$1, 1 == RegExp.$1.length ? _0x1c5845[_0x4df8e7] : ("00" + _0x1c5845[_0x4df8e7]).substr(("" + _0x1c5845[_0x4df8e7]).length)));
return _0x4ddd19;
}
}
async ["showmsg"]() {
{
if (!this.notifyStr) return;
let _0x3d3a83 = this.name + " 运行通知\n\n" + this.notifyStr;
if (_0x3065e9.isNode()) {
{
var _0x3a245e = require("./sendNotify");
console.log("\n============== 推送 ==============");
await _0x3a245e.sendNotify(this.name, _0x3d3a83);
}
} else this.msg(_0x3d3a83);
}
}
["logAndNotify"](_0x58012f) {
console.log(_0x58012f);
this.notifyStr += _0x58012f;
this.notifyStr += "\n";
}
["logAndNotifyWithTime"](_0xeaf4b1) {
let _0x414567 = "[" + this.time("hh:mm:ss.S") + "]" + _0xeaf4b1;
console.log(_0x414567);
this.notifyStr += _0x414567;
this.notifyStr += "\n";
}
["logWithTime"](_0x5291da) {
console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x5291da);
}
["msg"](_0x51fea4 = t, _0x215cb5 = "", _0x474402 = "", _0x42a5dd) {
const _0x3d6f7a = _0x163e67 => {
{
if (!_0x163e67) return _0x163e67;
if ("string" == typeof _0x163e67) return this.isLoon() ? _0x163e67 : this.isQuanX() ? {
"open-url": _0x163e67
} : this.isSurge() ? {
"url": _0x163e67
} : undefined;
if ("object" == typeof _0x163e67) {
if (this.isLoon()) {
let _0x2d5c4a = _0x163e67.openUrl || _0x163e67.url || _0x163e67["open-url"],
_0x12a18e = _0x163e67.mediaUrl || _0x163e67["media-url"];
return {
"openUrl": _0x2d5c4a,
"mediaUrl": _0x12a18e
};
}
if (this.isQuanX()) {
let _0x1e62a6 = _0x163e67["open-url"] || _0x163e67.url || _0x163e67.openUrl,
_0x5c34e8 = _0x163e67["media-url"] || _0x163e67.mediaUrl;
return {
"open-url": _0x1e62a6,
"media-url": _0x5c34e8
};
}
if (this.isSurge()) {
let _0x178770 = _0x163e67.url || _0x163e67.openUrl || _0x163e67["open-url"];
return {
"url": _0x178770
};
}
}
}
};
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x51fea4, _0x215cb5, _0x474402, _0x3d6f7a(_0x42a5dd)) : this.isQuanX() && $notify(_0x51fea4, _0x215cb5, _0x474402, _0x3d6f7a(_0x42a5dd)));
let _0x15ca2e = ["", "============== 系统通知 =============="];
_0x15ca2e.push(_0x51fea4);
_0x215cb5 && _0x15ca2e.push(_0x215cb5);
_0x474402 && _0x15ca2e.push(_0x474402);
console.log(_0x15ca2e.join("\n"));
}
["getMin"](_0x434bc7, _0x32c083) {
return _0x434bc7 < _0x32c083 ? _0x434bc7 : _0x32c083;
}
["getMax"](_0x4d3798, _0x166dff) {
return _0x4d3798 < _0x166dff ? _0x166dff : _0x4d3798;
}
["padStr"](_0x163393, _0x4fb87b, _0x56aecc = "0") {
{
let _0x5cdeb2 = String(_0x163393),
_0xd26033 = _0x4fb87b > _0x5cdeb2.length ? _0x4fb87b - _0x5cdeb2.length : 0,
_0x111cf7 = "";
for (let _0x5ebe0b = 0; _0x5ebe0b < _0xd26033; _0x5ebe0b++) {
_0x111cf7 += _0x56aecc;
}
_0x111cf7 += _0x5cdeb2;
return _0x111cf7;
}
}
["json2str"](_0x5eff15, _0x47bb6a, _0x2a6962 = false) {
let _0x59e08a = [];
for (let _0x4817da of Object.keys(_0x5eff15).sort()) {
{
let _0xf5e3d8 = _0x5eff15[_0x4817da];
if (_0xf5e3d8 && _0x2a6962) _0xf5e3d8 = encodeURIComponent(_0xf5e3d8);
_0x59e08a.push(_0x4817da + "=" + _0xf5e3d8);
}
}
return _0x59e08a.join(_0x47bb6a);
}
["str2json"](_0x31a48d, _0x36c2e8 = false) {
let _0x2cde0e = {};
for (let _0x5b6e8d of _0x31a48d.split("&")) {
if (!_0x5b6e8d) continue;
let _0x5742d9 = _0x5b6e8d.indexOf("=");
if (_0x5742d9 == -1) continue;
let _0x2f6ff9 = _0x5b6e8d.substr(0, _0x5742d9),
_0x2f8540 = _0x5b6e8d.substr(_0x5742d9 + 1);
if (_0x36c2e8) _0x2f8540 = decodeURIComponent(_0x2f8540);
_0x2cde0e[_0x2f6ff9] = _0x2f8540;
}
return _0x2cde0e;
}
["randomString"](_0x1826b2, _0x2926dc = "abcdef0123456789") {
let _0x11a90c = "";
for (let _0x1ed771 = 0; _0x1ed771 < _0x1826b2; _0x1ed771++) {
_0x11a90c += _0x2926dc.charAt(Math.floor(Math.random() * _0x2926dc.length));
}
return _0x11a90c;
}
["randomList"](_0x3808ec) {
let _0x129ec9 = Math.floor(Math.random() * _0x3808ec.length);
return _0x3808ec[_0x129ec9];
}
["wait"](_0x41414e) {
return new Promise(_0x310013 => setTimeout(_0x310013, _0x41414e));
}
["done"](_0x5aad77 = {}) {
const _0x2634cb = new Date().getTime(),
_0x53d433 = (_0x2634cb - this.startTime) / 1000;
console.log("\n" + this.name + " 运行结束,共运行了 " + _0x53d433 + " 秒!");
if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x5aad77);
}
}(_0x4038d3, _0x4c648e);
}

570
wxapp/海尔-卡萨帝.js Normal file
View File

@ -0,0 +1,570 @@
/**
* 海尔 - 卡萨帝小程序 签到抽奖
* cron 10 8 * * * 海尔-卡萨帝.js
*
* ========= 青龙--配置文件 ===========
* # 项目名称
* export ksd='你抓包的UserToken#请求Body里的openId'
* 自己抓包 /user/userCenter/saveUserSource请求协议头上的MK-U-User-Token
* 请求数据里的 openId
* # 连接
* 多账号换行或&隔开
* 奖励现金红包
*
* ====================================
*
*/
//Sat Jan 25 2025 08:32:06 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const $ = new Env("卡萨帝小程序");
let envParams = "ksd",
envSplitor = ["\n", "&"],
authorizationToken = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || "",
initedJobForTokens = [],
currentUserIndex = 0,
contentType = "application/json;charset=UTF-8",
defaultUA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/6945",
Referer = "https://yx.jsh.com/game/signInIndex?employeeId=&playId=20";
const https = require("https");
class JobTask {
constructor(_0x55d5be) {
this.index = ++currentUserIndex;
this.points = 0;
this.valid = false;
try {
[this.activedAuthToken, this.openId] = _0x55d5be?.["split"]("#");
} catch (_0x5cde09) {
this.activedAuthToken = _0x55d5be;
}
}
async ["taskApi"](_0x53ede5, _0x2127bc, _0x2c79b5, _0x31d84a, _0x232dd9 = {}) {
let _0x41e367 = null;
try {
let _0x235e01 = _0x2c79b5.replace("//", "/").split("/")[1],
_0x49cb17 = {
"url": _0x2c79b5,
"headers": {
"Accept": "application/json, text/plain, */*",
"Authorization": this.activedAuthToken,
"Host": _0x235e01,
"Connection": "keep-alive",
"Content-Type": contentType,
"User-Agent": defaultUA,
"Referer": Referer,
"MK-Source-Code": "casarte",
"MK-U-App-Code": "gUsb9sx0eXEdMuc",
"MK-U-User-Token": this.activedAuthToken,
..._0x232dd9
},
"timeout": 60000
};
if (_0x31d84a) {
_0x49cb17.body = _0x31d84a;
}
await httpRequest(_0x2127bc, _0x49cb17).then(async _0x591ac9 => {
if (_0x591ac9.resp?.["statusCode"] == 200) {
_0x591ac9.resp?.["body"] ? _0x41e367 = JSON.parse(_0x591ac9.resp.body) : console.log("账号[" + this.index + "]调用" + _0x2127bc + "[" + _0x53ede5 + "]出错,返回为空");
} else console.log("账号[" + this.index + "]调用" + _0x2127bc + "[" + _0x53ede5 + "]出错,返回状态码[" + (_0x591ac9.resp?.["statusCode"] || "") + "]");
});
} catch (_0x38b370) {
console.log(_0x38b370);
} finally {
return Promise.resolve(_0x41e367);
}
}
async ["GetUserInfo"]() {
try {
{
let _0x1ed441 = "GetUserInfo",
_0x201f80 = "post",
_0x5e3710 = "https://mk-gift.haier.net/qy/customer/api/redEnvelope/queryRedEnvelopeWallet",
_0x5ade36 = "{\"redSource\":\"\"}";
await this.taskApi(_0x1ed441, _0x201f80, _0x5e3710, _0x5ade36, {
"Content-Type": "application/json"
}).then(async _0x29ca70 => {
console.log("result:", _0x29ca70);
_0x29ca70.code === 200 ? (this.valid = true, this.points = Number(_0x29ca70.data.cash_available), console.log("账号[" + this.index + "] 登录成功"), console.log("账号[" + this.index + "] 当前余额: " + this.points)) : $.logAndNotify("账号[" + this.index + "]查询余额失败,可能帐号无效");
});
}
} catch (_0x670981) {
console.log(_0x670981);
} finally {
return Promise.resolve(1);
}
}
async ["SignInDaily"]() {
try {
{
let _0x226da3 = "SignInDaily",
_0x79792e = "post",
_0xb36903 = "https://yx.jsh.com/customer/api/user/playingMethod/game/saveClockInInfoByUserId",
_0x541af5 = "{\"playId\":\"20\",\"employeeId\":\"\",\"mobile\":\"\",\"openId\":\"" + this.openId + "\",\"parentUserId\":\"\",\"userId\":\"\"}";
await this.taskApi(_0x226da3, _0x79792e, _0xb36903, _0x541af5).then(async _0x25b135 => {
console.log("result:", _0x25b135);
_0x25b135.code === 200 ? (console.log("账号[" + this.index + "] 签到成功,获得" + _0x25b135.data / 100 + "元"), _0x25b135.data && (this.points += _0x25b135.data / 100)) : console.log("账号[" + this.index + "] 签到失败:" + _0x25b135?.["message"]);
});
}
} catch (_0x1aa259) {
console.log(_0x1aa259);
} finally {
return Promise.resolve(1);
}
}
async ["LuckDraw"]() {
try {
let _0x1bb47d = "LuckDraw",
_0x343437 = "post",
_0x46ba8d = "https://yx.jsh.com/customer/api/user/client/luckDraw",
_0x13a4ce = "{\"gameId\":\"174464962928279552\"}";
await this.taskApi(_0x1bb47d, _0x343437, _0x46ba8d, _0x13a4ce).then(async _0x108d75 => {
{
console.log("result:", _0x108d75);
if (_0x108d75.code === 200) console.log("账号[" + this.index + "] 抽奖成功,获得" + _0x108d75.data?.["prizeName"] + "积分");else {
console.log("账号[" + this.index + "] 抽奖失败:" + _0x108d75?.["message"]);
}
}
});
} catch (_0x5f4c99) {
console.log(_0x5f4c99);
} finally {
return Promise.resolve(1);
}
}
async ["TiXian"]() {
try {
{
let _0x5a32ee = "TiXian",
_0x46df13 = "post",
_0x4bbbc6 = "https://marketing-api.haier.net/api/marketing-assemble/api/cashcenter/user/wallet/withdrawalCash",
_0x3e492d = encodeURIComponent("data={\"type\":\"1\",\"withdrawFee\":\"" + this.points + "\"}&signData={\"key\":\"userRed100000003\",\"secret\":\"88800de360b7308cdba924b865507a92\"}");
await this.taskApi(_0x5a32ee, _0x46df13, _0x4bbbc6, _0x3e492d, {
"Authorization": "Bearer " + this.activedAuthToken,
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
"Content-Type": "application/x-www-form-urlencoded",
"X-Requested-With": "com.tencent.mm",
"plantform-channel": "PLAT_FORM_WECHAT"
}).then(async _0x48a4c5 => {
_0x48a4c5.code === 200 ? console.log("账号[" + this.index + "] 提现成功,获得" + _0x48a4c5.data?.["prizeName"] + "现金") : console.log("账号[" + this.index + "] 提现失败:" + JSON.parse(_0x48a4c5));
});
}
} catch (_0x5dcea4) {
console.log(_0x5dcea4);
} finally {
return Promise.resolve(1);
}
}
async ["doTask"]() {
try {
console.log("\n============= 账号[" + this.index + "] 开始签到=============");
await this.SignInDaily();
await waitSomeTime();
await this.LuckDraw();
console.log("\n----待提现的金额:", this.points);
this.points && !Number.isNaN(this.points) && this.points >= 1 && (await waitSomeTime(), await this.TiXian());
} catch (_0x3b27c2) {
console.log(_0x3b27c2);
}
}
}
!(async () => {
if (typeof $request !== "undefined") {
await GetRewrite();
} else {
{
if (!(await checkEnv())) return;
console.log("\n================ 开始执行 ================");
for (let _0x37bc9f of initedJobForTokens) {
console.log("----------- 执行 第 [" + _0x37bc9f.index + "] 个账号 -----------");
await _0x37bc9f.GetUserInfo();
}
let _0x56f6f9 = initedJobForTokens.filter(_0x308e9f => _0x308e9f.valid);
if (initedJobForTokens.length > 0) {
console.log("\n================ 任务队列构建完毕 ================");
for (let _0x22bb86 of _0x56f6f9) {
console.log("----------- 账号[" + _0x22bb86.index + "] -----------");
await _0x22bb86.doTask();
}
}
await $.showmsg();
}
}
})().catch(_0x570c59 => console.log(_0x570c59)).finally(() => $.done());
async function waitSomeTime(_0x395b52 = 3000) {
console.log("----------- 延迟 " + _0x395b52 / 1000 + " s请稍等 -----------");
return await new Promise(_0x203071 => setTimeout(_0x203071, _0x395b52));
}
async function GetRewrite() {}
async function checkEnv() {
if (authorizationToken) {
{
let _0x15962f = envSplitor[0];
for (let _0x3a119f of envSplitor) {
{
if (authorizationToken.indexOf(_0x3a119f) > -1) {
_0x15962f = _0x3a119f;
break;
}
}
}
for (let _0x167f1c of authorizationToken.split(_0x15962f)) {
{
if (_0x167f1c) initedJobForTokens.push(new JobTask(_0x167f1c));
}
}
userCount = initedJobForTokens.length;
}
} else {
console.log("未找到 配置信息,请检查是否配置 变量:", envParams);
return;
}
console.log("共找到" + userCount + "个账号");
return true;
}
async function httpRequest(_0x315fde, _0x43498a) {
httpErr = null;
httpReq = null;
httpResp = null;
return new Promise(_0x15e577 => {
$.send(_0x315fde, _0x43498a, async (_0x46ab79, _0x54af7f, _0x326c5c) => {
httpErr = _0x46ab79;
httpReq = _0x54af7f;
httpResp = _0x326c5c;
_0x15e577({
"err": _0x46ab79,
"req": _0x54af7f,
"resp": _0x326c5c
});
});
});
}
function Env(_0x145f6d, _0x2ad434) {
"undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
return new class {
constructor(_0x2c6ae3, _0x15c3de) {
{
this.name = _0x2c6ae3;
this.notifyStr = "";
this.startTime = new Date().getTime();
Object.assign(this, _0x15c3de);
console.log(this.name + " 开始运行:\n");
}
}
["isNode"]() {
return "undefined" != typeof module && !!module.exports;
}
["isQuanX"]() {
return "undefined" != typeof $task;
}
["isSurge"]() {
return "undefined" != typeof $httpClient && "undefined" == typeof $loon;
}
["isLoon"]() {
return "undefined" != typeof $loon;
}
["getdata"](_0x4fac12) {
let _0x34b166 = this.getval(_0x4fac12);
if (/^@/.test(_0x4fac12)) {
{
const [, _0x4a384a, _0x163012] = /^@(.*?)\.(.*?)$/.exec(_0x4fac12),
_0x4d5996 = _0x4a384a ? this.getval(_0x4a384a) : "";
if (_0x4d5996) try {
const _0xea2094 = JSON.parse(_0x4d5996);
_0x34b166 = _0xea2094 ? this.lodash_get(_0xea2094, _0x163012, "") : _0x34b166;
} catch (_0x178f4b) {
_0x34b166 = "";
}
}
}
return _0x34b166;
}
["setdata"](_0x2f9735, _0x5a4907) {
{
let _0x1da6cb = false;
if (/^@/.test(_0x5a4907)) {
const [, _0x8150c9, _0x441dcb] = /^@(.*?)\.(.*?)$/.exec(_0x5a4907),
_0x31d092 = this.getval(_0x8150c9),
_0x2dc4c1 = _0x8150c9 ? "null" === _0x31d092 ? null : _0x31d092 || "{}" : "{}";
try {
const _0x4cde78 = JSON.parse(_0x2dc4c1);
this.lodash_set(_0x4cde78, _0x441dcb, _0x2f9735);
_0x1da6cb = this.setval(JSON.stringify(_0x4cde78), _0x8150c9);
} catch (_0x39e26e) {
{
const _0x302ef5 = {};
this.lodash_set(_0x302ef5, _0x441dcb, _0x2f9735);
_0x1da6cb = this.setval(JSON.stringify(_0x302ef5), _0x8150c9);
}
}
} else _0x1da6cb = this.setval(_0x2f9735, _0x5a4907);
return _0x1da6cb;
}
}
["getval"](_0x17b0b5) {
return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x17b0b5) : this.isQuanX() ? $prefs.valueForKey(_0x17b0b5) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x17b0b5]) : this.data && this.data[_0x17b0b5] || null;
}
["setval"](_0x1a4b9a, _0x5989f1) {
return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x1a4b9a, _0x5989f1) : this.isQuanX() ? $prefs.setValueForKey(_0x1a4b9a, _0x5989f1) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x5989f1] = _0x1a4b9a, this.writedata(), true) : this.data && this.data[_0x5989f1] || null;
}
["send"](_0x390a5f, _0x55dfcf, _0x53ea18 = () => {}) {
{
if (_0x390a5f != "get" && _0x390a5f != "post" && _0x390a5f != "put" && _0x390a5f != "delete") {
{
console.log("无效的http方法" + _0x390a5f);
return;
}
}
if (_0x390a5f == "get" && _0x55dfcf.headers) delete _0x55dfcf.headers["Content-Type"], delete _0x55dfcf.headers["Content-Length"];else {
if (_0x55dfcf.body && _0x55dfcf.headers) {
{
if (!_0x55dfcf.headers["Content-Type"]) _0x55dfcf.headers["Content-Type"] = "application/x-www-form-urlencoded";
}
}
}
if (this.isSurge() || this.isLoon()) {
{
if (this.isSurge() && this.isNeedRewrite) {
_0x55dfcf.headers = _0x55dfcf.headers || {};
Object.assign(_0x55dfcf.headers, {
"X-Surge-Skip-Scripting": false
});
}
let _0x41a6ce = {
"method": _0x390a5f,
"url": _0x55dfcf.url,
"headers": _0x55dfcf.headers,
"timeout": _0x55dfcf.timeout,
"data": _0x55dfcf.body
};
if (_0x390a5f == "get") delete _0x41a6ce.data;
$axios(_0x41a6ce).then(_0x33377e => {
{
const {
status: _0x2065f2,
request: _0x23f3a5,
headers: _0x4e5d89,
data: _0xd40200
} = _0x33377e;
_0x53ea18(null, _0x23f3a5, {
"statusCode": _0x2065f2,
"headers": _0x4e5d89,
"body": _0xd40200
});
}
}).catch(_0x30a337 => console.log(_0x30a337));
}
} else {
if (this.isQuanX()) {
_0x55dfcf.method = _0x390a5f.toUpperCase();
this.isNeedRewrite && (_0x55dfcf.opts = _0x55dfcf.opts || {}, Object.assign(_0x55dfcf.opts, {
"hints": false
}));
$task.fetch(_0x55dfcf).then(_0x4fc46b => {
{
const {
statusCode: _0x3adacc,
request: _0x4c9fac,
headers: _0x465d4c,
body: _0x1c0160
} = _0x4fc46b;
_0x53ea18(null, _0x4c9fac, {
"statusCode": _0x3adacc,
"headers": _0x465d4c,
"body": _0x1c0160
});
}
}, _0x39ac1f => _0x53ea18(_0x39ac1f));
} else {
if (this.isNode()) {
this.got = this.got ? this.got : require("got");
const {
url: _0x17922a,
..._0x2092f9
} = _0x55dfcf;
this.instance = this.got.extend({
"followRedirect": false
});
this.instance[_0x390a5f](_0x17922a, _0x2092f9).then(_0x36703e => {
const {
statusCode: _0x23a6f5,
request: _0xc061b3,
headers: _0x1e25f8,
body: _0x15c804
} = _0x36703e;
_0x53ea18(null, _0xc061b3, {
"statusCode": _0x23a6f5,
"headers": _0x1e25f8,
"body": _0x15c804
});
}, _0x2b4fca => {
{
const {
message: _0x5baa3b,
request: _0x1400de,
response: _0x20be40
} = _0x2b4fca;
_0x53ea18(_0x5baa3b, _0x1400de, _0x20be40);
}
});
}
}
}
}
}
["time"](_0x518b14, _0x4cec02 = null) {
let _0x91d015 = _0x4cec02 ? new Date(_0x4cec02) : new Date(),
_0xc32e0 = {
"M+": _0x91d015.getMonth() + 1,
"d+": _0x91d015.getDate(),
"h+": _0x91d015.getHours(),
"m+": _0x91d015.getMinutes(),
"s+": _0x91d015.getSeconds(),
"q+": Math.floor((_0x91d015.getMonth() + 3) / 3),
"S": _0x91d015.getMilliseconds()
};
/(y+)/.test(_0x518b14) && (_0x518b14 = _0x518b14.replace(RegExp.$1, (_0x91d015.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let _0x74d676 in _0xc32e0) new RegExp("(" + _0x74d676 + ")").test(_0x518b14) && (_0x518b14 = _0x518b14.replace(RegExp.$1, 1 == RegExp.$1.length ? _0xc32e0[_0x74d676] : ("00" + _0xc32e0[_0x74d676]).substr(("" + _0xc32e0[_0x74d676]).length)));
return _0x518b14;
}
async ["showmsg"]() {
if (!this.notifyStr) return;
let _0x49b71e = this.name + " 运行通知\n\n" + this.notifyStr;
if ($.isNode()) {
var _0x15c32f = require("./sendNotify");
console.log("\n============== 推送 ==============");
await _0x15c32f.sendNotify(this.name, _0x49b71e);
} else this.msg(_0x49b71e);
}
["logAndNotify"](_0x411ee5) {
console.log(_0x411ee5);
this.notifyStr += _0x411ee5;
this.notifyStr += "\n";
}
["logAndNotifyWithTime"](_0x265752) {
{
let _0x29cff9 = "[" + this.time("hh:mm:ss.S") + "]" + _0x265752;
console.log(_0x29cff9);
this.notifyStr += _0x29cff9;
this.notifyStr += "\n";
}
}
["logWithTime"](_0x35d90e) {
console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x35d90e);
}
["msg"](_0x36b3bc = t, _0x277707 = "", _0x416e8b = "", _0x487038) {
const _0x1a3fa6 = _0x4e2159 => {
{
if (!_0x4e2159) return _0x4e2159;
if ("string" == typeof _0x4e2159) return this.isLoon() ? _0x4e2159 : this.isQuanX() ? {
"open-url": _0x4e2159
} : this.isSurge() ? {
"url": _0x4e2159
} : undefined;
if ("object" == typeof _0x4e2159) {
{
if (this.isLoon()) {
{
let _0x1d32d6 = _0x4e2159.openUrl || _0x4e2159.url || _0x4e2159["open-url"],
_0x1c6203 = _0x4e2159.mediaUrl || _0x4e2159["media-url"];
return {
"openUrl": _0x1d32d6,
"mediaUrl": _0x1c6203
};
}
}
if (this.isQuanX()) {
let _0x5a7300 = _0x4e2159["open-url"] || _0x4e2159.url || _0x4e2159.openUrl,
_0x425900 = _0x4e2159["media-url"] || _0x4e2159.mediaUrl;
return {
"open-url": _0x5a7300,
"media-url": _0x425900
};
}
if (this.isSurge()) {
let _0x40d0df = _0x4e2159.url || _0x4e2159.openUrl || _0x4e2159["open-url"];
return {
"url": _0x40d0df
};
}
}
}
}
};
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x36b3bc, _0x277707, _0x416e8b, _0x1a3fa6(_0x487038)) : this.isQuanX() && $notify(_0x36b3bc, _0x277707, _0x416e8b, _0x1a3fa6(_0x487038)));
let _0x32161e = ["", "============== 系统通知 =============="];
_0x32161e.push(_0x36b3bc);
_0x277707 && _0x32161e.push(_0x277707);
_0x416e8b && _0x32161e.push(_0x416e8b);
console.log(_0x32161e.join("\n"));
}
["getMin"](_0x3e6cad, _0x1ce183) {
return _0x3e6cad < _0x1ce183 ? _0x3e6cad : _0x1ce183;
}
["getMax"](_0x939b39, _0xc0287e) {
return _0x939b39 < _0xc0287e ? _0xc0287e : _0x939b39;
}
["padStr"](_0x371ca0, _0x558a10, _0x50b7d9 = "0") {
let _0x23ddbe = String(_0x371ca0),
_0x5c77da = _0x558a10 > _0x23ddbe.length ? _0x558a10 - _0x23ddbe.length : 0,
_0x41ed35 = "";
for (let _0x232913 = 0; _0x232913 < _0x5c77da; _0x232913++) {
_0x41ed35 += _0x50b7d9;
}
_0x41ed35 += _0x23ddbe;
return _0x41ed35;
}
["json2str"](_0x3344e, _0x14c262, _0x39f0d1 = false) {
let _0x41049d = [];
for (let _0x59f8b1 of Object.keys(_0x3344e).sort()) {
let _0x492abf = _0x3344e[_0x59f8b1];
if (_0x492abf && _0x39f0d1) _0x492abf = encodeURIComponent(_0x492abf);
_0x41049d.push(_0x59f8b1 + "=" + _0x492abf);
}
return _0x41049d.join(_0x14c262);
}
["str2json"](_0x27a7e5, _0x562ec0 = false) {
{
let _0x21bc24 = {};
for (let _0x5a43be of _0x27a7e5.split("&")) {
if (!_0x5a43be) continue;
let _0x16b706 = _0x5a43be.indexOf("=");
if (_0x16b706 == -1) continue;
let _0x5c1005 = _0x5a43be.substr(0, _0x16b706),
_0x5bd991 = _0x5a43be.substr(_0x16b706 + 1);
if (_0x562ec0) _0x5bd991 = decodeURIComponent(_0x5bd991);
_0x21bc24[_0x5c1005] = _0x5bd991;
}
return _0x21bc24;
}
}
["randomString"](_0x3fd6b4, _0x227d42 = "abcdef0123456789") {
{
let _0x4a0db9 = "";
for (let _0x11b627 = 0; _0x11b627 < _0x3fd6b4; _0x11b627++) {
_0x4a0db9 += _0x227d42.charAt(Math.floor(Math.random() * _0x227d42.length));
}
return _0x4a0db9;
}
}
["randomList"](_0x3ac336) {
{
let _0x5b9b88 = Math.floor(Math.random() * _0x3ac336.length);
return _0x3ac336[_0x5b9b88];
}
}
["wait"](_0x3e1e6c) {
return new Promise(_0x342340 => setTimeout(_0x342340, _0x3e1e6c));
}
["done"](_0x39fc39 = {}) {
{
const _0x43cece = new Date().getTime(),
_0x11ce01 = (_0x43cece - this.startTime) / 1000;
console.log("\n" + this.name + " 运行结束,共运行了 " + _0x11ce01 + " 秒!");
if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x39fc39);
}
}
}(_0x145f6d, _0x2ad434);
}

516
wxapp/草莓台.js Normal file
View File

@ -0,0 +1,516 @@
/**
* 草莓台小程序签到v0.03
* cron 10 12 * * * 草莓台.js
*
* ========= 青龙--配置文件 ===========
* # 项目名称
* export caomeitai_token='你抓包的openid#你的userId'
* 自己抓包协议头上的Cookie
* 多账号换行或&隔开
* 奖励签到草莓币
* const $ = new Env("草莓台")
* ====================================
*
*/
//Sat Jan 25 2025 08:33:12 GMT+0000 (Coordinated Universal Time)
//Base:https://github.com/echo094/decode-js
//Modify:https://github.com/smallfawn/decode_action
const $ = new Env("草莓台小程序签到");
let envParams = "caomeitai_token",
envSplitor = ["\n", "&"],
authorizationToken = ($.isNode() ? process.env[envParams] : $.getdata(envParams)) || "",
initedJobForTokens = [],
currentUserIndex = 0;
class JobTask {
constructor(_0x2a8b2b) {
this.index = ++currentUserIndex;
this.points = 0;
this.valid = false;
this.userId = "";
[this.openid, this.userId] = _0x2a8b2b?.["split"]("#");
this.activedAuthToken = "";
}
async ["taskApi"](_0x47ec4f, _0x4e5aeb, _0x574064, _0x2d47eb) {
let _0x4541cc = null;
try {
{
let _0x12da9e = {
"url": _0x574064,
"headers": {
"Accept": "*/*",
"Accept-Language": "zh-CN,zh",
"Connection": "keep-alive",
"Content-Type": "application/json",
"Host": "cmtv.xmay.cc",
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "cross-site",
"referer": "https://servicewechat.com/wxc2a56f3a7492b8c4/145/page-frame.html",
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/6945",
"xweb_xhr": "1"
},
"timeout": 60000
};
this.activedAuthToken && (_0x12da9e.headers.Authorization = "Bearer " + this.activedAuthToken);
if (_0x2d47eb) {
_0x12da9e.body = _0x2d47eb;
_0x12da9e.headers["Content-Length"] = _0x2d47eb?.["length"];
}
await httpRequest(_0x4e5aeb, _0x12da9e).then(async _0x5cd31a => {
{
if (_0x5cd31a.resp?.["statusCode"] == 200) {
if (_0x5cd31a.resp?.["body"]) _0x4541cc = JSON.parse(_0x5cd31a.resp.body);else {}
} else console.log("账号[" + this.index + "]调用" + _0x4e5aeb + "[" + _0x47ec4f + "]出错,返回状态码[" + (_0x5cd31a.resp?.["statusCode"] || "") + "]", "返回结果:", _0x5cd31a.resp?.["body"]);
}
});
}
} catch (_0x24afeb) {
console.log(_0x24afeb);
} finally {
return Promise.resolve(_0x4541cc);
}
}
async ["LoginIn"]() {
try {
let _0x329bf1 = "LoginIn",
_0x168fa7 = "post",
_0x13d94a = "https://cmtv.xmay.cc/api/WX/login2",
_0x444be0 = "{\"id\":\"" + this.userId + "\",\"openid\":\"" + this.openid + "\"}";
await this.taskApi(_0x329bf1, _0x168fa7, _0x13d94a, _0x444be0).then(async _0x257d58 => {
{
if (_0x257d58?.["token"]) {
this.activedAuthToken = _0x257d58?.["token"];
this.valid = true;
this.points = _0x257d58?.["user"]["chbeanNum"] / 100;
this.userId = _0x257d58?.["user"]["id"];
console.log("账号[" + this.index + "] 登录成功,昵称:" + _0x257d58?.["user"]["nickname"] + ",草莓币:" + _0x257d58?.["user"]["chbeanNum"] / 100);
} else console.log("账号[" + this.index + "] 登录失败", _0x257d58), this.valid = false;
}
});
} catch (_0x28cd9b) {
console.log(_0x28cd9b);
} finally {
return Promise.resolve(1);
}
}
async ["GetUserTask"]() {
try {
{
let _0x45d636 = "GetUserTask",
_0x413c1c = "get",
_0x1e2fea = "https://cmtv.xmay.cc/api/registerInfo/checkRegister?userId=" + this.userId,
_0x29a6c7 = "";
return await this.taskApi(_0x45d636, _0x413c1c, _0x1e2fea, _0x29a6c7).then(async _0x335edf => {
if (_0x335edf) {
if (!_0x335edf.isAfter) return console.log("账号[" + this.index + "] " + this.userId + " - 已经签到了,无需签到"), false;
console.log("账号[" + this.index + "] " + this.userId + " - 检测到还未签到");
return true;
} else $.logAndNotify("账号[" + this.index + "] " + this.userId + " - 查询草莓币失败,可能帐号无效:" + JSON.stringify(_0x335edf));
});
}
} catch (_0x519874) {
console.log(_0x519874);
}
}
async ["SignInDaily"]() {
try {
let _0x3c8847 = "SignInDaily",
_0x43fe4c = "post",
_0x27aa7e = "https://cmtv.xmay.cc/api/registerInfo",
_0x20f926 = "{\"userId\":\"" + this.userId + "\"}";
await this.taskApi(_0x3c8847, _0x43fe4c, _0x27aa7e, _0x20f926).then(async _0x3bb44f => {
{
if (_0x3bb44f?.["id"]) console.log("账号[" + this.index + "] 签到成功,获得" + _0x3bb44f.cmb + "草莓币,当前草莓币:" + (this.points + _0x3bb44f.cmb));else {
console.log("账号[" + this.index + "] 签到失败");
}
}
});
} catch (_0xe65438) {
console.log(_0xe65438);
} finally {
return Promise.resolve(1);
}
}
async ["doTask"]() {
try {
console.log("\n============= 账号[" + this.index + "] 开始签到=============");
(await this.GetUserTask()) && (await this.SignInDaily());
} catch (_0x208f28) {
console.log(_0x208f28);
}
}
}
!(async () => {
if (typeof $request !== "undefined") await GetRewrite();else {
if (!(await checkEnv())) return;
console.log("\n================ 开始执行 ================");
for (let _0x13b5ec of initedJobForTokens) {
console.log("----------- 执行 第 [" + _0x13b5ec.index + "] 个账号 -----------");
await _0x13b5ec.LoginIn();
}
let _0x183d17 = initedJobForTokens.filter(_0x57aa60 => _0x57aa60.valid);
if (_0x183d17.length > 0) {
{
console.log("\n================ 任务队列构建完毕 ================");
for (let _0x50ca01 of _0x183d17) {
console.log("----------- 账号[" + _0x50ca01.index + "] -----------");
await _0x50ca01.doTask();
}
}
} else {
console.log("\n====幻生提示:无可用账号,请检查配置============ 任务结束 ================");
}
await $.showmsg();
}
})().catch(_0x337032 => console.log(_0x337032)).finally(() => $.done());
async function GetRewrite() {}
async function checkEnv() {
if (authorizationToken) {
let _0x1a5c2c = envSplitor[0];
for (let _0x3bab5c of envSplitor) {
if (authorizationToken.indexOf(_0x3bab5c) > -1) {
_0x1a5c2c = _0x3bab5c;
break;
}
}
for (let _0x2df51d of authorizationToken.split(_0x1a5c2c)) {
{
if (_0x2df51d) initedJobForTokens.push(new JobTask(_0x2df51d));
}
}
userCount = initedJobForTokens.length;
} else {
console.log("未找到 配置信息,请检查是否配置 变量:", envParams);
return;
}
console.log("共找到" + userCount + "个账号");
return true;
}
async function httpRequest(_0xc08f76, _0x506aa0) {
httpErr = null;
httpReq = null;
httpResp = null;
return new Promise(_0x31994f => {
$.send(_0xc08f76, _0x506aa0, async (_0x22f513, _0x1d7338, _0x2845eb) => {
httpErr = _0x22f513;
httpReq = _0x1d7338;
httpResp = _0x2845eb;
_0x31994f({
"err": _0x22f513,
"req": _0x1d7338,
"resp": _0x2845eb
});
});
});
}
function Env(_0x513ce9, _0x3f5b80) {
"undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0);
return new class {
constructor(_0xe1e102, _0x737bae) {
this.name = _0xe1e102;
this.notifyStr = "";
this.startTime = new Date().getTime();
Object.assign(this, _0x737bae);
console.log(this.name + " 开始运行:\n");
}
["isNode"]() {
return "undefined" != typeof module && !!module.exports;
}
["isQuanX"]() {
return "undefined" != typeof $task;
}
["isSurge"]() {
return "undefined" != typeof $httpClient && "undefined" == typeof $loon;
}
["isLoon"]() {
return "undefined" != typeof $loon;
}
["getdata"](_0x4af141) {
let _0xf083dc = this.getval(_0x4af141);
if (/^@/.test(_0x4af141)) {
const [, _0x40f7e0, _0x1886d5] = /^@(.*?)\.(.*?)$/.exec(_0x4af141),
_0x13b49e = _0x40f7e0 ? this.getval(_0x40f7e0) : "";
if (_0x13b49e) try {
const _0x3fbd1c = JSON.parse(_0x13b49e);
_0xf083dc = _0x3fbd1c ? this.lodash_get(_0x3fbd1c, _0x1886d5, "") : _0xf083dc;
} catch (_0x35b1b7) {
_0xf083dc = "";
}
}
return _0xf083dc;
}
["setdata"](_0x28bfb3, _0x322236) {
let _0x1d16d8 = false;
if (/^@/.test(_0x322236)) {
{
const [, _0x1d300b, _0x4d0d99] = /^@(.*?)\.(.*?)$/.exec(_0x322236),
_0x201be5 = this.getval(_0x1d300b),
_0x549465 = _0x1d300b ? "null" === _0x201be5 ? null : _0x201be5 || "{}" : "{}";
try {
const _0x76924e = JSON.parse(_0x549465);
this.lodash_set(_0x76924e, _0x4d0d99, _0x28bfb3);
_0x1d16d8 = this.setval(JSON.stringify(_0x76924e), _0x1d300b);
} catch (_0x463f8b) {
const _0x4c1fab = {};
this.lodash_set(_0x4c1fab, _0x4d0d99, _0x28bfb3);
_0x1d16d8 = this.setval(JSON.stringify(_0x4c1fab), _0x1d300b);
}
}
} else {
_0x1d16d8 = this.setval(_0x28bfb3, _0x322236);
}
return _0x1d16d8;
}
["getval"](_0x57c252) {
return this.isSurge() || this.isLoon() ? $persistentStore.read(_0x57c252) : this.isQuanX() ? $prefs.valueForKey(_0x57c252) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x57c252]) : this.data && this.data[_0x57c252] || null;
}
["setval"](_0x134051, _0x4faa57) {
return this.isSurge() || this.isLoon() ? $persistentStore.write(_0x134051, _0x4faa57) : this.isQuanX() ? $prefs.setValueForKey(_0x134051, _0x4faa57) : this.isNode() ? (this.data = this.loaddata(), this.data[_0x4faa57] = _0x134051, this.writedata(), true) : this.data && this.data[_0x4faa57] || null;
}
["send"](_0x1c870b, _0x5a3c06, _0x42ea8e = () => {}) {
{
if (_0x1c870b != "get" && _0x1c870b != "post" && _0x1c870b != "put" && _0x1c870b != "delete") {
console.log("无效的http方法" + _0x1c870b);
return;
}
if (_0x1c870b == "get" && _0x5a3c06.headers) delete _0x5a3c06.headers["Content-Type"], delete _0x5a3c06.headers["Content-Length"];else {
if (_0x5a3c06.body && _0x5a3c06.headers) {
{
if (!_0x5a3c06.headers["Content-Type"]) _0x5a3c06.headers["Content-Type"] = "application/x-www-form-urlencoded";
}
}
}
if (this.isSurge() || this.isLoon()) {
this.isSurge() && this.isNeedRewrite && (_0x5a3c06.headers = _0x5a3c06.headers || {}, Object.assign(_0x5a3c06.headers, {
"X-Surge-Skip-Scripting": false
}));
let _0x4a58cf = {
"method": _0x1c870b,
"url": _0x5a3c06.url,
"headers": _0x5a3c06.headers,
"timeout": _0x5a3c06.timeout,
"data": _0x5a3c06.body
};
if (_0x1c870b == "get") delete _0x4a58cf.data;
$axios(_0x4a58cf).then(_0x376e23 => {
{
const {
status: _0x2633d7,
request: _0x1ee9f,
headers: _0x5588d1,
data: _0x56dfa3
} = _0x376e23;
_0x42ea8e(null, _0x1ee9f, {
"statusCode": _0x2633d7,
"headers": _0x5588d1,
"body": _0x56dfa3
});
}
}).catch(_0x48f466 => console.log(_0x48f466));
} else {
if (this.isQuanX()) _0x5a3c06.method = _0x1c870b.toUpperCase(), this.isNeedRewrite && (_0x5a3c06.opts = _0x5a3c06.opts || {}, Object.assign(_0x5a3c06.opts, {
"hints": false
})), $task.fetch(_0x5a3c06).then(_0x24a32b => {
{
const {
statusCode: _0x2ce309,
request: _0x553dee,
headers: _0x47ad1d,
body: _0x1d51d4
} = _0x24a32b;
_0x42ea8e(null, _0x553dee, {
"statusCode": _0x2ce309,
"headers": _0x47ad1d,
"body": _0x1d51d4
});
}
}, _0x2b68b9 => _0x42ea8e(_0x2b68b9));else {
if (this.isNode()) {
{
this.got = this.got ? this.got : require("got");
const {
url: _0x535b9e,
..._0x16a812
} = _0x5a3c06;
this.instance = this.got.extend({
"followRedirect": false
});
this.instance[_0x1c870b](_0x535b9e, _0x16a812).then(_0x1b5a14 => {
{
const {
statusCode: _0x2b7984,
request: _0x24596f,
headers: _0x17cbfd,
body: _0x18ca69
} = _0x1b5a14;
_0x42ea8e(null, _0x24596f, {
"statusCode": _0x2b7984,
"headers": _0x17cbfd,
"body": _0x18ca69
});
}
}, _0x56154e => {
{
const {
message: _0x88f437,
request: _0x261d64,
response: _0x2cc23c
} = _0x56154e;
_0x42ea8e(_0x88f437, _0x261d64, _0x2cc23c);
}
});
}
}
}
}
}
}
["time"](_0x1b4234, _0x2e33d8 = null) {
let _0x13f44e = _0x2e33d8 ? new Date(_0x2e33d8) : new Date(),
_0xd1abb3 = {
"M+": _0x13f44e.getMonth() + 1,
"d+": _0x13f44e.getDate(),
"h+": _0x13f44e.getHours(),
"m+": _0x13f44e.getMinutes(),
"s+": _0x13f44e.getSeconds(),
"q+": Math.floor((_0x13f44e.getMonth() + 3) / 3),
"S": _0x13f44e.getMilliseconds()
};
/(y+)/.test(_0x1b4234) && (_0x1b4234 = _0x1b4234.replace(RegExp.$1, (_0x13f44e.getFullYear() + "").substr(4 - RegExp.$1.length)));
for (let _0x12593f in _0xd1abb3) new RegExp("(" + _0x12593f + ")").test(_0x1b4234) && (_0x1b4234 = _0x1b4234.replace(RegExp.$1, 1 == RegExp.$1.length ? _0xd1abb3[_0x12593f] : ("00" + _0xd1abb3[_0x12593f]).substr(("" + _0xd1abb3[_0x12593f]).length)));
return _0x1b4234;
}
async ["showmsg"]() {
if (!this.notifyStr) return;
let _0x44fa77 = this.name + " 运行通知\n\n" + this.notifyStr;
if ($.isNode()) {
var _0x2a2ac8 = require("./sendNotify");
console.log("\n============== 推送 ==============");
await _0x2a2ac8.sendNotify(this.name, _0x44fa77);
} else this.msg(_0x44fa77);
}
["logAndNotify"](_0x147484) {
console.log(_0x147484);
this.notifyStr += _0x147484;
this.notifyStr += "\n";
}
["logAndNotifyWithTime"](_0x445549) {
{
let _0xb8cb7b = "[" + this.time("hh:mm:ss.S") + "]" + _0x445549;
console.log(_0xb8cb7b);
this.notifyStr += _0xb8cb7b;
this.notifyStr += "\n";
}
}
["logWithTime"](_0x3ee709) {
console.log("[" + this.time("hh:mm:ss.S") + "]" + _0x3ee709);
}
["msg"](_0x2fbece = t, _0x54b688 = "", _0x3bcc34 = "", _0x224c9d) {
const _0x1a3f75 = _0x250b42 => {
{
if (!_0x250b42) return _0x250b42;
if ("string" == typeof _0x250b42) return this.isLoon() ? _0x250b42 : this.isQuanX() ? {
"open-url": _0x250b42
} : this.isSurge() ? {
"url": _0x250b42
} : undefined;
if ("object" == typeof _0x250b42) {
if (this.isLoon()) {
let _0x207cc8 = _0x250b42.openUrl || _0x250b42.url || _0x250b42["open-url"],
_0x5139ba = _0x250b42.mediaUrl || _0x250b42["media-url"];
return {
"openUrl": _0x207cc8,
"mediaUrl": _0x5139ba
};
}
if (this.isQuanX()) {
let _0x49efdc = _0x250b42["open-url"] || _0x250b42.url || _0x250b42.openUrl,
_0x3e3764 = _0x250b42["media-url"] || _0x250b42.mediaUrl;
return {
"open-url": _0x49efdc,
"media-url": _0x3e3764
};
}
if (this.isSurge()) {
let _0x260a6d = _0x250b42.url || _0x250b42.openUrl || _0x250b42["open-url"];
return {
"url": _0x260a6d
};
}
}
}
};
this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(_0x2fbece, _0x54b688, _0x3bcc34, _0x1a3f75(_0x224c9d)) : this.isQuanX() && $notify(_0x2fbece, _0x54b688, _0x3bcc34, _0x1a3f75(_0x224c9d)));
let _0x1ab4e9 = ["", "============== 系统通知 =============="];
_0x1ab4e9.push(_0x2fbece);
_0x54b688 && _0x1ab4e9.push(_0x54b688);
_0x3bcc34 && _0x1ab4e9.push(_0x3bcc34);
console.log(_0x1ab4e9.join("\n"));
}
["getMin"](_0x111e23, _0x5d49a3) {
return _0x111e23 < _0x5d49a3 ? _0x111e23 : _0x5d49a3;
}
["getMax"](_0x57a5cf, _0x4b6479) {
return _0x57a5cf < _0x4b6479 ? _0x4b6479 : _0x57a5cf;
}
["padStr"](_0x1330d0, _0x447e5a, _0x1ce3d8 = "0") {
let _0x74cf55 = String(_0x1330d0),
_0x475acb = _0x447e5a > _0x74cf55.length ? _0x447e5a - _0x74cf55.length : 0,
_0x5dc5de = "";
for (let _0x3735bb = 0; _0x3735bb < _0x475acb; _0x3735bb++) {
_0x5dc5de += _0x1ce3d8;
}
_0x5dc5de += _0x74cf55;
return _0x5dc5de;
}
["json2str"](_0x2e906e, _0x548b9d, _0x156871 = false) {
let _0x485825 = [];
for (let _0xafaf11 of Object.keys(_0x2e906e).sort()) {
let _0x593dc4 = _0x2e906e[_0xafaf11];
if (_0x593dc4 && _0x156871) _0x593dc4 = encodeURIComponent(_0x593dc4);
_0x485825.push(_0xafaf11 + "=" + _0x593dc4);
}
return _0x485825.join(_0x548b9d);
}
["str2json"](_0x55e93e, _0x170529 = false) {
{
let _0x806c53 = {};
for (let _0x5bc7b3 of _0x55e93e.split("&")) {
if (!_0x5bc7b3) continue;
let _0x2887cc = _0x5bc7b3.indexOf("=");
if (_0x2887cc == -1) continue;
let _0x4fc7f5 = _0x5bc7b3.substr(0, _0x2887cc),
_0x33ebe3 = _0x5bc7b3.substr(_0x2887cc + 1);
if (_0x170529) _0x33ebe3 = decodeURIComponent(_0x33ebe3);
_0x806c53[_0x4fc7f5] = _0x33ebe3;
}
return _0x806c53;
}
}
["randomString"](_0xc6b621, _0x555c1b = "abcdef0123456789") {
let _0x447945 = "";
for (let _0x5b26e3 = 0; _0x5b26e3 < _0xc6b621; _0x5b26e3++) {
_0x447945 += _0x555c1b.charAt(Math.floor(Math.random() * _0x555c1b.length));
}
return _0x447945;
}
["randomList"](_0x39e14e) {
{
let _0x30db5e = Math.floor(Math.random() * _0x39e14e.length);
return _0x39e14e[_0x30db5e];
}
}
["wait"](_0x39530a) {
return new Promise(_0x40404a => setTimeout(_0x40404a, _0x39530a));
}
["done"](_0x38e142 = {}) {
const _0x3168b5 = new Date().getTime(),
_0xd54e2e = (_0x3168b5 - this.startTime) / 1000;
console.log("\n" + this.name + " 运行结束,共运行了 " + _0xd54e2e + " 秒!");
if (this.isSurge() || this.isQuanX() || this.isLoon()) $done(_0x38e142);
}
}(_0x513ce9, _0x3f5b80);
}

449
xiaosatonglu.js Normal file

File diff suppressed because one or more lines are too long

3108
xipigou.js Normal file

File diff suppressed because one or more lines are too long

98
xqz.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1753
百观.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long