不会吧我记得,给你点个赞吧,点赞貌似可以
Z
zeze
@zeze
-
经常活跃会给涨声望吗 -
天翼云盘GitHub自动签到源代码失效了,哪位大神改改?凑合这用就行了……
-
天翼云盘GitHub自动签到源代码失效了,哪位大神改改?只有签到功能,能用就行
-
天翼云盘GitHub自动签到源代码失效了,哪位大神改改?import base64 import os import re import requests import rsa import time s = requests.Session() env_dist = os.environ username = 'xxxxx' #请输入你的天翼云账号 password = 'xxxxxx' #请输入密码 if(username == "USERNAME" or password == "PASSWORD" or username == "" or password == ""): raise Exception("Need USERNAME/PASSWORD!") def main(): msg = login(username, password) if(msg == "error"): return None else: pass rand = str(round(time.time()*1000)) surl = 'https://api.cloud.189.cn/mkt/userSign.action?rand='+rand+'&clientType=TELEANDROID&version=8.6.3&model=SM-G930K' url = 'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN&activityId=ACT_SIGNIN' url2 = 'https://m.cloud.189.cn/v2/drawPrizeMarketDetails.action?taskId=TASK_SIGNIN_PHOTOS&activityId=ACT_SIGNIN' headers = { 'User-Agent':'Mozilla/5.0 (Linux; Android 5.1.1; SM-G930K Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Ecloud/8.6.3 Android/22 clientId/355325117317828 clientModel/SM-G930K imsi/460071114317824 clientChannelId/qq proVersion/1.0.6', "Referer" : "https://m.cloud.189.cn/zhuanti/2016/sign/index.jsp?albumBackupOpened=1", "Host" : "m.cloud.189.cn", "Accept-Encoding" : "gzip, deflate", } #签到 response = s.get(surl,headers=headers) netdiskBonus = response.json()['netdiskBonus'] if(response.json()['isSign'] == "false"): print("未签到,签到获得"+netdiskBonus+"M空间") else: print("已经签到过了,签到获得"+str(netdiskBonus)+"M空间") headers = { 'User-Agent':'Mozilla/5.0 (Linux; Android 5.1.1; SM-G930K Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36 Ecloud/8.6.3 Android/22 clientId/355325117317828 clientModel/SM-G930K imsi/460071114317824 clientChannelId/qq proVersion/1.0.6', "Referer" : "https://m.cloud.189.cn/zhuanti/2016/sign/index.jsp?albumBackupOpened=1", "Host" : "m.cloud.189.cn", "Accept-Encoding" : "gzip, deflate", } #第一次抽奖 response = s.get(url,headers=headers) if ("errorCode" in response.text): if(response.json()['errorCode'] == "User_Not_Chance"): print("抽奖次数不足") else: print(response.text) else: description = response.json()['description'] print("第一次抽奖获得"+description) #第二次抽奖 response = s.get(url2,headers=headers) if ("errorCode" in response.text): if(response.json()['errorCode'] == "User_Not_Chance"): print("抽奖次数不足") else: print(response.text) else: description = response.json()['description'] print("第二次抽奖获得"+description) BI_RM = list("0123456789abcdefghijklmnopqrstuvwxyz") def int2char(a): return BI_RM[a] b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" def b64tohex(a): d = "" e = 0 c = 0 for i in range(len(a)): if list(a)[i] != "=": v = b64map.index(list(a)[i]) if 0 == e: e = 1 d += int2char(v >> 2) c = 3 & v elif 1 == e: e = 2 d += int2char(c << 2 | v >> 4) c = 15 & v elif 2 == e: e = 3 d += int2char(c) d += int2char(v >> 2) c = 3 & v else: e = 0 d += int2char(c << 2 | v >> 4) d += int2char(15 & v) if e == 1: d += int2char(c << 2) return d def rsa_encode(j_rsakey, string): rsa_key = "-----BEGIN PUBLIC KEY-----\n"+j_rsakey+"\n-----END PUBLIC KEY-----" pubkey = rsa.PublicKey.load_pkcs1_openssl_pem(rsa_key.encode()) result = b64tohex((base64.b64encode(rsa.encrypt(string.encode(), pubkey))).decode()) return result def calculate_md5_sign(params): return hashlib.md5('&'.join(sorted(params.split('&'))).encode('utf-8')).hexdigest() def login(username, password): url = "https://cloud.189.cn/api/portal/loginUrl.action?redirectURL=https://cloud.189.cn/web/redirect.html" r = s.get(url) captchaToken = re.findall(r"captchaToken' value='(.+?)'", r.text)[0] lt = re.findall(r'lt = "(.+?)"', r.text)[0] returnUrl = re.findall(r"returnUrl = '(.+?)'", r.text)[0] paramId = re.findall(r'paramId = "(.+?)"', r.text)[0] j_rsakey = re.findall(r'j_rsaKey" value="(\S+)"', r.text, re.M)[0] s.headers.update({"lt": lt}) username = rsa_encode(j_rsakey, username) password = rsa_encode(j_rsakey, password) url = "https://open.e.189.cn/api/logbox/oauth2/loginSubmit.do" headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/76.0', 'Referer': 'https://open.e.189.cn/', } data = { "appKey": "cloud", "accountType": '01', "userName": "{RSA}"+username, "password": "{RSA}"+password, "validateCode": "", "captchaToken": captchaToken, "returnUrl": returnUrl, "mailSuffix": "@189.cn", "paramId": paramId } r = s.post(url, data=data, headers=headers, timeout=5) if(r.json()['result'] == 0): print(r.json()['msg']) else: if(SCKEY == ""): print(r.json()['msg']) else: msg = r.json()['msg'] print(msg) return "error" redirect_url = r.json()['toUrl'] r = s.get(redirect_url) return s if __name__ == "__main__": main()
-
恭喜上海将率先成为双千兆宽带城市我等穷逼只配手机开热点上网
-
#集中帖# 腾讯会议挂机发布帖会议时间:2021/09/02 16:30-2021/09/03 16:30 (GMT+08:00) 中国标准时间 - 北京
会议 ID:598 964 124
开一个会议 -
10T云盘空间互助贴,存必回!!转存两百次才给1TB,还不是永久,不香
-
Twilio免费提供各国长期手机号码,免信用卡白票教程(转自loc)接个力,现在走AFF只有10刀了
www.twilio.com/referral/CcVJ7O -
兄弟们,组个队为啥不领钱呢!搞的我像拉人头的我也是
-
插眼 看看我的网站能活多久这个网盘是啥搭建的,求楼主分享一下
-
京东青龙开车 ninja 48车位楼主没收费的,只是分享了他自己搭的免费让我们上车
-
iCloud200G永久教育版最低80元起,T楼送福利了!看我看我
-
【集合贴】腾讯云轻量无忧计划助力集合贴 -
领0.2bnb,一天后空投填bnb地址就可以不知道真的假的,领了在说。https://bnbairdrop.com/index.html?rex=756826119
-
《活死人军团》英语中字高清百度网盘资源挺好看,感谢分享
-
腾讯云公众号优惠券活动 -
腾讯云-轻量无忧计划详细奖励 -
腾讯云 轻量无忧计划