mirror of
https://github.com/smallfawn/QLScriptPublic.git
synced 2026-01-15 15:01:14 +08:00
Compare commits
41 Commits
1dab8d05b5
...
c93ea270ff
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c93ea270ff | ||
|
|
09e88fad89 | ||
|
|
2bd2a19c09 | ||
|
|
9c0a9f0f91 | ||
|
|
af4460d9dd | ||
|
|
ce94fef10a | ||
|
|
3da1eb58fb | ||
|
|
7ab64368e3 | ||
|
|
1d345255b5 | ||
|
|
d7bc9d9cf5 | ||
|
|
e51535f2cf | ||
|
|
8834c68b5e | ||
|
|
6d6a7eef74 | ||
|
|
c850c0453a | ||
|
|
745de23884 | ||
|
|
8cbf0a2ca9 | ||
|
|
3b904280dd | ||
|
|
c9944896cb | ||
|
|
246d9782e6 | ||
|
|
30eb73abb2 | ||
|
|
9e29938ce4 | ||
|
|
57244a1238 | ||
|
|
14dd2fb486 | ||
|
|
8e2f88d8b7 | ||
|
|
d07cf65438 | ||
|
|
85b4ed49b1 | ||
|
|
ff4228d3d1 | ||
|
|
24c3c83a5b | ||
|
|
50060e5002 | ||
|
|
6b2b454bf6 | ||
|
|
681ef3eb01 | ||
|
|
4bbcc6819d | ||
|
|
53abfe7073 | ||
|
|
b56337fb0e | ||
|
|
d22bd76d34 | ||
|
|
46be3b4e75 | ||
|
|
f2cbd330f1 | ||
|
|
b109637169 | ||
|
|
b0898f4bf8 | ||
|
|
bcfaadd750 | ||
|
|
0538c007cf |
80
Coca2.py
Normal file
80
Coca2.py
Normal file
@ -0,0 +1,80 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
# @Time : 18:57
|
||||
# @Author : yuxian
|
||||
# @Email : 1503889663@qq.com
|
||||
# @File : Coca.py
|
||||
# @SoftWare : PyCharm
|
||||
# 可口可乐吧小程序,抓包authorization(全部内容 copy即可),填入环境变量Coca中,多账号换行或@隔开
|
||||
import json, os, hashlib, random, time, requests as r
|
||||
|
||||
|
||||
def UF(): return f"Mozilla/5.0 (iPhone; CPU iPhone OS {f'{random.randint(12, 15)}.{random.randint(0, 6)}.{random.randint(0, 9)}'} like Mac OS X) AppleWebKit/{f'{random.randint(600, 700)}.{random.randint(1, 4)}.{random.randint(1, 5)}'} (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.20(0x16001422) NetType/WIFI Language/zh_CN"
|
||||
|
||||
|
||||
def generate_random_string_and_timestamp():
|
||||
T = ''.join(random.choices('0123456789abcdefghijklmnopqrstuvwxyz', k=8))
|
||||
d = str(int(time.time() * 1000))
|
||||
return T, d
|
||||
|
||||
|
||||
def sha256_encrypt(data):
|
||||
hash_object = hashlib.sha256()
|
||||
hash_object.update(data.encode('utf-8'))
|
||||
hex_dig = hash_object.hexdigest()
|
||||
return hex_dig
|
||||
|
||||
|
||||
def get_header(url1):
|
||||
T, d = generate_random_string_and_timestamp()
|
||||
message = url1.replace("https://koplus.icoke.cn/cre-bff", "")
|
||||
encrypted_data = sha256_encrypt(message + T + d + "apyuc3#7%m4*")
|
||||
headers = {"x-sg-id": T, "x-sg-timestamp": d, "x-sg-signature": encrypted_data}
|
||||
return headers
|
||||
|
||||
|
||||
U = "https://koplus.icoke.cn/cre-bff/wechat/"
|
||||
P = os.environ.get("Coca")
|
||||
if P and P != "":
|
||||
C = P.split("\n") if "\n" in P else P.split("@")
|
||||
A = 1
|
||||
for B in C:
|
||||
try:
|
||||
H = {
|
||||
"Host": "koplus.icoke.cn",
|
||||
"Connection": "keep-alive",
|
||||
"xweb_xhr": "1",
|
||||
"Authorization": B,
|
||||
"User-Agent": UF(),
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "*/*",
|
||||
"Accept-Language": "*",
|
||||
"Sec-Fetch-Site": "cross-site",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Referer": "https://servicewechat.com/wxa5811e0426a94686/364/page-frame.html",
|
||||
"Accept-Encoding": "gzip, deflate, br"
|
||||
}
|
||||
url = f"{U}checkin"
|
||||
H.update(get_header(url))
|
||||
signReq = r.post(url=url, headers=H)
|
||||
signResp = json.loads(signReq.text)
|
||||
print(f"🎉开始签到账号:{A}🎉")
|
||||
A += 1
|
||||
if signResp["meta"]["transactionPoint"]:
|
||||
print(f"⭕签到成功,获得{str(int(signResp['meta']['transactionPoint']) / 10)}个快乐瓶⭕")
|
||||
elif signResp["meta"]["transactionPoint"] is None:
|
||||
print("❗今日已签到,请勿重复签到❗")
|
||||
else:
|
||||
print("❌出现未知错误,签到失败❌")
|
||||
time.sleep(3)
|
||||
url = f"{U}profile"
|
||||
H.update(get_header(url))
|
||||
qReq = r.get(url=url, headers=H)
|
||||
qResp = json.loads(qReq.text)
|
||||
print(f"🎉开始查询账号积分🎉")
|
||||
if qResp["data"]:
|
||||
print(f"🎆账号快乐瓶总额:{str(int(qResp['data']['point']) / 10)}🎆")
|
||||
else:
|
||||
print("❌出现未知错误,查询失败❌")
|
||||
except:
|
||||
print("⚠️⚠️⚠️脚本报错执行下一个账号⚠️⚠️⚠️")
|
||||
14
README.md
14
README.md
@ -1,16 +1,11 @@
|
||||
# QLScriptpublic
|
||||
# JD 京东账密登录协议版本已发布 DOCKER一键部署 对接青龙 对接BOT
|
||||
购买地址
|
||||
http://smshop.back1.idcfengye.com/
|
||||
|
||||
体验地址
|
||||
http://smjd.back1.idcfengye.com/
|
||||
http://shop.smallfawn.top/
|
||||
|
||||
|
||||
|
||||
|
||||
# 由于特殊原因可能最近几年不会写脚本了 特此招收30名脚本携手共创QLPublicScript仓库 请把GITHUB用户名饲料发送给我 我给你们申请上传和编辑权限
|
||||
https://github.com/PickHeBin/Python-111
|
||||
time:2024/08/03
|
||||
|
||||
本仓库魔改通知 smallfawnPushWhite白名单 smallfawnPushBlack黑名单 二选一
|
||||
``````
|
||||
@ -19,7 +14,7 @@ export smallfawnPushWhite="脚本名字@脚本名字2"
|
||||
# 组织基地:QQ群1021185005
|
||||
# 青龙面板拉库命令
|
||||
``````
|
||||
ql repo https://mirror.ghproxy.com/https://github.com/smallfawn/QLScriptPublic.git
|
||||
ql repo https://mirror.ghproxy.com/https://github.com/smallfawn/QLScriptPublic.git backup main
|
||||
``````
|
||||
自用青龙docker搭建命令
|
||||
``````
|
||||
@ -57,6 +52,7 @@ services:
|
||||
https://github.com/whyour/qinglong/tree/d6614acf66a243fddc494bcfcee44b3a55020591
|
||||
``````
|
||||
#最新版青龙搭建命令
|
||||
``````
|
||||
docker run -dit \
|
||||
-v $PWD/ql:/ql/data \
|
||||
-p 5600:5700 \
|
||||
@ -67,8 +63,6 @@ docker run -dit \
|
||||
--no-healthcheck \
|
||||
--restart always \
|
||||
whyour/qinglong
|
||||
|
||||
|
||||
``````
|
||||
这里的脚本只是自己学习 js 的一个实践 仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断.
|
||||
|
||||
|
||||
80
aliyunpan.py
Normal file
80
aliyunpan.py
Normal 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())
|
||||
295
anmuxi.py
Normal file
295
anmuxi.py
Normal file
@ -0,0 +1,295 @@
|
||||
|
||||
# !/usr/bin/python3
|
||||
# -- coding: utf-8 --
|
||||
# cron "30 9 * * *" script-path=xxx.py,tag=匹配cron用
|
||||
# const $ = new Env('安慕希小程序')
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
import time
|
||||
from datetime import datetime, time as times
|
||||
import requests
|
||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||
# 禁用安全请求警告
|
||||
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||
|
||||
IS_DEV = False
|
||||
if os.path.isfile('DEV_ENV.py'):
|
||||
import DEV_ENV
|
||||
|
||||
IS_DEV = True
|
||||
if os.path.isfile('notify.py'):
|
||||
from notify import send
|
||||
|
||||
print("加载通知服务成功!")
|
||||
else:
|
||||
print("加载通知服务失败!")
|
||||
send_msg = ''
|
||||
one_msg = ''
|
||||
|
||||
|
||||
def Log(cont=''):
|
||||
global send_msg, one_msg
|
||||
print(cont)
|
||||
if cont:
|
||||
one_msg += f'{cont}\n'
|
||||
send_msg += f'{cont}\n'
|
||||
|
||||
|
||||
class RUN:
|
||||
def __init__(self, info, index):
|
||||
global one_msg
|
||||
one_msg = ''
|
||||
split_info = info.split('@')
|
||||
self.access_token = split_info[0]
|
||||
len_split_info = len(split_info)
|
||||
last_info = split_info[len_split_info - 1]
|
||||
self.send_UID = None
|
||||
if len_split_info > 0 and "UID_" in last_info:
|
||||
print('检测到设置了UID')
|
||||
print(last_info)
|
||||
self.send_UID = last_info
|
||||
self.index = index + 1
|
||||
# print(self.access_token)
|
||||
self.UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x6309080f) XWEB/8555'
|
||||
# if ENV_NAME == 'YL_ZXBQL':
|
||||
# appid = "wx06af0ef532292cd3"
|
||||
# scene = "1037"
|
||||
# scene = "1037"
|
||||
self.headers = {
|
||||
'Host': 'amxshop.yili.com',
|
||||
'accesstoken': self.access_token,
|
||||
'scene': '1302',
|
||||
'xweb_xhr': '1',
|
||||
'user-agent': self.UA,
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
'accept': '*/*',
|
||||
'sec-fetch-site': 'cross-site',
|
||||
'sec-fetch-mode': 'cors',
|
||||
'sec-fetch-dest': 'empty',
|
||||
'referer': 'https://servicewechat.com/wxf2a6206f7e2fd712/664/page-frame.html',
|
||||
'accept-language': 'zh-CN,zh;q=0.9',
|
||||
}
|
||||
self.s = requests.session()
|
||||
self.s.verify = False
|
||||
self.baseUrl = 'https://amxshop.yili.com/api/'
|
||||
|
||||
|
||||
def make_request(self, url, method='post', headers={}, data={}, params=None):
|
||||
if headers == {}:
|
||||
headers = self.headers
|
||||
try:
|
||||
if method.lower() == 'get':
|
||||
response = self.s.get(url, headers=headers, verify=False, params=params)
|
||||
elif method.lower() == 'post':
|
||||
response = self.s.post(url, headers=headers, json=data, params=params, verify=False)
|
||||
else:
|
||||
raise ValueError("不支持的请求方法❌: " + method)
|
||||
return response.json()
|
||||
except requests.exceptions.RequestException as e:
|
||||
print("请求异常❌:", e)
|
||||
except ValueError as e:
|
||||
print("值错误或不支持的请求方法❌:", e)
|
||||
except Exception as e:
|
||||
print("发生了未知错误❌:", e)
|
||||
|
||||
def get_user_info(self):
|
||||
act_name = '获取用户信息'
|
||||
Log(f'\n====== {act_name} ======')
|
||||
url = f"{self.baseUrl}user/getUser"
|
||||
response = self.make_request(url,method='get')
|
||||
if response.get('code', -1) == 200:
|
||||
print(f'{act_name}成功!✅')
|
||||
data = response.get('data',{})
|
||||
user = data.get('user',{})
|
||||
user_id = user.get('id')
|
||||
user_name = user.get('name')
|
||||
mobilePhone = user.get('mobilePhone')
|
||||
myCode = user.get('myCode')
|
||||
|
||||
mobile = mobilePhone[:3] + "*" * 4 + mobilePhone[7:]
|
||||
Log(f">用户名:{user_name}\n>手机号:{mobile}")
|
||||
|
||||
return True
|
||||
elif not response:
|
||||
print(f">账号 {self.index}: ck过期 请重新抓取 access-token")
|
||||
return False
|
||||
else:
|
||||
print(response)
|
||||
return False
|
||||
|
||||
def get_Point(self,END=False):
|
||||
act_name = '获取积分信息'
|
||||
if not END:Log(f'\n====== {act_name} ======')
|
||||
url = f"{self.baseUrl}user/score"
|
||||
response = self.make_request(url,method='get')
|
||||
if response.get('code', -1) == 200:
|
||||
data = response.get('data', '')
|
||||
print(f'{act_name}成功!✅')
|
||||
if END:
|
||||
Log(f'执行后积分:【{data}】')
|
||||
else:
|
||||
Log(f'当前积分:【{data}】')
|
||||
return True
|
||||
else:
|
||||
print(response)
|
||||
return False
|
||||
|
||||
def daily_sign(self):
|
||||
act_name = '签到'
|
||||
Log(f'\n====== {act_name} ======')
|
||||
url = f"{self.baseUrl}user/daily/sign?exParams=false"
|
||||
response = self.make_request(url,method='get')
|
||||
if response.get('code', -1) == 200:
|
||||
data = response.get('data',{})
|
||||
point = data.get('dailySign', {}).get('bonusPoint', '')
|
||||
print(f'{act_name}成功!✅')
|
||||
Log(f'获得积分:【{point}】')
|
||||
return True
|
||||
else:
|
||||
print(response)
|
||||
return False
|
||||
|
||||
def get_sign_status(self):
|
||||
act_name = '获取签到信息'
|
||||
Log(f'\n====== {act_name} ======')
|
||||
url = f"{self.baseUrl}user/sign/status"
|
||||
response = self.make_request(url,method='get')
|
||||
if response.get('code', -1) == 200:
|
||||
data = response.get('data',{})
|
||||
signed = data.get('signed','')
|
||||
signDays = data.get('signDays','')
|
||||
print(f'{act_name}成功!✅')
|
||||
Log(f'今日:【{"已签到" if signed else "未签到"}】')
|
||||
print(f'累计签到:【{signDays}】天')
|
||||
if not signed:
|
||||
self.daily_sign()
|
||||
return True
|
||||
else:
|
||||
print(response)
|
||||
return False
|
||||
|
||||
|
||||
def main(self):
|
||||
Log(f"\n开始执行第{self.index}个账号--------------->>>>>")
|
||||
if self.get_user_info():
|
||||
# random_delay()
|
||||
self.get_Point()
|
||||
random_delay()
|
||||
self.get_sign_status()
|
||||
random_delay()
|
||||
self.get_Point(True)
|
||||
# self.daily_sign()
|
||||
|
||||
self.sendMsg()
|
||||
return True
|
||||
else:
|
||||
self.sendMsg()
|
||||
return False
|
||||
|
||||
def sendMsg(self):
|
||||
if self.send_UID:
|
||||
push_res = CHERWIN_TOOLS.wxpusher(self.send_UID, one_msg, APP_NAME)
|
||||
print(push_res)
|
||||
|
||||
|
||||
def random_delay(min_delay=1, max_delay=5):
|
||||
"""
|
||||
在min_delay和max_delay之间产生一个随机的延时时间,然后暂停执行。
|
||||
参数:
|
||||
min_delay (int/float): 最小延时时间(秒)
|
||||
max_delay (int/float): 最大延时时间(秒)
|
||||
"""
|
||||
delay = random.uniform(min_delay, max_delay)
|
||||
print(f">本次随机延迟:【{delay:.2f}】 秒.....")
|
||||
time.sleep(delay)
|
||||
|
||||
|
||||
def down_file(filename, file_url):
|
||||
print(f'开始下载:{filename},下载地址:{file_url}')
|
||||
try:
|
||||
response = requests.get(file_url, verify=False, timeout=10)
|
||||
response.raise_for_status()
|
||||
with open(filename + '.tmp', 'wb') as f:
|
||||
f.write(response.content)
|
||||
print(f'【{filename}】下载完成!')
|
||||
|
||||
# 检查临时文件是否存在
|
||||
temp_filename = filename + '.tmp'
|
||||
if os.path.exists(temp_filename):
|
||||
# 删除原有文件
|
||||
if os.path.exists(filename):
|
||||
os.remove(filename)
|
||||
# 重命名临时文件
|
||||
os.rename(temp_filename, filename)
|
||||
print(f'【{filename}】重命名成功!')
|
||||
return True
|
||||
else:
|
||||
print(f'【{filename}】临时文件不存在!')
|
||||
return False
|
||||
except Exception as e:
|
||||
print(f'【{filename}】下载失败:{str(e)}')
|
||||
return False
|
||||
|
||||
|
||||
def import_Tools():
|
||||
global CHERWIN_TOOLS, ENV, APP_INFO, TIPS, TIPS_HTML, amxCode
|
||||
import CHERWIN_TOOLS
|
||||
ENV, APP_INFO, TIPS, TIPS_HTML, amxCode = CHERWIN_TOOLS.main(APP_NAME, local_script_name, ENV_NAME,local_version)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
APP_NAME = '安慕希小程序'
|
||||
ENV_NAME = 'AMX'
|
||||
CK_URL = 'amxshop.yili.com请求头'
|
||||
CK_NAME = 'accesstoken'
|
||||
CK_EX = 'wTUhu5IlL9uQDRelKgMRbao2bxii+O8+4FffOnxxxxxxx'
|
||||
print(f'''
|
||||
✨✨✨ {APP_NAME}脚本✨✨✨
|
||||
✨ 功能:
|
||||
积分签到
|
||||
✨ 抓包步骤:
|
||||
打开{APP_NAME}
|
||||
授权登陆
|
||||
打开抓包工具
|
||||
找{CK_URL}{CK_NAME}
|
||||
参数示例:{CK_EX}
|
||||
✨ ✨✨wxpusher一对一推送功能,
|
||||
✨需要定义变量export WXPUSHER=wxpusher的app_token,不设置则不启用wxpusher一对一推送
|
||||
✨需要在{ENV_NAME}变量最后添加@wxpusher的UID
|
||||
✨ 设置青龙变量:
|
||||
export {ENV_NAME}='{CK_NAME}参数值'多账号#或&分割
|
||||
export SCRIPT_UPDATE = 'False' 关闭脚本自动更新,默认开启
|
||||
✨ ✨ 注意:抓完CK没事儿别打开小程序,重新打开小程序请重新抓包
|
||||
✨ 推荐cron:5 7,11,15,20 * * *
|
||||
''')
|
||||
local_script_name = os.path.basename(__file__)
|
||||
local_version = '2024.05.23'
|
||||
if IS_DEV:
|
||||
import_Tools()
|
||||
else:
|
||||
if os.path.isfile('amx.py'):
|
||||
import_Tools()
|
||||
else:
|
||||
if down_file('amx.py', 'amx.py'):
|
||||
print('脚本检测完成')
|
||||
import_Tools()
|
||||
else:
|
||||
print(
|
||||
'脚本检测失败')
|
||||
exit()
|
||||
print(TIPS)
|
||||
token = ''
|
||||
token = ENV if ENV else token
|
||||
if not token:
|
||||
print(f"未填写{ENV_NAME}变量\n青龙可在环境变量设置 {ENV_NAME} 或者在本脚本文件上方将{CK_NAME}填入token =''")
|
||||
exit()
|
||||
tokens = CHERWIN_TOOLS.ENV_SPLIT(token)
|
||||
# print(tokens)
|
||||
if len(tokens) > 0:
|
||||
print(f"\n>>>>>>>>>>共获取到{len(tokens)}个账号<<<<<<<<<<")
|
||||
access_token = []
|
||||
for index, infos in enumerate(tokens):
|
||||
run_result = RUN(infos, index).main()
|
||||
if not run_result: continue
|
||||
if send: send(f'{APP_NAME}挂机通知', send_msg + TIPS_HTML)
|
||||
@ -18,8 +18,8 @@ let scriptVersionNow = "1.0.0";//脚本版本号
|
||||
let msg = "";
|
||||
// ==================================异步顺序==============================================================================
|
||||
!(async () => {
|
||||
await getNotice(); //远程通知
|
||||
await getVersion("yang53458/ohhh154@main/babaycare.js");
|
||||
//await getNotice(); //远程通知
|
||||
//await getVersion("yang53458/ohhh154@main/babaycare.js");
|
||||
await main();//主函数
|
||||
await SendMsg(msg); //发送通知
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
*/
|
||||
let GacmotorCookies = './GacmotorCookies.json';//指定文件目录
|
||||
const $ = new Env("广汽传祺");
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
const notify = $.isNode() ? require('../sendNotify') : '';
|
||||
//const { updateEnv11, getEnvs, updateEnv } = require("./ql")
|
||||
const appVersion = "5.1.22"
|
||||
//let ckName = "gacmotorToken";
|
||||
File diff suppressed because one or more lines are too long
@ -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} ======`);
|
||||
369
backup/wangchao.py
Normal file
369
backup/wangchao.py
Normal file
@ -0,0 +1,369 @@
|
||||
|
||||
|
||||
import hashlib
|
||||
from gmalg import SM2
|
||||
|
||||
import math
|
||||
import time
|
||||
import requests
|
||||
import datetime
|
||||
import os
|
||||
from urllib.parse import urlparse, parse_qs
|
||||
import random
|
||||
from Crypto.PublicKey import RSA
|
||||
from Crypto.Cipher import PKCS1_v1_5
|
||||
import base64
|
||||
from requests.adapters import HTTPAdapter
|
||||
from urllib3.util.retry import Retry
|
||||
import urllib.parse
|
||||
import json
|
||||
debug=0
|
||||
account_id = ""
|
||||
def jm(password):
|
||||
public_key_base64 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD6XO7e9YeAOs+cFqwa7ETJ+WXizPqQeXv68i5vqw9pFREsrqiBTRcg7wB0RIp3rJkDpaeVJLsZqYm5TW7FWx/iOiXFc+zCPvaKZric2dXCw27EvlH5rq+zwIPDAJHGAfnn1nmQH7wR3PCatEIb8pz5GFlTHMlluw4ZYmnOwg+thwIDAQAB"
|
||||
public_key_der = base64.b64decode(public_key_base64)
|
||||
key = RSA.importKey(public_key_der)
|
||||
cipher = PKCS1_v1_5.new(key)
|
||||
password_bytes = password.encode('utf-8')
|
||||
encrypted_password = cipher.encrypt(password_bytes)
|
||||
encrypted_password_base64 = base64.b64encode(encrypted_password).decode('utf-8')
|
||||
url_encoded_data = urllib.parse.quote(encrypted_password_base64)
|
||||
return url_encoded_data
|
||||
|
||||
#生成设备号
|
||||
def generate_random_uuid():
|
||||
# 设备号其实可以写死,保险起见选择随机生成
|
||||
uuid_str = '00000000-{:04x}-{:04x}-0000-0000{:08x}'.format(
|
||||
random.randint(0, 0xfff) | 0x4000,
|
||||
random.randint(0, 0x3fff) | 0x8000,
|
||||
random.getrandbits(32)
|
||||
)
|
||||
return uuid_str
|
||||
|
||||
# 签名并获取认证码
|
||||
def sign(phone, password):
|
||||
url_encoded_data = jm(password)
|
||||
url = "https://passport.tmuyun.com/web/oauth/credential_auth"
|
||||
payload = f"client_id=10019&password={url_encoded_data}&phone_number={phone}"
|
||||
print(payload)
|
||||
headers = {
|
||||
'User-Agent': "ANDROID;13;10019;6.0.2;1.0;null;MEIZU 20",
|
||||
'Connection': "Keep-Alive",
|
||||
'Accept-Encoding': "gzip",
|
||||
'Content-Type': "application/x-www-form-urlencoded",
|
||||
'Cache-Control': "no-cache",
|
||||
'X-SIGNATURE': "185d21c6f3e9ec4af43e0065079b8eb7f1bb054134481e57926fcc45e304b896",
|
||||
}
|
||||
|
||||
response = requests.post(url, data=payload, headers=headers)
|
||||
print(response.json())
|
||||
code = response.json()['data']['authorization_code']['code']
|
||||
|
||||
url = "https://vapp.taizhou.com.cn/api/zbtxz/login"
|
||||
payload = f"check_token=&code={code}&token=&type=-1&union_id="
|
||||
headers = {
|
||||
'User-Agent': "6.0.2;{deviceid};Meizu MEIZU 20;Android;13;tencent;6.10.0",
|
||||
'Connection': "Keep-Alive",
|
||||
'Accept-Encoding': "gzip",
|
||||
'Content-Type': "application/x-www-form-urlencoded",
|
||||
'X-SESSION-ID': "66586b383f293a7173e4c8f4",
|
||||
'X-REQUEST-ID': "110c1987-1637-4f4e-953e-e35272bb891e",
|
||||
'X-TIMESTAMP': "1717072109065",
|
||||
'X-SIGNATURE': "a69f171e284594a5ecc4baa1b2299c99167532b9795122bae308f27592e94381",
|
||||
'X-TENANT-ID': "64",
|
||||
'Cache-Control': "no-cache"
|
||||
}
|
||||
response = requests.post(url, data=payload, headers=headers)
|
||||
message = response.json()['message']
|
||||
account_id = response.json()['data']['account']['id']
|
||||
session_id = response.json()['data']['session']['id']
|
||||
name = response.json()['data']['account']['nick_name']
|
||||
|
||||
return message, account_id, session_id, name
|
||||
|
||||
|
||||
#生成验证码
|
||||
def generate_md5(input_str):
|
||||
md5_obj = hashlib.md5()
|
||||
input_str_encoded = input_str.encode('utf-8')
|
||||
md5_obj.update(input_str_encoded)
|
||||
return md5_obj.hexdigest()
|
||||
|
||||
#获取阅读的JSESSIONID
|
||||
def get_special_cookie():
|
||||
special_cookie_url = f'https://xmt.taizhou.com.cn/prod-api/user-read/app/login?id={account_id}&sessionId={session_id}&deviceId={deviceid}'
|
||||
|
||||
headers = {
|
||||
'Host': 'xmt.taizhou.com.cn',
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
|
||||
'Accept': '*/*',
|
||||
'X-Requested-With': 'com.shangc.tiennews.taizhou',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
}
|
||||
response = requests.get(special_cookie_url, headers=headers)
|
||||
if debug and response.status_code == 200:
|
||||
print('执行任务获取阅读jse')
|
||||
print('下面是访问的url\n',special_cookie_url)
|
||||
print('下面是访问的headers\n',headers)
|
||||
print('下面是返回的response\n',response.headers)
|
||||
if response.status_code == 200 and response.headers['Set-Cookie']:
|
||||
jsessionid1 =response.headers['Set-Cookie'].split(';')[0]+';'
|
||||
print('获取特殊cookie成功',jsessionid1)
|
||||
return response.headers['Set-Cookie']
|
||||
else:
|
||||
print('获取jsesesionid失败',response.headers)
|
||||
|
||||
#获取日期
|
||||
def get_current_date():
|
||||
now = datetime.datetime.now()
|
||||
year_str = str(now.year)
|
||||
month_str = f"0{now.month}" if now.month < 10 else str(now.month)
|
||||
day_str = f"0{now.day}" if now.day < 10 else str(now.day)
|
||||
print(f"当前日期{year_str}{month_str}{day_str}")
|
||||
return year_str + month_str + day_str
|
||||
|
||||
#获取阅读列表
|
||||
def fetch_article_list():
|
||||
headers = {
|
||||
'Host': 'xmt.taizhou.com.cn',
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
|
||||
'Accept': '*/*',
|
||||
'X-Requested-With': 'com.shangc.tiennews.taizhou',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
'cookie': f'{special_cookie};'
|
||||
}
|
||||
url=f'https://xmt.taizhou.com.cn/prod-api/user-read/list/{get_current_date()}'
|
||||
response = requests.get(url, headers=headers)
|
||||
if debug and response.status_code == 200:
|
||||
print('执行任务获取阅读列表')
|
||||
print('下面是访问的url\n',url)
|
||||
print('下面是访问的headers\n',headers)
|
||||
print('下面是返回的response\n',response.headers)
|
||||
msg = response.json()['msg']
|
||||
print(msg)
|
||||
return response.json()
|
||||
def encrypt_with_sm2(article_id, account_id):
|
||||
# 获取当前时间戳
|
||||
timestamp = int(time.time() * 1000)
|
||||
# 构造数据
|
||||
data = {
|
||||
"timestamp": timestamp,
|
||||
"articleId": article_id,
|
||||
"accountId": account_id
|
||||
}
|
||||
# 将数据序列化为JSON字符串
|
||||
data_json = json.dumps(data, separators=(',', ':'))
|
||||
print("Data to be encrypted:", data_json)
|
||||
|
||||
# SM2公钥,确保公钥以04开头(未压缩格式)
|
||||
public_key_hex = "04A50803A27F000D6B310607EBA2A1C899E82872C0B538CA41DB6F0183B4C7E164DAFC6946ABF93C8AF1C0AD96D0E770D29264EF9F907DDBAE97A2A0BB1036D4AC"
|
||||
public_key = bytes.fromhex(public_key_hex)
|
||||
|
||||
# 创建SM2对象
|
||||
sm2_crypt = SM2(pk=public_key)
|
||||
|
||||
# 加密数据
|
||||
encrypted_data = sm2_crypt.encrypt(data_json.encode('utf-8'))
|
||||
print(len(encrypted_data.hex()))
|
||||
|
||||
|
||||
# 返回加密后的十六进制字符串
|
||||
encrypted_data_hex = encrypted_data.hex()
|
||||
#去掉前面两位
|
||||
encrypted_data_hex = encrypted_data_hex[2:]
|
||||
return encrypted_data_hex
|
||||
#阅读文章
|
||||
def mark_article_as_read(article_id,retry_count=3):
|
||||
headers = {
|
||||
'Host': 'xmt.taizhou.com.cn',
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
|
||||
'Accept': '*/*',
|
||||
'X-Requested-With': 'com.shangc.tiennews.taizhou',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Referer': 'https://xmt.taizhou.com.cn/readingAward-v7-3/?gaze_control=01',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
'cookie': f'{special_cookie}',
|
||||
}
|
||||
timestamp_str = str(math.floor(time.time() * 1000))
|
||||
signature = encrypt_with_sm2(article_id,account_id)
|
||||
url = f'https://xmt.taizhou.com.cn/prod-api/already-read/article/new?signature={signature}'
|
||||
print(url)
|
||||
|
||||
# 创建一个包含重试策略的会话
|
||||
session = requests.Session()
|
||||
retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504])
|
||||
session.mount('https://', HTTPAdapter(max_retries=retries))
|
||||
|
||||
for attempt in range(retry_count):
|
||||
try:
|
||||
response = session.get(url, headers=headers, timeout=10)
|
||||
if response.status_code == 200:
|
||||
print(response.text)
|
||||
return
|
||||
else:
|
||||
print(f"请求失败,状态码: {response.status_code}, 响应内容: {response.text}")
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"请求失败 (尝试 {attempt + 1}/{retry_count}): {e}")
|
||||
time.sleep(2) # 在重试前增加延迟
|
||||
|
||||
|
||||
# 登录并获取抽奖JSESSIONID
|
||||
def login(account_id, session_id, retry_count=3):
|
||||
base_url = 'https://srv-app.taizhou.com.cn'
|
||||
url = f'{base_url}/tzrb/user/loginWC'
|
||||
headers = {
|
||||
'Host': 'srv-app.taizhou.com.cn',
|
||||
'Connection': 'keep-alive',
|
||||
'Pragma': 'no-cache',
|
||||
'Cache-Control': 'no-cache',
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
|
||||
'Accept': '*/*',
|
||||
'X-Requested-With': 'com.shangc.tiennews.taizhou',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Referer': 'https://srv-app.taizhou.com.cn/luckdraw/',
|
||||
'Accept-Encoding': 'gzip, deflate',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'
|
||||
}
|
||||
params = {
|
||||
'accountId': account_id,
|
||||
'sessionId': session_id
|
||||
}
|
||||
|
||||
# 创建一个包含重试策略的会话
|
||||
session = requests.Session()
|
||||
retries = Retry(total=5, backoff_factor=1, status_forcelist=[502, 503, 504])
|
||||
session.mount('https://', HTTPAdapter(max_retries=retries))
|
||||
|
||||
for attempt in range(retry_count):
|
||||
try:
|
||||
response = session.get(url, params=params, headers=headers, timeout=10)
|
||||
if response.status_code == 200:
|
||||
cookies_dict = response.cookies.get_dict()
|
||||
s_JSESSIONID = '; '.join([f'{k}={v}' for k, v in cookies_dict.items()])
|
||||
return s_JSESSIONID
|
||||
else:
|
||||
print(f"请求失败,状态码: {response.status_code}, 响应内容: {response.text}")
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"请求失败 (尝试 {attempt + 1}/{retry_count}): {e}")
|
||||
time.sleep(2) # 在重试前增加延迟
|
||||
|
||||
return None
|
||||
|
||||
#抽奖
|
||||
def cj(jsessionid, retry_count=3):
|
||||
url = "https://srv-app.taizhou.com.cn/tzrb/userAwardRecordUpgrade/saveUpdate"
|
||||
payload = "activityId=67&sessionId=undefined&sig=undefined&token=undefined"
|
||||
headers = {
|
||||
'Host': 'srv-app.taizhou.com.cn',
|
||||
'Connection': 'keep-alive',
|
||||
'Content-Length': '63',
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
|
||||
'Content-type': 'application/x-www-form-urlencoded',
|
||||
'Accept': '*/*',
|
||||
'Origin': 'https://srv-app.taizhou.com.cn',
|
||||
'X-Requested-With': 'com.shangc.tiennews.taizhou',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Referer': 'https://srv-app.taizhou.com.cn/luckdraw-ra-1/',
|
||||
'Accept-Encoding': 'gzip, deflate',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
'Cookie': f'{jsessionid}'
|
||||
}
|
||||
|
||||
# 创建一个包含重试策略的会话
|
||||
session = requests.Session()
|
||||
retries = Retry(total=4, backoff_factor=1, status_forcelist=[502, 503, 504])
|
||||
session.mount('https://', HTTPAdapter(max_retries=retries))
|
||||
|
||||
for attempt in range(retry_count):
|
||||
try:
|
||||
response = session.post(url, data=payload, headers=headers, timeout=10)
|
||||
if response.status_code == 200:
|
||||
print(response.text)
|
||||
display_draw_results(jsessionid)
|
||||
return # 成功则退出函数
|
||||
else:
|
||||
print(f"POST 请求失败,状态码: {response.status_code}, 响应内容: {response.text}")
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"POST 请求失败 (尝试 {attempt + 1}/{retry_count}): {e}")
|
||||
time.sleep(2) # 在重试前增加延迟
|
||||
|
||||
#查询抽奖结果
|
||||
def display_draw_results(cookies):
|
||||
draw_result_headers = {
|
||||
'Host': 'srv-app.taizhou.com.cn',
|
||||
'Connection': 'keep-alive',
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; MEIZU 20 Build/QKQ1.190828.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.101 Mobile Safari/537.36;xsb_wangchao;xsb_wangchao;6.0.2;native_app;6.10.0',
|
||||
'Accept': '*/*',
|
||||
'X-Requested-With': 'com.shangc.tiennews.taizhou',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Referer': 'https://srv-app.taizhou.com.cn/luckdraw-awsc-231023/',
|
||||
'Accept-Encoding': 'gzip, deflate',
|
||||
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
'Cookie': f'{cookies}',
|
||||
}
|
||||
result_url = 'https://srv-app.taizhou.com.cn/tzrb/userAwardRecordUpgrade/pageList?pageSize=10&pageNum=1&activityId=67'
|
||||
result_data = requests.get(result_url, headers=draw_result_headers).json()["data"]["records"]
|
||||
for record in result_data:
|
||||
create_time_str = str(record["createTime"])
|
||||
award_name_str = str(record["awardName"])
|
||||
print(f"{create_time_str}---------{award_name_str}")
|
||||
|
||||
# 从环境变量中读取账户和密码
|
||||
accounts = os.getenv("wangchaoAccount")
|
||||
if not accounts:
|
||||
print("❌未找到环境变量!")
|
||||
else:
|
||||
accounts_list = accounts.split("&")
|
||||
print(f"一共在环境变量中获取到 {len(accounts_list)} 个账号")
|
||||
for account in accounts_list:
|
||||
password, phone = account.split("#")
|
||||
message, account_id, session_id, name = sign(phone, password)
|
||||
deviceid = generate_random_uuid()
|
||||
print()
|
||||
if account_id and session_id:
|
||||
mobile = phone[:3] + "*" * 4 + phone[7:]
|
||||
print(f"账号 {mobile} 登录成功")
|
||||
special_cookie = get_special_cookie()
|
||||
print(f"账号 {mobile} 获取阅读列表")
|
||||
article_list = fetch_article_list()
|
||||
for article in article_list['data']['articleIsReadList']:
|
||||
article_title = article['title']
|
||||
if article['isRead'] == True :
|
||||
print(f"√文章{article_title}已读")
|
||||
time.sleep(0.5)
|
||||
continue
|
||||
else:
|
||||
time.sleep(random.uniform(3.5, 4.5))
|
||||
article_id = article['id']
|
||||
print(f"账号 {mobile} 阅读文章 {article_title}")
|
||||
mark_article_as_read(article_id)
|
||||
time.sleep(1)
|
||||
jsessionid = login(account_id, session_id)
|
||||
if jsessionid:
|
||||
print('去抽奖')
|
||||
cj(jsessionid)
|
||||
else:
|
||||
print(f"获取 JSESSIONID 失败")
|
||||
else:
|
||||
print(f"账号 {phone} 登录失败")
|
||||
|
||||
# 每个账号登录后延迟...
|
||||
print("等待 5 秒后继续下一个账号...")
|
||||
time.sleep(5)
|
||||
print("所有账号处理完毕")
|
||||
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
1841
chaoxinwen.js
Normal file
1841
chaoxinwen.js
Normal file
File diff suppressed because it is too large
Load Diff
2
dwnc.js
2
dwnc.js
@ -40,7 +40,7 @@ let UserAgent = 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002
|
||||
//---------------------------------------------------------
|
||||
|
||||
async function start() {
|
||||
await getVersion('smallfawn/QLScriptPublic/main/dwnc.js')
|
||||
//await getVersion('smallfawn/QLScriptPublic/main/dwnc.js')
|
||||
console.log(`\n============ 当前版本:${scriptVersionNow} 📌 最新版本:${scriptVersionLatest} ============`);
|
||||
console.log(`获取首账号助力码`);
|
||||
taskall = [];
|
||||
|
||||
68
enshan.py
Normal file
68
enshan.py
Normal 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>(.*?) ", 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())
|
||||
4
fsdlb.js
4
fsdlb.js
@ -19,8 +19,8 @@ let scriptVersionNow = "1.0.0";
|
||||
let msg = "";
|
||||
// ==================================异步顺序==============================================================================
|
||||
!(async () => {
|
||||
await getNotice();
|
||||
await getVersion("yang7758258/ohhh154@main/fsdlb.js");
|
||||
//await getNotice();
|
||||
//await getVersion("yang7758258/ohhh154@main/fsdlb.js");
|
||||
await main();
|
||||
await SendMsg(msg);
|
||||
|
||||
|
||||
@ -18,8 +18,8 @@ let scriptVersionNow = "1.0.0";
|
||||
let msg = "";
|
||||
// ==================================异步顺序==============================================================================
|
||||
!(async () => {
|
||||
await getNotice();
|
||||
await getVersion("yang7758258/ohhh154@main/gljj.js");
|
||||
//await getNotice();
|
||||
//await getVersion("yang7758258/ohhh154@main/gljj.js");
|
||||
await main();
|
||||
await SendMsg(msg);
|
||||
|
||||
|
||||
4
hqcsh.js
4
hqcsh.js
@ -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); //发送通知
|
||||
|
||||
|
||||
274
huangli.js
Normal file
274
huangli.js
Normal file
@ -0,0 +1,274 @@
|
||||
/*APP:黄历 (安卓任务多,苹果任务少)变量名:hlck变量值:找到http://python001.smallsword.cn/integral/account_info?将?后面的内容作为变量,多账号换行功能:完成日常任务,每天1块钱左右,满1元可以自动提现定时:1小时一次,吃饭的点要覆盖,建议7-22*/
|
||||
NAME = "黄历"; VALY = ["hlck"]; CK = ""; LOGS = 0; usid = 0; nowhour = Math.round(new Date().getHours()).toString(); Notify = 1;
|
||||
const fs = require("fs");
|
||||
function gogogo(_0x30a068, _0x46d66f, _0x1039f2) {
|
||||
const _0x30deee = new URL("http://test.com?" + _0x1039f2);
|
||||
for (let _0xfe1a9e = 0; _0xfe1a9e < _0x46d66f.length; _0xfe1a9e++) { const _0x333dd8 = _0x46d66f[_0xfe1a9e]; _0x30a068[_0x333dd8] = _0x30deee.searchParams.get(_0x333dd8); }
|
||||
}
|
||||
class Bar {
|
||||
constructor(_0x7e48f6) { this._ = ++usid; this.f = "账号 [" + this._ + "] "; let _0xe420f1 = ["market", "openudid", "dev_uuid", "oaid", "user_id"]; gogogo(this, _0xe420f1, _0x7e48f6); this.message = ""; this.logs = true; }
|
||||
async login() {
|
||||
let _0x191445 = $.time(13), _0x2e8cab = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0x191445 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x336ab0 = await $.task("get", "http://python001.smallsword.cn/integral/account_info?lang=zh_cn&jbk=0&device=android×tamp=" + _0x191445 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0x2e8cab, {});
|
||||
if (_0x336ab0.code == "E00000000") {
|
||||
console.log(this.f + "登陆成功,当前金币" + _0x336ab0.data.now_score + ",当前余额" + _0x336ab0.data.cash_num + "元"); this.message += this.f + "登陆成功,当前金币" + _0x336ab0.data.now_score + ",当前余额" + _0x336ab0.data.cash_num + "元";
|
||||
if (_0x336ab0.data.cash_num >= 1) { await this.tixian(); }
|
||||
this.logs = true;
|
||||
} else { this.logs = false; }
|
||||
}
|
||||
async signinlist() {
|
||||
let _0x5110db = $.time(13), _0x364f86 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0x5110db + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x364613 = await $.task("get", "http://python001.smallsword.cn/integral/sign_task?lang=zh_cn&jbk=0&device=android×tamp=" + _0x5110db + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0x364f86, {});
|
||||
for (let _0x27dec5 of _0x364613.data.list) { for (let _0x1e37ca of _0x27dec5.videos) { if (_0x1e37ca.status == 0) { let _0x20407e = "刷金币"; await this.signinvideo(_0x1e37ca.task_id, _0x1e37ca.score, _0x20407e); } } }
|
||||
if (_0x364613.code == "E00000000" && _0x364613.data.is_today_sign == 0) {
|
||||
let _0x3631e6 = _0x364613.data.list.find(_0x12c4ea => _0x12c4ea.status === "0"), _0x42ea26 = "签到";
|
||||
await this.signin(_0x3631e6.task_id, _0x3631e6.score, _0x42ea26);
|
||||
for (let _0xf3e7e1 of _0x3631e6.videos) { let _0x11599d = "签到"; await this.signinvideo(_0xf3e7e1.task_id, _0xf3e7e1.score, _0x11599d); }
|
||||
}
|
||||
}
|
||||
async signin(_0x26dfe1, _0x3a6636, _0x19a836) {
|
||||
let _0x43050e = $.time(13), _0x6930f3 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&is_video=0&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "&score=" + _0x3a6636 + "&task_id=" + _0x26dfe1 + "×tamp=" + _0x43050e + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x4a34e2 = "lang=zh_cn&jbk=0&device=android×tamp=" + _0x43050e + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&task_id=" + _0x26dfe1 + "&is_video=0&score=" + _0x3a6636 + "&sign=" + _0x6930f3, _0x2960b9 = await $.task("post", "http://python001.smallsword.cn/integral/do_task", {}, _0x4a34e2);
|
||||
if (_0x2960b9.code == "E00000000") { console.log("" + this.f + _0x19a836 + "成功,获得" + _0x3a6636 + "金币"); await $.wait(35000, 40000); } else { console.log("" + this.f + _0x19a836 + "失败,原因:" + _0x2960b9.msg); }
|
||||
}
|
||||
async signinvideo(_0x2c8db3, _0x40c50d, _0x25457e) {
|
||||
let _0x697c22 = $.time(13), _0x2970b6 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&is_video=1&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "&score=" + _0x40c50d + "&task_id=" + _0x2c8db3 + "×tamp=" + _0x697c22 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x14bf91 = "lang=zh_cn&jbk=0&device=android×tamp=" + _0x697c22 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&task_id=" + _0x2c8db3 + "&is_video=1&score=" + _0x40c50d + "&sign=" + _0x2970b6, _0xc57fbe = await $.task("post", "http://python001.smallsword.cn/integral/do_task", {}, _0x14bf91);
|
||||
if (_0xc57fbe.code == "E00000000") { console.log("" + this.f + _0x25457e + "视频观看成功,获得" + _0x40c50d + "金币"); await $.wait(35000, 40000); } else { console.log("" + this.f + _0x25457e + "视频观看失败,原因:" + _0xc57fbe.msg); }
|
||||
}
|
||||
async videolist() {
|
||||
let _0xe18dae = $.time(13), _0x224ee0 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0xe18dae + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x2544ff = await $.task("get", "http://python001.smallsword.cn/integral/video_task?lang=zh_cn&jbk=0&device=android×tamp=" + _0xe18dae + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0x224ee0, {});
|
||||
if (_0x2544ff.code == "E00000000") { for (let _0x4d36dd of _0x2544ff.data) { if (_0x4d36dd.status == 0) { let _0x45a023 = "完成看视频任务"; await this.signin(_0x4d36dd.task_id, _0x4d36dd.score, _0x45a023); } } }
|
||||
}
|
||||
async boxlist() {
|
||||
let _0x4a0c89 = $.time(13), _0x377adc = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0x4a0c89 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0xaf37e3 = await $.task("get", "http://python001.smallsword.cn/integral/chest_task?lang=zh_cn&jbk=0&device=android×tamp=" + _0x4a0c89 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0x377adc, {});
|
||||
if (_0xaf37e3.code == "E00000000" && _0xaf37e3.data.status == 0) {
|
||||
let _0x3ba053 = "开宝箱"; await this.signin(_0xaf37e3.data.task_id, _0xaf37e3.data.score, _0x3ba053);
|
||||
for (let _0x5668e3 of _0xaf37e3.data.videos) { let _0x34080f = "宝箱"; await this.signinvideo(_0x5668e3.task_id, _0x5668e3.score, _0x34080f); }
|
||||
}
|
||||
}
|
||||
async meallist() {
|
||||
let _0x158eea = $.time(13), _0x50e532 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0x158eea + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x5c9195 = await $.task("get", "http://python001.smallsword.cn/integral/meal_task?lang=zh_cn&jbk=0&device=android×tamp=" + _0x158eea + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0x50e532, {});
|
||||
if (_0x5c9195.code == "E00000000") {
|
||||
let _0x253019 = $.getCurrentTask(_0x5c9195.data);
|
||||
if (_0x253019.status == 1) {
|
||||
let _0x337f38 = "完成吃饭任务"; await this.signin(_0x253019.task_id, _0x253019.score, _0x337f38);
|
||||
for (let _0x7a7750 of _0x253019.videos) { let _0x40d1a9 = "完成吃饭视频任务"; await this.signinvideo(_0x7a7750.task_id, _0x7a7750.score, _0x40d1a9); }
|
||||
}
|
||||
}
|
||||
}
|
||||
async commonlist() {
|
||||
let _0x225714 = $.time(13), _0xbef148 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0x225714 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x16e06a = await $.task("get", "http://python001.smallsword.cn/integral/common_task?lang=zh_cn&jbk=0&device=android×tamp=" + _0x225714 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0xbef148, {});
|
||||
if (_0x16e06a.code == "E00000000") {
|
||||
for (let _0x190295 of _0x16e06a.data) {
|
||||
if (_0x190295.title) {
|
||||
for (let _0x151fa6 of _0x190295.list) {
|
||||
if (_0x151fa6.status == 0) {
|
||||
let _0x145e2f = "完成" + _0x151fa6.task_name + "任务";
|
||||
await this.signin(_0x151fa6.task_id, _0x151fa6.score, _0x145e2f); await this.receive(_0x151fa6.task_id, _0x151fa6.score, _0x145e2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
async receive(_0x14f592, _0x57f640) { let _0x544f86 = $.time(13), _0x28fd10 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "&score=" + _0x57f640 + "&task_id=" + _0x14f592 + "×tamp=" + _0x544f86 + "&user_id=" + this.user_id + "&ver=1.9.1"); }
|
||||
async walklist() {
|
||||
let _0x59d03c = $.time(13), _0x2627f1 = $.RT(10000, 15000), _0x27160a = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "&steps=" + _0x2627f1 + "×tamp=" + _0x59d03c + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x277a85 = await $.task("get", "http://python001.smallsword.cn/integral/walk_task?lang=zh_cn&jbk=0&device=android×tamp=" + _0x59d03c + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&steps=" + _0x2627f1 + "&sign=" + _0x27160a, {});
|
||||
if (_0x277a85.code == "E00000000") {
|
||||
let _0x4c0677 = _0x277a85.data.list, _0x21836c = _0x4c0677.map(_0x330f63 => _0x330f63.task_id).join(",");
|
||||
if (_0x4c0677[4].status == 0) {
|
||||
await this.steps(_0x21836c);
|
||||
for (let _0x3a01b0 of _0x277a85.data.task_video) { let _0x3844f8 = "完成走路视频任务"; await this.signinvideo(_0x3a01b0.task_id, _0x3a01b0.score, _0x3844f8); }
|
||||
}
|
||||
}
|
||||
}
|
||||
async steps(_0xb7d378) {
|
||||
let _0x73c907 = encodeURIComponent(_0xb7d378), _0x6a412 = $.time(13), _0x5e50ed = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&is_video=0&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "&score=550&task_id=&task_ids=" + _0xb7d378 + "×tamp=" + _0x6a412 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x34aad5 = "lang=zh_cn&jbk=0&device=android×tamp=" + _0x6a412 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&task_ids=" + _0x73c907 + "&task_id=&is_video=0&score=550&sign=" + _0x5e50ed, _0x23df4d = await $.task("post", "http://python001.smallsword.cn/integral/do_task", {}, _0x34aad5);
|
||||
_0x23df4d.code == "E00000000" ? console.log(this.f + "领取步数奖励成功,获得550金币") : console.log(this.f + "领取步数奖励失败,原因:" + _0x23df4d.msg);
|
||||
}
|
||||
async tixian() {
|
||||
let _0x2329e9 = $.time(13), _0x3d5ad0 = $.MD5Encrypt(0, this.user_id + "19jt6vo23r3ws090n2b3n2h63g8k4ng30axw18"), _0x41ae4c = "lang=zh_cn&jbk=0&device=android×tamp=" + _0x2329e9 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&type=1&app_secret=" + _0x3d5ad0, _0x4c2825 = await $.task("post", "http://python001.smallsword.cn/cash_out", {}, _0x41ae4c);
|
||||
_0x4c2825.code == "E00000000" ? console.log(this.f + "提现1元成功") : console.log(this.f + " " + _0x4c2825.msg);
|
||||
}
|
||||
async plantlist() {
|
||||
let _0x1e24b7 = $.time(13), _0x26e421 = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "×tamp=" + _0x1e24b7 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x4d24e7 = await $.task("get", "http://python001.smallsword.cn/tree/integral_list?lang=zh_cn&jbk=0&device=android×tamp=" + _0x1e24b7 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&sign=" + _0x26e421, {});
|
||||
if (_0x4d24e7.code == "E00000000") { let _0xe17338 = "种树气泡金币"; _0x4d24e7.data.left.is_countdown == 0 && (await this.receive2(_0x4d24e7.data.left.task_id, _0x4d24e7.data.left.multiple_score, _0xe17338)); await $.wait(3000, 10000); _0x4d24e7.data.right.is_countdown == 0 && (await this.receive2(_0x4d24e7.data.right.task_id, _0x4d24e7.data.right.score, _0xe17338)); }
|
||||
}
|
||||
async receive2(_0x688ca1, _0x472ddf, _0x7db0f0) {
|
||||
let _0x32bbe2 = $.time(13), _0x3cc42e = $.MD5Encrypt(0, "appname=chinesealmanac_android&cert_key=9jt6vo23r3ws090n2b3n2h63g8k4ng30axw18&client=android&dev_uuid=" + this.dev_uuid + "&device=android&idfa=android&imei=&jbk=0&lang=zh_cn&market=" + this.market + "&oaid=" + this.oaid + "&openudid=" + this.openudid + "&score=" + _0x472ddf + "&task_id=" + _0x688ca1 + "×tamp=" + _0x32bbe2 + "&user_id=" + this.user_id + "&ver=1.9.1"), _0x3106ca = "lang=zh_cn&jbk=0&device=android×tamp=" + _0x32bbe2 + "&ver=1.9.1&appname=chinesealmanac_android&client=android&idfa=android&market=" + this.market + "&openudid=" + this.openudid + "&dev_uuid=" + this.dev_uuid + "&oaid=" + this.oaid + "&imei=&user_id=" + this.user_id + "&task_id=" + _0x688ca1 + "&score=" + _0x472ddf + "&sign=" + _0x3cc42e, _0x1e9c44 = await $.task("post", "http://python001.smallsword.cn/tree/receive_integral", {}, _0x3106ca);
|
||||
if (_0x1e9c44.code == "E00000000") { console.log(this.f + "收取" + _0x7db0f0 + "奖励成功,获得" + _0x472ddf + "金币"); } else { console.log(this.f + "收取" + _0x7db0f0 + "奖励失败,原因:" + _0x1e9c44.msg); }
|
||||
}
|
||||
}
|
||||
$ = DD(); !(async () => {
|
||||
console.log(NAME);
|
||||
await $.ExamineCookie();
|
||||
await $.Multithreading("login");
|
||||
let _0xd3f276 = $.cookie_list.filter(_0x4b9b31 => _0x4b9b31.logs == true);
|
||||
if (_0xd3f276.length == 0) { console.log("Cookie格式错误 或 账号被禁封"); return; } else { await $.Multithreading("signinlist"); await $.Multithreading("videolist"); await $.Multithreading("boxlist"); await $.Multithreading("meallist"); await $.Multithreading("commonlist"); await $.Multithreading("walklist"); await $.Multithreading("plantlist"); }
|
||||
let _0x1804b3 = [];
|
||||
for (let _0x542165 of $.cookie_list) { if (_0x542165.message) { _0x1804b3.push(_0x542165.message); } }
|
||||
if (_0x1804b3.length > 0) { await $.SendMsg(_0x1804b3.join("\n")); }
|
||||
})().catch(_0x48ede4 => { console.log(_0x48ede4); }).finally(() => { });
|
||||
|
||||
function DD() {
|
||||
return new class {
|
||||
constructor() { this.cookie_list = []; this.message = ""; this.CryptoJS = require("crypto-js"); this.NodeRSA = require("node-rsa"); this.request = require("request"); this.Sha_Rsa = require("jsrsasign"); }
|
||||
async Multithreading(_0x1eb074, _0x795eaf, _0x1585ff) {
|
||||
let _0x945005 = []; !_0x1585ff && (_0x1585ff = 1);
|
||||
while (_0x1585ff--) { for (let _0x2f2d1c of $.cookie_list) { _0x945005.push(_0x2f2d1c[_0x1eb074](_0x795eaf)); } }
|
||||
await Promise.allSettled(_0x945005);
|
||||
}
|
||||
ExamineCookie() {
|
||||
let _0x5e8b90 = process.env[VALY] || CK, _0x3bdd5d = 0;
|
||||
if (_0x5e8b90) {
|
||||
for (let _0x59842b of _0x5e8b90.split("\n").filter(_0x45f5a1 => !!_0x45f5a1)) { $.cookie_list.push(new Bar(_0x59842b)); }
|
||||
_0x3bdd5d = $.cookie_list.length;
|
||||
} else { console.log("\n【" + NAME + "】:未填写变量: " + VALY); }
|
||||
console.log("共找到" + _0x3bdd5d + "个账号"); return $.cookie_list;
|
||||
}
|
||||
task(_0xbb09ee, _0x5bb002, _0x3182d5, _0x52c8dc, _0x5ec08e) {
|
||||
_0xbb09ee == "delete" ? _0xbb09ee = _0xbb09ee.toUpperCase() : _0xbb09ee = _0xbb09ee;
|
||||
if (_0xbb09ee == "post") { delete _0x3182d5["content-type"]; delete _0x3182d5["Content-type"]; delete _0x3182d5["content-Type"]; $.safeGet(_0x52c8dc) ? _0x3182d5["Content-Type"] = "application/json;charset=UTF-8" : _0x3182d5["Content-Type"] = "application/x-www-form-urlencoded"; _0x52c8dc && (_0x3182d5["Content-Length"] = $.lengthInUtf8Bytes(_0x52c8dc)); }
|
||||
_0xbb09ee == "get" && (delete _0x3182d5["content-type"], delete _0x3182d5["Content-type"], delete _0x3182d5["content-Type"], delete _0x3182d5["Content-Length"]); _0x3182d5.Host = _0x5bb002.replace("//", "/").split("/")[1]; return new Promise(async _0x550df7 => {
|
||||
if (_0xbb09ee.indexOf("T") < 0) { var _0x1360c5 = { url: _0x5bb002, headers: _0x3182d5, body: _0x52c8dc, proxy: "http://" + _0x5ec08e }; } else { var _0x1360c5 = { url: _0x5bb002, headers: _0x3182d5, form: JSON.parse(_0x52c8dc), proxy: "http://" + _0x5ec08e }; }
|
||||
if (!_0x5ec08e) { delete _0x1360c5.proxy; }
|
||||
this.request[_0xbb09ee.toLowerCase()](_0x1360c5, (_0x1f4f4b, _0x409069, _0x51251b) => {
|
||||
try {
|
||||
if (_0x51251b) {
|
||||
if (LOGS == 1) {
|
||||
console.log("================ 请求 ================"); console.log(_0x1360c5); console.log("================ 返回 ================");
|
||||
if ($.safeGet(_0x51251b)) { console.log(JSON.parse(_0x51251b)); } else { console.log(_0x51251b); }
|
||||
}
|
||||
}
|
||||
} catch (_0x3b6beb) { console.log(_0x3b6beb, _0x5bb002 + "\n" + _0x3182d5); } finally {
|
||||
let _0x7dead5 = "";
|
||||
if (!_0x1f4f4b) { if ($.safeGet(_0x51251b)) { _0x7dead5 = JSON.parse(_0x51251b); } else { _0x51251b.indexOf("/") != -1 && _0x51251b.indexOf("+") != -1 ? _0x7dead5 = _0x51251b : _0x7dead5 = _0x51251b; } } else { _0x7dead5 = _0x5bb002 + " API请求失败,请检查网络重试\n" + _0x1f4f4b; }
|
||||
return _0x550df7(_0x7dead5);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
async readUUID() {
|
||||
const _0x46a57f = "uuid.txt"; await $.generateUUID(_0x46a57f);
|
||||
try {
|
||||
const _0x45baea = fs.readFileSync(_0x46a57f, "utf8"), _0x3586cf = _0x45baea.trim();
|
||||
return _0x3586cf;
|
||||
} catch (_0x50dcbe) { return null; }
|
||||
}
|
||||
generateUUID(_0x24d8e7) {
|
||||
if (fs.existsSync(_0x24d8e7)) { return; }
|
||||
const _0x131970 = uuidv4();
|
||||
fs.writeFile(_0x24d8e7, _0x131970, "utf8", _0x15fd3c => {
|
||||
if (_0x15fd3c) { console.error("写入文件出错: " + _0x15fd3c.message); return; }
|
||||
console.log("uuid.txt 文件已创建并写入 UUID。");
|
||||
});
|
||||
}
|
||||
async getkami() {
|
||||
let _0x1fae1e = await $.readUUID(), _0x40d9c8 = await $.task("get", "http://" + dcfhost + ":5705/query?dcf=" + dcfkey + "&MA=" + _0x1fae1e, {});
|
||||
return _0x40d9c8;
|
||||
}
|
||||
async SendMsg(_0x37963b) {
|
||||
if (!_0x37963b) { return; }
|
||||
if (Notify == 1) {
|
||||
var _0x427c10 = require("./sendNotify");
|
||||
await _0x427c10.sendNotify(NAME, _0x37963b);
|
||||
}
|
||||
}
|
||||
lengthInUtf8Bytes(_0x5bea6d) {
|
||||
let _0x5c614f = encodeURIComponent(_0x5bea6d).match(/%[89ABab]/g);
|
||||
return _0x5bea6d.length + (_0x5c614f ? _0x5c614f.length : 0);
|
||||
}
|
||||
randomArr(_0x5a3e78) { return _0x5a3e78[parseInt(Math.random() * _0x5a3e78.length, 10)]; }
|
||||
wait(_0x1cf974) { return new Promise(_0x47513a => setTimeout(_0x47513a, _0x1cf974)); }
|
||||
time(_0x4d3818) { if (_0x4d3818 == 10) { return Math.round(+new Date() / 1000); } else { return +new Date(); } }
|
||||
timenow(_0x504efd) {
|
||||
let _0x30bb30 = new Date();
|
||||
if (_0x504efd == undefined) {
|
||||
let _0x4a9944 = new Date(), _0x1a08dd = _0x4a9944.getFullYear() + "-", _0xf4248c = (_0x4a9944.getMonth() + 1 < 10 ? "0" + (_0x4a9944.getMonth() + 1) : _0x4a9944.getMonth() + 1) + "-", _0x162e22 = _0x4a9944.getDate() + " ", _0x1e7941 = _0x4a9944.getHours() + ":", _0x65e6f5 = _0x4a9944.getMinutes() + ":", _0x595250 = _0x4a9944.getSeconds() + 1 < 10 ? "0" + _0x4a9944.getSeconds() : _0x4a9944.getSeconds();
|
||||
return _0x1a08dd + _0xf4248c + _0x162e22 + _0x1e7941 + _0x65e6f5 + _0x595250;
|
||||
} else { if (_0x504efd == 0) { return _0x30bb30.getFullYear(); } else { if (_0x504efd == 1) { return _0x30bb30.getMonth() + 1 < 10 ? "0" + (_0x30bb30.getMonth() + 1) : _0x30bb30.getMonth() + 1; } else { if (_0x504efd == 2) { return _0x30bb30.getDate(); } else { if (_0x504efd == 3) { return _0x30bb30.getHours(); } else { if (_0x504efd == 4) { return _0x30bb30.getMinutes(); } else { if (_0x504efd == 5) { return _0x30bb30.getSeconds() + 1 < 10 ? "0" + _0x30bb30.getSeconds() : _0x30bb30.getSeconds(); } } } } } } }
|
||||
}
|
||||
safeGet(_0x5b424e) { try { if (typeof JSON.parse(_0x5b424e) == "object") { return true; } } catch (_0x49db7a) { return false; } }
|
||||
SJS(_0x491407, _0x14f4c5) {
|
||||
if (_0x14f4c5 == 0) {
|
||||
let _0x24fbf4 = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm01234567890123456789", _0x402e8 = _0x24fbf4.length, _0x50cdc8 = "";
|
||||
for (let _0x260b78 = 0; _0x260b78 < _0x491407; _0x260b78++) { _0x50cdc8 += _0x24fbf4.charAt(Math.floor(Math.random() * _0x402e8)); }
|
||||
return _0x50cdc8;
|
||||
} else {
|
||||
if (_0x14f4c5 == 1) {
|
||||
let _0x3780a1 = "qwertyuiopasdfghjklzxcvbnm0123456789", _0x44a59c = _0x3780a1.length, _0x223007 = "";
|
||||
for (let _0xf85624 = 0; _0xf85624 < _0x491407; _0xf85624++) { _0x223007 += _0x3780a1.charAt(Math.floor(Math.random() * _0x44a59c)); }
|
||||
return _0x223007;
|
||||
} else {
|
||||
let _0x16ef8e = "0123456789", _0x2927cb = _0x16ef8e.length, _0x36f3c8 = "";
|
||||
for (let _0x5a688c = 0; _0x5a688c < _0x491407; _0x5a688c++) { _0x36f3c8 += _0x16ef8e.charAt(Math.floor(Math.random() * _0x2927cb)); }
|
||||
return _0x36f3c8;
|
||||
}
|
||||
}
|
||||
}
|
||||
getCurrentTask(_0x2fb03c) {
|
||||
const _0xd46aee = new Date();
|
||||
for (let _0x12eca3 = 0; _0x12eca3 < _0x2fb03c.length; _0x12eca3++) {
|
||||
const _0x48394f = _0x2fb03c[_0x12eca3], [_0x4dbb7c, _0x49ca7c] = _0x48394f.time_frame.split("-").map(_0xb75fe0 => {
|
||||
const [_0x431e3b, _0x423334] = _0xb75fe0.split(":");
|
||||
return new Date(_0xd46aee.getFullYear(), _0xd46aee.getMonth(), _0xd46aee.getDate(), _0x431e3b, _0x423334);
|
||||
});
|
||||
if (_0x4dbb7c <= _0x49ca7c) { if (_0x4dbb7c <= _0xd46aee && _0xd46aee <= _0x49ca7c) { return _0x48394f; } } else { if (_0x4dbb7c <= _0xd46aee || _0xd46aee <= _0x49ca7c) { return _0x48394f; } }
|
||||
}
|
||||
return null;
|
||||
}
|
||||
udid(_0x38ce6f) {
|
||||
function _0x527705() { return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1); }
|
||||
let _0x7b9404 = _0x527705() + _0x527705() + "-" + _0x527705() + "-" + _0x527705() + "-" + _0x527705() + "-" + _0x527705() + _0x527705() + _0x527705();
|
||||
return _0x38ce6f == 0 ? _0x7b9404.toUpperCase() : _0x7b9404.toLowerCase();
|
||||
}
|
||||
encodeUnicode(_0x4d33a5) {
|
||||
var _0x7b4cc0 = [];
|
||||
for (var _0x38d6f7 = 0; _0x38d6f7 < _0x4d33a5.length; _0x38d6f7++) { _0x7b4cc0[_0x38d6f7] = ("00" + _0x4d33a5.charCodeAt(_0x38d6f7).toString(16)).slice(-4); }
|
||||
return "\\u" + _0x7b4cc0.join("\\u");
|
||||
}
|
||||
decodeUnicode(_0x30ecdd) { _0x30ecdd = _0x30ecdd.replace(/\\u/g, "%u"); return unescape(unescape(_0x30ecdd)); }
|
||||
RT(_0x391502, _0x319e5e) { return Math.round(Math.random() * (_0x319e5e - _0x391502) + _0x391502); }
|
||||
arrNull(_0x110d8e) {
|
||||
var _0x44a5f7 = _0x110d8e.filter(_0x54f54c => { return _0x54f54c && _0x54f54c.trim(); });
|
||||
return _0x44a5f7;
|
||||
}
|
||||
nowtime() { return new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 28800000); }
|
||||
timecs() {
|
||||
let _0x3dc311 = $.nowtime();
|
||||
JSON.stringify(_0x3dc311).indexOf(" ") >= 0 && (_0x3dc311 = _0x3dc311.replace(" ", "T")); return new Date(_0x3dc311).getTime() - 28800000;
|
||||
}
|
||||
rtjson(_0x452429, _0x1c7dae, _0x44a9cf, _0x16e554) {
|
||||
return _0x16e554 == 0 ? JSON.stringify(_0x452429.split(_0x1c7dae).reduce((_0x6a5f78, _0x3b5045) => {
|
||||
let _0x3a81bb = _0x3b5045.split(_0x44a9cf);
|
||||
_0x6a5f78[_0x3a81bb[0].trim()] = _0x3a81bb[1].trim(); return _0x6a5f78;
|
||||
}, {})) : _0x452429.split(_0x1c7dae).reduce((_0xe2c149, _0x1a49c1) => {
|
||||
let _0x263614 = _0x1a49c1.split(_0x44a9cf);
|
||||
_0xe2c149[_0x263614[0].trim()] = _0x263614[1].trim(); return _0xe2c149;
|
||||
}, {});
|
||||
}
|
||||
MD5Encrypt(_0x4c88f0, _0x29f7ca) { if (_0x4c88f0 == 0) { return this.CryptoJS.MD5(_0x29f7ca).toString().toLowerCase(); } else { if (_0x4c88f0 == 1) { return this.CryptoJS.MD5(_0x29f7ca).toString().toUpperCase(); } else { if (_0x4c88f0 == 2) { return this.CryptoJS.MD5(_0x29f7ca).toString().substring(8, 24).toLowerCase(); } else { if (_0x4c88f0 == 3) { return this.CryptoJS.MD5(_0x29f7ca).toString().substring(8, 24).toUpperCase(); } } } } }
|
||||
SHA_Encrypt(_0x26801e, _0x30a1ac, _0x55c0fa) { return _0x26801e == 0 ? this.CryptoJS[_0x30a1ac](_0x55c0fa).toString(this.CryptoJS.enc.Base64) : this.CryptoJS[_0x30a1ac](_0x55c0fa).toString(); }
|
||||
HmacSHA_Encrypt(_0x33aa00, _0x4398d3, _0x9b83e5, _0x4f724e) { if (_0x33aa00 == 0) { return this.CryptoJS[_0x4398d3](_0x9b83e5, _0x4f724e).toString(this.CryptoJS.enc.Base64); } else { return this.CryptoJS[_0x4398d3](_0x9b83e5, _0x4f724e).toString(); } }
|
||||
Base64(_0x63a29, _0x3834c4) { return _0x63a29 == 0 ? this.CryptoJS.enc.Base64.stringify(this.CryptoJS.enc.Utf8.parse(_0x3834c4)) : this.CryptoJS.enc.Utf8.stringify(this.CryptoJS.enc.Base64.parse(_0x3834c4)); }
|
||||
DecryptCrypto(_0x5a1eca, _0x21ae3a, _0x2a5f40, _0x50d64d, _0x4ece84, _0x56b84f, _0x107ba7) {
|
||||
if (_0x5a1eca == 0) {
|
||||
const _0x14060c = this.CryptoJS[_0x21ae3a].encrypt(this.CryptoJS.enc.Utf8.parse(_0x4ece84), this.CryptoJS.enc.Utf8.parse(_0x56b84f), { iv: this.CryptoJS.enc.Utf8.parse(_0x107ba7), mode: this.CryptoJS.mode[_0x2a5f40], padding: this.CryptoJS.pad[_0x50d64d] });
|
||||
return _0x14060c.toString();
|
||||
} else {
|
||||
const _0x52b220 = this.CryptoJS[_0x21ae3a].decrypt(_0x4ece84, this.CryptoJS.enc.Utf8.parse(_0x56b84f), { iv: this.CryptoJS.enc.Utf8.parse(_0x107ba7), mode: this.CryptoJS.mode[_0x2a5f40], padding: this.CryptoJS.pad[_0x50d64d] });
|
||||
return _0x52b220.toString(this.CryptoJS.enc.Utf8);
|
||||
}
|
||||
}
|
||||
RSA(_0x4cf2fb, _0x481bb1) {
|
||||
const _0x449dd7 = require("node-rsa");
|
||||
let _0x5b2f3c = new _0x449dd7("-----BEGIN PUBLIC KEY-----\n" + _0x481bb1 + "\n-----END PUBLIC KEY-----");
|
||||
_0x5b2f3c.setOptions({ encryptionScheme: "pkcs1" });
|
||||
return _0x5b2f3c.encrypt(_0x4cf2fb, "base64", "utf8");
|
||||
}
|
||||
SHA_RSA(_0x46d850, _0xb07503) {
|
||||
let _0x839841 = this.Sha_Rsa.KEYUTIL.getKey("-----BEGIN PRIVATE KEY-----\n" + $.getNewline(_0xb07503, 76) + "\n-----END PRIVATE KEY-----"), _0x3b547b = new this.Sha_Rsa.KJUR.crypto.Signature({ alg: "SHA256withRSA" });
|
||||
_0x3b547b.init(_0x839841);
|
||||
_0x3b547b.updateString(_0x46d850);
|
||||
let _0x259a48 = _0x3b547b.sign(), _0x34eae3 = this.Sha_Rsa.hextob64u(_0x259a48);
|
||||
return _0x34eae3;
|
||||
}
|
||||
}();
|
||||
}
|
||||
357
imaotai.py
357
imaotai.py
@ -1,357 +0,0 @@
|
||||
#!/usr/bin/python3
|
||||
# -- coding: utf-8 --
|
||||
# -------------------------------
|
||||
# cron "15 0,30 9 * * *" script-path=xxx.py,tag=匹配cron用
|
||||
# const $ = new Env('imaotai')
|
||||
|
||||
import datetime
|
||||
import os
|
||||
import r和om
|
||||
import time,re
|
||||
|
||||
import requests
|
||||
import base64
|
||||
import json
|
||||
from Crypto.Cipher import AES
|
||||
from Crypto.Util.Padding import pad
|
||||
|
||||
from notify import send
|
||||
|
||||
# 青龙面板加入环境变量 export MTTokenD
|
||||
# MTTokenD是茅台预约参数,多个请换行,格式'省份,城市,经度,维度,设备id,token,MT-Token-Wap(抓包小茅运)'
|
||||
# MT-Token-Wap参数是小茅运的领奖励,不需要的话MTTokenD格式改成 省份,城市,经度,维度,设备id,token,''
|
||||
# 依赖pycryptodome
|
||||
p_c_map = {}
|
||||
mt_r = 'clips_OlU6TmFRag5rCXwbNAQ/Tz1SKlN8THcecBp/'
|
||||
# 下面定义的是申请哪几个,可通过iMT_Products环境变量来设置,比如{"10941": "贵州茅台酒(甲辰龙年)", "2478": "贵州茅台酒(珍品)", "10942": "贵州茅台酒(甲辰龙年)x2"}
|
||||
#res_map = json.loads(os.getenv('iMT_Products', ''))
|
||||
#if not res_map:
|
||||
# res_map = {"10941": "贵州茅台酒(甲辰龙年)", "10942": "贵州茅台酒(甲辰龙年)x2"}
|
||||
res_map = {"10941": "贵州茅台酒(甲辰龙年)", "10942": "贵州茅台酒(甲辰龙年)x2"}
|
||||
print('拟预约商品:')
|
||||
print(res_map)
|
||||
#加密
|
||||
def aes_cbc_encrypt(data, key, iv):
|
||||
cipher = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv.encode('utf-8'))
|
||||
padded_data = pad(data.encode('utf-8'), AES.block_size)
|
||||
encrypted_data = cipher.encrypt(padded_data)
|
||||
return base64.b64encode(encrypted_data).decode('utf-8')
|
||||
|
||||
def mt_add(itemId, shopId, sessionId, userId, token, Device_ID):
|
||||
MT_K = f'{int(time.time() * 1000)}'
|
||||
headers = {'User-Agent': 'iPhone 14',
|
||||
'MT-Token': token,
|
||||
'MT-Network-Type': 'WIFI', 'MT-User-Tag': '0',
|
||||
'MT-R': mt_r, 'MT-K': MT_K,
|
||||
'MT-Info': '028e7f96f6369cafe1d105579c5b9377', 'MT-APP-Version': mt_version,
|
||||
'MT-Request-ID': f'{int(time.time() * 1000)}', 'Accept-Language': 'zh-Hans-CN;q=1',
|
||||
'MT-Device-ID': Device_ID,
|
||||
'MT-Bundle-ID': 'com.moutai.mall',
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat}
|
||||
d = {"itemInfoList": [{"count": 1, "itemId": str(itemId)}], "sessionId": sessionId, "userId": str(userId),
|
||||
"shopId": str(shopId)}
|
||||
r = aes_cbc_encrypt(json.dumps(d),'qbhajinldepmucsonaaaccgypwuvcjaa','2018534749963515')
|
||||
d['actParam'] = r
|
||||
json_data = d
|
||||
response = requests.post('https://app.moutai519.com.cn/xhr/front/mall/reservation/add', headers=headers,
|
||||
json=json_data)
|
||||
code = response.json().get('code', 0)
|
||||
if code == 2000:
|
||||
return response.json().get('data', {}).get('successDesc', "未知")
|
||||
return '申购失败:' + response.json().get('message', "未知原因")
|
||||
|
||||
|
||||
def tongzhi(ss):
|
||||
user_list = os.getenv('mtec_user', '').split(',')
|
||||
for user in user_list:
|
||||
url = 'http://wxpusher.zjiecode.com/api/send/message/?appToken=&content={}&uid={}'.format(
|
||||
ss, user)
|
||||
r = requests.get(url)
|
||||
print(r.text)
|
||||
|
||||
|
||||
def get_session_id(device_id, token):
|
||||
headers = {
|
||||
'mt-device-id': device_id,
|
||||
'mt-user-tag': '0',
|
||||
'accept': '*/*',
|
||||
'mt-network-type': 'WIFI',
|
||||
'mt-token': token,
|
||||
'mt-bundle-id': 'com.moutai.mall',
|
||||
'accept-language': 'zh-Hans-CN;q=1',
|
||||
'mt-request-id': f'{int(time.time() * 1000)}',
|
||||
'mt-app-version': mt_version,
|
||||
'user-agent': 'iPhone 14',
|
||||
'mt-r': mt_r,
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat
|
||||
}
|
||||
|
||||
response = requests.get('https://static.moutai519.com.cn/mt-backend/xhr/front/mall/index/session/get/' + time_keys,
|
||||
headers=headers)
|
||||
sessionId = response.json().get('data', {}).get('sessionId')
|
||||
itemList = response.json().get('data', {}).get('itemList', [])
|
||||
itemCodes = [item.get('itemCode') for item in itemList]
|
||||
return sessionId, itemCodes
|
||||
|
||||
# 打印所有商品列表
|
||||
def get_shop_items(sessionId, device_id, token, province, city):
|
||||
headers = {
|
||||
'mt-device-id': device_id,
|
||||
'mt-user-tag': '0',
|
||||
'mt-lat': '',
|
||||
'accept': '*/*',
|
||||
'mt-network-type': 'WIFI',
|
||||
'mt-token': token,
|
||||
'mt-bundle-id': 'com.moutai.mall',
|
||||
'accept-language': 'zh-Hans-CN;q=1',
|
||||
'mt-request-id': f'{int(time.time() * 1000)}',
|
||||
'mt-r': mt_r,
|
||||
'mt-app-version': mt_version,
|
||||
'user-agent': 'iPhone 14',
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat
|
||||
}
|
||||
|
||||
response = requests.get(
|
||||
'https://static.moutai519.com.cn/mt-backend/xhr/front/mall/index/session/get/' + time_keys, headers=headers)
|
||||
item_list = response.json().get('data', {}).get("itemList", [])
|
||||
# 创建一个空字典,用于存储 itemCode 和 title 的映射关系
|
||||
item_code_title_map = {}
|
||||
# 遍历 itemList,提取 itemCode 和 title,并将它们添加到字典中
|
||||
for item in item_list:
|
||||
item_code_title_map[item.get("itemCode")] = item.get("title")
|
||||
print('可预约商品列表:')
|
||||
print(item_code_title_map)
|
||||
return item_code_title_map
|
||||
|
||||
def get_shop_item(sessionId, itemId, device_id, token, province, city):
|
||||
headers = {
|
||||
'mt-device-id': device_id,
|
||||
'mt-user-tag': '0',
|
||||
'mt-lat': '',
|
||||
'accept': '*/*',
|
||||
'mt-network-type': 'WIFI',
|
||||
'mt-token': token,
|
||||
'mt-bundle-id': 'com.moutai.mall',
|
||||
'accept-language': 'zh-Hans-CN;q=1',
|
||||
'mt-request-id': f'{int(time.time() * 1000)}',
|
||||
'mt-r': mt_r,
|
||||
'mt-app-version': mt_version,
|
||||
'user-agent': 'iPhone 14',
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat
|
||||
}
|
||||
|
||||
response = requests.get(
|
||||
'https://static.moutai519.com.cn/mt-backend/xhr/front/mall/shop/list/slim/v3/' + str(
|
||||
sessionId) + '/' + province + '/' + str(itemId) + '/' + time_keys,
|
||||
headers=headers)
|
||||
data = response.json().get('data', {})
|
||||
shops = data.get('shops', [])
|
||||
shop_id_ = p_c_map[province][city]
|
||||
for shop in shops:
|
||||
if not shop.get('shopId') in shop_id_:
|
||||
continue
|
||||
if itemId in str(shop):
|
||||
return shop.get('shopId')
|
||||
|
||||
|
||||
def get_user_id(token, Device_ID):
|
||||
headers = {
|
||||
'MT-User-Tag': '0',
|
||||
'Accept': '*/*',
|
||||
'MT-Network-Type': 'WIFI',
|
||||
'MT-Token': token,
|
||||
'MT-Bundle-ID': 'com.moutai.mall',
|
||||
'Accept-Language': 'zh-Hans-CN;q=1, en-CN;q=0.9',
|
||||
'MT-Request-ID': f'{int(time.time() * 1000)}',
|
||||
'MT-APP-Version': mt_version,
|
||||
'User-Agent': 'iOS;16.0.1;Apple;iPhone 14 ProMax',
|
||||
'MT-R': mt_r,
|
||||
'MT-Device-ID': Device_ID,
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat
|
||||
}
|
||||
|
||||
response = requests.get(
|
||||
'https://app.moutai519.com.cn/xhr/front/user/info', headers=headers)
|
||||
userName = response.json().get('data', {}).get('userName')
|
||||
userId = response.json().get('data', {}).get('userId')
|
||||
mobile = response.json().get('data', {}).get('mobile')
|
||||
return userName, userId, mobile
|
||||
|
||||
|
||||
def getUserEnergyAward(device_id, ck):
|
||||
"""
|
||||
领取耐力
|
||||
:return:
|
||||
"""
|
||||
|
||||
cookies = {
|
||||
'MT-Device-ID-Wap': device_id,
|
||||
'MT-Token-Wap': ck,
|
||||
'YX_SUPPORT_WEBP': '1',
|
||||
}
|
||||
|
||||
headers = {
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_2_1 like Mac OS X)',
|
||||
'Referer': 'https://h5.moutai519.com.cn/gux/game/main?appConfig=2_1_2',
|
||||
'Client-User-Agent': 'iOS;15.0.1;Apple;iPhone 12 ProMax',
|
||||
'MT-R': mt_r,
|
||||
'Origin': 'https://h5.moutai519.com.cn',
|
||||
'MT-APP-Version': mt_version,
|
||||
'MT-Request-ID': f'{int(time.time() * 1000)}',
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=0.9',
|
||||
'MT-Device-ID': device_id,
|
||||
'Accept': 'application/json, text/javascript, */*; q=0.01',
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat
|
||||
}
|
||||
response = requests.post('https://h5.moutai519.com.cn/game/isolationPage/getUserEnergyAward', cookies=cookies,
|
||||
headers=headers, json={})
|
||||
return response.json().get('message') if '无法领取奖励' in response.text else "领取奖励成功"
|
||||
|
||||
|
||||
def get_map():
|
||||
global p_c_map
|
||||
url = 'https://static.moutai519.com.cn/mt-backend/xhr/front/mall/resource/get'
|
||||
headers = {
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_1 like Mac OS X)',
|
||||
'Referer': 'https://h5.moutai519.com.cn/gux/game/main?appConfig=2_1_2',
|
||||
'Client-User-Agent': 'iOS;16.0.1;Apple;iPhone 14 ProMax',
|
||||
'MT-R': mt_r,
|
||||
'Origin': 'https://h5.moutai519.com.cn',
|
||||
'MT-APP-Version': mt_version,
|
||||
'MT-Request-ID': f'{int(time.time() * 1000)}{random.randint(1111111, 999999999)}{int(time.time() * 1000)}',
|
||||
'Accept-Language': 'zh-CN,zh-Hans;q=1',
|
||||
'MT-Device-ID': f'{int(time.time() * 1000)}{random.randint(1111111, 999999999)}{int(time.time() * 1000)}',
|
||||
'Accept': 'application/json, text/javascript, */*; q=0.01',
|
||||
'mt-lng': lng,
|
||||
'mt-lat': lat
|
||||
}
|
||||
res = requests.get(url, headers=headers, )
|
||||
mtshops = res.json().get('data', {}).get('mtshops_pc', {})
|
||||
urls = mtshops.get('url')
|
||||
r = requests.get(urls)
|
||||
for k, v in dict(r.json()).items():
|
||||
provinceName = v.get('provinceName')
|
||||
cityName = v.get('cityName')
|
||||
if not p_c_map.get(provinceName):
|
||||
p_c_map[provinceName] = {}
|
||||
if not p_c_map[provinceName].get(cityName, None):
|
||||
p_c_map[provinceName][cityName] = [k]
|
||||
else:
|
||||
p_c_map[provinceName][cityName].append(k)
|
||||
return p_c_map
|
||||
|
||||
|
||||
def login(phone, vCode, Device_ID):
|
||||
"""
|
||||
|
||||
:param phone: 手机号
|
||||
:param vCode: 验证码
|
||||
:param Device_ID: 设备id
|
||||
:return:
|
||||
"""
|
||||
MT_K = f'{int(time.time() * 1000)}'
|
||||
r = requests.get(
|
||||
f'http://82.157.10.108:8086/get_mtv?DeviceID={Device_ID}&MTk={MT_K}&version={mt_version}&key=yaohuo')
|
||||
headers = {
|
||||
'MT-Device-ID': Device_ID,
|
||||
'MT-User-Tag': '0',
|
||||
'Accept': '*/*',
|
||||
'MT-Network-Type': 'WIFI',
|
||||
'MT-Token': '',
|
||||
'MT-K': MT_K,
|
||||
'MT-Bundle-ID': 'com.moutai.mall',
|
||||
'MT-V': r.text,
|
||||
'User-Agent': 'iOS;16.0.1;Apple;iPhone 14 ProMax',
|
||||
'Accept-Language': 'zh-Hans-CN;q=1',
|
||||
'MT-Request-ID': f'{int(time.time() * 1000)}18342',
|
||||
'MT-R': mt_r,
|
||||
'MT-APP-Version': mt_version,
|
||||
}
|
||||
|
||||
json_data = {
|
||||
'ydToken': '',
|
||||
'mobile': f'{phone}',
|
||||
'vCode': f'{vCode}',
|
||||
'ydLogId': '',
|
||||
}
|
||||
|
||||
response = requests.post('https://app.moutai519.com.cn/xhr/front/user/register/login', headers=headers,
|
||||
json=json_data)
|
||||
data = response.json().get('data', {})
|
||||
token = data.get('token')
|
||||
cookie = data.get('cookie') # MT-Token-Wap
|
||||
print(Device_ID, token, cookie)
|
||||
return Device_ID, token, cookie
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
plustoken = os.getenv("plustoken")
|
||||
# mt_tokens = os.getenv("MTTokenD")
|
||||
mt_tokens = '浙江省,温州市,120.123456,27.123456,123456-B851-4574-913D-5C38E19CF14C,eyJ0eXAiO123456CJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJtd123456ImV4cCI6MTcyNDE2OTk3OCwidXNlcklkIjoxMTI3NTA3ODg3LCJkZXZpY2VJZCI6IjAxNEU2REU3LUI4NTEtNDU3NC05MTNELTVDMzhFMTlDRjE0QyIsImlhdCI6MTcyMTU3Nzk3OH0.UH2r-aIv5pw9u4D7e2SxEcmdex5IRyvkoe2-FTkR5bc,eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M123456IsImV4cCI6MTcyNDE2OTk3OCwidXNlcklkIjoxMTI3NTA3ODg3LCJkZXZ123456I6IjAxNEU2REU3LUI4NTEtNDU3NC05MTNELTVDMzhFMTlDRjE0QyIsImlhdCI6MTcy123456zk3OH0.piTWOifeQx8oNdEeLzHyd2RML4xT1t-F6PYqDawd_hU'
|
||||
mt_version = "".join(re.findall('whats-new__latest__version">(.*?)</p>',
|
||||
requests.get('https://apps.apple.com/cn/app/i%E8%8C%85%E5%8F%B0/id1600482450').text,
|
||||
re.S)).replace('版本 ', '').replace('çæ¬ ', '') # line:248
|
||||
print('当前最新版本为:' + mt_version) # line:249
|
||||
if not mt_tokens:
|
||||
print('MTToken is null')
|
||||
exit()
|
||||
if not mt_version:
|
||||
print('版本号为空 is null')
|
||||
exit()
|
||||
mt_token_list = mt_tokens.split('&')
|
||||
s = "-------------------总共" + \
|
||||
str(int(len(mt_token_list))) + \
|
||||
"个用户-------------------"+'\n'
|
||||
userCount = 0
|
||||
if len(mt_token_list) > 0:
|
||||
for mt_token in mt_token_list:
|
||||
userCount += 1
|
||||
try:
|
||||
province, city, lng, lat, device_id, token, ck = mt_token.split(',')
|
||||
province, city, lng, lat, device_id, token, ck = province.strip(), city.strip(), lng.strip(), lat.strip(), device_id.strip(), token.strip(), ck.strip()
|
||||
except Exception as e:
|
||||
s = "MTTokenD未正确配置,格式'省份,城市,经度,维度,设备id,token,MT-Token-Wap(抓包小茅运)'"
|
||||
send("i茅台申购+小茅运", s)
|
||||
exit()
|
||||
time_keys = str(
|
||||
int(time.mktime(datetime.date.today().timetuple())) * 1000)
|
||||
get_map()
|
||||
|
||||
try:
|
||||
sessionId, itemCodes = get_session_id(device_id, token)
|
||||
userName, user_id, mobile = get_user_id(token, device_id)
|
||||
if not user_id:
|
||||
s += "第"+str(userCount)+"个用户token失效,请重新登录"+'\n'
|
||||
continue
|
||||
s += "第"+str(userCount)+"个用户----------------"+userName + '_' + \
|
||||
mobile + "开始任务" + "----------------"+'\n'
|
||||
items = get_shop_items(sessionId, device_id, token, province, city)
|
||||
for itemCode in itemCodes:
|
||||
name = res_map.get(str(itemCode))
|
||||
if name:
|
||||
shop_id = get_shop_item(
|
||||
sessionId, itemCode, device_id, token, province, city)
|
||||
res = mt_add(itemCode, str(shop_id), sessionId,
|
||||
user_id, token, device_id)
|
||||
s += itemCode + \
|
||||
'_' + name + '---------------' + res + '\n'
|
||||
if ck:
|
||||
if ck == "\'\'" :
|
||||
s += userName + '_' + mobile + '---------------' + \
|
||||
"未设置MT-Token-Wap,小茅运领取奖励跳过" + '\n'
|
||||
else :
|
||||
r = getUserEnergyAward(device_id, ck)
|
||||
s += userName + '_' + mobile + '---------------' + \
|
||||
"小茅运:" + r + '\n'
|
||||
s += userName + '_' + mobile + "正常结束任务"+'\n \n'
|
||||
except Exception as e:
|
||||
s += userName + '_' + mobile + "异常信息"+e
|
||||
send("i茅台申购+小茅运", s)
|
||||
4
jlyh.js
4
jlyh.js
@ -18,8 +18,8 @@ const $ = new Env("吉利银河");
|
||||
let scriptVersionNow = "0.0.1";
|
||||
let msg = "";
|
||||
async function start() {
|
||||
await getVersion("smallfawn/QLScriptPublic@main/jlyh.js");
|
||||
await getNotice();
|
||||
//await getVersion("smallfawn/QLScriptPublic@main/jlyh.js");
|
||||
//await getNotice();
|
||||
|
||||
let taskall = [];
|
||||
for (let user of $.userList) {
|
||||
|
||||
349
liyingyunjie.js
Normal file
349
liyingyunjie.js
Normal file
File diff suppressed because one or more lines are too long
@ -20,8 +20,8 @@ let scriptVersionNow = "1.0.0";//脚本版本号
|
||||
let msg = "";
|
||||
// ==================================异步顺序==============================================================================
|
||||
!(async () => {
|
||||
await getNotice(); //远程通知
|
||||
await getVersion("yang88758/ohhh154@main/mswefls.js");
|
||||
//await getNotice(); //远程通知
|
||||
//await getVersion("yang88758/ohhh154@main/mswefls.js");
|
||||
await main();//主函数
|
||||
await SendMsg(msg); //发送通知
|
||||
|
||||
|
||||
907
piaopiaochaoshi.js
Normal file
907
piaopiaochaoshi.js
Normal 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);
|
||||
}
|
||||
233
quanzhan.py
Normal file
233
quanzhan.py
Normal 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
427
quzanmi.js
Normal 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
550
shangshaban.js
Normal file
@ -0,0 +1,550 @@
|
||||
|
||||
/*
|
||||
完成每日任务,一天55积分左右,可以兑换实物或话费
|
||||
new Env('上啥班');
|
||||
cron: 18 8,18 * * *
|
||||
*/
|
||||
|
||||
|
||||
NAME = "上啥班";
|
||||
VALY = ["ssbck"];
|
||||
LOGS = 0;
|
||||
CK = "";
|
||||
var userList = [];
|
||||
class Bar {
|
||||
constructor(_0x4e1417) {
|
||||
this.phone = _0x4e1417.split("#")[0];
|
||||
this.password = _0x4e1417.split("#")[1];
|
||||
this.rsakey = "eGmAg2#@*~fgK45o";
|
||||
this.text = "1234561234567890";
|
||||
this.logs = true;
|
||||
}
|
||||
async login() {
|
||||
let _0x27e215 = "{\"phone\":\"" + this.phone + "\",\"password\":\"" + this.password + "\",\"deviceType\":\"2\",\"appVersion\":\"5.2.16\",\"phoneFirm\":\"Xiaomi\",\"phoneVersion\":\"M2011K2C\",\"phoneSystemVersion\":\"11\"}",
|
||||
_0x5379d3 = EncryptCrypto("AES", "CBC", "Pkcs7", _0x27e215, this.rsakey, this.text),
|
||||
_0xb64d20 = _0x5379d3.replace("/", "%2F").replace("/", "%2F").replace("/", "%2F").replace("/", "%2F").replace("/", "%2F").replace("/", "%2F").replace("/", "%2F").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("+", "%2B").replace("=", "%3D").replace("=", "%3D"),
|
||||
_0x2b769d = "data=" + _0xb64d20,
|
||||
_0x29764f = await task("post", "https://portals.shangshaban.com/api/user/loginV2", {}, _0x2b769d);
|
||||
_0x29764f.status == 1 ? (this.uid = _0x29764f.user.id, this.token = _0x29764f.token, this.name = _0x29764f.user.name, console.log("【" + this.name + "】 登陆成功"), this.logs = true) : this.logs = false;
|
||||
}
|
||||
async tasklist() {
|
||||
let _0x24d2eb = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x8981d7 = "uid=" + this.uid + "&type=1",
|
||||
_0x456535 = await task("post", "https://social.shangshaban.com/app/api/user/getTaskCenterV5211", _0x24d2eb, _0x8981d7);
|
||||
if (_0x456535.everydayTask) {
|
||||
for (let _0x59736e of _0x456535.everydayTask) {
|
||||
if (_0x59736e.taskName == "每日签到" && _0x59736e.isFinished == 0) {
|
||||
await this.signin();
|
||||
} else {
|
||||
if (_0x59736e.taskName == "看视频赚班币" && _0x59736e.isFinished == 0) {
|
||||
let _0xd067b3 = _0x59736e.frequency,
|
||||
_0x5e6518 = _0x59736e.count;
|
||||
for (let _0x285736 = _0x5e6518; _0x285736 < _0xd067b3; _0x285736++) {
|
||||
await this.video();
|
||||
}
|
||||
} else {
|
||||
if (_0x59736e.taskName == "点赞5个视频" && _0x59736e.isFinished == 0) {
|
||||
let _0x34f01e = _0x59736e.frequency,
|
||||
_0x16e55d = _0x59736e.count;
|
||||
for (let _0x437a60 = _0x16e55d; _0x437a60 < _0x34f01e; _0x437a60++) {
|
||||
await this.like();
|
||||
}
|
||||
} else {
|
||||
if (_0x59736e.taskName == "转发3个视频" && _0x59736e.isFinished == 0) {
|
||||
let _0x2516b4 = _0x59736e.frequency,
|
||||
_0xf78323 = _0x59736e.count;
|
||||
for (let _0x32ee8b = _0xf78323; _0x32ee8b < _0x2516b4; _0x32ee8b++) {
|
||||
await this.share();
|
||||
}
|
||||
} else {
|
||||
if (_0x59736e.taskName == "看职位" && _0x59736e.isFinished == 0) {
|
||||
await this.viewjob();
|
||||
} else {
|
||||
if (_0x59736e.taskName == "主动沟通招聘者" && _0x59736e.isFinished == 0) {
|
||||
let _0x5922e0 = _0x59736e.frequency,
|
||||
_0x28a400 = _0x59736e.count;
|
||||
for (let _0xabd1f8 = _0x28a400; _0xabd1f8 < _0x5922e0; _0xabd1f8++) {
|
||||
await this.chat();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log("【" + this.name + "】任务列表获取失败!!!");
|
||||
}
|
||||
}
|
||||
async signin() {
|
||||
let _0x4992f4 = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x363039 = "uid=" + this.uid + "&type=1",
|
||||
_0x212ec0 = await task("post", "https://portals.shangshaban.com/api/activity/insertSignInList", _0x4992f4, _0x363039);
|
||||
_0x212ec0.no == 1 ? console.log("【" + this.name + "】 签到成功") : console.log("【" + this.name + "】 " + _0x212ec0.msg);
|
||||
}
|
||||
async video() {
|
||||
let _0x196ee7 = "15" + SJS(4),
|
||||
_0x4f41d8 = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x2638d6 = "userId=" + this.uid + "&userType=1&videoId=" + _0x196ee7 + "&videoType=2",
|
||||
_0x5566b9 = await task("post", "https://portals.shangshaban.com/api/enterpriseVideo/saveSeenVideoTimeAdvertisement", _0x4f41d8, _0x2638d6);
|
||||
_0x5566b9.no == 1 ? (console.log("【" + this.name + "】 观看视频成功"), await wait(RT(15000, 20000))) : console.log("【" + this.name + "】 " + _0x5566b9.msg);
|
||||
}
|
||||
async like() {
|
||||
let _0x32d7ff = "14" + SJS(4),
|
||||
_0x284dc1 = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x4e690a = "uid=" + this.uid + "&vid=" + _0x32d7ff + "&likeType=1",
|
||||
_0x2ea1b3 = await task("post", "https://portals.shangshaban.com/api/user/praiseEnterpriseVideo.do", _0x284dc1, _0x4e690a);
|
||||
_0x2ea1b3.no == 1 ? (console.log("【" + this.name + "】 视频点赞成功"), await wait(RT(15000, 20000))) : console.log("【" + this.name + "】 " + _0x2ea1b3.msg);
|
||||
}
|
||||
async share() {
|
||||
let _0x4c90fb = "14" + SJS(4),
|
||||
_0x7042ea = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x37273c = "uid=" + this.uid + "&type=1&platform=1¶meter=4&shareId=" + _0x4c90fb,
|
||||
_0x24d1fa = await task("post", "https://portals.shangshaban.com/api/user/newShareV2", _0x7042ea, _0x37273c);
|
||||
_0x24d1fa.no == 1 ? (console.log("【" + this.name + "】 视频分享成功"), await wait(RT(15000, 20000))) : console.log("【" + this.name + "】 " + _0x24d1fa.msg);
|
||||
}
|
||||
async joblist() {
|
||||
let _0x1c481f = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x256e63 = "uid=" + this.uid + "&loadType=0&workCity=%E5%8D%97%E4%BA%AC%E5%B8%82&positionIds1%5B0%5D=5610&positionIds%5B0%5D=5600&infix=infix&refresh=uat&renovate=1&offset=0",
|
||||
_0x6ae5cb = await task("post", "https://portals.shangshaban.com/api/job/getJobRecommendList", _0x1c481f, _0x256e63);
|
||||
this.ai = _0x6ae5cb.results;
|
||||
}
|
||||
async viewjob() {
|
||||
for (let _0x4ec9d2 of this.ai) {
|
||||
let _0x1d3621 = _0x4ec9d2.enterpriseId,
|
||||
_0x1d2582 = _0x4ec9d2.id,
|
||||
_0x25cb77 = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x31d441 = "enterpriseUserId=" + _0x1d3621 + "&userId=" + this.uid + "&jobId=" + _0x1d2582 + "&type=1",
|
||||
_0x4061fd = await task("post", "https://portals.shangshaban.com/api/user/saveSeenJobTimeAdvertisement", _0x25cb77, _0x31d441);
|
||||
_0x4061fd.no == 1 ? (console.log("【" + this.name + "】 浏览职位成功"), await wait(RT(15000, 20000))) : console.log("【" + this.name + "】 " + _0x4061fd.msg);
|
||||
}
|
||||
}
|
||||
async chat() {
|
||||
let _0x4c4fdf = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x24f027 = "uid=" + this.uid + "&type=1",
|
||||
_0x31db67 = await task("post", "https://portals.shangshaban.com/api/chat/communicate", _0x4c4fdf, _0x24f027);
|
||||
_0x31db67.status == 1 ? (console.log("【" + this.name + "】 主动找HR沟通成功"), await wait(RT(15000, 20000))) : console.log("【" + this.name + "】 " + _0x31db67.msg);
|
||||
}
|
||||
async user() {
|
||||
let _0x2f55c6 = {
|
||||
authorization: "" + this.token,
|
||||
user: "" + this.uid,
|
||||
apiversion: "2"
|
||||
},
|
||||
_0x751250 = "uid=" + this.uid + "&isJudgeGrade=1&needShowMedalnotify=1",
|
||||
_0x16f11b = await task("post", "https://portals.shangshaban.com/api/user/getMeV491", _0x2f55c6, _0x751250);
|
||||
console.log("【" + this.name + "】==>现有总积分" + _0x16f11b.scoreCount);
|
||||
}
|
||||
}
|
||||
!(async () => {
|
||||
console.log("蛋炒饭美食交流频道:https://t.me/+xjTie4yvzm83OTI9");
|
||||
console.log(NAME);
|
||||
checkEnv();
|
||||
for (let _0x48086d of userList) {
|
||||
await _0x48086d.login();
|
||||
}
|
||||
let _0x56c44c = userList.filter(_0x30f9a1 => _0x30f9a1.logs == true);
|
||||
if (_0x56c44c.length == 0) {
|
||||
console.log("呆子,检查一下你的CK是否正确");
|
||||
return;
|
||||
}
|
||||
for (let _0x19cb20 of _0x56c44c) {
|
||||
await _0x19cb20.joblist();
|
||||
await _0x19cb20.tasklist();
|
||||
await _0x19cb20.user();
|
||||
}
|
||||
})().catch(_0xc58dfc => {
|
||||
console.log(_0xc58dfc);
|
||||
}).finally(() => {});
|
||||
function RT(_0x4f1438, _0xe198f4) {
|
||||
return Math.round(Math.random() * (_0xe198f4 - _0x4f1438) + _0x4f1438);
|
||||
}
|
||||
function times(_0x47241d) {
|
||||
if (_0x47241d == 10) {
|
||||
let _0x5dedd6 = Math.round(new Date().getTime() / 1000).toString();
|
||||
return _0x5dedd6;
|
||||
} else {
|
||||
let _0x23aa80 = new Date().getTime();
|
||||
return _0x23aa80;
|
||||
}
|
||||
}
|
||||
async function task(_0x963ba3, _0x34596c, _0x3bca2f, _0x486531) {
|
||||
_0x963ba3 == "delete" ? _0x963ba3 = _0x963ba3.toUpperCase() : _0x963ba3 = _0x963ba3;
|
||||
const _0x3967dc = require("request");
|
||||
_0x963ba3 == "post" && (delete _0x3bca2f["content-type"], delete _0x3bca2f["Content-type"], delete _0x3bca2f["content-Type"], safeGet(_0x486531) ? _0x3bca2f["Content-Type"] = "application/json;charset=UTF-8" : _0x3bca2f["Content-Type"] = "application/x-www-form-urlencoded", _0x486531 && (_0x3bca2f["Content-Length"] = lengthInUtf8Bytes(_0x486531)));
|
||||
_0x3bca2f.Host = _0x34596c.replace("//", "/").split("/")[1];
|
||||
if (_0x963ba3.indexOf("T") < 0) {
|
||||
var _0x20c229 = {
|
||||
url: _0x34596c,
|
||||
headers: _0x3bca2f,
|
||||
body: _0x486531
|
||||
};
|
||||
} else {
|
||||
var _0x20c229 = {
|
||||
url: _0x34596c,
|
||||
headers: _0x3bca2f,
|
||||
form: JSON.parse(_0x486531)
|
||||
};
|
||||
}
|
||||
return new Promise(async _0x323f1a => {
|
||||
_0x3967dc[_0x963ba3.toLowerCase()](_0x20c229, (_0xb351c6, _0x535c9f, _0x39cf21) => {
|
||||
try {
|
||||
LOGS == 1 && (console.log("==================请求=================="), console.log(_0x20c229), console.log("==================返回=================="), console.log(JSON.parse(_0x39cf21)));
|
||||
} catch (_0x413fd8) {} finally {
|
||||
!_0xb351c6 ? safeGet(_0x39cf21) ? _0x39cf21 = JSON.parse(_0x39cf21) : _0x39cf21 = _0x39cf21 : _0x39cf21 = _0x34596c + " API请求失败,请检查网络重试\n" + _0xb351c6;
|
||||
return _0x323f1a(_0x39cf21);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function SJS(_0x2715cb) {
|
||||
_0x2715cb = _0x2715cb || 32;
|
||||
var _0x14ffd5 = "1234567890",
|
||||
_0xdfdb2b = _0x14ffd5.length,
|
||||
_0x3cc592 = "";
|
||||
for (i = 0; i < _0x2715cb; i++) {
|
||||
_0x3cc592 += _0x14ffd5.charAt(Math.floor(Math.random() * _0xdfdb2b));
|
||||
}
|
||||
return _0x3cc592;
|
||||
}
|
||||
function SJSxx(_0x2dd571) {
|
||||
_0x2dd571 = _0x2dd571 || 32;
|
||||
var _0x4e72d5 = "abcdefghijklmnopqrstuvwxyz1234567890",
|
||||
_0x318a3c = _0x4e72d5.length,
|
||||
_0x47f3f2 = "";
|
||||
for (i = 0; i < _0x2dd571; i++) {
|
||||
_0x47f3f2 += _0x4e72d5.charAt(Math.floor(Math.random() * _0x318a3c));
|
||||
}
|
||||
return _0x47f3f2;
|
||||
}
|
||||
function safeGet(_0x479dd7) {
|
||||
try {
|
||||
if (typeof JSON.parse(_0x479dd7) == "object") {
|
||||
return true;
|
||||
}
|
||||
} catch (_0x275b93) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function lengthInUtf8Bytes(_0x57a4d8) {
|
||||
let _0x140669 = encodeURIComponent(_0x57a4d8).match(/%[89ABab]/g);
|
||||
return _0x57a4d8.length + (_0x140669 ? _0x140669.length : 0);
|
||||
}
|
||||
async function checkEnv() {
|
||||
let _0x10627f = process.env[VALY] || CK,
|
||||
_0xc3a390 = 0;
|
||||
if (_0x10627f) {
|
||||
for (let _0x4b23c3 of _0x10627f.split("@").filter(_0x2cdf28 => !!_0x2cdf28)) {
|
||||
userList.push(new Bar(_0x4b23c3));
|
||||
}
|
||||
_0xc3a390 = userList.length;
|
||||
} else {
|
||||
console.log("\n【" + NAME + "】:未填写变量: " + VALY);
|
||||
}
|
||||
console.log("共找到" + _0xc3a390 + "个账号");
|
||||
return userList;
|
||||
}
|
||||
function wait(_0x5ae65d) {
|
||||
return new Promise(_0x752bfc => setTimeout(_0x752bfc, _0x5ae65d));
|
||||
}
|
||||
function stringToBase64(_0x444cb6) {
|
||||
var _0x478b5d = Buffer.from(_0x444cb6).toString("base64");
|
||||
return _0x478b5d;
|
||||
}
|
||||
function EncryptCrypto(_0x540815, _0x64db3d, _0x29291a, _0x117d7a, _0x1e75e5, _0x338ab5) {
|
||||
const _0x2deb2a = require("crypto-js"),
|
||||
_0x5cb102 = _0x2deb2a.enc.Utf8.parse(_0x117d7a),
|
||||
_0x4c5272 = _0x2deb2a.enc.Utf8.parse(_0x338ab5),
|
||||
_0x5b05d8 = _0x2deb2a.enc.Utf8.parse(_0x1e75e5),
|
||||
_0x58b69d = _0x2deb2a[_0x540815].encrypt(_0x5cb102, _0x5b05d8, {
|
||||
iv: _0x4c5272,
|
||||
mode: _0x2deb2a.mode[_0x64db3d],
|
||||
padding: _0x2deb2a.pad[_0x29291a]
|
||||
});
|
||||
return _0x58b69d.toString();
|
||||
}
|
||||
function DecryptCrypto(_0x383e36, _0x26ef0e, _0x16381d, _0x3c2e82, _0x22e7ee, _0x3d0e8a) {
|
||||
const _0x17d5a8 = require("crypto-js"),
|
||||
_0x335f67 = _0x17d5a8.enc.Utf8.parse(_0x3d0e8a),
|
||||
_0x1a91aa = _0x17d5a8.enc.Utf8.parse(_0x22e7ee),
|
||||
_0x5cd73c = _0x17d5a8[_0x383e36].decrypt(_0x3c2e82, _0x1a91aa, {
|
||||
iv: _0x335f67,
|
||||
mode: _0x17d5a8.mode[_0x26ef0e],
|
||||
padding: _0x17d5a8.pad[_0x16381d]
|
||||
});
|
||||
return _0x5cd73c.toString(_0x17d5a8.enc.Utf8);
|
||||
}
|
||||
function RSA(_0x1bbb01, _0x418efa) {
|
||||
const _0x35cd7e = require("node-rsa");
|
||||
let _0x2324df = new _0x35cd7e("-----BEGIN PUBLIC KEY-----\n" + _0x418efa + "\n-----END PUBLIC KEY-----");
|
||||
_0x2324df.setOptions({
|
||||
encryptionScheme: "pkcs1"
|
||||
});
|
||||
return _0x2324df.encrypt(_0x1bbb01, "base64", "utf8");
|
||||
}
|
||||
function SHA1_Encrypt(_0x242c09) {
|
||||
return CryptoJS.SHA1(_0x242c09).toString();
|
||||
}
|
||||
function SHA256(_0x3a969c) {
|
||||
const _0x1de236 = 8,
|
||||
_0x18407f = 0;
|
||||
function _0x6d213f(_0x204f32, _0x3a4ef5) {
|
||||
const _0x4c713c = (65535 & _0x204f32) + (65535 & _0x3a4ef5);
|
||||
return (_0x204f32 >> 16) + (_0x3a4ef5 >> 16) + (_0x4c713c >> 16) << 16 | 65535 & _0x4c713c;
|
||||
}
|
||||
function _0x2caa67(_0x22a2dc, _0x153d81) {
|
||||
return _0x22a2dc >>> _0x153d81 | _0x22a2dc << 32 - _0x153d81;
|
||||
}
|
||||
function _0x2cec48(_0x4c219d, _0x497432) {
|
||||
return _0x4c219d >>> _0x497432;
|
||||
}
|
||||
function _0x576d94(_0x3b5e5a, _0x4ca105, _0x2f5b08) {
|
||||
return _0x3b5e5a & _0x4ca105 ^ ~_0x3b5e5a & _0x2f5b08;
|
||||
}
|
||||
function _0xf840ae(_0xab6a0a, _0x400ecc, _0x1fefba) {
|
||||
return _0xab6a0a & _0x400ecc ^ _0xab6a0a & _0x1fefba ^ _0x400ecc & _0x1fefba;
|
||||
}
|
||||
function _0x2f0aee(_0x3b2313) {
|
||||
return _0x2caa67(_0x3b2313, 2) ^ _0x2caa67(_0x3b2313, 13) ^ _0x2caa67(_0x3b2313, 22);
|
||||
}
|
||||
function _0x38f321(_0x15b752) {
|
||||
return _0x2caa67(_0x15b752, 6) ^ _0x2caa67(_0x15b752, 11) ^ _0x2caa67(_0x15b752, 25);
|
||||
}
|
||||
function _0x120b08(_0x394f75) {
|
||||
return _0x2caa67(_0x394f75, 7) ^ _0x2caa67(_0x394f75, 18) ^ _0x2cec48(_0x394f75, 3);
|
||||
}
|
||||
return function (_0x3fcd30) {
|
||||
const _0x520fa1 = _0x18407f ? "0123456789ABCDEF" : "0123456789abcdef";
|
||||
let _0x3cb7f2 = "";
|
||||
for (let _0x4cde47 = 0; _0x4cde47 < 4 * _0x3fcd30.length; _0x4cde47++) {
|
||||
_0x3cb7f2 += _0x520fa1.charAt(_0x3fcd30[_0x4cde47 >> 2] >> 8 * (3 - _0x4cde47 % 4) + 4 & 15) + _0x520fa1.charAt(_0x3fcd30[_0x4cde47 >> 2] >> 8 * (3 - _0x4cde47 % 4) & 15);
|
||||
}
|
||||
return _0x3cb7f2;
|
||||
}(function (_0x37bf21, _0x36ba9a) {
|
||||
const _0x313374 = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2025104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298],
|
||||
_0x24161b = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225],
|
||||
_0x32329b = new Array(64);
|
||||
let _0x39b38b, _0x4c2227, _0xb67cd0, _0x2a3ae6, _0x3479dd, _0x399e56, _0x4403ff, _0x56140a, _0x5818ba, _0x1d1539, _0x4685e6, _0x3aae96;
|
||||
for (_0x37bf21[_0x36ba9a >> 5] |= 128 << 24 - _0x36ba9a % 32, _0x37bf21[15 + (_0x36ba9a + 64 >> 9 << 4)] = _0x36ba9a, _0x5818ba = 0; _0x5818ba < _0x37bf21.length; _0x5818ba += 16) {
|
||||
for (_0x39b38b = _0x24161b[0], _0x4c2227 = _0x24161b[1], _0xb67cd0 = _0x24161b[2], _0x2a3ae6 = _0x24161b[3], _0x3479dd = _0x24161b[4], _0x399e56 = _0x24161b[5], _0x4403ff = _0x24161b[6], _0x56140a = _0x24161b[7], _0x1d1539 = 0; _0x1d1539 < 64; _0x1d1539++) {
|
||||
_0x32329b[_0x1d1539] = _0x1d1539 < 16 ? _0x37bf21[_0x1d1539 + _0x5818ba] : _0x6d213f(_0x6d213f(_0x6d213f(_0x2caa67(_0x4c12d3 = _0x32329b[_0x1d1539 - 2], 17) ^ _0x2caa67(_0x4c12d3, 19) ^ _0x2cec48(_0x4c12d3, 10), _0x32329b[_0x1d1539 - 7]), _0x120b08(_0x32329b[_0x1d1539 - 15])), _0x32329b[_0x1d1539 - 16]);
|
||||
_0x4685e6 = _0x6d213f(_0x6d213f(_0x6d213f(_0x6d213f(_0x56140a, _0x38f321(_0x3479dd)), _0x576d94(_0x3479dd, _0x399e56, _0x4403ff)), _0x313374[_0x1d1539]), _0x32329b[_0x1d1539]);
|
||||
_0x3aae96 = _0x6d213f(_0x2f0aee(_0x39b38b), _0xf840ae(_0x39b38b, _0x4c2227, _0xb67cd0));
|
||||
_0x56140a = _0x4403ff;
|
||||
_0x4403ff = _0x399e56;
|
||||
_0x399e56 = _0x3479dd;
|
||||
_0x3479dd = _0x6d213f(_0x2a3ae6, _0x4685e6);
|
||||
_0x2a3ae6 = _0xb67cd0;
|
||||
_0xb67cd0 = _0x4c2227;
|
||||
_0x4c2227 = _0x39b38b;
|
||||
_0x39b38b = _0x6d213f(_0x4685e6, _0x3aae96);
|
||||
}
|
||||
_0x24161b[0] = _0x6d213f(_0x39b38b, _0x24161b[0]);
|
||||
_0x24161b[1] = _0x6d213f(_0x4c2227, _0x24161b[1]);
|
||||
_0x24161b[2] = _0x6d213f(_0xb67cd0, _0x24161b[2]);
|
||||
_0x24161b[3] = _0x6d213f(_0x2a3ae6, _0x24161b[3]);
|
||||
_0x24161b[4] = _0x6d213f(_0x3479dd, _0x24161b[4]);
|
||||
_0x24161b[5] = _0x6d213f(_0x399e56, _0x24161b[5]);
|
||||
_0x24161b[6] = _0x6d213f(_0x4403ff, _0x24161b[6]);
|
||||
_0x24161b[7] = _0x6d213f(_0x56140a, _0x24161b[7]);
|
||||
}
|
||||
var _0x4c12d3;
|
||||
return _0x24161b;
|
||||
}(function (_0x5f2e40) {
|
||||
const _0x555318 = [],
|
||||
_0x93290e = (1 << _0x1de236) - 1;
|
||||
for (let _0x25d45c = 0; _0x25d45c < _0x5f2e40.length * _0x1de236; _0x25d45c += _0x1de236) {
|
||||
_0x555318[_0x25d45c >> 5] |= (_0x5f2e40.charCodeAt(_0x25d45c / _0x1de236) & _0x93290e) << 24 - _0x25d45c % 32;
|
||||
}
|
||||
return _0x555318;
|
||||
}(_0x3a969c = function (_0x22eba3) {
|
||||
_0x22eba3 = _0x22eba3.replace(/\r\n/g, "\n");
|
||||
let _0x17914c = "";
|
||||
for (let _0x3a0d98 = 0; _0x3a0d98 < _0x22eba3.length; _0x3a0d98++) {
|
||||
const _0x5062ea = _0x22eba3.charCodeAt(_0x3a0d98);
|
||||
_0x5062ea < 128 ? _0x17914c += String.fromCharCode(_0x5062ea) : _0x5062ea > 127 && _0x5062ea < 2048 ? (_0x17914c += String.fromCharCode(_0x5062ea >> 6 | 192), _0x17914c += String.fromCharCode(63 & _0x5062ea | 128)) : (_0x17914c += String.fromCharCode(_0x5062ea >> 12 | 224), _0x17914c += String.fromCharCode(_0x5062ea >> 6 & 63 | 128), _0x17914c += String.fromCharCode(63 & _0x5062ea | 128));
|
||||
}
|
||||
return _0x17914c;
|
||||
}(_0x3a969c)), _0x3a969c.length * _0x1de236));
|
||||
}
|
||||
function MD5Encrypt(_0xdf8201) {
|
||||
function _0x39978f(_0x4b66de, _0x401151) {
|
||||
return _0x4b66de << _0x401151 | _0x4b66de >>> 32 - _0x401151;
|
||||
}
|
||||
function _0x1a5d98(_0xbd0743, _0x3fa1c6) {
|
||||
var _0x344155, _0x42e13f, _0x4ec882, _0x359f03, _0x202f8c;
|
||||
_0x4ec882 = 2147483648 & _0xbd0743;
|
||||
_0x359f03 = 2147483648 & _0x3fa1c6;
|
||||
_0x344155 = 1073741824 & _0xbd0743;
|
||||
_0x42e13f = 1073741824 & _0x3fa1c6;
|
||||
_0x202f8c = (1073741823 & _0xbd0743) + (1073741823 & _0x3fa1c6);
|
||||
return _0x344155 & _0x42e13f ? 2147483648 ^ _0x202f8c ^ _0x4ec882 ^ _0x359f03 : _0x344155 | _0x42e13f ? 1073741824 & _0x202f8c ? 3221225472 ^ _0x202f8c ^ _0x4ec882 ^ _0x359f03 : 1073741824 ^ _0x202f8c ^ _0x4ec882 ^ _0x359f03 : _0x202f8c ^ _0x4ec882 ^ _0x359f03;
|
||||
}
|
||||
function _0x979311(_0x2bbfa5, _0xb1c634, _0x302998, _0x36996a, _0x5e2807, _0x49cd3a, _0x30ee83) {
|
||||
var _0x39d1bf, _0x4fbeec;
|
||||
_0x2bbfa5 = _0x1a5d98(_0x2bbfa5, _0x1a5d98(_0x1a5d98((_0x39d1bf = _0xb1c634) & (_0x4fbeec = _0x302998) | ~_0x39d1bf & _0x36996a, _0x5e2807), _0x30ee83));
|
||||
return _0x1a5d98(_0x39978f(_0x2bbfa5, _0x49cd3a), _0xb1c634);
|
||||
}
|
||||
function _0x26550e(_0x53011f, _0x74922d, _0x4559b2, _0x1b0f0e, _0x4601d4, _0x273a90, _0x2bb2a5) {
|
||||
var _0x3ede1a, _0x45b6e6, _0x2db808;
|
||||
_0x53011f = _0x1a5d98(_0x53011f, _0x1a5d98(_0x1a5d98((_0x3ede1a = _0x74922d, _0x45b6e6 = _0x4559b2, _0x3ede1a & (_0x2db808 = _0x1b0f0e) | _0x45b6e6 & ~_0x2db808), _0x4601d4), _0x2bb2a5));
|
||||
return _0x1a5d98(_0x39978f(_0x53011f, _0x273a90), _0x74922d);
|
||||
}
|
||||
function _0x2655fb(_0x502b84, _0x35ab42, _0x2cebb1, _0x348d6e, _0x55e1ec, _0x1eacc2, _0x472677) {
|
||||
var _0x42f998, _0x38a089;
|
||||
_0x502b84 = _0x1a5d98(_0x502b84, _0x1a5d98(_0x1a5d98((_0x42f998 = _0x35ab42) ^ (_0x38a089 = _0x2cebb1) ^ _0x348d6e, _0x55e1ec), _0x472677));
|
||||
return _0x1a5d98(_0x39978f(_0x502b84, _0x1eacc2), _0x35ab42);
|
||||
}
|
||||
function _0x2788bd(_0xbbd85b, _0x30b9fd, _0x2090fe, _0x94a655, _0x184229, _0x202622, _0x3f9e0a) {
|
||||
var _0x401615, _0x490a82;
|
||||
_0xbbd85b = _0x1a5d98(_0xbbd85b, _0x1a5d98(_0x1a5d98((_0x401615 = _0x30b9fd, (_0x490a82 = _0x2090fe) ^ (_0x401615 | ~_0x94a655)), _0x184229), _0x3f9e0a));
|
||||
return _0x1a5d98(_0x39978f(_0xbbd85b, _0x202622), _0x30b9fd);
|
||||
}
|
||||
function _0x25b2b3(_0x2ffc3d) {
|
||||
var _0x56e769,
|
||||
_0x43f0b7 = "",
|
||||
_0x2f1cbb = "";
|
||||
for (_0x56e769 = 0; 3 >= _0x56e769; _0x56e769++) {
|
||||
_0x43f0b7 += (_0x2f1cbb = "0" + (_0x2ffc3d >>> 8 * _0x56e769 & 255).toString(16)).substr(_0x2f1cbb.length - 2, 2);
|
||||
}
|
||||
return _0x43f0b7;
|
||||
}
|
||||
var _0x39ad4c,
|
||||
_0x445457,
|
||||
_0x4a6b2c,
|
||||
_0x831a1f,
|
||||
_0x3773db,
|
||||
_0x20a458,
|
||||
_0x3a685f,
|
||||
_0x4855c2,
|
||||
_0x49c500,
|
||||
_0x55840c = [];
|
||||
for (_0x55840c = function (_0x2d21b9) {
|
||||
for (var _0x54a3cf, _0x30b6c8 = _0x2d21b9.length, _0x460006 = _0x30b6c8 + 8, _0x3cfbbc = 16 * ((_0x460006 - _0x460006 % 64) / 64 + 1), _0x22e997 = Array(_0x3cfbbc - 1), _0x1ddfea = 0, _0x52017e = 0; _0x30b6c8 > _0x52017e;) {
|
||||
_0x54a3cf = (_0x52017e - _0x52017e % 4) / 4;
|
||||
_0x1ddfea = _0x52017e % 4 * 8;
|
||||
_0x22e997[_0x54a3cf] = _0x22e997[_0x54a3cf] | _0x2d21b9.charCodeAt(_0x52017e) << _0x1ddfea;
|
||||
_0x52017e++;
|
||||
}
|
||||
_0x54a3cf = (_0x52017e - _0x52017e % 4) / 4;
|
||||
_0x1ddfea = _0x52017e % 4 * 8;
|
||||
_0x22e997[_0x54a3cf] = _0x22e997[_0x54a3cf] | 128 << _0x1ddfea;
|
||||
_0x22e997[_0x3cfbbc - 2] = _0x30b6c8 << 3;
|
||||
_0x22e997[_0x3cfbbc - 1] = _0x30b6c8 >>> 29;
|
||||
return _0x22e997;
|
||||
}(_0xdf8201 = function (_0x1069b3) {
|
||||
_0x1069b3 = _0x1069b3.replace(/\r\n/g, "\n");
|
||||
for (var _0x388587 = "", _0x227de9 = 0; _0x227de9 < _0x1069b3.length; _0x227de9++) {
|
||||
var _0xebb9f9 = _0x1069b3.charCodeAt(_0x227de9);
|
||||
128 > _0xebb9f9 ? _0x388587 += String.fromCharCode(_0xebb9f9) : _0xebb9f9 > 127 && 2048 > _0xebb9f9 ? (_0x388587 += String.fromCharCode(_0xebb9f9 >> 6 | 192), _0x388587 += String.fromCharCode(63 & _0xebb9f9 | 128)) : (_0x388587 += String.fromCharCode(_0xebb9f9 >> 12 | 224), _0x388587 += String.fromCharCode(_0xebb9f9 >> 6 & 63 | 128), _0x388587 += String.fromCharCode(63 & _0xebb9f9 | 128));
|
||||
}
|
||||
return _0x388587;
|
||||
}(_0xdf8201)), _0x20a458 = 1732584193, _0x3a685f = 4023233417, _0x4855c2 = 2562383102, _0x49c500 = 271733878, _0x39ad4c = 0; _0x39ad4c < _0x55840c.length; _0x39ad4c += 16) {
|
||||
_0x445457 = _0x20a458;
|
||||
_0x4a6b2c = _0x3a685f;
|
||||
_0x831a1f = _0x4855c2;
|
||||
_0x3773db = _0x49c500;
|
||||
_0x20a458 = _0x979311(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 0], 7, 3614090360);
|
||||
_0x49c500 = _0x979311(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 1], 12, 3905402710);
|
||||
_0x4855c2 = _0x979311(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 2], 17, 606105819);
|
||||
_0x3a685f = _0x979311(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 3], 22, 3250441966);
|
||||
_0x20a458 = _0x979311(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 4], 7, 4118548399);
|
||||
_0x49c500 = _0x979311(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 5], 12, 1200080426);
|
||||
_0x4855c2 = _0x979311(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 6], 17, 2821735955);
|
||||
_0x3a685f = _0x979311(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 7], 22, 4249261313);
|
||||
_0x20a458 = _0x979311(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 8], 7, 1770035416);
|
||||
_0x49c500 = _0x979311(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 9], 12, 2336552879);
|
||||
_0x4855c2 = _0x979311(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 10], 17, 4294925233);
|
||||
_0x3a685f = _0x979311(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 11], 22, 2304563134);
|
||||
_0x20a458 = _0x979311(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 12], 7, 1804603682);
|
||||
_0x49c500 = _0x979311(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 13], 12, 4254626195);
|
||||
_0x4855c2 = _0x979311(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 14], 17, 2792965006);
|
||||
_0x3a685f = _0x979311(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 15], 22, 1236535329);
|
||||
_0x20a458 = _0x26550e(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 1], 5, 4129170786);
|
||||
_0x49c500 = _0x26550e(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 6], 9, 3225465664);
|
||||
_0x4855c2 = _0x26550e(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 11], 14, 643717713);
|
||||
_0x3a685f = _0x26550e(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 0], 20, 3921069994);
|
||||
_0x20a458 = _0x26550e(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 5], 5, 3593408605);
|
||||
_0x49c500 = _0x26550e(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 10], 9, 38016083);
|
||||
_0x4855c2 = _0x26550e(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 15], 14, 3634488961);
|
||||
_0x3a685f = _0x26550e(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 4], 20, 3889429448);
|
||||
_0x20a458 = _0x26550e(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 9], 5, 568446438);
|
||||
_0x49c500 = _0x26550e(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 14], 9, 3275163606);
|
||||
_0x4855c2 = _0x26550e(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 3], 14, 4107603335);
|
||||
_0x3a685f = _0x26550e(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 8], 20, 1163531501);
|
||||
_0x20a458 = _0x26550e(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 13], 5, 2850285829);
|
||||
_0x49c500 = _0x26550e(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 2], 9, 4243563512);
|
||||
_0x4855c2 = _0x26550e(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 7], 14, 1735328473);
|
||||
_0x3a685f = _0x26550e(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 12], 20, 2368359562);
|
||||
_0x20a458 = _0x2655fb(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 5], 4, 4294588738);
|
||||
_0x49c500 = _0x2655fb(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 8], 11, 2272392833);
|
||||
_0x4855c2 = _0x2655fb(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 11], 16, 1839030562);
|
||||
_0x3a685f = _0x2655fb(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 14], 23, 4259657740);
|
||||
_0x20a458 = _0x2655fb(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 1], 4, 2763975236);
|
||||
_0x49c500 = _0x2655fb(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 4], 11, 1272893353);
|
||||
_0x4855c2 = _0x2655fb(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 7], 16, 4139469664);
|
||||
_0x3a685f = _0x2655fb(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 10], 23, 3200236656);
|
||||
_0x20a458 = _0x2655fb(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 13], 4, 681279174);
|
||||
_0x49c500 = _0x2655fb(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 0], 11, 3936430074);
|
||||
_0x4855c2 = _0x2655fb(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 3], 16, 3572445317);
|
||||
_0x3a685f = _0x2655fb(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 6], 23, 76029189);
|
||||
_0x20a458 = _0x2655fb(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 9], 4, 3654602809);
|
||||
_0x49c500 = _0x2655fb(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 12], 11, 3873151461);
|
||||
_0x4855c2 = _0x2655fb(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 15], 16, 530742520);
|
||||
_0x3a685f = _0x2655fb(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 2], 23, 3299628645);
|
||||
_0x20a458 = _0x2788bd(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 0], 6, 4096336452);
|
||||
_0x49c500 = _0x2788bd(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 7], 10, 1126891415);
|
||||
_0x4855c2 = _0x2788bd(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 14], 15, 2878612391);
|
||||
_0x3a685f = _0x2788bd(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 5], 21, 4237533241);
|
||||
_0x20a458 = _0x2788bd(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 12], 6, 1700485571);
|
||||
_0x49c500 = _0x2788bd(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 3], 10, 2399980690);
|
||||
_0x4855c2 = _0x2788bd(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 10], 15, 4293915773);
|
||||
_0x3a685f = _0x2788bd(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 1], 21, 2240044497);
|
||||
_0x20a458 = _0x2788bd(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 8], 6, 1873313359);
|
||||
_0x49c500 = _0x2788bd(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 15], 10, 4264355552);
|
||||
_0x4855c2 = _0x2788bd(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 6], 15, 2734768916);
|
||||
_0x3a685f = _0x2788bd(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 13], 21, 1309151649);
|
||||
_0x20a458 = _0x2788bd(_0x20a458, _0x3a685f, _0x4855c2, _0x49c500, _0x55840c[_0x39ad4c + 4], 6, 4149444226);
|
||||
_0x49c500 = _0x2788bd(_0x49c500, _0x20a458, _0x3a685f, _0x4855c2, _0x55840c[_0x39ad4c + 11], 10, 3174756917);
|
||||
_0x4855c2 = _0x2788bd(_0x4855c2, _0x49c500, _0x20a458, _0x3a685f, _0x55840c[_0x39ad4c + 2], 15, 718787259);
|
||||
_0x3a685f = _0x2788bd(_0x3a685f, _0x4855c2, _0x49c500, _0x20a458, _0x55840c[_0x39ad4c + 9], 21, 3951481745);
|
||||
_0x20a458 = _0x1a5d98(_0x20a458, _0x445457);
|
||||
_0x3a685f = _0x1a5d98(_0x3a685f, _0x4a6b2c);
|
||||
_0x4855c2 = _0x1a5d98(_0x4855c2, _0x831a1f);
|
||||
_0x49c500 = _0x1a5d98(_0x49c500, _0x3773db);
|
||||
}
|
||||
return (_0x25b2b3(_0x20a458) + _0x25b2b3(_0x3a685f) + _0x25b2b3(_0x4855c2) + _0x25b2b3(_0x49c500)).toLowerCase();
|
||||
}
|
||||
583
shangzhanwangluo.js
Normal file
583
shangzhanwangluo.js
Normal 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);
|
||||
}
|
||||
549
smart汽车+.js
549
smart汽车+.js
File diff suppressed because one or more lines are too long
1097
sysxc_v2.js
1097
sysxc_v2.js
File diff suppressed because it is too large
Load Diff
6
sytt.js
6
sytt.js
@ -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]
|
||||
|
||||
715
wxapp/bawangchaji.js
Normal file
715
wxapp/bawangchaji.js
Normal 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);
|
||||
}
|
||||
@ -11,8 +11,8 @@ let _0x5405b0 = ["@", "\n"],
|
||||
_0x45299e = "&",
|
||||
_0x5e6b99 = "0.0.1";
|
||||
async function _0x104bb7() {
|
||||
await _0x11b342("smallfawn/QLScriptPublic@main/bnmdhg_wx.js");
|
||||
await _0x455560();
|
||||
//await _0x11b342("smallfawn/QLScriptPublic@main/bnmdhg_wx.js");
|
||||
// await _0x455560();
|
||||
console.log("\n================== \u7528\u6237\u4FE1\u606F ==================\n");
|
||||
let _0x5c3f2e = [];
|
||||
for (let _0x33113a of _0x58a094.userList) {
|
||||
@ -692,7 +692,7 @@ function _0x313dd5(_0x5ccb4a, _0x528fb9) {
|
||||
if (!_0x82d415) return;
|
||||
if (_0x521cbd > 0) {
|
||||
if (this.isNode()) {
|
||||
var _0x55fa57 = require("./sendNotify");
|
||||
var _0x55fa57 = require("../sendNotify");
|
||||
await _0x55fa57.sendNotify(this.name, _0x82d415);
|
||||
} else this.msg(this.name, "", _0x82d415);
|
||||
} else {
|
||||
@ -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 = "&"; //多变量分隔符
|
||||
@ -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") : "";
|
||||
|
||||
|
||||
|
||||
@ -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);
|
||||
838
wxapp/quanmianshidai.py
Normal file
838
wxapp/quanmianshidai.py
Normal 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返回树木ID,sunshine,和其他信息
|
||||
_, sunshine, _ = hqid(code, token)
|
||||
|
||||
if sunshine > 99:
|
||||
url = "https://sg01.purcotton.com/api/sunshine-task/complete-task"
|
||||
headers = create_headers(code, token) # 使用create_headers函数创建请求头
|
||||
payload = {"tid": 1} # 固定payload,可能需要根据API文档调整
|
||||
|
||||
try:
|
||||
response = requests.post(url, headers=headers, json=payload)
|
||||
response.raise_for_status() # 检查响应是否成功
|
||||
|
||||
response_data = response.json()
|
||||
if response_data.get("code") == 200:
|
||||
print("成功完成阳光任务。")
|
||||
# 这里可以根据响应体进一步处理,如打印信息或记录日志
|
||||
else:
|
||||
print(f"完成阳光任务失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}")
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"请求完成阳光任务时出错: {e}")
|
||||
else:
|
||||
print(f"阳光值未达到{sunshine}/100,不执行任务。")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 好友?
|
||||
|
||||
|
||||
def hyid(code, token):
|
||||
url = "https://sg01.purcotton.com/api/friend/list?page=1&page_size=50"
|
||||
headers = create_headers(code, token)
|
||||
|
||||
try:
|
||||
response = requests.get(url, headers=headers)
|
||||
response.raise_for_status() # 确保响应状态为200
|
||||
|
||||
# 解析响应体为JSON
|
||||
response_data = response.json()
|
||||
|
||||
friend_user_ids = [] # 用于存储符合条件的朋友的用户ID
|
||||
if response_data.get("code") == 200:
|
||||
friends_list = response_data.get("data", {}).get("list", [])
|
||||
for friend in friends_list:
|
||||
friend_user_id = friend.get("friend_user_id")
|
||||
help_water_cnt = friend.get("help_water_cnt")
|
||||
be_help_water_cnt = friend.get("friend_user_info", {}).get("be_help_water_cnt")
|
||||
#print(f"朋友用户ID: {friend_user_id}, 帮忙浇水次数: {help_water_cnt}, 被帮忙浇水次数: {be_help_water_cnt}")
|
||||
|
||||
# 只有当帮忙浇水次数小于1时,才收集该朋友的用户ID
|
||||
if help_water_cnt < 1:
|
||||
friend_user_ids.append(friend_user_id)
|
||||
|
||||
return friend_user_ids # 返回所有符合条件收集到的用户ID
|
||||
else:
|
||||
print("请求失败,错误代码:", response_data.get("code"), "错误信息:", response_data.get("msg"))
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"请求失败: {e}")
|
||||
|
||||
|
||||
|
||||
def access_friend_detail(code, token, friend_user_id):
|
||||
"""访问朋友的详细信息,并尝试对其树进行浇水操作"""
|
||||
url = "https://sg01.purcotton.com/api/friend/index"
|
||||
headers = create_headers(code, token)
|
||||
headers['friend-id'] = str(friend_user_id)
|
||||
|
||||
try:
|
||||
response = requests.get(url, headers=headers)
|
||||
response.raise_for_status()
|
||||
response_data = response.json()
|
||||
|
||||
if response_data.get("code") == 200:
|
||||
tree_info = response_data.get('data', {}).get('tree', {})
|
||||
if isinstance(tree_info, list) and tree_info:
|
||||
tree_info = tree_info[0]
|
||||
|
||||
tree_id = tree_info.get('id') if isinstance(tree_info, dict) else None
|
||||
help_water_info = response_data.get('data', {}).get('help_water', {})
|
||||
help_water_code = help_water_info.get('code')
|
||||
help_water_msg = help_water_info.get('msg')
|
||||
|
||||
#print(f"{friend_user_id}朋友树ID: {tree_id}, 帮忙浇水代码: {help_water_code}, 信息: '{help_water_msg}'")
|
||||
|
||||
if tree_id is not None:
|
||||
success = water_friend_tree(code, token, tree_id, friend_user_id)
|
||||
if not success:
|
||||
print(f"由于操作失败,停止处理朋友{friend_user_id}的后续操作。")
|
||||
return False
|
||||
else:
|
||||
print(f"获取朋友{friend_user_id}的详细信息失败,错误代码: {response_data.get('code')}, 错误信息: {response_data.get('msg')}")
|
||||
return False
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"请求失败: {e}")
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def water_friend_tree(code, token, tree_id, friend_user_id):
|
||||
"""执行给定朋友的树浇水操作"""
|
||||
url = "https://sg01.purcotton.com/api/friend/water"
|
||||
headers = create_headers(code, token)
|
||||
payload = {"tree_user_id": tree_id}
|
||||
headers['friend-id'] = str(friend_user_id)
|
||||
|
||||
try:
|
||||
response = requests.post(url, headers=headers, json=payload)
|
||||
response.raise_for_status()
|
||||
|
||||
response_data = response.json()
|
||||
#print(response_data) # 打印整个响应体,用于调试
|
||||
|
||||
if response_data["code"] == 200:
|
||||
# 检查response_data['data']是否为字典,以此判断是否可以安全访问'info'
|
||||
if isinstance(response_data['data'], dict):
|
||||
use_water = response_data['data']['info'].get('use_water', '未知')
|
||||
reward_water = response_data['data']['info'].get('reward_water', '未知')
|
||||
print(f"对树ID {tree_id} 的浇水操作成功: 使用水量: {use_water}, 奖励水量: {reward_water}")
|
||||
else:
|
||||
# 如果data不是字典,直接打印data字段,这里可能是错误消息或其他说明
|
||||
print(f"操作结果: {response_data['data']}")
|
||||
return False
|
||||
elif response_data["code"] == 400:
|
||||
#print(f"{response_data.get('msg', '未知错误')}. 完整响应体: {response_data}")
|
||||
print(f"{response_data.get('msg', '未知错误')}. ")
|
||||
return False
|
||||
else:
|
||||
print(f"对树ID {tree_id} 的浇水操作响应: {response_data}")
|
||||
return False
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"请求失败: {e}")
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def process_all_friends(friends_user_ids, code, token):
|
||||
"""遍历朋友列表,尝试对每个朋友的树进行浇水操作,并在首次失败时停止"""
|
||||
for friend_user_id in friends_user_ids:
|
||||
if not access_friend_detail(code, token, friend_user_id):
|
||||
#print(f"由于操作失败,停止对所有后续朋友的处理。")
|
||||
break # 遇到第一个失败,立即跳出循环
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
var_name = 'qmzmh'
|
||||
tokens = get_env_variable(var_name)
|
||||
if not tokens:
|
||||
return
|
||||
|
||||
total_tokens = len(tokens)
|
||||
|
||||
if total_tokens > 20:
|
||||
print("账号数量超过20个,不执行操作。")
|
||||
return
|
||||
|
||||
|
||||
for index, token_info in enumerate(tokens, start=1):
|
||||
parts = token_info.split('#')
|
||||
if len(parts) < 2:
|
||||
print("令牌格式不正确。跳过处理。")
|
||||
continue
|
||||
|
||||
code = parts[0]
|
||||
token = parts[1]
|
||||
remark = parts[2] if len(parts) > 2 else ""
|
||||
print()
|
||||
print(f"------账号{index}/{total_tokens},备注: {remark}-------")
|
||||
|
||||
phone, user_id = login(code, token)
|
||||
if phone and user_id: # 检查是否成功获取电话号码和用户ID
|
||||
# 进行后续任务
|
||||
cscscs(code, token)
|
||||
#sj_yg(code, token)#收集阳光
|
||||
#syyg(code, token)#使用阳光
|
||||
jscz(code, token) #浇水
|
||||
pdrw(code, token) #任务判断
|
||||
friend_user_ids = hyid(code, token)
|
||||
if friend_user_ids:
|
||||
process_all_friends(friend_user_ids, code, token) # 正确传入朋友ID列表
|
||||
else:
|
||||
print("登录失败或获取用户信息失败,跳过当前账号的后续操作。")
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
'''
|
||||
def main():
|
||||
var_name = 'qmzmh'
|
||||
tokens = get_env_variable(var_name)
|
||||
if not tokens:
|
||||
return
|
||||
|
||||
total_tokens = len(tokens)
|
||||
|
||||
if total_tokens > 20:
|
||||
print("账号数量超过20个,不执行操作。")
|
||||
return
|
||||
|
||||
for index, token_info in enumerate(tokens, start=1):
|
||||
parts = token_info.split('#')
|
||||
if len(parts) < 2:
|
||||
print("令牌格式不正确。跳过处理。")
|
||||
continue
|
||||
|
||||
code = parts[0]
|
||||
token = parts[1]
|
||||
remark = parts[2] if len(parts) > 2 else ""
|
||||
|
||||
print(f"------账号{index}/{total_tokens},备注: {remark}-------")
|
||||
|
||||
|
||||
login(code, token)#判断要手机号码/提取的电话号码: 才运行下面的任务
|
||||
cscscs(code, token)#更新
|
||||
#sj_yg(code, token)#收集阳光
|
||||
#syyg(code, token)#使用阳光
|
||||
jscz(code, token) #浇水
|
||||
pdrw(code, token) #任务判断
|
||||
friend_user_ids = hyid(code, token)
|
||||
if friend_user_ids:
|
||||
process_all_friends(friend_user_ids, code, token) # 正确传入朋友ID列表
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
'''
|
||||
File diff suppressed because one or more lines are too long
@ -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
|
||||
@ -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 = "#"; //多变量分隔符
|
||||
@ -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 = "&"; //多变量分隔符
|
||||
@ -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 = "#"; //多变量分隔符
|
||||
@ -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 = "#"; //多变量分隔符
|
||||
@ -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
@ -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);
|
||||
957
wxapp/zhanma.js
Normal file
957
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
@ -5,12 +5,12 @@
|
||||
* @base 幻生 https://github.com/Huansheng1/
|
||||
* @change smallfawn https://github.com/smallfawn/QLScriptPublic
|
||||
* 变量名:jsbaxfls
|
||||
* 变量值:https://vip.ixiliu.cn/mp/sign/applyV2 请求头Headers中access-token的值 多账户&分割 或换行 或新建同名变量
|
||||
* 变量值: 请求头Headers中access-token的值 多账户&分割 或换行 或新建同名变量
|
||||
* scriptVersionNow = "0.0.1";
|
||||
*/
|
||||
|
||||
const $ = new Env("杰士邦安心福利社-小程序");
|
||||
const notify = $.isNode() ? require('./sendNotify') : '';
|
||||
const notify = $.isNode() ? require('../sendNotify') : '';
|
||||
let ckName = "jsbaxfls";
|
||||
let envSplitor = ["&", "\n"]; //多账号分隔符
|
||||
let strSplitor = "#"; //多变量分隔符
|
||||
@ -33,7 +33,6 @@ class Task {
|
||||
async taskRequest(method, url, body = "") {
|
||||
//
|
||||
let headers = {
|
||||
"Host": "vip.ixiliu.cn",
|
||||
"Connection": "keep-alive",
|
||||
"charset": "utf-8",
|
||||
"User-Agent": "Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 XWEB/1160065 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android",
|
||||
@ -55,15 +54,16 @@ class Task {
|
||||
}
|
||||
async taskSignIn() {
|
||||
try {
|
||||
let result = await this.taskRequest("get", `https://vip.ixiliu.cn/mp/sign/applyV2`)
|
||||
let result = await this.taskRequest("get", `https://xh-vip-api.a-touchin.com/mp/sign/applyV2`)
|
||||
//console.log(options);
|
||||
//console.log(result);
|
||||
if (result.code == 200) {
|
||||
$.log(`✅账号[${this.nick_name}] 签到执行状态[${result.message}]🎉`)
|
||||
/*if (result.code == 200) {
|
||||
$.log(`✅账号[${this.nick_name}] 签到执行状态[${result.message}]🎉`)
|
||||
} else {
|
||||
$.log(`❌账号[${this.nick_name}] 签到执行状态[${result.message}]`);
|
||||
//console.log(result);
|
||||
}
|
||||
}*/
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
@ -71,13 +71,12 @@ class Task {
|
||||
|
||||
async userInfo() {
|
||||
try {
|
||||
let result = await this.taskRequest("get", `https://vip.ixiliu.cn/mp/user/info`)
|
||||
let result = await this.taskRequest("get", `https://xh-vip-api.a-touchin.com/mp/welfare/info`)
|
||||
//console.log(options);
|
||||
//console.log(result);
|
||||
if (result.status == 200) {
|
||||
$.log(`✅账号[${this.index}] 当前积分[${result.data.userInfo.points}]🎉`)
|
||||
$.log(`✅账号[${this.index}] 当前积分[${result.data.user.points}]🎉`)
|
||||
this.ckStatus = true
|
||||
this.nick_name = result.data.userInfo.nick_name;
|
||||
} else {
|
||||
$.log(`❌账号[${this.index}] 获取用户信息失败[${result.message}]`);
|
||||
this.ckStatus = false
|
||||
@ -90,16 +89,16 @@ class Task {
|
||||
|
||||
async signInInfo() {
|
||||
try {
|
||||
let result = await this.taskRequest("get", `https://vip.ixiliu.cn/mp/sign/infoV2`)
|
||||
let result = await this.taskRequest("get", `https://xh-vip-api.a-touchin.com/mp/sign/infoV2`)
|
||||
//console.log(options);
|
||||
//console.log(result);
|
||||
console.log(result);
|
||||
if (result.status == 200) {
|
||||
$.log(`✅账号[${this.nick_name}] 当天签到状态[${result.data.today_is_signed}]🎉`)
|
||||
$.log(`✅账号[${this.index}] 当天签到状态[${result.data.today_is_signed}]🎉`)
|
||||
if (!result.data.today_is_signed) {
|
||||
await this.taskSignIn();
|
||||
}
|
||||
} else {
|
||||
$.log(`❌账号[${this.nick_name}] 当天签到状态[${result.message}]`);
|
||||
$.log(`❌账号[${this.index}] 当天签到状态[${result.message}]`);
|
||||
console.log(result);
|
||||
}
|
||||
} catch (e) {
|
||||
@ -110,13 +109,13 @@ class Task {
|
||||
|
||||
async taskShare() {
|
||||
try {
|
||||
let result = await this.taskRequest("get", `https://vip.ixiliu.cn/mp/guess.home/share?project_id=pages%2Fguess%2Findex%3Fproject_id%3D333480658633344`)
|
||||
let result = await this.taskRequest("get", `https://xh-vip-api.a-touchin.com/mp/guess.home/share?project_id=pages%2Fguess%2Findex%3Fproject_id%3D333480658633344`)
|
||||
//console.log(options);
|
||||
//console.log(result);
|
||||
if (result.status == 200) {
|
||||
$.log(`✅账号[${this.nick_name}] 分享执行状态[${result.msg}]🎉`)
|
||||
$.log(`✅账号[${this.index}] 分享执行状态[${result.msg}]🎉`)
|
||||
} else {
|
||||
$.log(`❌账号[${this.nick_name}] 分享执行状态[${result.msg}]`);
|
||||
$.log(`❌账号[${this.index}] 分享执行状态[${result.msg}]`);
|
||||
//console.log(result);
|
||||
}
|
||||
} catch (e) {
|
||||
481
wxapp/植白说.js
Normal file
481
wxapp/植白说.js
Normal 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
570
wxapp/海尔-卡萨帝.js
Normal 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
516
wxapp/草莓台.js
Normal 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
449
xiaosatonglu.js
Normal file
File diff suppressed because one or more lines are too long
3108
xipigou.js
Normal file
3108
xipigou.js
Normal file
File diff suppressed because one or more lines are too long
478
yingsheng_v2.js
478
yingsheng_v2.js
File diff suppressed because one or more lines are too long
4
ysfqd.js
4
ysfqd.js
@ -21,8 +21,8 @@ let msg = "";
|
||||
|
||||
|
||||
async function start() {
|
||||
await getVersion("smallfawn/QLScriptPublic@main/ysfqd.js");
|
||||
await getNotice();
|
||||
//await getVersion("smallfawn/QLScriptPublic@main/ysfqd.js");
|
||||
//await getNotice();
|
||||
$.DoubleLog(`---------------------------`)
|
||||
let taskall = [];
|
||||
for (let user of $.userList) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user