├── 58tc.js ├── Lofter.js ├── README.md ├── alyp.py ├── aoc.js ├── bhxcy.js ├── bsly.py ├── cxw.js ├── dewu.js ├── dyjsb.js ├── elm.js ├── elm.sh ├── fdsh.js ├── ghdy.py ├── gylm-nc.js ├── gylm-ym.js ├── hipc.js ├── htx.js ├── hy.js ├── jryc.js ├── jtbh.js ├── kgyy.js ├── kjwj.py ├── ks.js ├── ksdt.py ├── ksjsb.js ├── ksjsb.py ├── kyh.js ├── ltcy.py ├── ltyd.py ├── meituan.js ├── mxbc.js ├── nnjsq.py ├── pfjsq.py ├── qcs.js ├── qcslm.js ├── rdxk.js ├── rmdj.js ├── sendNotify.js ├── sendNotify.py ├── sysxc.py ├── tc.js ├── trdacj.js ├── twkj.js ├── txs.js ├── tyqh.js ├── wapj.py ├── wc.js ├── wxyd.py ├── xab.js ├── xkdl.py ├── xmsq.py ├── xpp.js ├── xqz.js ├── xx.py ├── yhlm.py ├── yhsh.py ├── yysk.js ├── zglt.js ├── zhdr.js └── zsoh.js /README.md: -------------------------------------------------------------------------------- 1 | # If the effort is useful, what genius will do 2 | -------------------------------------------------------------------------------- /alyp.py: -------------------------------------------------------------------------------- 1 | """ 2 | 阿里云盘 v1.0 3 | 4 | 任务:签到 5 | 6 | token填到变量 alytoken 7 | export alytoken="" 8 | 9 | cron: 5 0,9 * * * 10 | const $ = new Env("阿里云盘"); 11 | """ 12 | 13 | import requests 14 | import datetime 15 | import os 16 | import notify 17 | 18 | message = "" 19 | 20 | 21 | class AliyunSignIn(object): 22 | def __init__(self, refresh_tokens): 23 | self.refresh_tokens = refresh_tokens 24 | 25 | def get_access_token(self, refresh_token): 26 | url = 'https://auth.aliyundrive.com/v2/account/token' 27 | headers = { 28 | "Content-Type": "application/json; charset=utf-8", 29 | } 30 | data = { 31 | "grant_type": "refresh_token", 32 | "app_id": "pJZInNHN2dZWk8qg", 33 | "refresh_token": refresh_token 34 | } 35 | res = requests.post(url, headers=headers, json=data) 36 | if res.status_code == 200: 37 | access_token = f'Bearer {res.json()["access_token"]}' 38 | nick_name = res.json()['nick_name'] 39 | return access_token, nick_name 40 | return None, None 41 | 42 | def sign_in(self): 43 | messages = '' 44 | for refresh_token in self.refresh_tokens: 45 | access_token, nick_name = self.get_access_token(refresh_token) 46 | if access_token: 47 | print(f'access_token获取完成, {access_token}欢迎{nick_name}\n开始签到') 48 | messages = messages + '\n' + f'access_token获取完成, \n欢迎{nick_name}\n开始签到' 49 | url = 'https://member.aliyundrive.com/v1/activity/sign_in_list' 50 | headers = { 51 | "Content-Type": "application/json", 52 | 'Authorization': access_token, 53 | "User-Agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.2 Safari/605.1.15' 54 | } 55 | data = {} 56 | res = requests.post(url, headers=headers, json=data) 57 | k = 1 58 | if k < 10: 59 | print("k=", k) 60 | if res.status_code == 200 and res.json()['success']: 61 | k = 10 62 | res_json = res.json() 63 | notice = '' 64 | prefix = '' 65 | for l in res_json['result']['signInLogs']: 66 | if l['status'] != 'miss': 67 | prefix = f'第{l["day"]}天' 68 | notice = l['notice'] or '' 69 | if l['reward'] and l['reward']['description']: 70 | notice += ' ' + l['reward']['description'] 71 | notifyStr = f'{prefix}签到成功' 72 | if notice: 73 | notifyStr += f',获得【{notice}】' 74 | print(notifyStr) 75 | messages = messages + '\n' + notifyStr 76 | # notify.go_cqhttp("阿里云签到", notifyStr) 77 | else: 78 | k = k + 1 79 | print("kn=", k) 80 | print(f'获取access_token失败2, refresh_token: {refresh_token}') 81 | messages = messages + '\n' + f'获取access_token失败2, refresh_token: {refresh_token}' 82 | # notify.go_cqhttp("阿里云签到", '获取access_token失败2') 83 | 84 | else: 85 | print(f'获取access_token失败1, refresh_token: {refresh_token}') 86 | messages = messages + '\n' + f'获取access_token失败1, refresh_token: {refresh_token}' 87 | # notify.go_cqhttp("阿里云签到", '获取access_token失败1') 88 | notify.send('阿里云盘签到', messages + '\n') 89 | 90 | 91 | if __name__ == '__main__': 92 | refresh_tokens = [] 93 | refresh_tokens.append(os.environ.get('alytoken')) 94 | print('账号:', refresh_tokens, type(refresh_tokens)) 95 | ali = AliyunSignIn(refresh_tokens) 96 | ali.sign_in() 97 | -------------------------------------------------------------------------------- /bsly.py: -------------------------------------------------------------------------------- 1 | """ 2 | 百事乐元 v1.0 3 | 4 | 变量 token#openid#l_id#备注, 多账户换行 5 | export bslycj="" 6 | 7 | cron: 36 13,18 * * * 8 | const $ = new Env("百事乐元"); 9 | """ 10 | 11 | import os 12 | import requests 13 | from datetime import datetime, timezone, timedelta 14 | import json 15 | import time 16 | import random 17 | 18 | #---------简化的框架-------- 19 | dhzdsx = 1 # 设置为 0 表示按顺序组队,设置为 1 表示随机组队 20 | # 配置参数 21 | base_url = "https://hxxxy.gov.cn" # 已修改为实际的基础URL 22 | 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/1160049 MMWEBSDK/20231201 MMWEBID/2930 MicroMessenger/8.0.45.2521(0x28002D36) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android" 23 | 24 | # 获取北京日期的函数 25 | def get_beijing_date(): 26 | beijing_time = datetime.now(timezone(timedelta(hours=8))) 27 | return beijing_time.date() 28 | 29 | def dq_time(): 30 | dqsj, dysj = int(time.time()), datetime.fromtimestamp(dqsj).strftime('%Y-%m-%d %H:%M:%S') 31 | return dqsj, dysj 32 | 33 | # 获取环境变量 34 | def get_env_variable(var_name): 35 | value = os.getenv(var_name) 36 | if value is None: 37 | print(f'环境变量{var_name}未设置,请检查。') 38 | return None 39 | accounts = value.strip().split('\n') 40 | num_accounts = len(accounts) 41 | print(f'-----------本次账号运行数量:{num_accounts}-----------') 42 | print(f'-----------项目 百事乐元 - 抽奖活动-----脚本作者: QGh3amllamll ------') 43 | return accounts 44 | 45 | # 封装请求头 46 | def create_headers(account_token): 47 | headers = { 48 | 'host': 'pepcoinbhhpre.pepcoinbypepsico.com.cn', 49 | 'accept': 'application/json, text/plain, */*', 50 | 'user-agent': user_agent, 51 | 'charset': 'utf-8', 52 | 'content-type': 'application/json', 53 | 'Accept-Encoding': 'gzip,compress,br,deflate', 54 | 'token': account_token, 55 | 'Referer': 'https://servicewechat.com/wx1a72addb7ee74f67/124/page-frame.html' 56 | } 57 | return headers 58 | 59 | def cj(account_token):#抽奖 60 | url = "https://pepcoinbhhpre.pepcoinbypepsico.com.cn/mp/draw" 61 | headers = create_headers(account_token) 62 | #print(headers) 63 | while True: 64 | try: 65 | response = requests.get(url, headers=headers) 66 | response.raise_for_status() 67 | response_data = response.json() 68 | #print(response.json()) 69 | 70 | # 检查响应的code 71 | if response_data.get('code') == 0: 72 | prize_name = response_data.get('data', {}).get('name') 73 | if prize_name == "现金红包": 74 | amount = response_data.get('data', {}).get('amount', 0) 75 | print(f"获得现金红包: {amount / 100} 元") 76 | # 如果需要在获得红包后继续请求,保持这个循环;如果不需要,使用 break 退出循环 77 | elif prize_name: 78 | print(f"获得奖品: {prize_name}") 79 | #break # 收到奖品后退出循环 80 | else: 81 | print("响应中没有奖品名称。") 82 | break 83 | else: 84 | print("抽奖次数超限") 85 | #print("抽奖完整响应内容:", response_data) 86 | break 87 | 88 | # 暂停 3 到 5 秒后继续下一次请求 89 | time.sleep(random.randint(3, 5)) 90 | 91 | except requests.exceptions.RequestException as e: 92 | print(f"请求失败: {e}") 93 | return None 94 | 95 | def hql_id(account_token): #获取iid 96 | 97 | try: 98 | token = account_token.split(',')[0] 99 | except IndexError: 100 | print("Token 提取失败或格式不正确") 101 | return 102 | 103 | url = "https://pepcoinnew.pepcoinbypepsico.com.cn/api/v1/wxapp/doGetUserInfo" 104 | headers = { 105 | 'Host': 'pepcoinnew.pepcoinbypepsico.com.cn', 106 | 'Connection': 'keep-alive', 107 | 'Content-Length': '96', 108 | 'charset': 'utf-8', 109 | 'user-agent': user_agent, 110 | 'content-type': 'application/json', 111 | 'Accept-Encoding': 'gzip,compress,br,deflate', 112 | 'Referer': 'https://servicewechat.com/wx1a72addb7ee74f67/124/page-frame.html', 113 | } 114 | #print(headers) 115 | data = { 116 | "token": token, 117 | "provision": "2_0_6" 118 | } 119 | #print(data) 120 | try: 121 | response = requests.post(url, json=data, headers=headers) 122 | #print("响应状态码:", response.status_code) 123 | #print("响应内容:", response.text) 124 | 125 | if response.status_code == 200: 126 | # 解析响应内容 127 | response_data = json.loads(response.text) 128 | if response_data.get('code') == 0: 129 | l_id = response_data['data'].get('l_id', '未知') 130 | print("l_id:", l_id) 131 | else: 132 | print("操作未成功,响应 code 不为 0") 133 | else: 134 | print("请求可能遇到问题,检查状态码和响应内容") 135 | except requests.exceptions.RequestException as e: 136 | print(f"请求失败: {e}") 137 | 138 | def add_tmrw(account_token):#天猫会员任务 139 | url = "https://pepcoinbhhpre.pepcoinbypepsico.com.cn/mp/addTMallMember" 140 | headers = create_headers(account_token) 141 | #print(account_token) 142 | try: 143 | response = requests.get(url, headers=headers) # 尝试使用GET方法 144 | response_data = response.json() # 解析响应为JSON 145 | #print(response_data) # 打印响应的JSON数据 146 | 147 | # 根据返回的code和data字段判断操作结果 148 | if response_data.get("code") == 0: 149 | if response_data.get("data") == 1: 150 | print("添加天猫会员任务成功,增加抽奖机会+1。") 151 | else: 152 | print("添加天猫会员任务失败。") 153 | else: 154 | print("请求异常,响应内容:" + str(response_data)) 155 | 156 | except requests.exceptions.RequestException as e: 157 | print(f"请求异常:{e}") 158 | 159 | def zd_jh(account_token): # 判断组队机会 160 | url = "https://pepcoinbhhpre.pepcoinbypepsico.com.cn/mp/getMyTeam" 161 | headers = create_headers(account_token) 162 | 163 | try: 164 | response = requests.get(url, headers=headers) 165 | response_json = response.json() # 解析响应为JSON 166 | if response_json.get('code') == 0: # 根据 code 的值进行判断 167 | data = response_json.get('data', {}) 168 | teamCount = data.get('teamCount', 0) # 确保默认值为0 169 | # 其他信息可以根据需要返回 170 | return {"teamCount": teamCount} 171 | else: 172 | print("不是0 打印", response_json) 173 | return None 174 | except requests.exceptions.RequestException as e: 175 | print(f"请求异常: {e}") 176 | return None 177 | 178 | 179 | def post_join_team(dc_iid, zd_token, account_no): # 组队逻辑 180 | url = "https://pepcoinbhhpre.pepcoinbypepsico.com.cn/mp/postJoinTeam" 181 | headers = create_headers(zd_token) 182 | data = {"inviteUser": dc_iid} # 使用轮流作队长的IID 183 | 184 | try: 185 | response = requests.post(url, json=data, headers=headers) 186 | response_data = response.json() # 解析响应为JSON 187 | 188 | code = response_data.get("code") 189 | data_value = response_data.get("data") 190 | #print(data_value) 191 | if code == 0: 192 | if isinstance(data_value, dict) and 'name' in data_value: 193 | name = data_value['name'] 194 | if name == '现金红包' and 'amount' in data_value: 195 | amount = data_value['amount'] / 100 196 | print(f"组队奖品: 现金红包 {amount}元") 197 | else: 198 | print(f"组队奖品: {name}") 199 | 200 | elif data_value == 5: 201 | print(f"{account_no} 不能加入自己的队伍。") 202 | elif data_value == 4: 203 | #print(f"{account_no} 已经在{dc_iid} 队伍里了。") 204 | print(f"{account_no} 已经在队伍里了。") 205 | elif data_value == 3: 206 | #print(f"{account_no} 和{dc_iid}组过队了,组队失败。") 207 | print(f"{account_no} 和组过队了,组队失败。") 208 | 209 | elif data_value == 2: 210 | print(f"组长没有次数,退出帮组队") 211 | return False # 当组长没有次数时返回 False 212 | elif data_value == 1: 213 | print(f"{account_no} 今天组队次数已经使用完。退出工具人列表") 214 | return "yddm" # 当队员没有次数时返回特定标识 215 | 216 | elif data_value == 0: 217 | print(f"{account_no} 加入队伍 成功。") 218 | else: 219 | print(f"未知响应数据: {response_data}") 220 | else: 221 | print(f"未知响应: {response.text}") 222 | 223 | except requests.exceptions.RequestException as e: 224 | print(f"请求失败: {e}") 225 | 226 | # 每次请求后暂停 1 到 2 秒 227 | time.sleep(random.randint(1, 2)) 228 | return True # 函数成功完成 229 | 230 | 231 | 232 | def cj_prizes(account_token, page=1): # 抽奖的奖品信息 233 | """获取我的奖品信息""" 234 | total_cash = 0 235 | url = f"https://pepcoinbhhpre.pepcoinbypepsico.com.cn/mp/getMyPrizes?page={page}" 236 | headers = create_headers(account_token) 237 | try: 238 | response = requests.get(url, headers=headers) 239 | response_data = response.json() # 解析响应为JSON 240 | 241 | if response_data.get("code") == 0 and "data" in response_data: 242 | prizes = response_data["data"] 243 | for prize in prizes: 244 | act_time = prize.get("actTime") 245 | prize_name = prize.get("prizeName") 246 | # 特别判断现金红包 247 | if "现金红包" in prize_name: 248 | cash_amount = float(prize_name.split('元')[0]) # 提取现金金额 249 | total_cash += cash_amount 250 | print(f"抽奖 :{prize_name},时间:{act_time}") 251 | 252 | else: 253 | print("获取奖品信息失败或没有奖品。") 254 | return total_cash # 正常情况下返回总金额 255 | 256 | except requests.exceptions.RequestException as e: 257 | print(f"请求异常:{e}") 258 | return total_cash # 异常情况下返回总金额 259 | 260 | def zd_prize(account_token): # 获取团队奖品信息 261 | """获取团队奖品信息""" 262 | total_cash = 0 263 | url = "https://pepcoinbhhpre.pepcoinbypepsico.com.cn/mp/getTeamPrize" 264 | headers = create_headers(account_token) 265 | try: 266 | response = requests.get(url, headers=headers) 267 | response_data = response.json() # 解析响应为JSON 268 | 269 | if response_data.get("code") == 0 and "data" in response_data: 270 | team_prizes = response_data["data"] 271 | for prize in team_prizes: 272 | prize_name = prize.get("prizeName") or "未知奖品" 273 | grant_time = prize.get("grantTime") 274 | if "现金红包" in prize_name: 275 | cash_amount = float(prize_name.split('元')[0]) # 提取现金金额 276 | total_cash += cash_amount 277 | print(f"组队 :{prize_name},时间:{grant_time}") 278 | else: 279 | print("获取团队奖品信息失败或没有奖品。") 280 | return total_cash # 正常情况下返回总金额 281 | 282 | except requests.exceptions.RequestException as e: 283 | print(f"请求异常:{e}") 284 | return total_cash # 异常情况下返回总金额 285 | 286 | 287 | #本地测试用 288 | os.environ['bslyccscscsj'] = ''' 289 | 290 | a2433423324234ac40eb234r23238d76,oKW23242TP42wTs#8882141#大号 291 | 292 | ''' 293 | #本地测试用 294 | def main(): #这个没有问题 295 | var_name = 'bslycj' 296 | tokens = get_env_variable(var_name) 297 | if not tokens: 298 | print(f'环境变量{var_name}未设置,请检查。') 299 | return 300 | 301 | total_accounts = len(tokens) 302 | team_counts = {} # 存储每个账号的团队数量 303 | accounts_with_teams = [] # 存储团队数量大于0的账号 304 | 305 | # 首先遍历所有账号执行抽奖逻辑和获取团队数量 306 | for i in range(total_accounts): 307 | parts = tokens[i].split('#') 308 | account_token = parts[0] 309 | dc_iid = parts[1] 310 | account_no = parts[2] # 提取账号名称 311 | 312 | # 抽奖逻辑 313 | print(f'------账号 {i+1}/{total_accounts} {account_no} 抽奖-------') 314 | #add_tmrw(account_token) 315 | cj(account_token) 316 | 317 | # 获取团队数量 318 | # 获取团队数量 319 | team_info = zd_jh(account_token) 320 | print(f"账号 {account_no} 的组队信息: {team_info}") # 调试打印 321 | 322 | if team_info and 'teamCount' in team_info: 323 | team_count = team_info['teamCount'] 324 | team_counts[account_no] = team_count 325 | if team_count > 0: 326 | #if team_count > -1: 327 | accounts_with_teams.append(account_no) # 仅存储团队数量大于0的账号 328 | 329 | print(f"当前账号 {account_no} 处理后的 可以组队id: {accounts_with_teams}") # 调试打印 330 | print() 331 | print() 332 | print() 333 | print("所有账号的抽奖和团队数量检查完成,开始组队操作") 334 | 335 | 336 | # 组队操作 337 | print("开始组队操作") 338 | 339 | for account_no in accounts_with_teams: # 队长按顺序进行 340 | i = [i for i, part in enumerate(tokens) if part.split('#')[2] == account_no][0] 341 | parts = tokens[i].split('#') 342 | account_token = parts[0] 343 | dc_iid = parts[1] 344 | 345 | print(f'------账号 {i+1}/{total_accounts} {account_no}组长{dc_iid} 开始组队-------') 346 | 347 | # 创建除了当前队长之外的账号列表 348 | other_accounts = [t.split('#')[2] for t in tokens if t.split('#')[2] != account_no] 349 | 350 | # 根据 dhzdsx 的值决定队友选择方式 351 | if dhzdsx == 1: 352 | random.shuffle(other_accounts) # 如果 dhzdsx 为 1,随机排序队友 353 | 354 | # 尝试与排序后的其他账号组队 355 | for zd_account_no in other_accounts: 356 | if zd_account_no in accounts_with_teams: 357 | result = post_join_team(dc_iid, [part for part in tokens if part.split('#')[2] == zd_account_no][0].split('#')[0], zd_account_no) 358 | if result == "yddm": 359 | accounts_with_teams.remove(zd_account_no) # 移除已用完次数的账号 360 | elif result is False: 361 | break # 如果组长没有次数,终止循环 362 | 363 | print("所有账号的组队操作完成") 364 | 365 | for i in range(total_accounts): 366 | parts = tokens[i].split('#') 367 | account_token = parts[0] 368 | account_no = parts[2] 369 | 370 | # 查看奖品 371 | print() 372 | print(f'------账号 {i+1}/{total_accounts} {account_no} 查看奖品-------') 373 | cj_cash = cj_prizes(account_token, 1) 374 | zd_cash = zd_prize(account_token) 375 | 376 | #print(f"账号 {account_no} 抽奖现金红包金额:{cj_cash}元") 377 | #print(f"账号 {account_no} 组队现金红包金额:{zd_cash}元") 378 | #print(f"账号 {account_no} 总计现金红包金额:{cj_cash + zd_cash}元") 379 | print(f"账号 {account_no} 抽奖{round(cj_cash, 2)}元 组队{round(zd_cash, 2)}元 总计:{round(cj_cash + zd_cash, 2)}元") 380 | 381 | 382 | if __name__ == "__main__": 383 | main() 384 | -------------------------------------------------------------------------------- /dewu.js: -------------------------------------------------------------------------------- 1 | /* 2 | 得物签到 v1.0 3 | 4 | 任务: 浇水 签到 领取水滴 气泡水滴 5 | export dwnc_data='token @ token' 6 | 多账号用 换行 或 @ 分割 7 | 8 | cron 55 10 * * * 9 | */ 10 | 11 | const $ = new Env("得物签到"); 12 | const ckName = "dwnc_data"; 13 | //-------------------- 一般不动变量区域 ------------------------------------- 14 | const notify = $.isNode() ? require("./sendNotify") : ""; 15 | const Notify = 1; //0为关闭通知,1为打开通知,默认为1 16 | //let debug = 0; //Debug调试 0关闭 1开启 17 | let envSplitor = ["@", "\n"]; //多账号分隔符 18 | let ck = msg = ''; //let ck,msg 19 | let host, hostname; 20 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 21 | let jstoken = ($.isNode() ? process.env.jstoken : $.getdata(jstoken)) || ''; 22 | let userList = []; 23 | let userIdx = 0; 24 | let userCount = 0; 25 | //---------------------- 自定义变量区域 ----------------------------------- 26 | //--------------------------------------------------------- 27 | 28 | async function start() { 29 | //逻辑处理 30 | //0.先查询农场树木信息 水滴信息 31 | //1.先查询列表 做任务, 领取任务数量奖励 32 | //2.查询农场剩余水滴且浇水 ,领取浇水数量奖励 33 | //3.查询最后还剩百分之几(浇水几次完成) 34 | // 未加 累计浇水奖励 累计任务数目奖励 35 | //未抓包 完成浏览任务奖励 36 | //利用return 返回userList来作为内部互助条件 37 | 38 | console.log('\n================== 签到 ==================\n'); 39 | taskall = []; 40 | for (let user of userList) { 41 | taskall.push(await user.sign()); 42 | //await wait(1); //延迟 43 | } 44 | await Promise.all(taskall); 45 | } 46 | 47 | class UserInfo { 48 | constructor(str) { 49 | this.index = ++userIdx; 50 | this.data = str.split('&'); 51 | this.SK = str.split('&')[0]; 52 | this.shumeiId = str.split('&')[1]; 53 | this.x_auth_token = str.split('&')[2].replace("Bearer", ""); 54 | this.uuid = str.split('&')[3]; 55 | this.deviceId = str.split('&')[3]; 56 | this.duToken = str.split('&')[4]; 57 | this.cookieToken = str.split('&')[4]; 58 | this.Cookie = str.split('&')[4]; 59 | //let ck = str.split('&') 60 | //this.data1 = ck[0] 61 | this.host = "app.dewu.com"; 62 | this.hostname = "https://" + this.host; 63 | 64 | this.headersPost = { 65 | 'Host': this.host, 66 | 'Connection': 'keep-alive', 67 | 'ua': 'duapp/5.4.5(android;10)', 68 | 'SK': this.SK, 69 | 'shumeiId': this.shumeiId, 70 | 'deviceTrait': 'MI+8+Lite', 71 | 'x-auth-token': "Bearer " + this.x_auth_token, 72 | 'platform': 'h5', 73 | 'uuid': this.uuid, 74 | 'channel': 'xiaomi', 75 | 'isProxy': '0', 76 | 'duToken': this.duToken, 77 | 'deviceId': this.deviceId, 78 | 'emu': '0', 79 | 'cookieToken': this.cookieToken, 80 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36/duapp/5.4.5(android;10)', 81 | 'Content-Type': 'application/json', 82 | 'isRoot': '0', 83 | 'imei': '', 84 | 'appid': 'h5', 85 | 'appVersion': '5.4.5', 86 | 'Accept': '*/*', 87 | 'Origin': 'https://cdn-m.dewu.com', 88 | 'X-Requested-With': 'com.shizhuang.duapp', 89 | 'Sec-Fetch-Site': 'same-site', 90 | 'Sec-Fetch-Mode': 'cors', 91 | 'Sec-Fetch-Dest': 'empty', 92 | 'Referer': 'https://cdn-m.dewu.com/h5-growth/wish-tree?navControl=1&&source=appHome', 93 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 94 | 'Cookie': this.Cookie, 95 | 'content-type': 'application/json' 96 | }; 97 | this.headersGet = { 98 | 'Host': this.host, 99 | 'Connection': 'keep-alive', 100 | 'ua': 'duapp/5.4.5(android;10)', 101 | 'SK': this.SK, 102 | 'shumeiId': this.shumeiId, 103 | 'deviceTrait': 'MI+8+Lite', 104 | 'x-auth-token': "Bearer " + this.x_auth_token, 105 | 'platform': 'h5', 106 | 'uuid': this.uuid, 107 | 'channel': 'xiaomi', 108 | 'isProxy': '0', 109 | 'duToken': this.duToken, 110 | 'deviceId': this.deviceId, 111 | 'emu': '0', 112 | 'cookieToken': this.cookieToken, 113 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36/duapp/5.4.5(android;10)', 114 | 'isRoot': '0', 115 | 'imei': '', 116 | 'appid': 'h5', 117 | 'appVersion': '5.4.5', 118 | 'Accept': '*/*', 119 | 'Origin': 'https://cdn-m.dewu.com', 120 | 'X-Requested-With': 'com.shizhuang.duapp', 121 | 'Sec-Fetch-Site': 'same-site', 122 | 'Sec-Fetch-Mode': 'cors', 123 | 'Sec-Fetch-Dest': 'empty', 124 | 'Referer': 'https://cdn-m.dewu.com/h5-growth/wish-tree?navControl=1&&source=appHome', 125 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 126 | 'Cookie': this.Cookie, 127 | 'content-type': 'application/json' 128 | } 129 | } 130 | 131 | 132 | async sign() { 133 | try { 134 | const options = { 135 | url: `https://app.dewu.com/hacking-game-center/v1/sign/sign?sign=fe26befc49444d362c8f17463630bdba`, 136 | headers: this.headersPost, 137 | body: `{}` 138 | } 139 | //console.log(options); 140 | let result = await httpRequest(options); 141 | //console.log(result); 142 | if (result.code == 200) { 143 | console.log(`账号${this.index}签到成功`); 144 | } else { 145 | console.log(`账号${this.index}签到失败`); 146 | //console.log(result); 147 | } 148 | } catch (e) { 149 | console.log(e); 150 | } 151 | } 152 | 153 | async task_list() { 154 | try { 155 | const options = { 156 | url: `https://app.dewu.com/hacking-game-center/v1/sign/task_list?sign=fe26befc49444d362c8f17463630bdba`, 157 | headers: this.headersGet, 158 | } 159 | //console.log(options); 160 | let result = await httpRequest(options); 161 | //console.log(result); 162 | if (result.code == 200) { 163 | //console.log(`result.data`); 164 | let data = result.data 165 | } else { 166 | console.log(`账号${this.index}签到失败`); 167 | //console.log(result); 168 | } 169 | } catch (e) { 170 | console.log(e); 171 | } 172 | } 173 | } 174 | 175 | !(async () => { 176 | if (!(await checkEnv())) return; 177 | if (userList.length > 0) { 178 | await start(); 179 | } 180 | await SendMsg(msg); 181 | })() 182 | .catch((e) => console.log(e)) 183 | .finally(() => $.done()); 184 | 185 | async function checkEnv() { 186 | if (userCookie) { 187 | // console.log(userCookie); 188 | let e = envSplitor[0]; 189 | for (let o of envSplitor) 190 | if (userCookie.indexOf(o) > -1) { 191 | e = o; 192 | break; 193 | } 194 | for (let n of userCookie.split(e)) n && userList.push(new UserInfo(n)); 195 | userCount = userList.length; 196 | } else { 197 | console.log("未找到CK"); 198 | return; 199 | } 200 | return console.log(`共找到${userCount}个账号`), true;//true == !0 201 | } 202 | function local_hours() { 203 | let myDate = new Date(); 204 | let h = myDate.getHours(); 205 | return h; 206 | } 207 | function randomszdx(e) { 208 | e = e || 32; 209 | var t = "QWERTYUIOPASDFGHJKLZXCVBNM1234567890", 210 | a = t.length, 211 | n = ""; 212 | 213 | for (i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a)); 214 | return n; 215 | } 216 | function changeCode(oldoptions) { 217 | let newoptions = new Object(), 218 | urlTypeArr = ['qs', 'params'], 219 | bodyTypeArr = ['body', 'data', 'form', 'formData'] 220 | for (let e in urlTypeArr) { 221 | urlTypeArr[e] in oldoptions ? newoptions.url = changeUrl(urlTypeArr[e]) : newoptions.url = oldoptions.url 222 | } 223 | 'content-type' in oldoptions.headers ? newoptions.headers = changeHeaders(oldoptions.headers) : newoptions.headers = oldoptions.headers 224 | function changeUrl(type) { 225 | url = oldoptions.url + '?' 226 | for (let key in oldoptions[type]) { url += key + '=' + oldoptions[type][key] + '&' } 227 | url = url.substring(0, url.length - 1) 228 | return url 229 | } 230 | function changeHeaders(headers) { 231 | let tmp = headers['content-type'] 232 | delete headers['content-type'] 233 | headers['Content-Type'] = tmp 234 | return headers 235 | } 236 | for (let o in bodyTypeArr) { 237 | if (bodyTypeArr[o] in oldoptions) { 238 | (Object.prototype.toString.call(oldoptions[bodyTypeArr[o]]) === '[object Object]') ? newoptions.body = JSON.stringify(oldoptions[bodyTypeArr[o]]) : newoptions.body = oldoptions[bodyTypeArr[o]] 239 | } 240 | } 241 | return newoptions 242 | } 243 | function httpRequest(options, method) { 244 | //options = changeCode(options) 245 | typeof (method) === 'undefined' ? ('body' in options ? method = 'post' : method = 'get') : method = method 246 | return new Promise((resolve) => { 247 | $[method](options, (err, resp, data) => { 248 | try { 249 | if (err) { 250 | console.log(`${method}请求失败`); 251 | //console.log(JSON.parse(err)); 252 | $.logErr(err); 253 | //throw new Error(err); 254 | //console.log(err); 255 | } else { 256 | //httpResult = data; 257 | //httpResponse = resp; 258 | if (data) { 259 | //console.log(data); 260 | data = JSON.parse(data); 261 | resolve(data) 262 | } else { 263 | console.log(`请求api返回数据为空,请检查自身原因`) 264 | } 265 | } 266 | } catch (e) { 267 | //console.log(e, resp); 268 | $.logErr(e, resp); 269 | } finally { 270 | resolve(); 271 | } 272 | }) 273 | }) 274 | } 275 | function DoubleLog(data) { if ($.isNode()) { if (data) { console.log(`${data}`); msg += `${data}` } } else { console.log(`${data}`); msg += `${data}` } } 276 | async function SendMsg(message) { if (!message) return; if (Notify > 0) { if ($.isNode()) { var notify = require("./sendNotify"); await notify.sendNotify($.name, message) } else { $.msg($.name, '', message) } } else { console.log(message) } } 277 | function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } 278 | -------------------------------------------------------------------------------- /elm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # new Env('萝卜-饿了么'); 3 | # 环境变量 elmck 值:SID=xxxx; cookie2=xxxx; (按格式来) 4 | #pwd 5 | 6 | eval "rm -rf ./ELM" 7 | 8 | _ftype="" 9 | get_arch=`arch` 10 | echo $get_arch 11 | if [[ $get_arch =~ "x86_64" ]];then 12 | _ftype="amd64" 13 | elif [[ $get_arch =~ "x86" ]];then 14 | _ftype="386" 15 | elif [[ $get_arch =~ "i386" ]];then 16 | _ftype="386" 17 | elif [[ $get_arch =~ "aarch64" ]];then 18 | _ftype="arm64" 19 | elif [[ $get_arch =~ "arm" ]];then 20 | _ftype="arm" 21 | else 22 | _ftype="" 23 | fi 24 | 25 | download_elm(){ 26 | echo "开始下载elm二进制文件到$PWD/ELM目录" 27 | curl -sS -o $PWD/ELM/elm-$_ftype --create-dirs https://github.kemeng.online/https://raw.githubusercontent.com/lu0b0/ELM/main/ELM/elm-$_ftype 28 | echo "下载完成,如需重新下载或更新请先删除该文件" 29 | if [ -f "$PWD/ELM/elm-$_ftype" ]; then 30 | echo "$PWD/ELM/elm-$_ftype" 31 | eval "chmod +x ./ELM/elm-$_ftype" 32 | eval "./ELM/elm-$_ftype -t elm" 33 | fi 34 | } 35 | 36 | if [ $_ftype == "" ]; then 37 | echo "不支持的架构$get_arch" 38 | else 39 | echo "执行$_ftype" 40 | if [ -f "$PWD/ELM/elm-$_ftype" ]; then 41 | echo "$PWD/ELM/elm-$_ftype" 42 | eval "chmod +x ./ELM/elm-$_ftype" 43 | eval "./ELM/elm-$_ftype -t elm" 44 | elif [ -f "$PWD/elm-$_ftype" ]; then 45 | echo "$PWD/elm-$_ftype" 46 | eval "chmod +x $PWD/elm-$_ftype" 47 | eval "$PWD/elm-$_ftype -t elm" 48 | else 49 | echo "在$PWD/ELM目录、$PWD目录下均未找到文件elm-$_ftype,尝试拉取远程仓库文件elm-$_ftype" 50 | download_elm 51 | fi 52 | fi -------------------------------------------------------------------------------- /ghdy.py: -------------------------------------------------------------------------------- 1 | """ 2 | 歌画东阳 v1.0 3 | 4 | 抓包域名: fijdzpur.act.tmuact.com 或者 wallet.act.tmuact.com 5 | 变量 account_id的值#session_id的值, 多账户& 6 | export bd_ghdy="" 7 | 8 | cron: 2 10 * * * 9 | const $ = new Env("歌画东阳"); 10 | """ 11 | 12 | import hashlib 13 | import random 14 | import string 15 | import time 16 | import requests 17 | from os import environ, path 18 | from functools import partial 19 | 20 | def get_environ(key, default="", output=True): 21 | def no_read(): 22 | if output: 23 | print(f"未填写环境变量 {key} 请添加") 24 | return default 25 | return environ.get(key) if environ.get(key) else no_read() 26 | 27 | def generate_random_string(length): 28 | letters_and_digits = string.ascii_lowercase + string.digits 29 | return ''.join(random.choice(letters_and_digits) for i in range(length)) 30 | 31 | class Ghdy: 32 | def __init__(self, ck): 33 | self.session = ck[1] 34 | self.account = ck[0] 35 | self.id_list = [] 36 | self.msg = '' 37 | 38 | def login(self): 39 | try: 40 | a8 = generate_random_string(8) 41 | b4 = generate_random_string(4) 42 | c4 = generate_random_string(4) 43 | d4 = generate_random_string(4) 44 | e12 = generate_random_string(12) 45 | request = f'{a8}-{b4}-{c4}-{d4}-{e12}' 46 | current_timestamp = int(time.time() * 1000) 47 | sha = f'/api/user_mumber/account_detail&&{self.session}&&{request}&&{current_timestamp}&&FR*r!isE5W&&49' 48 | sha256 = hashlib.sha256() 49 | sha256.update(sha.encode('utf-8')) 50 | signature = sha256.hexdigest() 51 | time.sleep(0.5) 52 | url = "https://vapp.tmuyun.com/api/user_mumber/account_detail" 53 | headers = {'X-SESSION-ID': self.session, 'X-REQUEST-ID': f'{request}', 'X-TIMESTAMP': f'{current_timestamp}', 54 | 'X-SIGNATURE': f'{signature}', 'X-TENANT-ID': '49', 'User-Agent': '5.0.7.0.0;00000000-699e-0680-0000-000055f72c53;Xiaomi Redmi Note 8 Pro;Android;11;Release', 'X-ACCOUNT-ID': self.account, 55 | 'Cache-Control': 'no-cache', 'Host': 'vapp.tmuyun.com', 'Connection': 'Keep-Alive', 56 | 'Accept-Encoding': 'gzip'} 57 | r = requests.get(url, headers=headers) 58 | if r.json()['message'] == 'success': 59 | xx = f'🚀登录成功:{r.json()["data"]["rst"]["nick_name"]}' 60 | self.msg += xx + '\n' 61 | print(xx) 62 | elif '无效' in r.json()['message']: 63 | xx = f'⛔️登录失败:{r.json()["message"]}' 64 | self.msg += xx + '\n' 65 | print(xx) 66 | except Exception as e: 67 | print(e) 68 | 69 | def get_id(self): 70 | try: 71 | a8 = generate_random_string(8) 72 | b4 = generate_random_string(4) 73 | c4 = generate_random_string(4) 74 | d4 = generate_random_string(4) 75 | e12 = generate_random_string(12) 76 | request = f'{a8}-{b4}-{c4}-{d4}-{e12}' 77 | current_timestamp = int(time.time() * 1000) 78 | sha = f'/api/article/channel_list&&{self.session}&&{request}&&{current_timestamp}&&FR*r!isE5W&&49' 79 | sha256 = hashlib.sha256() 80 | sha256.update(sha.encode('utf-8')) 81 | signature = sha256.hexdigest() 82 | headers = {'X-SESSION-ID': self.session, 'X-REQUEST-ID': f'{request}', 'X-TIMESTAMP': f'{current_timestamp}', 83 | 'X-SIGNATURE': f'{signature}', 'X-TENANT-ID': '49', 'User-Agent': '5.0.7.0.0;00000000-699e-0680-0000-000055f72c53;Xiaomi Redmi Note 8 Pro;Android;11;Release', 'X-ACCOUNT-ID': self.account, 84 | 'Cache-Control': 'no-cache', 'Host': 'vapp.tmuyun.com', 'Connection': 'Keep-Alive', 85 | 'Accept-Encoding': 'gzip'} 86 | params = {'channel_id': '6254f12dfe3fc10794f7b25c', 'isDiFangHao': 'false', 'is_new': 'true', 87 | 'list_count': '0', 'size': '20'} 88 | r = requests.get('https://vapp.tmuyun.com/api/article/channel_list', params=params, headers=headers) 89 | if r.json()['message'] == 'success': 90 | r_list = r.json()['data']['article_list'] 91 | a = 5 92 | for i in r_list: 93 | a += 1 94 | self.id_list.append(i['id']) 95 | random.shuffle(self.id_list) 96 | if self.id_list: 97 | xx = "✅文章加载成功" 98 | self.msg += xx + '\n' 99 | print(xx) 100 | elif '不存在' in r.json()['message']: 101 | xx = f'⛔️文章加载失败:{r.json()["message"]}' 102 | print(xx) 103 | self.msg += xx + '\n' 104 | else: 105 | xx = f'⛔️请求异常:{r.json()["message"]}' 106 | print(xx) 107 | self.msg += xx + '\n' 108 | except Exception as e: 109 | print(e) 110 | 111 | def look(self): 112 | try: 113 | for params_id in self.id_list[:6]: 114 | a8 = generate_random_string(8) 115 | b4 = generate_random_string(4) 116 | c4 = generate_random_string(4) 117 | d4 = generate_random_string(4) 118 | e12 = generate_random_string(12) 119 | request = f'{a8}-{b4}-{c4}-{d4}-{e12}' 120 | current_timestamp = int(time.time() * 1000) 121 | sha = f'/api/article/detail&&{self.session}&&{request}&&{current_timestamp}&&FR*r!isE5W&&49' 122 | sha256 = hashlib.sha256() 123 | sha256.update(sha.encode('utf-8')) 124 | signature = sha256.hexdigest() 125 | url = 'https://vapp.tmuyun.com/api/article/detail' 126 | headers = {'X-SESSION-ID': self.session, 'X-REQUEST-ID': f'{request}', 'X-TIMESTAMP': f'{current_timestamp}', 127 | 'X-SIGNATURE': f'{signature}', 'X-TENANT-ID': '49', 'User-Agent': '5.0.7.0.0;00000000-699e-0680-0000-000055f72c53;Xiaomi Redmi Note 8 Pro;Android;11;Release', 'X-ACCOUNT-ID': self.session, 128 | 'Cache-Control': 'no-cache', 'Host': 'vapp.tmuyun.com', 'Connection': 'Keep-Alive', 129 | 'Accept-Encoding': 'gzip'} 130 | params = {'id': params_id} 131 | r = requests.get(url, params=params, headers=headers) 132 | if r.json()['message'] == 'success': 133 | xx = f'✅浏览《{r.json()["data"]["article"]["list_title"]}》成功✅' 134 | print(xx) 135 | self.msg += xx + '\n' 136 | time.sleep(3) 137 | elif '不存在' in r.json()['message']: 138 | xx = f'⛔️浏览失败:{r.json()["message"]}' 139 | print(xx) 140 | self.msg += xx + '\n' 141 | else: 142 | xx = f'⛔️浏览异常:{r.json()["message"]}' 143 | print(xx) 144 | self.msg += xx + '\n' 145 | xx = '✅浏览完成,准备抽红包吧!' 146 | print(xx) 147 | self.msg += xx + '\n' 148 | except Exception as e: 149 | print(e) 150 | 151 | def chou(self): 152 | try: 153 | url = 'https://fijdzpur.act.tmuact.com/activity/api.php' 154 | headers = {'Host': 'fijdzpur.act.tmuact.com', 'Connection': 'keep-alive', 'Pragma': 'no-cache', 155 | 'Cache-Control': 'no-cache', 'Accept': 'application/json, text/plain, */*', 156 | 'X-Requested-With': 'XMLHttpRequest', 'User-Agent': 'Mozilla/5.0 (Linux; Android 11; Redmi Note 8 Pro Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36;xsb_dongyang;xsb_dongyang;5.0.7.0.0;native_app', 157 | 'Content-Type': 'application/x-www-form-urlencoded', 'Origin': 'https://fijdzpur.act.tmuact.com', 158 | 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Dest': 'empty', 159 | 'Referer': 'https://fijdzpur.act.tmuact.com/money/index/index.html', 160 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'} 161 | data = {'m': 'front', 'subm': 'money', 'action': 'open', 'account_id': self.account, 'session_id': self.session, 162 | 'token': '', 'q': 'YunSLfAkU'} 163 | r = requests.post(url, headers=headers, data=data) 164 | if r.json()['status']: 165 | xx = f'✅抽奖成功:{r.json()["data"]["name"]}' 166 | print(xx) 167 | self.msg += xx + '\n' 168 | time.sleep(3) 169 | self.tx() 170 | elif not r.json()['status']: 171 | if '已完' in r.json()['msg']: 172 | xx = f'❌{r.json()["msg"]}' 173 | print(xx) 174 | self.msg += xx + '\n' 175 | time.sleep(3) 176 | self.tx() 177 | elif '阅读' in r.json()['msg']: 178 | xx = f'❌{r.json()["msg"]},即将开始阅读。' 179 | print(xx) 180 | self.msg += xx + '\n' 181 | self.get_id() 182 | self.look() 183 | self.chou() 184 | else: 185 | xx = f'❌{r.json()["msg"]}' 186 | print(xx) 187 | self.msg += xx + '\n' 188 | except Exception as e: 189 | print(e) 190 | 191 | def tx(self): 192 | url = "https://wallet.act.tmuact.com/activity/api.php" 193 | data = {'m': 'front', 'subm': 'money_wallet', 'action': 'commonchange', 'account_id': self.account, 194 | 'session_id': self.session, 'app': 'XSB_DONGYANG'} 195 | h = {'Host': 'fijdzpur.act.tmuact.com', 'Connection': 'keep-alive', 'Pragma': 'no-cache', 196 | 'Cache-Control': 'no-cache', 'Accept': 'application/json, text/plain, */*', 'X-Requested-With': 'XMLHttpRequest', 197 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 11; Redmi Note 8 Pro Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.141 Mobile Safari/537.36;xsb_dongyang;xsb_dongyang;5.0.7.0.0;native_app', 198 | 'Content-Type': 'application/x-www-form-urlencoded', 'Origin': 'https://fijdzpur.act.tmuact.com', 199 | 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Dest': 'empty', 200 | 'Referer': 'https://fijdzpur.act.tmuact.com/money/index/index.html', 201 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'} 202 | r = requests.post(url, headers=h, data=data) 203 | if r.json()['status']: 204 | xx = f'✅提现!{r.json()["msg"]}!' 205 | print(xx) 206 | else: 207 | xx = f'❌{r.json()["msg"]}' 208 | print(xx) 209 | 210 | if __name__ == '__main__': 211 | print = partial(print, flush=True) 212 | token = get_environ("bd_ghdy") 213 | cks = token.split("&") 214 | print("🔔检测到{}个ck记录\n🔔开始歌画东阳任务".format(len(cks))) 215 | for ck_all in cks: 216 | ck = ck_all.split("#") 217 | run = Ghdy(ck) 218 | print() 219 | run.login() 220 | run.chou() 221 | -------------------------------------------------------------------------------- /kjwj.py: -------------------------------------------------------------------------------- 1 | """ 2 | 科技玩家 v1.0 3 | 4 | 任务:签到 5 | 6 | 账号&密码填到变量 kjwj 中, 多账号#隔开 7 | export kjwj="" 8 | 9 | cron: 16 8,10 * * * 10 | const $ = new Env("科技玩家"); 11 | """ 12 | 13 | import os 14 | import sys 15 | import requests 16 | import json 17 | import time 18 | 19 | class KejiWanjiaSign: 20 | def __init__(self, username, password): 21 | self.username = username 22 | self.password = password 23 | 24 | def sign(self): 25 | url = 'https://www.kejiwanjia.net/wp-json/jwt-auth/v1/token' 26 | headers = { 27 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.42', 28 | 'origin': 'https://www.kejiwanjia.net', 29 | 'referer': 'https://www.kejiwanjia.net/' 30 | } 31 | data = { 32 | 'username': self.username, 33 | 'password': self.password 34 | } 35 | html = requests.post(url=url, headers=headers, data=data) 36 | result = json.loads(html.text) 37 | name = result['name'] 38 | token = result['token'] 39 | check_url = 'https://www.kejiwanjia.net/wp-json/b2/v1/getUserMission' 40 | sign_url = 'https://www.kejiwanjia.net/wp-json/b2/v1/userMission' 41 | sign_headers = { 42 | 'Host': 'www.kejiwanjia.net', 43 | 'Connection': 'keep-alive', 44 | 'Accept': 'application/json, text/plain, */*', 45 | 'authorization': 'Bearer ' + token, 46 | 'cookie': 'b2_token=' + token + ';', 47 | 'Content-Type': 'application/x-www-form-urlencoded', 48 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.42' 49 | } 50 | html_1 = requests.post(url=check_url, headers=sign_headers) 51 | imfo_1 = json.loads(html_1.text) 52 | if imfo_1['mission']['credit'] == 0: 53 | print(f"🔁账号 {self.username} | {name}") 54 | print("⚠️还未签到 开始签到") 55 | html_2 = requests.post(url=sign_url, headers=sign_headers) 56 | imfo_2 = json.loads(html_2.text) 57 | print(f"✅签到成功 获得{imfo_2['mission']['credit']}积分") 58 | else: 59 | print(f"🔁帐号 {self.username} | {name}") 60 | print(f"✅今天已经签到 获得{imfo_1['mission']['credit']}积分") 61 | 62 | def run(self): 63 | # 任务列表 64 | tasks = [ 65 | ("签到任务", self.sign) 66 | ] 67 | # 执行任务 68 | for task_name, task_function in tasks: 69 | print(f'🔁{self.username} | 正在执行任务 | {task_name}') 70 | result = task_function() 71 | time.sleep(5) 72 | print('*****************************************') 73 | 74 | if __name__ == '__main__': 75 | print('🔔科技玩家 | 开始') 76 | #检测账户变量 77 | kjwj = os.environ.get("kjwj") 78 | if not kjwj or "&" not in kjwj: 79 | sys.exit("⚠️未发现有效账号,退出程序!") 80 | #分割账户 81 | accounts = [acc.split('&') for acc in kjwj.split('#')] 82 | # 遍历账户列表 | 为每个账户创建一个类实例并执行任务 83 | for username, password in accounts: 84 | kejiwanjia_sign = KejiWanjiaSign(username, password) 85 | kejiwanjia_sign.run() -------------------------------------------------------------------------------- /ksdt.py: -------------------------------------------------------------------------------- 1 | """ 2 | 快手答题 v1.0 3 | 4 | 自行捉包, 游戏页面, 抓包搜关键词game 5 | 把域名请求头里的cookie和ua填到变量 ksdt 中, 多账号&隔开 6 | export ksdt="cookie#ua" 7 | 8 | cron: 26 8,18 * * * 9 | const $ = new Env("快手答题"); 10 | """ 11 | 12 | import time 13 | import requests 14 | import random 15 | import os 16 | import json 17 | import sys 18 | 19 | # server data 20 | IP1 = "119.29.118.112:20238" 21 | IP2 = "authentication.pearsons.live:35003" 22 | 23 | # get environment variable 24 | def ger_env(key): 25 | cookies = os.getenv(key) 26 | if cookies: 27 | cookies = cookies.split("&") 28 | return cookies 29 | else: 30 | print("获取账号失败") 31 | sys.stdout.flush() 32 | 33 | # print account 34 | def printf(text): 35 | print(f"[账号{i}]-{text}") 36 | sys.stdout.flush() 37 | 38 | # Kwai answer clase 39 | class KS: 40 | # initialization 41 | def __init__(self, cookie): 42 | cookie_list = cookie.split("#") 43 | self.cookie = cookie_list[0] 44 | self.ua = cookie_list[1] 45 | # Kwai answer run 46 | def run(self): 47 | roundId, index, question, options = self.get_question() 48 | while roundId: 49 | time.sleep(0.5) 50 | answer_index = self.search(question, options) 51 | time.sleep(random.randint(3, 5)) 52 | roundId, index, question, options = self.reply(roundId, index, question, options, answer_index) 53 | if roundId is None: 54 | break 55 | # get Kwai answer topic 56 | def get_question(self): 57 | url = "https://encourage.kuaishou.com/rest/n/encourage/game/quiz/round/kickoff?reKickoff=false&sigCatVer=1" 58 | header = { 59 | "Host": "encourage.kuaishou.com", 60 | "User-Agent": self.ua, 61 | "X-Requested-With": "com.kuaishou.nebula", 62 | "Sec-Fetch-Site": "same-origin", 63 | "Sec-Fetch-Dest": "empty", 64 | "Cookie": self.cookie, 65 | "content-type": "application/x-www-form-urlencoded;charset=UTF-8" 66 | } 67 | try: 68 | response = requests.get(url=url, headers=header) 69 | if response.json().get("result") == 1 and response.json().get("data").get("roundId"): 70 | roundId = response.json().get("data").get("roundId") 71 | questionDetail = response.json().get("data").get("questionDetail") 72 | index = questionDetail.get("index") 73 | question = questionDetail.get("question") 74 | options = questionDetail.get("options") 75 | current_amount = response.json().get("data").get("amount").get("current") 76 | printf(f"当前金币 | {current_amount}") 77 | sys.stdout.flush() 78 | printf(f"开始答题 | {question}") 79 | sys.stdout.flush() 80 | printf(f"选项 | {options}") 81 | sys.stdout.flush() 82 | return roundId, index, question, options 83 | elif response.json().get("result") == 103703: 84 | printf("今日题目已答完") 85 | sys.stdout.flush() 86 | printf(f"-----------------------------------------") 87 | sys.stdout.flush() 88 | return None, None, None, None 89 | except: 90 | print("未知错误") 91 | sys.stdout.flush() 92 | return None, None, None, None 93 | 94 | # search Kwai answer server 95 | def search(self, question, options): 96 | try: 97 | printf("开始数据库查找答案") 98 | sys.stdout.flush() 99 | url1 = f"http://{IP1}/search?question={question}" 100 | url2 = f"http://{IP2}/search?question={question}" 101 | response1 = requests.get(url=url1) 102 | if response1.json().get("status") == "200": 103 | printf("找到答案了") 104 | sys.stdout.flush() 105 | answer = response1.json().get("content") 106 | answer_index = options.index(answer) 107 | return answer_index 108 | else: 109 | response2 = requests.get(url=url2) 110 | if response2.json().get("status") == "200": 111 | printf("找到答案啦") 112 | sys.stdout.flush() 113 | answer = response2.json().get("content") 114 | answer_index = options.index(answer) 115 | self.upload(IP1, question, answer) 116 | return answer_index 117 | else: 118 | printf("没有找到答案,随便选一个吧") 119 | sys.stdout.flush() 120 | return 4 121 | except: 122 | return 4 123 | 124 | # reply Kwai answer server 125 | def reply(self, roundId, index, question, options, answer_index): 126 | url = "https://encourage.kuaishou.com/rest/n/encourage/game/quiz/round/answer/upload?sigCatVer=1" 127 | header = { 128 | "Host": "encourage.kuaishou.com", 129 | "User-Agent": self.ua, 130 | "Accept": "*/*", 131 | "Origin": "https://encourage.kuaishou.com", 132 | "X-Requested-With": "com.kuaishou.nebula", 133 | "Sec-Fetch-Site": "same-origin", 134 | "Sec-Fetch-Mode": "cors", 135 | "Sec-Fetch-Dest": "empty", 136 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7", 137 | "Cookie": self.cookie, 138 | "content-type": "application/json" 139 | } 140 | payload = { 141 | "roundId": roundId, 142 | "index": index, 143 | "answer": answer_index 144 | } 145 | if answer_index == 4: 146 | payload = { 147 | "roundId": roundId, 148 | "index": index, 149 | "answer": random.randint(0, 3) 150 | } 151 | payload = json.dumps(payload) 152 | response = requests.post(url=url, headers=header, data=payload) 153 | if answer_index == 4: 154 | question = question 155 | correctAnswerIndex = response.json().get("data").get("answerDetail").get("correctAnswerIndex") 156 | correct_answer = options[correctAnswerIndex] 157 | self.upload(IP1, question, correct_answer) 158 | time.sleep(0.5) 159 | if response.json().get("data").get("answerDetail").get("correct") and response.json().get("result") == 1: 160 | amount = response.json().get("data").get("amount").get("reward") 161 | current_amount = response.json().get("data").get("amount").get("current") 162 | printf(f"第[{int(index) + 1}]题回答正确 | 获取金币{amount} | 当前金币{current_amount}") 163 | sys.stdout.flush() 164 | printf(f"-----------------------------------------") 165 | sys.stdout.flush() 166 | if index == 9: 167 | return None, None, None, None 168 | else: 169 | questionDetail = response.json().get("data").get("nextQuestionDetail").get("questionDetail") 170 | index = questionDetail.get("index") 171 | roundId = response.json().get("data").get("nextQuestionDetail").get("roundId") 172 | question = questionDetail.get("question") 173 | options = questionDetail.get("options") 174 | printf(f"开始答题 | {question}") 175 | sys.stdout.flush() 176 | printf(f"选项 | {options}") 177 | sys.stdout.flush() 178 | return roundId, index, question, options 179 | else: 180 | printf(f"第[{int(index) + 1}]题回答错误") 181 | sys.stdout.flush() 182 | printf(f"-----------------------------------------") 183 | sys.stdout.flush() 184 | return None, None, None, None 185 | 186 | # update Kwai answer server 187 | def upload(self, ip, question, answer): 188 | try: 189 | printf("开始上传题目和答案") 190 | sys.stdout.flush() 191 | url = f"http://{ip}/upload" 192 | payload = { 193 | "question": question, 194 | "answer": answer 195 | } 196 | response = requests.post(url=url, data=payload) 197 | if response.json().get("status") == 200: 198 | printf("上传成功") 199 | sys.stdout.flush() 200 | except: 201 | pass 202 | 203 | 204 | if __name__ == "__main__": 205 | cookies = ger_env("ksdt") 206 | num_accounts = len(cookies) 207 | print(f"快手答题共获取到{num_accounts}个账号\n") 208 | i = 0 209 | for cookie in cookies: 210 | i += 1 211 | KS(cookie).run() -------------------------------------------------------------------------------- /ksjsb.py: -------------------------------------------------------------------------------- 1 | """ 2 | 快手极速版-周周赚 v1.0 3 | 4 | 任务:助力 5 | 6 | export ksjsbck='被助力的ck' 7 | export ksjsb_code="帮你助力的ck" 8 | 9 | cron: 16 8 * * * 10 | const $ = new Env("快手极速版-周周赚"); 11 | """ 12 | 13 | import json 14 | import os 15 | import time 16 | import urllib.parse 17 | import urllib.request 18 | import requests 19 | import urllib3 20 | from datetime import datetime 21 | 22 | urllib3.disable_warnings() 23 | 24 | 25 | # 获取账号信息 26 | def getInformation(can_cookie): 27 | url = "https://nebula.kuaishou.com/rest/n/nebula/activity/earn/overview/basicInfo" 28 | headers = {'User-Agent': Agent, 'Accept': '*/*', 'Accept-Language': ' zh-CN,zh;q=0.9', 'Cookie': can_cookie} 29 | request = urllib.request.Request(url=url, headers=headers) 30 | response = urllib.request.urlopen(request) 31 | str_result = response.read().decode('UTF-8') 32 | arr_json = json.loads(str_result) 33 | arr_result = { 34 | 'code': -1 35 | } 36 | try: 37 | arr_result = { 38 | 'code': arr_json['result'], 39 | 'data': { 40 | 'nickname': str(arr_json['data']['userData']['nickname']), 41 | 'cah': str(arr_json['data']['totalCash']), 42 | 'coin': str(arr_json['data']['totalCoin']) 43 | } 44 | } 45 | except TypeError as reason: 46 | print("获取信息出错啦" + str(reason) + str_result) 47 | 48 | return arr_result 49 | 50 | 51 | # 开宝箱 52 | def openBox(can_cookie, name): 53 | url = "https://nebula.kuaishou.com/rest/n/nebula/box/explore?isOpen=true&isReadyOfAdPlay=true" 54 | headers = {'User-Agent': Agent, 'Accept': '*/*', 'Accept-Language': ' zh-CN,zh;q=0.9', 'Cookie': can_cookie} 55 | request = urllib.request.Request(url=url, headers=headers) 56 | response = urllib.request.urlopen(request) 57 | str_result = response.read().decode('UTF-8') 58 | arr_json01 = json.loads(str_result, strict=False) 59 | show = arr_json01['data']['show'] 60 | try: 61 | if show: 62 | if arr_json01['data']['commonAwardPopup'] is not None: 63 | print("账号[" + name + "]开宝箱获得" + str(arr_json01['data']['commonAwardPopup']['awardAmount']) + "金币") 64 | else: 65 | if arr_json01['data']['openTime'] == -1: 66 | print("账号[" + name + "]今日开宝箱次数已用完") 67 | else: 68 | print("账号[" + name + "]开宝箱冷却时间还有" + str(int(arr_json01['data']['openTime'] / 1000)) + "秒") 69 | else: 70 | print("账号[" + name + "]账号获取开宝箱失败:疑似cookies格式不完整") 71 | except TypeError as reason: 72 | print("开宝箱出错啦" + str(reason) + str_result) 73 | 74 | 75 | # 查询签到 76 | def querySign(can_cookie, name): 77 | url = "https://nebula.kuaishou.com/rest/n/nebula/sign/queryPopup" 78 | headers = {'User-Agent': Agent, 'Accept': '*/*', 'Accept-Language': ' zh-CN,zh;q=0.9', 'Cookie': can_cookie} 79 | request = urllib.request.Request(url=url, headers=headers) 80 | response = urllib.request.urlopen(request) 81 | str_result = response.read().decode('UTF-8') 82 | json_arr = json.loads(str_result) 83 | result_code = json_arr['data']['nebulaSignInPopup']['todaySigned'] 84 | try: 85 | if result_code: 86 | print("账号[" + name + "]今日已签到" + json_arr['data']['nebulaSignInPopup']['subTitle'] + "," + 87 | json_arr['data']['nebulaSignInPopup']['title']) 88 | else: 89 | sign(can_cookie, name) 90 | except TypeError as reason: 91 | print("查询签到出错啦" + str(reason) + str_result) 92 | 93 | 94 | # 签到 95 | def sign(can_cookie, name): 96 | url = "https://nebula.kuaishou.com/rest/n/nebula/sign/sign?source=activity" 97 | headers = {'User-Agent': Agent, 'Accept': '*/*', 'Accept-Language': ' zh-CN,zh;q=0.9', 'Cookie': can_cookie} 98 | request = urllib.request.Request(url=url, headers=headers) 99 | response = urllib.request.urlopen(request) 100 | str_result = response.read().decode('UTF-8') 101 | json_arr = json.loads(str_result) 102 | result_code = json_arr['result'] 103 | try: 104 | if result_code == 1: 105 | print("账号[" + name + "]签到成功:" + str(json_arr['data']['toast'])) 106 | else: 107 | print("账号[" + name + "]签到成功:" + json_arr['error_msg']) 108 | except TypeError as reason: 109 | print("查询签到出错啦" + str(reason) + str_result) 110 | 111 | 112 | # 准备分享得金币任务 113 | def setShare(can_cookie, name): 114 | url = "https://nebula.kuaishou.com/rest/n/nebula/account/withdraw/setShare" 115 | headers = {'User-Agent': Agent, 'Accept': '*/*', 'Accept-Language': ' zh-CN,zh;q=0.9', 'Cookie': can_cookie} 116 | data_can = "" 117 | data = urllib.parse.urlencode(data_can).encode('utf-8') 118 | request = urllib.request.Request(url=url, data=data, headers=headers) 119 | response = urllib.request.urlopen(request) 120 | str_result = response.read().decode('UTF-8') 121 | json_arr = json.loads(str_result) 122 | try: 123 | if json_arr['result'] == 1: 124 | print("账号[" + name + "]" + "准备分享任务成功,正在执行分享...") 125 | url = "https://nebula.kuaishou.com/rest/n/nebula/daily/report?taskId=122" 126 | request = urllib.request.Request(url=url, headers=headers) 127 | response = urllib.request.urlopen(request) 128 | str_result = response.read().decode('UTF-8') 129 | json_arr = json.loads(str_result) 130 | if json_arr['result'] == 1: 131 | print("账号[" + name + "]" + "分享任务成功:" + json_arr['data']['msg'] + str(json_arr['data']['amount'])) 132 | else: 133 | print("账号[" + name + "]" + "分享任务执行失败:疑似今日已分享." + json_arr['error_msg']) 134 | else: 135 | print("账号[" + name + "]" + "准备分享任务失败:" + json_arr['error_msg']) 136 | except TypeError as reason: 137 | print("账号[" + name + "]执行任务出错啦" + str(reason) + str_result) 138 | 139 | 140 | # 依次执行任务 141 | def taskStat(): 142 | i = 0 143 | for cookie in Cookies: 144 | i = i + 1 145 | if 'did=' in cookie: 146 | print("\n========开始序号[" + str(i) + "]任务========\n") 147 | cookie = cookie.replace("@", "").replace("\n", "") 148 | json_str = getInformation(cookie) 149 | code = json_str['code'] 150 | if code == 1: 151 | name = json_str['data']['nickname'] 152 | # 查询签到 153 | querySign(cookie, name) 154 | # 分享任务 155 | setShare(cookie, name) 156 | # 开宝箱 157 | openBox(cookie, name) 158 | assets[name] = (getInformation(cookie)['data']) 159 | else: 160 | print("序号[" + str(i) + "]获取信息失败,请检查cookies是否正确!=") 161 | time.sleep(1) 162 | else: 163 | print("序号[" + str(i) + "]的cookies不完整,请重新抓取!") 164 | assetQuery() 165 | 166 | 167 | # 资产查询 168 | def assetQuery(): 169 | print("") 170 | for asset in assets: 171 | print('用户:%s, 账户余额:%s元 ,金币:%s枚' % (asset, str(assets[asset]['cah']), str(assets[asset]['coin']))) 172 | 173 | 174 | # 周周赚 175 | def ksjsbFriendAssist(can_cookie, help_code): 176 | url = "https://nebula.kuaishou.com/rest/zt/encourage/assistance/friendAssist" 177 | payload = "{\"assistanceId\":\"" + help_code + "\"}" 178 | _headers = { 179 | 'Host': 'nebula.kuaishou.com', 180 | 'Origin': 'https://nebula.kuaishou.com', 181 | 'Content-Type': 'application/json', 182 | 'Cookie': can_cookie, 183 | 'Accept-Encoding': 'gzip, deflate, br', 184 | 'Connection': 'keep-alive', 185 | 'Accept': '*/*', 186 | 'User-Agent': Agent, 187 | 'Content-Length': '35', 188 | 'Referer': 'https://nebula.kuaishou.com/nebula/daily-invite', 189 | 'Accept-Language': 'zh-cn' 190 | } 191 | response = requests.request("POST", url, headers=_headers, data=payload, verify=False).json() 192 | print("助力结果:%s" % response.get('msg')) 193 | time.sleep(1.8) 194 | 195 | 196 | if __name__ == '__main__': 197 | 198 | # 获取环境变量 199 | try: 200 | _Cookie = os.environ["ksjsb"] 201 | except: 202 | _Cookie = '' 203 | try: 204 | help_code = os.environ['ksjsb_code'] 205 | except : 206 | help_code = '' 207 | assets = {} 208 | # _Cookie = '' 209 | # 分割环境变量 210 | if _Cookie != '': 211 | if "@" in _Cookie: 212 | Cookies = _Cookie.split("@") 213 | elif "&" in _Cookie: 214 | Cookies = _Cookie.split('&') 215 | else: 216 | Cookies = _Cookie.split('\n') 217 | 218 | # 协议头 219 | Agent = "Mozilla/5.0 (Linux; Android 11; Redmi K20 Pro Premium Edition Build/RKQ1.200826.002; wv) AppleWebKit/537.36 " \ 220 | "(KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.226 KsWebView/1.8.90.488 (rel;r) Mobile Safari/537.36 " \ 221 | "Yoda/2.8.3-rc1 ksNebula/10.3.41.3359 OS_PRO_BIT/64 MAX_PHY_MEM/7500 AZPREFIX/yz ICFO/0 StatusHT/34 " \ 222 | "TitleHT/44 NetType/WIFI ISLP/0 ISDM/0 ISLB/0 locale/zh-cn evaSupported/false CT/0 " 223 | 224 | num = len(Cookies) 225 | print("共找到" + str(num) + "个快手CK,开始执行任务...\n") 226 | taskStat() 227 | 228 | # 判断是否执行周周赚 229 | if help_code != '': 230 | if datetime.today().isoweekday() == 4 and datetime.now().hour == 14 and datetime.now().minute <= 16: 231 | print("\n===========周周赚助力===========\n") 232 | for cookie in Cookies: 233 | if 'did=' in cookie: 234 | ksjsbFriendAssist(cookie.replace("@", "").replace("\n", ""), help_code) 235 | else: 236 | print("助力失败,快手CK不完整,请重新抓取!") 237 | else: 238 | print("周周赚助力未开始,助力时间为每周六上午六点零分至六分!") 239 | else: 240 | print("未找到快手CK,请检查变量名是否为ksjsbck!") 241 | -------------------------------------------------------------------------------- /ltcy.py: -------------------------------------------------------------------------------- 1 | """ 2 | 联通畅游 v1.0 3 | 4 | 活动入口: 某通app首页-5g新通信-某通畅游 5 | 6 | 格式 某通手机号#appid#token_online 7 | export UNICOM_GAME_ACCOUNT_INFO="" 8 | 9 | cron: 25 8,10 * * * 10 | const $ = new Env("联通畅游"); 11 | """ 12 | 13 | from time import sleep 14 | from requests import post, get 15 | from random import randint 16 | from tools.tool import get_environ, timestamp 17 | from tools.send_msg import push 18 | from uuid import uuid4 19 | 20 | class CUG: 21 | def __init__(self, phone: str, appid: str, token_online: str): 22 | self.phone_num = phone.rstrip("\n") 23 | self.appId = appid.rstrip("\n") 24 | self.token_online = token_online.rstrip("\n") 25 | default_ua = f"Mozilla/5.0 (Linux; Android {randint(8, 13)}; SM-S908U Build/TP1A.220810.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/{randint(95, 108)}.0.5359.128 Mobile Safari/537.36; unicom{{version:android@9.0{randint(0, 6)}00,desmobile:{self.phone_num}}};devicetype{{deviceBrand:,deviceModel:}};{{yw_code:}}" 26 | self.run_ua = get_environ(key="UNICOM_USERAGENT", default=default_ua, output=False) 27 | self.deviceId = uuid4().hex 28 | self.msg = "" 29 | def get_ecsToken(self): 30 | url = "https://m.client.10010.com/mobileService/onLine.htm" 31 | body = f"reqtime={timestamp()}&netWay=Wifi&version=android%4010.0100&deviceId={self.deviceId}&token_online={self.token_online}&provinceChanel=general&appId={self.appId}&deviceModel=SM-S908U&step=bindlist&androidId={uuid4().hex[8:24]}&deviceBrand=&flushkey=1" 32 | headers = { 33 | "content-type": "application/x-www-form-urlencoded", 34 | "user-agent": self.run_ua 35 | } 36 | data = post(url, headers=headers, data=body).json() 37 | print(data) 38 | self.ecs_token = data["ecs_token"] 39 | # print(self.ecs_token) 40 | def login(self): 41 | url = "https://game.wostore.cn/api/app//user/v2/login" 42 | body = { 43 | "identityType": "esToken", 44 | "code": self.ecs_token 45 | } 46 | headers = { 47 | "pragma": "no-cache", 48 | "cache-control": "no-cache", 49 | "accept": "application/json", 50 | "content-type": "application/json;charset=utf-8", 51 | "user-agent": self.run_ua, 52 | "channelid": "GAMELTAPP_90006", 53 | "device": "5", 54 | "origin": "https://web.wostore.cn", 55 | "x-requested-with": "com.sinovatech.unicom.ui", 56 | "sec-fetch-site": "same-site", 57 | "sec-fetch-mode": "cors", 58 | "sec-fetch-dest": "empty", 59 | "referer": "https://web.wostore.cn/", 60 | "accept-encoding": "gzip, deflate", 61 | "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 62 | } 63 | data = post(url, headers=headers, json=body).json() 64 | self.access_token = data["data"]["access_token"] 65 | self.headers = { 66 | "pragma": "no-cache", 67 | "cache-control": "no-cache", 68 | "accept": "application/json, text/plain, */*", 69 | "authorization": self.access_token, 70 | "user-agent": self.run_ua, 71 | "origin": "https://web.wostore.cn", 72 | "x-requested-with": "com.sinovatech.unicom.ui", 73 | "sec-fetch-site": "same-site", 74 | "sec-fetch-mode": "cors", 75 | "sec-fetch-dest": "empty", 76 | "referer": "https://web.wostore.cn/", 77 | "accept-encoding": "gzip, deflate", 78 | "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 79 | } 80 | 81 | def check_in(self): 82 | url = "https://game.wostore.cn/api/app/user/v2/signIn" 83 | data = get(url, headers=self.headers).json() 84 | print(data) 85 | 86 | def lotter(self): 87 | url = "https://game.wostore.cn/api/app/user/v2/benefit/lottery?id=1" 88 | data = get(url, headers=self.headers).json() 89 | print(data) 90 | 91 | def pay_lotter(self, lotter_id): 92 | if lotter_id is None: 93 | return 94 | url = f"https://game.wostore.cn/api/app/user/v2/lottery/join?id={lotter_id}" 95 | data = get(url, headers=self.headers).json() 96 | print(data) 97 | 98 | def get_task(self): 99 | """ 100 | receiveStatus 2 为已完成 101 | :return: 102 | """ 103 | url = "https://game.wostore.cn/api/app/user/v2/task/list" 104 | data = get(url, headers=self.headers).json() 105 | all_task_info = {} 106 | print(data) 107 | for task_info in data["data"]: 108 | if task_info["receiveStatus"] == 2: 109 | print(f"任务{task_info['taskName']}已完成 跳过领取") 110 | continue 111 | elif task_info["receiveStatus"] == 0: 112 | print(f"任务{task_info['taskName']}已完成 跳过领取") 113 | continue 114 | all_task_info[task_info["id"]] = task_info["productId"] 115 | return all_task_info 116 | 117 | def finish_task(self, task_id, productId): 118 | url = f"https://game.wostore.cn/api/app/user/v2/task/receive?productId={productId}&taskId={task_id}" 119 | data = get(url, headers=self.headers).json() 120 | print(data) 121 | sleep(3) 122 | 123 | def play_game(self): 124 | url = "https://game.wostore.cn/api/app/user/v2/play/save" 125 | body = { 126 | "cpGameId": f"1500019{randint(900, 999)}" 127 | } 128 | data = post(url, headers=self.headers, json=body).json() 129 | print(data) 130 | 131 | def exchange(self): 132 | def get_exchange(): 133 | url = "https://game.wostore.cn/api/app/game/v2/shop/getToken" 134 | data = get(url, headers=self.headers).json() 135 | # print(data) 136 | return data["data"] 137 | url = f"https://game.wostore.cn/api/app/shop/order/product/order/mall?Authorization={get_exchange()}" 138 | body = { 139 | "productId": "803779159738716160" 140 | } 141 | data = post(url, headers=self.headers, json=body).json() 142 | print(data) 143 | def init(self): 144 | """ 145 | 初始化活动及查询积分 146 | :return: 147 | """ 148 | url = "https://game.wostore.cn/api/app/user/v2/getMemberInfo" 149 | data = get(url, headers=self.headers).json() 150 | # print(data) 151 | return data["data"]["userIntegral"] 152 | def get_pay_lotter_list(self): 153 | """ 154 | status 155 | 0: 可参与 156 | 1: 已参与 157 | 2: 已结束 158 | :return: 159 | """ 160 | def get_shopToken(): 161 | url = "https://game.wostore.cn/api/app/game/v2/shop/getToken" 162 | data = get(url, headers=self.headers).json() 163 | # print(data) 164 | return data["data"] 165 | url = f"https://game.wostore.cn/api/app/shop/business/lottery/available?Authorization={get_shopToken()}" 166 | headers = { 167 | "pragma": "no-cache", 168 | "cache-control": "no-cache", 169 | "accept": "application/json", 170 | "user-agent": self.run_ua, 171 | "channelid": "GAMELTAPP_90006", 172 | "device": "5", 173 | "origin": "https://web.wostore.cn", 174 | "x-requested-with": "com.sinovatech.unicom.ui", 175 | "sec-fetch-site": "same-site", 176 | "sec-fetch-mode": "cors", 177 | "sec-fetch-dest": "empty", 178 | "referer": "https://web.wostore.cn/", 179 | "accept-encoding": "gzip, deflate", 180 | "accept-language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 181 | } 182 | data = get(url, headers=headers).json() 183 | # print(data) 184 | for lotter_info in data["data"]["list"]: 185 | if lotter_info["status"] == 0 and lotter_info["points"] <= 30: 186 | return lotter_info["id"] 187 | print("当前抽奖轮次已全部参加或没有符合条件的场次 跳过") 188 | return None 189 | def main(self): 190 | self.get_ecsToken() 191 | self.login() 192 | old_score = self.init() 193 | self.check_in() 194 | self.lotter() 195 | self.pay_lotter(self.get_pay_lotter_list()) 196 | self.play_game() 197 | [self.finish_task(task_id, productId) for task_id, productId in self.get_task().items()] 198 | sleep(5) 199 | now_score = self.init() 200 | today_score = now_score - old_score 201 | self.msg += f"账号{self.phone_num}---本次运行获得{today_score}分, 当前共有{now_score}分\n" 202 | push("某通畅游", self.msg) 203 | if __name__ == '__main__': 204 | unicom_game_info = get_environ("UNICOM_GAME_ACCOUNT_INFO") 205 | if unicom_game_info == "": 206 | exit(0) 207 | cug = CUG(*unicom_game_info.split("#")) 208 | cug.main() -------------------------------------------------------------------------------- /ltyd.py: -------------------------------------------------------------------------------- 1 | """ 2 | 联通阅读 v1.0 3 | 4 | 依赖 pycryptodome 5 | 活动入口: 联通app 搜索 阅读专区 进入话费派送中 6 | 7 | 环境变量 phone_num="手机号#UA"(必需) 多账户 & 分割 UNICOM_LOTTER="true"(选填) 8 | export phone_num="" 9 | 10 | cron: 25 9,12 * * * 11 | const $ = new Env("联通阅读"); 12 | """ 13 | 14 | from requests import post, get 15 | from time import sleep, time 16 | from datetime import datetime 17 | from hashlib import md5 as md5Encode 18 | from random import randint, uniform, choice 19 | from os import environ 20 | from sys import stdout, exit 21 | from base64 import b64encode 22 | from json import dumps 23 | from tools.notify import send 24 | from tools.encrypt_symmetric import Crypt 25 | from tools.send_msg import push 26 | from tools.tool import get_environ, random_sleep 27 | #random_sleep(0, 1600) 28 | from tools.ql_api import get_cookie 29 | import threading 30 | 31 | 32 | 33 | msg_str = "联通话费兑换路径:联通APP搜索阅读--->阅读专区--->我的--->话费红包,可兑换3元或者5元话费抵扣券,最后使用沃钱包支付即可\n\n" 34 | 35 | """主类""" 36 | class China_Unicom: 37 | def __init__(self, phone_num, run_ua): 38 | self.phone_num = phone_num 39 | default_ua = f"Mozilla/5.0 (Linux; Android {randint(8, 13)}; SM-S908U Build/TP1A.220810.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/{randint(95, 108)}.0.5359.128 Mobile Safari/537.36; unicom{{version:android@9.0{randint(0,6)}00,desmobile:{self.phone_num}}};devicetype{{deviceBrand:,deviceModel:}};{{yw_code:}}" 40 | #run_ua = get_environ(key="UNICOM_USERAGENT", default=default_ua, output=False) 41 | if run_ua is None or run_ua == "": 42 | run_ua = default_ua 43 | # print("使用的UA:"+run_ua) 44 | 45 | self.headers = { 46 | "Host": "10010.woread.com.cn", 47 | "Accept": "application/json, text/plain, */*", 48 | "Accept-Language": "zh-CN,zh-Hans;q=0.9", 49 | "Accept-Encoding": "gzip, deflate, br", 50 | "Content-Type": "application/json;charset=utf-8", 51 | "Origin": "https://10010.woread.com.cn", 52 | "User-Agent": run_ua, 53 | "Connection": "keep-alive", 54 | "Referer": "https://10010.woread.com.cn/ng_woread/", 55 | } 56 | self.fail_num = 0 57 | 58 | def timestamp(self): 59 | return round(time() * 1000) 60 | 61 | def print_now(self, content): 62 | print(content) 63 | stdout.flush() 64 | 65 | def md5(self, str): 66 | m = md5Encode(str.encode(encoding='utf-8')) 67 | return m.hexdigest() 68 | 69 | def req(self, url, crypt_text, retry_num=5): 70 | while retry_num > 0: 71 | body = { 72 | "sign": b64encode(Crypt(crypt_type="AES", key="update!@#1234567", iv="16-Bytes--String", mode="CBC").encrypt(crypt_text).encode()).decode() 73 | } 74 | self.headers["Content-Length"] = str(len(dumps(body).replace(" ", ""))) 75 | try: 76 | res = post(url, headers=self.headers, json=body) 77 | data = res.json() 78 | return data 79 | except Exception as e: 80 | print(f"本次请求失败, 正在重新发送请求 剩余次数{retry_num}") 81 | print(f"本次请求失败原因------{e}") 82 | retry_num -= 1 83 | sleep(5) 84 | return self.req(url, crypt_text, retry_num) 85 | 86 | def referer_login(self): 87 | date = datetime.today().__format__("%Y%m%d%H%M%S") 88 | timestamp = self.timestamp() 89 | url = f"https://10010.woread.com.cn/ng_woread_service/rest/app/auth/10000002/{timestamp}/{self.md5(f'100000027k1HcDL8RKvc{timestamp}')}" 90 | crypt_text = f'{{"timestamp":"{date}"}}' 91 | body = { 92 | "sign": b64encode(Crypt(crypt_type="AES", key="1234567890abcdef").encrypt(crypt_text).encode()).decode() 93 | } 94 | self.headers["Content-Length"] = str(len(str(body)) - 1) 95 | data = post(url, headers=self.headers, json=body).json() 96 | if data["code"] == "0000": 97 | self.headers["accesstoken"] = data["data"]["accesstoken"] 98 | else: 99 | self.print_now(f"设备登录失败,日志为{data}") 100 | exit(0) 101 | 102 | def get_userinfo(self): 103 | date = datetime.today().__format__("%Y%m%d%H%M%S") 104 | url = "https://10010.woread.com.cn/ng_woread_service/rest/account/login" 105 | crypt_text = f'{{"phone":"{self.phone_num}","timestamp":"{date}"}}' 106 | data = self.req(url, crypt_text) 107 | if data["code"] == "0000": 108 | self.userinfo = data["data"] 109 | else: 110 | self.print_now(f"手机号登录失败, 日志为{data}") 111 | exit(0) 112 | 113 | def watch_video(self): 114 | global msg_str #声明我们在函数内部使用的是在函数外部定义的全局变量msg_str 115 | self.print_now("看广告获取积分任务: ") 116 | url = "https://10010.woread.com.cn/ng_woread_service/rest/activity/yearEnd/obtainScoreByAd" 117 | date = datetime.today().__format__("%Y%m%d%H%M%S") 118 | crypt_text = f'{{"value":"947728124","timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 119 | for i in range(3): 120 | data = self.req(url, crypt_text) 121 | self.print_now(data) 122 | if self.fail_num == 3: 123 | self.print_now("当前任务出现异常 且错误次数达到3次 请手动检查") 124 | # push("某通阅读", "当前任务出现异常 且错误次数达到3次 请手动检查") 125 | msg_str += f"账号{self.phone_num}当前任务出现异常 且错误次数达到3次 请手动检查\n\n" 126 | exit(0) 127 | if data["code"] == "9999": 128 | self.print_now("当前任务出现异常 正在重新执行") 129 | self.fail_num += 1 130 | self.main() 131 | return False 132 | sleep(uniform(2, 8)) 133 | return True 134 | 135 | def read_novel(self): 136 | global msg_str #声明我们在函数内部使用的是在函数外部定义的全局变量msg_str 137 | self.get_cardid() 138 | self.get_cntindex() 139 | self.get_chapterallindex() 140 | self.print_now(f"你的账号{self.phone_num} :正在执行观看300次小说, 此过程较久, 最大时长为300 * 8s = 40min") 141 | for i in range(300): 142 | date = datetime.today().__format__("%Y%m%d%H%M%S") 143 | chapterAllIndex = choice(self.chapterallindex_list) 144 | url = f"https://10010.woread.com.cn/ng_woread_service/rest/cnt/wordsDetail?catid={self.catid}&pageIndex={self.pageIndex}&cardid={randint(10000, 99999)}&cntindex={self.cntindex}&chapterallindex={chapterAllIndex}&chapterseno=3" 145 | crypt_text = f'{{"chapterAllIndex":{chapterAllIndex},"cntIndex":{self.cntindex},"cntTypeFlag":"1","timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 146 | data = self.req(url, crypt_text) 147 | if self.fail_num == 3: 148 | self.print_now("当前任务出现异常 且错误次数达到3次 请手动检查") 149 | # push("某通阅读", "阅读任务出现异常 且错误次数达到3次 请手动检查") 150 | msg_str += f"账号{self.phone_num}阅读任务出现异常 且错误次数达到3次 请手动检查\n\n" 151 | exit(0) 152 | if data.get("code") != "0000": 153 | self.print_now("阅读小说发生异常, 正在重新登录执行, 接口返回") 154 | self.print_now(data) 155 | return self.main() 156 | sleep(uniform(2, 4)) 157 | 158 | def query_score(self): 159 | url = "https://10010.woread.com.cn/ng_woread_service/rest/activity/yearEnd/queryUserScore" 160 | date = datetime.today().__format__("%Y%m%d%H%M%S") 161 | crypt_text = f'{{"activeIndex":{self.activeIndex},"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 162 | data = self.req(url, crypt_text) 163 | total_score = data["data"]["validScore"] 164 | self.lotter_num = int(total_score / 50) 165 | self.print_now(f"你的账号{self.phone_num}当前有积分{total_score}, 可以抽奖{self.lotter_num}次") 166 | 167 | def get_activetion_id(self): 168 | url = "https://10010.woread.com.cn/ng_woread_service/rest/activity/yearEnd/queryActiveInfo" 169 | date = datetime.today().__format__("%Y%m%d%H%M%S") 170 | crypt_text = f'{{"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 171 | data = self.req(url, crypt_text) 172 | if data["code"] == "0000": 173 | self.activeIndex = data["data"]["activeindex"] 174 | else: 175 | self.print_now(f"活动id获取失败 将影响抽奖和查询积分") 176 | def get_cardid(self): 177 | """ 178 | 获取cardid 179 | :return: 180 | """ 181 | url = "https://10010.woread.com.cn/ng_woread_service/rest/basics/getIntellectRecommend" 182 | date = datetime.today().__format__("%Y%m%d%H%M%S") 183 | crypt_text = f'{{"cntsize":8,"recommendsize":5,"recommendid":0,"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 184 | data = self.req(url, crypt_text) 185 | # print(data) 186 | self.pageIndex = data["data"]["recommendindex"] if "recommendindex" in data["data"] else "10725" 187 | self.cardid = data["data"]["catindex"] if "catindex" in data["data"] else "119056" 188 | def get_cntindex(self): 189 | url = "https://10010.woread.com.cn/ng_woread_service/rest/basics/recommposdetail/12279" 190 | self.headers.pop("Content-Length", "no") 191 | data = get(url, headers=self.headers).json() 192 | booklist = data["data"]["booklist"]["message"] 193 | book_num = len(booklist) 194 | self.catid = booklist[0]["catindex"] if "catindex" in booklist[0] else "119411" 195 | self.cntindex = booklist[randint(0, book_num - 1)]["cntindex"] 196 | def get_chapterallindex(self): 197 | url = f"https://10010.woread.com.cn/ng_woread_service/rest/cnt/chalist?catid=119411&pageIndex=10725&cardid=12279&cntindex={self.cntindex}" 198 | date = datetime.today().__format__("%Y%m%d%H%M%S") 199 | crypt_text = f'{{"curPage":1,"limit":30,"index":"{self.cntindex}","sort":0,"finishFlag":1,"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 200 | data = self.req(url, crypt_text) 201 | chapterallindexlist = data["list"][0]["charptercontent"] 202 | chapterallindex_num = len(chapterallindexlist) 203 | self.chapterallindex_list = [0] * chapterallindex_num 204 | i = 0 205 | while i < chapterallindex_num: 206 | self.chapterallindex_list[i] = chapterallindexlist[i]["chapterallindex"] 207 | i += 1 208 | def lotter(self): 209 | url = "https://10010.woread.com.cn/ng_woread_service/rest/activity/yearEnd/handleDrawLottery" 210 | date = datetime.today().__format__("%Y%m%d%H%M%S") 211 | crypt_text = f'{{"activeIndex":{self.activeIndex},"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 212 | data = self.req(url, crypt_text) 213 | if data["code"] == "0000": 214 | self.print_now(f"抽奖成功, 获得{data['data']['prizename']}") 215 | else: 216 | self.print_now(f"抽奖失败, 日志为{data}") 217 | 218 | def watch_ad(self): 219 | self.print_now("观看广告得话费红包: ") 220 | url = "https://10010.woread.com.cn/ng_woread_service/rest/activity/userTakeActive" 221 | date = datetime.today().__format__("%Y%m%d%H%M%S") 222 | crypt_text = f'{{"activeIndex":6880,"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 223 | data = self.req(url, crypt_text) 224 | self.print_now(data) 225 | 226 | def exchange(self): 227 | # ticketValue activeid来自于https://10010.woread.com.cn/ng_woread_service/rest/phone/vouchers/getSysConfig get请求 228 | # {"ticketValue":"300","activeid":"61yd210901","timestamp":"20220816213709","token":"","userId":"","userIndex":,"userAccount":"","verifyCode":""} 229 | url = "https://10010.woread.com.cn/ng_woread_service/rest/phone/vouchers/exchange" 230 | date = datetime.today().__format__("%Y%m%d%H%M%S") 231 | crypt_text = f'{{"ticketValue":"300","activeid":"61yd210901","timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 232 | data = self.req(url, crypt_text) 233 | print(data) 234 | 235 | def query_red(self): 236 | global msg_str #声明我们在函数内部使用的是在函数外部定义的全局变量msg_str 237 | url = "https://10010.woread.com.cn/ng_woread_service/rest/phone/vouchers/queryTicketAccount" 238 | date = datetime.today().__format__("%Y%m%d%H%M%S") 239 | crypt_text = f'{{"timestamp":"{date}","token":"{self.userinfo["token"]}","userId":"{self.userinfo["userid"]}","userIndex":{self.userinfo["userindex"]},"userAccount":"{self.userinfo["phone"]}","verifyCode":"{self.userinfo["verifycode"]}"}}' 240 | data = self.req(url, crypt_text) 241 | if data["code"] == "0000": 242 | can_use_red = data["data"]["usableNum"] / 100 243 | if can_use_red >= 3: 244 | self.print_now(f"账号{self.phone_num}查询成功 你当前有话费红包{can_use_red} 可以去兑换了") 245 | # push("某通阅读", f"账号{self.phone_num}查询成功 你当前有话费红包{can_use_red} 可以去兑换了") 246 | msg_str += f"账号{self.phone_num}查询成功 你当前有话费红包{can_use_red} 可以去兑换了\n\n" 247 | else: 248 | self.print_now(f"账号{self.phone_num}查询成功 你当前有话费红包{can_use_red} 不足兑换的最低额度") 249 | # push("某通阅读", f"账号{self.phone_num}查询成功 你当前有话费红包{can_use_red} 不足兑换的最低额度") 250 | msg_str += f"账号{self.phone_num}查询成功 你当前有话费红包{can_use_red} 不足兑换的最低额度\n\n" 251 | 252 | def main(self): 253 | self.referer_login() 254 | self.get_userinfo() 255 | if not self.watch_video(): 256 | return 257 | self.get_activetion_id() 258 | self.read_novel() 259 | self.query_score() 260 | self.watch_ad() 261 | if unicom_lotter: 262 | for i in range(self.lotter_num): 263 | self.lotter() 264 | sleep(2) 265 | self.query_score() 266 | self.query_red() 267 | 268 | 269 | 270 | def start(phone,run_ua): 271 | if phone == "": 272 | exit(0) 273 | China_Unicom(phone,run_ua).main() 274 | print("\n") 275 | print("\n") 276 | 277 | 278 | 279 | 280 | if __name__ == "__main__": 281 | #unicom_lotter = get_environ("UNICOM_LOTTER", default=True) 282 | unicom_lotter = get_cookie("UNICOM_LOTTER", True, False) 283 | """读取环境变量""" 284 | l = [] 285 | user_map = [] 286 | cklist = get_cookie("PHONE_NUM") 287 | for i in range(len(cklist)): 288 | #以#分割开的ck 289 | split1 = cklist[i].split("&") 290 | if len(split1)>1: 291 | for j in range(len(split1)): 292 | user_map.append(split1[j]) 293 | else: 294 | user_map.append(cklist[i]) 295 | 296 | 297 | 298 | for i in range(len(user_map)): 299 | phone="" 300 | info = user_map[i].split("&")[0] 301 | #以#分割开的ck 302 | split1 = info.split("#") 303 | run_ua = "" 304 | phone = split1[0] 305 | if len(split1)>1: 306 | run_ua = split1[1] + f";devicetype{{deviceBrand:,deviceModel:}};{{yw_code:}}" 307 | 308 | print('开始执行第{}个账号:{}'.format((i+1),phone)) 309 | if phone == "": 310 | print("当前账号未填写手机号 跳过") 311 | print("\n") 312 | continue 313 | p = threading.Thread(target=start,args=(phone, run_ua)) 314 | l.append(p) 315 | p.start() 316 | print("\n") 317 | for i in l: 318 | i.join() 319 | send("联通阅读",msg_str) -------------------------------------------------------------------------------- /nnjsq.py: -------------------------------------------------------------------------------- 1 | """ 2 | nn加速器 v1.0 3 | 4 | 任务:未知 5 | 6 | 账号&密码填到变量 nnjsq 中, 多账号#隔开 7 | export nnjsq="" 8 | 9 | cron: 5 0 * * * 10 | const $ = new Env("nn加速器"); 11 | """ 12 | 13 | import hashlib 14 | import json 15 | from time import sleep 16 | import requests 17 | import os,sys 18 | import notify 19 | 20 | #检测账户变量 21 | nnjsq = os.environ.get("nnjsq") 22 | if not nnjsq or "&" not in nnjsq: 23 | sys.exit("⚠️未发现有效账号,退出程序!") 24 | 25 | #分割账户 26 | accounts = {} 27 | for i, account in enumerate(nnjsq.split('#'), 1): 28 | phone_key = f"nn_user{i}" 29 | pwd_key = f"nn_pwd{i}" 30 | phone = os.environ.get(phone_key) 31 | password = os.environ.get(pwd_key) 32 | if not phone or not password: 33 | sys.exit(f"⚠️未发现有效账号{i},退出程序!") 34 | accounts[f"account{i}"] = {"phone": account.split('&')[0], "passwd": account.split('&')[1]} 35 | 36 | # 登录 37 | def login(phone, passwd): 38 | messages = '' 39 | print(phone) 40 | messages = messages + '\n' + phone 41 | # notify.go_cqhttp("nn加速器", phone) 42 | _url = 'https://opapi.nnraytheon.com/u-mobile/pwdLogin' 43 | _data = { 44 | "countryCode": 86, 45 | "telNum": phone, 46 | "pwdEncry": hashlib.md5(bytes(passwd, encoding='utf-8')).hexdigest() 47 | } 48 | headers = { 49 | "Host": "opapi.nnraytheon.com", 50 | "token": "", 51 | "appid": "nnMobileIm_6z0g3ut7", 52 | "timestamp": "1675096362942", 53 | "signtype": "1", 54 | "sign": "", 55 | "version": "108", 56 | "reqchannel": "2", 57 | "deviceid": "d4uud558697ada1ec", 58 | "appname": "leigod_accelerator", 59 | "osversion": "12", 60 | "longitude": "0.0", 61 | "latitude": "0.0", 62 | "platform": "2", 63 | "registercanal": "common", 64 | "busitype": "nn_aksjfdasoifnkls", 65 | "content-type": "application/json; charset=UTF-8", 66 | "content-length": "87", 67 | "accept-encoding": "gzip", 68 | "user-agent": "okhttp/4.9.3" 69 | } 70 | login_status = requests.post(url=_url, data=json.dumps(_data), headers=headers).json() 71 | print(login_status['retMsg']) 72 | messages = messages + '\n' + login_status['retMsg'] 73 | # notify.go_cqhttp("nn加速器", login_status['retMsg']) 74 | if login_status['retMsg'] != '该用户不存在': 75 | headers['token'] = login_status['retData']['token'] 76 | _data = { 77 | "taskIds": [ 78 | 12, 79 | 13, 80 | 16, 81 | 17, 82 | 18, 83 | 24, 84 | 25, 85 | 27, 86 | 28, 87 | 29, 88 | 30 89 | ], 90 | "userId": login_status['retData']['userId'] 91 | } 92 | get_num = \ 93 | requests.post(url='https://opapi.nnraytheon.com/nn-assist/taskPoints/findUserTaskInfo', 94 | data=json.dumps(_data), 95 | headers=headers).json()['retData'] 96 | for i in get_num: 97 | for e in range(10): 98 | _data = { 99 | "point": 1, 100 | "taskId": i['taskId'], 101 | "taskName": "", 102 | "userId": login_status['retData']['userId'] 103 | } 104 | result = requests.post(url='https://opapi.nnraytheon.com/nn-assist/taskPoints/pointCallBack', 105 | data=json.dumps(_data), headers=headers).json() 106 | print(result['retMsg']) 107 | messages = messages + '\n' + result['retMsg'] 108 | # notify.go_cqhttp("nn加速器", result['retMsg']) 109 | if result['retMsg'] == '当天完成任务已上限': 110 | break 111 | else: 112 | sleep(0) 113 | pass 114 | notify.send("【nn加速器】", messages) 115 | 116 | for account in accounts: 117 | print(f"Logging in to {account}...") 118 | login(accounts[account]["phone"], accounts[account]["passwd"]) -------------------------------------------------------------------------------- /pfjsq.py: -------------------------------------------------------------------------------- 1 | """ 2 | 泡芙加速器 v1.0 3 | 4 | 任务:签到 刷视频 5 | 6 | cookie填到变量 pfjsq 中, 多账户&间隔 7 | export pfjsq="" 8 | 9 | cron: 16 9,14 * * * 10 | const $ = new Env("泡芙加速器"); 11 | """ 12 | 13 | import requests 14 | import time 15 | import os 16 | import sys 17 | 18 | class PuffAccelerator: 19 | def __init__(self, pfjsq): 20 | # 检测账户变量 21 | self.pfjsq = pfjsq 22 | 23 | # 授权密钥 24 | self.headers = { 25 | "Host": "api-admin-js.paofujiasu.com", 26 | "Connection": "keep-alive", 27 | "User-Agent": "Mozilla/5.0 (Linux; Android 13; M2007J1SC Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5075 MMWEBSDK/20230405 MMWEBID/8380 MicroMessenger/8.0.35.2360(0x2800235B) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android", 28 | "content-type": "application/json", 29 | "token": self.pfjsq, 30 | "tokenType": "applet", 31 | "Sec-Fetch-Dest": "empty", 32 | "Referer": "https://servicewechat.com/wx5bf04507567e9d72/14/page-frame.html", 33 | "Accept-Encoding": "gzip, deflate, br" 34 | } 35 | 36 | # 查询用户信息 37 | def get_pfjsq_acceleration_time(self): 38 | url = 'https://api-admin-js.paofujiasu.com/api/v1/user/gw/userinfo' 39 | response = requests.post(url, headers=self.headers) 40 | if response.status_code == 200: 41 | data = response.json() 42 | if data['info'] == '查询成功': 43 | accelerate_time = data['data']['remain_accelerate_time'] 44 | result = f'✅加速时间 | {accelerate_time}' 45 | return result 46 | else: 47 | return '⚠️cookie过期' 48 | else: 49 | return '⚠️cookie过期' 50 | 51 | # 查询用户信息 52 | def get_pfjsq_user(self): 53 | url = 'https://api-admin-js.paofujiasu.com/api/v1/user/gw/userinfo' 54 | response = requests.post(url, headers=self.headers) 55 | if response.status_code == 200: 56 | data = response.json() 57 | if data['info'] == '查询成功': 58 | user_account = data['data']['user_account'] 59 | return user_account 60 | else: 61 | return '⚠️cookie过期' 62 | else: 63 | return '⚠️cookie过期' 64 | 65 | # 查询用户金币信息 66 | def get_pfjsq_coins(self): 67 | url = 'https://api-admin-js.paofujiasu.com/client/api/v1/virtual_currency/species_quantity' 68 | response = requests.get(url, headers=self.headers) 69 | if response.status_code == 200: 70 | data = response.json() 71 | if data['info'] == '请求成功': 72 | user_coins = data['data']['remaining_quantity'] 73 | result = f'✅当前金币 | {user_coins}' 74 | return result 75 | else: 76 | return '⚠️cookie过期' 77 | else: 78 | return '⚠️cookie过期' 79 | 80 | # 用户签到 81 | def get_pfjsq_check(self): 82 | url = 'https://api-admin-js.paofujiasu.com/client/api/v1/virtual_currency/sign_in_for_species' 83 | data = {'res_type': 1} 84 | response = requests.post(url, headers=self.headers, json=data) 85 | if response.status_code == 200: 86 | data = response.json() 87 | if data['info'] == '请求成功': 88 | return '✅签到成功' 89 | else: 90 | return '⚠️cookie过期' 91 | elif response.status_code == 400: 92 | data = response.json() 93 | if data['info'] == '每天最多签到1次哦~': 94 | return '✅今日已签到' 95 | elif data['info'] == '最多拥有5个金币哦~': 96 | return '⚠️金币已上限' 97 | else: 98 | return '⚠️cookie过期' 99 | else: 100 | return '⚠️cookie过期' 101 | 102 | # 刷视频 103 | def get_pfjsq_video(self): 104 | url = 'https://api-admin-js.paofujiasu.com/client/api/v1/virtual_currency/look_ad_for_species' 105 | data = {'res_type': 1} 106 | response = requests.post(url, headers=self.headers, json=data) 107 | if response.status_code == 200: 108 | data = response.json() 109 | if data['info'] == '请求成功': 110 | return '✅刷视频成功' 111 | else: 112 | return '⚠️cookie过期' 113 | elif response.status_code == 400: 114 | data = response.json() 115 | if data['info'] == '每天最多3次看广告激励哦~': 116 | return '✅刷视频已上限' 117 | else: 118 | return '⚠️cookie过期' 119 | else: 120 | return '⚠️cookie过期' 121 | 122 | # 主程序 123 | def run(self): 124 | # 任务列表 125 | tasks = [ 126 | ("每日签到", self.get_pfjsq_check), 127 | ("第一次刷视频", self.get_pfjsq_video), 128 | ("第二次刷视频", self.get_pfjsq_video), 129 | ("第三次刷视频", self.get_pfjsq_video), 130 | ("查询时间", self.get_pfjsq_acceleration_time), 131 | ("查询金币", self.get_pfjsq_coins) 132 | ] 133 | # 执行任务 134 | for task_name, task_function in tasks: 135 | if self.get_pfjsq_user() == '⚠️cookie过期': 136 | print(self.get_pfjsq_user()) 137 | break 138 | print(f'🔁{self.get_pfjsq_user()} | 正在执行任务 | {task_name}') 139 | result = task_function() 140 | if result == '⚠️cookie过期' or result == '⚠️金币已上限': 141 | print(result) 142 | break 143 | print(result) 144 | time.sleep(5) 145 | print('*****************************************') 146 | 147 | if __name__ == '__main__': 148 | print('🔔泡芙加速器 | 开始') 149 | #检测账户变量 150 | pfjsq = os.environ.get("pfjsq") 151 | if not pfjsq: 152 | sys.exit("⚠️未发现有效账号,退出程序!") 153 | #分割账户 154 | if "&" not in pfjsq: 155 | accounts = [pfjsq] 156 | else: 157 | accounts = pfjsq.split("&") 158 | # 遍历账户列表 | 为每个账户创建一个类实例并执行任务 159 | for account in accounts: 160 | paofujiasu_client = PuffAccelerator(account) 161 | paofujiasu_client.run() -------------------------------------------------------------------------------- /sendNotify.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # _*_ coding:utf-8 _*_ 3 | import base64 4 | import hashlib 5 | import hmac 6 | import json 7 | import os 8 | import re 9 | import threading 10 | import time 11 | import urllib.parse 12 | 13 | import requests 14 | 15 | # 原先的 print 函数和主线程的锁 16 | _print = print 17 | mutex = threading.Lock() 18 | 19 | 20 | # 定义新的 print 函数 21 | def print(text, *args, **kw): 22 | """ 23 | 使输出有序进行,不出现多线程同一时间输出导致错乱的问题。 24 | """ 25 | with mutex: 26 | _print(text, *args, **kw) 27 | 28 | 29 | # 通知服务 30 | # fmt: off 31 | push_config = { 32 | 'HITOKOTO': False, # 启用一言(随机句子) 33 | 34 | 'BARK_PUSH': '', # bark IP 或设备码,例:https://api.day.app/DxHcxxxxxRxxxxxxcm/ 35 | 'BARK_ARCHIVE': '', # bark 推送是否存档 36 | 'BARK_GROUP': '', # bark 推送分组 37 | 'BARK_SOUND': '', # bark 推送声音 38 | 'BARK_ICON': '', # bark 推送图标 39 | 40 | 'CONSOLE': True, # 控制台输出 41 | 42 | 'DD_BOT_SECRET': '', # 钉钉机器人的 DD_BOT_SECRET 43 | 'DD_BOT_TOKEN': '', # 钉钉机器人的 DD_BOT_TOKEN 44 | 45 | 'FSKEY': '', # 飞书机器人的 FSKEY 46 | 47 | 'GOBOT_URL': '', # go-cqhttp 48 | # 推送到个人QQ:http://127.0.0.1/send_private_msg 49 | # 群:http://127.0.0.1/send_group_msg 50 | 'GOBOT_QQ': '', # go-cqhttp 的推送群或用户 51 | # GOBOT_URL 设置 /send_private_msg 时填入 user_id=个人QQ 52 | # /send_group_msg 时填入 group_id=QQ群 53 | 'GOBOT_TOKEN': '', # go-cqhttp 的 access_token 54 | 55 | 'GOTIFY_URL': '', # gotify地址,如https://push.example.de:8080 56 | 'GOTIFY_TOKEN': '', # gotify的消息应用token 57 | 'GOTIFY_PRIORITY': 0, # 推送消息优先级,默认为0 58 | 59 | 'IGOT_PUSH_KEY': '', # iGot 聚合推送的 IGOT_PUSH_KEY 60 | 61 | 'PUSH_KEY': '', # server 酱的 PUSH_KEY,兼容旧版与 Turbo 版 62 | 63 | 'PUSH_PLUS_TOKEN': '', # push+ 微信推送的用户令牌 64 | 'PUSH_PLUS_USER': '', # push+ 微信推送的群组编码 65 | 66 | 'QMSG_KEY': '', # qmsg 酱的 QMSG_KEY 67 | 'QMSG_TYPE': '', # qmsg 酱的 QMSG_TYPE 68 | 69 | 'QYWX_AM': '', # 企业微信应用 70 | 71 | 'QYWX_KEY': '', # 企业微信机器人 72 | 73 | 'TG_BOT_TOKEN': '', # tg 机器人的 TG_BOT_TOKEN,例:1407203283:AAG9rt-6RDaaX0HBLZQq0laNOh898iFYaRQ 74 | 'TG_USER_ID': '', # tg 机器人的 TG_USER_ID,例:1434078534 75 | 'TG_API_HOST': '', # tg 代理 api 76 | 'TG_PROXY_AUTH': '', # tg 代理认证参数 77 | 'TG_PROXY_HOST': '', # tg 机器人的 TG_PROXY_HOST 78 | 'TG_PROXY_PORT': '', # tg 机器人的 TG_PROXY_PORT 79 | } 80 | notify_function = [] 81 | # fmt: on 82 | 83 | # 首先读取 面板变量 或者 github action 运行变量 84 | for k in push_config: 85 | if os.getenv(k): 86 | v = os.getenv(k) 87 | push_config[k] = v 88 | 89 | 90 | def bark(title: str, content: str) -> None: 91 | """ 92 | 使用 bark 推送消息。 93 | """ 94 | if not push_config.get("BARK_PUSH"): 95 | print("bark 服务的 BARK_PUSH 未设置!!\n取消推送") 96 | return 97 | print("bark 服务启动") 98 | 99 | if push_config.get("BARK_PUSH").startswith("http"): 100 | url = f'{push_config.get("BARK_PUSH")}/{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}' 101 | else: 102 | url = f'https://api.day.app/{push_config.get("BARK_PUSH")}/{urllib.parse.quote_plus(title)}/{urllib.parse.quote_plus(content)}' 103 | 104 | bark_params = { 105 | "BARK_ARCHIVE": "isArchive", 106 | "BARK_GROUP": "group", 107 | "BARK_SOUND": "sound", 108 | "BARK_ICON": "icon", 109 | } 110 | params = "" 111 | for pair in filter( 112 | lambda pairs: pairs[0].startswith("BARK_") 113 | and pairs[0] != "BARK_PUSH" 114 | and pairs[1] 115 | and bark_params.get(pairs[0]), 116 | push_config.items(), 117 | ): 118 | params += f"{bark_params.get(pair[0])}={pair[1]}&" 119 | if params: 120 | url = url + "?" + params.rstrip("&") 121 | response = requests.get(url).json() 122 | 123 | if response["code"] == 200: 124 | print("bark 推送成功!") 125 | else: 126 | print("bark 推送失败!") 127 | 128 | 129 | def console(title: str, content: str) -> None: 130 | """ 131 | 使用 控制台 推送消息。 132 | """ 133 | print(f"{title}\n\n{content}") 134 | 135 | 136 | def dingding_bot(title: str, content: str) -> None: 137 | """ 138 | 使用 钉钉机器人 推送消息。 139 | """ 140 | if not push_config.get("DD_BOT_SECRET") or not push_config.get("DD_BOT_TOKEN"): 141 | print("钉钉机器人 服务的 DD_BOT_SECRET 或者 DD_BOT_TOKEN 未设置!!\n取消推送") 142 | return 143 | print("钉钉机器人 服务启动") 144 | 145 | timestamp = str(round(time.time() * 1000)) 146 | secret_enc = push_config.get("DD_BOT_SECRET").encode("utf-8") 147 | string_to_sign = "{}\n{}".format(timestamp, push_config.get("DD_BOT_SECRET")) 148 | string_to_sign_enc = string_to_sign.encode("utf-8") 149 | hmac_code = hmac.new( 150 | secret_enc, string_to_sign_enc, digestmod=hashlib.sha256 151 | ).digest() 152 | sign = urllib.parse.quote_plus(base64.b64encode(hmac_code)) 153 | url = f'https://oapi.dingtalk.com/robot/send?access_token={push_config.get("DD_BOT_TOKEN")}×tamp={timestamp}&sign={sign}' 154 | headers = {"Content-Type": "application/json;charset=utf-8"} 155 | data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} 156 | response = requests.post( 157 | url=url, data=json.dumps(data), headers=headers, timeout=15 158 | ).json() 159 | 160 | if not response["errcode"]: 161 | print("钉钉机器人 推送成功!") 162 | else: 163 | print("钉钉机器人 推送失败!") 164 | 165 | 166 | def feishu_bot(title: str, content: str) -> None: 167 | """ 168 | 使用 飞书机器人 推送消息。 169 | """ 170 | if not push_config.get("FSKEY"): 171 | print("飞书 服务的 FSKEY 未设置!!\n取消推送") 172 | return 173 | print("飞书 服务启动") 174 | 175 | url = f'https://open.feishu.cn/open-apis/bot/v2/hook/{push_config.get("FSKEY")}' 176 | data = {"msg_type": "text", "content": {"text": f"{title}\n\n{content}"}} 177 | response = requests.post(url, data=json.dumps(data)).json() 178 | 179 | if response.get("StatusCode") == 0: 180 | print("飞书 推送成功!") 181 | else: 182 | print("飞书 推送失败!错误信息如下:\n", response) 183 | 184 | 185 | def go_cqhttp(title: str, content: str) -> None: 186 | """ 187 | 使用 go_cqhttp 推送消息。 188 | """ 189 | if not push_config.get("GOBOT_URL") or not push_config.get("GOBOT_QQ"): 190 | print("go-cqhttp 服务的 GOBOT_URL 或 GOBOT_QQ 未设置!!\n取消推送") 191 | return 192 | print("go-cqhttp 服务启动") 193 | 194 | url = f'{push_config.get("GOBOT_URL")}?access_token={push_config.get("GOBOT_TOKEN")}&{push_config.get("GOBOT_QQ")}&message=标题:{title}\n内容:{content}' 195 | response = requests.get(url).json() 196 | 197 | if response["status"] == "ok": 198 | print("go-cqhttp 推送成功!") 199 | else: 200 | print("go-cqhttp 推送失败!") 201 | 202 | 203 | def gotify(title:str,content:str) -> None: 204 | """ 205 | 使用 gotify 推送消息。 206 | """ 207 | if not push_config.get("GOTIFY_URL") or not push_config.get("GOTIFY_TOKEN"): 208 | print("gotify 服务的 GOTIFY_URL 或 GOTIFY_TOKEN 未设置!!\n取消推送") 209 | return 210 | print("gotify 服务启动") 211 | 212 | url = f'{push_config.get("GOTIFY_URL")}/message?token={push_config.get("GOTIFY_TOKEN")}' 213 | data = {"title": title,"message": content,"priority": push_config.get("GOTIFY_PRIORITY")} 214 | response = requests.post(url,data=data).json() 215 | 216 | if response.get("id"): 217 | print("gotify 推送成功!") 218 | else: 219 | print("gotify 推送失败!") 220 | 221 | 222 | def iGot(title: str, content: str) -> None: 223 | """ 224 | 使用 iGot 推送消息。 225 | """ 226 | if not push_config.get("IGOT_PUSH_KEY"): 227 | print("iGot 服务的 IGOT_PUSH_KEY 未设置!!\n取消推送") 228 | return 229 | print("iGot 服务启动") 230 | 231 | url = f'https://push.hellyw.com/{push_config.get("IGOT_PUSH_KEY")}' 232 | data = {"title": title, "content": content} 233 | headers = {"Content-Type": "application/x-www-form-urlencoded"} 234 | response = requests.post(url, data=data, headers=headers).json() 235 | 236 | if response["ret"] == 0: 237 | print("iGot 推送成功!") 238 | else: 239 | print(f'iGot 推送失败!{response["errMsg"]}') 240 | 241 | 242 | def serverJ(title: str, content: str) -> None: 243 | """ 244 | 通过 serverJ 推送消息。 245 | """ 246 | if not push_config.get("PUSH_KEY"): 247 | print("serverJ 服务的 PUSH_KEY 未设置!!\n取消推送") 248 | return 249 | print("serverJ 服务启动") 250 | 251 | data = {"text": title, "desp": content.replace("\n", "\n\n")} 252 | if push_config.get("PUSH_KEY").index("SCT") != -1: 253 | url = f'https://sctapi.ftqq.com/{push_config.get("PUSH_KEY")}.send' 254 | else: 255 | url = f'https://sc.ftqq.com/${push_config.get("PUSH_KEY")}.send' 256 | response = requests.post(url, data=data).json() 257 | 258 | if response.get("errno") == 0 or response.get("code") == 0: 259 | print("serverJ 推送成功!") 260 | else: 261 | print(f'serverJ 推送失败!错误码:{response["message"]}') 262 | 263 | 264 | def pushplus_bot(title: str, content: str) -> None: 265 | """ 266 | 通过 push+ 推送消息。 267 | """ 268 | if not push_config.get("PUSH_PLUS_TOKEN"): 269 | print("PUSHPLUS 服务的 PUSH_PLUS_TOKEN 未设置!!\n取消推送") 270 | return 271 | print("PUSHPLUS 服务启动") 272 | 273 | url = "http://www.pushplus.plus/send" 274 | data = { 275 | "token": push_config.get("PUSH_PLUS_TOKEN"), 276 | "title": title, 277 | "content": content, 278 | "topic": push_config.get("PUSH_PLUS_USER"), 279 | } 280 | body = json.dumps(data).encode(encoding="utf-8") 281 | headers = {"Content-Type": "application/json"} 282 | response = requests.post(url=url, data=body, headers=headers).json() 283 | 284 | if response["code"] == 200: 285 | print("PUSHPLUS 推送成功!") 286 | 287 | else: 288 | 289 | url_old = "http://pushplus.hxtrip.com/send" 290 | headers["Accept"] = "application/json" 291 | response = requests.post(url=url_old, data=body, headers=headers).json() 292 | 293 | if response["code"] == 200: 294 | print("PUSHPLUS(hxtrip) 推送成功!") 295 | 296 | else: 297 | print("PUSHPLUS 推送失败!") 298 | 299 | 300 | def qmsg_bot(title: str, content: str) -> None: 301 | """ 302 | 使用 qmsg 推送消息。 303 | """ 304 | if not push_config.get("QMSG_KEY") or not push_config.get("QMSG_TYPE"): 305 | print("qmsg 的 QMSG_KEY 或者 QMSG_TYPE 未设置!!\n取消推送") 306 | return 307 | print("qmsg 服务启动") 308 | 309 | url = f'https://qmsg.zendee.cn/{push_config.get("QMSG_TYPE")}/{push_config.get("QMSG_KEY")}' 310 | payload = {"msg": f'{title}\n\n{content.replace("----", "-")}'.encode("utf-8")} 311 | response = requests.post(url=url, params=payload).json() 312 | 313 | if response["code"] == 0: 314 | print("qmsg 推送成功!") 315 | else: 316 | print(f'qmsg 推送失败!{response["reason"]}') 317 | 318 | 319 | def wecom_app(title: str, content: str) -> None: 320 | """ 321 | 通过 企业微信 APP 推送消息。 322 | """ 323 | if not push_config.get("QYWX_AM"): 324 | print("QYWX_AM 未设置!!\n取消推送") 325 | return 326 | QYWX_AM_AY = re.split(",", push_config.get("QYWX_AM")) 327 | if 4 < len(QYWX_AM_AY) > 5: 328 | print("QYWX_AM 设置错误!!\n取消推送") 329 | return 330 | print("企业微信 APP 服务启动") 331 | 332 | corpid = QYWX_AM_AY[0] 333 | corpsecret = QYWX_AM_AY[1] 334 | touser = QYWX_AM_AY[2] 335 | agentid = QYWX_AM_AY[3] 336 | try: 337 | media_id = QYWX_AM_AY[4] 338 | except IndexError: 339 | media_id = "" 340 | wx = WeCom(corpid, corpsecret, agentid) 341 | # 如果没有配置 media_id 默认就以 text 方式发送 342 | if not media_id: 343 | message = title + "\n\n" + content 344 | response = wx.send_text(message, touser) 345 | else: 346 | response = wx.send_mpnews(title, content, media_id, touser) 347 | 348 | if response == "ok": 349 | print("企业微信推送成功!") 350 | else: 351 | print("企业微信推送失败!错误信息如下:\n", response) 352 | 353 | 354 | class WeCom: 355 | def __init__(self, corpid, corpsecret, agentid): 356 | self.CORPID = corpid 357 | self.CORPSECRET = corpsecret 358 | self.AGENTID = agentid 359 | 360 | def get_access_token(self): 361 | url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken" 362 | values = { 363 | "corpid": self.CORPID, 364 | "corpsecret": self.CORPSECRET, 365 | } 366 | req = requests.post(url, params=values) 367 | data = json.loads(req.text) 368 | return data["access_token"] 369 | 370 | def send_text(self, message, touser="@all"): 371 | send_url = ( 372 | "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" 373 | + self.get_access_token() 374 | ) 375 | send_values = { 376 | "touser": touser, 377 | "msgtype": "text", 378 | "agentid": self.AGENTID, 379 | "text": {"content": message}, 380 | "safe": "0", 381 | } 382 | send_msges = bytes(json.dumps(send_values), "utf-8") 383 | respone = requests.post(send_url, send_msges) 384 | respone = respone.json() 385 | return respone["errmsg"] 386 | 387 | def send_mpnews(self, title, message, media_id, touser="@all"): 388 | send_url = ( 389 | "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" 390 | + self.get_access_token() 391 | ) 392 | send_values = { 393 | "touser": touser, 394 | "msgtype": "mpnews", 395 | "agentid": self.AGENTID, 396 | "mpnews": { 397 | "articles": [ 398 | { 399 | "title": title, 400 | "thumb_media_id": media_id, 401 | "author": "Author", 402 | "content_source_url": "", 403 | "content": message.replace("\n", "
"), 404 | "digest": message, 405 | } 406 | ] 407 | }, 408 | } 409 | send_msges = bytes(json.dumps(send_values), "utf-8") 410 | respone = requests.post(send_url, send_msges) 411 | respone = respone.json() 412 | return respone["errmsg"] 413 | 414 | 415 | def wecom_bot(title: str, content: str) -> None: 416 | """ 417 | 通过 企业微信机器人 推送消息。 418 | """ 419 | if not push_config.get("QYWX_KEY"): 420 | print("企业微信机器人 服务的 QYWX_KEY 未设置!!\n取消推送") 421 | return 422 | print("企业微信机器人服务启动") 423 | 424 | url = f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={push_config.get('QYWX_KEY')}" 425 | headers = {"Content-Type": "application/json;charset=utf-8"} 426 | data = {"msgtype": "text", "text": {"content": f"{title}\n\n{content}"}} 427 | response = requests.post( 428 | url=url, data=json.dumps(data), headers=headers, timeout=15 429 | ).json() 430 | 431 | if response["errcode"] == 0: 432 | print("企业微信机器人推送成功!") 433 | else: 434 | print("企业微信机器人推送失败!") 435 | 436 | 437 | def telegram_bot(title: str, content: str) -> None: 438 | """ 439 | 使用 telegram 机器人 推送消息。 440 | """ 441 | if not push_config.get("TG_BOT_TOKEN") or not push_config.get("TG_USER_ID"): 442 | print("tg 服务的 bot_token 或者 user_id 未设置!!\n取消推送") 443 | return 444 | print("tg 服务启动") 445 | 446 | if push_config.get("TG_API_HOST"): 447 | url = f"https://{push_config.get('TG_API_HOST')}/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" 448 | else: 449 | url = ( 450 | f"https://api.telegram.org/bot{push_config.get('TG_BOT_TOKEN')}/sendMessage" 451 | ) 452 | headers = {"Content-Type": "application/x-www-form-urlencoded"} 453 | payload = { 454 | "chat_id": str(push_config.get("TG_USER_ID")), 455 | "text": f"{title}\n\n{content}", 456 | "disable_web_page_preview": "true", 457 | } 458 | proxies = None 459 | if push_config.get("TG_PROXY_HOST") and push_config.get("TG_PROXY_PORT"): 460 | if push_config.get("TG_PROXY_AUTH") is not None and "@" not in push_config.get( 461 | "TG_PROXY_HOST" 462 | ): 463 | push_config["TG_PROXY_HOST"] = ( 464 | push_config.get("TG_PROXY_AUTH") 465 | + "@" 466 | + push_config.get("TG_PROXY_HOST") 467 | ) 468 | proxyStr = "http://{}:{}".format( 469 | push_config.get("TG_PROXY_HOST"), push_config.get("TG_PROXY_PORT") 470 | ) 471 | proxies = {"http": proxyStr, "https": proxyStr} 472 | response = requests.post( 473 | url=url, headers=headers, params=payload, proxies=proxies 474 | ).json() 475 | 476 | if response["ok"]: 477 | print("tg 推送成功!") 478 | else: 479 | print("tg 推送失败!") 480 | 481 | 482 | def one() -> str: 483 | """ 484 | 获取一条一言。 485 | :return: 486 | """ 487 | url = "https://v1.hitokoto.cn/" 488 | res = requests.get(url).json() 489 | return res["hitokoto"] + " ----" + res["from"] 490 | 491 | 492 | if push_config.get("BARK_PUSH"): 493 | notify_function.append(bark) 494 | if push_config.get("CONSOLE"): 495 | notify_function.append(console) 496 | if push_config.get("DD_BOT_TOKEN") and push_config.get("DD_BOT_SECRET"): 497 | notify_function.append(dingding_bot) 498 | if push_config.get("FSKEY"): 499 | notify_function.append(feishu_bot) 500 | if push_config.get("GOBOT_URL") and push_config.get("GOBOT_QQ"): 501 | notify_function.append(go_cqhttp) 502 | if push_config.get("GOTIFY_URL") and push_config.get("GOTIFY_TOKEN"): 503 | notify_function.append(gotify) 504 | if push_config.get("IGOT_PUSH_KEY"): 505 | notify_function.append(iGot) 506 | if push_config.get("PUSH_KEY"): 507 | notify_function.append(serverJ) 508 | if push_config.get("PUSH_PLUS_TOKEN"): 509 | notify_function.append(pushplus_bot) 510 | if push_config.get("QMSG_KEY") and push_config.get("QMSG_TYPE"): 511 | notify_function.append(qmsg_bot) 512 | if push_config.get("QYWX_AM"): 513 | notify_function.append(wecom_app) 514 | if push_config.get("QYWX_KEY"): 515 | notify_function.append(wecom_bot) 516 | if push_config.get("TG_BOT_TOKEN") and push_config.get("TG_USER_ID"): 517 | notify_function.append(telegram_bot) 518 | 519 | 520 | def send(title: str, content: str) -> None: 521 | if not content: 522 | print(f"{title} 推送内容为空!") 523 | return 524 | content += '\nBy: 可萌の羊毛' 525 | 526 | hitokoto = push_config.get("HITOKOTO") 527 | 528 | text = one() if hitokoto else "" 529 | content += "\n\n" + text 530 | 531 | ts = [ 532 | threading.Thread(target=mode, args=(title, content), name=mode.__name__) 533 | for mode in notify_function 534 | ] 535 | [t.start() for t in ts] 536 | [t.join() for t in ts] 537 | 538 | 539 | def main(): 540 | send("title", "content") 541 | 542 | 543 | if __name__ == "__main__": 544 | main() 545 | -------------------------------------------------------------------------------- /sysxc.py: -------------------------------------------------------------------------------- 1 | """ 2 | 书亦烧仙草 v1.0 3 | 4 | 任务:签到 5 | 6 | 自行捉包把scrm-prod.shuyi.org.cn域名请求头里的auth填到变量 sysxc_auth 中, 多账号&隔开 7 | export sysxc_auth="" 8 | 9 | cron: 5 9,18 * * * 10 | const $ = new Env("书亦烧仙草"); 11 | """ 12 | 13 | import requests, base64, json, time, os 14 | 15 | try: 16 | from Crypto.Cipher import AES 17 | except: 18 | print( 19 | "\n未检测到pycryptodome\n需要Python依赖里安装pycryptodome\n安装失败先linux依赖里安装gcc、python3-dev、libc-dev") 20 | exit(0) 21 | 22 | def setHeaders(i): 23 | headers = { 24 | "auth": cookies[i], 25 | "hostname": "scrm-prod.shuyi.org.cn", 26 | "content-type": "application/json", 27 | "host": "scrm-prod.shuyi.org.cn", 28 | "User-Agent": "Mozilla/5.0 (Linux; Android 10; V2203A Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5023 MMWEBSDK/20221012 MMWEBID/1571 MicroMessenger/8.0.30.2260(0x28001E55) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android" 29 | } 30 | return headers 31 | 32 | cookies = [] 33 | try: 34 | cookies = os.environ["sysxc_auth"].split("&") 35 | if len(os.environ["sysxc_auth"]) > 0: 36 | print("已获取并使用Env环境Cookie\n") 37 | 38 | 39 | except: 40 | print( 41 | "【提示】请先获取微信小程序[书亦烧仙草]请求头中的auth\n环境变量添加: sysxc_auth") 42 | exit(3) 43 | 44 | def getVCode(headers): 45 | """获取滑块图片""" 46 | data = { 47 | "captchaType": "blockPuzzle", 48 | "clientUid": "slider-6292e85b-e871-4abd-89df-4d97709c6e0c", 49 | "ts": int(time.time() * 1000) 50 | } 51 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/getVCode' 52 | response = requests.post(url, json=data, headers=headers) 53 | return response.json() 54 | 55 | 56 | 57 | def ocr(tg,bg): 58 | """使用自有ocr识别滑块坐标""" 59 | url = 'http://47.120.9.145:3001/slide/match/b64/json' 60 | jsonstr = json.dumps({'target_img': tg, 'bg_img': bg}) 61 | response = requests.post(url, data=base64.b64encode(jsonstr.encode()).decode()) 62 | return response.json() 63 | 64 | 65 | ''' 66 | 采用AES对称加密算法 67 | ''' 68 | 69 | BLOCK_SIZE = 16 # Bytes 70 | pad = lambda s: s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \ 71 | chr(BLOCK_SIZE - len(s) % BLOCK_SIZE) 72 | unpad = lambda s: s[:-ord(s[len(s) - 1:])] 73 | 74 | 75 | def aesEncrypt(key, data): 76 | ''' 77 | AES的ECB模式加密方法 78 | :param key: 密钥 79 | :param data:被加密字符串(明文) 80 | :return:密文 81 | ''' 82 | key = key.encode('utf8') 83 | # 字符串补位 84 | data = pad(data) 85 | cipher = AES.new(key, AES.MODE_ECB) 86 | # 加密后得到的是bytes类型的数据,使用Base64进行编码,返回byte字符串 87 | result = cipher.encrypt(data.encode()) 88 | encodestrs = base64.b64encode(result) 89 | enctext = encodestrs.decode('utf8') 90 | return enctext 91 | 92 | 93 | def aesDecrypt(key, data): 94 | ''' 95 | :param key: 密钥 96 | :param data: 加密后的数据(密文) 97 | :return:明文 98 | ''' 99 | key = key.encode('utf8') 100 | data = base64.b64decode(data) 101 | cipher = AES.new(key, AES.MODE_ECB) 102 | 103 | # 去补位 104 | text_decrypted = unpad(cipher.decrypt(data)) 105 | text_decrypted = text_decrypted.decode('utf8') 106 | return text_decrypted 107 | 108 | 109 | def checkVCode(pointJson, token): 110 | """验证""" 111 | try: 112 | data = { 113 | "captchaType": "blockPuzzle", 114 | "pointJson": pointJson, 115 | "token": token 116 | } 117 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/checkVCode' 118 | response = requests.post(url, json=data, headers=headers) 119 | result = response.json() 120 | # print(result) 121 | resultCode = result['resultCode'] 122 | if resultCode == '0000': 123 | print('校验结果:', '成功') 124 | else: 125 | print('校验结果:', result['resultMsg']) 126 | 127 | except Exception as err: 128 | print(err) 129 | 130 | 131 | def check_sign(pointJson): 132 | """签到""" 133 | try: 134 | data = { 135 | "captchaVerification": pointJson 136 | } 137 | url = 'https://scrm-prod.shuyi.org.cn/saas-gateway/api/agg-trade/v1/signIn/insertSignInV3' 138 | response = requests.post(url, json=data, headers=headers) 139 | result = response.json() 140 | resultCode = result['resultCode'] 141 | if resultCode == '0': 142 | print("签到结果: 第{result['data']['days']天} 获得{result['data']['pointRewardNum']积分}") 143 | else: 144 | print('签到结果:', result['resultMsg']) 145 | except Exception as err: 146 | print(err) 147 | 148 | def main(): 149 | result = getVCode(headers) 150 | bg = result['data']['originalImageBase64'] 151 | tg = result['data']['jigsawImageBase64'] 152 | key = result['data']['secretKey'] 153 | token = result['data']['token'] 154 | print('本次口令为:', token) 155 | print('本次密钥为:', key) 156 | time.sleep(1.5) 157 | print("--------------------识别滑块--------------------") 158 | result = ocr(tg,bg) 159 | res = result['result']['target'] 160 | d = (res[0]) 161 | print('滑动距离为:', d) 162 | print("--------------------执行算法--------------------") 163 | aes_str = json.dumps({"x": d, "y": 5}) 164 | data = aes_str.replace(' ', '') 165 | print('加密前:', data) 166 | time.sleep(1.5) 167 | ecdata = aesEncrypt(key, data) 168 | aesDecrypt(key, ecdata) 169 | pointJson = aesEncrypt(key, data) 170 | print('加密后:', pointJson) 171 | print("--------------------校验滑块--------------------") 172 | checkVCode(pointJson, token) 173 | print("--------------------开始签到--------------------") 174 | str = (token + '---' + aes_str) 175 | data = str.replace(' ', '') 176 | ecdata = aesEncrypt(key, data) 177 | aesDecrypt(key, ecdata) 178 | pointJson = aesEncrypt(key, data) 179 | time.sleep(0.5) 180 | check_sign(pointJson) 181 | 182 | if __name__ == '__main__': 183 | 184 | print("--------------------任务开始--------------------") 185 | for i in range(len(cookies)): 186 | print(f"\n开始第{i + 1}个账号") 187 | headers = setHeaders(i) 188 | main() 189 | 190 | -------------------------------------------------------------------------------- /twkj.js: -------------------------------------------------------------------------------- 1 | /* 2 | 天问科技-7日打卡 v1.0 3 | 赚钱天天乐 同一家得 满一元 提现秒到支付宝 【仅写了签到和查余额】后续补充提现 4 | 抓包 taokeout.jutuike.com 域名header 里面XX-Token 的值 多账户 @ 或者 回车 分开 5 | 变量名: TWtoken 6 | 7 | cron: 18 18 * * * 8 | */ 9 | const $ = new Env("天问科技-7日打卡"); 10 | let envSplitor = ['@', '\n'] 11 | let result, resurq, resurp, abcd = [], ooOoo = [], oOoo = 0, userCount = 0, OooOo = 'TWtoken' 12 | let userCookie = ($.isNode() ? process.env[OooOo] : $.getdata(OooOo)) || ''; 13 | /////////////////////////////////////////////////////////////////// 14 | const _0x4bc5fc=_0x3c70;function _0x166e(){const _0x95c39=['\x69\x6f\x6e\x3d\x33\x2e\x34\x2e\x39\x26','\x61\x63\x30\x61\x38\x35\x35','\x61\x70\x70\x69\x64\x3d\x77\x78\x30\x66','\x36\x65\x34\x62\x63\x35\x65\x36\x61\x37','\x66\x62\x61\x63\x37\x32\x61\x61\x32\x37','\x73\x69\x67\x6e\x3d\x66\x65\x33\x34\x36','\x31\x30\x34\x38\x32\x34\x39\x30\x77\x68\x69\x55\x63\x4e','\x31\x38\x39\x6f\x6b\x44\x5a\x52\x75','\x31\x32\x34\x38\x32\x39\x34\x47\x78\x56\x69\x50\x74','\x32\x33\x31\x38\x36\x39\x39\x39\x59\x77\x46\x50\x67\x43','\x38\x37\x49\x51\x46\x71\x6f\x71','\x37\x70\x44\x61\x6a\x78\x67','\x38\x34\x38\x34\x34\x65\x48\x78\x73\x62\x72','\x33\x33\x30\x32\x50\x43\x51\x50\x67\x4f','\x32\x38\x38\x37\x32\x38\x48\x76\x6e\x72\x4b\x42','\x33\x33\x35\x39\x39\x35\x30\x58\x65\x52\x41\x62\x6e','\x38\x30\x74\x49\x77\x48\x54\x7a'];_0x166e=function(){return _0x95c39;};return _0x166e();}function _0x3c70(_0x5d1e5c,_0x406c5a){const _0xb273d2=_0x166e();return _0x3c70=function(_0x3365ca,_0x351222){_0x3365ca=_0x3365ca-(0x217e+0x1*0x250d+-0x1b1*0x29);let _0x48c14a=_0xb273d2[_0x3365ca];return _0x48c14a;},_0x3c70(_0x5d1e5c,_0x406c5a);}(function(_0x2176e1,_0xa2ca){const _0x23fbaf=_0x3c70,_0x210ffc=_0x2176e1();while(!![]){try{const _0x44a37c=-parseInt(_0x23fbaf(0x141))/(0x2*0x694+0xabc*0x3+-0x2d5b)*(-parseInt(_0x23fbaf(0x133))/(-0xec9+0x1a0c+-0x1*0xb41))+parseInt(_0x23fbaf(0x13e))/(-0x1*0x177f+0xb11+-0x27d*-0x5)*(parseInt(_0x23fbaf(0x140))/(-0x1*0x156b+-0x87a+0x1de9))+-parseInt(_0x23fbaf(0x132))/(0xce*0x26+-0xd0c+0x1183*-0x1)+parseInt(_0x23fbaf(0x13c))/(0x103b+-0x18f+-0x32*0x4b)*(parseInt(_0x23fbaf(0x13f))/(0xbb8+0x71*-0x8+-0x829))+-parseInt(_0x23fbaf(0x142))/(0x17*-0x8+-0x1*0x1bc5+-0x31*-0x95)*(parseInt(_0x23fbaf(0x13b))/(-0x1*-0x416+0x1490+-0x189d))+-parseInt(_0x23fbaf(0x13a))/(-0x67*0x3+-0x321+0x460)+parseInt(_0x23fbaf(0x13d))/(-0x838+-0x160a+0x1e4d);if(_0x44a37c===_0xa2ca)break;else _0x210ffc['push'](_0x210ffc['shift']());}catch(_0x8aa09c){_0x210ffc['push'](_0x210ffc['shift']());}}}(_0x166e,-0xd99*-0x97+0x7b16e+0x2*-0x364bf));let o0O=_0x4bc5fc(0x136)+_0x4bc5fc(0x137)+'\x64\x32\x30\x64\x26\x64\x65\x76\x69\x63'+'\x65\x3d\x78\x63\x78\x26\x76\x65\x72\x73'+_0x4bc5fc(0x134)+_0x4bc5fc(0x139)+_0x4bc5fc(0x138)+'\x61\x64\x63\x39\x35\x65\x66\x34\x63\x62'+_0x4bc5fc(0x135); 15 | class UserInfo {constructor(str) {this.ooo = ++oOoo, this.ooO = `账号 [${this.ooo}] `, this.Ooo=str} 16 | async OoO() {await this.Oo()} 17 | async oOo() {await httpRequest('post', popu(`https://taokeout.jutuike.com/Profit/myProfit`, await this._o(), o0O)) 18 | if (resurp.statusCode==200) 19 | result.code==1&&console.log(`${this.ooO}总收益 [${result.data.accumulate_proft}] 余额 [${result.data.balance}]`)} 20 | async oO() {await httpRequest('post', popu(`https://taokeout.jutuike.com/punch/punchTheClock`, await this._o(), o0O)) 21 | if (resurp.statusCode==200) 22 | result.code==1&&console.log(`${this.ooO}${result.msg} 已打卡[${result.data.counter}]天`)} 23 | async Oo() {await this.oOo(),await this.oO()} 24 | async _o() {return this.h={"Accept-Encoding":"gzip,compress,br,deflate","Content-Type":"application/x-www-form-urlencoded",Connection:"keep-alive",Referer:"https://servicewechat.com/wx0f6e4bc5e6a7d20d/2/page-frame.html",Host:"taokeout.jutuike.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.20(0x18001442) NetType/WIFI Language/zh_CN","XX-Token":this.Ooo};} 25 | }(async()=>{if(await checkEnv()){for(let a of ooOoo)abcd.push(a.OoO());await Promise.all(abcd)}})().catch(a=>console.log(a)).finally(()=>$.done()); 26 | async function checkEnv(){if(userCookie){let e=envSplitor[0];for(let f of envSplitor)if(userCookie.indexOf(f)>-1){e=f;break}for(let l of userCookie.split(e))l&&ooOoo.push(new UserInfo(l));userCount=ooOoo.length}else console.log(`查询[${OooOo}]变量`);return console.log(`找到 ${userCount}个账号`),!0} 27 | function popu(e,t,n=""){e.replace("//","/").split("/")[1];let l={url:e,headers:t,timeout:12e3};return n&&(l.body=n,l.headers["Content-Length"]=n?.length||0),l}async function httpRequest(e,t){return result=null,resurq=null,resurp=null,new Promise(n=>{$.send(e,t,async(e,t,l)=>{try{if(resurq=t,resurp=l,e);else if(l.body){if("object"==typeof l.body)result=l.body;else try{result=JSON.parse(l.body)}catch(o){result=l.body}}}catch(y){console.log(y)}finally{n()}})})} 28 | function Env(e,s){return"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0),new class{constructor(e,s){this.name=e,this.notifyStr="",this.startTime=(new Date).getTime(),Object.assign(this,s),console.log(`${this.name} 开始运行: 29 | `)}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(e){let s=this.getval(e);if(/^@/.test(e)){let[,i,n]=/^@(.*?)\.(.*?)$/.exec(e),r=i?this.getval(i):"";if(r)try{let o=JSON.parse(r);s=o?this.lodash_get(o,n,""):s}catch(a){s=""}}return s}setdata(e,s){let i=!1;if(/^@/.test(s)){let[,n,r]=/^@(.*?)\.(.*?)$/.exec(s),o=this.getval(n);try{let a=JSON.parse(n?"null"===o?null:o||"{}":"{}");this.lodash_set(a,r,e),i=this.setval(JSON.stringify(a),n)}catch(l){let h={};this.lodash_set(h,r,e),i=this.setval(JSON.stringify(h),n)}}else i=this.setval(e,s);return i}getval(e){return this.isSurge()||this.isLoon()?$persistentStore.read(e):this.isQuanX()?$prefs.valueForKey(e):this.isNode()?(this.data=this.loaddata(),this.data[e]):this.data&&this.data[e]||null}setval(e,s){return this.isSurge()||this.isLoon()?$persistentStore.write(e,s):this.isQuanX()?$prefs.setValueForKey(e,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=e,this.writedata(),!0):this.data&&this.data[s]||null}send(e,s,i=()=>{}){if("get"!=e&&"post"!=e&&"put"!=e&&"delete"!=e){console.log(`无效的http方法:${e}`);return}if("get"==e&&s.headers?(delete s.headers["Content-Type"],delete s.headers["Content-Length"]):s.body&&s.headers&&(s.headers["Content-Type"]||(s.headers["Content-Type"]="application/x-www-form-urlencoded")),this.isSurge()||this.isLoon()){this.isSurge()&&this.isNeedRewrite&&(s.headers=s.headers||{},Object.assign(s.headers,{"X-Surge-Skip-Scripting":!1}));let n={method:e,url:s.url,headers:s.headers,timeout:s.timeout,data:s.body};"get"==e&&delete n.data,$axios(n).then(e=>{let{status:s,request:n,headers:r,data:o}=e;i(null,n,{statusCode:s,headers:r,body:o})}).catch(e=>console.log(e))}else if(this.isQuanX())s.method=e.toUpperCase(),this.isNeedRewrite&&(s.opts=s.opts||{},Object.assign(s.opts,{hints:!1})),$task.fetch(s).then(e=>{let{statusCode:s,request:n,headers:r,body:o}=e;i(null,n,{statusCode:s,headers:r,body:o})},e=>i(e));else if(this.isNode()){this.got=this.got?this.got:require("got");let{url:r,...o}=s;this.instance=this.got.extend({followRedirect:!1}),this.instance[e](r,o).then(e=>{let{statusCode:s,request:n,headers:r,body:o}=e;i(null,n,{statusCode:s,headers:r,body:o})},e=>{let{message:s,response:n}=e;i(s,n,n&&n.body)})}}time(e){let s={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"h+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};for(let i in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length))),s)RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?s[i]:("00"+s[i]).substr((""+s[i]).length)));return e}async showmsg(){if(!this.notifyStr)return;let e=this.name+" 运行通知\n\n"+this.notifyStr;if($.isNode()){var s=require("./sendNotify");console.log("\n============== 推送 =============="),await s.sendNotify(this.name,e)}else this.msg(e)}logAndNotify(e){console.log(e),this.notifyStr+=e,this.notifyStr+="\n"}msg(e=t,s="",i="",n){let r=e=>{if(!e)return e;if("string"==typeof e)return this.isLoon()?e:this.isQuanX()?{"open-url":e}:this.isSurge()?{url:e}:void 0;if("object"==typeof e){if(this.isLoon()){let s;return{openUrl:e.openUrl||e.url||e["open-url"],mediaUrl:e.mediaUrl||e["media-url"]}}if(this.isQuanX()){let i;return{"open-url":e["open-url"]||e.url||e.openUrl,"media-url":e["media-url"]||e.mediaUrl}}if(this.isSurge())return{url:e.url||e.openUrl||e["open-url"]}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,r(n)):this.isQuanX()&&$notify(e,s,i,r(n)));let o=["","============== 系统通知 =============="];o.push(e),s&&o.push(s),i&&o.push(i),console.log(o.join("\n"))}getMin(e,s){return en.length?s-n.length:0,o="";for(let a=0;asetTimeout(s,e))}done(e={}){let s=((new Date).getTime()-this.startTime)/1e3;console.log(` 30 | ${this.name} 运行结束,共运行了 ${s} 秒!`),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(e)}}(e,s)} 31 | -------------------------------------------------------------------------------- /wapj.py: -------------------------------------------------------------------------------- 1 | """ 2 | 吾爱破解 v1.0 3 | 4 | 任务:签到 5 | 6 | 抓取 https://www.52pojie.cn/forum.php 整段cookie 7 | export wapj="" 多账户 # 分割 8 | 9 | cron: 5 0,9 * * * 10 | const $ = new Env("吾爱破解"); 11 | """ 12 | 13 | import requests, os, sys 14 | from bs4 import BeautifulSoup 15 | from datetime import datetime 16 | from sendNotify import send 17 | #检测账户变量 18 | wapj = os.environ.get("wapj") if os.environ.get("wapj") else "" 19 | if not wapj: 20 | print("⚠️未发现有效cookie,退出程序!") 21 | sys.exit() 22 | #分割账户 23 | account = wapj.split('#') 24 | for i in account: 25 | findAccount = i.split('#') 26 | zhcookie = findAccount[0] 27 | cookie = ([zhcookie]) 28 | #print(cookie) 29 | #主程序 30 | for i in range(len(cookie)): 31 | title = '🔁吾爱破解-签到' 32 | print(title) 33 | print("🔁环境变量[ wapj ]加载成功") 34 | print(f'🔁共找到{i+1}个账号') 35 | print('*************') 36 | print(f'🔁开始第{i+1}个帐号签到') 37 | headers = { 38 | "Cookie": f'{cookie[i]}', 39 | "ContentType": "text/html;charset=gbk", 40 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", 41 | } 42 | requests.session().put( 43 | "https://www.52pojie.cn/home.php?mod=task&do=apply&id=2", headers=headers 44 | ) 45 | fa = requests.session().put( 46 | "https://www.52pojie.cn/home.php?mod=task&do=draw&id=2", headers=headers 47 | ) 48 | fb = BeautifulSoup(fa.text, "html.parser") 49 | fc = fb.find("div", id="messagetext").find("p").text 50 | if "⚠️您需要先登录才能继续本操作" in fc: 51 | print("⚠️Cookie 失效") 52 | msg = f"⏰{str(datetime.now())[:19]}\n" + "⚠️Cookie 失效" 53 | elif "✅恭喜" in fc: 54 | print("✅签到成功") 55 | msg = f"⏰{str(datetime.now())[:19]}\n" + "✅签到成功" 56 | elif "⚠️不是进行中的任务" in fc: 57 | print("✅今日已签到") 58 | msg = f"⏰{str(datetime.now())[:19]}\n" + "✅今日已签到" 59 | else: 60 | print("⚠️签到失败") 61 | msg = f"⏰{str(datetime.now())[:19]}\n" + "⚠️签到失败" 62 | # 执行完毕发送通知 63 | print('*************' + '\n' + '🔁开始发送通知') 64 | send(title,msg) -------------------------------------------------------------------------------- /wxyd.py: -------------------------------------------------------------------------------- 1 | """ 2 | 微信阅读 v1.0 3 | 4 | 任务:刷文章 提现 5 | 6 | cookie填到变量 wxyd 中, 多账户&间隔 7 | export wxyd="" 8 | 9 | cron: 36 8-18 * * * 10 | const $ = new Env("微信阅读"); 11 | """ 12 | 13 | import time 14 | import hashlib 15 | import requests 16 | import random 17 | import re 18 | import os 19 | import sys 20 | 21 | # 微信阅读 22 | class WXYD(): 23 | # 初始化 24 | def __init__(self, cookie): 25 | # 检测条目 26 | self.checkDict = { 27 | 'MzkyMzI5NjgxMA==': ['每天趣闻事', ''], 28 | 'MzkzMzI5NjQ3MA==': ['欢闹青春', ''], 29 | 'Mzg5NTU4MzEyNQ==': ['推粉宝助手', ''], 30 | 'Mzg3NzY5Nzg0NQ==': ['新鲜事呦', ''], 31 | 'MzU5OTgxNjg1Mg==': ['动感比特', ''], 32 | 'Mzg4OTY5Njg4Mw==': ['邻居趣事闻', 'gh_60ba451e6ad7'], 33 | 'MzI1ODcwNTgzNA==': ['麻辣资讯', 'gh_1df5b5259cba'], 34 | } 35 | 36 | # 授权 37 | self.headers = { 38 | 'Host': '2478987.jilixczlz.ix47965in5.cloud', 39 | 'Connection': 'keep-alive', 40 | 'Accept': 'application/json, text/plain, */*', 41 | '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 NetType/WIFI MicroMessenger/7.0.20.1781(0x6700143B) WindowsWechat(0x63090621) XWEB/8351 Flue', 42 | 'Accept-Encoding': 'gzip, deflate', 43 | 'Accept-Language': 'zh-CN,zh', 44 | 'Cookie': f'gfsessionid={cookie}', 45 | } 46 | 47 | # 请求 48 | self.sec = requests.session() 49 | self.sec.headers = self.headers 50 | 51 | # 初始化金币 52 | self.remain = 0 53 | 54 | # 获取信息 55 | def getinfo(self, link): 56 | try: 57 | response = requests.get(link) 58 | html = re.sub('\s', '', response.text) 59 | biz = re.findall('varbiz="(.*?)"\|\|', html) 60 | if biz != []: 61 | biz=biz[0] 62 | if biz == '' or biz == []: 63 | if '__biz' in link: 64 | biz = re.findall('__biz=(.*?)&', link) 65 | if biz != []: 66 | biz = biz[0] 67 | nickname = re.findall('varnickname=htmlDecode\("(.*?)"\);', html) 68 | if nickname != []: 69 | nickname = nickname[0] 70 | user_name = re.findall('varuser_name="(.*?)";', html) 71 | if user_name != []: 72 | user_name = user_name[0] 73 | msg_title = re.findall("varmsg_title='(.*?)'\.html\(", html) 74 | if msg_title != []: 75 | msg_title=msg_title[0] 76 | text=f'公众号唯一标识:{biz}|文章:{msg_title}|作者:{nickname}|账号:{user_name}' 77 | return nickname, user_name, msg_title, text, biz 78 | except Exception as e: 79 | print(e) 80 | print('异常') 81 | 82 | # sign算法 83 | def zzb_sign(self, data): 84 | hash = hashlib.sha256() 85 | hash.update(data.encode()) 86 | sign = hash.hexdigest() 87 | return sign 88 | 89 | # 获取系统信息 90 | def msg(self): 91 | try: 92 | ts = int(time.time()) 93 | text = f'key=4fck9x4dqa6linkman3ho9b1quarto49x0yp706qi5185o&time={ts}' 94 | sign = self.zzb_sign(text) 95 | url = f'http://2478987.jilixczlz.ix47965in5.cloud/user/msg?time={ts}&sign={sign}' 96 | response = self.sec.get(url) 97 | data = response.json() 98 | # print(f'系统公告:{rj.get("data").get("msg")}') 99 | except: 100 | # print(r.text) 101 | return False 102 | 103 | # 获取Uid 104 | def user_info(self): 105 | ts = int(time.time()) 106 | text = f'key=4fck9x4dqa6linkman3ho9b1quarto49x0yp706qi5185o&time={ts}' 107 | sign = self.zzb_sign(text) 108 | url = f'http://2478987.jilixczlz.ix47965in5.cloud/user/info?time={ts}&sign={sign}' 109 | try: 110 | response = self.sec.get(url) 111 | data = response.json() 112 | if data.get('code') == 0: 113 | print(f'用户UID:{data.get("data").get("uid")}') 114 | else: 115 | print(f'获取用户信息失败,账号异常') 116 | except: 117 | print(response.text) 118 | print(f'获取用户信息失败,gfsessionid无效,请检测gfsessionid是否正确') 119 | 120 | # 获取用户信息 121 | def read_info(self): 122 | try: 123 | ts = int(time.time()) 124 | text = f'key=4fck9x4dqa6linkman3ho9b1quarto49x0yp706qi5185o&time={ts}' 125 | sign = self.zzb_sign(text) 126 | url = f'http://2478987.jilixczlz.ix47965in5.cloud/read/info?time={ts}&sign={sign}' 127 | response = self.sec.get(url) 128 | data = response.json() 129 | print(f'今日已经阅读了{data.get("data").get("read")}篇文章 | 账户余额{self.remain/10000}元') 130 | except: 131 | print(response.text) 132 | 133 | # 阅读文章 134 | def read(self): 135 | print('阅读开始') 136 | while True: 137 | print('-' * 50) 138 | ts = int(time.time()) 139 | text = f'key=4fck9x4dqa6linkman3ho9b1quarto49x0yp706qi5185o&time={ts}' 140 | sign = self.zzb_sign(text) 141 | url = f'http://2478987.jilixczlz.ix47965in5.cloud/read/task?time={ts}&sign={sign}' 142 | response = self.sec.get(url) 143 | data = response.json() 144 | msg = data.get('message') 145 | print(msg) 146 | code = data.get('code') 147 | if code == 0: 148 | uncode_link = data.get('data').get('link') 149 | print('获取到阅读链接成功') 150 | link = uncode_link.encode().decode() 151 | a = self.getinfo(link) 152 | sleeptime = random.randint(7, 10) 153 | print('本次模拟阅读', sleeptime, '秒') 154 | time.sleep(sleeptime) 155 | elif code == 400: 156 | print('未知情况400') 157 | time.sleep(10) 158 | continue 159 | elif code == 20001: 160 | print('未知情况20001') 161 | else: 162 | return False 163 | # ----------------------------- 164 | ts = int(time.time()) 165 | finish_headers = self.sec.headers.copy() 166 | finish_headers.update({ 167 | 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 168 | 'Origin': 'http://2478987.jilixczlz.ix47965in5.cloud'}) 169 | text = f'key=4fck9x4dqa6linkman3ho9b1quarto49x0yp706qi5185o&time={ts}' 170 | sign = self.zzb_sign(text) 171 | data = f'time={ts}&sign={sign}' 172 | url = f'http://2478987.jilixczlz.ix47965in5.cloud/read/finish' 173 | response = requests.post(url, headers = finish_headers, data=data) 174 | data = response.json() 175 | if data.get('code') == 0: 176 | if data.get('data').get('check') == False: 177 | gain = data.get('data').get('gain') 178 | self.remain = data.get("data").get("remain") 179 | print(f"阅读文章成功获得{gain}金币") 180 | print( 181 | f'当前已经阅读了{data.get("data").get("read")}篇文章,账户余额{self.remain/10000}元') 182 | else: 183 | print("过检测成功") 184 | print(f'当前已经阅读了{data.get("data").get("read")}篇文章,账户余额{self.remain/10000}元') 185 | else: 186 | return False 187 | time.sleep(1) 188 | print('开始本次阅读') 189 | 190 | # 阅读检测 191 | def testCheck(self, a, link): 192 | if self.checkDict.get(a[4]) != None: 193 | for i in range(60): 194 | if i == '0': 195 | print('过检测文章已经阅读') 196 | return True 197 | elif i == '1': 198 | print(f'正在等待过检测文章阅读结果{i}秒。。。') 199 | time.sleep(1) 200 | else: 201 | print('服务器异常') 202 | return False 203 | print('过检测超时中止脚本防止黑号') 204 | return False 205 | else: 206 | return True 207 | 208 | # 提现 209 | def withdraw(self): 210 | if self.remain < 3000: 211 | print('没有达到提现标准') 212 | return False 213 | ts = int(time.time()) 214 | text = f'key=4fck9x4dqa6linkman3ho9b1quarto49x0yp706qi5185o&time={ts}' 215 | sign = self.zzb_sign(text) 216 | u = f'http://2478987.84.8agakd6cqn.cloud/withdraw/wechat?time={ts}&sign={sign}' 217 | r = self.sec.get(u, headers=self.headers) 218 | print('提现结果', r.text) 219 | 220 | # 运行 221 | def run(self): 222 | self.user_info() 223 | self.msg() 224 | self.read_info() 225 | self.read() 226 | time.sleep(5) 227 | self.withdraw() 228 | 229 | if __name__ == '__main__': 230 | print('🔔微信阅读 | 开始') 231 | #检测账户变量 232 | wxyd = os.environ.get("wxyd") 233 | if not wxyd: 234 | sys.exit("⚠️未发现有效cookie,退出程序!") 235 | #分割账户 236 | if "&" not in wxyd: 237 | cookie = [wxyd] 238 | else: 239 | cookie = wxyd.split("&") 240 | # 遍历账户列表 | 为每个账户创建一个类实例并执行任务 241 | for account in cookie: 242 | wxyd_client = WXYD(account) 243 | wxyd_client.run() -------------------------------------------------------------------------------- /xkdl.py: -------------------------------------------------------------------------------- 1 | """ 2 | 星空代理 v1.0 3 | 4 | 任务:签到 5 | 6 | export xingkong="账户1@密码" 多账户 & 分割 7 | 8 | cron: 5 0,9 * * * 9 | const $ = new Env("星空代理"); 10 | """ 11 | 12 | import os 13 | import re 14 | from datetime import datetime 15 | import requests 16 | from sendNotify import send 17 | 18 | try: 19 | xingkong = os.environ["xingkong"] 20 | headers = { 21 | 'Accept': 'application/json, text/javascript, */*; q=0.01', 22 | 'Accept-Language': 'zh-CN,zh;q=0.9', 23 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 24 | 'Origin': 'http://www.xkdaili.com', 25 | 'Referer': 'https://www.xkdaili.com/', 26 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0', 27 | 'X-Requested-With': 'XMLHttpRequest', 28 | } 29 | # 用于拼接 30 | msg = "" 31 | params = { 32 | 'action': 'user_receive_point', 33 | } 34 | # 按照&分隔多个账户 35 | accounts = xingkong.split("&") 36 | for i in accounts: 37 | up = i.split("@") 38 | data = { 39 | "username": up[0], 40 | "password": up[1], 41 | "remember": 0 42 | } 43 | try: 44 | aa = requests.post("https://www.xkdaili.com/tools/submit_ajax.ashx?action=user_login&site_id=1", headers=headers, 45 | data=data) 46 | ck = aa.cookies 47 | asp = re.findall(r"ASP\.NET_SessionId=(\w+)", str(ck)) 48 | dt = re.findall(r"dt_cookie_user_name_remember=(\w+=\w+)", str(ck)) 49 | cookies = { 50 | "ASP.NET_SessionId": asp[0], 51 | "dt_cookie_user_name_remember": dt[0] 52 | } 53 | 54 | data = { 55 | 'type': 'login', 56 | } 57 | 58 | response = requests.post('https://www.xkdaili.com/tools/submit_ajax.ashx?action=user_receive_point', cookies=cookies, headers=headers, data=data) 59 | txt = response.json() 60 | print("星空签到 ", txt['msg']) 61 | msg += f"账户 {up[0]} 星空签到 {txt['msg']}\n" 62 | except Exception as e: 63 | print(f"账户 {up[0]} 星空签到异常 {str(e)}") 64 | msg += f"账户 {up[0]} 星空签到异常 {str(e)}\n" 65 | # 执行完毕发送通知 66 | title = "🔁星空代理-签到" 67 | msg = f"⏰{str(datetime.now())[:19]}\n" + msg 68 | send(title, msg) 69 | except Exception as e: 70 | print("⚠️星空代理签到失败,失败原因 ", str(e)) 71 | if str(e) == "list index out of range": 72 | title = "🔁星空代理-签到" 73 | msg = f"⏰{str(datetime.now())[:19]}\n" + f"⚠️星空代理签到失败,失败原因 {e}" 74 | send(title, msg) 75 | -------------------------------------------------------------------------------- /xmsq.py: -------------------------------------------------------------------------------- 1 | """ 2 | 小米社区 v1.0 3 | 4 | 任务:日常任务 5 | 6 | export xiaomi="账户&密码" 多账户 # 分割 7 | 8 | cron: 5 9,15,20 * * * 9 | const $ = new Env("小米社区"); 10 | """ 11 | 12 | import os 13 | import sys 14 | import requests 15 | import json 16 | import hashlib 17 | import base64 18 | import binascii 19 | import time 20 | 21 | class XiaomiSign: 22 | # 初始化 23 | def __init__(self, account, password): 24 | self.account = account 25 | self.password = password 26 | self.userId = None 27 | self.cookie = None 28 | self.html_user = None 29 | 30 | # 获取cookie 31 | def get_cookie(self, account, password): 32 | md5 = hashlib.md5() 33 | md5.update(password.encode()) 34 | Hash = md5.hexdigest() 35 | url = "https://account.xiaomi.com/pass/serviceLoginAuth2" 36 | headers = { 37 | "Content-Type": "application/x-www-form-urlencoded", 38 | "User-Agent": "Dalvik/2.1.0 (Linux; U; Android 12; M2007J17C Build/SKQ1.211006.001) APP/xiaomi.vipaccount APPV/220301 MK/UmVkbWkgTm90ZSA5IFBybw== PassportSDK/3.7.8 passport-ui/3.7.8", 39 | "Cookie": "deviceId=X0jMu7b0w-jcne-S; pass_o=2d25bb648d023d7f; sdkVersion=accountsdk-2020.01.09", 40 | "Host": "account.xiaomi.com", 41 | "Connection": "Keep-Alive", 42 | "Accept-Encoding": "gzip" 43 | } 44 | data = { 45 | "cc": "+86", 46 | "qs": "%3F_json%3Dtrue%26sid%3Dmiui_vip%26_locale%3Dzh_CN", 47 | "callback": "https://api.vip.miui.com/sts", 48 | "_json": "true", 49 | "user": account, 50 | "hash": Hash.upper(), 51 | "sid": "miui_vip", 52 | "_sign": "ZJxpm3Q5cu0qDOMkKdWYRPeCwps%3D", 53 | "_locale": "zh_CN" 54 | } 55 | Auth = requests.post(url=url, headers=headers, data=data).text.replace("&&&START&&&", "") 56 | Auth = json.loads(Auth) 57 | ssecurity = Auth["ssecurity"] 58 | nonce = Auth["nonce"] 59 | sha1 = hashlib.sha1() 60 | Str = "nonce=" + str(nonce) + "&" + ssecurity 61 | sha1.update(Str.encode("utf-8")) 62 | clientSign = base64.encodebytes(binascii.a2b_hex(sha1.hexdigest().encode("utf-8"))).decode(encoding="utf-8").strip() 63 | nurl = Auth["location"] + "&_userIdNeedEncrypt=true&clientSign=" + clientSign 64 | 65 | sts = requests.get(url=nurl) 66 | cookies = requests.utils.dict_from_cookiejar(sts.cookies) 67 | cookie_str = '; '.join([f'{key}={value}' for key, value in cookies.items()]) 68 | return cookie_str 69 | 70 | # 签到任务 71 | def sign_in(self): 72 | max_retries = 10 73 | retries = 0 74 | 75 | while retries < max_retries: 76 | cookie = self.get_cookie(self.account, self.password) 77 | self.cookie = cookie 78 | url = 'https://api.vip.miui.com/mtop/planet/vip/user/checkin' 79 | headers = { 80 | 'Host': 'api.vip.miui.com', 81 | 'Connection': 'keep-alive', 82 | 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-cn; M2007J1SC Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.7.22 app/vipaccount', 83 | 'Accept': '*/*', 84 | 'Origin': 'https://web.vip.miui.com', 85 | 'X-Requested-With': 'com.xiaomi.vipaccount', 86 | 'Sec-Fetch-Site': 'same-site', 87 | 'Sec-Fetch-Mode': 'cors', 88 | 'Sec-Fetch-Dest': 'empty', 89 | 'Referer': 'https://web.vip.miui.com/page/info/mio/mio/checkIn?app_version=dev.220804', 90 | 'Accept-Encoding': 'gzip, deflate', 91 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 92 | 'Cookie': f'{cookie}' 93 | } 94 | user_url = 'https://api.vip.miui.com/api/community/user/home/page' 95 | 96 | html = requests.get(url=url, headers=headers) 97 | html_user = requests.get(url=user_url, headers=headers) 98 | self.html_user = html_user 99 | 100 | result = json.loads(html.text) 101 | try: 102 | result_user = json.loads(html_user.text) 103 | userId = result_user['entity']['userId'] 104 | self.userId = userId 105 | return '⚠️签到失败' 106 | #print('✅' + result['message']) 107 | #print('✅userId | ' + userId + ' 用户名 | ' + result_user['entity']['userName'] + ' 段位 | ' + result_user['entity']['userGrowLevelInfo']['showLevel']) 108 | break 109 | except KeyError: 110 | retries += 1 111 | time.sleep(3) 112 | 113 | # 点赞任务 114 | def like_post(self): 115 | for _ in range(2): 116 | like_url = 'https://api.vip.miui.com/mtop/planet/vip/content/announceThumbUp' 117 | headers = { 118 | 'Host': 'api.vip.miui.com', 119 | 'Connection': 'keep-alive', 120 | 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-cn; M2007J1SC Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.7.22 app/vipaccount', 121 | 'Accept': '*/*', 122 | 'Origin': 'https://web.vip.miui.com', 123 | 'X-Requested-With': 'com.xiaomi.vipaccount', 124 | 'Sec-Fetch-Site': 'same-site', 125 | 'Sec-Fetch-Mode': 'cors', 126 | 'Sec-Fetch-Dest': 'empty', 127 | 'Referer': 'https://web.vip.miui.com/page/info/mio/mio/checkIn?app_version=dev.220804', 128 | 'Accept-Encoding': 'gzip, deflate', 129 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 130 | 'Cookie': f'{self.cookie}' 131 | } 132 | data = { 133 | 'postId': '36625780', 134 | 'sign': '36625780', 135 | 'timestamp': int(round(time.time() * 1000)) 136 | } 137 | response = requests.get(url=like_url, headers=headers, params=data) 138 | result = json.loads(response.text) 139 | if result['status'] == 200: 140 | return '✅点赞帖子成功' 141 | else: 142 | return '⚠️点赞帖子失败' 143 | 144 | # 加入圈子 145 | def join_group(self): 146 | unfollow_url = 'https://api.vip.miui.com/api/community/board/unfollow?boardId=558495' 147 | headers = { 148 | 'Host': 'api.vip.miui.com', 149 | 'Connection': 'keep-alive', 150 | 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-cn; M2007J1SC Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.7.22 app/vipaccount', 151 | 'Accept': '*/*', 152 | 'Origin': 'https://web.vip.miui.com', 153 | 'X-Requested-With': 'com.xiaomi.vipaccount', 154 | 'Sec-Fetch-Site': 'same-site', 155 | 'Sec-Fetch-Mode': 'cors', 156 | 'Sec-Fetch-Dest': 'empty', 157 | 'Referer': 'https://web.vip.miui.com/page/info/mio/mio/checkIn?app_version=dev.220804', 158 | 'Accept-Encoding': 'gzip, deflate', 159 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 160 | 'Cookie': f'{self.cookie}' 161 | } 162 | response_unfollow = requests.get(url=unfollow_url, headers=headers) 163 | result_unfollow = json.loads(self.html_user.text) 164 | if result_unfollow['status']==200: 165 | unfollow_message = '✅退出圈子成功' 166 | else: 167 | unfollow_message = '⚠️退出圈子失败' 168 | 169 | follow_url = 'https://api.vip.miui.com/api/community/board/follow?boardId=558495' 170 | response_follow = requests.get(url=follow_url, headers=headers) 171 | result_follow = json.loads(self.html_user.text) 172 | if result_follow['status']==200: 173 | follow_message = '✅加入圈子成功' 174 | else: 175 | follow_message = '⚠️加入圈子失败' 176 | # 返回 177 | return f'{unfollow_message}\n{follow_message}' 178 | 179 | # 浏览主页 180 | def browse_home(self): 181 | info_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={self.userId}&action=BROWSE_SPECIAL_PAGES_USER_HOME' 182 | headers = { 183 | 'Host': 'api.vip.miui.com', 184 | 'Connection': 'keep-alive', 185 | 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-cn; M2007J1SC Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.7.22 app/vipaccount', 186 | 'Accept': '*/*', 187 | 'Origin': 'https://web.vip.miui.com', 188 | 'X-Requested-With': 'com.xiaomi.vipaccount', 189 | 'Sec-Fetch-Site': 'same-site', 190 | 'Sec-Fetch-Mode': 'cors', 191 | 'Sec-Fetch-Dest': 'empty', 192 | 'Referer': 'https://web.vip.miui.com/page/info/mio/mio/checkIn?app_version=dev.220804', 193 | 'Accept-Encoding': 'gzip, deflate', 194 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 195 | 'Cookie': f'{self.cookie}' 196 | } 197 | response = requests.get(url=info_url, headers=headers) 198 | result = json.loads(response.text) 199 | if result['status'] == 200: 200 | return '✅浏览主页成功,获得积分: '+str(result['entity']['score']) 201 | else: 202 | return '⚠️今日已达上限' 203 | 204 | # 浏览专题 205 | def browse_special_pages(self): 206 | llzt_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={self.userId}&action=BROWSE_SPECIAL_PAGES_SPECIAL_PAGE' 207 | headers = { 208 | 'Host': 'api.vip.miui.com', 209 | 'Connection': 'keep-alive', 210 | 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-cn; M2007J1SC Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.7.22 app/vipaccount', 211 | 'Accept': '*/*', 212 | 'Origin': 'https://web.vip.miui.com', 213 | 'X-Requested-With': 'com.xiaomi.vipaccount', 214 | 'Sec-Fetch-Site': 'same-site', 215 | 'Sec-Fetch-Mode': 'cors', 216 | 'Sec-Fetch-Dest': 'empty', 217 | 'Referer': 'https://web.vip.miui.com/page/info/mio/mio/checkIn?app_version=dev.220804', 218 | 'Accept-Encoding': 'gzip, deflate', 219 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 220 | 'Cookie': f'{self.cookie}' 221 | } 222 | response = requests.get(url=llzt_url, headers=headers) 223 | result = json.loads(response.text) 224 | if result['status'] == 200: 225 | return '✅浏览主页成功,获得积分: '+str(result['entity']['score']) 226 | else: 227 | return '⚠️今日已达上限' 228 | 229 | # 浏览帖子 230 | def browse_posts(self): 231 | for _ in range(3): 232 | watch_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={self.userId}&action=BROWSE_POST_10S' 233 | headers = { 234 | 'Host': 'api.vip.miui.com', 235 | 'Connection': 'keep-alive', 236 | 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 10; zh-cn; M2007J1SC Build/RKQ1.200826.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.116 Mobile Safari/537.36 XiaoMi/MiuiBrowser/15.7.22 app/vipaccount', 237 | 'Accept': '*/*', 238 | 'Origin': 'https://web.vip.miui.com', 239 | 'X-Requested-With': 'com.xiaomi.vipaccount', 240 | 'Sec-Fetch-Site': 'same-site', 241 | 'Sec-Fetch-Mode': 'cors', 242 | 'Sec-Fetch-Dest': 'empty', 243 | 'Referer': 'https://web.vip.miui.com/page/info/mio/mio/checkIn?app_version=dev.220804', 244 | 'Accept-Encoding': 'gzip, deflate', 245 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 246 | 'Cookie': f'{self.cookie}' 247 | } 248 | response = requests.get(url=watch_url, headers=headers) 249 | result = json.loads(response.text) 250 | if result['status'] == 200: 251 | return '✅浏览主页成功,获得积分: '+str(result['entity']['score']) 252 | else: 253 | return '⚠️今日已达上限' 254 | 255 | def run(self): 256 | self.sign_in() 257 | # 任务列表 258 | tasks = [ 259 | ("签到任务", self.sign_in), 260 | ("点赞任务", self.like_post), 261 | ("加入圈子", self.join_group), 262 | ("浏览主页", self.browse_home), 263 | ("浏览专题", self.browse_special_pages), 264 | ("浏览帖子", self.browse_posts) 265 | ] 266 | # 执行任务 267 | for task_name, task_function in tasks: 268 | print(f'🔁{self.userId} | 正在执行任务 | {task_name}') 269 | result = task_function() 270 | print(result) 271 | time.sleep(5) 272 | print('*****************************************') 273 | 274 | if __name__ == '__main__': 275 | print('🔔小米社区 | 开始') 276 | #检测账户变量 277 | xiaomi_accounts = os.environ.get("xiaomi") 278 | if not xiaomi_accounts or "&" not in xiaomi_accounts: 279 | sys.exit("⚠️未发现有效账号,退出程序!") 280 | #分割账户 281 | accounts = [acc.split('&') for acc in xiaomi_accounts.split('#')] 282 | # 遍历账户列表 | 为每个账户创建一个类实例并执行任务 283 | for account, password in accounts: 284 | xiaomi_signer = XiaomiSign(account, password) 285 | xiaomi_signer.run() 286 | -------------------------------------------------------------------------------- /xqz.js: -------------------------------------------------------------------------------- 1 | /* 2 | 闲趣赚 v1.0 3 | 4 | 抓取域名 wap.quxianzhuan.com 抓取cookie的全部数据。。 5 | export xqzck='' 多账户@隔开 6 | 7 | cron: 25 0,3,6,9,12,15,18,21 * * * 8 | const $ = new Env("闲趣赚"); 9 | */ 10 | var _0xodm='jsjiami.com.v6',_0xodm_=['‮_0xodm'],_0x47f7=[_0xodm,'IsOGIMKifQ==','PMOQw4A=','w4c3f8O7wrQ=','ZemVnOi3vei3rOS4jeWLp++9mQ==','WBDCuiI=','wpDCpicUwr8=','wqjplb7otprotZrkua7liKjvvbo=','w5/DocKtEwc=','eDHCiUIhHwVmw7DCvMK4axzDjsOiwqLCjy/Dp8KrDsOww68wwoJbwrQ6w48aUDkJ','acKCVMOEBQ==','F1rDqsKSwowJw5XDgsOrw5XDg0NzS8Kdw4FGwrrCpQvDgsK6Bg3CsWDDg8KUcMKFwrLDuC8nwoE3MMKmwrczw5jCu8KJwrdEw6LCqMOdU8ORw6p3woLCihjDmsKrSFrDjlNGQ8KmQBHCkgYxCsOQwr8Ow4bCo19uwp7DvcOaV8KnRcKNKMOPUUg1w5HDtcKTAMOSw6LDtAs2RsOJw7xNOHzClcKEw7sywo7CgsODBk/Dr3EOdcKjD8Ktwrhpw7gLwpwNJcKMwopDw6QNdSbCvXjCjEMlwo5Jdj1RwopQQwHDtH3DtsOLwrksw6ltNg7CshZfK2p+w5IywoNDXsOHwrDCtgXDhMOqwrLCrsKLw4oIw5HDlMOOwqsOw4vCoMKVZsOYw7Ehw5TDqsOpwpLCksKPcC3CjMKgFg7CkS1pFMOzRH8oMcKxfcOLw4sIw7jCjDjCgsK6XsOSw6PDkjTDvcOUb8O8WMKMw5R9HsKmwrjDgsKrw5chwq9DaFYfwpDDtDrDo3JiDDNbw7/Cg8Kiw4FSw7vDg8OfJiI+N8OwZTzDsMKUw7rCsgoAworCozjDvMKqCsKow4XCjcK+wp4lwr/DhSkmw7x0wo7Cj8OOfBIRwoVywoJOw49lZQnDt2RGQMKIEsK5PHBdWcKJIsKqwqY8L8O5w5VdKsKsSX9OwpdDw6rCvsO9wooBGMK8aMO5FRdOwoEjJMKUwrsjdCPCpMKdRMO4wopQbsOxw6zCl8KVwq/CuTwbf8KTwpF1FWxgIHklwqIQcMKFwo0UwoBxw7lqwqjDtcK5QsKzw7PCpcOqRsOGw7BbLiXDqMOwQj3CqExPwqocKyjDncKLw6LCpsOkwqEJwp9HworCrcOAwo/DusKAEsOHwrJ3w7fCllUPTMONw6HCjgXCpiLDjcOhwqPCgA3DusOrwrgDw7bChsK7wqlPw5lzw6PDmsKUw5cew4HCjDbCmx/CmMONwqB9U0UcwpvDg3zDqwkOw5cZw40/GMO5w47DvnbCvRNEwosMPSdPw6B5w4ouw6oPwp7Dj0lWBMOKw7lsbx7ClsK6wqdAwr9bF8KUfw3DksKQJj4NwqR3wqnDpjZFw5vDsgTCjTbCggLCpRoAw6zCmBw8w60Sw6vClRDCsMKAw7TDsVTDlmE9w6bCicKmw519VVHCs1IKwqrClk/DmMOYOGzCuyNZwqBdVMKOw47CnsKswprDhkbCtDTCghQbTsK6UsOWw7nCtlkXwqNpAAzDlg7Cun3Ct8OFwpw9woIPCMKhwownwoVPQ8KTQDHCgz/DoXcyL2ZBwqhXw5bDrMOvFmnDncKow4XCk8OCwojCjF3CjCB7w6/CqyfClGsfw7F4IQ9FwoNFw7dhbMKON3QOLMKIwpDClTIHa8OAwrjDmV3Cv2oaIMOxw4LClygnE1x2MDjDlUNFwrAdw7zDlSPDusKXKmFXw4VHRMOUAEwOwpfDjDcabnLDiMK2C2gcwq/DrgBEw63Dm8OBwpoEwoBFTMOwwojCnWDDiWDCmMK1AMOoTjhBw4hHw7/CgHRYwrw0HcKbwpM5wrQbBhJcYcKjwrkqQcOEw7cAw6Irw4XDn05kwoBuw7p6HA3CuMOVMQ==','w7Y0Cw==','Uh5uD8KS','W+mVs+i0qui2oOmesuS4t+eUp+aIt++/j+ODhQ==','a8OiVcK4Og==','TR50CMKVw4g=','6Zej6La76LeZA8KIwr1A','wozCnsKAw6hmMQ==','w4M9VmF5wr54IyM=','w5I9ZQ==','w5TDp8KOPyA=','wp7DmcK2w7TCk8KzwpzDmEo=','w5HDgD8rwp4=','HyjChcOHJQ==','QT7CuhjCoQ==','dTNXIcKc','w5QCSmYm','w68eZsOew5E=','w7AMaw==','wo/CoRQtwrjCpE10w5Vawoshwr4o5Yee','w7AGYkkiwpc=','5Lme6Lac5YyVejfCogJmIsK8FgXCmFtsBsKt','w7YgeGRc','F8Ouw6bCi8KO','wo3ClC4Aw6Q=','GcO3BcKFew==','HcOPMMOSwpkr','w5rDni3DqMO8','Az7DrA==','fuW+uuWkqeOBh+mXqOi0rOi1tQ==','wrPCthITw48=','PsOww45ww5k=','w4fDtinDiTA=','PcOdJg==','wp3plK7oto7otrbpnabkuIXnlrzmioTvv6XjgY0=','44K5wrhGwrDljYbmjaPnjKPkv5rpoa7jgI0=','cyTCiVE6','w4TDtwzDlcObw4E=','w4bDo1dl','wrrCiMKiw7dw','aCLDtcOhWA==','w7nDh8KM','YOmUrOi3gei3ieS4tuWKh++9kg==','wrLCrAIGw4TCvXrDm8KwwqwKw7PDvcKqVMOHTMO9I3otIcOow6hrG0xhwpHDu8OJwpUtMijDkA7DhEDCi18hWy1ZwoEAb8KLw5DCgnDCkcO7F8Kfw6pQw7vCjMKTDB5Mbj8=','HzDDuRAM','wrjCsMKZ','elDDkl9n','XlAwBcKa','PgzCocOLDw==','w4DDl1srYQ==','w6/DqVREQg==','PMObw5wUKQ==','EMKcwp1ybg==','56+75bybA0jnp5fnubXnu4Hku7/kuoHku7bliq0=','w47DuEFpSw==','wqPDrsKhw7PCsw==','eA7Cp8OJFA==','w5nDpXBJWw==','w6fDgcKbNB8=','dyDChMOUJFk4bnY7wq4fBULCksKFw4ROw708wp/DksK7bHA9C8O0RsKyHcO9wr7Cun1RwrTCsgrDo14XFHPCm8OQQMOKw5M=','e8OEw6/DgE5hwoDDk8O3woE=','wroFY1w7wpdUwoHCtcKP','w7zChg80wod0w7BUwrQ=','wq/CusKeTA==','EMOGw47CkMKT','BUZabMK3','GcObwpY0cg==','44C+UcO+duWMguaMu+eMo+S+j+mhuOOCig==','ejFsjigbbaCUmiuU.coDSKm.WGtWv6=='];if(function(_0x2d158c,_0x5267c3,_0x228c42){function _0x247644(_0x3a135d,_0x2a2af7,_0x49ff78,_0x19dbdb,_0x48e387,_0x1d2c4f){_0x2a2af7=_0x2a2af7>>0x8,_0x48e387='po';var _0x2c4df0='shift',_0x4548da='push',_0x1d2c4f='‮';if(_0x2a2af7<_0x3a135d){while(--_0x3a135d){_0x19dbdb=_0x2d158c[_0x2c4df0]();if(_0x2a2af7===_0x3a135d&&_0x1d2c4f==='‮'&&_0x1d2c4f['length']===0x1){_0x2a2af7=_0x19dbdb,_0x49ff78=_0x2d158c[_0x48e387+'p']();}else if(_0x2a2af7&&_0x49ff78['replace'](/[eFgbbCUuUDSKWGtW=]/g,'')===_0x2a2af7){_0x2d158c[_0x4548da](_0x19dbdb);}}_0x2d158c[_0x4548da](_0x2d158c[_0x2c4df0]());}return 0xd98cb;};return _0x247644(++_0x5267c3,_0x228c42)>>_0x5267c3^_0x228c42;}(_0x47f7,0xfa,0xfa00),_0x47f7){_0xodm_=_0x47f7['length']^0xfa;};function _0x39d2(_0x14a187,_0x2c8b59){_0x14a187=~~'0x'['concat'](_0x14a187['slice'](0x1));var _0x1dcceb=_0x47f7[_0x14a187];if(_0x39d2['cyBWSE']===undefined){(function(){var _0x5620f1=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x28fd2d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x5620f1['atob']||(_0x5620f1['atob']=function(_0x36d503){var _0x27a8c2=String(_0x36d503)['replace'](/=+$/,'');for(var _0x14c4b5=0x0,_0x398741,_0x2e0bac,_0x341908=0x0,_0x13699b='';_0x2e0bac=_0x27a8c2['charAt'](_0x341908++);~_0x2e0bac&&(_0x398741=_0x14c4b5%0x4?_0x398741*0x40+_0x2e0bac:_0x2e0bac,_0x14c4b5++%0x4)?_0x13699b+=String['fromCharCode'](0xff&_0x398741>>(-0x2*_0x14c4b5&0x6)):0x0){_0x2e0bac=_0x28fd2d['indexOf'](_0x2e0bac);}return _0x13699b;});}());function _0x145597(_0x433724,_0x2c8b59){var _0x5de13e=[],_0x205ea1=0x0,_0x52aed6,_0x39de4b='',_0x63fd89='';_0x433724=atob(_0x433724);for(var _0x385398=0x0,_0x532dd4=_0x433724['length'];_0x385398<_0x532dd4;_0x385398++){_0x63fd89+='%'+('00'+_0x433724['charCodeAt'](_0x385398)['toString'](0x10))['slice'](-0x2);}_0x433724=decodeURIComponent(_0x63fd89);for(var _0x2218a7=0x0;_0x2218a7<0x100;_0x2218a7++){_0x5de13e[_0x2218a7]=_0x2218a7;}for(_0x2218a7=0x0;_0x2218a7<0x100;_0x2218a7++){_0x205ea1=(_0x205ea1+_0x5de13e[_0x2218a7]+_0x2c8b59['charCodeAt'](_0x2218a7%_0x2c8b59['length']))%0x100;_0x52aed6=_0x5de13e[_0x2218a7];_0x5de13e[_0x2218a7]=_0x5de13e[_0x205ea1];_0x5de13e[_0x205ea1]=_0x52aed6;}_0x2218a7=0x0;_0x205ea1=0x0;for(var _0x3915c7=0x0;_0x3915c7<_0x433724['length'];_0x3915c7++){_0x2218a7=(_0x2218a7+0x1)%0x100;_0x205ea1=(_0x205ea1+_0x5de13e[_0x2218a7])%0x100;_0x52aed6=_0x5de13e[_0x2218a7];_0x5de13e[_0x2218a7]=_0x5de13e[_0x205ea1];_0x5de13e[_0x205ea1]=_0x52aed6;_0x39de4b+=String['fromCharCode'](_0x433724['charCodeAt'](_0x3915c7)^_0x5de13e[(_0x5de13e[_0x2218a7]+_0x5de13e[_0x205ea1])%0x100]);}return _0x39de4b;}_0x39d2['weUfxi']=_0x145597;_0x39d2['eNnPgT']={};_0x39d2['cyBWSE']=!![];}var _0x36f452=_0x39d2['eNnPgT'][_0x14a187];if(_0x36f452===undefined){if(_0x39d2['zGiWHB']===undefined){_0x39d2['zGiWHB']=!![];}_0x1dcceb=_0x39d2['weUfxi'](_0x1dcceb,_0x2c8b59);_0x39d2['eNnPgT'][_0x14a187]=_0x1dcceb;}else{_0x1dcceb=_0x36f452;}return _0x1dcceb;};const $=new Env(_0x39d2('‮0','XzrC'));let status;status=(status=$[_0x39d2('‮1','#4H(')](_0x39d2('‮2','uIh3'))||'1')>0x1?''+status:'';let xqzckArr=[],xqzcount='';let xqzck=($['isNode']()?process[_0x39d2('‫3','weK&')]['xqzck']:$['getdata']('xqzck'))||'';let xqzid='',xqztk='';!(async()=>{var _0x55a7c1={'orBje':function(_0x3d9df1){return _0x3d9df1();},'WLXvS':function(_0x59adb7,_0x5f06d4,_0x142623){return _0x59adb7(_0x5f06d4,_0x142623);},'mCwUH':function(_0x1c7e11,_0x16d57c){return _0x1c7e11+_0x16d57c;},'HEDSc':function(_0x1f5d99,_0x5cba52){return _0x1f5d99*_0x5cba52;},'rFFxU':function(_0x6159b8,_0x5668d1){return _0x6159b8-_0x5668d1;},'FFWmu':function(_0xcefed9,_0x245794){return _0xcefed9!==_0x245794;},'MyPAY':'VkgaL','nOiNL':function(_0x33e25c){return _0x33e25c();},'JLMMf':'LcqgK','MlTvQ':function(_0x16c644,_0xb3e2de){return _0x16c644!==_0xb3e2de;},'Fooqo':_0x39d2('‫4','EUbI'),'JpigR':function(_0x52bc02){return _0x52bc02();}};if(typeof $request!==_0x39d2('‫5','KA3y')){if(_0x55a7c1[_0x39d2('‫6','%iIs')](_0x55a7c1['MyPAY'],'VkgaL')){_0x55a7c1[_0x39d2('‮7','v0Nn')](resolve);}else{await _0x55a7c1[_0x39d2('‫8','GV6i')](xqzck);}}else{if(_0x55a7c1[_0x39d2('‮9','JUv5')]!==_0x39d2('‮a','qAxn')){xqzckArr=xqzck[_0x39d2('‮b','RHFD')]('@');console[_0x39d2('‮c','qAxn')](_0x39d2('‮d','z[7J')+xqzckArr[_0x39d2('‫e','qAxn')]+_0x39d2('‫f',']!Q4'));for(let _0x2c0f0c=0x0;_0x2c0f0c/)[0x1];console[_0x39d2('‮1b','lZuR')](_0x39d2('‮1c','*ScD')+_0x5497b6+_0x39d2('‮1d','F)D0')+_0x5e3e9e+'】');}}})()[_0x39d2('‫1e','K94p')](_0x848d15=>$[_0x39d2('‮1f','F)D0')](_0x848d15))['finally'](()=>$[_0x39d2('‫20','z[7J')]());function xqzlb(_0x8d8167=0x0){var _0x3bf983={'NVffO':function(_0x434d83,_0x1d93f5){return _0x434d83+_0x1d93f5;},'bCdXO':function(_0x54e068){return _0x54e068();},'rIiSd':function(_0x47304e,_0x49bb07){return _0x47304e===_0x49bb07;},'XytsM':'lDtXA','QsViw':function(_0x14a394,_0x4e71ae){return _0x14a394===_0x4e71ae;},'FAXle':'wGNFK'};return new Promise(_0x28fe4c=>{if(_0x3bf983[_0x39d2('‫21','#4H(')](_0x3bf983[_0x39d2('‮22','a)uq')],'NHhEC')){console[_0x39d2('‮23','EUbI')](_0x39d2('‮24','fwM@')+result['msg']);}else{let _0x3df897={'url':_0x39d2('‫25','A#B#'),'headers':JSON[_0x39d2('‫26','nY6I')]('{\x22Host\x22:\x22wap.quxianzhuan.com\x22,\x22Connection\x22:\x22keep-alive\x22,\x22Upgrade-Insecure-Requests\x22:\x221\x22,\x22User-Agent\x22:\x22Mozilla/5.0\x20(Linux;\x20Android\x2010;\x2016s\x20Pro\x20Build/QKQ1.191222.002;\x20wv)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Version/4.0\x20Chrome/83.0.4103.106\x20Mobile\x20Safari/537.36\x20\x20XiaoMi/MiuiBrowser/10.8.1\x20LT-APP/44/200\x22,\x22Accept\x22:\x22text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\x22,\x22x-app\x22:\x2296c1ea5a-9a52-44c9-8ac4-8dceafa065c8\x22,\x22X-Requested-With\x22:\x22com.quxianzhuan.wap\x22,\x22Sec-Fetch-Site\x22:\x22none\x22,\x22Sec-Fetch-Mode\x22:\x22navigate\x22,\x22Sec-Fetch-User\x22:\x22?1\x22,\x22Sec-Fetch-Dest\x22:\x22document\x22,\x22Referer\x22:\x22https://wap.quxianzhuan.com/reward/list/?xapp-target=blank\x22,\x22Accept-Encoding\x22:\x22gzip,\x20deflate\x22,\x22Accept-Language\x22:\x22zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7\x22,\x22Cookie\x22:\x22'+xqzck+'\x22}')};$[_0x39d2('‫27','D[2Z')](_0x3df897,async(_0x190220,_0x3af933,_0x409111)=>{var _0x1d5449={'khrUf':function(_0x56d23f){return _0x56d23f();}};try{xqzid=_0x409111[_0x39d2('‫28','vIQK')](/reward_id":"(\d+)",/)[0x1];xqztk=xqzck[_0x39d2('‮29','MJIk')](/tzb_formhash_cookie=(\w+);/)[0x1];console[_0x39d2('‮c','qAxn')](_0x3bf983[_0x39d2('‮2a','v0Nn')]('\x0a闲趣赚匹配任务ID:',xqzid));await _0x3bf983['bCdXO'](xqzrw);}catch(_0x32f4e6){}finally{if(_0x3bf983[_0x39d2('‮2b','IKE$')](_0x39d2('‮2c','6#ww'),_0x3bf983[_0x39d2('‫2d','wh%A')])){_0x28fe4c();}else{_0x1d5449[_0x39d2('‫2e','Lb&R')](_0x28fe4c);}}},_0x8d8167);}});}function xqzrw(_0x2888ee=0x0){var _0x5ea225={'gZWmC':function(_0x53beb3,_0x918b3c){return _0x53beb3+_0x918b3c;},'ZHPUX':_0x39d2('‮2f','IKE$'),'tqjiW':function(_0x1277a6){return _0x1277a6();},'ripfJ':_0x39d2('‫30','6#ww')};return new Promise(_0x41ce33=>{var _0x4b087c={'ZLCPS':_0x39d2('‮31','KA3y'),'NjTne':function(_0x1bf7c4,_0x3e6c23){return _0x1bf7c4==_0x3e6c23;},'sSGZa':function(_0x1e0e2f,_0x32be6d){return _0x1e0e2f+_0x32be6d;},'pdleX':function(_0x1b23d9,_0x23a9f1){return _0x5ea225[_0x39d2('‮32','Ve8i')](_0x1b23d9,_0x23a9f1);},'coVjE':_0x5ea225[_0x39d2('‫33','6#ww')],'JIFAR':function(_0x32f184){return _0x5ea225['tqjiW'](_0x32f184);},'MARWE':_0x5ea225[_0x39d2('‮34','EUbI')]};let _0x579dd9={'url':_0x39d2('‮35','Ve8i'),'headers':JSON['parse']('{\x22Host\x22:\x22wap.quxianzhuan.com\x22,\x22Connection\x22:\x22keep-alive\x22,\x22Upgrade-Insecure-Requests\x22:\x221\x22,\x22User-Agent\x22:\x22Mozilla/5.0\x20(Linux;\x20Android\x2010;\x2016s\x20Pro\x20Build/QKQ1.191222.002;\x20wv)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Version/4.0\x20Chrome/83.0.4103.106\x20Mobile\x20Safari/537.36\x20\x20XiaoMi/MiuiBrowser/10.8.1\x20LT-APP/44/200\x22,\x22Accept\x22:\x22text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\x22,\x22x-app\x22:\x2296c1ea5a-9a52-44c9-8ac4-8dceafa065c8\x22,\x22X-Requested-With\x22:\x22com.quxianzhuan.wap\x22,\x22Sec-Fetch-Site\x22:\x22none\x22,\x22Sec-Fetch-Mode\x22:\x22navigate\x22,\x22Sec-Fetch-User\x22:\x22?1\x22,\x22Sec-Fetch-Dest\x22:\x22document\x22,\x22Referer\x22:\x22https://wap.quxianzhuan.com/reward/list/?xapp-target=blank\x22,\x22Accept-Encoding\x22:\x22gzip,\x20deflate\x22,\x22Accept-Language\x22:\x22zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7\x22,\x22Cookie\x22:\x22'+xqzck+'\x22}'),'body':_0x39d2('‫36','MPxS')+xqzid+_0x39d2('‫37','qAxn')+xqztk+_0x39d2('‫38','mVvS')};$[_0x39d2('‮39','D[2Z')](_0x579dd9,async(_0x216874,_0x50e484,_0x53fa76)=>{if(_0x39d2('‫3a','NiW#')===_0x4b087c['ZLCPS']){try{let _0x4dbc7e=_0x53fa76[_0x39d2('‫3b','YLkM')](/available_money":(.+?),"/)[0x1];let _0x6e63b2=_0x53fa76[_0x39d2('‮3c',']!Q4')](/UID:(.+?)\<\/span\>/)[0x1];console['log']('\x0a闲趣赚靓仔用户:【'+_0x6e63b2+_0x39d2('‫3d','GV6i')+_0x4dbc7e+'】');}catch(_0x20e178){}finally{_0x41ce33();}}else{try{const _0x35ebda=JSON['parse'](_0x53fa76);if(_0x4b087c['NjTne'](_0x35ebda[_0x39d2('‫3e','lZuR')],0x1)){console[_0x39d2('‮3f','GlR)')](_0x4b087c['sSGZa'](_0x4b087c[_0x39d2('‮40','weK&')](_0x39d2('‫41','K@)D'),_0x35ebda['msg']),_0x4b087c['coVjE']));await $[_0x39d2('‮42','GV6i')](0x2af8);await _0x4b087c[_0x39d2('‮43','mVvS')](xqzlb);}else{console['log'](_0x39d2('‫44','z[7J')+_0x35ebda['msg']);}}catch(_0x1ec8c9){}finally{if('xdnrf'!==_0x4b087c['MARWE']){_0x4b087c[_0x39d2('‫45','EUbI')](_0x41ce33);}else{_0x41ce33();}}}},_0x2888ee);});}function xqzxx(_0x330473=0x0){return new Promise(_0x51f24f=>{let _0x54f1fa={'url':_0x39d2('‫46','K94p'),'headers':JSON[_0x39d2('‫47','GPfi')](_0x39d2('‫48','s[%2')+xqzck+'\x22}')};$[_0x39d2('‫49','PP[x')](_0x54f1fa,async(_0x3bfce3,_0x1a61ad,_0x4ac891)=>{try{let _0x31cd8c=_0x4ac891['match'](/available_money":(.+?),"/)[0x1];let _0x318a42=_0x4ac891[_0x39d2('‫4a','JUv5')](/UID:(.+?)\<\/span\>/)[0x1];console['log'](_0x39d2('‮4b','NiW#')+_0x318a42+'】\x20-\x20可提现余额【'+_0x31cd8c+'】');}catch(_0x147b1e){}finally{_0x51f24f();}},_0x330473);});}function rand(_0x55047e,_0x5f4ee9){var _0x253226={'ggzfO':function(_0x217605,_0x739a8,_0x25f69f){return _0x217605(_0x739a8,_0x25f69f);},'fwQfS':function(_0x52c6b1,_0x59640f){return _0x52c6b1+_0x59640f;},'SwwXA':function(_0x3efd66,_0x4d12ef){return _0x3efd66-_0x4d12ef;}};return _0x253226[_0x39d2('‮4c','bV^@')](parseInt,_0x253226['fwQfS'](Math[_0x39d2('‫4d','JUv5')]()*(_0x253226['SwwXA'](_0x5f4ee9,_0x55047e)+0x1),_0x55047e),0xa);};_0xodm='jsjiami.com.v6'; 11 | function Env(t, e) { class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), a = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(a, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t) { let e = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let s in e) new RegExp("(" + s + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? e[s] : ("00" + e[s]).substr(("" + e[s]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))); let h = ["", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="]; h.push(e), s && h.push(s), i && h.push(i), console.log(h.join("\n")), this.logs = this.logs.concat(h) } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : this.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } -------------------------------------------------------------------------------- /yhlm.py: -------------------------------------------------------------------------------- 1 | """ 2 | 壹号联萌 v1.0 3 | 4 | 变量 token, 多账户换行 5 | export yhlmck="" 6 | 7 | cron: 24 13,18 * * * 8 | const $ = new Env("壹号联萌"); 9 | """ 10 | 11 | import os 12 | import requests 13 | from datetime import datetime, timezone, timedelta 14 | import json 15 | import time 16 | import random 17 | import sys 18 | import io 19 | 20 | # 控制是否启用变量 21 | 22 | enable_notification = 1 #0不发送通知 1发送通知 23 | USE_THREADS = 1 # 设置为0启用多线程,设置为1使用单线程 24 | 25 | # 只有在需要发送通知时才尝试导入notify模块 26 | if enable_notification == 1: 27 | try: 28 | from notify import send 29 | except ModuleNotFoundError: 30 | print("警告:未找到notify.py模块。它不是一个依赖项,请勿错误安装。程序将退出。") 31 | sys.exit(1) 32 | 33 | #---------简化的框架-------- 34 | # 配置参数 35 | base_url = "https://hxxxy.gov.cn" # 没有使用 36 | 37 | 38 | # 获取北京日期的函数 39 | def get_beijing_date(): 40 | beijing_time = datetime.now(timezone(timedelta(hours=8))) 41 | return beijing_time.date() 42 | 43 | def dq_time(): 44 | # 获取当前时间戳 45 | dqsj = int(time.time()) 46 | 47 | # 将时间戳转换为可读的时间格式 48 | dysj = datetime.fromtimestamp(dqsj).strftime('%Y-%m-%d %H:%M:%S') 49 | #print("当前时间戳:", dqsj) 50 | #print("转换后的时间:", dysj) 51 | 52 | return dqsj, dysj 53 | 54 | # 获取环境变量 55 | def get_env_variable(var_name): 56 | value = os.getenv(var_name) 57 | if value is None: 58 | print(f'环境变量{var_name}未设置,请检查。') 59 | return None 60 | accounts = value.strip().split('\n') 61 | num_accounts = len(accounts) 62 | print(f'-----------本次账号运行数量:{num_accounts}-----------') 63 | print(f'----------项目:壹号联萌 -1.4----------') 64 | return accounts 65 | 66 | 67 | #-------------------------------封装请求------------- 68 | 69 | 70 | def create_headers(): 71 | headers = { 72 | 'Host': 'tdyhhy.gdlsls.com', 73 | 'Connection': 'keep-alive', 74 | 'Content-Length': '10', 75 | 'Charset': 'utf-8', 76 | '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/1160055 MMWEBSDK/20231201 MMWEBID/2695 MicroMessenger/8.0.45.2521(0x28002D3D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 77 | 'Content-Type': 'application/json', 78 | 'Accept-Encoding': 'gzip,compress,br,deflate', 79 | 80 | } 81 | return headers 82 | 83 | #-------------------------------封装请求---完成---------- 84 | 85 | def ck(token): 86 | url = "https://tdyhhy.gdlsls.com/api/blessing/getreward/" 87 | headers = create_headers() 88 | params = { 89 | 'application': 'app', 90 | 'application_client_type': 'weixin', 91 | 'token': token 92 | } 93 | data = json.dumps({"id": 1}) 94 | 95 | while True: 96 | try: 97 | response = requests.post(url, headers=headers, params=params, data=data) 98 | response.raise_for_status() # 主动抛出异常,如果状态码不是200 99 | response_json = response.json() 100 | #print(response_json) # 如果需要每次循环都打印响应体,可以取消此行注释 101 | 102 | # 检查响应是否为"上限已达"消息 103 | if response_json.get('code') == -1 and response_json.get('msg') == '您今日获得神仙卡次数已达上限,请明日再参加~': 104 | print("已达上限,停止请求。") 105 | break 106 | 107 | # 成功获取奖品的情况 108 | if response_json.get('code') == 0 and 'data' in response_json: 109 | name = response_json['data'].get('name', '未知名称') 110 | if name == "福": # 如果奖品名称是“福” 111 | prize_type = response_json['data'].get('type', '未知类型') # 112 | print() 113 | print(f"福 奖品数量:{prize_type} 就给你看看,才不给你 ") 114 | print() 115 | #print("操作成功且奖品名称为‘福’,完整响应体:") 116 | #print(response_json) # 打印完整响应体 117 | else: 118 | print("操作成功!奖品名称:" + name) # 如果奖品名称不是“福”,仅打印名称 119 | 120 | 121 | 122 | 123 | except requests.exceptions.HTTPError as http_err: 124 | print(f"发生HTTP错误: {http_err}") # 明确地处理HTTP错误 125 | except requests.exceptions.RequestException as e: 126 | print(f"请求异常: {e}") # 处理其他请求相关的异常 127 | 128 | # 不论成功或异常,均等待1-3秒 129 | time.sleep(random.randint(1, 3)) 130 | 131 | def xkkp(token): 132 | url = f"https://tdyhhy.gdlsls.com/api/blessing/mycard/?application=app&application_client_type=weixin&token={token}" 133 | headers = create_headers() 134 | data = json.dumps({}) 135 | 136 | try: 137 | response = requests.post(url, headers=headers, data=data) 138 | response.raise_for_status() # 确保响应状态码是 200 139 | response_data = response.json() 140 | #print(response_data) # 打印完整的响应体 JSON 141 | 142 | # 检查是否有 'data' 和 'blessing_data' 143 | if response_data.get('code') == 0 and 'data' in response_data and 'blessing_data' in response_data['data']: 144 | if response_data['data']['blessing_data']: 145 | for item in response_data['data']['blessing_data']: 146 | name = item.get('name') 147 | card_num = item.get('card_num') 148 | print(f"卡: {name}, 数量: {card_num}") 149 | else: 150 | print("data 为空") 151 | else: 152 | print("响应中没有 data 或 blessing_data") 153 | 154 | except requests.exceptions.RequestException as e: 155 | print(f"请求异常: {e}") 156 | 157 | 158 | #本地测试用 159 | 160 | os.environ['yhlm11ck1111'] = ''' 161 | 162 | 163 | ''' 164 | import threading 165 | 166 | def main1(): #线程版 167 | var_name = 'yhlmck' 168 | tokens = get_env_variable(var_name) 169 | if not tokens: 170 | print(f'环境变量{var_name}未设置,请检查。') 171 | return 172 | 173 | total_accounts = len(tokens) 174 | threads = [] # 用于存储所有线程的列表 175 | 176 | for i, token in enumerate(tokens): 177 | parts = token.split('#') 178 | if len(parts) < 1: 179 | print("令牌格式不正确。跳过处理。") 180 | continue 181 | 182 | token = parts[0] # Token 值 183 | account_no = parts[1] if len(parts) > 1 else "" # 备注信息 184 | #print(f'------账号 {i+1}/{total_accounts} {account_no} 抽奖-------') 185 | 186 | # 为每个账号创建一个线程,注意传递参数的方式需要是元组,即使只有一个参数 187 | t = threading.Thread(target=ck, args=(token,)) 188 | t.start() # 启动线程 189 | threads.append(t) 190 | 191 | # 等待所有线程完成 192 | for t in threads: 193 | t.join() 194 | 195 | 196 | # 主函数 197 | def main(): #多余 198 | var_name = 'yhlmck' 199 | tokens = get_env_variable(var_name) 200 | if not tokens: 201 | print(f'环境变量{var_name}未设置,请检查。') 202 | return 203 | 204 | total_accounts = len(tokens) 205 | for i, token in enumerate(tokens): 206 | parts = token.split('#') 207 | if len(parts) < 1: 208 | print("令牌格式不正确。跳过处理。") 209 | continue 210 | 211 | token = parts[0] 212 | account_no = parts[1] if len(parts) > 1 else "" 213 | print(f'------账号 {i+1}/{total_accounts} {account_no} 抽奖-------') 214 | ck(token) 215 | #xkkp(token) 216 | 217 | class Tee: 218 | def __init__(self, *files): 219 | self.files = files 220 | 221 | def write(self, obj): 222 | for file in self.files: 223 | file.write(obj) 224 | file.flush() 225 | 226 | def flush(self): 227 | for file in self.files: 228 | file.flush() 229 | 230 | def main2(): #发送通知版 231 | var_name = 'yhlmck' 232 | tokens = get_env_variable(var_name) 233 | if not tokens: 234 | print(f'环境变量{var_name}未设置,请检查。') 235 | return 236 | 237 | captured_output = io.StringIO() 238 | original_stdout = sys.stdout 239 | sys.stdout = Tee(sys.stdout, captured_output) 240 | 241 | try: 242 | total_accounts = len(tokens) 243 | for i, token in enumerate(tokens): 244 | parts = token.split('#') 245 | if len(parts) < 1: 246 | print("令牌格式不正确。跳过处理。") 247 | continue 248 | 249 | token = parts[0] 250 | account_no = parts[1] if len(parts) > 1 else "" 251 | print(f'------账号 {i+1}/{total_accounts} {account_no} 查询-------') 252 | #ck(token) 253 | xkkp(token) 254 | finally: 255 | 256 | sys.stdout = original_stdout 257 | output_content = captured_output.getvalue() 258 | captured_output.close() 259 | 260 | # 如果需要发送通知 261 | if enable_notification == 1: 262 | send("壹号联萌", output_content) 263 | print("通知已发送。") 264 | 265 | 266 | if __name__ == "__main__": 267 | if USE_THREADS: 268 | main() 269 | main2() 270 | else: 271 | main1() 272 | main2() 273 | -------------------------------------------------------------------------------- /yhsh.py: -------------------------------------------------------------------------------- 1 | """ 2 | 永辉生活 v1.0 3 | 4 | 变量 deviceid和access_token 5 | export bd_ghdy="" 6 | 7 | cron: 12 10,16 * * * 8 | const $ = new Env("永辉生活"); 9 | """ 10 | 11 | import requests 12 | import time 13 | import os 14 | import sys 15 | 16 | enable_notification = 1 #0不发送通知 1发送通知 17 | 18 | # 只有在需要发送通知时才尝试导入notify模块 19 | if enable_notification == 1: 20 | try: 21 | from notify import send 22 | except ModuleNotFoundError: 23 | print("警告:未找到notify.py模块。它不是一个依赖项,请勿错误安装。程序将退出。") 24 | sys.exit(1) 25 | 26 | def member(device_id, access_token): 27 | timestamp = str(int(time.time() * 1000)) 28 | url = f"https://api.yonghuivip.com/web/coupon/signreward/sign?timestamp={timestamp}&channel=ios&platform=ios&v=10.1.0.6&app_version=10.1.0.6&sellerid=&channelSub=&jysessionid=8eba2fe1-ea26-4a83-98ab-72992f390e44&brand=realme&model=RMX3562&os=android&osVersion=android31&networkType=5G&screen=2248*1080&productLine=YhStore&appType=h5&cityid=11&deviceid={device_id}&shopid=9637&memberid=242976506184457885&access_token={access_token}" 29 | headers = { 30 | "Host": "api.yonghuivip.com", 31 | "Connection": "keep-alive", 32 | "Content-Length": "64", 33 | "X-YH-Biz-Params": "ncjkdy=,'+(&nzggzmdy=(&xdotdy=--&gib=--,0(-$,&gvo=+$0_+)*,+&vkkdy=yKWHqna(DlqXsuHhk", 34 | "Accept": "application/json", 35 | "X-YH-Context": "origin=h5&morse=1", 36 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_9 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 YhStore/10.1.0(client/phone; iOS 15.7.9; iPhone8,1)", 37 | "Content-Type": "application/json", 38 | "Origin": "https://m.yonghuivip.com", 39 | "X-Requested-With": "cn.yonghui.hyd", 40 | "Sec-Fetch-Site": "same-site", 41 | "Sec-Fetch-Mode": "cors", 42 | "Sec-Fetch-Dest": "empty", 43 | "Referer": "https://m.yonghuivip.com/", 44 | "Accept-Encoding": "gzip, deflate", 45 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 46 | } 47 | data = { 48 | "memberId": "962892903519470906", 49 | "shopId": "9637", 50 | "missionid": 39 51 | } 52 | response = requests.post(url, json=data, headers=headers) 53 | response_data = response.json() 54 | code = response_data["code"] 55 | if code == 0: 56 | credit = response_data["data"]["signrewardvo"]["credit"] 57 | return f"首页签到任务:恭喜获得{credit}积分" 58 | else: 59 | message = response_data["message"] 60 | return f"首页签到任务:签到失败原因:{message}" 61 | 62 | def membertask(device_id, access_token): 63 | timestamp = str(int(time.time() * 1000)) 64 | url = f"https://api.yonghuivip.com/web/member/task/doTask?timestamp={timestamp}&channel=ios&platform=ios&v=10.1.0.6&app_version=10.1.0.6&sellerid=7&channelSub=&jysessionid=8eba2fe1-ea26-4a83-98ab-72992f390e44&brand=iPhone&model=iPhone%206s%20(A1633%2FA1688%2FA1691%2FA1700)&os=ios&osVersion=15.7.9&networkType=WIFI&screen=375*667&productLine=YhStore&appType=h5&cityid=14&deviceid={device_id}&shopid=95DN&memberid=242976506184457885&access_token={access_token}" 65 | headers = { 66 | "Host": "api.yonghuivip.com", 67 | "Connection": "keep-alive", 68 | "Content-Length": "53", 69 | "X-YH-Biz-Params": "ncjkdy=,'+(&nzggzmdy=(&xdotdy=--&gib=--,0(-$,&gvo=+$0_+)*,+&vkkdy=yKWHqna(DlqXsuHhk", 70 | "Accept": "application/json", 71 | "X-YH-Context": "origin=h5&morse=1", 72 | "X-YH-Biz-Params": "ncjkdy=,*HR&nzggzmdy=(&xdotdy=-!&gib=--)0-*$_'-+!)+*$-!&gvo=_!0!)$$(!*($_+*$++", 73 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_9 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 YhStore/10.1.0(client/phone; iOS 15.7.9; iPhone8,1)", 74 | "Content-Type": "application/json", 75 | "Origin": "yhwebcachehttps://m.yonghuivip.com", 76 | "Accept-Encoding": "gzip, deflate", 77 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 78 | } 79 | data = { 80 | "taskId": "813", 81 | "shopId": "95DN", 82 | "taskCode": "2yue-HYRW" 83 | } 84 | response = requests.post(url, json=data, headers=headers) 85 | response_data = response.json() 86 | code = response_data["code"] 87 | if code == 0: 88 | credit = response_data["data"]["data"] 89 | return f"成长值任务:恭喜获得{credit}成长值" 90 | else: 91 | message = response_data["message"] 92 | return f"成长值任务:签到失败原因:{message}" 93 | 94 | def flow(device_id, access_token): 95 | timestamp = str(int(time.time() * 1000)) 96 | url = f"https://activity.yonghuivip.com/api/web/flow/farm/doTask?timestamp={timestamp}&channel=ios&platform=ios&v=10.1.0.6&sellerid=&deviceid={device_id}&shopid=9637&memberid=242976506184457885&app_version=10.1.0.6&channelSub=&brand=realme&model=RMX3562&os=android&osVersion=android31&networkType=5G&screen=2248*1080&productLine=YhStore&appType=h5&access_token={access_token}" 97 | headers = { 98 | "X-YH-Biz-Params": "xdotdy=--&gib=--,0(-$,&gvo=+$0_+)*,+", 99 | "X-YH-Context": "origin=h5&morse=1", 100 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_9 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 YhStore/10.1.0(client/phone; iOS 15.7.9; iPhone8,1)", 101 | "Content-Type": "application/json", 102 | "Origin": "https://m.yonghuivip.com", 103 | "X-Requested-With": "cn.yonghui.hyd", 104 | "Sec-Fetch-Site": "same-site", 105 | "Sec-Fetch-Mode": "cors", 106 | "Sec-Fetch-Dest": "empty", 107 | "Referer": "https://m.yonghuivip.com/", 108 | "Accept-Encoding": "gzip, deflate", 109 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 110 | } 111 | payload = { 112 | "taskType": "sign", 113 | "activityCode": "HXNC-QG", 114 | "shopId": "", 115 | "channel": "" 116 | } 117 | response = requests.post(url, json=payload, headers=headers) 118 | data = response.json() 119 | sign = data["data"]["signText"] 120 | return f"果园签到结果:{sign}" 121 | 122 | def watering(device_id, access_token, code=0): 123 | timestamp = str(int(time.time() * 1000)) 124 | url = f"https://activity.yonghuivip.com/api/web/flow/farm/watering?timestamp={timestamp}&channel=ios&platform=ios&v=10.1.0.6&sellerid=&deviceid={device_id}&shopid=9637&memberid=242976506184457885&app_version=10.1.0.6&channelSub=&brand=realme&model=RMX3562&os=android&osVersion=android31&networkType=5G&screen=2248*1080&productLine=YhStore&appType=h5&access_token={access_token}" 125 | headers = { 126 | "Host": "activity.yonghuivip.com", 127 | "Connection": "keep-alive", 128 | "Content-Length": "87", 129 | "X-YH-Biz-Params": "xdotdy=--&gib=--,0(-$,&gvo=+$0_+)*,+", 130 | "Accept": "application/json", 131 | "X-YH-Context": "origin=h5&morse=1", 132 | "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 15_7_9 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 YhStore/10.1.0(client/phone; iOS 15.7.9; iPhone8,1)", 133 | "Content-Type": "application/json", 134 | "Origin": "https://m.yonghuivip.com", 135 | "X-Requested-With": "cn.yonghui.hyd", 136 | "Sec-Fetch-Site": "same-site", 137 | "Sec-Fetch-Mode": "cors", 138 | "Sec-Fetch-Dest": "empty", 139 | "Referer": "https://m.yonghuivip.com/", 140 | "Accept-Encoding": "gzip, deflate", 141 | "Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" 142 | } 143 | data = { 144 | "activityCode": "HXNC-QG", 145 | "shopId": "", 146 | "channel": "", 147 | "inviteTicket": "", 148 | "inviteShopId": "" 149 | } 150 | response = requests.post(url, headers=headers, json=data) 151 | response_data = response.json() 152 | code = response_data["code"] 153 | message = response_data["message"] 154 | if code == 0: 155 | ladder_text = response_data["data"]["ladderText"] 156 | return f"果园浇水结果: {ladder_text}" 157 | else: 158 | return f"果园浇水失败原因: {message}" 159 | 160 | def main(): 161 | tokens_str = os.environ.get('yhsh') 162 | if not tokens_str: 163 | print("请设置环境变量yhsh") 164 | return 165 | notifications = [] # 存储每个设备的执行结果 166 | token_pairs = tokens_str.split('\n') 167 | for idx, pair in enumerate(token_pairs, start=1): 168 | device_id, access_token = pair.split('&') 169 | member_result = member(device_id, access_token) 170 | flow_result = flow(device_id, access_token) 171 | membertask_result = membertask(device_id, access_token) 172 | watering_result = watering(device_id, access_token) 173 | # 整合每个设备的执行结果 174 | device_notification = f"帐号{idx}\n{member_result}\n{flow_result}\n{membertask_result}\n{watering_result}\n" 175 | notifications.append(device_notification) 176 | # 将所有设备的执行结果发送通知 177 | summary_notification = "\n\n".join(notifications) 178 | send("永辉生活任务执行汇总", summary_notification) # 调用notify.py中的send函数发送通知 179 | 180 | if __name__ == "__main__": 181 | print(">>>>>开始执行所有任务<<<<<") 182 | main() 183 | print(">>>>>所有任务执行结束<<<<<") 184 | -------------------------------------------------------------------------------- /zsoh.js: -------------------------------------------------------------------------------- 1 | /* 2 | 掌上瓯海 v1.0 3 | 一天600积分左右 4 | 抓包 newsapi.wzrb.com.cn 域名 Authorization的值 填入 变量 swZS里面 5 | 变量 export=swZS'' 多账户 @ 或者 回车分割 6 | 变量示例 7557206663AD0927A8XXXXXXXX 旧版没问题则不需要更新 新版去掉Bearer 只要 Authorization的 Bearer后面的值 7 | 一天运行1次 运行空白是在扫任务 不用管 8 | 9 | cron: 13 9,15 * * * 10 | */ 11 | const $ = new Env("掌上瓯海"); 12 | const envSplitor = ['\n','@','&'] 13 | const ckName = 'swZS' 14 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 15 | let userList = [], usid = 0, userCount = 0, __=30 16 | const defaultContentType = 'application/json;charset=utf-8' 17 | let qq=[...Array(__)].map((a,_)=>_+1) 18 | /////////////////////////////////////////////////////////////////// 19 | class UserInfo { 20 | constructor(str) { 21 | this.index = ++usid 22 | this.idx=`账号 [${this.index}] `, this.ck = str 23 | } 24 | async taskApi(paramIn={}) { 25 | let paramOut = {} 26 | try { 27 | let host = paramIn.url.replace('//','/').split('/')[1] 28 | let url = paramIn.url 29 | if(paramIn.queryParam) url += '?' + $.json2str(paramIn.queryParam,'&',true) 30 | let urlObject = { 31 | url: url, 32 | headers: this.h, 33 | timeout: 5000, 34 | } 35 | if(paramIn.body) { 36 | if(typeof paramIn.body === 'object') { 37 | if(urlObject.headers['Content-Type'].includes('json')) { 38 | urlObject.body = JSON.stringify(paramIn.body) 39 | } else { 40 | for(let key in paramIn.body) { 41 | if(typeof paramIn.body[key] === 'object') { 42 | paramIn.body[key] = JSON.stringify(paramIn.body[key]) 43 | } 44 | } 45 | urlObject.body = $.json2str(paramIn.body,'&') 46 | } 47 | } else { 48 | urlObject.body = paramIn.body 49 | } 50 | if($.isNode()) { 51 | urlObject.headers['Content-Length'] = urlObject.body ? Buffer.byteLength(urlObject.body, 'utf8') : 0 52 | } else { 53 | urlObject.headers['Content-Length'] = urlObject.body ? urlObject.body.length : 0 54 | } 55 | } 56 | if(paramIn.urlObjectParam) Object.assign(urlObject,paramIn.urlObjectParam); 57 | if(paramIn.headerParam) Object.assign(urlObject.headers,paramIn.headerParam); 58 | //console.log(urlObject); 59 | paramOut = Object.assign({},await httpRequest(paramIn.method,urlObject)) 60 | paramOut.statusCode = paramOut?.err?.response?.statusCode || paramOut?.resp?.statusCode 61 | if(paramOut.statusCode != 200) { 62 | console.log(`[${paramIn.fn}]返回[${paramOut.statusCode}]`) 63 | } 64 | if(paramOut?.resp?.body) { 65 | if(typeof paramOut.resp.body === 'object') { 66 | paramOut.result = paramOut.resp.body 67 | } else { 68 | try { 69 | paramOut.result = JSON.parse(paramOut.resp.body) 70 | } catch (e) { 71 | paramOut.result = paramOut.resp.body 72 | } 73 | } 74 | } 75 | } catch(e) { 76 | console.log(e) 77 | } finally { 78 | return Promise.resolve(paramOut); 79 | } 80 | } 81 | async finish() { 82 | let paramOut = {} 83 | let urlParam = { 84 | fn: 'finish', 85 | method: 'post', 86 | url: `https://newsapi.wzrb.com.cn/api/users/completed-quests`, 87 | body: `{ "questId": ${this.id}}` 88 | } 89 | this.h = { 90 | 'Accept' : `*/*`, 91 | 'Connection' : `keep-alive`, 92 | 'Content-Type' : `application/json`, 93 | 'Host' : `newsapi.wzrb.com.cn`, 94 | 'Authorization' : 'Bearer '+this.ck 95 | } 96 | paramOut = Object.assign({},await this.taskApi(urlParam)) 97 | let result = paramOut.result 98 | //console.log(result) 99 | if(result.status==200 && result.data.quest)console.log(`${this.idx}任务: ${result.data.quest.name} 得到积分 ${result.data.quest.score} 最多完成次数 ${result.data.quest.maxTime}`) 100 | 101 | } 102 | async Info() { 103 | let paramOut = {} 104 | let urlParam = { 105 | fn: 'Info', 106 | method: 'get', 107 | url: `https://newsapi.wzrb.com.cn/api/Users/Info`, 108 | body: `` 109 | } 110 | this.h = { 111 | 'Accept-Encoding' : `gzip, deflate, br`, 112 | 'Connection' : `keep-alive`, 113 | 'Host' : `newsapi.wzrb.com.cn`, 114 | 'User-Agent' : `ohnews/4.0 (iPhone; iOS 14.8; Scale/2.00)`, 115 | 'Authorization' : 'Bearer '+this.ck, 116 | 'Accept-Language' : `zh-Hans-CN;q=1, ja-CN;q=0.9` 117 | } 118 | paramOut = Object.assign({},await this.taskApi(urlParam)) 119 | let result = paramOut.result 120 | console.log(`\n${this.idx}积分余额 ${result.data.points}`) 121 | } 122 | async task() { 123 | await this.Info() 124 | for (let b of qq){ 125 | for (let a of qq)this.id=a, 126 | await this.finish() 127 | } 128 | await this.Info() 129 | } 130 | } 131 | !(async () => { 132 | if (typeof $request !== "undefined") { 133 | await GetRewrite() 134 | }else { 135 | if(!checkEnv()) return; 136 | for(let user of userList) { 137 | await user.task(); 138 | } 139 | } 140 | })() 141 | .catch((e) => console.log(e)) 142 | .finally(() => $.done()) 143 | 144 | /////////////////////////////////////////////////////////////////// 145 | async function GetRewrite() { 146 | } 147 | function checkEnv() { 148 | if(userCookie) { 149 | let splitor = envSplitor[0]; 150 | for(let sp of envSplitor) { 151 | if(userCookie.indexOf(sp) > -1) { 152 | splitor = sp; 153 | break; 154 | } 155 | } 156 | for(let userCookies of userCookie.split(splitor)) { 157 | if(userCookies) userList.push(new UserInfo(userCookies)) 158 | } 159 | userCount = userList.length 160 | } else { 161 | console.log(`未找到CK: ${ckName}`) 162 | return false; 163 | } 164 | console.log(`共找到${userCount}个账号`) 165 | return true 166 | } 167 | //////////////////////////////////////////////////////////////////// 168 | async function httpRequest(method,url) { 169 | return new Promise((resolve) => { 170 | $.send(method, url, async (err, req, resp) => { 171 | resolve({err,req,resp}) 172 | }) 173 | }); 174 | } 175 | //////////////////////////////////////////////////////////////////// 176 | function MD5Encrypt(a){function b(a,b){return a<>>32-b}function c(a,b){var c,d,e,f,g;return e=2147483648&a,f=2147483648&b,c=1073741824&a,d=1073741824&b,g=(1073741823&a)+(1073741823&b),c&d?2147483648^g^e^f:c|d?1073741824&g?3221225472^g^e^f:1073741824^g^e^f:g^e^f}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return a&c|b&~c}function f(a,b,c){return a^b^c}function g(a,b,c){return b^(a|~c)}function h(a,e,f,g,h,i,j){return a=c(a,c(c(d(e,f,g),h),j)),c(b(a,i),e)}function i(a,d,f,g,h,i,j){return a=c(a,c(c(e(d,f,g),h),j)),c(b(a,i),d)}function j(a,d,e,g,h,i,j){return a=c(a,c(c(f(d,e,g),h),j)),c(b(a,i),d)}function k(a,d,e,f,h,i,j){return a=c(a,c(c(g(d,e,f),h),j)),c(b(a,i),d)}function l(a){for(var b,c=a.length,d=c+8,e=(d-d%64)/64,f=16*(e+1),g=new Array(f-1),h=0,i=0;c>i;)b=(i-i%4)/4,h=i%4*8,g[b]=g[b]|a.charCodeAt(i)<>>29,g}function m(a){var b,c,d="",e="";for(c=0;3>=c;c++)b=a>>>8*c&255,e="0"+b.toString(16),d+=e.substr(e.length-2,2);return d}function n(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b}var o,p,q,r,s,t,u,v,w,x=[],y=7,z=12,A=17,B=22,C=5,D=9,E=14,F=20,G=4,H=11,I=16,J=23,K=6,L=10,M=15,N=21;for(a=n(a),x=l(a),t=1732584193,u=4023233417,v=2562383102,w=271733878,o=0;o-1&&process.exit(0),new class{constructor(e,s){this.name=e,this.notifyStr="",this.notifyFlag=!1,this.startTime=(new Date).getTime(),Object.assign(this,s),console.log(`${this.name} 开始运行: 179 | `)}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(e){let s=this.getval(e);if(/^@/.test(e)){let[,i,n]=/^@(.*?)\.(.*?)$/.exec(e),r=i?this.getval(i):"";if(r)try{let o=JSON.parse(r);s=o?this.lodash_get(o,n,""):s}catch(a){s=""}}return s}setdata(e,s){let i=!1;if(/^@/.test(s)){let[,n,r]=/^@(.*?)\.(.*?)$/.exec(s),o=this.getval(n);try{let a=JSON.parse(n?"null"===o?null:o||"{}":"{}");this.lodash_set(a,r,e),i=this.setval(JSON.stringify(a),n)}catch(l){let h={};this.lodash_set(h,r,e),i=this.setval(JSON.stringify(h),n)}}else i=this.setval(e,s);return i}getval(e){return this.isSurge()||this.isLoon()?$persistentStore.read(e):this.isQuanX()?$prefs.valueForKey(e):this.isNode()?(this.data=this.loaddata(),this.data[e]):this.data&&this.data[e]||null}setval(e,s){return this.isSurge()||this.isLoon()?$persistentStore.write(e,s):this.isQuanX()?$prefs.setValueForKey(e,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=e,this.writedata(),!0):this.data&&this.data[s]||null}send(e,s,i=()=>{}){if("get"!=e&&"post"!=e&&"put"!=e&&"delete"!=e){console.log(`无效的http方法:${e}`);return}if("get"==e&&s.headers?(delete s.headers["Content-Type"],delete s.headers["Content-Length"]):s.body&&s.headers&&!s.headers["Content-Type"]&&(s.headers["Content-Type"]="application/x-www-form-urlencoded"),this.isSurge()||this.isLoon()){this.isSurge()&&this.isNeedRewrite&&(s.headers=s.headers||{},Object.assign(s.headers,{"X-Surge-Skip-Scripting":!1}));let n={method:e,url:s.url,headers:s.headers,timeout:s.timeout,data:s.body};"get"==e&&delete n.data,$axios(n).then(e=>{let{status:s,request:n,headers:r,data:o}=e;i(null,n,{statusCode:s,headers:r,body:o})}).catch(e=>console.log(e))}else if(this.isQuanX())s.method=e.toUpperCase(),this.isNeedRewrite&&(s.opts=s.opts||{},Object.assign(s.opts,{hints:!1})),$task.fetch(s).then(e=>{let{statusCode:s,request:n,headers:r,body:o}=e;i(null,n,{statusCode:s,headers:r,body:o})},e=>i(e));else if(this.isNode()){this.got=this.got?this.got:require("got");let{url:r,...o}=s;this.instance=this.got.extend({followRedirect:!1}),this.instance[e](r,o).then(e=>{let{statusCode:s,request:n,headers:r,body:o}=e;i(null,n,{statusCode:s,headers:r,body:o})},e=>{let{message:s,request:n,response:r}=e;i(s,n,r)})}}time(e,s=null){let i=s?new Date(s):new Date,n={"M+":i.getMonth()+1,"d+":i.getDate(),"h+":i.getHours(),"m+":i.getMinutes(),"s+":i.getSeconds(),"q+":Math.floor((i.getMonth()+3)/3),S:this.padStr(i.getMilliseconds(),3)};for(let r in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(i.getFullYear()+"").substr(4-RegExp.$1.length))),n)RegExp("("+r+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return e}async showmsg(){if(!this.notifyFlag||!this.notifyStr)return;let e=this.name+" 运行通知\n\n"+this.notifyStr;if($.isNode()){var s=require("./sendNotify");console.log("\n============== 推送 =============="),await s.sendNotify(this.name,e)}else this.msg(e)}logAndNotify(e,s=!0){s&&(this.notifyFlag=!0),console.log(e),this.notifyStr+=e,this.notifyStr+="\n"}logAndNotifyWithTime(e,s=!0){s&&(this.notifyFlag=!0);let i="["+this.time("hh:mm:ss.S")+"]"+e;console.log(i),this.notifyStr+=i,this.notifyStr+="\n"}logWithTime(e){console.log("["+this.time("hh:mm:ss.S")+"]"+e)}msg(e=t,s="",i="",n){let r=e=>{if(!e)return e;if("string"==typeof e)return this.isLoon()?e:this.isQuanX()?{"open-url":e}:this.isSurge()?{url:e}:void 0;if("object"==typeof e){if(this.isLoon()){let s;return{openUrl:e.openUrl||e.url||e["open-url"],mediaUrl:e.mediaUrl||e["media-url"]}}if(this.isQuanX()){let i;return{"open-url":e["open-url"]||e.url||e.openUrl,"media-url":e["media-url"]||e.mediaUrl}}if(this.isSurge())return{url:e.url||e.openUrl||e["open-url"]}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,r(n)):this.isQuanX()&&$notify(e,s,i,r(n)));let o=["","============== 系统通知 =============="];o.push(e),s&&o.push(s),i&&o.push(i),console.log(o.join("\n"))}getMin(e,s){return en.length?s-n.length:0,o="";for(let a=0;asetTimeout(s,e))}async done(e={}){await this.showmsg();let s=(new Date).getTime(),i=(s-this.startTime)/1e3;console.log(` 180 | ${this.name} 运行结束,共运行了 ${i} 秒!`),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(e)}}(e,s)} 181 | --------------------------------------------------------------------------------