├── akbqd.py ├── bhxc.js ├── bjqc.js ├── bwkjz.js ├── ddgy.js ├── djxs.py ├── dt.js ├── dwgy.py ├── dyjsb.js ├── env_jjsq.js ├── fdshtx.py ├── gjzz.js ├── glym.js ├── gqcq.js ├── gqcqcj.py ├── gqcqwxxcx.js ├── gqsl.js ├── gylmtx.py ├── gylmym.js ├── hfzj.js ├── hqzl.js ├── jhdxw.js ├── jjsq.js ├── jlqc.js ├── jyj.js ├── kjgzzzj.js ├── lbdqwsc.js ├── mggy.py ├── mggyssd.py ├── mtCookie.js ├── mtmc_fruit.js ├── mtwm.js ├── mxbc.js ├── pddgy.py ├── pddssc.py ├── qcs.js ├── qifeixian.js ├── sbr.py ├── sfsy.js ├── shjd.py ├── shjs.js ├── sjb.py ├── slyd.js ├── soy_variable_data.js ├── tyshj.js ├── xinjieto.py ├── xky.js ├── ylhyfls.js ├── ylw.py ├── zippo.js ├── zstj.py ├── zswlapp.py ├── 七猫阅读.js ├── 掌心临海.js ├── 杰士邦.js ├── 沙龙汽车.js ├── 泰康在线.js ├── 湘窖俱乐部.js ├── 漫步者.js └── 福袋生活.js /akbqd.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 0 7 * * * 3 | new Env('艾克帮签到'); 4 | 5 | """ 6 | import json 7 | import os 8 | 9 | import requests, hashlib, time 10 | from pprint import pprint 11 | import time 12 | 13 | 14 | def get_md5(data1): 15 | # print(sign1) 16 | md5 = hashlib.md5() 17 | md5.update(data1.encode()) 18 | sign2 = md5.hexdigest()[0:32] 19 | return sign2 20 | 21 | 22 | def getUserDetails(token): 23 | url = "https://api.ikbang.cn/v2/iclick-new/usercenter/getUserDetails" 24 | time1 = str(int(time.time() * 1000)) 25 | sign1 = url + time1 + "A749380BBD5A4D93B55B4BE245A42988" + token 26 | sign1 = get_md5(sign1) 27 | headers = { 28 | 'Host': 'api.ikbang.cn', 29 | 'Connection': 'keep-alive', 30 | 'charset': 'utf-8', 31 | 'sign': sign1, 32 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4364 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001736) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 33 | 'content-type': 'application/json', 34 | 'Accept-Encoding': 'gzip,compress,br,deflate', 35 | 'token': token, 36 | 'timestamp': time1, 37 | 'Referer': 'https://servicewechat.com/wx342d760f674b013b/38/page-frame.html', 38 | } 39 | response = requests.get(url=url, headers=headers).json() 40 | # pprint(response) 41 | if response['code'] == 1: 42 | userName = response['result']["userName"] 43 | totalPoints = response['result']["totalPoints"] 44 | print(f"欢迎{userName},目前{totalPoints}积分".center(50, "*")) 45 | return f'{userName},目前艾克帮积分{totalPoints}积分' 46 | 47 | 48 | def getsign(token): 49 | url = "https://api.ikbang.cn/v2/iclick-new/signIn/sign" 50 | time1 = str(int(time.time() * 1000)) 51 | sign1 = url + time1 + "A749380BBD5A4D93B55B4BE245A42988" + token 52 | sign1 = get_md5(sign1) 53 | headers = { 54 | 'Host': 'api.ikbang.cn', 55 | 'Connection': 'keep-alive', 56 | 'charset': 'utf-8', 57 | 'sign': sign1, 58 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4364 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001736) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 59 | 'content-type': 'application/json', 60 | 'Accept-Encoding': 'gzip,compress,br,deflate', 61 | 'token': token, 62 | 'timestamp': time1, 63 | 'Referer': 'https://servicewechat.com/wx342d760f674b013b/38/page-frame.html', 64 | } 65 | response = requests.post(url=url, headers=headers).json() 66 | # pprint(response) 67 | if response['code'] == 1: 68 | sorce = response['result'] 69 | print(f"签到获得{sorce}积分") 70 | else: 71 | print(response["description"]) 72 | 73 | 74 | def getUserVisibleSurvey(token): 75 | url = "https://api.ikbang.cn/v2/iclick-new/survey/getUserVisibleSurvey" 76 | time1 = str(int(time.time() * 1000)) 77 | sign1 = url + time1 + "A749380BBD5A4D93B55B4BE245A42988" + token 78 | sign1 = get_md5(sign1) 79 | headers = { 80 | 'Host': 'api.ikbang.cn', 81 | 'Connection': 'keep-alive', 82 | 'charset': 'utf-8', 83 | 'sign': sign1, 84 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4364 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001736) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 85 | 'content-type': 'application/json', 86 | 'Accept-Encoding': 'gzip,compress,br,deflate', 87 | 'token': token, 88 | 'timestamp': time1, 89 | 'Referer': 'https://servicewechat.com/wx342d760f674b013b/38/page-frame.html', 90 | } 91 | response = requests.get(url=url, headers=headers).json() 92 | pprint(response) 93 | if response['code'] == 1: 94 | list = response['result'] 95 | for i in list[1:]: 96 | title = i["title"] 97 | surveyId = i["surveyId"] 98 | score = i["highest"] 99 | print(title, surveyId, score) 100 | url1 = get_survey_url(token, surveyId) 101 | return url1 102 | 103 | 104 | def get_survey_url(token, surveyId): 105 | url = f"https://api.ikbang.cn/v2/iclick-new/survey/redirect-survey-url?surveyId={surveyId}" 106 | time1 = str(int(time.time() * 1000)) 107 | url1 = "https://api.ikbang.cn/v2/iclick-new/survey/redirect-survey-url" 108 | sign1 = url1 + time1 + f'surveyId={surveyId}' + "A749380BBD5A4D93B55B4BE245A42988" + token 109 | sign1 = get_md5(sign1) 110 | headers = { 111 | 'Host': 'api.ikbang.cn', 112 | 'Connection': 'keep-alive', 113 | 'charset': 'utf-8', 114 | 'sign': sign1, 115 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4364 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001736) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 116 | 'content-type': 'application/json', 117 | 'Accept-Encoding': 'gzip,compress,br,deflate', 118 | 'token': token, 119 | 'timestamp': time1, 120 | 'Referer': 'https://servicewechat.com/wx342d760f674b013b/38/page-frame.html', 121 | } 122 | response = requests.get(url=url, headers=headers).json() 123 | 124 | if response['code'] == 1: 125 | url = response['result'] 126 | print(url) 127 | return url 128 | 129 | 130 | def get_index(url): 131 | url = url 132 | headers = { 133 | # 'Host': 'api.ikbang.cn', 134 | # 'Connection': 'keep-alive', 135 | # 'charset': 'utf-8', 136 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4364 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001736) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 137 | # 'content-type': 'application/json', 138 | # 'Accept-Encoding': 'gzip,compress,br,deflate', 139 | # 'Referer': 'https://servicewechat.com/wx342d760f674b013b/38/page-frame.html', 140 | } 141 | response = requests.get(url=url, headers=headers).text 142 | print(response) 143 | 144 | 145 | def webhook(message, webhook_token): 146 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 147 | headers = { 148 | 'Content-Type': 'application/json' 149 | 150 | } 151 | data = { 152 | "msgtype": "text", 153 | "text": { 154 | "content": message 155 | } 156 | } 157 | body = json.dumps(data).encode(encoding='utf-8') 158 | # headers = {'Content-Type': 'application/json'} 159 | response = requests.post(url=url, data=body, headers=headers).json() 160 | if response["errmsg"] == 'ok': 161 | print("企业微信推送成功") 162 | else: 163 | print("推送失败") 164 | 165 | 166 | if __name__ == '__main__': 167 | akbtooken = os.environ["akbtooken"] 168 | QYWX_KEY = os.environ["QYWX_KEY"] 169 | getUserDetails(akbtooken) 170 | getsign(akbtooken) 171 | message = getUserDetails(akbtooken) 172 | webhook(message, QYWX_KEY) 173 | -------------------------------------------------------------------------------- /djxs.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 1 8,12,13-22,23 * * * 3 | const $ = new Env("得见小说") 4 | """ 5 | 6 | import datetime 7 | import json 8 | import os 9 | from pprint import pprint 10 | import time 11 | from Crypto.PublicKey import RSA 12 | from Crypto.Signature import PKCS1_v1_5 13 | from Crypto.Hash import MD5, SHA1, SHA256 14 | import base64 15 | import requests 16 | 17 | headers = { 18 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36', 19 | 'Accept-Encoding': 'gzip, deflate', 20 | 'Accept': '*/*', 21 | 'Connection': 'keep-alive', 22 | 'Host': 'dj.palmestore.com', 23 | 'Referer': 'https://dj.palmestore.com/zycl/gold/index?zyeid=112f18c1-1969-4702-ab6c-aeeccf9a48a5&usr=j91705802&rgt=7&p1=YmkKeycIOFoDADjE6366M8lR&ku=j91705802&source=welfare&pc=10&p2=124020&p3=20000056&p4=501656&p5=19&p6=&p7=__5036784b31d92113&p9=0&p12=&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p28=&p30=&p31=__5036784b31d92113&firm=google&pca=channel-visit', 24 | 'Cookie': '', 25 | } 26 | 27 | 28 | def _encrpt(string, private_key): 29 | priKey = RSA.importKey(private_key) 30 | signer = PKCS1_v1_5.new(priKey, ) 31 | hash_obj = SHA1.new(string.encode('utf-8')) 32 | signature = base64.b64encode(signer.sign(hash_obj)) 33 | return signature.decode() 34 | 35 | 36 | def gen_body(pwd): 37 | '''根据账号密码生成请求的body然后调用_encrpt方法加密''' 38 | public_key = """MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMXGjyS3p+3AVnlBJe5VQ6tC9inh 39 | 8tVBve4r+yBjC5HQD6th2n3tSyuNVYaNRAFSEq+OENwnwwhjbYUnjLWb+qZscB43K1+4/WlKdvfg 40 | wQVXm0ZQ2+jMBf+165UBEEuuWT2WqXeKkkUqPQta5lrt4eFfbo53JcOO4D5fDSGQS5bZAgMBAAEC 41 | gYAor4I/AXEQXeLsKtTMxMmY77uIPi0gZdfWqUGOFhIJOw4eKZEzGp++I+MWPPVieCnT55vcTmm2 42 | zg13uP0fVykmukWqZszG/ZNpPKYleOqnZOqQj7O3au8Ywz18F/pqD++PsUzxRVeXxSOOwmjQ0D2P 43 | e/9yutz62pyiFGAzDsaI6QJBAMn8DeBT3AtcWuONdiHL3yC4NkGJDdyBbMOaWyvrcvUUZr13uS9m 44 | ZO6pLTN6v9tkmPUdvYxcPTJ9wdGR7NcNPDsCQQD6qluGI2VAlz4s5UoDnelFKrwDPeiruE3I6wsr 45 | asK6h37DsAE6OrQgx2dm4yH7ntJHUlJCZ5ay1EBNfEexgQv7AkA1r2vUwxVKY7q4nqHWa8SbgrrR 46 | AmePw0qwVreC3erJHyoLk+XBpnqPQKIF+8tAueU5yTTXOLD/WZOJazrDEf5/AkBpwG+Ggu5Xtrcb 47 | d8ynA/sDHElf0MGVmNbwOgFnWs42pa1cX6fU6ilOXvIH3TFcF6A9SMS9kThpz9QlHJaek4P7AkAa 48 | vQillA/wnrha9GsK5UFmzmwNfkjLLW4psAUsXOsqFXWMoxTd0xWuSbuVOzERpbFMBl1VoZQmD9BL 49 | SVOTNe+v""" 50 | key = '-----BEGIN PRIVATE KEY-----\n' + public_key + '\n-----END PRIVATE KEY-----' 51 | encrypt_res = _encrpt(pwd, key) 52 | return encrypt_res 53 | 54 | 55 | # 登录 56 | def sign(): 57 | url = "https://dj.palmestore.com/zycl/gold/dailyWelfareV4?usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&p2=124020&p3=20000056&p4=501656&p5=19&p7=__f70b1c61e3dfa4c0&p9=0&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p31=__f70b1c61e3dfa4c0&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&pca=channel-visit&ku=j56126217&kt=991ea219c912e9def1193de24640c580&firm=google&bannerType=2&signSwitch" 58 | resonse = requests.get(url, headers=headers) 59 | print(resonse.status_code) 60 | 61 | 62 | # 登录后签到 63 | def sign_last(): 64 | url = 'https://dj.palmestore.com/zybk/api/bookshelf/index?usr=j56126217&sign=EpSDdolhLUMtBpOaLShXJRWOfC5zuL%2FXAzG24h0g53MRkVfWvz5RCQGjx3tIvpuoB4xoSGr2HthLxpBrHB1mpG3nE2zkN5t2CoSX6DDh%2FdriVcy1KxW7c2TZELLzdDyE9u3NKo%2Fw81ojru8yJsPHz0Ar8JB0Jx4dOmw8ERLGn4g%3D×tamp=1653351211129&aaid=6ED5628D-A06B-AA3A-D89A-996E10EB13E8&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&ku=j56126217&kt=991ea219c912e9def1193de24640c580&pc=10&p2=124020&p3=20000056&p4=501656&p5=19&p6=&p7=__f70b1c61e3dfa4c0&p9=0&p12=&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p28=&p30=&p31=__f70b1c61e3dfa4c0&firm=google' 65 | resonse = requests.get(url, headers=headers).json() 66 | # print(resonse) 67 | re_data = resonse['body']['sign']['desc2'] 68 | print(f'已连续签到{re_data}') 69 | return f'已连续签到{re_data}' 70 | 71 | 72 | # 领三餐奖励 73 | def three_meal(): 74 | time1 = int(time.time() * 1000) 75 | sign = f"p2=124020¶m=378×tamp={time1}&usr=j56126217" 76 | sign1 = gen_body(sign) 77 | url = f'https://dj.palmestore.com/zycl/gold/receive?usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&p2=124020&p3=20000056&p4=501656&p5=19&p7=__f70b1c61e3dfa4c0&p9=0&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p31=__f70b1c61e3dfa4c0&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&pca=channel-visit&ku=j56126217&kt=991ea219c912e9def1193de24640c580&firm=google¶m=378&sign={sign1}×tamp={time1}&type=sleepTask&taskId=378&coin=50' 78 | resonse = requests.get(url, headers=headers).json() 79 | # print(resonse) 80 | if resonse['code'] == 0: 81 | print(f'领三餐奖励{resonse["body"]}') 82 | else: 83 | print(resonse["msg"]) 84 | 85 | 86 | def box(): 87 | time1 = int(time.time() * 1000) 88 | sign = f"p2=124020¶m=50×tamp={time1}&usr=j56126217" 89 | sign1 = gen_body(sign) 90 | url = f'https://dj.palmestore.com/zycl/gold/receive?usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&p2=124020&p3=20000056&p4=501656&p5=19&p7=__f70b1c61e3dfa4c0&p9=0&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p31=__f70b1c61e3dfa4c0&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&pca=channel-visit&ku=j56126217&kt=991ea219c912e9def1193de24640c580&firm=google¶m=50&sign={sign1}×tamp={time1}&type=boxTask&incrId=50' 91 | resonse = requests.get(url, headers=headers).json() 92 | # print(resonse) 93 | if resonse['code'] == 0: 94 | print(f'开宝箱获得{resonse["body"]["coin"]}金币') 95 | else: 96 | print(resonse["msg"]) 97 | param = 10182 98 | time.sleep(20) 99 | look_box_video(param) 100 | 101 | 102 | def look_box_video(param): 103 | time1 = int(time.time() * 1000) 104 | sign = f"p2=124020¶m={param}×tamp={time1}&usr=j56126217" 105 | sign1 = gen_body(sign) 106 | url = f'https://dj.palmestore.com/zycl/gold/notice/video?usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&p2=124020&p3=20000056&p4=501656&p5=19&p7=__f70b1c61e3dfa4c0&p9=0&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p31=__f70b1c61e3dfa4c0&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&pca=channel-visit&ku=j56126217&kt=991ea219c912e9def1193de24640c580&firm=google¶m={param}&sign={sign1}×tamp={time1}&type=globalPopVideo&videoId={param}&pos=VIDEO_POP_WINDOW' 107 | resonse = requests.get(url, headers=headers).json() 108 | if resonse['code'] == 0: 109 | print(f'开宝箱获得{resonse["body"]["goldNum"]}金币') 110 | else: 111 | print(resonse["msg"]) 112 | 113 | 114 | def look_video(): 115 | time1 = int(time.time() * 1000) 116 | sign = f"p2=124020¶m=10348-0×tamp={time1}&usr=j56126217" 117 | sign1 = gen_body(sign) 118 | url = f'https://dj.palmestore.com/zycl/gold/receive?usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&p2=124020&p3=20000056&p4=501656&p5=19&p7=__f70b1c61e3dfa4c0&p9=0&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p31=__f70b1c61e3dfa4c0&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&pca=channel-visit&ku=j56126217&kt=991ea219c912e9def1193de24640c580&firm=google¶m=10348-0&sign={sign1}×tamp={time1}&type=videoTask&videoId=10348&itemId=0¶m=10348-0' 119 | resonse = requests.get(url, headers=headers).json() 120 | if resonse['code'] == 0: 121 | print(f'开宝箱获得{resonse["body"]["coin"]}金币,{resonse["body"]["num"]}声望') 122 | else: 123 | print(resonse["msg"]) 124 | 125 | 126 | def push_plus_bot(content): 127 | b = content 128 | headers = { 129 | "Host": "www.pushplus.plus", 130 | "Origin": "http://www.pushplus.plus", 131 | "Referer": "http://www.pushplus.plus/push1.html", 132 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.44", 133 | "X-Requested-With": "XMLHttpRequest", 134 | 135 | } 136 | url = 'http://www.pushplus.plus/api/send' 137 | data = { 138 | "token": 'f41e605cf752414d9cc832b6c144c302', 139 | "title": '得见小说签到', 140 | "content": b, 141 | "channel": "wechat", 142 | "template": "html", 143 | 'webhook': "" 144 | } 145 | body = json.dumps(data).encode(encoding='utf-8') 146 | response = requests.post(url=url, data=body, headers=headers).json() 147 | print(response) 148 | if response['code'] == 200: 149 | print('推送成功!') 150 | else: 151 | print('推送失败!') 152 | 153 | 154 | def user_coin(): 155 | time1 = int(time.time() * 1000) 156 | sign = f"timestamp={time1}&usr=j56126217" 157 | sign1 = gen_body(sign) 158 | url = f'https://dj.palmestore.com/zyuc/api/user/accountInfo?pluginVersion=182.0&sign={sign1}×tamp={time1}&usr=j56126217&zyeid=b0aa8ad0-f855-49ab-8be3-f8c823a66778&usr=j56126217&rgt=7&p1=Ym1c6ai%2Fb30DAETst9xTkWwY&ku=j56126217&kt=991ea219c912e9def1193de24640c580&pc=10&p2=124020&p3=20000056&p4=501656&p5=19&p6=&p7=__f70b1c61e3dfa4c0&p9=0&p12=&p16=Pixel+4&p21=31303&p22=10&p25=20000156&p26=29&p28=&p30=&p31=__f70b1c61e3dfa4c0&firm=google' 159 | resonse = requests.get(url, headers=headers).json() 160 | pprint(resonse) 161 | if resonse['code'] == 0: 162 | print(f'得见小说目前{resonse["body"]["gold"]["goldAmount"]}金币') 163 | return f'得见小说目前{resonse["body"]["gold"]["goldAmount"]}金币' 164 | # else: 165 | # print(resonse["msg"]) 166 | 167 | 168 | def webhook(message, webhook_token): 169 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 170 | headers = { 171 | 'Content-Type': 'application/json' 172 | 173 | } 174 | data = { 175 | "msgtype": "text", 176 | "text": { 177 | "content": message 178 | } 179 | } 180 | body = json.dumps(data).encode(encoding='utf-8') 181 | # headers = {'Content-Type': 'application/json'} 182 | response = requests.post(url=url, data=body, headers=headers).json() 183 | if response["errmsg"] == 'ok': 184 | print("企业微信推送成功") 185 | else: 186 | print("推送失败") 187 | 188 | 189 | if __name__ == '__main__': 190 | webhook_token = os.environ['QYWX_KEY'] 191 | cookie = os.environ["djcookie"] 192 | start_time = datetime.datetime.now().strftime('%H') 193 | 194 | header1 = { 195 | 196 | 'Cookie': cookie 197 | } 198 | headers.update(header1) 199 | start_time = datetime.datetime.now().strftime('%H') 200 | if start_time == "08": 201 | three_meal() 202 | sign() 203 | elif start_time == "12": 204 | three_meal() 205 | elif start_time == "23": 206 | mes = user_coin() 207 | webhook(mes, webhook_token) 208 | else: 209 | box() 210 | look_video() 211 | 212 | 213 | -------------------------------------------------------------------------------- /dwgy.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 10 8,10,12,18,22 * * * 3 | const $ = new Env("得wu果园") 4 | """ 5 | import datetime 6 | import json 7 | import os 8 | import time 9 | from pprint import pprint 10 | import requests 11 | 12 | headers = { 13 | 'Host': 'app.dewu.com', 14 | # 'Content-Length': '35', 15 | 'isProxy': '1', 16 | 'ua': 'duapp/5.9.0(android;10)', 17 | # 'shumeiId': '20230128225413a87ee709cfb952d3f10e37c551ce95e0011afe32d1b7ff11', 18 | 'deviceTrait': 'Pixel+4', 19 | 'x-auth-token': '', 20 | # 'uuid': '4ebb5a84c26fa4f8', 21 | 'channel': 'xiaomi', 22 | 'emu': '0', 23 | # 'cookieToken': '5aa06c71|1363611967|1674918939|04ee4187934f33d4', 24 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/109.0.5414.118 Mobile Safari/537.36/duapp/5.9.0(android;10)', 25 | 'Content-Type': 'application/json;charset=UTF-8', 26 | 'isRoot': '0', 27 | 'Accept': 'application/json, text/plain, */*', 28 | 'imei': '', 29 | 'appId': 'h5', 30 | 'appVersion': '5.9.0', 31 | 'Origin': 'https://cdn-fast.dewu.com', 32 | 'X-Requested-With': 'com.shizhuang.duapp', 33 | 'Sec-Fetch-Site': 'same-site', 34 | 'Sec-Fetch-Mode': 'cors', 35 | 'Sec-Fetch-Dest': 'empty', 36 | 'Referer': 'https://cdn-fast.dewu.com/', 37 | 'Accept-Encoding': 'gzip, deflate', 38 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 39 | 'Cookie': 'duToken=5aa06c71|1363611967|1674918939|04ee4187934f33d4; smidV2=202301291402328b4f2756b1c33cd10d837e711417fb6f000d6bf2224651fd0', 40 | 'Connection': 'keep-alive', 41 | 42 | } 43 | 44 | 45 | def get_info(): 46 | url = "https://app.dewu.com/hacking-tree/v1/user/target/info" 47 | res = requests.get(url, headers=headers).json() 48 | if res['code'] == 200: 49 | level = res['data']['level'] 50 | name = res['data']['name'] 51 | lastLevel = res['data']['lastLevel'] 52 | lastLevel = int(lastLevel) - int(level) 53 | print(f'目前种植{name},现在{level}级,还差{lastLevel}级领取物品') 54 | return f'目前种植{name},现在{level}级,还差{lastLevel}级领取物品' 55 | 56 | 57 | def receive_water(): 58 | url = "https://app.dewu.com/hacking-tree/v1/droplet/get_generate_droplet" 59 | res = requests.post(url=url, headers=headers).json() 60 | # pprint(res) 61 | if res['code'] == 200: 62 | droplet = res["data"]["droplet"] 63 | print(f'收水车水滴{droplet}滴') 64 | 65 | 66 | # 7日登录奖励 67 | def Seven_day_login_bonus(): 68 | url = "https://app.dewu.com/hacking-tree/v1/sign/sign_in" 69 | body_commit = {} 70 | body = json.dumps(body_commit).encode(encoding='utf-8') 71 | res = requests.post(url=url, data=body, headers=headers).json() 72 | pprint(res) 73 | # if res['code'] == 200: 74 | # num = res["data"]["num"] 75 | # print(f'完成任务获得{num}水滴') 76 | # else: 77 | # print(res['msg']) 78 | 79 | 80 | def get_list(): 81 | url = "https://app.dewu.com/hacking-tree/v1/task/list" 82 | res = requests.get(url, headers=headers).json() 83 | # pprint(res) 84 | if res['code'] == 200: 85 | for i in res['data']["taskList"]: 86 | taskId = i["taskId"] 87 | taskName = i["taskName"] 88 | taskType = i["taskType"] 89 | classify = i["classify"] 90 | print(f"开始{taskName}任务, {taskId}, {taskType}, {classify}".center(50, "*")) 91 | if taskType == 251: 92 | pre_commit_obtain(taskId) 93 | # print(taskName, taskId, taskType) 94 | pre_commit_task(taskName, taskId) 95 | task_status(taskId) 96 | body_commit = {"taskId": f'{taskId}', "taskType": f'{taskType}'} 97 | commit_task(taskName, body_commit) 98 | # time.sleep(10) 99 | body = {"classify": classify, "taskId": taskId, "completeFlag": 1} 100 | receive_task(body) 101 | elif taskName == "授权开通一次借钱": 102 | body_commit = {"taskId": taskId, "taskType": f'{taskType}'} 103 | commit_task(taskName, body_commit) 104 | time.sleep(10) 105 | body = {"classify": classify, "taskId": taskId} 106 | receive_task(body) 107 | elif taskName == "参与1次九元购": 108 | body_commit = {"taskId": taskId, "taskType": f'{taskType}'} 109 | commit_task(taskName, body_commit) 110 | time.sleep(10) 111 | body = {"classify": classify, "taskId": taskId} 112 | receive_task(body) 113 | elif taskName == "参与1次0元抽奖": 114 | body_commit = {"taskId": taskId, "taskType": f'{taskType}'} 115 | commit_task(taskName, body_commit) 116 | time.sleep(10) 117 | body = {"classify": classify, "taskId": taskId} 118 | receive_task(body) 119 | elif taskName == "收集一次水滴生产": 120 | pass 121 | elif taskName == "完成五次浇灌": 122 | pass 123 | elif taskName == "查看一次聊一聊": 124 | report_action() 125 | body = {"classify": classify, "taskId": f'{taskId}'} 126 | receive_task(body) 127 | 128 | elif taskName == "从购买页进入到星愿森林": 129 | Into_the_dark_forest() 130 | body = {"classify": classify, "taskId": taskId} 131 | receive_task(body) 132 | elif taskType == 1 and taskName != '完成五次浇灌': 133 | pre_commit_task(taskName, taskId) 134 | body_commit = {"taskId": f'{taskId}', "taskType": f'{taskType}', "activityType": '', "activityId": '', 135 | "taskSetId": '', "venueCode": '', "venueUnitStyle": '', "taskScene": ''} 136 | time.sleep(10) 137 | commit_task(taskName, body_commit) 138 | body = {"classify": classify, "taskId": taskId} 139 | receive_task(body) 140 | else: 141 | body_commit = {"taskId": taskId, "taskType": f'{taskType}'} 142 | commit_task(taskName, body_commit) 143 | body = {"classify": classify, "taskId": taskId} 144 | receive_task(body) 145 | 146 | 147 | def Into_the_dark_forest(): 148 | url = "https://app.dewu.com/hacking-tree/v1/user/report_action?sign=0a7fd2972b2a089816bf5edef4196a6b" 149 | body_commit = {"action": "2"} 150 | body = json.dumps(body_commit).encode(encoding='utf-8') 151 | res = requests.post(url=url, data=body, headers=headers).json() 152 | 153 | 154 | def task_status(taskId): 155 | for i in range(8): 156 | url = f"https://app.dewu.com/hacking-task/v1/task/status?taskId={taskId}&taskType=251" 157 | res = requests.get(url=url, headers=headers).json() 158 | # print(res) 159 | time.sleep(2) 160 | 161 | 162 | # 看一看聊一聊 163 | def report_action(): 164 | url = "https://app.dewu.com/hacking-tree/v1/user/report_action" 165 | body = {"action": "3"} 166 | body = json.dumps(body).encode(encoding='utf-8') 167 | res = requests.post(url=url, data=body, headers=headers).json() 168 | 169 | 170 | # 1天领4次水滴 171 | def receive_task_4water(): 172 | url = "https://app.dewu.com/hacking-tree/v1/task/receive" 173 | body = {"classify": 1, "taskId": "multi_times"} 174 | body = json.dumps(body).encode(encoding='utf-8') 175 | res = requests.post(url=url, data=body, headers=headers).json() 176 | if res['code'] == 200: 177 | num = res["data"]["num"] 178 | print(f'完成任务获得{num}水滴') 179 | else: 180 | print(res['msg']) 181 | 182 | 183 | def receive_task(body): 184 | url = "https://app.dewu.com/hacking-tree/v1/task/receive" 185 | body = json.dumps(body).encode(encoding='utf-8') 186 | res = requests.post(url=url, data=body, headers=headers).json() 187 | # print(res) 188 | if res['code'] == 200: 189 | num = res["data"]["num"] 190 | print(f'完成任务获得{num}水滴') 191 | else: 192 | print(res['msg']) 193 | 194 | 195 | def pre_commit_obtain(taskId): 196 | url = 'https://app.dewu.com/hacking-task/v1/task/obtain' 197 | body_commit = {"taskId": f'{taskId}', "taskType": 251} 198 | # print(body_commit) 199 | body = json.dumps(body_commit).encode(encoding='utf-8') 200 | res = requests.post(url=url, data=body, headers=headers).json() 201 | # if res['code'] == 200: 202 | # print(f"提交{taskName},任务{res['msg']}") 203 | # else: 204 | # print(res['msg']) 205 | 206 | 207 | def pre_commit_task(taskName, taskId): 208 | url = 'https://app.dewu.com/hacking-task/v1/task/pre_commit' 209 | body_commit = {"taskId": f"{taskId}", "taskType": 1} 210 | body = json.dumps(body_commit).encode(encoding='utf-8') 211 | res = requests.post(url=url, data=body, headers=headers).json() 212 | if res['code'] == 200: 213 | print(f"提交{taskName},任务{res['msg']}") 214 | else: 215 | print(res['msg']) 216 | 217 | 218 | def commit_task(taskName, body_commit): 219 | url = 'https://app.dewu.com/hacking-task/v1/task/commit' 220 | body = json.dumps(body_commit).encode(encoding='utf-8') 221 | res = requests.post(url=url, data=body, headers=headers).json() 222 | # pprint(res) 223 | if res['code'] == 200: 224 | print(f"提交{taskName},任务{res['msg']}") 225 | else: 226 | print(res['msg']) 227 | 228 | 229 | def extra_task_reward(): 230 | url = 'https://app.dewu.com/hacking-tree/v1/task/extra' 231 | list = [2, 5, 8, 12] 232 | for i in list: 233 | body = {"condition": i} 234 | body = json.dumps(body).encode(encoding='utf-8') 235 | res = requests.post(url=url, data=body, headers=headers).json() 236 | if res['code'] == 200: 237 | num = res["data"]["num"] 238 | print(f"完成任务获得额外水滴{num}") 239 | time.sleep(2) 240 | 241 | 242 | # 水滴投资 243 | def invest_commit_water(): 244 | url = "https://app.dewu.com/hacking-tree/v1/invest/commit" 245 | body = {} 246 | body = json.dumps(body).encode(encoding='utf-8') 247 | res = requests.post(url=url, data=body, headers=headers).json() 248 | print(res) 249 | if res['code'] == 200: 250 | print(f'投资成功') 251 | 252 | 253 | def invest_water(): 254 | url = "https://app.dewu.com/hacking-tree/v1/invest/receive" 255 | body = {} 256 | body = json.dumps(body).encode(encoding='utf-8') 257 | res = requests.post(url=url, data=body, headers=headers).json() 258 | print(res) 259 | if res['code'] == 200: 260 | profit = res["data"]["profit"] 261 | print(f'获得投资收益{profit}水滴') 262 | 263 | 264 | def watering(number=1): 265 | url = "https://app.dewu.com/hacking-tree/v1/tree/watering" 266 | body = {} 267 | body = json.dumps(body).encode(encoding='utf-8') 268 | res = requests.post(url=url, data=body, headers=headers).json() 269 | droplet_extra_water_del() 270 | if number < 5: 271 | time.sleep(59) 272 | data = droplet_extra_info() 273 | if data == 99: 274 | droplet_extra_water() 275 | elif number == 5: 276 | reveive_five_water() 277 | invest_commit_water() 278 | 279 | if res['code'] == 200: 280 | print(f'浇水成功') 281 | nextWateringTimes = res['data']['nextWateringTimes'] 282 | showLevel = res['data']['levelReward']['showLevel'] 283 | print(f"目前树为{showLevel}级") 284 | if nextWateringTimes == 0: 285 | get_watering_reward() 286 | watering(number=number + 1) 287 | else: 288 | time.sleep(2) 289 | watering(number=number + 1) 290 | else: 291 | return 292 | 293 | 294 | def get_watering_reward(): 295 | url = "https://app.dewu.com/hacking-tree/v1/tree/get_watering_reward" 296 | body = {"promote": ""} 297 | body = json.dumps(body).encode(encoding='utf-8') 298 | res = requests.post(url=url, data=body, headers=headers).json() 299 | if res['code'] == 200: 300 | print(f'浇水成功') 301 | rewardNum = res['data']['currentWateringReward']['rewardNum'] 302 | print(f"获得浇水礼包{rewardNum}水滴") 303 | 304 | 305 | def droplet_extra_water(): 306 | url = "https://app.dewu.com/hacking-tree/v1/droplet-extra/receive" 307 | res = requests.post(url=url, headers=headers).json() 308 | if res['code'] == 200: 309 | totalDroplet = res["data"]["totalDroplet"] 310 | print(f'收瓶子水滴{totalDroplet}滴') 311 | 312 | 313 | def droplet_extra_info(): 314 | url = "https://app.dewu.com/hacking-tree/v1/droplet-extra/info" 315 | res = requests.get(url=url, headers=headers).json() 316 | # pprint(res) 317 | if res['code'] == 200: 318 | if res['data']['isComplete']: 319 | return 99 320 | 321 | 322 | # 水瓶增加数 323 | def droplet_extra_water_del(): 324 | url = "https://app.dewu.com/hacking-tree/v1/tree/del" 325 | body = {} 326 | body = json.dumps(body).encode(encoding='utf-8') 327 | res = requests.post(url=url, data=body, headers=headers).json() 328 | # pprint(res) 329 | if res['code'] == 200: 330 | pass 331 | 332 | 333 | # 收一次水滴生产 334 | def reveive_one_water(): 335 | body = {"classify": 1, "taskId": "4"} 336 | receive_task(body) 337 | 338 | 339 | # 浇五次水收益 340 | def reveive_five_water(): 341 | body = {"classify": 1, "taskId": "1"} 342 | receive_task(body) 343 | 344 | 345 | def webhook(message, webhook_token): 346 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 347 | headers = { 348 | 'Content-Type': 'application/json' 349 | 350 | } 351 | data = { 352 | "msgtype": "text", 353 | "text": { 354 | "content": message 355 | } 356 | } 357 | body = json.dumps(data).encode(encoding='utf-8') 358 | # headers = {'Content-Type': 'application/json'} 359 | response = requests.post(url=url, data=body, headers=headers).json() 360 | if response["errmsg"] == 'ok': 361 | print("企业微信推送成功") 362 | else: 363 | print("推送失败") 364 | 365 | 366 | if __name__ == '__main__': 367 | webhook_token = os.environ['QYWX_KEY'] 368 | dwtokens = os.environ["dwtoken"].split("\n") 369 | start_time = datetime.datetime.now().strftime('%H') 370 | for token in dwtokens: 371 | token = token.split("&") 372 | sk = token[0] 373 | shumeiId = token[1] 374 | x_auth_token = token[2] 375 | uid = token[3] 376 | cookieToken = token[4] 377 | header1 = { 378 | 'SK': sk, 379 | 'shumeiId': shumeiId, 380 | 'x-auth-token': f'Bearer {x_auth_token}', 381 | 'uid': uid, 382 | 'cookieToken': cookieToken, 383 | 'duToken': cookieToken, 384 | 'Cookie': cookieToken 385 | } 386 | headers.update(header1) 387 | # # get_info() 388 | if start_time == "08": 389 | # # 1天领4次水滴 390 | print('开始一天领4次水滴任务') 391 | receive_task_4water() 392 | # 领水滴投资 393 | print('领水滴投资') 394 | invest_water() 395 | # # # 领水车水滴 396 | print('领水车水滴') 397 | receive_water() 398 | reveive_one_water() 399 | #7日登录奖励 400 | print('领7日登录礼') 401 | Seven_day_login_bonus() 402 | if start_time == "10": 403 | droplet_extra_water() 404 | receive_water() 405 | if start_time == "12": 406 | # # 1天领4次水滴 407 | receive_task_4water() 408 | # # # 领水车水滴 409 | receive_water() 410 | if start_time == "18": 411 | # # 1天领4次水滴 412 | receive_task_4water() 413 | receive_water() 414 | if start_time == "22": 415 | # 1天领4次水滴 416 | receive_task_4water() 417 | receive_water() 418 | get_list() 419 | # # # 水滴投资 420 | watering() 421 | extra_task_reward() 422 | msg = get_info() 423 | webhook(msg, webhook_token) 424 | -------------------------------------------------------------------------------- /env_jjsq.js: -------------------------------------------------------------------------------- 1 | function Env(t,s){return new class{constructor(t,s){this.name=t,this.data=null,this.dataFile="box.dat",this.logs=[],this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,s),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}getScript(t){return new Promise(s=>{$.get({url:t},(t,e,i)=>s(i))})}runScript(t,s){return new Promise(e=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=s&&s.timeout?s.timeout:o;const[h,a]=i.split("@"),r={url:`http://${a}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":h,Accept:"*/*"}};$.post(r,(t,s,i)=>e(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),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s);if(!e&&!i)return{};{const i=e?t:s;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),s=this.path.resolve(process.cwd(),this.dataFile),e=this.fs.existsSync(t),i=!e&&this.fs.existsSync(s),o=JSON.stringify(this.data);e?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(s,o):this.fs.writeFileSync(t,o)}}lodash_get(t,s,e){const i=s.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return e;return o}lodash_set(t,s,e){return Object(t)!==t?t:(Array.isArray(s)||(s=s.toString().match(/[^.[\]]+/g)||[]),s.slice(0,-1).reduce((t,e,i)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(s[i+1])>>0==+s[i+1]?[]:{},t)[s[s.length-1]]=e,t)}getdata(t){let s=this.getval(t);if(/^@/.test(t)){const[,e,i]=/^@(.*?)\.(.*?)$/.exec(t),o=e?this.getval(e):"";if(o)try{const t=JSON.parse(o);s=t?this.lodash_get(t,i,""):s}catch(t){s=""}}return s}setdata(t,s){let e=!1;if(/^@/.test(s)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(s),h=this.getval(i),a=i?"null"===h?null:h||"{}":"{}";try{const s=JSON.parse(a);this.lodash_set(s,o,t),e=this.setval(JSON.stringify(s),i)}catch(s){const h={};this.lodash_set(h,o,t),e=this.setval(JSON.stringify(h),i)}}else e=$.setval(t,s);return e}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,s){return this.isSurge()||this.isLoon()?$persistentStore.write(t,s):this.isQuanX()?$prefs.setValueForKey(t,s):this.isNode()?(this.data=this.loaddata(),this.data[s]=t,this.writedata(),!0):this.data&&this.data[s]||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,s=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,s)=>{try{const e=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(e,null),s.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t)))}post(t,s=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,e,i)=>{!t&&e&&(e.body=i,e.statusCode=e.status),s(t,e,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t));else if(this.isNode()){this.initGotEnv(t);const{url:e,...i}=t;this.got.post(e,i).then(t=>{const{statusCode:e,statusCode:i,headers:o,body:h}=t;s(null,{status:e,statusCode:i,headers:o,body:h},h)},t=>s(t))}}time(t){let s={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in s)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?s[e]:("00"+s[e]).substr((""+s[e]).length)));return t}msg(s=t,e="",i="",o){const h=t=>!t||!this.isLoon()&&this.isSurge()?t:"string"==typeof t?this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0:"object"==typeof t&&(t["open-url"]||t["media-url"])?this.isLoon()?t["open-url"]:this.isQuanX()?t:void 0:void 0;$.isMute||(this.isSurge()||this.isLoon()?$notification.post(s,e,i,h(o)):this.isQuanX()&&$notify(s,e,i,h(o))),this.logs.push("","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="),this.logs.push(s),e&&this.logs.push(e),i&&this.logs.push(i)}log(...t){t.length>0?this.logs=[...this.logs,...t]:console.log(this.logs.join(this.logSeparator))}logErr(t,s){const e=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();e?$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):$.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(s=>setTimeout(s,t))}done(t={}){const s=(new Date).getTime(),e=(s-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,s)} 2 | module.exports = {Env} -------------------------------------------------------------------------------- /fdshtx.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 0 0 * * * 3 | new Env('福袋生活提现'); 4 | 5 | """ 6 | 7 | import json 8 | import os 9 | import requests 10 | 11 | 12 | def get_money(number, userId, consumerId): 13 | url = "https://saas.hixiaoman.com/finance/farm/getFinanceInfo" 14 | headers = { 15 | 'Host': 'saas.hixiaoman.com', 16 | 'Connection': 'keep-alive', 17 | 'Accept': '*/*', 18 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.128 Mobile Safari/537.36bxnative-1.5.3.15', 19 | 'X-Requested-With': 'XMLHttpRequest', 20 | 'Sec-Fetch-Site': 'same-origin', 21 | 'Sec-Fetch-Mode': 'cors', 22 | 'Sec-Fetch-Dest': 'empty', 23 | 'Referer': 'https://saas.hixiaoman.com/tree_default.html?ADTAG=3095&appKey=fdsh-az-hdgj_tmddix&activityNo=NC-TREE-002&parentActNo=NC-TREE-002&subActivityNo=NC-TREE-002&strategyId=32&parentStrategyId=32&parentPeriodId=1588&parentActPlanId=1063&activityId=56&bossId=32&placeId=3095&activityType=6&putType=60000&as=2&skinId=92&themeId=530&flowId=0&flowActPlanId=0&activityPlanId=1063&flowActivityType=0&actPeriodId=1588&actTaskId=null&consumeType=1&userKey=600139975378852382&isShare=null&consumerId=7016469&vcs=0&wuBaNum=0&adSources=1_2', 24 | 'Accept-Encoding': 'gzip, deflate', 25 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 26 | 'Cookie': f'userId=fdsh-az-hdgj_tmddix={userId}; consumerId=fdsh-az-hdgj_tmddix={consumerId};', 27 | 28 | } 29 | res = requests.get(url=url, headers=headers).json() 30 | if res['code'] == "0": 31 | money = res['data']['balance'] 32 | print(f"第{number}个账号目前{money / 100}元") 33 | return money 34 | 35 | 36 | def withdraw_money(number, userId, consumerId): 37 | url = "https://saas.hixiaoman.com/finance/activity/applyWithdraw?amount=100&busType=4" 38 | headers = { 39 | 'Host': 'saas.hixiaoman.com', 40 | 'Connection': 'keep-alive', 41 | 'Accept': '*/*', 42 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.128 Mobile Safari/537.36bxnative-1.5.3.15', 43 | 'X-Requested-With': 'XMLHttpRequest', 44 | 'Sec-Fetch-Site': 'same-origin', 45 | 'Sec-Fetch-Mode': 'cors', 46 | 'Sec-Fetch-Dest': 'empty', 47 | 'Referer': 'https://saas.hixiaoman.com/tree_default.html?ADTAG=3095&appKey=fdsh-az-hdgj_tmddix&activityNo=NC-TREE-002&parentActNo=NC-TREE-002&subActivityNo=NC-TREE-002&strategyId=32&parentStrategyId=32&parentPeriodId=1588&parentActPlanId=1063&activityId=56&bossId=32&placeId=3095&activityType=6&putType=60000&as=2&skinId=92&themeId=530&flowId=0&flowActPlanId=0&activityPlanId=1063&flowActivityType=0&actPeriodId=1588&actTaskId=null&consumeType=1&userKey=600139975378852382&isShare=null&consumerId=7016469&vcs=0&wuBaNum=0&adSources=1_2', 48 | 'Accept-Encoding': 'gzip, deflate', 49 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 50 | 'Cookie': f'userId=fdsh-az-hdgj_tmddix={userId}; consumerId=fdsh-az-hdgj_tmddix={consumerId};', 51 | 52 | } 53 | res = requests.get(url=url, headers=headers).json() 54 | print(res) 55 | if res['code'] == "0": 56 | print(f"第{number}账号提现1元成功") 57 | return f"第{number}账号提现1元成功" 58 | else: 59 | print(res['desc']) 60 | 61 | 62 | def webhook(message, webhook_token): 63 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 64 | headers = { 65 | 'Content-Type': 'application/json' 66 | 67 | } 68 | data = { 69 | "msgtype": "text", 70 | "text": { 71 | "content": message 72 | } 73 | } 74 | body = json.dumps(data).encode(encoding='utf-8') 75 | # headers = {'Content-Type': 'application/json'} 76 | response = requests.post(url=url, data=body, headers=headers).json() 77 | if response["errmsg"] == 'ok': 78 | print("企业微信推送成功") 79 | else: 80 | print("推送失败") 81 | 82 | 83 | if __name__ == '__main__': 84 | cookies = os.environ["fdshck"].split("@") 85 | webhook_token = os.environ["QYWX_KEY"] 86 | for i in range(len(cookies)): 87 | number = i + 1 88 | cookie = cookies[i].split("#") 89 | userId = cookie[0] 90 | consumerId = cookie[1] 91 | money = get_money(number, userId, consumerId) 92 | if money >= 100: 93 | msg = withdraw_money(number, userId, consumerId) 94 | webhook(msg, webhook_token) 95 | -------------------------------------------------------------------------------- /gqcqcj.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 0 0 * * * 3 | new Env('广汽传祺抽奖'); 4 | 5 | """ 6 | import os 7 | from pprint import pprint 8 | import requests 9 | 10 | 11 | def luck_car(token): 12 | url = "https://gsp.gacmotor.com/gw/app/activity/api/red/packet/rain/open?activityCode=red_packet_rain&isClick=1&source=app" 13 | headers = { 14 | 'Host': 'gsp.gacmotor.com', 15 | 'Connection': 'keep-alive', 16 | 'Content-Length': '0', 17 | 'Accept': 'application/json, text/plain, */*', 18 | 'Cache-Control': 'no-cache', 19 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 MQQBrowser/6.2 TBS/046011 Mobile Safari/537.36;GACClient', 20 | 'token': token, 21 | 'Origin': 'https://gsp.gacmotor.com', 22 | 'X-Requested-With': 'com.cloudy.component', 23 | 'Sec-Fetch-Site': 'same-origin', 24 | 'Sec-Fetch-Mode': 'cors', 25 | 'Sec-Fetch-Dest': 'empty', 26 | 'Referer': 'https://gsp.gacmotor.com/h5/activity/redPacket/index.html', 27 | 'Accept-Encoding': 'gzip, deflate, br', 28 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 29 | } 30 | res = requests.post(url=url, headers=headers).json() 31 | if res['result']: 32 | reward = res['data']['medalDescription'] 33 | print(f"抽奖获得{reward}") 34 | 35 | 36 | if __name__ == '__main__': 37 | tokens = os.environ["gqcqCookie"].split("\n") 38 | for token in tokens: 39 | print(token) 40 | luck_car(token) 41 | -------------------------------------------------------------------------------- /gylmtx.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 10 0 * * * 3 | new Env('高佣联盟提现'); 4 | 5 | """ 6 | 7 | import json 8 | import os 9 | import requests 10 | 11 | 12 | def get_money(number, userId, consumerId): 13 | url = "https://saas.hixiaoman.com/finance/farm/getFinanceInfo" 14 | headers = { 15 | 'Host': 'saas.hixiaoman.com', 16 | 'Connection': 'keep-alive', 17 | 'Accept': '*/*', 18 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.128 Mobile Safari/537.36bxnative-1.5.3.15', 19 | 'X-Requested-With': 'XMLHttpRequest', 20 | 'Sec-Fetch-Site': 'same-origin', 21 | 'Sec-Fetch-Mode': 'cors', 22 | 'Sec-Fetch-Dest': 'empty', 23 | 'Referer': 'https://saas.hixiaoman.com/tree_default.html?ADTAG=3095&appKey=fdsh-az-hdgj_tmddix&activityNo=NC-TREE-002&parentActNo=NC-TREE-002&subActivityNo=NC-TREE-002&strategyId=32&parentStrategyId=32&parentPeriodId=1588&parentActPlanId=1063&activityId=56&bossId=32&placeId=3095&activityType=6&putType=60000&as=2&skinId=92&themeId=530&flowId=0&flowActPlanId=0&activityPlanId=1063&flowActivityType=0&actPeriodId=1588&actTaskId=null&consumeType=1&userKey=600139975378852382&isShare=null&consumerId=7016469&vcs=0&wuBaNum=0&adSources=1_2', 24 | 'Accept-Encoding': 'gzip, deflate', 25 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 26 | 'Cookie': f'userId=fdsh-az-hdgj_tmddix={userId}; consumerId=fdsh-az-hdgj_tmddix={consumerId};', 27 | 28 | } 29 | res = requests.get(url=url, headers=headers).json() 30 | if res['code'] == "0": 31 | money = res['data']['balance'] 32 | print(f"第{number}个账号目前{money / 100}元") 33 | return money 34 | else: 35 | print(res['desc']) 36 | return 99 37 | 38 | 39 | def withdraw_money(number, userId, consumerId): 40 | url = "https://saas.hixiaoman.com/finance/activity/applyWithdraw?amount=100&busType=4" 41 | headers = { 42 | 'Host': 'saas.hixiaoman.com', 43 | 'Connection': 'keep-alive', 44 | 'Accept': '*/*', 45 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/108.0.5359.128 Mobile Safari/537.36bxnative-1.5.3.15', 46 | 'X-Requested-With': 'XMLHttpRequest', 47 | 'Sec-Fetch-Site': 'same-origin', 48 | 'Sec-Fetch-Mode': 'cors', 49 | 'Sec-Fetch-Dest': 'empty', 50 | 'Referer': 'https://saas.hixiaoman.com/tree_default.html?ADTAG=3095&appKey=fdsh-az-hdgj_tmddix&activityNo=NC-TREE-002&parentActNo=NC-TREE-002&subActivityNo=NC-TREE-002&strategyId=32&parentStrategyId=32&parentPeriodId=1588&parentActPlanId=1063&activityId=56&bossId=32&placeId=3095&activityType=6&putType=60000&as=2&skinId=92&themeId=530&flowId=0&flowActPlanId=0&activityPlanId=1063&flowActivityType=0&actPeriodId=1588&actTaskId=null&consumeType=1&userKey=600139975378852382&isShare=null&consumerId=7016469&vcs=0&wuBaNum=0&adSources=1_2', 51 | 'Accept-Encoding': 'gzip, deflate', 52 | 'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 53 | 'Cookie': f'userId=fdsh-az-hdgj_tmddix={userId}; consumerId=fdsh-az-hdgj_tmddix={consumerId};', 54 | 55 | } 56 | res = requests.get(url=url, headers=headers).json() 57 | print(res) 58 | if res['code'] == "0": 59 | print(f"第{number}账号提现1元成功") 60 | return f"高佣联盟:第{number}账号提现1元成功" 61 | else: 62 | print(res['desc']) 63 | 64 | 65 | def webhook(message, webhook_token): 66 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 67 | headers = { 68 | 'Content-Type': 'application/json' 69 | 70 | } 71 | data = { 72 | "msgtype": "text", 73 | "text": { 74 | "content": message 75 | } 76 | } 77 | body = json.dumps(data).encode(encoding='utf-8') 78 | # headers = {'Content-Type': 'application/json'} 79 | response = requests.post(url=url, data=body, headers=headers).json() 80 | if response["errmsg"] == 'ok': 81 | print("企业微信推送成功") 82 | else: 83 | print("推送失败") 84 | 85 | 86 | if __name__ == '__main__': 87 | cookies = os.environ["gyncck"].split("@") 88 | webhook_token = os.environ["QYWX_KEY"] 89 | for i in range(len(cookies)): 90 | number = i + 1 91 | cookie = cookies[i].split("#") 92 | userId = cookie[0] 93 | consumerId = cookie[1] 94 | money = get_money(number, userId, consumerId) 95 | if money !=99: 96 | if money >= 100: 97 | msg = withdraw_money(number, userId, consumerId) 98 | webhook(msg, webhook_token) 99 | -------------------------------------------------------------------------------- /jjsq.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Telegram@sudojia 3 | * @site https://blog.imzjw.cn 4 | * @date 2022/01/19 21:26 5 | * @last Modified by Telegram@sudojia 6 | * @last Modified time 2022/01/21 20:37 7 | * @description 掘金自动签到 8 | */ 9 | const $ = new require('./env_jjsq').Env('掘金自动签到'); 10 | const notify = $.isNode() ? require('./sendNotify') : ''; 11 | let JUEJIN_COOKIE = process.env.JUEJIN_COOKIE, cookie = '', cookiesArr = [], message = ''; 12 | 13 | // ENABLE_TEN_DRAW: 是否开启十连抽, 默认不开启十连抽、TEN_DRAW_NUM: 十连抽次数, 默认一次十连抽 14 | let enableTenDraw = false, tenDrawNum = 1; 15 | 16 | // TODO 目前十连抽默认所有账号都十连抽、未实现控制哪个账号执行十连抽, 我想到的思路比较烂, 如果你有更好的思路, 欢迎 Telegram@sudojia 或者 PR 17 | if (process.env.ENABLE_TEN_DRAW) { 18 | enableTenDraw = process.env.ENABLE_TEN_DRAW 19 | } 20 | if (process.env.TEN_DRAW_NUM) { 21 | tenDrawNum = process.env.TEN_DRAW_NUM; 22 | } 23 | 24 | const JUEJIN_API = 'https://api.juejin.cn'; 25 | 26 | if (JUEJIN_COOKIE.indexOf('&') > -1) { 27 | cookiesArr = JUEJIN_COOKIE.split('&'); 28 | } else { 29 | cookiesArr = [JUEJIN_COOKIE]; 30 | } 31 | 32 | !(async () => { 33 | if (!JUEJIN_COOKIE) { 34 | console.log('请设置环境变量【JUEJIN_COOKIE】') 35 | return; 36 | } 37 | if (!enableTenDraw) { 38 | console.log(`如需执行十连抽请设置环境变量【ENABLE_TEN_DRAW】为 true 和【TEN_DRAW_NUM】十连抽次数\n`); 39 | } 40 | for (let i = 0; i < cookiesArr.length; i++) { 41 | if (cookiesArr[i]) { 42 | cookie = cookiesArr[i]; 43 | $.index = i + 1; 44 | // 默认 Cookie 未失效 45 | $.isLogin = true; 46 | // 默认今日未签到 47 | $.isSignIn = false; 48 | // 免费抽奖次数 49 | $.freeCount = 0; 50 | // 账号总矿石数 51 | $.oreNum = 0; 52 | // 检测状态 (今日是否签到、Cookie 是否失效) 53 | await checkStatus(); 54 | console.log(`\n*****开始第【${$.index}】个账号****\n`); 55 | message += `📣==========掘金账号${$.index}==========📣\n`; 56 | if (!$.isLogin) { 57 | await notify.sendNotify(`「掘金签到报告」`, `掘金账号${$.index} Cookie已失效,请重新登录获取Cookie`); 58 | } 59 | await main(); 60 | await $.wait(2000); 61 | } 62 | } 63 | if (message) { 64 | await notify.sendNotify(`「掘金签到报告」`, `${message}`); 65 | } 66 | })().catch((e) => { 67 | $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') 68 | }).finally(() => { 69 | $.done(); 70 | }); 71 | 72 | async function main() { 73 | await getUserName(); 74 | await $.wait(1000); 75 | if (!$.isSignIn) { 76 | await checkIn(); 77 | await $.wait(1000); 78 | await getCount(); 79 | } else { 80 | console.log(`您今日已完成签到,请勿重复签到~\n`); 81 | } 82 | await queryFreeLuckyDrawCount(); 83 | await $.wait(1000); 84 | if ($.freeCount > 0) { 85 | // 目前只利用签到所获取的抽奖次数进行抽奖! 86 | await luckyDraw(); 87 | } else { 88 | console.log(`今日免费抽奖次数已用尽!\n`); 89 | } 90 | await $.wait(1000); 91 | await getOreNum(); 92 | await $.wait(1000); 93 | if (enableTenDraw) { 94 | console.log(`检测到你已开启十连抽,正在为你执行十连抽...`); 95 | for (let i = 0; i < tenDrawNum; i++) { 96 | await tenDraw(); 97 | await $.wait(2000); 98 | } 99 | } 100 | } 101 | 102 | /** 103 | * 检测签到状态 104 | */ 105 | function checkStatus() { 106 | return new Promise((resolve) => { 107 | $.get(sendGet('growth_api/v1/get_today_status', ''), (err, response, data) => { 108 | try { 109 | if (err) { 110 | console.log(`checkStatus API 请求失败\n${JSON.stringify(err)}`) 111 | } else { 112 | data = JSON.parse(data); 113 | // 今日是否已签到 true: 已签到 false: 未签到 114 | $.isSignIn = data.data; 115 | if (403 === data.err_no) { 116 | // Cookie 已失效 117 | $.isLogin = false; 118 | } 119 | } 120 | } catch (err) { 121 | $.logErr(err, response); 122 | } finally { 123 | resolve(); 124 | } 125 | }) 126 | }) 127 | } 128 | 129 | /** 130 | * 签到函数 131 | * 132 | * @returns {*} 133 | */ 134 | function checkIn() { 135 | return new Promise((resolve) => { 136 | $.post(sendPost('growth_api/v1/check_in', ``), (err, response, data) => { 137 | try { 138 | if (err) { 139 | console.log(`checkIn API 请求失败\n${JSON.stringify(err)}`) 140 | } else { 141 | data = JSON.parse(data); 142 | // 签到所获取的矿石数 143 | $.incrPoint = data.data.incr_point; 144 | // 当前账号总矿石数 145 | $.sumPoint = data.data.sum_point; 146 | message += `【账号昵称】${$.userName}\n【签到状态】已签到\n【今日收入】${$.incrPoint}矿石数\n【总矿石数】${$.sumPoint}矿石数` 147 | } 148 | } catch (err) { 149 | $.logErr(err, response); 150 | } finally { 151 | resolve(); 152 | } 153 | }) 154 | }) 155 | } 156 | 157 | /** 158 | * 抽奖函数 159 | * 目前已知奖品 160 | * lottery_id: 6981716980386496552、name: 66矿石、type: 1 161 | * lottery_id: 6981716405976743943、name: Bug、type: 2 162 | * lottery_id: 7020245697131708419、name: 掘金帆布袋、type: 4 163 | * lottery_id: 7017679355841085472、name: 随机限量徽章、type: 4 164 | * lottery_id: 6997270183769276416、name: Yoyo抱枕、type: 4 165 | * lottery_id: 7001028932350771203、name: 掘金马克杯、type: 4 166 | * lottery_id: 7020306802570952718、name: 掘金棒球帽、type: 4 167 | * lottery_id: 6981705951946489886、name: Switch、type: 3 168 | */ 169 | function luckyDraw() { 170 | return new Promise((resolve) => { 171 | $.post(sendPost('growth_api/v1/lottery/draw', ``), (err, response, data) => { 172 | try { 173 | if (err) { 174 | console.log(`luckyDraw API 请求失败\n${JSON.stringify(err)}`) 175 | } else { 176 | data = JSON.parse(data); 177 | console.log(`抽中了${data.data.lottery_name}\n`); 178 | message += `\n【抽奖信息】抽中了${data.data.lottery_name}\n\n`; 179 | } 180 | } catch (err) { 181 | $.logErr(err, response); 182 | } finally { 183 | resolve(); 184 | } 185 | }) 186 | }) 187 | } 188 | 189 | /** 190 | * 十连抽 191 | */ 192 | function tenDraw() { 193 | return new Promise((resolve) => { 194 | $.post(sendPost('growth_api/v1/lottery/ten_draw', ``), (err, response, data) => { 195 | try { 196 | if (err) { 197 | console.log(`tenDraw API 请求失败\n${JSON.stringify(err)}`) 198 | } else { 199 | if (2000 > $.oreNum) { 200 | console.log(`当前账号不足 2000 矿石数,十连抽失败~`) 201 | } else { 202 | // 单抽加 10 幸运值、十连抽加 100 幸运值,6000 满格 203 | console.log(`本次十连抽共消耗 2000 矿石数\n十连抽奖励为: `) 204 | data = JSON.parse(data); 205 | $.lotteryBases = data.data.LotteryBases; 206 | for (let draw of $.lotteryBases) { 207 | console.log(`${draw.lottery_name}`) 208 | } 209 | let needOreNum = (6000 - data.data.total_lucky_value) / 100 * 2000; 210 | console.log(`本次十连抽加${data.data.draw_lucky_value}幸运值`); 211 | console.log(`当前总幸运值为${data.data.total_lucky_value}`); 212 | console.log(`离幸运值满格还差${6000 - data.data.total_lucky_value}幸运值,所需${needOreNum}矿石数,还需十连抽${(6000 - data.data.total_lucky_value) / 100}次`); 213 | } 214 | } 215 | } catch (err) { 216 | $.logErr(err, response); 217 | } finally { 218 | resolve(); 219 | } 220 | }) 221 | }) 222 | } 223 | 224 | /** 225 | * 查询免费抽奖次数 226 | */ 227 | function queryFreeLuckyDrawCount() { 228 | return new Promise((resolve) => { 229 | $.get(sendGet('growth_api/v1/lottery_config/get', ``), (err, response, data) => { 230 | try { 231 | if (err) { 232 | console.log(`queryFreeLuckyDrawCount API 请求失败\n${JSON.stringify(err)}`) 233 | } else { 234 | data = JSON.parse(data); 235 | // 获取免费抽奖次数 236 | $.freeCount = data.data.free_count; 237 | } 238 | } catch (err) { 239 | $.logErr(err, response); 240 | } finally { 241 | resolve(); 242 | } 243 | }) 244 | }) 245 | } 246 | 247 | /** 248 | * 获取总账号矿石数 249 | */ 250 | function getOreNum() { 251 | return new Promise((resolve) => { 252 | $.get(sendGet('growth_api/v1/get_cur_point', ``), (err, response, data) => { 253 | try { 254 | if (err) { 255 | console.log(`getOreNum API 请求失败\n${JSON.stringify(err)}`) 256 | } else { 257 | data = JSON.parse(data); 258 | // 当前账号总矿石数 259 | $.oreNum = data.data; 260 | } 261 | } catch (err) { 262 | $.logErr(err, response); 263 | } finally { 264 | resolve(); 265 | } 266 | }) 267 | }) 268 | } 269 | 270 | 271 | /** 272 | * 获取昵称 273 | */ 274 | function getUserName() { 275 | return new Promise((resolve) => { 276 | $.get(sendGet('user_api/v1/user/get', ``), (err, response, data) => { 277 | try { 278 | if (err) { 279 | console.log(`getUserName API 请求失败\n${JSON.stringify(err)}`) 280 | } else { 281 | data = JSON.parse(data); 282 | $.userName = data.data.user_name; 283 | } 284 | } catch (err) { 285 | $.logErr(err, response); 286 | } finally { 287 | resolve(); 288 | } 289 | }) 290 | }) 291 | } 292 | 293 | /** 294 | * 统计签到天数, 没什么用~ 295 | */ 296 | function getCount() { 297 | return new Promise((resolve) => { 298 | $.get(sendGet('growth_api/v1/get_counts', ``), (err, response, data) => { 299 | try { 300 | if (err) { 301 | console.log(`getCount API 请求失败\n${JSON.stringify(err)}`) 302 | } else { 303 | data = JSON.parse(data); 304 | message += `\n【签到统计】连签${data.data.cont_count}天、累签${data.data.sum_count}天` 305 | } 306 | } catch (err) { 307 | $.logErr(err, response); 308 | } finally { 309 | resolve(); 310 | } 311 | }) 312 | }) 313 | } 314 | 315 | function sendGet(path, body) { 316 | return { 317 | url: `${JUEJIN_API}/${path}?body=${body}`, 318 | headers: { 319 | "Accept": "*/*", 320 | "Content-type": "application/json", 321 | "Referer": `${JUEJIN_API}`, 322 | "Cookie": `${cookie}`, 323 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36" 324 | } 325 | } 326 | } 327 | 328 | function sendPost(path, body = {}) { 329 | return { 330 | url: `${JUEJIN_API}/${path}`, 331 | body: body, 332 | headers: { 333 | "Accept": "*/*", 334 | "Content-type": "application/json", 335 | "Referer": `${JUEJIN_API}`, 336 | "Cookie": `${cookie}`, 337 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36" 338 | } 339 | } 340 | } 341 | -------------------------------------------------------------------------------- /mggy.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 39 20 * * * 3 | new Env('芒果果园'); 4 | 5 | """ 6 | 7 | import urllib.request 8 | import urllib.parse 9 | import json, requests 10 | import time 11 | # import sys 12 | import os 13 | 14 | # 抓取login那个包 https://api-farm.game.mgtv.com/api/login 15 | 16 | openid = os.environ['openid'] 17 | ticket = os.environ['ticket'] 18 | nickName = os.environ['nickName'] 19 | did = os.environ['did'] 20 | 21 | 22 | # pbid = 'iso' 23 | 24 | 25 | # def printf(text): 26 | # print(text) 27 | # sys.stdout.flush() 28 | # def load_send(): 29 | # global send 30 | # cur_path = os.path.abspath(os.path.dirname(__file__)) 31 | # sys.path.append(cur_path) 32 | # if os.path.exists(cur_path + "/sendNotify.py"): 33 | # try: 34 | # from sendNotify import send 35 | # except: 36 | # send = False 37 | # printf("加载通知服务失败~") 38 | # else: 39 | # send = False 40 | # printf("加载通知服务失败~") 41 | # load_send() 42 | 43 | # url 访问 返回响应体 44 | def wangye_fangwen(fangfa, cr_url, cr_data, cr_headers): 45 | tijiao_url = cr_url 46 | data = cr_data 47 | data = urllib.parse.urlencode(data).encode('utf-8') 48 | headers = cr_headers 49 | if fangfa == 'post': 50 | # 执行 51 | request = urllib.request.Request(url=tijiao_url, headers=headers, data=data) 52 | response = urllib.request.urlopen(request) 53 | content = response.read().decode('utf-8') 54 | elif fangfa == 'get': 55 | data = urllib.parse.urlencode(data) 56 | url = cr_url + data 57 | request = urllib.request.Request(url=url, headers=headers) 58 | response = urllib.request.urlopen(request) 59 | content = response.read().decode('utf‐8') 60 | else: 61 | content = "先输入请求方式" 62 | return content 63 | 64 | 65 | # 任务函数 66 | def renwu_hs(taskid): 67 | cr_url = 'https://api-farm.game.mgtv.com/api/gainTaskAward' 68 | cr_data = { 69 | 'taskid': taskid 70 | } 71 | fangfa = 'post' 72 | cr_headers = z_headers 73 | fanhui = wangye_fangwen(fangfa, cr_url, cr_data, cr_headers) 74 | fanhui_josn = json.loads(fanhui) 75 | try: 76 | jieguo = fanhui_josn.get('data').get('errmsg', '任务id:' + str(taskid) + '成功') 77 | print('******' + jieguo + '******') 78 | except: 79 | print('出错啦,在任务这里\n\n') 80 | 81 | 82 | # 浇水 83 | def jiaoshui_hs(): 84 | cr_url = 'https://api-farm.game.mgtv.com/api/watering' 85 | cr_data = { 86 | 'wateringtype': 1, 87 | } 88 | jsfhz = wangye_fangwen('post', cr_url, cr_data, z_headers) 89 | jsfhz_josn = json.loads(jsfhz) 90 | jg = jsfhz_josn.get('data').get('errmsg', '') 91 | 92 | if jg: 93 | if jg == 'the drips is not enough!': 94 | print('******没有水滴了!*****') 95 | drips = 0 96 | else: 97 | try: 98 | taskProgress = jsfhz_josn['data']['taskProgress'] 99 | # canharvest = jsfhz_josn['data']['canharvest'] 100 | # if canharvest: 101 | # 102 | for i in taskProgress: 103 | if i['gained'] == 1: 104 | time.sleep(1) 105 | taskid = i['taskid'] 106 | renwu_hs(taskid) 107 | drips = jsfhz_josn['data']['drips'] 108 | except: 109 | print('叫谁这里,其他错误') 110 | drips = 0 111 | return drips 112 | 113 | 114 | def jiaoshui_hszx(): 115 | # 执行浇水 116 | drips = 11 117 | jscs = 0 118 | while drips > 10: 119 | time.sleep(2) 120 | jscs = jscs + 1 121 | print('*****执行浇水第' + str(jscs) + '次******') 122 | drips = jiaoshui_hs() 123 | if drips < 10: 124 | print('*****水滴数量不够了!退出浇水******') 125 | 126 | 127 | # 收集礼盒 128 | def lihe_hs(): 129 | cr_url = 'https://api-farm.game.mgtv.com/api/openbox?' 130 | cr_data = {} 131 | lhfhz = wangye_fangwen('post', cr_url, cr_data, z_headers) 132 | lhfhz_josn = json.loads(lhfhz) 133 | jg = lhfhz_josn.get('data').get('errmsg', '成功') 134 | # print(jg) # 调试输出 135 | if jg == "the daydrip is can't open box!'": 136 | print('******没有礼盒了!*****') 137 | lhqk = 0 138 | elif jg == "成功": 139 | try: 140 | lhvalue = lhfhz_josn.get('data').get('gainaward').get('value', 0) 141 | print('******收集礼盒获得:' + str(lhvalue) + '*****') 142 | lhqk = 1 143 | except: 144 | print('******收集错误礼盒,其他原因*****') 145 | lhqk = 0 146 | else: 147 | lhqk = 0 148 | return lhqk 149 | 150 | 151 | def webhook(message, webhook_token): 152 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 153 | headers = { 154 | 'Content-Type': 'application/json' 155 | 156 | } 157 | data = { 158 | "msgtype": "text", 159 | "text": { 160 | "content": message 161 | } 162 | } 163 | body = json.dumps(data).encode(encoding='utf-8') 164 | # headers = {'Content-Type': 'application/json'} 165 | response = requests.post(url=url, data=body, headers=headers).json() 166 | if response["errmsg"] == 'ok': 167 | print("企业微信推送成功") 168 | else: 169 | print("推送失败") 170 | 171 | 172 | if __name__ == '__main__': 173 | webhook_token = os.environ["QYWX_KEY"] 174 | # 登入 175 | cr_url = 'https://api-farm.game.mgtv.com/api/login' 176 | cr_data = { 177 | 'openid': openid, 178 | 'ticket': ticket, 179 | 'nickName': nickName, 180 | 'did': did, 181 | 'pbid': 'iso' 182 | } 183 | cr_headers = { 184 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ImgoTV-iphone/7.1.2.2206302110' 185 | } 186 | fanhuizhi = wangye_fangwen('post', cr_url, cr_data, cr_headers) 187 | 188 | fanhuizhi_josn = json.loads(fanhuizhi) 189 | if fanhuizhi_josn['code'] == 200: 190 | # print('******URL访问成功******') 191 | token = fanhuizhi_josn.get('data').get('token', '未获取到') 192 | 193 | if token == '未获取到': 194 | print('!!!!!!未获取到token!!!!!') 195 | else: 196 | print('******获取到token******') 197 | else: 198 | print('******URL登陆失败******') 199 | token = '访问失败' 200 | # 获取信息 201 | sg_sfcs = fanhuizhi_josn['data']['userdata']['canharvest'] # 是否成熟 202 | sg_level = fanhuizhi_josn['data']['userdata']['level'] # 等级 203 | name = fanhuizhi_josn['data']['userdata']['nickName'] # 等级 204 | if sg_sfcs: 205 | message = f"芒果果园:\n{name}的果树已经成熟,快去收取" 206 | webhook(message, webhook_token) 207 | 208 | # 设置表头 209 | z_headers = { 210 | 'Usere; -Agent': 'Mozilla/5.0 (iPhonCPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ImgoTV-iphone/7.1.2.2206302110', 211 | 'autohrization': token 212 | } 213 | 214 | # 下雨 215 | time.sleep(1) 216 | cr_url = 'https://api-farm.game.mgtv.com/api/uploadSunlightRain' 217 | cr_data = { 218 | 'sunlight': 20 219 | } 220 | xiayu = wangye_fangwen('post', cr_url, cr_data, z_headers) 221 | xiayu_josn = json.loads(xiayu) 222 | if xiayu_josn.get('data').get('sunlight', 0) > 0: 223 | print('******领取下雨成功*****') 224 | else: 225 | sbyy = xiayu_josn.get('data').get('errmsg', '其他原因') 226 | print('******领取下雨失败,失败原因:' + sbyy + '*****') 227 | 228 | # 签到 229 | time.sleep(1) 230 | cr_url = 'https://api-farm.game.mgtv.com/api/sign' 231 | cr_data = {} 232 | qiandao = wangye_fangwen('post', cr_url, cr_data, z_headers) 233 | qiandao_josn = json.loads(qiandao) 234 | qdjg = qiandao_josn.get('data').get('errmsg', '成功') 235 | if qdjg == "It's already sign!": 236 | print('******重复签到!*****') 237 | elif qdjg == "成功": 238 | print('******签到成功!*****') 239 | else: 240 | print('↓↓↓↓↓签到其他情况↓↓↓↓↓') 241 | print(qdjg) 242 | # 领取水桶 243 | time.sleep(1) 244 | cr_url = 'https://api-farm.game.mgtv.com/api/collectBottle?' 245 | cr_data = {} 246 | shoujishuit = wangye_fangwen('post', cr_url, cr_data, z_headers) 247 | shoujishuit_josn = json.loads(shoujishuit) 248 | stjg = shoujishuit_josn.get('data').get('errmsg', '成功') 249 | if stjg == "成功": 250 | sdsl = shoujishuit_josn.get('data').get('gainaward').get('value') 251 | print(f'******领取到隔夜水滴:{sdsl}个*****') 252 | elif stjg == "too least drips to collect": 253 | print('******滴水太少而无法收集*****') 254 | elif stjg == "重复请求": 255 | print('******重复请求!*****') 256 | elif stjg == "time is no up": 257 | print('******时间还没有到!*****') 258 | else: 259 | print('↓↓↓↓↓水桶其他情况↓↓↓↓↓') 260 | print(stjg) 261 | # 执行浇水 262 | jiaoshui_hszx() 263 | # 收集礼盒 浇水有礼盒收集礼盒 264 | lhqk = 1 265 | lhcs = 0 266 | while lhqk > 0: 267 | time.sleep(2) 268 | lhcs = lhcs + 1 269 | print('*****领取礼盒第' + str(lhcs) + '次******') 270 | lhqk = lihe_hs() 271 | if lhqk == 0: 272 | print('*****礼盒没了!退出礼盒领取******') 273 | if lhcs > 1: 274 | print('*****领取到礼盒再次去浇水******') 275 | jiaoshui_hszx() # 去浇水 276 | lhqk = lihe_hs() 277 | -------------------------------------------------------------------------------- /mggyssd.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 39 */2 * * * 3 | new Env('芒果果园收水滴'); 4 | 5 | """ 6 | 7 | import urllib.request 8 | import urllib.parse 9 | import json 10 | import time 11 | import os 12 | 13 | 14 | 15 | 16 | 17 | openid = os.environ['openid'] 18 | ticket = os.environ['ticket'] 19 | nickName = os.environ['nickName'] 20 | did = os.environ['did'] 21 | # pbid = os.environ['pbid'] 22 | 23 | 24 | 25 | #url 访问 返回响应体 26 | def wangye_fangwen(fangfa,cr_url,cr_data,cr_headers): 27 | tijiao_url = cr_url 28 | data = cr_data 29 | data = urllib.parse.urlencode(data).encode('utf-8') 30 | headers = cr_headers 31 | if fangfa == 'post' : 32 | # 执行 33 | request = urllib.request.Request(url=tijiao_url, headers=headers, data=data) 34 | response = urllib.request.urlopen(request) 35 | content = response.read().decode('utf-8') 36 | 37 | elif fangfa == 'get' : 38 | data = urllib.parse.urlencode(data) 39 | url = cr_url + data 40 | request = urllib.request.Request(url=url, headers=headers) 41 | response = urllib.request.urlopen(request) 42 | content = response.read().decode('utf‐8') 43 | else: 44 | content = "先输入请求方式" 45 | return content 46 | 47 | 48 | 49 | 50 | 51 | 52 | if __name__ == '__main__': 53 | 54 | 55 | 56 | #登入 57 | cr_url = 'https://api-farm.game.mgtv.com/api/login' 58 | cr_data = { 59 | 'openid' : openid, 60 | 'ticket' : ticket, 61 | 'nickName' : nickName, 62 | 'did' : did, 63 | 'pbid' : 'android' 64 | } 65 | cr_headers = { 66 | 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ImgoTV-iphone/7.1.2.2206302110' 67 | } 68 | fanhuizhi = wangye_fangwen('post',cr_url,cr_data,cr_headers) 69 | 70 | fanhuizhi_josn = json.loads(fanhuizhi ) 71 | if fanhuizhi_josn['code'] == 200 : 72 | 73 | token = fanhuizhi_josn.get('data').get('token','未获取到') 74 | 75 | if token == '未获取到' : 76 | print('!!!!!!未获取到token!!!!!') 77 | else: 78 | print('******获取到token******') 79 | else: 80 | print('******URL登陆失败******') 81 | token = '访问失败' 82 | #获取信息 83 | sg_sfcs = fanhuizhi_josn['data']['userdata']['hasSeed'] #是否成熟 84 | sg_level = fanhuizhi_josn['data']['userdata']['level'] #等级 85 | 86 | #设置表头 87 | z_headers = { 88 | 'Usere; -Agent': 'Mozilla/5.0 (iPhonCPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 ImgoTV-iphone/7.1.2.2206302110', 89 | 'autohrization':token 90 | } 91 | 92 | time.sleep(5) 93 | 94 | 95 | 96 | #领取水桶 97 | cr_url = 'https://api-farm.game.mgtv.com/api/collectBucket' 98 | 99 | cr_data = {} 100 | shoujishuit = wangye_fangwen('post', cr_url, cr_data, z_headers) 101 | 102 | shoujishuit_josn = json.loads(shoujishuit) 103 | stjg = shoujishuit_josn.get('data').get('errmsg','成功') 104 | 105 | if stjg == "成功" : 106 | sdz= shoujishuit_josn.get('data').get('gainaward').get('value') 107 | print('******领取到:' + str (sdz) + '滴*****') 108 | 109 | elif stjg == "too least drips to collect" : 110 | print('******滴水太少而无法收集*****') 111 | elif stjg == "重复请求" : 112 | print('******重复请求!*****') 113 | elif stjg == "time is no up" : 114 | print('******时间还没有到!*****') 115 | else: 116 | print('↓↓↓↓↓水桶其他情况↓↓↓↓↓') 117 | print(stjg) 118 | 119 | -------------------------------------------------------------------------------- /mtCookie.js: -------------------------------------------------------------------------------- 1 | let cookies = [ 2 | 3 | 'ck1', 4 | 5 | 'ck2' 6 | 7 | ]; 8 | 9 | // 判断环境变量里面是否有ck 10 | if (process.env.MTMC_COOKIE) { 11 | if (process.env.MTMC_COOKIE.indexOf('&') > -1) { 12 | console.log(`您的cookie选择的是用&隔开\n`) 13 | cookies = process.env.MTMC_COOKIE.split('&'); 14 | } else if (process.env.MTMC_COOKIE.indexOf('\n') > -1) { 15 | console.log(`您的cookie选择的是用换行隔开\n`) 16 | cookies = process.env.MTMC_COOKIE.split('\n'); 17 | } else { 18 | cookies = [process.env.MTMC_COOKIE]; 19 | } 20 | } 21 | 22 | module.exports = cookies; 23 | -------------------------------------------------------------------------------- /pddgy.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import json 3 | import os 4 | import pprint 5 | import random 6 | import time 7 | import re 8 | import requests 9 | 10 | headers = { 11 | 'content-length': '368', 12 | 'accept': 'application/json, text/plain, */*', 13 | 'accesstoken': 'VNWK3BPFZVAFVFXVTPQP53MQUSXYFLHIQZHBOFZSXH64LHOBNRYQ1136713', 14 | 'anti-token': '0aqWtxzvuchyy9vdzItPEOFZ0dIKFK-OnCU_8xG2s-UyZ4gwcovqODDxtlFBPo6uuDcYwfzzH0cIFh8gwPs5MgVBgVpu4hLePljPRWZWRihOiPeR7xWlzA4klhEO1Yq6v8fz668EtQbblGu1gfu3btYBM8X7k_xVwzE1kzfFiWXVFvyr1dYn-Hx-swkE1XiS4xfEHCXUHmgaBYFTfJpG51IcGmHBFG79UEXOomoh4XPUAhiJqAoohrRCPdNYB9O9izdDt1wzmwE5IsmIME1MMMekS4jBirKiU7hDXz1-SRDXoi9FadXhV_2qL6OG9i2-Nv31YBwb4sfDsFpKfBWwklePoWzHIdvyF5_f6aCVOhX9i0lOKpuFiMf4--E83tIVlmKRl_jSKQsHVFeFTMDPb9tqmWvnjMHSe37ivkslVytpZHpK6_kf0qJWrG6A98bm18WisuqVVZ2PWH9omNHQnsXSlnPFJoeO4gHy6V0-N3Yr1Xc-H9-q77YBFDIZ2w0cM4td95zcMbuVPlqcnt4xSMIKHIVzLyaOqhMZrns25Em82c865867k1bRSwx8SUthrQFO4NhqqggFsszmMfWkhsOcGX1_N8C7J04gn6sAySgmXGxb3oPggJK83QUlpHte6daLzoTPgW8raCdOHoOA63JoUugJdblHSRN7MXPNee23FQ29YkFaSDsrN8uV_0W7TV0YLkUxxiYZVnZkOXZAMErAJPnNGg6EJYFYEAPXsmDg', 15 | 'user-agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4254 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001756) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx32540bd863b27570', 16 | 'content-type': 'application/json;charset=UTF-8', 17 | 'origin': 'https://mobile.yangkeduo.com', 18 | 'x-requested-with': 'com.tencent.mm', 19 | 'sec-fetch-site': 'same-origin', 20 | 'sec-fetch-mode': 'cors', 21 | 'sec-fetch-dest': 'empty', 22 | 'referer': 'https://mobile.yangkeduo.com/cartoon_sub_potato3.html?fun_id=xcx_home_page&refer_idx=4&cartoon_from_my_uid=4559229104999&xcx_trace_id=10984016595561158&xcx_version=v8.1.4.3&xcx_scene_id=1089&xcx_from_page=boottransfer&xcx_open_type=0', 23 | 'accept-encoding': 'gzip, deflate', 24 | 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 25 | 'cookie': 'api_uid=Ck2xeGK6oZFNOQBsRGZxAg==; PDDAccessToken=VNWK3BPFZVAFVFXVTPQP53MQUSXYFLHIQZHBOFZSXH64LHOBNRYQ1136713; pdd_user_id=4559229104999; pdd_user_uin=BBGFR6JX3UNC65QCXP2E7QWIE4_GEXDA; _nano_fp=XpEyn5Xbl0PxnqEqnT_fIpmlN5ZfKqNlJUluEvwx; garden_cache=%7B%22common_config%22%3A%221656301622483%22%7D; pdd_vds=gaLLNIPaoItaPnIntELtONbLGttNQtOGNEiQLOQonaPttbtLoEyEOLoEyQna' 26 | 27 | } 28 | 29 | 30 | # 领登录奖励 31 | def log_reward(tubetoken, userid): 32 | url = f"https://mobile.yangkeduo.com/proxy/api/api/manor/water/cost?pdduid={userid}" 33 | body = {"screen_token": "", "atw": "true", "location_auth": "false", "mission_type": 0, 34 | "can_trigger_random_mission": "true", "fun_id": "xcx_home_page", "product_scene": 0, 35 | "tubetoken": {"screen_token": "", "atw": "true", "location_auth": "false", "mission_type": 0, 36 | "can_trigger_random_mission": "true", "fun_id": "xcx_home_page", "product_scene": 0, 37 | "tubetoken": tubetoken, "fun_pl": 7}, 38 | "fun_pl": 7} 39 | body = json.dumps(body).encode(encoding='utf-8') 40 | response = requests.post(url=url, data=body, headers=headers).json() 41 | pprint.pprint(response) 42 | if "status" == 1: 43 | for i in response["reward_list"]: 44 | if i["reward_type"] == 1: 45 | print(f'领取{i["reward_amount"]}水滴') 46 | 47 | elif i["reward_type"] == 3: 48 | print(f'领取{i["reward_amount"]}化肥') 49 | else: 50 | print('登录宝箱已领完') 51 | 52 | 53 | def six_day_drop(tubetoken): 54 | try: 55 | url = 'https://mobile.yangkeduo.com/proxy/api/api/manor/common/apply/activity?pdduid=4559229104999' 56 | body = {"type": 18, 57 | "tubetoken": tubetoken, 58 | "fun_pl": 7} 59 | body = json.dumps(body).encode(encoding='utf-8') 60 | # headers = {'Content-Type': 'application/json'} 61 | response = requests.post(url=url, data=body, headers=headers).json() 62 | if response['success']: 63 | finished_count = response['continuous_check_in_to_collect_water_vo']['finished_count'] 64 | print(f'6天打卡已打卡{finished_count}天') 65 | except Exception as e: 66 | print(e) 67 | 68 | 69 | # 领水滴 70 | def collar_drop(tubetoken, userid): 71 | try: 72 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete/gain?ts={int(time.time() * 1000)}&pdduid={userid}' 73 | 74 | body = {"mission_type": 36155, "gain_time": 1, "no_reward": "false", 75 | "tubetoken": tubetoken, 76 | "fun_pl": 7} 77 | body = json.dumps(body).encode(encoding='utf-8') 78 | # headers = {'Content-Type': 'application/json'} 79 | response = requests.post(url=url, data=body, headers=headers).json() 80 | pprint.pprint(response) 81 | if response["result"] == "null": 82 | print(f'领取{response["gain_amount"]}水滴') 83 | 84 | else: 85 | print('水滴已领完还没到领取时间') 86 | except: 87 | pass 88 | 89 | 90 | ##领三餐水滴 91 | def receive_three_meal(tubetoken, userid): 92 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete?ts={int(time.time() * 1000)}&pdduid={userid}' 93 | 94 | body = {"mission_type": 37265, 95 | "tubetoken": tubetoken, 96 | "fun_pl": 7} 97 | body = json.dumps(body).encode(encoding='utf-8') 98 | # headers = {'Content-Type': 'application/json'} 99 | response = requests.post(url=url, data=body, headers=headers).json() 100 | if response["result"]: 101 | print(f'领取{response["reward_amount"]}水滴') 102 | 103 | else: 104 | print('三餐水滴已领完或者还没到领取时间') 105 | 106 | 107 | ##集水滴 108 | def water_droplets(tubetoken, userid): 109 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/common/apply/activity?pdduid={userid}' 110 | 111 | body = {"type": 18, 112 | "tubetoken": tubetoken, 113 | "fun_pl": 7} 114 | body = json.dumps(body).encode(encoding='utf-8') 115 | # headers = {'Content-Type': 'application/json'} 116 | response = requests.post(url=url, data=body, headers=headers).json() 117 | # pprint.pprint(response) 118 | if response["success"] != "true": 119 | print(f'目前集水滴打卡第{response["continuous_check_in_to_collect_water_vo"]["finished_count"]}天') 120 | 121 | 122 | ##开宝箱5次 123 | def box(tubetoken, userid): 124 | for i in range(1, 6): 125 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/withered/open/box?pdduid={userid}' 126 | body = {"box_order": i, 127 | "tubetoken": tubetoken, 128 | "fun_pl": 7} 129 | # print(body) 130 | body = json.dumps(body).encode(encoding='utf-8') 131 | response = requests.post(url=url, data=body, headers=headers).json() 132 | # pprint.pprint(response) 133 | if i != 5: 134 | if response["status"] == 1: 135 | if response["reward_list"][0]["reward_type"] == 15: 136 | print(f'获得{response["reward_list"][0]["reward_amount"]}把水壶') 137 | elif response["reward_list"][0]["reward_type"] == 1: 138 | print(f'获得{response["reward_list"][0]["reward_amount"]}水滴') 139 | elif response["reward_list"][0]["reward_type"] == 32: 140 | print(f'获得{response["reward_list"][0]["reward_amount"]}优惠券') 141 | else: 142 | print('可领宝箱不足') 143 | else: 144 | if response["status"] == 1: 145 | if response["reward_list"][0]["reward_type"] == 15: 146 | print(f'明日可获得{response["reward_list"][0]["reward_amount"]}把水壶') 147 | elif response["reward_list"][0]["reward_type"] == 1: 148 | print(f'明日可获得{response["reward_list"][0]["reward_amount"]}水滴') 149 | elif response["reward_list"][0]["reward_type"] == 32: 150 | print(f'明日可获得{response["reward_list"][0]["reward_amount"]}优惠券') 151 | 152 | 153 | ##搜索领水滴 154 | def search(tubetoken, userid): 155 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete?ts={int(time.time() * 1000)}&pdduid={userid}' 156 | body = {"page_sn": "10015", "mission_type": 36288, 157 | "screen_token": tubetoken, 158 | "use_anti_token": 1, "fun_pl": 7} 159 | body = json.dumps(body).encode(encoding='utf-8') 160 | # headers = {'Content-Type': 'application/json'} 161 | response = requests.post(url=url, data=body, headers=headers).json() 162 | 163 | if response["result"] == "true": 164 | print(f'搜索获得{response["reward_amount"]}水滴') 165 | 166 | else: 167 | print('搜索领水滴任务完成') 168 | 169 | 170 | ##养分 171 | def tree_nutrients(tubetoken, userid): 172 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor-query/health/info?pdduid={userid}' 173 | body = { 174 | "tubetoken": tubetoken, 175 | "fun_pl": 7} 176 | body = json.dumps(body).encode(encoding='utf-8') 177 | # headers = {'Content-Type': 'application/json'} 178 | response = requests.post(url=url, data=body, headers=headers).json() 179 | # pprint.pprint(response) 180 | if response["restricted_collage"]: 181 | print(f'目前果树营养为{response["health_degree"]}') 182 | 183 | else: 184 | print('可能是cookie掉了') 185 | 186 | 187 | ##目前化肥数量 188 | def fertilize(tubetoken, userid): 189 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/use/backpack/goods?pdduid={userid}' 190 | 191 | body = {"type": 2, "source": 53, "exchange_amount": 1, 192 | "tubetoken": tubetoken, 193 | "fun_pl": 7} 194 | body = json.dumps(body).encode(encoding='utf-8') 195 | # headers = {'Content-Type': 'application/json'} 196 | response = requests.post(url=url, data=body, headers=headers).json() 197 | if response["error_code"] != 20002: 198 | try: 199 | print(f'目前剩可施肥数量为{response["user_backpack_vo"]["amount"]}袋化肥') 200 | if int(response["ser_backpack_vo"]["amount"]) >= 1: 201 | fertilize(tubetoken) 202 | time.sleep(random.randint(1, 3)) 203 | except: 204 | pass 205 | else: 206 | print('化肥不足') 207 | 208 | 209 | ##打卡领化肥 210 | def open_collar_fertilizer(tubetoken, userid): 211 | """ 212 | https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete/gain?ts=1657108779254&pdduid=5343650012 213 | https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete/gain?ts=1656338096260&pdduid=4559229104999 214 | {"mission_type":36069,"gain_time":1,"no_reward":false,"tubetoken":"Ff5sBc8KFQhkLPzy5aSiZ4Gd7tCm8x7AJe33NU6qGZnTLAgeSJeXJoQjAnzjyettLahz3Ao9mmAm%0ATu1GWZo1JljTdYHJAIvltlfCEkhy6NxGBghMM1NoA79NKjzjhMu%2FJTLnhpwlHUYMsVYBwuJO0xV1%0Ayu%2FRCmpokx2U5hh04dGtqGXUuXjpEuBw6hQPeUrKPRRuAJAa4wFy1nfkdVVbKhjCtUk89oTjhh8X%0A5tL9RMX1%2FNvMcCJP6xi46Y9D6%2FZA","fun_pl":7} 215 | """ 216 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete?ts={int(time.time() * 1000)}&pdduid={userid}' 217 | body = {"mission_type": 36069, 218 | "tubetoken": tubetoken, 219 | "fun_pl": 7} 220 | body = json.dumps(body).encode(encoding='utf-8') 221 | # headers = {'Content-Type': 'application/json'} 222 | response = requests.post(url=url, data=body, headers=headers).json() 223 | try: 224 | if response["result"]: 225 | print(f'打开成功') 226 | 227 | else: 228 | print('打卡时间未到') 229 | except: 230 | pass 231 | 232 | 233 | # 第二次打卡 234 | def second_open_collar_fertilizer(tubetoken, userid): 235 | """ 236 | https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete/gain?ts=1657108779254&pdduid=5343650012 237 | https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete/gain?ts=1656338096260&pdduid=4559229104999 238 | {"mission_type":36069,"gain_time":1,"no_reward":false,"tubetoken":"Ff5sBc8KFQhkLPzy5aSiZ4Gd7tCm8x7AJe33NU6qGZnTLAgeSJeXJoQjAnzjyettLahz3Ao9mmAm%0ATu1GWZo1JljTdYHJAIvltlfCEkhy6NxGBghMM1NoA79NKjzjhMu%2FJTLnhpwlHUYMsVYBwuJO0xV1%0Ayu%2FRCmpokx2U5hh04dGtqGXUuXjpEuBw6hQPeUrKPRRuAJAa4wFy1nfkdVVbKhjCtUk89oTjhh8X%0A5tL9RMX1%2FNvMcCJP6xi46Y9D6%2FZA","fun_pl":7} 239 | """ 240 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/mission/complete/gain?ts={int(time.time() * 1000)}&pdduid={userid}' 241 | 242 | body = {"mission_type": 36069, 243 | "tubetoken": tubetoken, 244 | "fun_pl": 7} 245 | body = json.dumps(body).encode(encoding='utf-8') 246 | # headers = {'Content-Type': 'application/json'} 247 | response = requests.post(url=url, data=body, headers=headers).json() 248 | pprint.pprint(response) 249 | if response["result"]: 250 | print(f'打开成功') 251 | 252 | else: 253 | print('打卡时间未到') 254 | 255 | 256 | ##领水瓶水滴 257 | def bottle(tubetoken, userid): 258 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/gain/accumulate/water/reward?pdduid={userid}' 259 | body = {"part_id_list": [14], 260 | "tubetoken": tubetoken, 261 | "fun_pl": 7} 262 | body = json.dumps(body).encode(encoding='utf-8') 263 | response = requests.post(url=url, data=body, headers=headers).json() 264 | # pprint.pprint(response) 265 | if 'is_from_new_logic' in response: 266 | print(f'领{response["accumulate_water_vo"]["reward_amount"]}滴水瓶水滴成功') 267 | 268 | else: 269 | print('可能是COOKies掉了或者领过水瓶水了') 270 | 271 | 272 | # 获取偷取信息 273 | def steal_water(tubetoken, userid): 274 | status = [] 275 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor-query/friend/list/page?pdduid={userid}' 276 | body = {"page_num": 1, "tubetoken": tubetoken, "fun_pl": 7} 277 | body = json.dumps(body).encode(encoding='utf-8') 278 | response = requests.post(url=url, data=body, headers=headers).json() 279 | # pprint.pprint(response) 280 | if len(response["friend_list"]) > 0: 281 | for i in response['friend_list']: 282 | try: 283 | friend_name = i['nickname'] 284 | uid = i['uid'] 285 | bottle_water_status = i['steal_water_status']['status'] 286 | # print(friend_name, uid, bottle_water_status) 287 | status.append([friend_name, uid, bottle_water_status]) 288 | except: 289 | pass 290 | else: 291 | print('无好友列表退出偷取好友水滴') 292 | for i in status: 293 | if i[2] == 2: 294 | name = i[0] 295 | uid = i[1] 296 | steal(tubetoken, uid, name, userid) 297 | 298 | 299 | # 偷取 300 | def steal(tubetoken, uid, name, userid): 301 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/steal/water?pdduid={userid}' 302 | body = {"friend_uid": uid, "steal_type": 1, "tubetoken": tubetoken, "fun_pl": 7} 303 | body = json.dumps(body).encode(encoding='utf-8') 304 | response = requests.post(url=url, data=body, headers=headers).json() 305 | pprint.pprint(response) 306 | if response['error_code'] != 10018: 307 | if "暂不可偷取,请稍后再试" not in response: 308 | print(f'偷取好友{name}{response["steal_amount"]}滴水滴') 309 | else: 310 | print(response['"error_msg"']) 311 | else: 312 | print(response['error_msg']) 313 | 314 | url2 = 'https://mobile.yangkeduo.com/proxy/api/api/manor/steal/water?pdduid=5343650012' 315 | body = {"friend_uid": uid, "tubetoken": tubetoken, "fun_pl": 7} 316 | body = json.dumps(body).encode(encoding='utf-8') 317 | response = requests.post(url=url2, data=body, headers=headers).json() 318 | pprint.pprint(response) 319 | if response['error_code'] != 10018: 320 | if "暂不可偷取,请稍后再试" not in response: 321 | print(f'偷取{response["steal_amount"]}') 322 | else: 323 | print(response['距离上次偷好友水滴间隔太短']) 324 | else: 325 | print(response['error_msg']) 326 | 327 | 328 | # 收水车水滴 329 | def waterwheel_droplets(tubetoken, userid): 330 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/common/water/gain?pdduid={userid}' 331 | body = {"type": 15, "mission_type": "", "params": {"15": 30000}, "tubetoken": tubetoken, "fun_pl": 7} 332 | body = json.dumps(body).encode(encoding='utf-8') 333 | response = requests.post(url=url, data=body, headers=headers).json() 334 | if response["status"] == 1: 335 | gain_amount = response['gain_amount'] 336 | print(f'水车水滴收取成功,一共收取{gain_amount / 1000}水滴') 337 | else: 338 | print('无水车或者水车水滴不足') 339 | 340 | 341 | ##浇水 342 | def watering(tubetoken, userid): 343 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/water/cost?pdduid={userid}' 344 | 345 | body = {"screen_token": "", "atw": "false", "location_auth": "false", "mission_type": 0, 346 | "can_trigger_random_mission": "true", "fun_id": "xcx_home_page", "product_scene": 0, "tubetoken": tubetoken, 347 | "fun_pl": 7} 348 | # print(body) 349 | body = json.dumps(body).encode(encoding='utf-8') 350 | response = requests.post(url=url, data=body, headers=headers).json() 351 | if 'error_code' not in response: 352 | print(f'浇10滴水,水瓶目前还剩{response["now_water_amount"]}水滴') 353 | if int(response["now_water_amount"]) >= 10: 354 | watering(tubetoken, userid) 355 | time.sleep(random.randint(1, 3)) 356 | else: 357 | print('浇水完成') 358 | else: 359 | print(response['error_msg']) 360 | 361 | 362 | def percent(AccessToken, userid): 363 | url = f"https://mobile.yangkeduo.com/cartoon_sub_potato3.html?fun_id=xcx_home_page&refer_idx=4&cartoon_from_my_uid={userid}&xcx_trace_id=10984016595561158&xcx_version=v8.1.4.3&xcx_scene_id=1089&xcx_from_page=boottransfer&xcx_open_type=0" 364 | headers = { 365 | 'user-agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4254 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001756) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx32540bd863b27570', 366 | 'cookie': f'CksAZGK7sFYGhgBrPS/3Ag==; PDDAccessToken={AccessToken}; pdd_user_id=4559229104999; pdd_user_uin=BBGFR6JX3UNC65QCXP2E7QWIE4_GEXDA; _nano_fp=XpEyn5Xbl0PxnqEqnT_fIpmlN5ZfKqNlJUluEvwx; garden_cache=%7B%22common_config%22%3A%221656301622483%22%7D; pdd_vds=gaLLNIPaoItaPnIntELtONbLGttNQtOGNEiQLOQonaPttbtLoEyEOLoEyQna' 367 | 368 | } 369 | response = requests.get(url=url, headers=headers).text 370 | fruit = re.findall('class="cartoon-taro-text">再浇水(.*?)%', response)[0].replace('', '') 371 | print(fruit) 372 | return f"拼多多果园任务:\n在浇水{fruit}包邮到家" 373 | 374 | 375 | def webhook(message,webhook_token): 376 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 377 | headers = { 378 | 'Content-Type': 'application/json' 379 | 380 | } 381 | data = { 382 | "msgtype": "text", 383 | "text": { 384 | "content": message 385 | } 386 | } 387 | body = json.dumps(data).encode(encoding='utf-8') 388 | # headers = {'Content-Type': 'application/json'} 389 | response = requests.post(url=url, data=body, headers=headers).json() 390 | if response["errmsg"] == 'ok': 391 | print("企业微信推送成功") 392 | else: 393 | print("推送失败") 394 | 395 | 396 | if __name__ == '__main__': 397 | ck = os.environ['pddck'] 398 | # ck = "" 399 | webhook_token = os.environ['QYWX_KEY'] 400 | ck = ck.split('@') 401 | start_time = datetime.datetime.now().strftime('%H') 402 | for i in ck: 403 | ck = i.split('&') 404 | cookie = f'Ck2xeGK6oZFNOQBsRGZxAg==; PDDAccessToken={ck[1]}; pdd_user_id={ck[0]}; pdd_user_uin=BBGFR6JX3UNC65QCXP2E7QWIE4_GEXDA; _nano_fp=XpEyn5Xbl0PxnqEqnT_fIpmlN5ZfKqNlJUluEvwx; garden_cache=%7B%22common_config%22%3A%221656346837473%22%7D; pdd_vds=gaLLNIPaoItaPnIntELtONbLGttNQtOGNEiQLOQonaPttbtLoEyEOLoEyQna' 405 | header1 = {'accesstoken': ck[1], 406 | 'cookie': cookie} 407 | headers.update(header1) 408 | tubetoken = ck[1] 409 | if start_time == '07': 410 | print('开始领早餐水滴') 411 | receive_three_meal(tubetoken, ck[0]) 412 | time.sleep(random.randint(3, 5)) 413 | print('开始领日常水滴任务') 414 | collar_drop(tubetoken, ck[0]) 415 | time.sleep(random.randint(3, 5)) 416 | print('开始领搜索领水滴任务') 417 | search(tubetoken, ck[0]) 418 | time.sleep(random.randint(3, 5)) 419 | print('开始6天打卡集水滴任务') 420 | six_day_drop(tubetoken) 421 | time.sleep(random.randint(3, 5)) 422 | print('开始领水平水滴任务') 423 | bottle(tubetoken, ck[0]) 424 | time.sleep(random.randint(3, 5)) 425 | elif start_time == '12': 426 | print('开始领午餐水滴') 427 | receive_three_meal(tubetoken, ck[0]) 428 | time.sleep(7) 429 | time.sleep(random.randint(3, 5)) 430 | # print('开始偷好友水滴') 431 | # steal_water(tubetoken,ck[0]) 432 | elif start_time == '18': 433 | print('开始领晚餐水滴') 434 | receive_three_meal(tubetoken, ck[0]) 435 | print('开始浇水') 436 | watering(tubetoken, ck[0]) 437 | # print('开始领宝箱任务') 438 | box(tubetoken, ck[0]) 439 | print('开始查询果树营养') 440 | tree_nutrients(tubetoken, ck[0]) 441 | time.sleep(random.randint(3, 5)) 442 | print('判断是否施肥') 443 | # print('开始偷好友水滴') 444 | # steal_water(tubetoken,ck[0]) 445 | print('开始浇水') 446 | watering(tubetoken, ck[0]) 447 | message = percent(ck[1], ck[0]) 448 | webhook(message,webhook_token) 449 | -------------------------------------------------------------------------------- /pddssc.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import json 3 | import os 4 | import pprint 5 | import random 6 | import time 7 | import re 8 | import requests 9 | 10 | headers = { 11 | 'content-length': '368', 12 | 'accept': 'application/json, text/plain, */*', 13 | 'accesstoken': 'VNWK3BPFZVAFVFXVTPQP53MQUSXYFLHIQZHBOFZSXH64LHOBNRYQ1136713', 14 | 'anti-token': '0aqWtxzvuchyy9vdzItPEOFZ0dIKFK-OnCU_8xG2s-UyZ4gwcovqODDxtlFBPo6uuDcYwfzzH0cIFh8gwPs5MgVBgVpu4hLePljPRWZWRihOiPeR7xWlzA4klhEO1Yq6v8fz668EtQbblGu1gfu3btYBM8X7k_xVwzE1kzfFiWXVFvyr1dYn-Hx-swkE1XiS4xfEHCXUHmgaBYFTfJpG51IcGmHBFG79UEXOomoh4XPUAhiJqAoohrRCPdNYB9O9izdDt1wzmwE5IsmIME1MMMekS4jBirKiU7hDXz1-SRDXoi9FadXhV_2qL6OG9i2-Nv31YBwb4sfDsFpKfBWwklePoWzHIdvyF5_f6aCVOhX9i0lOKpuFiMf4--E83tIVlmKRl_jSKQsHVFeFTMDPb9tqmWvnjMHSe37ivkslVytpZHpK6_kf0qJWrG6A98bm18WisuqVVZ2PWH9omNHQnsXSlnPFJoeO4gHy6V0-N3Yr1Xc-H9-q77YBFDIZ2w0cM4td95zcMbuVPlqcnt4xSMIKHIVzLyaOqhMZrns25Em82c865867k1bRSwx8SUthrQFO4NhqqggFsszmMfWkhsOcGX1_N8C7J04gn6sAySgmXGxb3oPggJK83QUlpHte6daLzoTPgW8raCdOHoOA63JoUugJdblHSRN7MXPNee23FQ29YkFaSDsrN8uV_0W7TV0YLkUxxiYZVnZkOXZAMErAJPnNGg6EJYFYEAPXsmDg', 15 | 'user-agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4254 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001756) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 miniProgram/wx32540bd863b27570', 16 | 'content-type': 'application/json;charset=UTF-8', 17 | 'origin': 'https://mobile.yangkeduo.com', 18 | 'x-requested-with': 'com.tencent.mm', 19 | 'sec-fetch-site': 'same-origin', 20 | 'sec-fetch-mode': 'cors', 21 | 'sec-fetch-dest': 'empty', 22 | 'referer': 'https://mobile.yangkeduo.com/cartoon_sub_potato3.html?fun_id=xcx_home_page&refer_idx=4&cartoon_from_my_uid=4559229104999&xcx_trace_id=10984016595561158&xcx_version=v8.1.4.3&xcx_scene_id=1089&xcx_from_page=boottransfer&xcx_open_type=0', 23 | 'accept-encoding': 'gzip, deflate', 24 | 'accept-language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7', 25 | 'cookie': 'api_uid=Ck2xeGK6oZFNOQBsRGZxAg==; PDDAccessToken=VNWK3BPFZVAFVFXVTPQP53MQUSXYFLHIQZHBOFZSXH64LHOBNRYQ1136713; pdd_user_id=4559229104999; pdd_user_uin=BBGFR6JX3UNC65QCXP2E7QWIE4_GEXDA; _nano_fp=XpEyn5Xbl0PxnqEqnT_fIpmlN5ZfKqNlJUluEvwx; garden_cache=%7B%22common_config%22%3A%221656301622483%22%7D; pdd_vds=gaLLNIPaoItaPnIntELtONbLGttNQtOGNEiQLOQonaPttbtLoEyEOLoEyQna' 26 | 27 | } 28 | 29 | 30 | 31 | # 收水车水滴 32 | def waterwheel_droplets(tubetoken, userid): 33 | url = f'https://mobile.yangkeduo.com/proxy/api/api/manor/common/water/gain' 34 | body = {"type": 15, "mission_type": "", "params": {"15": 30000}, "tubetoken": tubetoken, "fun_pl": 7} 35 | body = json.dumps(body).encode(encoding='utf-8') 36 | response = requests.post(url=url, data=body, headers=headers).json() 37 | if response["status"] == 1: 38 | gain_amount = response['gain_amount'] 39 | print(f'水车水滴收取成功,一共收取{gain_amount / 1000}水滴') 40 | else: 41 | print('无水车或者水车水滴不足') 42 | 43 | 44 | 45 | 46 | 47 | if __name__ == '__main__': 48 | ck = os.environ['pddck'] 49 | # ck = 50 | ck = ck.split('@') 51 | start_time = datetime.datetime.now().strftime('%H') 52 | for i in ck: 53 | ck = i.split('&') 54 | cookie = f'Ck2xeGK6oZFNOQBsRGZxAg==; PDDAccessToken={ck[1]}; pdd_user_id={ck[0]}; pdd_user_uin=BBGFR6JX3UNC65QCXP2E7QWIE4_GEXDA; _nano_fp=XpEyn5Xbl0PxnqEqnT_fIpmlN5ZfKqNlJUluEvwx; garden_cache=%7B%22common_config%22%3A%221656346837473%22%7D; pdd_vds=gaLLNIPaoItaPnIntELtONbLGttNQtOGNEiQLOQonaPttbtLoEyEOLoEyQna' 55 | header1 = {'accesstoken': ck[1], 56 | 'cookie': cookie} 57 | headers.update(header1) 58 | tubetoken = ck[1] 59 | 60 | print('收水车水滴') 61 | waterwheel_droplets(tubetoken, ck[0]) 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /sbr.py: -------------------------------------------------------------------------------- 1 | # !/bin/env python3 2 | # -*- coding: utf-8 -* 3 | """ 4 | link: https://raw.githubusercontent.com/yml2213/Python/master/sbr/sbr.py 5 | new Env("苏泊尔") 6 | Name: 苏泊尔 小程序 种大米,换实物 7 | Author: yml 8 | Date: 2022.7.12 9 | cron: 19 7,12 * * * sbr.py 10 | 11 | 7.13 完成 签到, 偷大米, 浏览菜谱 任务 12 | ================== 青龙--配置文件 ================== 13 | 变量格式: export sbr_data=" token & cookie @ token & cookie " ,多账号用 换行 或 @ 分割 14 | 15 | token 抓 https://growrice.supor.com/rice/backend/public/index.php/api/login/auto-login 的包 , url 后面就是token 16 | cookie 抓 https://growrice.supor.com/rice/backend/public/index.php/api/users/get-user-info 的包 , header 中有cookie 17 | """ 18 | # ================================= 以下代码不懂不要随便乱动 ==================================== 19 | try: 20 | import requests 21 | import json 22 | import sys 23 | import os 24 | import re 25 | import time 26 | import random 27 | except Exception as e: 28 | print(e) 29 | requests.packages.urllib3.disable_warnings() 30 | # -------------------------------------------------------------------------------------------- 31 | Script_Name = "苏泊尔" 32 | Name_Pinyin = "sbr" 33 | Script_Change = "完成 签到, 偷大米, 浏览菜谱 任务" 34 | Script_Version = "0.0.2" 35 | 36 | 37 | # -------------------------------------------------------------------------------------------- 38 | def start(): 39 | global _ck_state 40 | _ck_state = 1 41 | for inx, data in enumerate(ckArr): 42 | msg("=============== 开始第" + str(inx + 1) + "个账号 ===============") 43 | ck = data.split("&") 44 | sbr = Script(ck[0], ck[1]) 45 | sbr.login() 46 | sbr.user_info("用户信息") 47 | if _ck_state: 48 | sbr.sign_info("签到信息") 49 | sbr.task_list("任务列表") 50 | sbr.get_index_info("获取可收取大米信息") 51 | 52 | 53 | class Script: 54 | def __init__(self, token, cookie): 55 | self.token = token 56 | self.cookie = cookie 57 | 58 | # noinspection PyMethodMayBeStatic 59 | def url(self, name): 60 | url = f"https://growrice.supor.com/rice/backend/public/index.php/api/{name}" 61 | return url 62 | 63 | def headers(self): 64 | headers = { 65 | 'Host': 'growrice.supor.com', 66 | 'Cookie': self.cookie, 67 | 'content-type': 'application/x-www-form-urlencoded' 68 | } 69 | return headers 70 | 71 | def login(self): # 登录刷新 72 | url_login = f"https://growrice.supor.com/rice/backend/public/index.php/api/login/auto-login?token={self.token}" 73 | try: 74 | requests.get(url=url_login, headers=self.headers(), verify=False) 75 | except Exception as err: 76 | print(err) 77 | 78 | def user_info(self, name): # 用户信息 79 | global _ck_state 80 | try: 81 | response = requests.get(url=self.url("users/get-user-info"), headers=self.headers(), verify=False) 82 | result = response.json() 83 | # print(result) 84 | if result['code'] == 1: 85 | msg(f"{name}: {result['msg']}, 欢迎 {result['data']['nickname']}") 86 | time.sleep(2) 87 | elif result['code'] == 0: 88 | msg(f"{name}: {result['msg']}") 89 | _ck_state = 0 90 | return _ck_state 91 | else: 92 | msg(f"{name}: 失败, 请稍后再试!") 93 | print(result) 94 | _ck_state = 0 95 | return _ck_state 96 | except Exception as err: 97 | print(err) 98 | 99 | def sign_info(self, name): # 签到信息查询 100 | try: 101 | response = requests.get(url=self.url("signIn/sign-list"), headers=self.headers(), verify=False) 102 | result = response.json() 103 | # print(result) 104 | if not result['data']['is_sign']: 105 | msg(f"{name}: 未签到 ,去签到喽!") 106 | self.do_sign("签到") 107 | elif result['data']['is_sign']: 108 | msg(f"{name}: 已签到, 明天再来吧!") 109 | else: 110 | msg(f"{name}: 失败, 请稍后再试!") 111 | print(result) 112 | except Exception as err: 113 | print(err) 114 | 115 | def do_sign(self, name): # 执行签到 116 | try: 117 | payload = "https://growrice.supor.com/rice/backend/public/index.php/api/signIn/sign" 118 | response = requests.post(url=self.url("signIn/sign"), headers=self.headers(), data=payload, verify=False) 119 | result = response.json() 120 | if result['code'] == 1: 121 | msg(f"{name}: {result['msg']}, 获得 {result['data']['get_rice_num']} 大米") 122 | time.sleep(3) 123 | self.browse_recipes("浏览菜谱") 124 | elif result['code'] == 0: 125 | msg(f"{name}: {result['msg']}") 126 | else: 127 | msg(f"{name}: 失败, 请稍后再试!") 128 | print(result) 129 | except Exception as err: 130 | print(err) 131 | 132 | def task_list(self, name): # 任务列表 133 | try: 134 | response = requests.get(url=self.url("task/index"), headers=self.headers(), verify=False) 135 | result = response.json() 136 | # print(result) 137 | if result['code'] == 1: 138 | print(f"{name}: {result['msg']}") 139 | task_list = result['data'] 140 | for task in task_list: 141 | if task['id'] != 8: 142 | _id, name, is_finish = task['id'], task['name'], task['is_finish'] 143 | if _id == 6 and is_finish is False: 144 | self.get_rice("偷大米") 145 | elif _id == 6 and is_finish is True: 146 | msg("今天无法偷大米了, 明天再来吧!") 147 | pass 148 | 149 | elif result['code'] == 0: 150 | msg(f"{name}: {result['msg']}") 151 | else: 152 | msg(f"{name}: 失败, 请稍后再试!") 153 | print(result) 154 | except Exception as err: 155 | print(err) 156 | 157 | def get_rice(self, name): # 偷好友大米 158 | try: 159 | _id_list = self.get_city_list("获取好友大米id") 160 | for _id in _id_list: 161 | payload = f"&friend_id={_id}" 162 | response = requests.post(url=self.url("users/get-rice"), headers=self.headers(), data=payload) 163 | result = response.json() 164 | # print(result) 165 | if result['code'] == 1: 166 | msg(f"{name}: {result['msg']},当前已有大米 {result['data']['sign_rice_num']}") 167 | time.sleep(5) 168 | elif result['code'] == 0: 169 | msg(f"{name}: {result['msg']}") 170 | else: 171 | msg(f"{name}: 失败, 请稍后再试!") 172 | print(result) 173 | 174 | except Exception as err: 175 | print(err) 176 | 177 | def get_city_list(self, name): # 获取好友大米id 178 | try: 179 | response = requests.get(url=self.url("users/same-city-list"), headers=self.headers(), verify=False) 180 | result = response.json() 181 | if result['code'] == 1: 182 | _list = result['data'] 183 | # print(_list) 184 | random_list = random.sample(range(1, 10), 3) 185 | _id_list = [] 186 | for i in random_list: 187 | _id = _list[i]['id'] 188 | _id_list.append(_id) 189 | return _id_list 190 | 191 | elif result['code'] == 0: 192 | msg(f"{name}: 获取列表失败!") 193 | else: 194 | msg(f"{name}: 失败, 请稍后再试!") 195 | print(result) 196 | except Exception as err: 197 | print(err) 198 | 199 | def browse_recipes(self, name): # 浏览菜谱 200 | try: 201 | payload = "&id=8&other_id=3" 202 | response = requests.post(url=self.url("task/link-task"), headers=self.headers(), data=payload) 203 | result = response.json() 204 | # print(result) 205 | if result['code'] == 1: 206 | msg(f"{name}: {result['msg']}") 207 | time.sleep(3) 208 | else: 209 | msg(f"{name}: 失败, 请稍后再试!") 210 | msg(result) 211 | except Exception as err: 212 | print(err) 213 | 214 | def get_index_info(self, name): # 获取可收取大米信息 215 | try: 216 | response = requests.get(url=self.url("index/index"), headers=self.headers(), verify=False) 217 | result = response.json() 218 | # print(result) 219 | rice_list = result['data']['rice_list'] 220 | if result['code'] == 1 and len(rice_list) > 0: 221 | for i in range(len(rice_list)): 222 | _id, num, collect_name = rice_list[i]["id"], rice_list[i]["num"], rice_list[i]["name"] 223 | # print(_id, num, _name) 224 | self.collect_rice("收大米", _id, num, collect_name) 225 | elif result['code'] == 1 and len(rice_list) == 0: 226 | msg(f"{name}: 没有可以收获的大米") 227 | 228 | elif result['code'] == 2: 229 | msg(f"{name}: {result['msg']}, 请自己先打开一次小程序,种大米后在执行脚本!") 230 | else: 231 | msg(f"{name}: 失败, 请稍后再试!") 232 | msg(result) 233 | except Exception as err: 234 | print(err) 235 | 236 | def collect_rice(self, name, _id, num, collect_name): # 收大米 237 | try: 238 | payload = f"&id={_id}" 239 | response = requests.post(url=self.url("index/collect-rice"), headers=self.headers(), data=payload) 240 | result = response.json() 241 | # print(result) 242 | if result['code'] == 1: 243 | msg(f"{name}: 收取 {collect_name} {num} 大米, {result['msg']}") 244 | time.sleep(5) 245 | elif result['code'] == 0: 246 | msg(f"{name}: {result['msg']}") 247 | else: 248 | msg(f"{name}: 失败, 请稍后再试!") 249 | msg(result) 250 | except Exception as err: 251 | print(err) 252 | 253 | 254 | # ==================================================================== 255 | 256 | 257 | def main(): 258 | pass 259 | 260 | 261 | def last_version(name, mold): 262 | url = '' 263 | if mold == 1: 264 | url = f"https://raw.gh.fakev.cn/yml2213/Python/master/{name}/{name}.py" 265 | 266 | elif mold == 2: 267 | url = f"http://yml-gitea.ml:2233/yml/Python/raw/branch/master/{name}.py" 268 | try: 269 | _url = url 270 | _headers = {} 271 | response = requests.get(url=_url, headers=_headers, verify=False) 272 | result = response.text 273 | r = re.compile(r'Script_Version = "(.*?)"') 274 | _data = r.findall(result) 275 | if not _data: 276 | return "出现未知错误 ,请稍后重试!" 277 | else: 278 | return _data[0] 279 | except Exception as err: 280 | print(err) 281 | 282 | 283 | def mac_env(name): 284 | global ckArr 285 | pwd = os.path.dirname(os.path.abspath(__file__)) + os.sep 286 | path = pwd + ".env" 287 | with open(path, "r+") as f: 288 | env = f.read() 289 | if name in env: 290 | r = re.compile(r'sbr_data="(.*?)"', re.M | re.S | re.I) 291 | result = r.findall(env) 292 | # print(data[0]) 293 | if "@" in result[0]: 294 | _ck = result[0].split("@") 295 | ckArr = _ck 296 | elif "\n" in result[0]: 297 | _ck = result[0].splitlines() 298 | ckArr = _ck 299 | else: 300 | ckArr = result 301 | else: 302 | print(f"检查变量 {name} 是否已填写") 303 | 304 | 305 | def ql_env(name): 306 | global ckArr 307 | if name in os.environ: 308 | ckArr = [] 309 | _data = os.environ[name] 310 | if "@" in _data: 311 | _ck = _data.split("@") 312 | ckArr = _ck 313 | elif "\n" in _data: 314 | _ck = _data.splitlines() 315 | ckArr = _ck 316 | else: 317 | ckArr = _data.split("@") 318 | 319 | 320 | # 通知服务 321 | class Msg(object): 322 | def __init__(self, m=''): 323 | self.str_msg = m 324 | self.message() 325 | 326 | # noinspection PyMethodMayBeStatic 327 | def get_sendnotify(self): 328 | if not os.path.exists("sendNotify.py"): 329 | cur_path = os.getcwd() 330 | print(f"未找到通知依赖文件,将于脚本执行目录({cur_path})新建:sendNotify.py ") 331 | try: 332 | url = 'https://raw.gh.fakev.cn/yml2213/Python/master/sendNotify.py' 333 | response = requests.get(url) 334 | with open('sendNotify.py', "w+", encoding="utf-8") as f: 335 | f.write(response.text) 336 | except Exception as err: 337 | print(err) 338 | else: 339 | print("文件已存在,跳过") 340 | pass 341 | pass 342 | 343 | def message(self): 344 | global msg_info 345 | print(self.str_msg) 346 | try: 347 | # msg_info = '' 348 | msg_info = f"{msg_info}\n{self.str_msg}" 349 | except Exception as err: 350 | print(err) 351 | msg_info = "{}".format(self.str_msg) 352 | sys.stdout.flush() 353 | # 这代码的作用就是刷新缓冲区。 354 | # 当我们打印一些字符时 ,并不是调用print函数后就立即打印的。一般会先将字符送到缓冲区 ,然后再打印。 355 | # 这就存在一个问题 ,如果你想等时间间隔的打印一些字符 ,但由于缓冲区没满 ,不会打印。就需要采取一些手段。如每次打印后强行刷新缓冲区。 356 | 357 | def main(self): 358 | global send 359 | cur_path = os.getcwd() 360 | # print(cur_path) 361 | if os.path.exists(cur_path + "/sendNotify.py"): 362 | # noinspection PyBroadException 363 | try: 364 | from sendNotify import send 365 | except Exception as err: 366 | self.get_sendnotify() 367 | print(err) 368 | try: 369 | from sendNotify import send 370 | except Exception as err: 371 | print(err) 372 | print("加载通知服务失败~") 373 | else: 374 | self.get_sendnotify() 375 | try: 376 | from sendNotify import send 377 | except Exception as err: 378 | print(err) 379 | print("加载通知服务失败~") 380 | 381 | 382 | Msg().main() 383 | 384 | 385 | def msg(data): 386 | Msg(data) 387 | 388 | 389 | # mac_env(f"{Name_Pinyin}_data") 390 | ql_env(f"{Name_Pinyin}_data") 391 | 392 | 393 | def tip(): 394 | print("================ 脚本只支持青龙新版 =================") 395 | print("============ 具体教程以请自行查看顶部教程 =============\n") 396 | msg(f"🔔 {Script_Name} ,开始! ") 397 | origin_version = last_version(Name_Pinyin, 1) 398 | msg(f"📌 本地脚本: {Script_Version} 远程仓库版本: V {origin_version}") 399 | msg(f"📌 🆙 更新内容: {Script_Change}") 400 | msg(f"共发现 {str(len(ckArr))} 个账号") 401 | 402 | 403 | if __name__ == "__main__": 404 | global ckArr, msg_info, send, _ck_state 405 | tip() 406 | start() 407 | send(f"{Script_Name}", msg_info) 408 | -------------------------------------------------------------------------------- /shjd.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 10 7 * * * 3 | const $ = new Env("上海家定") 4 | """ 5 | import datetime 6 | import json 7 | import os 8 | import time 9 | from pprint import pprint 10 | import requests 11 | 12 | headers = { 13 | # 'log-header': 'I am the log request header.', 14 | # 'deviceId': 'cf3fbc4c7a96447e8e852b0fb79bd2b2', 15 | # 'siteId': '310114', 16 | 'token': '', 17 | 'Content-Type': 'application/json; charset=UTF-8', 18 | # 'Content-Length': '2', 19 | 'Host': 'jdapi.shmedia.tech', 20 | 'Connection': 'Keep-Alive', 21 | 'Accept-Encoding': 'gzip', 22 | 'User-Agent': 'okhttp/4.10.0', 23 | 24 | } 25 | 26 | 27 | def get(url): 28 | res = requests.post(url=url, headers=headers).json() 29 | return res 30 | 31 | 32 | def post(url): 33 | res = requests.post(url=url, headers=headers).json() 34 | return res 35 | 36 | 37 | def post_body(url, body): 38 | body = json.dumps(body).encode(encoding='utf-8') 39 | res = requests.post(url=url, data=body, headers=headers).json() 40 | return res 41 | 42 | 43 | def get_person(): 44 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/personal/get" 45 | res = post(url) 46 | if res['code'] == 0: 47 | nickname = res['data']['nickname'] 48 | score = res['data']['score'] 49 | print(f'欢迎会员{nickname},目前积分:{score}') 50 | return f'会员{nickname},目前积分:{score}' 51 | 52 | 53 | def login(): 54 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/points/login/add" 55 | res = post(url) 56 | # pprint(res) 57 | if res['code'] == 0: 58 | print(f'登录成功') 59 | 60 | 61 | def sign(): 62 | body = {} 63 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/personal/score/sign" 64 | res = post_body(url, body) 65 | if res['code'] == 0: 66 | try: 67 | score = res['data']['score'] 68 | title = res['data']['title'] 69 | print(f"{title},获得{score}分") 70 | except: 71 | pass 72 | 73 | 74 | def get_tasklist(): 75 | body = {} 76 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/personal/score/info" 77 | res = post_body(url, body) 78 | # pprint(res) 79 | if res['code'] == 0: 80 | list = get_read_list() 81 | for i in res['data']['jobs']: 82 | id = i['id'] 83 | title = i['title'] 84 | print(id, title) 85 | if title == "阅读文章": 86 | for i in list: 87 | read_add() 88 | read(i) 89 | time.sleep(2) 90 | if title == "视听积分": 91 | list_radio = get_radio_list() 92 | for i in list_radio: 93 | radio_add() 94 | radio(i) 95 | time.sleep(2) 96 | 97 | 98 | def get_read_list(): 99 | list = [] 100 | body = {"channel": {"id": "9b84ad9dd9664184958bfe83c97d4073"}, "orderBy": "release_desc", "pageNo": 2, 101 | "pageSize": 10} 102 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/news/content/dynamic/list" 103 | res = post_body(url, body) 104 | # pprint(res) 105 | if res['code'] == 0: 106 | for displayDataList in res['data']['dataList']: 107 | for i in displayDataList["displayDataList"]: 108 | try: 109 | title = i['title'] 110 | id = i['id'] 111 | topLevel = i['topLevel'] 112 | print(title, id, topLevel) 113 | list.append([title, id, topLevel]) 114 | except: 115 | pass 116 | return list 117 | 118 | 119 | def read(list): 120 | body = {"liveStatus": "", "topLevel": list[2], "id": f"{list[1]}"} 121 | print(body) 122 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/news/content/get" 123 | res = post_body(url, body) 124 | if res['code'] == 0: 125 | channelName = res['data']['title'] 126 | shareUrl = res['data']['shareUrl'] 127 | title = res['data']['title'] 128 | titleImage = res['data']['displayResources'][0]['sourceUrl'] 129 | read_poster(channelName, shareUrl, title, titleImage) 130 | print(f"阅读{list[0]}成功") 131 | 132 | 133 | def read_poster(channelName, shareUrl, title, titleImage): 134 | body = {"channelName": channelName, "shareUrl": shareUrl, "summary": "123", "title": title, 135 | "titleImage": titleImage} 136 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/content/poster/url" 137 | res = post_body(url, body) 138 | if res['code'] == 0: 139 | pass 140 | 141 | 142 | def read_add(): 143 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/points/read/add" 144 | res = post(url) 145 | if res['code'] == 0: 146 | pass 147 | 148 | 149 | def get_radio_list(): 150 | list = [] 151 | body = {"channel": {"children": [], "contentType": "channel", "displayStyle": "short-video", "title": "嘉视频", 152 | "id": "9b6b474533e64789a31eb8ebb1bb49b9"}, "orderBy": "release_desc", "pageNo": 1, 153 | "pageSize": 10} 154 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/news/content/list" 155 | res = post_body(url, body) 156 | # pprint(res) 157 | if res['code'] == 0: 158 | for i in res['data']['records']: 159 | title = i['title'] 160 | id = i['id'] 161 | topLevel = i['topLevel'] 162 | print(title, id, topLevel) 163 | list.append([title, id, topLevel]) 164 | 165 | return list 166 | 167 | 168 | def radio_add(): 169 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/points/video/add" 170 | res = post(url) 171 | if res['code'] == 0: 172 | pass 173 | 174 | 175 | def radio(list): 176 | body = {"id": list[1]} 177 | print(body) 178 | url = "https://jdapi.shmedia.tech/media-basic-port/api/app/multimedia/drama/get" 179 | res = post_body(url, body) 180 | if res['code'] == 0: 181 | # channelName = res['data']['channel']['title'] 182 | # shareUrl = res['data']['shareUrl'] 183 | # title = res['data']['title'] 184 | # titleImage = res['data']['displayResources'][0]['sourceUrl'] 185 | # read_poster(channelName, shareUrl, title, titleImage) 186 | print(f"阅读{list[0]}成功") 187 | 188 | 189 | def webhook(message, webhook_token): 190 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 191 | headers = { 192 | 'Content-Type': 'application/json' 193 | 194 | } 195 | data = { 196 | "msgtype": "text", 197 | "text": { 198 | "content": message 199 | } 200 | } 201 | body = json.dumps(data).encode(encoding='utf-8') 202 | # headers = {'Content-Type': 'application/json'} 203 | response = requests.post(url=url, data=body, headers=headers).json() 204 | if response["errmsg"] == 'ok': 205 | print("企业微信推送成功") 206 | else: 207 | print("推送失败") 208 | 209 | 210 | if __name__ == '__main__': 211 | webhook_token = os.environ['QYWX_KEY'] 212 | shjdtokens = os.environ["shjdtoken"].split("\n") 213 | send_list = [] 214 | for token in shjdtokens: 215 | header1 = { 216 | 'token': token, 217 | } 218 | headers.update(header1) 219 | get_person() 220 | login() 221 | sign() 222 | get_tasklist() 223 | meg = get_person() 224 | send_list.append(meg) 225 | message = "上海嘉定积分推送: \n" + "\n".join(send_list) 226 | webhook(message, webhook_token) 227 | -------------------------------------------------------------------------------- /sjb.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | import json 3 | import os 4 | import re 5 | import hashlib 6 | import requests 7 | import time 8 | import random 9 | 10 | headers = { 11 | 'ua': '', 12 | 'Content-Type': 'application/x-www-form-urlencoded', 13 | 'Content-Length': '0', 14 | 'Host': 'mapi.shuijiaobao.cn', 15 | 'Connection': 'Keep-Alive', 16 | 'Accept-Encoding': 'gzip', 17 | 'User-Agent': 'okhttp/3.10.0', 18 | } 19 | 20 | 21 | # 签到 22 | def qiandao(): 23 | url2 = 'https://mapi.shuijiaobao.cn/home/sign' 24 | response = requests.get(url=url2, headers=headers).json() 25 | if response['ok'] == 1: 26 | qiandao_money = response['data']['sign_info']['sign_power_coin'] 27 | qiandao1 = f'签到成功,此次签到获得{qiandao_money}金币' 28 | print(f'签到成功,此次签到获得{qiandao_money}金币') 29 | return qiandao1 30 | else: 31 | print(response['msg']) 32 | return response['msg'] 33 | 34 | 35 | # 三餐 36 | def sancan(): 37 | url5 = "https://mapi.shuijiaobao.cn/sleep/dinnerCreate" 38 | response = requests.post(url=url5, headers=headers).json() 39 | # print(response) 40 | if response['ok'] == 1: 41 | coin = response['data']['gold_number'] 42 | coin_reward = f'此次共获得{coin}金币' 43 | print(f'此次共获得{coin}金币') 44 | return coin_reward 45 | else: 46 | print(response['msg']) 47 | return response['msg'] 48 | 49 | 50 | # 看视频 51 | def look_video(): 52 | total = [] 53 | for i in range(1, 9): 54 | url4 = "https://mapi.shuijiaobao.cn/task/dayReward" 55 | body1 = { 56 | 'type': '155', 57 | 'sign': '5072d87bd3146c6756d831ffd9ef5d42', 58 | 'timeStamp': '1640610096040' # int(time.time() * 1000) 59 | } 60 | response = requests.post(url=url4, headers=headers, data=body1).json() 61 | if response['ok'] == 1: 62 | coin = response['data']['user_info']['add_gold_coin'] 63 | total.append(int(coin)) 64 | print(f'此次看视频共获得{coin}金币') 65 | else: 66 | print(response['msg']) 67 | time.sleep(50) 68 | sum_coin = sum(total) 69 | sum_coin1 = f'此次看视频共获得{sum_coin}金币' 70 | return sum_coin1 71 | 72 | 73 | def sleep(): 74 | url = f'https://mapi.shuijiaobao.cn/sleep/createOrderSleep' 75 | response = requests.get(url=url, headers=headers).json() 76 | if response['ok'] == 1: 77 | print(response['msg']) 78 | return response['msg'] 79 | else: 80 | print(response['msg']) 81 | return response['msg'] 82 | 83 | 84 | # 领睡觉金币 85 | def sleep_coin(): 86 | try: 87 | data = [] 88 | data_coin = [] 89 | url7 = 'https://mapi.shuijiaobao.cn/home/user' 90 | response = requests.post(url=url7, headers=headers).json() 91 | # pprint.pprint(response) 92 | total_coin_data = response['data']['bubble_list'] 93 | for i in total_coin_data: 94 | gold_number = i['gold_number'] 95 | gold_id = i['id'] 96 | data.append([gold_number, gold_id]) 97 | for coin in data: 98 | url6 = 'https://mapi.shuijiaobao.cn/sleep/collectSleepGold' 99 | body = { 100 | 'number': coin[0], 101 | 'id': coin[1] 102 | } 103 | response = requests.post(url=url6, headers=headers, data=body).json() 104 | # pprint.pprint(response) 105 | if response['ok'] == 1: 106 | reward = response['data']['gold_number'] 107 | data_coin.append(reward) 108 | print(f'获得{reward}金币') 109 | else: 110 | print(response['msg']) 111 | coin_data = sum(data_coin) 112 | coin_data1 = f'此次看睡觉共获得{coin_data}金币' 113 | return coin_data1 114 | except Exception as e: 115 | print(e) 116 | 117 | 118 | def reward_all(): 119 | data_coin = [] 120 | url7 = 'https://mapi.shuijiaobao.cn/task/dayReward' 121 | data = [['152', '67d9f4ed65c750a93ac8bcdf7be79da9'], ['153', 'ed4f6f7a76782521681b034a5e09fb58']] 122 | for i in data: 123 | body_reward = { 124 | 'type': i[0], 125 | 'sign': i[1], 126 | 'timeStamp': '1640610096040' # f'{int(time.time() * 1000)}' 127 | } 128 | response = requests.post(url=url7, headers=headers, data=body_reward).json() 129 | # print(response) 130 | if response['ok'] == 1: 131 | coin = response['data']['user_info']['add_gold_coin'] 132 | data_coin.append(coin) 133 | else: 134 | print(response['msg']) 135 | # pprint.pprint(response) 136 | coin_data = sum(data_coin) 137 | coin_data1 = f'总睡觉和总进餐共获得{coin_data}金币' 138 | return coin_data1 139 | 140 | 141 | def total_money(): 142 | url2 = 'https://mapi.shuijiaobao.cn/user/userContent' 143 | response = requests.post(url=url2, headers=headers).json() 144 | # print(response) 145 | if response['ok'] == 1: 146 | reward = response['data']['userGold'] 147 | print(f'目前金币{reward}') 148 | return reward 149 | 150 | 151 | def accessToken(): 152 | url = 'https://mapi.shuijiaobao.cn/home/user' 153 | response = requests.post(url=url, headers=headers).json() 154 | # pprint.pprint(response) 155 | if response['ok'] == 1: 156 | token = response['data']['userInfo']['accessToken'] 157 | name_id1 = str(response['data']['userInfo']['id']) 158 | name1 = response['data']['userInfo']['name'] 159 | # print(token, name_id, name) 160 | return token, name_id1, name1 161 | 162 | 163 | def timeStamp(): 164 | url = 'https://mapi.shuijiaobao.cn/config/timeStamp' 165 | response = requests.post(url=url, headers=headers).json() 166 | # pprint.pprint(response) 167 | if response['ok'] == 1: 168 | time1 = response['data']['timeStamp'] 169 | return str(time1) 170 | 171 | 172 | def sign(token1, id1,time3): 173 | number = id1 + "49lfdkislkcsiT8A" + time3+ token1 174 | # print(number) 175 | md5 = hashlib.md5() 176 | md5.update(number.encode()) 177 | sign2 = md5.hexdigest()[0:32] 178 | return sign2 179 | 180 | 181 | def with_draw(sign2,time2): 182 | url4 = "https://mapi.shuijiaobao.cn/money/extract" 183 | body1 = { 184 | 'sign': sign2, 185 | 'type': '2', 186 | 'pay_type': '2', 187 | 'timeStamp': time2 188 | } 189 | 190 | response = requests.post(url=url4, headers=headers, data=body1).json() 191 | print(response['msg']) 192 | return response['msg'] 193 | 194 | 195 | def webhook(message,webhook_token): 196 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 197 | headers = { 198 | 'Content-Type': 'application/json' 199 | 200 | } 201 | data = { 202 | "msgtype": "text", 203 | "text": { 204 | "content": message 205 | } 206 | } 207 | body = json.dumps(data).encode(encoding='utf-8') 208 | # headers = {'Content-Type': 'application/json'} 209 | response = requests.post(url=url, data=body, headers=headers).json() 210 | if response["errmsg"] == 'ok': 211 | print("企业微信推送成功") 212 | else: 213 | print("推送失败") 214 | # except Exception as e: 215 | # print(e) 216 | 217 | 218 | if __name__ == '__main__': 219 | print('----------开始睡觉宝任务-----------------') 220 | start_time = datetime.datetime.now().strftime('%H') 221 | webhook_token = os.environ['QYWX_KEY'] 222 | account = os.environ['sjbck'].split('@') 223 | for ua in range(len(account)): 224 | headers1 = { 225 | 'ua': account[ua], 226 | } 227 | headers.update(headers1) 228 | accessToken1, name_id, name = accessToken() 229 | print(f"------正在进行账号{name}的睡觉宝任务-------") 230 | begin_task = int(total_money()) 231 | if start_time == '01': 232 | # print('1') 233 | data = look_video() 234 | elif start_time == '07': 235 | # print('2') 236 | qiandao2 = qiandao() 237 | time.sleep(7) 238 | sansan2 = sancan() 239 | data = qiandao2 + sansan2 240 | 241 | elif start_time == '12': 242 | # print('7') 243 | time.sleep(10) 244 | sleep1 = sleep_coin() 245 | sancan2 = sancan() 246 | time.sleep(10) 247 | sleep() 248 | data = sleep1 + sancan2 249 | elif start_time == '20': 250 | sleep1 = sleep_coin() 251 | time.sleep(3) 252 | # print('6') 253 | sleep() 254 | data = sleep1 255 | elif start_time == '21': 256 | # print('5') 257 | sancan2 = sancan() 258 | time.sleep(6) 259 | reward_all1 = reward_all() 260 | data = sancan2 + reward_all1 261 | finish_task = int(total_money()) 262 | last_coin = finish_task - begin_task 263 | message = f'睡觉宝任务:\n{data},总金币{finish_task}' 264 | webhook(message,webhook_token) 265 | print(f'此次任务共获得{last_coin},总金币{finish_task}') 266 | if finish_task >= 10000: 267 | time2 = timeStamp() 268 | sign2 = sign(accessToken1, name_id,time2) 269 | data = with_draw(sign2,time2) 270 | print(data) 271 | message = f'{data}' 272 | webhook(message,webhook_token) 273 | 274 | print('-----------睡觉宝任务结束-------------') 275 | -------------------------------------------------------------------------------- /soy_variable_data.js: -------------------------------------------------------------------------------- 1 | //添加账号后需要在后面添加一个逗号(英文输入法的), 2 | 3 | //最后一个账号后面是没有逗号的 4 | 5 | //变量不能使用单引号引起 6 | 7 | module.exports = {"code":200, 8 | 9 | "variable_data":{ 10 | 11 | "kyin":[//这里是脚本标识,下面的 kyin 就是给快音脚本使用的标识 12 | 13 | "ff668ac51ae0c803&eyJleHAiOjE2NTQ5MTkwNjEsImtpZCI6MCwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOiI4ODgyNTIwNiIsIm9wZW5pZCI6Im9ZYlZMeExnZThibWFINFhvSVQyMDdQWlJyV3ciLCJleHAiOjE2NTQ5MTkwNjF9.z7QV2gTs2U4tc9OyX02i6kCpw3H7qo7vfQWGe4Itx-g&eyJleHAiOjE2NjI2OTMyNjEsImFsZyI6IkhTMjU2In0.eyJ1aWQiOiI4ODgyNTIwNiIsIm9wZW5pZCI6Im9ZYlZMeExnZThibWFINFhvSVQyMDdQWlJyV3ciLCJleHAiOjE2NjI2OTMyNjF9.7CESzUCev6obxvP-vJWQw1elM2Jcj2jAlzoN6ORiy40" 14 | 15 | 16 | ]} 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /xinjieto.py: -------------------------------------------------------------------------------- 1 | import os 2 | import random 3 | from pprint import pprint 4 | from urllib.parse import urlencode 5 | 6 | import requests 7 | import time 8 | import hashlib 9 | 10 | headers = { 11 | 'Host': 'wechatsupport.seagate.cn', 12 | 'Connection': 'keep-alive', 13 | # 'Content-Length': '56', 14 | 'charset': 'utf-8', 15 | 'v': '1.52', 16 | 'sign': '5f55f750bb1a7aae49bbc562008a2af4', 17 | 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; Pixel 4 Build/QD1A.190821.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4296 MMWEBSDK/20220505 Mobile Safari/537.36 MMWEBID/5067 MicroMessenger/8.0.23.2160(0x28001756) WeChat/arm32 Weixin NetType/WIFI Language/zh_CN ABI/arm64 MiniProgramEnv/android', 18 | 'content-type': 'application/x-www-form-urlencoded', 19 | 'time': '1661237817', 20 | 'Accept-Encoding': 'gzip,compress,br,deflate', 21 | 'token': 'c409004a20e648123a4ae889e2faf321', 22 | 'Referer': 'https://servicewechat.com/wx0665fbab06a9d1a8/136/page-frame.html', 23 | } 24 | 25 | 26 | def request_get(url): 27 | response = requests.post(url=url, headers=headers) 28 | return response 29 | 30 | 31 | def request_post(url, body=''): 32 | response = requests.post(url=url, headers=headers, data=body) 33 | return response 34 | 35 | 36 | def get_sign(token=''): 37 | d = 'eb0a191797624dd3a48fa681d3061212' 38 | time1 = str(int(time.time())) 39 | v = '1.52' 40 | if token != '': 41 | sign = f'{v}{time1}{token}v%3D%3D1.52eb0a191797624dd3a48fa681d3061212' 42 | print(sign) 43 | md5 = hashlib.md5() 44 | md5.update(sign.encode()) 45 | sign2 = md5.hexdigest()[0:32] 46 | headers1 = { 47 | # 'User-Agent': ua1, 48 | 'sign': sign2, 49 | 'time': time1 50 | } 51 | headers.update(headers1) 52 | else: 53 | sign = v + time1 + d 54 | md5 = hashlib.md5() 55 | md5.update(sign.encode()) 56 | sign2 = md5.hexdigest()[0:32] 57 | headers1 = { 58 | # 'User-Agent': ua1, 59 | 'sign': sign2, 60 | 'time': time1 61 | } 62 | headers.update(headers1) 63 | print(sign2) 64 | # return sign2, time1 65 | 66 | 67 | def get_configs(): 68 | get_sign() 69 | 70 | url = 'https://wechatsupport.seagate.cn/sg/api.member/configs?v=1.52' 71 | # response = requests.post(url=url, headers=headers).json() 72 | response = request_get(url).json() 73 | print(response) 74 | 75 | 76 | def get_home(): 77 | get_sign() 78 | 79 | url = 'https://wechatsupport.seagate.cn/sg/api.member/home?v=1.52' 80 | # response = requests.post(url=url, headers=headers).json() 81 | response = request_get(url).json() 82 | print(response) 83 | 84 | 85 | def get_chkAuth(token): 86 | get_sign(token) 87 | url = 'https://wechatsupport.seagate.cn/sg/api.member/chkAuth' 88 | # response = requests.post(url=url, headers=headers).json() 89 | body = { 90 | 'v': '1.52' 91 | } 92 | 93 | body = urlencode(body) 94 | response = request_post(url, body).json() 95 | pprint(response) 96 | 97 | 98 | def get_code2session(): 99 | # d = 'eb0a191797624dd3a48fa681d3061212' 100 | time1 = str(int(time.time())) 101 | v = '1.52' 102 | sign = f'{v}{time1}code%3D%3D0239mFFa1pZ6LD0xrUHa16sJzS09mFFxmini_scene%3D%3Dv%3D%3D1.52eb0a191797624dd3a48fa681d3061212' 103 | md5 = hashlib.md5() 104 | md5.update(sign.encode()) 105 | sign2 = md5.hexdigest()[0:32] 106 | headers1 = { 107 | # 'User-Agent': ua1, 108 | 'sign': sign2, 109 | 'time': time1 110 | } 111 | headers.update(headers1) 112 | url = 'https://wechatsupport.seagate.cn/sg/api.member/code2session' 113 | # response = requests.post(url=url, headers=headers).json() 114 | body = { 115 | 'code': '0239mFFa1pZ6LD0xrUHa16sJzS09mFFx', 116 | 'mini_scene': '', 117 | 'v': '1.52' 118 | } 119 | 120 | body = urlencode(body) 121 | response = request_post(url, body).json() 122 | pprint(response) 123 | 124 | 125 | def get_srstoken(token): 126 | get_sign(token) 127 | url = 'https://wechatsupport.seagate.cn/sg/api.member/srsToken' 128 | # response = requests.post(url=url, headers=headers).json() 129 | body = { 130 | 'v': '1.52' 131 | } 132 | 133 | body = urlencode(body) 134 | response = request_post(url, body).json() 135 | pprint(response) 136 | # if response['code'] == 1: 137 | 138 | 139 | def get_redirectTrack(token): 140 | get_sign(token) 141 | url = 'https://wechatsupport.seagate.cn/sg/api.member/redirectTrack' 142 | # response = requests.post(url=url, headers=headers).json() 143 | body = { 144 | 'type': 'scan', 145 | 'page': '', 146 | 'v': '1.52' 147 | } 148 | 149 | body = urlencode(body) 150 | response = request_post(url, body).json() 151 | pprint(response) 152 | 153 | 154 | def get_signin(): 155 | get_sign() 156 | 157 | url = 'https://wechatsupport.seagate.cn/sg/api.member/signIn?v=1.52' 158 | # response = requests.post(url=url, headers=headers).json() 159 | response = request_get(url).json() 160 | if response['code'] == 1: 161 | print(f'签到获得{response["data"]["today_point"]}') 162 | else: 163 | pprint(response['info']) 164 | 165 | 166 | def get_page(): 167 | get_sign() 168 | url = 'https://wechatsupport.seagate.cn/sg/api.member/news?page=1&page_size=10&name=&v=1.52' 169 | # response = requests.post(url=url, headers=headers).json() 170 | response = request_get(url).json() 171 | page_list = [] 172 | if response['code'] == 1: 173 | for i in response['data']['list']: 174 | id = i['id'] 175 | short_title = i['short_title'] 176 | page_list.append([id, short_title]) 177 | # print(id,short_title) 178 | return page_list 179 | 180 | 181 | def get_watch_point(page_list): 182 | for i in range(2): 183 | get_sign() 184 | title = random.choice(page_list) 185 | url = f'https://wechatsupport.seagate.cn/sg/api.member/watchVideo?video_id={title[0]}&v=1.52' 186 | # response = requests.post(url=url, headers=headers).json() 187 | response = request_get(url).json() 188 | # pprint(response) 189 | if response['code'] == 1: 190 | reward = response['data']["point_tip"] 191 | print(f'看文章:{title[1]}获得{reward}') 192 | time.sleep(5) 193 | 194 | 195 | def get_share(page_list): 196 | for i in range(2): 197 | get_sign() 198 | title = random.choice(page_list) 199 | url = f'https://wechatsupport.seagate.cn/sg/api.member/shareSuccess?id={title[0]}&v=1.52' 200 | # response = requests.post(url=url, headers=headers).json() 201 | response = request_get(url).json() 202 | # pprint(response) 203 | if response['code'] == 1: 204 | reward = response['data']["point_tip"] 205 | print(f'分享文章:{title[1]}获得{reward}') 206 | time.sleep(5) 207 | 208 | 209 | def get_info(token): 210 | get_sign(token) 211 | url = f'https://wechatsupport.seagate.cn/sg/api.member/myHome' 212 | body = { 213 | 'v': '1.52' 214 | } 215 | # pprint(headers) 216 | body = urlencode(body) 217 | response = request_post(url, body).json() 218 | if response['code'] == 1: 219 | name = response['data']['account']['nickname'] 220 | score = response['data']['account']['vip_point'] 221 | pprint(f"账号{name}目前{score}积分") 222 | # if response['code'] == 1: 223 | 224 | 225 | 226 | 227 | if __name__ == '__main__': 228 | tokens = os.environ["xjtoken"] 229 | tokens = tokens.split('@') 230 | for token in tokens: 231 | headers1 = { 232 | # 'User-Agent': ua1, 233 | 'token': token, 234 | # 'time': time1 235 | } 236 | headers.update(headers1) 237 | get_signin() 238 | page_list = get_page() 239 | get_watch_point(page_list) 240 | get_share(page_list) 241 | get_info(token) 242 | -------------------------------------------------------------------------------- /ylw.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 10 8 * * * 3 | const $ = new Env("阅隆湾") 4 | """ 5 | import random 6 | from hashlib import sha256 7 | import hmac, urllib.parse 8 | import json 9 | import os 10 | from urllib.parse import quote_plus 11 | from pprint import pprint 12 | import requests 13 | import base64, time 14 | from Crypto.PublicKey import RSA 15 | from Crypto.Cipher import PKCS1_v1_5 as Cipher_pkcs1_v1_5 16 | 17 | 18 | # headers = { 19 | # 20 | # } 21 | 22 | 23 | def get(url, headers): 24 | res = requests.get(url=url, headers=headers).json() 25 | return res 26 | 27 | 28 | def post(url, headers): 29 | res = requests.post(url=url, headers=headers).json() 30 | return res 31 | 32 | 33 | # def post_body(url, body): 34 | # body = json.dumps(body).encode(encoding='utf-8') 35 | # res = requests.post(url=url, data=body, headers=headers).json() 36 | # return res 37 | 38 | 39 | def get_HmacSHA256(data): 40 | key = "fPfdqGwWwuAtDm4nR95Y" 41 | key = key.encode('utf-8') 42 | message = data.encode('utf-8') 43 | sign = hmac.new(key, message, digestmod=sha256).hexdigest() 44 | print(sign) 45 | return sign 46 | 47 | 48 | def rsa_encrypt(text): 49 | pubkey = '''-----BEGIN PUBLIC KEY----- 50 | MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD6XO7e9YeAOs+cFqwa7ETJ+WXi 51 | zPqQeXv68i5vqw9pFREsrqiBTRcg7wB0RIp3rJkDpaeVJLsZqYm5TW7FWx/iOiXF 52 | c+zCPvaKZric2dXCw27EvlH5rq+zwIPDAJHGAfnn1nmQH7wR3PCatEIb8pz5GFlT 53 | HMlluw4ZYmnOwg+thwIDAQAB 54 | -----END PUBLIC KEY-----''' 55 | # text = "3FB276EB0DE6CE91ABD80273F1295578A82EAC22410AB6C6F340765A8367257E" 56 | # pubkey = '-----BEGIN PUBLIC KEY-----\n' + p_key + '\n-----END PUBLIC KEY-----' 这种写法也可以, 注意的是要加'\n'来换行 57 | rsakey = RSA.importKey(pubkey.encode()) 58 | ciper = Cipher_pkcs1_v1_5.new(rsakey) 59 | en_data = base64.b64encode(ciper.encrypt(text.encode())).decode() 60 | return en_data 61 | 62 | 63 | def sha256_secret_str(plainText): 64 | plainTextBytes = plainText.encode('utf-8') # 字符串在哈希之前,需要编码 65 | encryptor = sha256() 66 | encryptor.update(plainTextBytes) 67 | hashCode = encryptor.hexdigest() 68 | return hashCode 69 | 70 | 71 | def get_code(number, password): 72 | password = rsa_encrypt(password) 73 | data = f"post%%/web/oauth/credential_auth?client_id=10008&password={password}&phone_number={number}%%e2c7ecf7-d05f-4b3a-8973-8a7b02dd9c9d%%" 74 | url = f"https://passport.tmuyun.com/web/oauth/credential_auth" 75 | X_SIGNATURE = get_HmacSHA256(data) 76 | headers = { 77 | 'Cache-Control': 'no-cache', 78 | 'User-Agent': 'ANDROID;10;10008;1.7.0;1.0;null;Pixel 4', 79 | 'X-REQUEST-ID': 'e2c7ecf7-d05f-4b3a-8973-8a7b02dd9c9d', 80 | 'X-SIGNATURE': X_SIGNATURE, 81 | 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8', 82 | 'COOKIE': 'SESSION=ZjZkZGI0ZGItNzY3ZC00OWNjLWI2NGUtMjAxOTM2OWJhNDBm; Path=/; HttpOnly; SameSite=Lax', 83 | 'Host': 'passport.tmuyun.com', 84 | 'Connection': 'Keep-Alive', 85 | 'Accept-Encoding': 'gzip', 86 | # 'Content-Length': '236', 87 | } 88 | 89 | data = { 90 | "client_id": "10008", 91 | "password": password, 92 | "phone_number": number, 93 | } 94 | redata = urllib.parse.urlencode(data) 95 | res = requests.post(url, headers=headers, data=redata).json() 96 | if res["code"] == 0: 97 | code = res["data"]["authorization_code"]["code"] 98 | print(code) 99 | return code 100 | 101 | 102 | def get_login(code): 103 | time1 = str(int(time.time() * 1000)) 104 | data = f"/api/zbtxz/login&&63f0aabe81336f75c4036315&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 105 | url = f"https://vapp.tmuyun.com/api/zbtxz/login" 106 | print(url) 107 | X_SIGNATURE = sha256_secret_str(data) 108 | headers = { 109 | 'X-SESSION-ID': '63f0aabe81336f75c4036315', 110 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 111 | 'X-TIMESTAMP': time1, 112 | 'X-SIGNATURE': X_SIGNATURE, 113 | 'X-TENANT-ID': '51', 114 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 115 | 'Cache-Control': 'no-cache', 116 | 'Content-Type': 'application/x-www-form-urlencoded', 117 | 'Host': 'vapp.tmuyun.com', 118 | 'Connection': 'Keep-Alive', 119 | 'Accept-Encoding': 'gzip', 120 | 121 | } 122 | 123 | data = { 124 | "code": code, 125 | "token": '', 126 | "type": '-1', 127 | "union_id": '', 128 | } 129 | redata = urllib.parse.urlencode(data) 130 | res = requests.post(url, headers=headers, data=redata).json() 131 | if res["code"] == 0: 132 | nick_name = res["data"]["account"]["nick_name"] 133 | mobile = res["data"]["account"]["mobile"] 134 | id = res["data"]["session"]["id"] 135 | # print(id) 136 | print(f"欢迎电话号码为{mobile},读友为{nick_name}") 137 | return id 138 | 139 | 140 | def get_sign(id): 141 | time1 = str(int(time.time() * 1000)) 142 | data = f"/api/user_mumber/sign&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 143 | url = "https://vapp.tmuyun.com/api/user_mumber/sign" 144 | X_SIGNATURE = sha256_secret_str(data) 145 | headers = { 146 | 'X-SESSION-ID': id, 147 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 148 | 'X-TIMESTAMP': time1, 149 | 'X-SIGNATURE': X_SIGNATURE, 150 | 'X-TENANT-ID': '51', 151 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 152 | 'Cache-Control': 'no-cache', 153 | 'Content-Type': 'application/x-www-form-urlencoded', 154 | 'Host': 'vapp.tmuyun.com', 155 | 'Connection': 'Keep-Alive', 156 | 'Accept-Encoding': 'gzip', 157 | 158 | } 159 | 160 | res = requests.get(url, headers=headers).json() 161 | if res["code"] == 0: 162 | serialdays = res['data']["serialdays"] 163 | signIntegral = res['data']["signIntegral"] 164 | print(f"签到第{serialdays}天,获得{signIntegral}积分") 165 | else: 166 | print(res) 167 | 168 | 169 | def get_do_task(id, memberType): 170 | time1 = str(int(time.time() * 1000)) 171 | data = f"/api/user_mumber/doTask&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 172 | url = "https://vapp.tmuyun.com/api/user_mumber/doTask" 173 | X_SIGNATURE = sha256_secret_str(data) 174 | headers = { 175 | 'X-SESSION-ID': id, 176 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 177 | 'X-TIMESTAMP': time1, 178 | 'X-SIGNATURE': X_SIGNATURE, 179 | 'X-TENANT-ID': '51', 180 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 181 | 'Cache-Control': 'no-cache', 182 | 'Content-Type': 'application/x-www-form-urlencoded', 183 | 'Host': 'vapp.tmuyun.com', 184 | 'Connection': 'Keep-Alive', 185 | 'Accept-Encoding': 'gzip', 186 | 187 | } 188 | data = { 189 | "memberType": memberType, 190 | "member_type": memberType, 191 | } 192 | redata = urllib.parse.urlencode(data) 193 | res = requests.post(url, headers=headers, data=redata).json() 194 | return res 195 | # # pprint(res) 196 | # if res["code"] == 0: 197 | # experience = res['data']["experience"] 198 | # # signIntegral = res['data']["signIntegral"] 199 | # print(f"完成{name}任务成功,获得{experience}积分") 200 | # else: 201 | # print(res) 202 | 203 | 204 | def get_task_list(id): 205 | time1 = str(int(time.time() * 1000)) 206 | data = f"/api/user_mumber/numberCenter&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 207 | url = "https://vapp.tmuyun.com/api/user_mumber/numberCenter?is_new=1" 208 | X_SIGNATURE = sha256_secret_str(data) 209 | headers = { 210 | 'X-SESSION-ID': id, 211 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 212 | 'X-TIMESTAMP': time1, 213 | 'X-SIGNATURE': X_SIGNATURE, 214 | 'X-TENANT-ID': '51', 215 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 216 | 'Cache-Control': 'no-cache', 217 | 'Content-Type': 'application/x-www-form-urlencoded', 218 | 'Host': 'vapp.tmuyun.com', 219 | 'Connection': 'Keep-Alive', 220 | 'Accept-Encoding': 'gzip', 221 | 222 | } 223 | 224 | res = requests.get(url, headers=headers).json() 225 | if res["code"] == 0: 226 | cur_experience = res["data"]["rst"]["cur_experience"] 227 | print(f"目前积分为{cur_experience}") 228 | for i in res['data']['rst']['user_task_list']: 229 | name = i['name'] 230 | member_task_type = i['member_task_type'] 231 | print(name, member_task_type) 232 | 233 | if name == '分享资讯给好友': 234 | for i in range(3): 235 | res = get_do_task(id, member_task_type) 236 | time.sleep(5) 237 | # pprint(res) 238 | if len(res) != 1: 239 | experience = res['data']['score_notify']["experience"] 240 | # signIntegral = res['data']["signIntegral"] 241 | print(f"完成{name}任务成功,获得{experience}积分") 242 | elif name == '使用本地服务': 243 | res = get_do_task(id, member_task_type) 244 | # pprint(res) 245 | if len(res) != 1: 246 | experience = res['data']['score_notify']["experience"] 247 | # signIntegral = res['data']["signIntegral"] 248 | print(f"完成{name}任务成功,获得{experience}积分") 249 | time.sleep(5) 250 | elif name == '邀请好友': 251 | pass 252 | elif name == '新闻资讯阅读': 253 | get_read_list(id) 254 | else: 255 | pass 256 | 257 | 258 | def get_read_list(id): 259 | time1 = str(int(time.time() * 1000)) 260 | data = f"/api/article/channel_list&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 261 | page_number = [10, 20, 30, 40, 50, 60, 70, 80, 90] 262 | page = random.choice(page_number) 263 | print(page) 264 | url = f"https://vapp.tmuyun.com/api/article/channel_list?channel_id=62c53767373c550ecabd9d6a&isDiFangHao=false&is_new=true&list_count={page}&size=10" 265 | X_SIGNATURE = sha256_secret_str(data) 266 | headers = { 267 | 'X-SESSION-ID': id, 268 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 269 | 'X-TIMESTAMP': time1, 270 | 'X-SIGNATURE': X_SIGNATURE, 271 | 'X-TENANT-ID': '51', 272 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 273 | 'Cache-Control': 'no-cache', 274 | 'Content-Type': 'application/x-www-form-urlencoded', 275 | 'Host': 'vapp.tmuyun.com', 276 | 'Connection': 'Keep-Alive', 277 | 'Accept-Encoding': 'gzip', 278 | 279 | } 280 | res = get(url, headers) 281 | number = 1 282 | if res["code"] == 0: 283 | for i in res['data']['article_list']: 284 | doc_title = i['doc_title'] 285 | title_id = i['id'] 286 | print(doc_title, title_id) 287 | get_read(id, title_id, doc_title) 288 | time.sleep(2) 289 | get_like(id, title_id, doc_title) 290 | time.sleep(2) 291 | get_comment(id, title_id, doc_title) 292 | time.sleep(5) 293 | number += 1 294 | if number == 4: 295 | return 296 | 297 | else: 298 | print(res) 299 | 300 | 301 | def get_read(id, page_id, name): 302 | time1 = str(int(time.time() * 1000)) 303 | data = f"/api/article/detail&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 304 | url = f"https://vapp.tmuyun.com/api/article/detail?id={page_id}" 305 | X_SIGNATURE = sha256_secret_str(data) 306 | headers = { 307 | 'X-SESSION-ID': id, 308 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 309 | 'X-TIMESTAMP': time1, 310 | 'X-SIGNATURE': X_SIGNATURE, 311 | 'X-TENANT-ID': '51', 312 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 313 | 'Cache-Control': 'no-cache', 314 | 'Content-Type': 'application/x-www-form-urlencoded', 315 | 'Host': 'vapp.tmuyun.com', 316 | 'Connection': 'Keep-Alive', 317 | 'Accept-Encoding': 'gzip', 318 | 319 | } 320 | res = get(url, headers) 321 | if res["code"] == 0: 322 | print(f"阅读{name}文章成功") 323 | time.sleep(5) 324 | else: 325 | print(res) 326 | 327 | 328 | def get_like(id, page_id, name): 329 | time1 = str(int(time.time() * 1000)) 330 | data = f"/api/favorite/like&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 331 | url = "https://vapp.tmuyun.com/api/favorite/like" 332 | X_SIGNATURE = sha256_secret_str(data) 333 | headers = { 334 | 'X-SESSION-ID': id, 335 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 336 | 'X-TIMESTAMP': time1, 337 | 'X-SIGNATURE': X_SIGNATURE, 338 | 'X-TENANT-ID': '51', 339 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 340 | 'Cache-Control': 'no-cache', 341 | 'Content-Type': 'application/x-www-form-urlencoded', 342 | 'Host': 'vapp.tmuyun.com', 343 | 'Connection': 'Keep-Alive', 344 | 'Accept-Encoding': 'gzip', 345 | 346 | } 347 | data = { 348 | "action": True, 349 | "id": page_id, 350 | } 351 | redata = urllib.parse.urlencode(data) 352 | res = requests.post(url, headers=headers, data=redata).json() 353 | # pprint(res) 354 | if res["code"] == 0: 355 | print(f"完成{name}点赞任务成功") 356 | time.sleep(5) 357 | else: 358 | print(res) 359 | 360 | 361 | def get_comment(id, page_id, name): 362 | time1 = str(int(time.time() * 1000)) 363 | data = f"/api/comment/create&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 364 | url = "https://vapp.tmuyun.com/api/comment/create" 365 | X_SIGNATURE = sha256_secret_str(data) 366 | comment = ['不错', '好', '点赞', '值得期待', '推荐', '对', '很好', '真棒', '优秀', '赞'] 367 | comment_1 = random.choice(comment) 368 | headers = { 369 | 'X-SESSION-ID': id, 370 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 371 | 'X-TIMESTAMP': time1, 372 | 'X-SIGNATURE': X_SIGNATURE, 373 | 'X-TENANT-ID': '51', 374 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 375 | 'Cache-Control': 'no-cache', 376 | 'Content-Type': 'application/x-www-form-urlencoded', 377 | 'Host': 'vapp.tmuyun.com', 378 | 'Connection': 'Keep-Alive', 379 | 'Accept-Encoding': 'gzip', 380 | 381 | } 382 | data = { 383 | "channel_article_id": page_id, 384 | "content": quote_plus(comment_1), 385 | } 386 | redata = urllib.parse.urlencode(data) 387 | res = requests.post(url, headers=headers, data=redata).json() 388 | # pprint(res) 389 | if res["code"] == 0: 390 | print(f"完成{name}评论任务成功") 391 | time.sleep(5) 392 | else: 393 | print(res) 394 | 395 | 396 | def get_score(id): 397 | time1 = str(int(time.time() * 1000)) 398 | data = f"/api/user_mumber/numberCenter&&{id}&&0a85af96-8dc0-44b6-96ab-9f1c6727e289&&{time1}&&FR*r!isE5W&&51" 399 | url = "https://vapp.tmuyun.com/api/user_mumber/numberCenter?is_new=1" 400 | X_SIGNATURE = sha256_secret_str(data) 401 | headers = { 402 | 'X-SESSION-ID': id, 403 | 'X-REQUEST-ID': '0a85af96-8dc0-44b6-96ab-9f1c6727e289', 404 | 'X-TIMESTAMP': time1, 405 | 'X-SIGNATURE': X_SIGNATURE, 406 | 'X-TENANT-ID': '51', 407 | 'User-Agent': '1.7.0;00000000-6641-8422-0000-00006963f438;Google Pixel 4;Android;10;tencent', 408 | 'Cache-Control': 'no-cache', 409 | 'Content-Type': 'application/x-www-form-urlencoded', 410 | 'Host': 'vapp.tmuyun.com', 411 | 'Connection': 'Keep-Alive', 412 | 'Accept-Encoding': 'gzip', 413 | 414 | } 415 | 416 | res = requests.get(url, headers=headers).json() 417 | if res["code"] == 0: 418 | cur_experience = res["data"]["rst"]["cur_experience"] 419 | print(f"目前积分为{cur_experience}") 420 | return cur_experience 421 | 422 | 423 | def webhook(message, webhook_token): 424 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 425 | headers = { 426 | 'Content-Type': 'application/json' 427 | 428 | } 429 | data = { 430 | "msgtype": "text", 431 | "text": { 432 | "content": message 433 | } 434 | } 435 | body = json.dumps(data).encode(encoding='utf-8') 436 | # headers = {'Content-Type': 'application/json'} 437 | response = requests.post(url=url, data=body, headers=headers).json() 438 | if response["errmsg"] == 'ok': 439 | print("企业微信推送成功") 440 | else: 441 | print("推送失败") 442 | 443 | 444 | if __name__ == '__main__': 445 | webhook_token = os.environ['QYWX_KEY'] 446 | tokens = os.environ["ylwtoken"].split("\n") 447 | message = "" 448 | for i in tokens: 449 | count = i.split("#") 450 | number = count[0] 451 | password = count[1] 452 | code = get_code(number, password) 453 | id = get_login(code) 454 | get_sign(id) 455 | get_task_list(id) 456 | score = get_score(id) 457 | message += f"账号{number},目前有{score}积分" 458 | webhook(message, webhook_token) 459 | -------------------------------------------------------------------------------- /zippo.js: -------------------------------------------------------------------------------- 1 | /* 2 | 微信小程序 zippo会员中心 3 | 4 | 使用类来实现的版本, 包含了简单的类继承 5 | 6 | cron: 1 7,19 * * * 7 | */ 8 | const $ = new Env('zippo会员中心'); 9 | const got = require('got'); 10 | 11 | const envPrefix = 'zippo' 12 | const envSplitor = ['\n','&','@'] //支持多种分割,但要保证变量里不存在这个字符 13 | const ckNames = [envPrefix+'Cookie'] //可以支持多变量 14 | 15 | const MAX_THREAD = parseInt(process.env[envPrefix+'Thread']) || 50; //默认最大并发数 16 | const DEFAULT_TIMEOUT=8000, DEFAULT_RETRY=3; 17 | 18 | //这里配置了一些常量, 不需要后面每次重新写了 19 | const default_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x1800202f) NetType/WIFI Language/zh_CN'; 20 | const Referer = 'https://servicewechat.com/wxaa75ffd8c2d75da7/56/page-frame.html'; 21 | const appid = 'wxaa75ffd8c2d75da7'; 22 | 23 | class BasicClass { 24 | constructor() { 25 | this.index = $.userIdx++; 26 | this.name = ''; 27 | this.valid = true; 28 | 29 | //设置got的默认超时等参数 30 | this.got = got.extend({ 31 | retry: {limit:0}, 32 | timeout: DEFAULT_TIMEOUT, 33 | followRedirect: false, 34 | }) 35 | } 36 | //给每个账户打印前面加上自己的名字 37 | log(msg, opt = {}) { 38 | var m = '', n = $.userCount.toString().length;; 39 | if (this.index) m += `账号[${$.padStr(this.index,n)}]`; 40 | if (this.name) m += `[${this.name}]`; 41 | $.log(m + msg, opt); 42 | } 43 | //使用自己的got实例发包,可以实现设置每个账号自己的默认UA等 44 | async request(opt) { 45 | var resp = null, count = 0; 46 | var fn = opt.fn || opt.url; 47 | opt.method = opt?.method?.toUpperCase() || 'GET'; 48 | while (count++ < DEFAULT_RETRY) { 49 | try { 50 | var err = null; 51 | const errcodes = ['ECONNRESET', 'EADDRINUSE', 'ENOTFOUND', 'EAI_AGAIN']; 52 | await this.got(opt).then(t => { 53 | resp = t 54 | }, e => { 55 | err = e; 56 | resp = e.response; 57 | }); 58 | if(err) { 59 | if(err.name == 'TimeoutError') { 60 | this.log(`[${fn}]请求超时(${err.code}),重试第${count}次`); 61 | } else if(errcodes.includes(err.code)) { 62 | this.log(`[${fn}]请求错误(${err.code}),重试第${count}次`); 63 | } else { 64 | let statusCode = resp?.statusCode || -1; 65 | this.log(`[${fn}]请求错误(${err.message}), 返回[${statusCode}]`); 66 | break; 67 | } 68 | } else { 69 | break; 70 | } 71 | } catch (e) { 72 | this.log(`[${fn}]请求错误(${e.message}),重试第${count}次`); 73 | }; 74 | } 75 | let {statusCode=-1,headers=null,body=null} = resp; 76 | if (body) try {body = JSON.parse(body);} catch {}; 77 | return {statusCode,headers,result:body}; 78 | } 79 | } 80 | let http = new BasicClass(); 81 | 82 | class UserClass extends BasicClass { 83 | constructor(ck) { 84 | super() 85 | let info = ck.split('#'); 86 | this.openid = info[0]; 87 | this.session_key = decodeURIComponent(info[1]); 88 | this.point = 0; 89 | 90 | this.got = this.got.extend({ 91 | headers:{ 92 | Connection:'keep-alive', 93 | 'User-Agent': default_UA, 94 | Referer, 95 | }, 96 | }) 97 | } 98 | 99 | async ininttask() { 100 | this.valid = false; 101 | try { 102 | let options = { 103 | fn: 'ininttask', 104 | method: 'post', 105 | url: `https://membercenter.zippo.com.cn/s2/interface/data.aspx`, 106 | searchParams: { 107 | action: 'ininttask', 108 | }, 109 | form: { 110 | openid: this.openid, 111 | session_key: this.session_key, 112 | unionid: '', 113 | appid, 114 | }, 115 | } 116 | let {result} = await this.request(options) 117 | if(result?.errcode == 0) { 118 | this.valid = true; 119 | for(let task of (result?.data?.task || [])) { 120 | switch(task.title) { 121 | case '签到': 122 | this.log(`今天${task.task_status==0?'未':'已'}签到`); 123 | if(task.task_status==0) { 124 | await this.signin(); 125 | } 126 | break; 127 | default: 128 | let str = task.task_status==0 ? '未完成' : (task.task_status==1 ? '已完成未领取奖励' : '已领取奖励'); 129 | this.log(`任务[${task.title}] -- ${str}`); 130 | switch(Number(task.task_status)) { 131 | case 0: 132 | await this.dotask(task,1); 133 | //注意这里没有了break, 那么脚本会继续往下走直至遇到break, 也就是会自动执行 await this.dotask(task,2) 134 | case 1: 135 | await this.dotask(task,2); 136 | break; 137 | default: 138 | break; 139 | } 140 | break; 141 | } 142 | } 143 | } else { 144 | this.log(`查询账号任务失败`); 145 | } 146 | } catch (e) { 147 | console.log(e) 148 | } 149 | } 150 | 151 | async signin() { 152 | try { 153 | let options = { 154 | fn: 'signin', 155 | method: 'post', 156 | url: `https://membercenter.zippo.com.cn/s2/interface/data.aspx`, 157 | searchParams: { 158 | action: 'signin', 159 | }, 160 | form: { 161 | daykey: $.time('yyyyMMdd'), 162 | openid: this.openid, 163 | session_key: this.session_key, 164 | unionid: '', 165 | appid, 166 | }, 167 | } 168 | let {result} = await this.request(options) 169 | if(result?.errcode == 0) { 170 | this.log(`签到成功`); 171 | } else { 172 | this.log(`签到失败[${result?.errcode}]: ${result?.errmsg}`); 173 | } 174 | } catch (e) { 175 | console.log(e) 176 | } 177 | } 178 | 179 | async dotask(task,acttype) { 180 | try { 181 | let str = acttype==1 ? '完成' : '领取奖励'; 182 | let options = { 183 | fn: 'dotask', 184 | method: 'post', 185 | url: `https://membercenter.zippo.com.cn/s2/interface/data.aspx`, 186 | searchParams: { 187 | action: 'dotask', 188 | }, 189 | form: { 190 | taskid: task.taskid, 191 | acttype, 192 | openid: this.openid, 193 | session_key: this.session_key, 194 | unionid: '', 195 | appid, 196 | }, 197 | } 198 | let {result} = await this.request(options) 199 | if(result?.errcode == 0) { 200 | this.log(`任务[${task.title}]${str}成功`); 201 | } else { 202 | this.log(`任务[${task.title}]${str}失败[${result?.errcode}]: ${result?.errmsg}`); 203 | } 204 | } catch (e) { 205 | console.log(e) 206 | } 207 | } 208 | 209 | async inintmembers() { 210 | this.valid = false; 211 | try { 212 | let options = { 213 | fn: 'inintmembers', 214 | method: 'post', 215 | url: `https://membercenter.zippo.com.cn/s2/interface/data.aspx`, 216 | searchParams: { 217 | action: 'inintmembers', 218 | }, 219 | form: { 220 | openid: this.openid, 221 | session_key: this.session_key, 222 | unionid: '', 223 | appid, 224 | }, 225 | } 226 | let {result} = await this.request(options) 227 | if(result?.errcode == 0) { 228 | this.valid = true; 229 | let info = result?.data?.[0]; 230 | if(info) { 231 | this.name = info.Mobile__c || ''; 232 | this.point = info.AvailablePoints__c || 0; 233 | } 234 | } else { 235 | this.log(`查询账号失败[${result?.errcode}]: ${result?.errmsg}`); 236 | } 237 | } catch (e) { 238 | console.log(e) 239 | } 240 | } 241 | 242 | //做任务逻辑 243 | async userTask() { 244 | $.log(`\n============= 账号[${this.index}] =============`); 245 | await this.inintmembers(); 246 | if(!this.valid) return; 247 | await this.ininttask(); 248 | await this.inintmembers(); 249 | this.log(`积分: ${this.point}`); 250 | } 251 | } 252 | 253 | !(async () => { 254 | $.log(`最大并发数: ${MAX_THREAD}`); 255 | $.log(''); 256 | 257 | //封装的读取变量方法, 可以自己另外写也可以直接用, 读取到的账号会存入 $.userList 中 258 | $.read_env(UserClass); 259 | 260 | //正常的做任务流程 261 | for(let user of $.userList) { 262 | await user.userTask(); 263 | } 264 | 265 | //封装的并发方法, 想试的把下面的//删掉 266 | //await $.threadTask('userTask',MAX_THREAD); 267 | 268 | })() 269 | .catch((e) => $.log(e)) 270 | .finally(() => $.exitNow()) 271 | 272 | function Env(name) { 273 | return new class { 274 | constructor(name) { 275 | this.name = name; 276 | this.startTime = Date.now(); 277 | this.log(`[${this.name}]开始运行\n`, {time: true}); 278 | this.notifyStr = []; 279 | this.notifyFlag = true; 280 | this.userIdx = 0; 281 | this.userList = []; 282 | this.userCount = 0; 283 | } 284 | log(msg, options = {}) { 285 | let opt = {console: true}; 286 | Object.assign(opt, options); 287 | if (opt.time) { 288 | let fmt = opt.fmt || 'hh:mm:ss'; 289 | msg = `[${this.time(fmt)}]` + msg; 290 | } 291 | if (opt.notify) this.notifyStr.push(msg); 292 | if (opt.console) console.log(msg); 293 | } 294 | read_env(Class) { 295 | let envStrList = ckNames.map(x => process.env[x]); 296 | for (let env_str of envStrList.filter(x => !!x)) { 297 | let sp = envSplitor.filter(x => env_str.includes(x)); 298 | let splitor = sp.length > 0 ? sp[0] : envSplitor[0]; 299 | for (let ck of env_str.split(splitor).filter(x => !!x)) { 300 | this.userList.push(new Class(ck)); 301 | } 302 | } 303 | this.userCount = this.userList.length; 304 | if (!this.userCount) { 305 | this.log(`未找到变量,请检查变量${ckNames.map(x => '['+x+']').join('或')}`, {notify: true}); 306 | return false; 307 | } 308 | this.log(`共找到${this.userCount}个账号`); 309 | return true; 310 | } 311 | async threads(taskName, conf, opt = {}) { 312 | while (conf.idx < $.userList.length) { 313 | let user = $.userList[conf.idx++]; 314 | if(!user.valid) continue; 315 | await user[taskName](opt); 316 | } 317 | } 318 | async threadTask(taskName, thread) { 319 | let taskAll = []; 320 | let taskConf = {idx:0}; 321 | while(thread--) taskAll.push(this.threads(taskName, taskConf)); 322 | await Promise.all(taskAll); 323 | } 324 | time(t, x = null) { 325 | let xt = x ? new Date(x) : new Date; 326 | let e = { 327 | "M+": xt.getMonth() + 1, 328 | "d+": xt.getDate(), 329 | "h+": xt.getHours(), 330 | "m+": xt.getMinutes(), 331 | "s+": xt.getSeconds(), 332 | "q+": Math.floor((xt.getMonth() + 3) / 3), 333 | S: this.padStr(xt.getMilliseconds(), 3) 334 | }; 335 | /(y+)/.test(t) && (t = t.replace(RegExp.$1, (xt.getFullYear() + "").substr(4 - RegExp.$1.length))); 336 | 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))); 337 | return t; 338 | } 339 | async showmsg() { 340 | if(!this.notifyFlag) return; 341 | if(!this.notifyStr.length) return; 342 | var notify = require('./sendNotify'); 343 | this.log('\n============== 推送 =============='); 344 | await notify.sendNotify(this.name, this.notifyStr.join('\n')); 345 | } 346 | padStr(num, length, opt = {}) { 347 | let padding = opt.padding || '0'; 348 | let mode = opt.mode || 'l'; 349 | let numStr = String(num); 350 | let numPad = (length > numStr.length) ? (length - numStr.length) : 0; 351 | let pads = ''; 352 | for (let i=0; i < numPad; i++) { 353 | pads += padding; 354 | } 355 | if (mode == 'r') { 356 | numStr = numStr + pads; 357 | } else { 358 | numStr = pads + numStr; 359 | } 360 | return numStr; 361 | } 362 | json2str(obj, c, encode = false) { 363 | let ret = []; 364 | for (let keys of Object.keys(obj).sort()) { 365 | let v = obj[keys]; 366 | if(v && encode) v = encodeURIComponent(v); 367 | ret.push(keys + '=' + v); 368 | } 369 | return ret.join(c); 370 | } 371 | str2json(str, decode = false) { 372 | let ret = {}; 373 | for (let item of str.split('&')) { 374 | if(!item) continue; 375 | let idx = item.indexOf('='); 376 | if(idx == -1) continue; 377 | let k = item.substr(0, idx); 378 | let v = item.substr(idx + 1); 379 | if(decode) v = decodeURIComponent(v); 380 | ret[k] = v; 381 | } 382 | return ret; 383 | } 384 | randomPattern(pattern, charset = 'abcdef0123456789') { 385 | let str = ''; 386 | for (let chars of pattern) { 387 | if (chars == 'x') { 388 | str += charset.charAt(Math.floor(Math.random() * charset.length)); 389 | } else if (chars == 'X') { 390 | str += charset.charAt(Math.floor(Math.random() * charset.length)).toUpperCase(); 391 | } else { 392 | str += chars; 393 | } 394 | } 395 | return str; 396 | } 397 | randomString(len, charset = 'abcdef0123456789') { 398 | let str = ''; 399 | for (let i = 0; i < len; i++) { 400 | str += charset.charAt(Math.floor(Math.random() * charset.length)); 401 | } 402 | return str; 403 | } 404 | randomList(a) { 405 | let idx = Math.floor(Math.random() * a.length); 406 | return a[idx]; 407 | } 408 | wait(t) { 409 | return new Promise(e => setTimeout(e, t)); 410 | } 411 | async exitNow() { 412 | await this.showmsg(); 413 | let e = Date.now(); 414 | let s = (e - this.startTime) / 1000; 415 | this.log(''); 416 | this.log(`[${this.name}]运行结束,共运行了${s}秒`, {time: true}); 417 | process.exit(0); 418 | } 419 | } 420 | (name) 421 | } 422 | -------------------------------------------------------------------------------- /zstj.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 1 6 * * * 3 | const $ = new Env("掌上天津") 4 | """ 5 | 6 | import json 7 | import time, base64, hashlib, execjs, urllib.parse, os 8 | import hmac,random 9 | from hashlib import sha1 10 | import requests 11 | 12 | 13 | js_function = """ 14 | function genmac(){var ran1=ran1=Math.floor(Math.random()*256);ran1=ran1.toString(16).toUpperCase();if(ran1.length==1)ran1="0"+ran1;var ran2=Math.floor(Math.random()*256);ran2=ran2.toString(16).toUpperCase();if(ran2.length==1)ran2="0"+ran2;var ran3=Math.floor(Math.random()*256);ran3=ran3.toString(16).toUpperCase();if(ran3.length==1)ran3="0"+ran3;var ran4=Math.floor(Math.random()*256);ran4=ran4.toString(16).toUpperCase();if(ran4.length==1)ran4="0"+ran4;var ran5=Math.floor(Math.random()*256);ran5=ran5.toString(16).toUpperCase();if(ran5.length==1)ran5="0"+ran5;var ran6=Math.floor(Math.random()*256);ran6=ran6.toString(16).toUpperCase();if(ran6.length==1)ran6="0"+ran6;var res="";res=ran1+":"+ran2+":"+ran3+":"+ran4+":"+ran5+":"+ran6;return res;} 15 | """ 16 | 17 | 18 | def sha1_secret_str(key, code): 19 | hmac_code = hmac.new(key.encode(), code, sha1) 20 | return hmac_code.hexdigest() 21 | 22 | 23 | def sign_data(userId, salf): 24 | macs = execjs.compile(js_function).call("genmac") 25 | macs = urllib.parse.quote(macs, 'utf-8') 26 | timestamp = str(int(time.time())) 27 | sa = f'brand=google&client=android&deviceInfo=google_Pixel 4_5831595_10&interfaceVersion=v2.8&lat=40.14988&lng=116.658974&mac={macs}&model=Pixel 4&privacyStatus=1®ion=%E9%A1%BA%E4%B9%89%E5%8C%BA&salf={salf}×tamp={timestamp}&uid={userId}&userId={userId}&version=2.8.4&versionCode=154' 28 | # sa = 'brand=OPPO&client=android&deviceInfo=OPPO_PCAM00_2021040100_10&interfaceVersion=v2.8&lat=30.1&lng=114.2&mac=16:20:B8:EA:31:57&model=PCAM00&privacyStatus=1®ion=天津市&salf=9e2e14×tamp=1675259130&uid=454242&userId=454242&version=2.8.4&versionCode=154' 29 | s = bytes(sa, encoding='utf-8') 30 | code = base64.b64encode(s) 31 | key = "1s_vsegymTasdgKxiKvRz5vDlyzmc92A_H6A8zg6I" 32 | signs = sha1_secret_str(key, code).upper() 33 | url = f"https://bbs.zaitianjin.net/zstj/v2.8/index.php" 34 | headers = { 35 | 'Content-Type': 'application/x-www-form-urlencoded', 36 | 'Host': 'bbs.zaitianjin.net', 37 | 'Connection': 'Keep-Alive', 38 | 'Accept-Encoding': 'gzip', 39 | 'User-Agent': 'okhttp/4.9.3' 40 | } 41 | data = { 42 | 'c': 'User', 43 | 'lng': '116.658974', 44 | 'privacyStatus': '1', 45 | 'sign': signs, 46 | 'interfaceVersion': 'v2.8', 47 | 'version': '2.8.4', 48 | 'userId': userId, 49 | 'm': 'signInfo', 50 | 'mac': macs, 51 | 'versionCode': '154', 52 | 'deviceInfo': 'google_Pixel 4_5831595_10', 53 | 'uid': userId, 54 | 'client': 'android', 55 | 'model': 'Pixel 4', 56 | 'region': '%E9%A1%BA%E4%B9%89%E5%8C%BA', 57 | 'salf': salf, 58 | 'brand': 'google', 59 | 'lat': '40.14988', 60 | 'timestamp': timestamp, 61 | } 62 | redata = urllib.parse.urlencode(data) 63 | res = requests.post(url, headers=headers, data=redata).json() 64 | if res['code'] == 1: 65 | signDays = res['data']['signDays'] 66 | signAllDays = res['data']['signAllDays'] 67 | signStatue = res['data']['signStatue'] 68 | signData = res['data']['signData'] 69 | print(f'签到天数为{signDays}天;累计签到天数{signAllDays}天;今日是否签到{signStatue};连续签到7天奖励{signData}') 70 | return f'掌上天津极速版,签到天数为{signDays}天;累计签到天数{signAllDays}天;今日是否签到{signStatue};连续签到7天奖励{signData}' 71 | 72 | 73 | def sign(userId, salf): 74 | macs = execjs.compile(js_function).call("genmac") 75 | macs = urllib.parse.quote(macs, 'utf-8') 76 | timestamp = str(int(time.time())) 77 | sa = f'brand=google&client=android&deviceInfo=google_Pixel 4_5831595_10&interfaceVersion=v2.8&lat=40.14988&lng=116.658974&mac={macs}&model=Pixel 4&privacyStatus=1®ion=%E9%A1%BA%E4%B9%89%E5%8C%BA&salf={salf}×tamp={timestamp}&uid={userId}&userId={userId}&version=2.8.4&versionCode=154' 78 | # sa = 'brand=OPPO&client=android&deviceInfo=OPPO_PCAM00_2021040100_10&interfaceVersion=v2.8&lat=30.1&lng=114.2&mac=16:20:B8:EA:31:57&model=PCAM00&privacyStatus=1®ion=天津市&salf=9e2e14×tamp=1675259130&uid=454242&userId=454242&version=2.8.4&versionCode=154' 79 | s = bytes(sa, encoding='utf-8') 80 | code = base64.b64encode(s) 81 | key = "1s_vsegymTasdgKxiKvRz5vDlyzmc92A_H6A8zg6I" 82 | signs = sha1_secret_str(key, code).upper() 83 | url = f"https://bbs.zaitianjin.net/zstj/v2.8/index.php" 84 | headers = { 85 | 'Content-Type': 'application/x-www-form-urlencoded', 86 | 'Host': 'bbs.zaitianjin.net', 87 | 'Connection': 'Keep-Alive', 88 | 'Accept-Encoding': 'gzip', 89 | 'User-Agent': 'okhttp/4.9.3' 90 | } 91 | data = { 92 | 'c': 'Credit', 93 | 'lng': '116.658974', 94 | 'privacyStatus': '1', 95 | 'sign': signs, 96 | 'interfaceVersion': 'v2.8', 97 | 'version': '2.8.4', 98 | 'userId': userId, 99 | 'm': 'sign', 100 | 'mac': macs, 101 | 'versionCode': '154', 102 | 'deviceInfo': 'google_Pixel 4_5831595_10', 103 | 'uid': userId, 104 | 'client': 'android', 105 | 'model': 'Pixel 4', 106 | 'region': '%E9%A1%BA%E4%B9%89%E5%8C%BA', 107 | 'salf': salf, 108 | 'brand': 'google', 109 | 'lat': '40.14988', 110 | 'timestamp': timestamp, 111 | } 112 | redata = urllib.parse.urlencode(data) 113 | res = requests.post(url, headers=headers, data=redata).json() 114 | if res['code'] == 1: 115 | codemsg = res['data']['code'] 116 | print(f"签到获得{codemsg}元") 117 | 118 | 119 | def webhook(message, webhook_token): 120 | url = f'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={webhook_token}' 121 | headers = { 122 | 'Content-Type': 'application/json' 123 | 124 | } 125 | data = { 126 | "msgtype": "text", 127 | "text": { 128 | "content": message 129 | } 130 | } 131 | body = json.dumps(data).encode(encoding='utf-8') 132 | # headers = {'Content-Type': 'application/json'} 133 | response = requests.post(url=url, data=body, headers=headers).json() 134 | if response["errmsg"] == 'ok': 135 | print("企业微信推送成功") 136 | else: 137 | print("推送失败") 138 | 139 | 140 | if __name__ == '__main__': 141 | zstjhd = os.environ['zstjhd'].split("\n") 142 | webhook_token = os.environ['QYWX_KEY'] 143 | time.sleep(random.randint(0,360)) 144 | for i in zstjhd: 145 | userId = i.split("&")[0] 146 | salf = i.split("&")[1] 147 | sign(userId, salf) 148 | message = sign_data(userId, salf) 149 | webhook(message, webhook_token) 150 | -------------------------------------------------------------------------------- /zswlapp.py: -------------------------------------------------------------------------------- 1 | """ 2 | cron: 39 6 * * * 3 | new Env('掌上温岭'); 4 | 5 | """ 6 | 7 | import hashlib 8 | import json 9 | import os 10 | import pprint 11 | import random 12 | import urllib.parse 13 | import requests 14 | import time 15 | 16 | salt = 'FR*r!isE5W' 17 | 18 | 19 | def user_info(X_SESSION_ID, X_REQUEST_ID): 20 | ts = str(int(time.time() * 1000)) 21 | value = f'/api/user_mumber/account_detail&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 22 | hsobj = hashlib.sha256() 23 | hsobj.update(value.encode("utf-8")) 24 | sign = hsobj.hexdigest() 25 | url = "https://vapp.tmuyun.com/api/user_mumber/account_detail" 26 | headers = { 27 | 'X-SESSION-ID': X_SESSION_ID, 28 | 'X-REQUEST-ID': X_REQUEST_ID, 29 | 'X-TIMESTAMP': ts, 30 | 'X-SIGNATURE': sign, 31 | 'X-TENANT-ID': '3', 32 | 'Cache-Control': 'no-cache', 33 | 'Host': 'vapp.tmuyun.com' 34 | } 35 | response = requests.get(url=url, headers=headers).json() 36 | if response['code'] == 0: 37 | nick_name = response['data']['rst']['nick_name'] 38 | phone_number = response['data']['rst']['phone_number'] 39 | total_integral = response['data']['rst']['total_integral'] 40 | return nick_name, phone_number, total_integral 41 | 42 | 43 | def task_list(X_SESSION_ID, X_REQUEST_ID): 44 | ts = str(int(time.time() * 1000)) 45 | value = f'/api/user_mumber/numberCenter&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 46 | hsobj = hashlib.sha256() 47 | hsobj.update(value.encode("utf-8")) 48 | sign = hsobj.hexdigest() 49 | url = "https://vapp.tmuyun.com/api/user_mumber/numberCenter" 50 | headers = { 51 | 'X-SESSION-ID': X_SESSION_ID, 52 | 'X-REQUEST-ID': X_REQUEST_ID, 53 | 'X-TIMESTAMP': ts, 54 | 'X-SIGNATURE': sign, 55 | 'X-TENANT-ID': '3', 56 | 'Cache-Control': 'no-cache', 57 | 'Host': 'vapp.tmuyun.com' 58 | } 59 | response = requests.get(url=url, headers=headers).json() 60 | # print(response) 61 | if response['code'] == 0: 62 | for i in response['data']['rst']['user_task_list']: 63 | 64 | completed = i['completed'] 65 | member_task_type = i['member_task_type'] 66 | task_name = i['name'] 67 | if completed == 0: 68 | if task_name == '每日签到': 69 | print(f'开始做{task_name}任务') 70 | signin(X_SESSION_ID, X_REQUEST_ID) 71 | elif task_name == '使用本地服务': 72 | print(f'开始做{task_name}任务') 73 | do_task(X_SESSION_ID, X_REQUEST_ID, member_task_type) 74 | elif task_name == '新闻资讯阅读': 75 | print(f'开始做{task_name}任务') 76 | read_list(task_name, X_SESSION_ID, X_REQUEST_ID, member_task_type) 77 | elif task_name == '新闻资讯评论': 78 | print(f'开始做{task_name}任务') 79 | read_list(task_name, X_SESSION_ID, X_REQUEST_ID, member_task_type) 80 | elif task_name == '新闻资讯点赞': 81 | print(f'开始做{task_name}任务') 82 | read_list(task_name, X_SESSION_ID, X_REQUEST_ID, member_task_type) 83 | elif task_name == '分享资讯给好友': 84 | print(f'开始做{task_name}任务') 85 | read_list(task_name, X_SESSION_ID, X_REQUEST_ID, member_task_type) 86 | # elif task_name == '邀请好友': 87 | # pass 88 | 89 | 90 | else: 91 | print(f'{task_name}任务已做完') 92 | 93 | # print(completed, member_task_type, task_name) 94 | 95 | 96 | def signin(X_SESSION_ID, X_REQUEST_ID): 97 | ts = str(int(time.time() * 1000)) 98 | value = f'/api/user_mumber/sign&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 99 | hsobj = hashlib.sha256() 100 | hsobj.update(value.encode("utf-8")) 101 | sign = hsobj.hexdigest() 102 | url = "https://vapp.tmuyun.com/api/user_mumber/sign" 103 | headers = { 104 | 'X-SESSION-ID': X_SESSION_ID, 105 | 'X-REQUEST-ID': X_REQUEST_ID, 106 | 'X-TIMESTAMP': ts, 107 | 'X-SIGNATURE': sign, 108 | 'X-TENANT-ID': '3', 109 | 'Cache-Control': 'no-cache', 110 | 'Host': 'vapp.tmuyun.com' 111 | } 112 | response = requests.get(url=url, headers=headers).json() 113 | if response['code'] == 0: 114 | print(f'签到:{response["data"]["reason"]}') 115 | 116 | 117 | def do_task(X_SESSION_ID, X_REQUEST_ID, task_type): 118 | ts = str(int(time.time() * 1000)) 119 | value = f'/api/user_mumber/doTask&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 120 | hsobj = hashlib.sha256() 121 | hsobj.update(value.encode("utf-8")) 122 | sign = hsobj.hexdigest() 123 | url = f"https://vapp.tmuyun.com/api/user_mumber/doTask?memberType={task_type}&member_type={task_type}" 124 | headers = { 125 | 'X-SESSION-ID': X_SESSION_ID, 126 | 'X-REQUEST-ID': X_REQUEST_ID, 127 | 'X-TIMESTAMP': ts, 128 | 'X-SIGNATURE': sign, 129 | 'X-TENANT-ID': '3', 130 | 'Cache-Control': 'no-cache', 131 | 'Host': 'vapp.tmuyun.com', 132 | 'User - Agent': '5.1.6;00000000-6641-8422-ffff-ffffcc0d98b0;Google Pixel 4;Android;10;Release' 133 | } 134 | response = requests.post(url=url, headers=headers).json() 135 | if response['code'] == 0: 136 | print(f'获得:{response["data"]["score_notify"]["integral"]}积分') 137 | 138 | 139 | def read_list(task_name, X_SESSION_ID, X_REQUEST_ID, task_type): 140 | list_count = ['10', '20', '30', '40', '50', '60'] 141 | ts = str(int(time.time() * 1000)) 142 | value = f'/api/article/channel_list&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 143 | hsobj = hashlib.sha256() 144 | hsobj.update(value.encode("utf-8")) 145 | sign = hsobj.hexdigest() 146 | url = f"https://vapp.tmuyun.com/api/article/channel_list?channel_id=5bd2bef6b1985042e7691870&isDiFangHao=false&is_new=true&list_count={random.choice(list_count)}&size=10&start={ts}" 147 | headers = { 148 | 'X-SESSION-ID': X_SESSION_ID, 149 | 'X-REQUEST-ID': X_REQUEST_ID, 150 | 'X-TIMESTAMP': ts, 151 | 'X-SIGNATURE': sign, 152 | 'X-TENANT-ID': '3', 153 | 'User-Agent': '5.1.6;00000000-6641-8422-ffff-ffffcc0d98b0;Google Pixel 4;Android;10;Release', 154 | 'Cache-Control': 'no-cache', 155 | 'Host': 'vapp.tmuyun.com', 156 | 'Connection': 'Keep-Alive', 157 | 'Accept-Encoding': 'gzip', 158 | } 159 | response = requests.get(url=url, headers=headers).json() 160 | if response['code'] == 0: 161 | art_list = response['data']['article_list'] 162 | for i in range(len(art_list)): 163 | doc_title = art_list[i]['doc_title'] 164 | article_id = art_list[i]['id'] 165 | if task_name == '新闻资讯阅读': 166 | read(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i) 167 | if i == 5: 168 | return 169 | elif task_name == '新闻资讯评论': 170 | recomment(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i) 171 | if i == 5: 172 | return 173 | elif task_name == '新闻资讯点赞': 174 | like(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i) 175 | if i == 5: 176 | return 177 | elif task_name == '分享资讯给好友': 178 | share(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i, task_type) 179 | if i == 5: 180 | return 181 | 182 | 183 | def read(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i): 184 | ts = str(int(time.time() * 1000)) 185 | value = f'/api/article/detail&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 186 | hsobj = hashlib.sha256() 187 | hsobj.update(value.encode("utf-8")) 188 | sign = hsobj.hexdigest() 189 | url = f"https://vapp.tmuyun.com/api/article/detail?from_channel=5bd2bef6b1985042e7691870&id={article_id}" 190 | headers = { 191 | 'X-SESSION-ID': X_SESSION_ID, 192 | 'X-REQUEST-ID': X_REQUEST_ID, 193 | 'X-TIMESTAMP': ts, 194 | 'X-SIGNATURE': sign, 195 | 'X-TENANT-ID': '3', 196 | 'User-Agent': '5.1.6;00000000-6641-8422-ffff-ffffcc0d98b0;Google Pixel 4;Android;10;Release', 197 | # 'Cache-Control': 'no-cache', 198 | 'Host': 'vapp.tmuyun.com', 199 | 'Connection': 'Keep-Alive', 200 | # 'Accept-Encoding': 'gzip', 201 | 202 | } 203 | response = requests.get(url=url, headers=headers).json() 204 | if response['code'] == 0: 205 | print(f"正在第{i}次阅读,阅读文章{doc_title}成功") 206 | 207 | 208 | def recomment(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i): 209 | comment = ['好的', '不错', '知道了', '了解', '打卡', '1', '。'] 210 | comment = urllib.parse.quote(random.choice(comment), 'utf-8') 211 | ts = str(int(time.time() * 1000)) 212 | value = f'/api/comment/create&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 213 | hsobj = hashlib.sha256() 214 | hsobj.update(value.encode("utf-8")) 215 | sign = hsobj.hexdigest() 216 | url = f"https://vapp.tmuyun.com/api/comment/create?channel_article_id={article_id}&content={comment}" 217 | headers = { 218 | 'X-SESSION-ID': X_SESSION_ID, 219 | 'X-REQUEST-ID': X_REQUEST_ID, 220 | 'X-TIMESTAMP': ts, 221 | 'X-SIGNATURE': sign, 222 | 'X-TENANT-ID': '3', 223 | 'User-Agent': '5.1.6;00000000-6641-8422-ffff-ffffcc0d98b0;Google Pixel 4;Android;10;Release', 224 | 'Cache-Control': 'no-cache', 225 | 'Host': 'vapp.tmuyun.com', 226 | 'Connection': 'Keep-Alive', 227 | 'Accept-Encoding': 'gzip', 228 | } 229 | response = requests.post(url=url, headers=headers).json() 230 | if response['code'] == 0: 231 | print(f"正在第{i}次评论,评论文章{doc_title}成功") 232 | 233 | 234 | def like(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i): 235 | ts = str(int(time.time() * 1000)) 236 | value = f'/api/favorite/like&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 237 | hsobj = hashlib.sha256() 238 | hsobj.update(value.encode("utf-8")) 239 | sign = hsobj.hexdigest() 240 | url = f"https://vapp.tmuyun.com/api/favorite/like?action=true&id={article_id}" 241 | headers = { 242 | 'X-SESSION-ID': X_SESSION_ID, 243 | 'X-REQUEST-ID': X_REQUEST_ID, 244 | 'X-TIMESTAMP': ts, 245 | 'X-SIGNATURE': sign, 246 | 'X-TENANT-ID': '3', 247 | 'User-Agent': '5.1.6;00000000-6641-8422-ffff-ffffcc0d98b0;Google Pixel 4;Android;10;Release', 248 | 'Cache-Control': 'no-cache', 249 | 'Host': 'vapp.tmuyun.com', 250 | 'Connection': 'Keep-Alive', 251 | 'Accept-Encoding': 'gzip', 252 | } 253 | response = requests.post(url=url, headers=headers).json() 254 | if response['code'] == 0: 255 | print(f"正在第{i}次点赞,点赞文章{doc_title}成功") 256 | 257 | 258 | def share(X_SESSION_ID, X_REQUEST_ID, doc_title, article_id, i, task_type): 259 | ts = str(int(time.time() * 1000)) 260 | value = f'/api/user_mumber/doTask&&{X_SESSION_ID}&&{X_REQUEST_ID}&&{ts}&&{salt}&&3' 261 | hsobj = hashlib.sha256() 262 | hsobj.update(value.encode("utf-8")) 263 | sign = hsobj.hexdigest() 264 | url = f"https://vapp.tmuyun.com/api/user_mumber/doTask?memberType={task_type}&member_type={task_type}&target_id={article_id}" 265 | headers = { 266 | 'X-SESSION-ID': X_SESSION_ID, 267 | 'X-REQUEST-ID': X_REQUEST_ID, 268 | 'X-TIMESTAMP': ts, 269 | 'X-SIGNATURE': sign, 270 | 'X-TENANT-ID': '3', 271 | 'User-Agent': '5.1.6;00000000-6641-8422-ffff-ffffcc0d98b0;Google Pixel 4;Android;10;Release', 272 | 'Cache-Control': 'no-cache', 273 | 'Host': 'vapp.tmuyun.com', 274 | 'Connection': 'Keep-Alive', 275 | 'Accept-Encoding': 'gzip', 276 | } 277 | response = requests.post(url=url, headers=headers).json() 278 | if response['code'] == 0: 279 | print(f"正在第{i}次分享,分享文章{doc_title}成功") 280 | 281 | 282 | if __name__ == '__main__': 283 | cks = os.environ['zhwl_data'] 284 | # cks = "62e23fb1b77d2e52636d30fa&0fb35efa-2a3b-4247-95b9-d318368f4aa8" 285 | cks = cks.split('@') 286 | for i in cks: 287 | ck = i.split('&') 288 | nick_name, phone_number, total_integral = user_info(ck[0], ck[1]) 289 | print(f"欢迎{nick_name}电话号码为{phone_number},目前积分为{total_integral}") 290 | task_list(ck[0], ck[1]) 291 | nick_name, phone_number, total_integral = user_info(ck[0], ck[1]) 292 | print(f"{nick_name}任务已做完,目前积分为{total_integral}") 293 | print('\n') 294 | -------------------------------------------------------------------------------- /湘窖俱乐部.js: -------------------------------------------------------------------------------- 1 | /* 2 | @萝卜 湘窖俱乐部:积分换酒 3 | 入口:https://raw.githubusercontent.com/lu0b0/Script/main/a70e22bc52fe6475ccdfb1e4192d208.png 4 | 格式 变量名xjjlbtoken account=xxxxxxx&openId=xxxxxx 5 | https://club.xiangjiaojiuye.com/xcloud-api/xjcenter/xjpersonalMember/v1/getXjpersonalMemberByCode.json 接口链接。重写也是这个。。。 6 | 7 | */ 8 | const $ = new Env('湘窖俱乐部'); 9 | function _0x19db(_0x52627e,_0x6ba0c0){const _0x4202c1=_0x4202();return _0x19db=function(_0x2b4400,_0x30fd88){_0x2b4400=_0x2b4400-0x74;let _0x20a576=_0x4202c1[_0x2b4400];if(_0x19db['XVcgKc']===undefined){var _0x627c0=function(_0x222dc0){const _0x271b49='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x106326='',_0x2df98d='';for(let _0x2928e2=0x0,_0x22b1c1,_0x27d7ca,_0x2d92ec=0x0;_0x27d7ca=_0x222dc0['charAt'](_0x2d92ec++);~_0x27d7ca&&(_0x22b1c1=_0x2928e2%0x4?_0x22b1c1*0x40+_0x27d7ca:_0x27d7ca,_0x2928e2++%0x4)?_0x106326+=String['fromCharCode'](0xff&_0x22b1c1>>(-0x2*_0x2928e2&0x6)):0x0){_0x27d7ca=_0x271b49['indexOf'](_0x27d7ca);}for(let _0x16faad=0x0,_0xd026e8=_0x106326['length'];_0x16faad<_0xd026e8;_0x16faad++){_0x2df98d+='%'+('00'+_0x106326['charCodeAt'](_0x16faad)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2df98d);};const _0x19db50=function(_0x4a0ac2,_0xc373a2){let _0x241873=[],_0x2c10c1=0x0,_0x4c78be,_0x25d3ec='';_0x4a0ac2=_0x627c0(_0x4a0ac2);let _0x489469;for(_0x489469=0x0;_0x489469<0x100;_0x489469++){_0x241873[_0x489469]=_0x489469;}for(_0x489469=0x0;_0x489469<0x100;_0x489469++){_0x2c10c1=(_0x2c10c1+_0x241873[_0x489469]+_0xc373a2['charCodeAt'](_0x489469%_0xc373a2['length']))%0x100,_0x4c78be=_0x241873[_0x489469],_0x241873[_0x489469]=_0x241873[_0x2c10c1],_0x241873[_0x2c10c1]=_0x4c78be;}_0x489469=0x0,_0x2c10c1=0x0;for(let _0x418a3e=0x0;_0x418a3e<_0x4a0ac2['length'];_0x418a3e++){_0x489469=(_0x489469+0x1)%0x100,_0x2c10c1=(_0x2c10c1+_0x241873[_0x489469])%0x100,_0x4c78be=_0x241873[_0x489469],_0x241873[_0x489469]=_0x241873[_0x2c10c1],_0x241873[_0x2c10c1]=_0x4c78be,_0x25d3ec+=String['fromCharCode'](_0x4a0ac2['charCodeAt'](_0x418a3e)^_0x241873[(_0x241873[_0x489469]+_0x241873[_0x2c10c1])%0x100]);}return _0x25d3ec;};_0x19db['sNsBsm']=_0x19db50,_0x52627e=arguments,_0x19db['XVcgKc']=!![];}const _0x3423e9=_0x4202c1[0x0],_0x4521a8=_0x2b4400+_0x3423e9,_0xd77722=_0x52627e[_0x4521a8];return!_0xd77722?(_0x19db['pyEYAp']===undefined&&(_0x19db['pyEYAp']=!![]),_0x20a576=_0x19db['sNsBsm'](_0x20a576,_0x30fd88),_0x52627e[_0x4521a8]=_0x20a576):_0x20a576=_0xd77722,_0x20a576;},_0x19db(_0x52627e,_0x6ba0c0);}const _0x2436ec=_0x2b44,_0x5ba28e=_0x19db;(function(_0x1d9911,_0x2896fc){const _0x239ccc=_0x19db,_0x564689=_0x2b44,_0x1eff56=_0x1d9911();while(!![]){try{const _0x57f474=parseInt(_0x564689(0xca))/0x1*(-parseInt(_0x239ccc(0x7e,'EaxB'))/0x2)+-parseInt(_0x564689(0xac))/0x3+-parseInt(_0x564689(0x87))/0x4+parseInt(_0x239ccc(0xc0,'uizf'))/0x5*(parseInt(_0x564689(0x83))/0x6)+parseInt(_0x239ccc(0x7b,'Zmay'))/0x7*(-parseInt(_0x239ccc(0x96,'v3sa'))/0x8)+-parseInt(_0x564689(0x9a))/0x9+parseInt(_0x239ccc(0x77,'FOXO'))/0xa*(parseInt(_0x564689(0xc4))/0xb);if(_0x57f474===_0x2896fc)break;else _0x1eff56['push'](_0x1eff56['shift']());}catch(_0x5666b1){_0x1eff56['push'](_0x1eff56['shift']());}}}(_0x4202,0xc0670));let status;status=(status=$[_0x5ba28e(0x92,'ADC6')](_0x5ba28e(0xb2,'EaxB'))||'1')>0x1?''+status:'';function _0x2b44(_0x52627e,_0x6ba0c0){const _0x4202c1=_0x4202();return _0x2b44=function(_0x2b4400,_0x30fd88){_0x2b4400=_0x2b4400-0x74;let _0x20a576=_0x4202c1[_0x2b4400];if(_0x2b44['EyIdkQ']===undefined){var _0x627c0=function(_0x19db50){const _0x222dc0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x271b49='',_0x106326='';for(let _0x2df98d=0x0,_0x2928e2,_0x22b1c1,_0x27d7ca=0x0;_0x22b1c1=_0x19db50['charAt'](_0x27d7ca++);~_0x22b1c1&&(_0x2928e2=_0x2df98d%0x4?_0x2928e2*0x40+_0x22b1c1:_0x22b1c1,_0x2df98d++%0x4)?_0x271b49+=String['fromCharCode'](0xff&_0x2928e2>>(-0x2*_0x2df98d&0x6)):0x0){_0x22b1c1=_0x222dc0['indexOf'](_0x22b1c1);}for(let _0x2d92ec=0x0,_0x16faad=_0x271b49['length'];_0x2d92ec<_0x16faad;_0x2d92ec++){_0x106326+='%'+('00'+_0x271b49['charCodeAt'](_0x2d92ec)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x106326);};_0x2b44['IaXKHC']=_0x627c0,_0x52627e=arguments,_0x2b44['EyIdkQ']=!![];}const _0x3423e9=_0x4202c1[0x0],_0x4521a8=_0x2b4400+_0x3423e9,_0xd77722=_0x52627e[_0x4521a8];return!_0xd77722?(_0x20a576=_0x2b44['IaXKHC'](_0x20a576),_0x52627e[_0x4521a8]=_0x20a576):_0x20a576=_0xd77722,_0x20a576;},_0x2b44(_0x52627e,_0x6ba0c0);}let xjjlbtokenArr=[],xjjlbcount='',bhdh='',xjjlbtoken=($['isNode']()?process[_0x5ba28e(0xb0,'EaxB')][_0x5ba28e(0xbf,'FOXO')]:$[_0x2436ec(0x86)](_0x5ba28e(0x88,'44sp')))||_0x5ba28e(0x7f,'*XdE'),header={'Host':_0x5ba28e(0x74,'(a!I'),'Connection':'keep-alive','User-Agent':'Mozilla/5.0\x20(Windows\x20NT\x206.1;\x20WOW64)\x20AppleWebKit/537.36\x20(KHTML,\x20like\x20Gecko)\x20Chrome/53.0.2785.143\x20Safari/537.36\x20MicroMessenger/7.0.9.501\x20NetType/WIFI\x20MiniProgramEnv/Windows\x20WindowsWechat','content-type':_0x2436ec(0x80),'Referer':'https://servicewechat.com/wx94268a8bf909aee4/29/page-frame.html'};!(async()=>{const _0x51524c=_0x5ba28e,_0x652755=_0x2436ec;if(typeof $request!==_0x652755(0x7d))await xjjlbck();else{xjjlbtokenArr=xjjlbtoken[_0x51524c(0xba,'AP$G')]('@'),console[_0x51524c(0xaa,'EaxB')]('-------------\x20共'+xjjlbtokenArr[_0x652755(0x84)]+_0x652755(0x85));for(let _0x27d7ca=0x0;_0x27d7ca$['logErr'](_0x2d92ec))['finally'](()=>$[_0x5ba28e(0xc6,'ADC6')]());function xjjlbck(){const _0x139f42=_0x5ba28e,_0x323f47=_0x2436ec;if($request['url'][_0x323f47(0x8c)](_0x139f42(0x8a,'^NSK'))>-0x1){const _0x16faad=$request[_0x323f47(0x7c)];if(_0x16faad)$[_0x323f47(0xa4)](_0x16faad,'xjjlbtoken'+status);$['log'](_0x16faad),$['msg']($[_0x139f42(0x9d,'y%60')],'','湘窖俱乐部'+(''+status)+_0x139f42(0x79,'53br'));}}function sign(_0xd026e8=0x0){return new Promise(_0x4a0ac2=>{const _0x5d9f8c=_0x19db,_0xbab380=_0x2b44;let _0xc373a2={'url':_0xbab380(0xc8),'headers':header,'body':xjjlbtoken};$[_0x5d9f8c(0xc2,'vgn%')](_0xc373a2,async(_0x241873,_0x2c10c1,_0x4c78be)=>{const _0x485b32=_0xbab380,_0xcf3b1c=_0x5d9f8c;try{const _0x25d3ec=JSON[_0xcf3b1c(0x9f,'T%HB')](_0x4c78be);_0x25d3ec[_0x485b32(0xa2)]==0x0?$['log'](_0x485b32(0xc5)+_0x25d3ec[_0x485b32(0x8b)][_0x485b32(0x8f)]+_0xcf3b1c(0x81,'HvU2')+_0x25d3ec[_0xcf3b1c(0xa6,'43Pf')]['integral']+'积分'):$['log'](_0xcf3b1c(0x75,'@1uc')+_0x25d3ec[_0xcf3b1c(0xa8,'P[UN')]);}catch(_0x489469){}finally{_0x4a0ac2();}},_0xd026e8);});}function read_list(_0x418a3e=0x0){return new Promise(_0x1d54d8=>{const _0x2325b0=_0x19db,_0x1918e1=_0x2b44;let _0x4b56c9={'url':_0x1918e1(0xc1),'headers':header,'body':xjjlbtoken+_0x2325b0(0xab,'Xumk')};$[_0x1918e1(0x9b)](_0x4b56c9,async(_0x21c4e2,_0xd3aa1f,_0x3c2a1c)=>{const _0x76c9fd=_0x1918e1,_0x28d9e8=_0x2325b0;try{const _0x24d7db=JSON[_0x28d9e8(0xa9,'lR93')](_0x3c2a1c);if(_0x24d7db[_0x76c9fd(0xa2)]==0x0)for(let _0x4c5e56 of _0x24d7db[_0x28d9e8(0xa5,'Wdyn')][_0x76c9fd(0xb8)]){await reads(_0x4c5e56),await $[_0x28d9e8(0x76,'Cuw5')](0x5dc);}else $['log'](_0x76c9fd(0xb3)+_0x24d7db[_0x28d9e8(0x95,'44sp')]);}catch(_0x497674){}finally{_0x1d54d8();}},_0x418a3e);});}function _0x4202(){const _0x24cf66=['mJbSELrLvfe','W593W7aEnG','WPlcImk+oq','Bg9N','y29Kzq','WQJLV4hLPzhJGPRMUkdNQORKV5NKU4VPGyy','C2v0zgf0yq','WPpdHSoHW5O','W7FcVmkYWO8','44cJ5AEM6lEr776IW5a','W785AgbhbCoa','WQtdSmoqdbe','W6ldK8k+','WQj8D8kWWOFcKSkrW77dS8ovW5iGW4hdUvNdPtLjvJVdHSk4WR7cR8k6W5m','mJy5nZe3n2zrtKj0sa','W6ZPMPZORjxMLB7NQOtJGBq','WO7cImkQ','yxj0AwnSzvrPDgXL','W6VdKSkV','Ahr0Chm6lY9JBhvIlNHPyw5NAMLHB2PPDxLLlMnVBs94y2XVDwqTyxbPl3HQy2vUDgvYl3HQCgvYC29UywXjBNrLz3jHBefYDgLJBguVDJeVuMvHzfHQugvYC29UtwvTyMvYsw50z3jHBefYDgLJBguUANnVBG','W7BdLSkZWRZcLmkGW4NdIHhcLmoV','cUETVUwiSowKSEI0PE+8MIa','WP0KWRiCi2DzWRDf','W7XMzSkYWPdcQmkqW7tdT8obWQj0WORdQ13dSbL0sYJdL8o8','WP8oumo6','44criow9K+wjJEENR+wiHU+8MG','BgLZDa','ndu1otfNBKjfCKq','WRjfW4NdMmoq','WPr6W6fa','C3vYCgX1C0LUDgvNCMfS','DCkvWRldNSoeeCoYvSo6qSkVuJm','coMyQoITKoAuMEEOUoocTa','W5RcQ8oWW6yAAeFdSmolna','sdxdHCkaWPpcNSosDW','Ahr0Chm6lY9JBhvIlNHPyw5NAMLHB2PPDxLLlMnVBs94y2XVDwqTyxbPl3HQy2vUDgvYl3HQCgvYC29UywXjBNrLz3jHBefYDgLJBguVDJeVBgLZDfHQugvYC29Usw50zwDYywXbCNrPy2XLlMPZB24','lbNcOc4','p8oeW5WxmSovW6WbW7Kgxq','mJiWCxbLuMvo','cUETVUwiSoAiKowkN++8JoI/NUE7REETVUwiSa','i8olW6VcJW','W7SsFbGDoWXTBZddQg0','Ahr0Chm6lY9JBhvIlNHPyw5NAMLHB2PPDxLLlMnVBs94y2XVDwqTyxbPl3HQy2vUDgvYl3HQCgvYC29UywXbDhrLBMrHBMnLuMvJB3jKl3yXl3vZzxjbDhrLBMrHBMnLlMPZB24','cUA5MoEQLUs/SEs5KoMdQo+8MG','otCYmdvktMT6wLC','WPdcOCoBFc1Ykh/cHmkpASktch5jWPVdRSkvEmkoW6pdSXO','W7RNR5ZLIP/LP7xOTRBVVRJcHq','BSoeW4Cx','WPddSmkTWR5jkXJdImoOcCkYWQddMG','Aw5KzxG','DKldGmo7WRBOJjpLJ5pMIiVLI4hVVyu','qSkYomo0BCodj8kYBmoUW7dcKSkH','uSo+WOFdMhnXW57cUSkNeSk/','yM9KEq','Dw5KzwzPBMvK','WRZcJmk1WQRcOSk2W6NdUG','WQ0/WQVcN8oWWQFcQSo+mSkdp8ogWRZdLmkiyxnkk8oeqZDmW7TKB35qW5JdGmkzWROtdSk9W5RcK1BdNx9QW6uSW490DCo8F29JWPinW7FcICojd3fBWPa','yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvK','5AEg6i+w5y+1776uFW','cUEuQoAiT+oaKa','ndyZmZa4A3zUuwnv','BgvUz3rO','5lIQ6lsM5y+3ls0Tls0Tls0Tls0TlqO','z2v0zgf0yq','mJaYmty0nePVBNbxwq','WQldPv9LW68SWRndW67dQW','W4yLWRqulCokls1YW4RdVWFdQ8o2','W44sW4ndW6hdSCouW7ZdNZiMgfpcU8k+W5lcHSo2W5SHyMRcUL9r','zgf0yq','Aw5KzxHpzG','EgPWzxjZB25HBe1LBwjLCKvUDgL0Eq','BwvZC2fNzq','y291BNrtAwDU','pmkJsq','WQbhW5hdMmohhfJdKSo1WQhcSHi','imobW7hcNmkusG','W5BdL8k/pdOjWQtcOa','W7rTzmkKWOC','WRFdQKz6W6W/WRK','yCkNASkfeSoAWO3dNwO','tfOyWRLFqCkJW5ldSG','W77cUmk1WP3cNJeq','CgfYC2u','mtaXmtCXodHuv1DNufi','Cg9ZDa','wSkJWOddImkdaKymWPRcIh4/xaHGW7/cGh5yzmkFWQFdOCorW5SOWO0rW6ZcKSknWOeQWO8+d8oqWPldQSkOk8orWQpcHCo7nuLLc8oarCkQnmk1W7TWsGVcV8kvW4mBFSo+W5bpgSkJmv9laINdK2BcLKZcTSklbbmRbqBdMSo3WQZdMSoGWOfddN5CWORcRqBdOXC4D8kq','xCkMWO7cGq'];_0x4202=function(){return _0x24cf66;};return _0x4202();}function reads(_0x29ec9c,_0x4951bc=0x0){return new Promise(_0x4e918a=>{const _0x1d0bbf=_0x19db,_0x4ce26b=_0x2b44;let _0x24c9ca={'url':_0x4ce26b(0xb1),'headers':header,'body':xjjlbtoken+_0x1d0bbf(0xc3,'Cuw5')+_0x29ec9c['id']};$[_0x1d0bbf(0xb6,'HvU2')](_0x24c9ca,async(_0x3c78ba,_0xbb7e2,_0x475230)=>{const _0x11b30f=_0x1d0bbf,_0x1f7ca1=_0x4ce26b;try{const _0x11c8d9=JSON[_0x1f7ca1(0x99)](_0x475230);_0x11c8d9[_0x11b30f(0xbb,'sWbU')]==0x0?$[_0x1f7ca1(0xa1)](_0x11b30f(0xbe,'53br')+_0x29ec9c[_0x11b30f(0x91,'AP$G')]+'】:成功获得50积分'):$[_0x11b30f(0xae,'u1$m')](_0x11b30f(0xad,'bJup')+_0x29ec9c[_0x1f7ca1(0xaf)]+_0x11b30f(0xa7,'dnLO')+_0x11c8d9[_0x11b30f(0x98,'43Pf')]);}catch(_0x77de2c){}finally{_0x4e918a();}},_0x4951bc);});}function info(_0x357d06=0x0){return new Promise(_0x598540=>{const _0x5a80e9=_0x19db;let _0x146747={'url':_0x5a80e9(0x9c,'dnLO'),'headers':header,'body':xjjlbtoken};$[_0x5a80e9(0xa0,'u1$m')](_0x146747,async(_0x5304cf,_0x206d8f,_0x33c318)=>{const _0x18c164=_0x2b44,_0x38f6ca=_0x5a80e9,_0x396868=JSON[_0x38f6ca(0x94,'Xumk')](_0x33c318);try{_0x396868[_0x18c164(0xa2)]==0x0?$['log'](_0x18c164(0x82)+_0x396868[_0x18c164(0x8b)][_0x38f6ca(0xb5,'Xumk')]['nickName']+_0x18c164(0xb7)+_0x396868['data'][_0x18c164(0x8d)][_0x18c164(0xbc)]):$[_0x38f6ca(0x90,'@c&8')](_0x18c164(0xc9)+_0x396868[_0x18c164(0x8e)]);}catch(_0x4aca6e){$['logErr'](_0x4aca6e,_0x206d8f);}finally{_0x598540();}},_0x357d06);});} 10 | 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) } 11 | --------------------------------------------------------------------------------