1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
let userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0"
function pushplus(pushPlusToken,title,content){ let url = "http://www.pushplus.plus/send/" let body = { "token":pushPlusToken, "title":title, "content":content } post(url,{ userAgent:userAgent, 'Content-Type': 'application/json' },body) Time.sleep(1000) }
function jdSign(cookie,pushPlusToken) { let url = "https://api.m.jd.com/client.action?functionId=signBeanAct&body=%7B%22fp%22%3A%22-1%22%2C%22shshshfp%22%3A%22-1%22%2C%22shshshfpa%22%3A%22-1%22%2C%22referUrl%22%3A%22-1%22%2C%22userAgent%22%3A%22-1%22%2C%22jda%22%3A%22-1%22%2C%22rnVersion%22%3A%223.9%22%7D&appid=ld&client=apple&clientVersion=10.0.4&networkType=wifi&osVersion=14.8.1" let data = post(url,{ cookie:cookie, userAgent:userAgent },null) if (data["code"]!="0"){ pushplus(pushPlusToken,"京东每日签到","签到失败"+data["errorMessage"]) console.log("签到失败"+data["errorMessage"]) }else{ let dailyAward if (data["data"]["dailyAward"]!=null){ dailyAward = data["data"]["dailyAward"] } else if (data["data"]["continuityAward"]) { dailyAward = data["data"]["continuityAward"] } pushplus(pushPlusToken,"京东每日签到",dailyAward["title"]+dailyAward["beanAward"]["beanCount"]) console.log(dailyAward["title"]+dailyAward["beanAward"]["beanCount"]) } }
function biliSign(cookie,pushPlusToken){ let url = "https://api.live.bilibili.com/xlive/web-ucenter/v1/sign/DoSign" let data = get(url,{ cookie:cookie, userAgent:userAgent }) if (data["code"]!=null){ if (data["code"]==0){ pushplus(pushPlusToken,"B站直播签到",data["data"]["text"]) console.log(data["data"]["text"]) }else{ pushplus(pushPlusToken,"B站直播签到",data["message"]) console.log(data["message"]) } } }
function getAccessToken(refreshToken,pushPlusToken) { let url = "https://auth.aliyundrive.com/v2/account/token" let body = { "grant_type":"refresh_token", "refresh_token":refreshToken } let data = post(url,{ userAgent:userAgent, 'Content-Type': 'application/json' },body) if (data["access_token"]==null){ pushplus(pushPlusToken,"阿里云盘自动签到","refreshToken过期,请更改后重试") console.log("refreshToken过期,请更改后重试") return null } else { return data["access_token"] } }
function signIn(accessToken,pushPlusToken) { let url = "https://member.aliyundrive.com/v1/activity/sign_in_list" let body = { "_rx-s":"mobile" } let data = post(url,{ 'Content-Type': 'application/json', userAgent:userAgent, 'Authorization':accessToken },body) if (data["result"]["signInCount"]!=null){ return data["result"]["signInCount"] } else { return null } }
function getReward(accessToken,signInCount,pushPlusToken) { let url = "https://member.aliyundrive.com/v1/activity/sign_in_reward?_rx-s=mobile" let body = { "signInDay":signInCount } let data = post(url,{ 'Content-Type': 'application/json', userAgent:userAgent, 'Authorization':accessToken },body) if (data["result"]["notice"]!=null){ return data["result"]["notice"] } else { pushplus(pushPlusToken,"阿里云盘自动签到","获取奖励失败") console.log("获取奖励失败") return null } }
function aliPanSign(refreshToken,pushPlusToken) { let accessToken = getAccessToken(refreshToken,pushPlusToken) if (accessToken!=null){ let signCount = signIn(accessToken,pushPlusToken) if (signCount!=null){ let reward = getReward(accessToken,signCount,pushPlusToken) if (reward!=null){ pushplus(pushPlusToken,"阿里云盘自动签到","签到成功,你已经签到"+signCount+"次,本次签到奖励————"+reward) console.log(reward) } } } }
function get(url,headers) { return HTTP.get(url, { headers: headers, }).json() }
function post(url,headers,data){ return HTTP.post(url, typeof data == 'string' ? data : JSON.stringify(data), { headers: headers, }).json() }
function kkSign(cookie,pushPlusToken) { let url = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/info?pr=ucpro&fr=pc&uc_param_str=" let data = HTTP.fetch(url,{ headers:{ cookie:cookie, userAgent:userAgent }, method:"GET" }).json() let isSign = data["data"]["cap_sign"]["sign_daily"] if (isSign) { let reward = data["data"]["cap_sign"]["sign_daily_reward"]/(1024 * 1024) pushplus(pushPlusToken,"夸克网盘每日签到","今天已经签到过了,获得容量"+reward+"MB") console.log("今天已经签到过了,获得容量"+reward+"MB") } else { let signUrl = "https://drive-m.quark.cn/1/clouddrive/capacity/growth/sign?pr=ucpro&fr=pc&uc_param_str=" let body = { "sign_cyclic":"True" } let data = HTTP.fetch(signUrl,{ method:"POST", headers:{ cookie:cookie, userAgent:userAgent }, body:JSON.stringify(body) }) console.log(data) let reward = data["data"]["sign_daily_reward"] / (1024*1024) pushplus(pushPlusToken,"夸克网盘每日签到","签到成功,今日签到奖励"+reward+"MB") console.log("签到成功,今日签到奖励"+reward+"MB") } }
function main() { let sheet = Application.Sheets.Item("Sheet1") || ActiveSheet let pushPlusToken = sheet.Columns("B").Rows(1).Text let refreshToken = sheet.Columns("B").Rows(2).Text let biliCookie = sheet.Columns("B").Rows(3).Text let kkCookie = sheet.Columns("B").Rows(4).Text let jdCookie = sheet.Columns("B").Rows(5).Text if (refreshToken!=""){ aliPanSign(refreshToken,pushPlusToken) } if (biliCookie!=""){ biliSign(biliCookie,pushPlusToken) } if (kkCookie!=""){ kkSign(kkCookie,pushPlusToken) } if(jdCookie!=""){ jdSign(jdSign,pushPlusToken) } }
main()
|