(.*?)
', response1, re.S)) 90 | response2 = response2.replace('', '') 91 | response2 = response2.replace('
', '') 92 | response2 = response2.replace(' 1个æªå¼å¯ ', '') 93 | random_wait() 94 | response1 = requests.get("https://account.weibo.com/set/index", headers=header).text 95 | response3 = "".join(re.findall("'nick':'(.*?)',", response1, re.S)) 96 | response3 = response3.replace(':', '') 97 | response3 = response3.replace("'nick''", '') 98 | response3 = response3.replace("',", '') 99 | content = content + "登录名:{},昵称:{} 完成超话签到。\n\n".format(response2,response3) 100 | 101 | 102 | except: 103 | content =content + '签到失败,可能是cookie失效,请及时更新cookie。\n\n' 104 | 105 | push(content) 106 | print("已完成签到.") 107 | -------------------------------------------------------------------------------- /woniuyuedu.js: -------------------------------------------------------------------------------- 1 | /* 2 | 微信阅读 3 | 阅读入口,复制链接微信打开 4 | https://lh100-1253806495.cos.ap-beijing.myqcloud.com/index.html?carteamflg=100036&extflg=undefined变量名称:woniu 5 | 6 | 抓包搜索关键词 userid 和passport passport@userid 7 | 多账号换行即可 8 | 黄鸟在文本里面可以抓到userid 和passport 9 | 10 | 每2小时刷新一轮50篇文章 11 | 每日50篇 不上线 12 | 定时一小时一次 一天跑6次 13 | 14 | */ 15 | 16 | 17 | const $ = new Env("蜗牛阅读"); 18 | const notify = $.isNode() ? require('./sendNotify') : ''; 19 | let envSplitor = ['@', '\n'] 20 | let httpResult, httpReq, httpResp 21 | let ckName = 'woniu' 22 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 23 | let userList = [] 24 | let userIdx = 0 25 | let userCount = 0 26 | var msg = '' 27 | let newurl = "https://api.shandian.shandianyueche.com/task/Task.php" 28 | /////////////////////////////////////////////////////////////////// 29 | class UserInfo { 30 | constructor(str,id) { 31 | this.index = ++userIdx, 32 | this.idx = `账号[${this.index}] `, 33 | this.ck = str//.split('#'), this.u = this.ck[0], this.t = this.ck[1] 34 | this.userid=id 35 | } 36 | 37 | async getreadurl(id) { 38 | try { 39 | //用户领取任务 40 | // let t = Date.now() 41 | // this.ul = newurl; 42 | let body = {act:"userDrawReadTaskBaidu",passport:this.ck,task_id:id} 43 | let urlObject = popu(newurl, body,this.ck) 44 | //let urlObject = popu(this.ul, body,this.ck) 45 | await httpRequest('post', urlObject) 46 | let result = httpResult; 47 | if ( result && result.code==='0') { 48 | console.log(result.msg+",任务id:"+result.data.user_task_id) 49 | await this.read(result.data.user_task_id) 50 | 51 | } 52 | /* 53 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 54 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 55 | await $.wait(6000), await this.readfinish()); 56 | */ 57 | } catch (e) { 58 | console.log(e) 59 | } 60 | } 61 | 62 | //提交任务 63 | async read(user_task_id) { 64 | try { 65 | let t = Date.now() 66 | //readurl = decodeURIComponent(readurl); 67 | var sj = Math.random() * 20000+ 8000 68 | 69 | //等待时间提交 70 | await $.wait(sj) 71 | let body = {act:"finishUserReadTaskBaidu",passport:this.ck,user_task_id:user_task_id} 72 | let urlObject = popu(newurl, body,this.ck) 73 | await httpRequest('post', urlObject) 74 | let result= httpResult; 75 | if(result && result.code==='0'){ 76 | //获取用户阅读金额 77 | console.log('阅读成功金币+100') 78 | }else{ 79 | console.log(result.meg) 80 | } 81 | } catch (e) { 82 | console.log(e) 83 | } finally { 84 | return Promise.resolve(1); 85 | } 86 | } 87 | async readfinish() { 88 | try { 89 | 90 | this.url=newurl+'/tuijian/do_read?for=&zs=&pageshow=&r=0.7882316111246435&jkey='+this.jkey 91 | let body = ``; 92 | let urlObject = popu(this.url, body,this.ck) 93 | //console.log(urlObject) 94 | await httpRequest('get', urlObject) 95 | let result = httpResult; 96 | if (result && result.success_msg) { 97 | console.log(result.success_msg) 98 | } else { 99 | console.log(result) 100 | } 101 | 102 | /* 103 | "success" == result.msg && console.log(`增加金币-> ${result.info.num} 阅读次数 ${result.info.read_num} 当前金币 ${result.info.read_money}`), 104 | result.code > 200 && (console.log(`已达到阅读量 等待刷新`), this.fx = 1); 105 | */ 106 | } catch (e) { 107 | console.log(e) 108 | } finally { 109 | return Promise.resolve(1); 110 | } 111 | } 112 | async getreadinfo() { 113 | try { 114 | let t = Date.now() 115 | let url = newurl; 116 | let body = {act:"getReadTaskListBaidu",passport:this.ck} 117 | let urlObject = popu(url, body,'') 118 | await httpRequest('post', urlObject) 119 | let result = httpResult; 120 | if(result && result.ret==='succ'){ 121 | return result.task_list 122 | } 123 | } catch (e) { 124 | console.log(e) 125 | } 126 | } 127 | 128 | async getmoney() { 129 | try { 130 | let t = Date.now() 131 | let url = newurl; 132 | let body = {act:"getUserMoneyAccounts",passport:this.ck} 133 | let urlObject = popu(url, body,this.ck) 134 | await httpRequest('get', urlObject) 135 | let result = httpResult; 136 | if (result && result.ret==='succ') { 137 | result = result.money_account 138 | console.log(`\n当前账号余额 ${result.read_money}分 \n`) 139 | } 140 | } catch (e) { 141 | console.log(e) 142 | } finally { 143 | return Promise.resolve(1); 144 | } 145 | } 146 | 147 | 148 | async withdrawal() { 149 | try { 150 | let t = Date.now() 151 | let url = newurl+`/withdrawal`; 152 | let body = ``; 153 | let urlObject = popu(url, body,this.ck) 154 | await httpRequest('get', urlObject) 155 | let result = httpResult; 156 | if (result.data.user) { 157 | result = result.data.user 158 | console.log(`\n当前账号余额 ${result.score}分 \n`) 159 | if (this.ck.indexOf('##') != -1) return 160 | this.f = parseInt(result.score)//= Number(Math.floor(result.info.sum / 1000)) 161 | /* 162 | if (this.f < 3) console.log(`\n 不满足0.3 提现门槛\n`) 163 | this.f >= 3 && this.f < 5 && (this.cash = .3), this.f >= 10 && this.f < 20 && (this.cash = 1), this.f >= 20 && this.f < 50 && (this.cash = 2), 164 | this.f >= 50 && this.f < 100 && (this.cash = 2), this.f >= 100 && this.f < 200 && (this.cash = 10), this.f >= 200 && (this.cash = 20) 165 | if (this.f >= 3) console.log(`\n可以提现 ${result.info.sum}金币 去提现 ${this.cash} 元\n`), await this.exchange() 166 | */ 167 | if (this.f < 30) { 168 | console.log(`不满足0.3 提现门槛`) 169 | } else { 170 | console.log(`去提现${this.f/100}元。。。。。。`) 171 | await this.doWithdraw(this.f) 172 | } 173 | } 174 | } catch (e) { 175 | console.log(e) 176 | } finally { 177 | return Promise.resolve(1); 178 | } 179 | } 180 | async doWithdraw(tx) { 181 | try { 182 | let t = Date.now() 183 | let url = newurl+`/withdrawal/doWithdraw`; 184 | let body = `amount=` + tx; 185 | let urlObject = popu(url, body,this.ck) 186 | await httpRequest('post', urlObject) 187 | let result = httpResult; 188 | console.log(result) 189 | 190 | } catch (e) { 191 | console.log(e) 192 | } finally { 193 | return Promise.resolve(1); 194 | } 195 | } 196 | 197 | async gettasklist() { 198 | try { 199 | let tasklist=await this.getreadinfo() 200 | if (tasklist && tasklist.length>0) { 201 | //await this.getreadurl(tasklist[0].id) 202 | for (let i = 0;i< tasklist.length;i++) { 203 | //console.log(tasklist[i].id) 204 | await this.getreadurl(tasklist[i].id) 205 | } 206 | // await this.getreadinfo() 207 | //await $.wait(15000) 208 | 209 | } 210 | 211 | } catch (e) { 212 | console.log(e) 213 | } 214 | } 215 | 216 | async task() { 217 | try { 218 | 219 | let abc = [...new Array(15).keys()] 220 | console.log(`\n=========== ${this.idx} 开始阅读文章 ===========\n`) 221 | 222 | 223 | 224 | for(let i=0;i<=10;i++){ 225 | await this.gettasklist() 226 | } 227 | 228 | 229 | 230 | // let tasklist=await this.getreadinfo() 231 | // if (tasklist && tasklist.length>0) { 232 | // for (let i = 0;i< tasklist.length;i++) { 233 | // //console.log(tasklist[i].id) 234 | // await this.getreadurl(3607) 235 | // } 236 | // // await this.getreadinfo() 237 | // //await $.wait(15000) 238 | 239 | // } 240 | // await this.withdrawal() 241 | 242 | } catch (e) { 243 | console.log(e) 244 | } finally { 245 | return Promise.resolve(1); 246 | } 247 | } 248 | } 249 | 250 | 251 | !(async () => { 252 | if (typeof $request !== "undefined") { 253 | await GetRewrite() 254 | } else { 255 | 256 | if (!(await checkEnv())) { 257 | console.log('环境变量错误,检查环境变量后在执行') 258 | return; 259 | } 260 | 261 | if (userList.length > 0) { 262 | 263 | // console.log('获取到newurl:'+newurl) 264 | for (let user of userList) { 265 | await gethost(user.ck,user.userid) 266 | await user.task() 267 | } 268 | if (msg) await notify.sendNotify('微信阅读检测文章',msg) 269 | } 270 | } 271 | })() 272 | .catch((e) => console.log(e)) 273 | .finally(() => $.done()) 274 | 275 | /////////////////////////////////////////////////////////////////// 276 | 277 | async function gethost(ck,userid) { 278 | //构建请求体 279 | try { 280 | let t = Date.now() 281 | let url = 'https://api.shandian.shandianyueche.com/task/Task.php'; 282 | let body = {act:"getUserInfoByID",passport:ck,userid:userid} 283 | let urlObject = popugethost(url, body) 284 | await httpRequest('post', urlObject) 285 | let result = httpResult; 286 | if (result.ret==='succ') { 287 | console.log('账号登录成功') 288 | } 289 | } catch (e) { 290 | console.log(e) 291 | } finally { 292 | return Promise.resolve(1); 293 | } 294 | } 295 | 296 | //获取环境变量的ck 放到userList中去 297 | async function checkEnv() { 298 | if (userCookie) { 299 | for(let userCookies of userCookie.split(envSplitor[1])){ 300 | 301 | let aa=userCookies.split(envSplitor[0]) 302 | userList.push(new UserInfo(aa[0],aa[1])) 303 | } 304 | userCount = userList.length 305 | } else { 306 | console.log(`找到[${ckName}] 变量 配置错误`) 307 | return false 308 | } 309 | console.log(`找到[${ckName}] 变量 ${userCount}个账号`) 310 | 311 | return true 312 | } 313 | 314 | //////////////////////////////////////////////////////////////////// 315 | 316 | //组装请求头 317 | function popu(url, body = '',ck) { 318 | let host = url.replace('//', '/').split('/')[1] 319 | let urlObject = { 320 | url: url, 321 | headers: { 322 | "Host": host, 323 | "Content-Type":"application/x-www-form-urlencoded", 324 | "Origin": "http://read.imoney888.shop", 325 | "User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4425 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/4883 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", 326 | "Accept": "*/*", 327 | "Referer": "http://read.imoney888.shop" 328 | }, 329 | timeout: 6000, 330 | form:body 331 | } 332 | return urlObject; 333 | } 334 | function popugethost(url, body = '') { 335 | let host = url.replace('//', '/').split('/')[1] 336 | let urlObject = { 337 | url: url, 338 | headers: { 339 | "Host": host, 340 | "Content-Type":"application/x-www-form-urlencoded", 341 | "Origin": "http://read.imoney888.shop", 342 | "User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4425 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/4883 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", 343 | "Accept": "*/*", 344 | "Referer": "http://read.imoney888.shop" 345 | }, 346 | form: body, 347 | timeout: 6000, 348 | } 349 | return urlObject; 350 | } 351 | 352 | async function httpRequest(method, url) { 353 | //console.log(url) 354 | httpResult = null, httpReq = null, httpResp = null; 355 | return new Promise((resolve) => { 356 | $.send(method, url, async (err, req, resp) => { 357 | try { 358 | httpReq = req; 359 | httpResp = resp; 360 | if (err) { 361 | } else { 362 | if (resp.body) { 363 | if (typeof resp.body == "object") { 364 | httpResult = resp.body; 365 | } else { 366 | try { 367 | httpResult = JSON.parse(resp.body); 368 | } catch (e) { 369 | httpResult = resp.body; 370 | } 371 | } 372 | } 373 | } 374 | } catch (e) { 375 | console.log(e); 376 | } finally { 377 | resolve(); 378 | } 379 | }); 380 | }); 381 | } 382 | //////////////////////////////////////////////////////////////////// 383 | function Env(a, b) { 384 | return "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0), new class { 385 | constructor(a, b) { 386 | this.name = a, this.notifyStr = "", this.startTime = (new Date).getTime(), Object.assign(this, b), console.log(`${this.name} 开始运行: 387 | `) 388 | } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getdata(b) { let a = this.getval(b); if (/^@/.test(b)) { let [, c, f] = /^@(.*?)\.(.*?)$/.exec(b), d = c ? this.getval(c) : ""; if (d) try { let e = JSON.parse(d); a = e ? this.lodash_get(e, f, "") : a } catch (g) { a = "" } } return a } setdata(c, d) { let a = !1; if (/^@/.test(d)) { let [, b, e] = /^@(.*?)\.(.*?)$/.exec(d), f = this.getval(b), i = b ? "null" === f ? null : f || "{}" : "{}"; try { let g = JSON.parse(i); this.lodash_set(g, e, c), a = this.setval(JSON.stringify(g), b) } catch (j) { let h = {}; this.lodash_set(h, e, c), a = this.setval(JSON.stringify(h), b) } } else a = this.setval(c, d); return a } getval(a) { return this.isSurge() || this.isLoon() ? $persistentStore.read(a) : this.isQuanX() ? $prefs.valueForKey(a) : this.isNode() ? (this.data = this.loaddata(), this.data[a]) : this.data && this.data[a] || null } setval(b, a) { return this.isSurge() || this.isLoon() ? $persistentStore.write(b, a) : this.isQuanX() ? $prefs.setValueForKey(b, a) : this.isNode() ? (this.data = this.loaddata(), this.data[a] = b, this.writedata(), !0) : this.data && this.data[a] || null } send(b, a, f = () => { }) { if ("get" != b && "post" != b && "put" != b && "delete" != b) { console.log(`无效的http方法:${b}`); return } if ("get" == b && a.headers ? (delete a.headers["Content-Type"], delete a.headers["Content-Length"]) : a.body && a.headers && (a.headers["Content-Type"] || (a.headers["Content-Type"] = "application/x-www-form-urlencoded")), this.isSurge() || this.isLoon()) { this.isSurge() && this.isNeedRewrite && (a.headers = a.headers || {}, Object.assign(a.headers, { "X-Surge-Skip-Scripting": !1 })); let c = { method: b, url: a.url, headers: a.headers, timeout: a.timeout, data: a.body }; "get" == b && delete c.data, $axios(c).then(a => { let { status: b, request: c, headers: d, data: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }).catch(a => console.log(a)) } else if (this.isQuanX()) a.method = b.toUpperCase(), this.isNeedRewrite && (a.opts = a.opts || {}, Object.assign(a.opts, { hints: !1 })), $task.fetch(a).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, a => f(a)); else if (this.isNode()) { this.got = this.got ? this.got : require("got"); let { url: d, ...e } = a; this.instance = this.got.extend({ followRedirect: !1 }), this.instance[b](d, e).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, b => { let { message: c, response: a } = b; f(c, a, a && a.body) }) } } time(a) { let b = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "h+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; for (let c in /(y+)/.test(a) && (a = a.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))), b) new RegExp("(" + c + ")").test(a) && (a = a.replace(RegExp.$1, 1 == RegExp.$1.length ? b[c] : ("00" + b[c]).substr(("" + b[c]).length))); return a } async showmsg() { if (!this.notifyStr) return; let a = this.name + " \u8FD0\u884C\u901A\u77E5\n\n" + this.notifyStr; if ($.isNode()) { var b = require("./sendNotify"); console.log("\n============== \u63A8\u9001 =============="), await b.sendNotify(this.name, a) } else this.msg(a) } logAndNotify(a) { console.log(a), this.notifyStr += a, this.notifyStr += "\n" } msg(d = t, a = "", b = "", e) { let f = a => { if (!a) return a; if ("string" == typeof a) return this.isLoon() ? a : this.isQuanX() ? { "open-url": a } : this.isSurge() ? { url: a } : void 0; if ("object" == typeof a) { if (this.isLoon()) { let b = a.openUrl || a.url || a["open-url"], c = a.mediaUrl || a["media-url"]; return { openUrl: b, mediaUrl: c } } if (this.isQuanX()) { let d = a["open-url"] || a.url || a.openUrl, e = a["media-url"] || a.mediaUrl; return { "open-url": d, "media-url": e } } if (this.isSurge()) return { url: a.url || a.openUrl || a["open-url"] } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(d, a, b, f(e)) : this.isQuanX() && $notify(d, a, b, f(e))); let c = ["", "============== \u7CFB\u7EDF\u901A\u77E5 =============="]; c.push(d), a && c.push(a), b && c.push(b), console.log(c.join("\n")) } getMin(a, b) { return a < b ? a : b } getMax(a, b) { return a < b ? b : a } padStr(e, b, f = "0") { let a = String(e), g = b > a.length ? b - a.length : 0, c = ""; for (let d = 0; d < g; d++)c += f; return c + a } json2str(b, e, f = !1) { let c = []; for (let d of Object.keys(b).sort()) { let a = b[d]; a && f && (a = encodeURIComponent(a)), c.push(d + "=" + a) } return c.join(e) } str2json(e, f = !1) { let d = {}; for (let a of e.split("#")) { if (!a) continue; let b = a.indexOf("="); if (-1 == b) continue; let g = a.substr(0, b), c = a.substr(b + 1); f && (c = decodeURIComponent(c)), d[g] = c } return d } randomString(d, a = "abcdef0123456789") { let b = ""; for (let c = 0; c < d; c++)b += a.charAt(Math.floor(Math.random() * a.length)); return b } randomList(a) { let b = Math.floor(Math.random() * a.length); return a[b] } wait(a) { return new Promise(b => setTimeout(b, a)) } done(a = {}) { 389 | let b = (new Date).getTime(), c = (b - this.startTime) / 1e3; console.log(` 390 | ${this.name} 运行结束,共运行了 ${c} 秒!`), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(a) 391 | } 392 | }(a, b) 393 | } 394 | -------------------------------------------------------------------------------- /wps.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | from fun import wpswx 4 | from fun import wpspc 5 | from fun import pu 6 | import notify 7 | 8 | sen='' 9 | 10 | def SenWx(): 11 | global sen 12 | senp='' 13 | wps_wx = os.getenv("wps_wx") 14 | if not wps_wx: 15 | senp='🙃wps 微信 CK 变量未设置' 16 | exit() 17 | wps_wx_list = wps_wx.split('&') 18 | senp=senp+'\n'+"-------------------总共" + str(int(len(wps_wx_list))) + "个wps_微信CK-------------------" 19 | for mt_token in wps_wx_list: 20 | ck = pu.convert_cookies_to_dict(mt_token) 21 | try: 22 | wx = wpswx.wps(ck["csrftoken"], ck["wps_sid"]) 23 | Ch = wx.GetCheck() 24 | Da = None 25 | IsOK = False 26 | senp=senp+'\n'+f"👇👇👇在打卡中👇👇👇" 27 | for i in range(1, 20): 28 | wx.GetCode() 29 | time.sleep(0.5) 30 | if wx.SenSign(): 31 | time.sleep(0.5) 32 | Da = wx.get_data() 33 | IsOK = True 34 | break 35 | time.sleep(1) 36 | senp=senp+'\n'+"昵称:" + Ch['nickname'] 37 | if IsOK: 38 | senp=senp+'\n'+"打卡成功" 39 | else: 40 | senp=senp+'\n'+"打卡失败" 41 | senp=senp+'\n'+f"我成功打卡{str(Da['total_add_day'])}天" 42 | senp=senp+'\n'+f"今日共计{Da['pool_day']}人参与" 43 | senp=senp+'\n'+f"共计{Da['statistics']['success']}人成功,共计{Da['statistics']['fail']}人失败" 44 | senp=senp+'\n'+f'累计人{Da["total_sign_up"]}领取奖励' 45 | senp=senp+'\n'+f"👆👆👆打卡完毕👆👆👆\n" 46 | except Exception as e: 47 | senp=senp+'\n'+"出错了!详细错误👇错误CK👉" + mt_token 48 | senp=senp+'\n'+str(e) 49 | print(senp) 50 | sen=sen+senp 51 | 52 | 53 | def SenPC(): 54 | global sen 55 | senp = '' 56 | wps_pc = os.getenv("wps_pc") 57 | if not wps_pc: 58 | senp='🙃wps PC CK 变量未设置' 59 | exit() 60 | wps_pc_list = wps_pc.split('&') 61 | senp=senp+'\n'+"-------------------总共" + str(int(len(wps_pc_list))) + "个wps_PC CK-------------------" 62 | for mt_token in wps_pc_list: 63 | ck = pu.convert_cookies_to_dict(mt_token) 64 | try: 65 | pc = wpspc.wps(ck["wpsua"], ck["wps_sid"]) 66 | Ch = pc.GetCheck() 67 | senp=senp+'\n'+f"👇👇👇在打卡中👇👇👇" 68 | senp=senp+'\n'+"🎁开始👉会员时效签到👇" 69 | senp=senp+'\n'+"昵称:" + Ch['nickname'] 70 | if pc.Signin(): 71 | senp=senp+'\n'+"打卡成功" 72 | else: 73 | senp=senp+'\n'+"打卡失败" 74 | Q = pc.GetQuota() // 3600 75 | senp=senp+'\n'+pc.Index() 76 | senp=senp+'\n'+f"当前时间额度为{str(Q)}小时({Q//24}天)" 77 | senp=senp+'\n'+"🎁开始👉空间签到👇" 78 | if pc.SenSpace(): 79 | senp=senp+'\n'+"签到成功" 80 | else: 81 | senp=senp+'\n'+"签到失败" 82 | senp=senp+'\n'+pc.GetSpace() 83 | senp=senp+'\n'+f"👆👆👆打卡完毕👆👆👆\n" 84 | except Exception as e: 85 | senp=senp+'\n'+"出错了!详细错误👇错误CK👉" + mt_token 86 | senp=senp+'\n'+str(e) 87 | print(senp) 88 | sen=sen+senp 89 | 90 | 91 | if __name__ == '__main__': 92 | SenWx() 93 | SenPC() 94 | notify.send('WPS打卡',sen) 95 | -------------------------------------------------------------------------------- /wx_kkjyd.js: -------------------------------------------------------------------------------- 1 | /* 2 | kuikoukou 3 | 教程:https:wjkjy.cn 4 | 看看集阅读 5 | 需要青龙环境 6 | 入口:微信打开:http://image.wjkjy.cn/2023/03/18/6645357418916.png 7 | 点击获取看看地址得到链接,最好自己看两篇再运行,防止黑号 8 | 填写变量 kkjyd ,直接填写链接中t=内的值(不要t=),多账户换行隔开 9 | 单次运行只阅读15篇 10 | */ 11 | 12 | const $ = new Env("看看集阅读"); 13 | const notify = $.isNode() ? require('./sendNotify') : ''; 14 | let envSplitor = ['@', '\n'] 15 | let httpResult, httpReq, httpResp 16 | let ckName = 'kkjyd' 17 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 18 | let userList = [] 19 | let userIdx = 0 20 | let userCount = 0 21 | var msg = '' 22 | // var tid = '' 23 | var cishu = 10 24 | var jiance = 0 //1获取文章 , 0阅读 25 | let newurl = "http://kkj.ymzwhcm.com/code008/ydt2" 26 | /////////////////////////////////////////////////////////////////// 27 | class UserInfo { 28 | constructor(str) { 29 | //console.log(str) 30 | this.istx = 1 31 | if (str.indexOf('##')!=-1) this.istx=0 32 | this.index = ++userIdx, this.idx = `账号[${this.index}] `, this.ticket = process.env[ckName]//str.split('&')[0]//, this.secret = str.split('&')[1]//.split('#'), this.u = this.ck[0], this.t = this.ck[1] 33 | } 34 | // async function getnowsceond(){ 35 | // return Math.floor(Date.now()/ 1000) 36 | // } 37 | // async function getTimeInfo(nTimeStamps) { 38 | // //转毫秒\n 39 | // var date = new Date(nTimeStamps * 1000); 40 | // //返回数据\n 41 | // var retData = { 42 | // nYear: date.getFullYear(), 43 | // nMonth: date.getMonth() + 1, 44 | // nDay: date.getDate(), 45 | // nHour: date.getHours(), 46 | // nMinutes: date.getMinutes(), 47 | // nSeconds: date.getSeconds() 48 | // }; 49 | // return retData; 50 | // } 51 | // await getTimeInfo(nYear) 52 | // var a = getnowsceond() 53 | // var timeinfo = getTimeInfo(a) 54 | // // console.log(date); 55 | // console.log(timeinfo); 56 | // console.log("timeInfo=%s",JSON.stringify(timeinfo)); 57 | async dotask() { 58 | try { 59 | let t = Date.now() 60 | this.ul = newurl+`/getTask?`; 61 | let body = 'ticket='+this.ticket+'&_t=0.6519685395293324'; 62 | let urlObject = popu(this.ul, body,this.ticket) 63 | await httpRequest('post', urlObject) 64 | let result = httpResult; 65 | // this.tid = result.data.tgid 66 | // var tid = result.data.tgid 67 | // console.log(result) 68 | if ( result.msg == 'OK') { 69 | this.tid = result.data.tgid 70 | this.jiance = result.code 71 | if (this.tid == '') { 72 | console.log('未获取到文章id,退出'); 73 | // this.jiance = result.code 74 | } 75 | // this.tid = result.data.tgid 76 | // console.log( '任务ID:'+result.data.tgid) 77 | 78 | // msg += '\n' + result.data.tgid + '\n' 79 | // else { 80 | // await this.jump(result.data.tgid) 81 | // } 82 | 83 | 84 | } else if (result.code == -1){ 85 | console.log('下次阅读时间:', result.msg) 86 | this.jiance = result.code 87 | } else if (result.code == 500){ 88 | console.log(result.msg) 89 | this.jiance = result.code 90 | } else { 91 | console.log(result) 92 | this.jiance = result.code 93 | } 94 | /* 95 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 96 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 97 | await $.wait(6000), await this.readfinish()); 98 | */ 99 | } catch (e) { 100 | console.log(e) 101 | } finally { 102 | return Promise.resolve(1); 103 | $.done() 104 | } 105 | } 106 | 107 | async jump(readurl) { 108 | try { 109 | let t = Date.now() 110 | readurl = decodeURIComponent(readurl); 111 | var sj = Math.random() * (7000 - 6000) + 6086 112 | 113 | 114 | // this.key = readurl.match(/key=(.*?)&/)[1] 115 | // this.state= readurl.match(/state=(.*?)#/)[1] 116 | this.ul = newurl+`/submit?`+'ticket='+this.ticket+"&"+'tgid='+this.tid+"&_t=0.6519685395293324" 117 | console.log(this.ul) 118 | 119 | let body = ``; 120 | let urlObject = popu(this.ul, body,this.ticket) 121 | await httpRequest('post', urlObject) 122 | let result = httpResult; 123 | // console.log(result.data.points) 124 | console.log('获得'+result.data.points/1000+'积分') 125 | //var sj = Math.random() * (8000 - 6000) + 6000 126 | // console.log('等待:'+ sj) 127 | // await $.wait(sj) 128 | // await this.add_gold() 129 | 130 | /* 131 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 132 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 133 | await $.wait(6000), await this.readfinish()); 134 | */ 135 | } catch (e) { 136 | console.log(e) 137 | } finally { 138 | // console.log(result.data.points) 139 | return Promise.resolve(1); 140 | } 141 | } 142 | 143 | 144 | 145 | async jiance2() { 146 | try { 147 | if (this.jiance.code != 0) { 148 | console.log("检测文章,跳过") 149 | await $.done() 150 | } 151 | // else { 152 | // if (!(await checkEnv())) return; 153 | // if (userList.length > 0) { 154 | // //await gethost() 155 | // //console.log('获取到newurl:'+newurl) 156 | // // for (let user of userList) { 157 | // // await user.task() 158 | // // } 159 | // // if (this.jiance.code=-1) { 160 | 161 | // // } 162 | // } 163 | // } 164 | }catch(e){ 165 | console.log(e) 166 | } 167 | 168 | await $.done() 169 | } 170 | // }finally(){ 171 | // break; 172 | // } 173 | 174 | // async withdrawal() { 175 | // try { 176 | // let t = Date.now() 177 | // let url = newurl+`/yunonline/v1/user_gold`; 178 | // let body = `unionid=${this.unionid}&request_id=4c33a60c5f1068b83e576ca806bd4b6b&gold=1000`; 179 | // let urlObject = popu(url, body,this.unionid) 180 | // await httpRequest('post', urlObject) 181 | // let result = httpResult; 182 | // if (result.msg=='success') { 183 | // result = result.data 184 | // console.log(`\n转化获得余额 ${result.money}元 \n`) 185 | // if (result.money >= 0.3) { 186 | // await this.doWithdraw() 187 | // } 188 | // /* 189 | // if (this.f < 3) console.log(`\n 不满足0.3 提现门槛\n`) 190 | // this.f >= 3 && this.f < 5 && (this.cash = .3), this.f >= 10 && this.f < 20 && (this.cash = 1), this.f >= 20 && this.f < 50 && (this.cash = 2), 191 | // this.f >= 50 && this.f < 100 && (this.cash = 2), this.f >= 100 && this.f < 200 && (this.cash = 10), this.f >= 200 && (this.cash = 20) 192 | // if (this.f >= 3) console.log(`\n可以提现 ${result.info.sum}金币 去提现 ${this.cash} 元\n`), await this.exchange() 193 | // */ 194 | 195 | // }else{ 196 | // console.log(result) 197 | // } 198 | // } catch (e) { 199 | // console.log(e) 200 | // } finally { 201 | // return Promise.resolve(1); 202 | // } 203 | // } 204 | // async doWithdraw(tx) { 205 | // try { 206 | 207 | // let t = Date.now() 208 | // let url = newurl+`/yunonline/v1/withdraw`; 209 | // let body = `unionid=${this.unionid}&request_id=4c33a60c5f1068b83e576ca806bd4b6b&ua=2`; 210 | // let urlObject = popu(url, body,this.unionid) 211 | // await httpRequest('post', urlObject) 212 | // let result = httpResult; 213 | // console.log(result) 214 | 215 | // } catch (e) { 216 | // console.log(e) 217 | // } finally { 218 | // return Promise.resolve(1); 219 | // } 220 | // } 221 | async task() { 222 | try { 223 | 224 | let abc = [...new Array(15).keys()] 225 | msg += `\n======== 账号 ${this.idx} 检测文章 ========\n` 226 | console.log(`\n=========== ${this.idx} 开始阅读文章 ===========\n`) 227 | var sj = Math.random() * (7000 - 6000) + 10086 228 | // let jiance = this.jiance 229 | // await this.gold() 230 | //console.log(this.fb) 231 | 232 | if (cishu == 10) { 233 | console.log(this.jiance) 234 | for (let i = 0;i< 15;i++) { 235 | // if(jiance.code != 0) { 236 | // console.log("检测文章,跳过") 237 | // break ; 238 | // } 239 | // await $.done()} 240 | // await this.task() 241 | // console.log(this.jiance) 242 | console.log('随机等待:'+ sj/1000+'秒') 243 | await $.wait(sj) 244 | await this.dotask() 245 | if(this.jiance != 0) { 246 | console.log("可能是检测文章或已阅读完毕,防止黑号跳过") 247 | break ; 248 | }else{console.log("已检测到文章,阅读开始")} 249 | console.log('等待:'+ sj/1000+'时间') 250 | await $.wait(sj) 251 | await this.jump() 252 | // await this.jiance() 253 | /* 254 | break 255 | if (this.dx == 1) break 256 | await this.getreadurl() 257 | if (this.fx == 1) break 258 | */ 259 | } 260 | // await this.getreadinfo() 261 | //await $.wait(15000) 262 | 263 | } 264 | // if (this.left_gold >= 10000 && this.istx == 1) await this.withdrawal() 265 | 266 | } catch (e) { 267 | console.log(e) 268 | } finally { 269 | return Promise.resolve(1); 270 | } 271 | } 272 | } 273 | 274 | !(async () => { 275 | if (typeof $request !== "undefined") { 276 | await GetRewrite() 277 | } else { 278 | if (!(await checkEnv())) return; 279 | if (userList.length > 0) { 280 | //await gethost() 281 | //console.log('获取到newurl:'+newurl) 282 | for (let user of userList) { 283 | await user.task() 284 | } 285 | if (msg.indexOf('redirect_uri=') !=-1) await notify.sendNotify('看看集阅读检测文章',msg) 286 | } 287 | } 288 | })() 289 | .catch((e) => console.log(e)) 290 | .finally(() => $.done()) 291 | 292 | /////////////////////////////////////////////////////////////////// 293 | 294 | async function gethost() { 295 | try { 296 | let t = Date.now() 297 | let url = 'https://qun.haozhuang.cn.com/fq_url/rk'; 298 | let body = '' 299 | let urlObject = popugethost(url, body) 300 | await httpRequest('get', urlObject) 301 | let result = httpResult; 302 | //console.log(result) 303 | if (result.jump) { 304 | newurl = result.jump.slice(0,-1) 305 | 306 | } 307 | } catch (e) { 308 | console.log(e) 309 | } finally { 310 | return Promise.resolve(1); 311 | } 312 | } 313 | 314 | async function checkEnv() { 315 | if (userCookie) { 316 | let splitor = envSplitor[0]; 317 | for (let sp of envSplitor) { 318 | if (userCookie.indexOf(sp) > -1) { 319 | splitor = sp; 320 | break; 321 | } 322 | } 323 | for (let userCookies of userCookie.split(splitor)) { 324 | if (userCookies) 325 | userList.push(new UserInfo(userCookies)) 326 | 327 | } 328 | userCount = userList.length 329 | } else { 330 | } 331 | 332 | console.log(`找到[${ckName}] 变量 ${userCount}个账号`) 333 | 334 | 335 | 336 | return true 337 | } 338 | 339 | //////////////////////////////////////////////////////////////////// 340 | function popu(url, body = '',ck) { 341 | //console.log(ck) /?upuid\u003d10314864 342 | let host = url.replace('//', '/').split('/')[1] 343 | let urlObject = { 344 | url: url, 345 | headers: { 346 | "Host": "kkj.ymzwhcm.com", 347 | "connection" : "keep-alive", 348 | "content-length": "0", 349 | "accept": "application/json, text/plain, */*", 350 | "x-requested-with": "com.tencent.mm", 351 | "user-agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/5019 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/3684 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/5G Language/zh_CN ABI/arm64", 352 | "content-type": "application/x-www-form-urlencoded", 353 | "origin": "http://vip.bk9bas79.shop", 354 | "accept-encoding": "gzip, deflate", 355 | "accept-language": "zh-CN,zh;q\u003d0.9,en-US;q\u003d0.8,en;q\u003d0.7" 356 | }, 357 | timeout: 6086, 358 | } 359 | if (body) { 360 | urlObject.body = body 361 | urlObject.headers['content-length'] = body.length 362 | } 363 | 364 | return urlObject; 365 | } 366 | // function popugethost(url, body = '',ck) { 367 | // //console.log(ck) 368 | // let host = url.replace('//', '/').split('/')[1] 369 | // let urlObject = { 370 | // url: url, 371 | // headers: { 372 | // "Host": "qun.haozhuang.cn.com", 373 | // "User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4425 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/4883 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", 374 | // "Accept": "*/*", 375 | // "Origin": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com", 376 | // "X-Requested-With": "com.tencent.mm", 377 | // "Referer": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com/index.html?upuid\u003d10315076" 378 | // }, 379 | // timeout: 6086, 380 | // } 381 | // if (body) { 382 | // urlObject.body = body 383 | // } 384 | 385 | // return urlObject; 386 | // } 387 | 388 | async function httpRequest(method, url) { 389 | //console.log(url) 390 | httpResult = null, httpReq = null, httpResp = null; 391 | return new Promise((resolve) => { 392 | $.send(method, url, async (err, req, resp) => { 393 | try { 394 | httpReq = req; 395 | httpResp = resp; 396 | if (err) { 397 | } else { 398 | if (resp.body) { 399 | if (typeof resp.body == "object") { 400 | httpResult = resp.body; 401 | } else { 402 | try { 403 | httpResult = JSON.parse(resp.body); 404 | } catch (e) { 405 | httpResult = resp.body; 406 | } 407 | } 408 | } 409 | } 410 | } catch (e) { 411 | console.log(e); 412 | } finally { 413 | resolve(); 414 | } 415 | }); 416 | }); 417 | } 418 | //////////////////////////////////////////////////////////////////// 419 | function Env(a, b) { 420 | return "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0), new class { 421 | constructor(a, b) { 422 | this.name = a, this.notifyStr = "", this.startTime = (new Date).getTime(), Object.assign(this, b), console.log(`${this.name} 开始运行: 423 | `) 424 | } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getdata(b) { let a = this.getval(b); if (/^@/.test(b)) { let [, c, f] = /^@(.*?)\.(.*?)$/.exec(b), d = c ? this.getval(c) : ""; if (d) try { let e = JSON.parse(d); a = e ? this.lodash_get(e, f, "") : a } catch (g) { a = "" } } return a } setdata(c, d) { let a = !1; if (/^@/.test(d)) { let [, b, e] = /^@(.*?)\.(.*?)$/.exec(d), f = this.getval(b), i = b ? "null" === f ? null : f || "{}" : "{}"; try { let g = JSON.parse(i); this.lodash_set(g, e, c), a = this.setval(JSON.stringify(g), b) } catch (j) { let h = {}; this.lodash_set(h, e, c), a = this.setval(JSON.stringify(h), b) } } else a = this.setval(c, d); return a } getval(a) { return this.isSurge() || this.isLoon() ? $persistentStore.read(a) : this.isQuanX() ? $prefs.valueForKey(a) : this.isNode() ? (this.data = this.loaddata(), this.data[a]) : this.data && this.data[a] || null } setval(b, a) { return this.isSurge() || this.isLoon() ? $persistentStore.write(b, a) : this.isQuanX() ? $prefs.setValueForKey(b, a) : this.isNode() ? (this.data = this.loaddata(), this.data[a] = b, this.writedata(), !0) : this.data && this.data[a] || null } send(b, a, f = () => { }) { if ("get" != b && "post" != b && "put" != b && "delete" != b) { console.log(`无效的http方法:${b}`); return } if ("get" == b && a.headers ? (delete a.headers["Content-Type"], delete a.headers["Content-Length"]) : a.body && a.headers && (a.headers["Content-Type"] || (a.headers["Content-Type"] = "application/x-www-form-urlencoded")), this.isSurge() || this.isLoon()) { this.isSurge() && this.isNeedRewrite && (a.headers = a.headers || {}, Object.assign(a.headers, { "X-Surge-Skip-Scripting": !1 })); let c = { method: b, url: a.url, headers: a.headers, timeout: a.timeout, data: a.body }; "get" == b && delete c.data, $axios(c).then(a => { let { status: b, request: c, headers: d, data: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }).catch(a => console.log(a)) } else if (this.isQuanX()) a.method = b.toUpperCase(), this.isNeedRewrite && (a.opts = a.opts || {}, Object.assign(a.opts, { hints: !1 })), $task.fetch(a).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, a => f(a)); else if (this.isNode()) { this.got = this.got ? this.got : require("got"); let { url: d, ...e } = a; this.instance = this.got.extend({ followRedirect: !1 }), this.instance[b](d, e).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, b => { let { message: c, response: a } = b; f(c, a, a && a.body) }) } } time(a) { let b = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "h+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; for (let c in /(y+)/.test(a) && (a = a.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))), b) new RegExp("(" + c + ")").test(a) && (a = a.replace(RegExp.$1, 1 == RegExp.$1.length ? b[c] : ("00" + b[c]).substr(("" + b[c]).length))); return a } async showmsg() { if (!this.notifyStr) return; let a = this.name + " \u8FD0\u884C\u901A\u77E5\n\n" + this.notifyStr; if ($.isNode()) { var b = require("./sendNotify"); console.log("\n============== \u63A8\u9001 =============="), await b.sendNotify(this.name, a) } else this.msg(a) } logAndNotify(a) { console.log(a), this.notifyStr += a, this.notifyStr += "\n" } msg(d = t, a = "", b = "", e) { let f = a => { if (!a) return a; if ("string" == typeof a) return this.isLoon() ? a : this.isQuanX() ? { "open-url": a } : this.isSurge() ? { url: a } : void 0; if ("object" == typeof a) { if (this.isLoon()) { let b = a.openUrl || a.url || a["open-url"], c = a.mediaUrl || a["media-url"]; return { openUrl: b, mediaUrl: c } } if (this.isQuanX()) { let d = a["open-url"] || a.url || a.openUrl, e = a["media-url"] || a.mediaUrl; return { "open-url": d, "media-url": e } } if (this.isSurge()) return { url: a.url || a.openUrl || a["open-url"] } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(d, a, b, f(e)) : this.isQuanX() && $notify(d, a, b, f(e))); let c = ["", "============== \u7CFB\u7EDF\u901A\u77E5 =============="]; c.push(d), a && c.push(a), b && c.push(b), console.log(c.join("\n")) } getMin(a, b) { return a < b ? a : b } getMax(a, b) { return a < b ? b : a } padStr(e, b, f = "0") { let a = String(e), g = b > a.length ? b - a.length : 0, c = ""; for (let d = 0; d < g; d++)c += f; return c + a } json2str(b, e, f = !1) { let c = []; for (let d of Object.keys(b).sort()) { let a = b[d]; a && f && (a = encodeURIComponent(a)), c.push(d + "=" + a) } return c.join(e) } str2json(e, f = !1) { let d = {}; for (let a of e.split("#")) { if (!a) continue; let b = a.indexOf("="); if (-1 == b) continue; let g = a.substr(0, b), c = a.substr(b + 1); f && (c = decodeURIComponent(c)), d[g] = c } return d } randomString(d, a = "abcdef0123456789") { let b = ""; for (let c = 0; c < d; c++)b += a.charAt(Math.floor(Math.random() * a.length)); return b } randomList(a) { let b = Math.floor(Math.random() * a.length); return a[b] } wait(a) { return new Promise(b => setTimeout(b, a)) } done(a = {}) { 425 | let b = (new Date).getTime(), c = (b - this.startTime) / 1e3; console.log(` 426 | ${this.name} 运行结束,共运行了 ${c} 秒!`), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(a) 427 | } 428 | }(a, b) 429 | } 430 | -------------------------------------------------------------------------------- /wxyd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 微信阅读 3 | 需要青龙环境 4 | 入口,微信打开 -> https://zl0104233736-1314804847.cos.ap-nanjing.myqcloud.com/index.html?upuid=10760102 5 | 抓包m.*.work域名下cookie,填入环境变量 yuedu,多账户换行隔开 6 | 7 | 每天会验证2次左右,碰到验证文章手动打开看一篇即可 8 | 当前每日30篇*6轮180篇文章约2.2元 9 | 会自动提现 10 | */ 11 | 12 | const $ = new Env("微信阅读"); 13 | const notify = $.isNode() ? require('./sendNotify') : ''; 14 | let envSplitor = ['@', '\n'] 15 | let httpResult, httpReq, httpResp 16 | let ckName = 'yuedu' 17 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 18 | let userList = [] 19 | let userIdx = 0 20 | let userCount = 0 21 | var msg = '' 22 | let newurl = "http://m.xmrygnuv.shop" 23 | /////////////////////////////////////////////////////////////////// 24 | class UserInfo { 25 | constructor(str) { 26 | //console.log(str) 27 | this.index = ++userIdx, this.idx = `账号[${this.index}] `, this.ck = str//.split('#'), this.u = this.ck[0], this.t = this.ck[1] 28 | } 29 | 30 | async getreadurl() { 31 | try { 32 | let t = Date.now() 33 | this.ul = newurl+`/tuijian/do_read?for\u003d\u0026zs\u003d\u0026pageshow\u0026r\u003d0.016638941704032684`; 34 | let body = ``; 35 | let urlObject = popu(this.ul, body,this.ck) 36 | await httpRequest('get', urlObject) 37 | let result = httpResult; 38 | //console.log(result) 39 | if ( result.jkey && result.url) { 40 | this.jkey=result.jkey 41 | await this.read(result.url.split('redirect_uri=')[1]) 42 | } 43 | /* 44 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 45 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 46 | await $.wait(6000), await this.readfinish()); 47 | */ 48 | } catch (e) { 49 | console.log(e) 50 | } finally { 51 | return Promise.resolve(1); 52 | } 53 | } 54 | 55 | async read(readurl) { 56 | try { 57 | let t = Date.now() 58 | readurl = decodeURIComponent(readurl); 59 | var sj = Math.random() * (8000 - 6000) + 6000 60 | 61 | if (readurl.indexOf("jump")==-1){ 62 | 63 | console.log("疑似检测文章,不阅读") 64 | 65 | await $.wait(sj) 66 | return 67 | await this.readfinish() 68 | 69 | 70 | } 71 | this.jumpid = readurl.match(/jumpid=(.*?)&/)[1] 72 | this.state= readurl.match(/state=(.*?)&/)[1] 73 | this.ul = newurl+`/fast_reada/oiejr?jumpid=${this.jumpid}&code=031oV60w32RVa03URy0w3E0mzj3oV607&state=` + this.state 74 | //console.log(this.ul) 75 | 76 | let body = ``; 77 | let urlObject = popu(this.ul, body,this.ck) 78 | await httpRequest('get', urlObject) 79 | let result = httpResult; 80 | //console.log(result) 81 | //var sj = Math.random() * (8000 - 6000) + 6000 82 | //console.log('等待:'+ sj) 83 | await $.wait(sj) 84 | await this.readfinish() 85 | 86 | /* 87 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 88 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 89 | await $.wait(6000), await this.readfinish()); 90 | */ 91 | } catch (e) { 92 | console.log(e) 93 | } finally { 94 | return Promise.resolve(1); 95 | } 96 | } 97 | async readfinish() { 98 | try { 99 | 100 | this.url=newurl+'/tuijian/do_read?for=&zs=&pageshow=&r=0.7882316111246435&jkey='+this.jkey 101 | let body = ``; 102 | let urlObject = popu(this.url, body,this.ck) 103 | //console.log(urlObject) 104 | await httpRequest('get', urlObject) 105 | let result = httpResult; 106 | if (result && result.success_msg) { 107 | console.log(result.success_msg) 108 | } else { 109 | console.log(result) 110 | } 111 | 112 | /* 113 | "success" == result.msg && console.log(`增加金币-> ${result.info.num} 阅读次数 ${result.info.read_num} 当前金币 ${result.info.read_money}`), 114 | result.code > 200 && (console.log(`已达到阅读量 等待刷新`), this.fx = 1); 115 | */ 116 | } catch (e) { 117 | console.log(e) 118 | } finally { 119 | return Promise.resolve(1); 120 | } 121 | } 122 | async getreadinfo() { 123 | try { 124 | let t = Date.now() 125 | let url = newurl+`/tuijian`; 126 | let body = ``; 127 | let urlObject = popu(url, body,this.ck) 128 | //console.log() 129 | await httpRequest('get', urlObject) 130 | let result = httpResult; 131 | //console.log(result) 132 | 133 | 134 | if (result && result.data) { 135 | result = result.data 136 | this.uid = result.user.uid 137 | console.log(`\n今日阅读数量/收益:${result.infoView.num}/${result.infoView.score}分 \n`) 138 | console.log(`\n当前余额:${result.user.score}分 \n`) 139 | this.cishu = result.infoView.rest 140 | 141 | if (result.infoView.status != 1) { 142 | this.fb = 1 143 | } 144 | if (result.infoView.status == 3) { 145 | // console.log(result.infoView.msg) 146 | msg += '' 147 | console.log('检测文章,需手动过') 148 | msg += `\n${this.idx} 碰到检测文章\n` 149 | this.fb = 1 150 | 151 | } else if (result.infoView.status == 4) { 152 | console.log(result.infoView.msg) 153 | 154 | } else if (result.infoView.rest == 0){ 155 | console.log(result.infoView.msg) 156 | } 157 | } 158 | } catch (e) { 159 | console.log(e) 160 | } finally { 161 | return Promise.resolve(1); 162 | } 163 | } 164 | 165 | 166 | async withdrawal() { 167 | try { 168 | let t = Date.now() 169 | let url = newurl+`/withdrawal`; 170 | let body = ``; 171 | let urlObject = popu(url, body,this.ck) 172 | await httpRequest('get', urlObject) 173 | let result = httpResult; 174 | if (result.data.user) { 175 | result = result.data.user 176 | console.log(`\n当前账号余额 ${result.score}分 \n`) 177 | if (this.ck.indexOf('##') != -1) return 178 | this.f = parseInt(result.score)//= Number(Math.floor(result.info.sum / 1000)) 179 | /* 180 | if (this.f < 3) console.log(`\n 不满足0.3 提现门槛\n`) 181 | this.f >= 3 && this.f < 5 && (this.cash = .3), this.f >= 10 && this.f < 20 && (this.cash = 1), this.f >= 20 && this.f < 50 && (this.cash = 2), 182 | this.f >= 50 && this.f < 100 && (this.cash = 2), this.f >= 100 && this.f < 200 && (this.cash = 10), this.f >= 200 && (this.cash = 20) 183 | if (this.f >= 3) console.log(`\n可以提现 ${result.info.sum}金币 去提现 ${this.cash} 元\n`), await this.exchange() 184 | */ 185 | if (this.f < 30) { 186 | console.log(`不满足 提现门槛`) 187 | } else { 188 | console.log(`去提现${this.f/100}元。。。。。。`) 189 | await this.doWithdraw(this.f) 190 | } 191 | } 192 | } catch (e) { 193 | console.log(e) 194 | } finally { 195 | return Promise.resolve(1); 196 | } 197 | } 198 | async doWithdraw(tx) { 199 | try { 200 | if (tx > 2000) tx = 2000 201 | let t = Date.now() 202 | let url = newurl+`/withdrawal/doWithdraw`; 203 | let body = `amount=` + tx; 204 | let urlObject = popu(url, body,this.ck) 205 | await httpRequest('post', urlObject) 206 | let result = httpResult; 207 | console.log(result) 208 | 209 | } catch (e) { 210 | console.log(e) 211 | } finally { 212 | return Promise.resolve(1); 213 | } 214 | } 215 | async task() { 216 | try { 217 | 218 | let abc = [...new Array(15).keys()] 219 | console.log(`\n=========== ${this.idx} 开始阅读文章 ===========\n`) 220 | await this.getreadinfo() 221 | //console.log(this.fb) 222 | if (this.fb != 1) { 223 | for (let i = 0;i< this.cishu;i++) { 224 | await this.getreadurl() 225 | 226 | /* 227 | break 228 | if (this.dx == 1) break 229 | await this.getreadurl() 230 | if (this.fx == 1) break 231 | */ 232 | } 233 | await this.getreadinfo() 234 | //await $.wait(15000) 235 | 236 | } 237 | await this.withdrawal() 238 | 239 | } catch (e) { 240 | console.log(e) 241 | } finally { 242 | return Promise.resolve(1); 243 | } 244 | } 245 | } 246 | 247 | !(async () => { 248 | if (typeof $request !== "undefined") { 249 | await GetRewrite() 250 | } else { 251 | if (!(await checkEnv())) return; 252 | if (userList.length > 0) { 253 | await gethost() 254 | console.log('获取到newurl:'+newurl) 255 | for (let user of userList) { 256 | await user.task() 257 | } 258 | if (msg) await notify.sendNotify('微信阅读检测文章',msg) 259 | } 260 | } 261 | })() 262 | .catch((e) => console.log(e)) 263 | .finally(() => $.done()) 264 | 265 | /////////////////////////////////////////////////////////////////// 266 | 267 | async function gethost() { 268 | try { 269 | let t = Date.now() 270 | let url = 'https://qun.haozhuang.cn.com/fq_url/rk'; 271 | let body = '' 272 | let urlObject = popugethost(url, body) 273 | await httpRequest('get', urlObject) 274 | let result = httpResult; 275 | //console.log(result) 276 | if (result.jump) { 277 | newurl = result.jump.slice(0,-1) 278 | 279 | } 280 | } catch (e) { 281 | console.log(e) 282 | } finally { 283 | return Promise.resolve(1); 284 | } 285 | } 286 | 287 | async function checkEnv() { 288 | if (userCookie) { 289 | let splitor = envSplitor[0]; 290 | for (let sp of envSplitor) { 291 | if (userCookie.indexOf(sp) > -1) { 292 | splitor = sp; 293 | break; 294 | } 295 | } 296 | for (let userCookies of userCookie.split(splitor)) { 297 | if (userCookies) 298 | userList.push(new UserInfo(userCookies)) 299 | 300 | } 301 | userCount = userList.length 302 | } else { 303 | } 304 | 305 | console.log(`找到[${ckName}] 变量 ${userCount}个账号`) 306 | 307 | 308 | 309 | return true 310 | } 311 | 312 | //////////////////////////////////////////////////////////////////// 313 | function popu(url, body = '',ck) { 314 | //console.log(ck) /?upuid\u003d10314864 315 | let host = url.replace('//', '/').split('/')[1] 316 | let urlObject = { 317 | url: url, 318 | headers: { 319 | "Host": host, 320 | "Connection": "keep-alive", 321 | "Accept": "*/*", 322 | "User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4425 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/4883 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", 323 | "X-Requested-With": "com.tencent.mm", 324 | "Referer": newurl+"/tuijian/read", 325 | "Accept-Encoding": "gzip, deflate", 326 | "Accept-Language": "zh-CN,zh;q\u003d0.9,en-US;q\u003d0.8,en;q\u003d0.7", 327 | "Cookie": ck, 328 | }, 329 | timeout: 5000, 330 | } 331 | if (body) { 332 | urlObject.body = body 333 | } 334 | 335 | return urlObject; 336 | } 337 | function popugethost(url, body = '',ck) { 338 | //console.log(ck) 339 | let host = url.replace('//', '/').split('/')[1] 340 | let urlObject = { 341 | url: url, 342 | headers: { 343 | "Host": "qun.haozhuang.cn.com", 344 | "User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4425 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/4883 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", 345 | "Accept": "*/*", 346 | "Origin": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com", 347 | "X-Requested-With": "com.tencent.mm", 348 | "Referer": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com/index.html?upuid\u003d10315076" 349 | }, 350 | timeout: 5000, 351 | } 352 | if (body) { 353 | urlObject.body = body 354 | } 355 | 356 | return urlObject; 357 | } 358 | 359 | async function httpRequest(method, url) { 360 | //console.log(url) 361 | httpResult = null, httpReq = null, httpResp = null; 362 | return new Promise((resolve) => { 363 | $.send(method, url, async (err, req, resp) => { 364 | try { 365 | httpReq = req; 366 | httpResp = resp; 367 | if (err) { 368 | } else { 369 | if (resp.body) { 370 | if (typeof resp.body == "object") { 371 | httpResult = resp.body; 372 | } else { 373 | try { 374 | httpResult = JSON.parse(resp.body); 375 | } catch (e) { 376 | httpResult = resp.body; 377 | } 378 | } 379 | } 380 | } 381 | } catch (e) { 382 | console.log(e); 383 | } finally { 384 | resolve(); 385 | } 386 | }); 387 | }); 388 | } 389 | //////////////////////////////////////////////////////////////////// 390 | function Env(a, b) { 391 | return "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0), new class { 392 | constructor(a, b) { 393 | this.name = a, this.notifyStr = "", this.startTime = (new Date).getTime(), Object.assign(this, b), console.log(`${this.name} 开始运行: 394 | `) 395 | } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getdata(b) { let a = this.getval(b); if (/^@/.test(b)) { let [, c, f] = /^@(.*?)\.(.*?)$/.exec(b), d = c ? this.getval(c) : ""; if (d) try { let e = JSON.parse(d); a = e ? this.lodash_get(e, f, "") : a } catch (g) { a = "" } } return a } setdata(c, d) { let a = !1; if (/^@/.test(d)) { let [, b, e] = /^@(.*?)\.(.*?)$/.exec(d), f = this.getval(b), i = b ? "null" === f ? null : f || "{}" : "{}"; try { let g = JSON.parse(i); this.lodash_set(g, e, c), a = this.setval(JSON.stringify(g), b) } catch (j) { let h = {}; this.lodash_set(h, e, c), a = this.setval(JSON.stringify(h), b) } } else a = this.setval(c, d); return a } getval(a) { return this.isSurge() || this.isLoon() ? $persistentStore.read(a) : this.isQuanX() ? $prefs.valueForKey(a) : this.isNode() ? (this.data = this.loaddata(), this.data[a]) : this.data && this.data[a] || null } setval(b, a) { return this.isSurge() || this.isLoon() ? $persistentStore.write(b, a) : this.isQuanX() ? $prefs.setValueForKey(b, a) : this.isNode() ? (this.data = this.loaddata(), this.data[a] = b, this.writedata(), !0) : this.data && this.data[a] || null } send(b, a, f = () => { }) { if ("get" != b && "post" != b && "put" != b && "delete" != b) { console.log(`无效的http方法:${b}`); return } if ("get" == b && a.headers ? (delete a.headers["Content-Type"], delete a.headers["Content-Length"]) : a.body && a.headers && (a.headers["Content-Type"] || (a.headers["Content-Type"] = "application/x-www-form-urlencoded")), this.isSurge() || this.isLoon()) { this.isSurge() && this.isNeedRewrite && (a.headers = a.headers || {}, Object.assign(a.headers, { "X-Surge-Skip-Scripting": !1 })); let c = { method: b, url: a.url, headers: a.headers, timeout: a.timeout, data: a.body }; "get" == b && delete c.data, $axios(c).then(a => { let { status: b, request: c, headers: d, data: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }).catch(a => console.log(a)) } else if (this.isQuanX()) a.method = b.toUpperCase(), this.isNeedRewrite && (a.opts = a.opts || {}, Object.assign(a.opts, { hints: !1 })), $task.fetch(a).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, a => f(a)); else if (this.isNode()) { this.got = this.got ? this.got : require("got"); let { url: d, ...e } = a; this.instance = this.got.extend({ followRedirect: !1 }), this.instance[b](d, e).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, b => { let { message: c, response: a } = b; f(c, a, a && a.body) }) } } time(a) { let b = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "h+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; for (let c in /(y+)/.test(a) && (a = a.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))), b) new RegExp("(" + c + ")").test(a) && (a = a.replace(RegExp.$1, 1 == RegExp.$1.length ? b[c] : ("00" + b[c]).substr(("" + b[c]).length))); return a } async showmsg() { if (!this.notifyStr) return; let a = this.name + " \u8FD0\u884C\u901A\u77E5\n\n" + this.notifyStr; if ($.isNode()) { var b = require("./sendNotify"); console.log("\n============== \u63A8\u9001 =============="), await b.sendNotify(this.name, a) } else this.msg(a) } logAndNotify(a) { console.log(a), this.notifyStr += a, this.notifyStr += "\n" } msg(d = t, a = "", b = "", e) { let f = a => { if (!a) return a; if ("string" == typeof a) return this.isLoon() ? a : this.isQuanX() ? { "open-url": a } : this.isSurge() ? { url: a } : void 0; if ("object" == typeof a) { if (this.isLoon()) { let b = a.openUrl || a.url || a["open-url"], c = a.mediaUrl || a["media-url"]; return { openUrl: b, mediaUrl: c } } if (this.isQuanX()) { let d = a["open-url"] || a.url || a.openUrl, e = a["media-url"] || a.mediaUrl; return { "open-url": d, "media-url": e } } if (this.isSurge()) return { url: a.url || a.openUrl || a["open-url"] } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(d, a, b, f(e)) : this.isQuanX() && $notify(d, a, b, f(e))); let c = ["", "============== \u7CFB\u7EDF\u901A\u77E5 =============="]; c.push(d), a && c.push(a), b && c.push(b), console.log(c.join("\n")) } getMin(a, b) { return a < b ? a : b } getMax(a, b) { return a < b ? b : a } padStr(e, b, f = "0") { let a = String(e), g = b > a.length ? b - a.length : 0, c = ""; for (let d = 0; d < g; d++)c += f; return c + a } json2str(b, e, f = !1) { let c = []; for (let d of Object.keys(b).sort()) { let a = b[d]; a && f && (a = encodeURIComponent(a)), c.push(d + "=" + a) } return c.join(e) } str2json(e, f = !1) { let d = {}; for (let a of e.split("#")) { if (!a) continue; let b = a.indexOf("="); if (-1 == b) continue; let g = a.substr(0, b), c = a.substr(b + 1); f && (c = decodeURIComponent(c)), d[g] = c } return d } randomString(d, a = "abcdef0123456789") { let b = ""; for (let c = 0; c < d; c++)b += a.charAt(Math.floor(Math.random() * a.length)); return b } randomList(a) { let b = Math.floor(Math.random() * a.length); return a[b] } wait(a) { return new Promise(b => setTimeout(b, a)) } done(a = {}) { 396 | let b = (new Date).getTime(), c = (b - this.startTime) / 1e3; console.log(` 397 | ${this.name} 运行结束,共运行了 ${c} 秒!`), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(a) 398 | } 399 | }(a, b) 400 | } 401 | -------------------------------------------------------------------------------- /wxyd1.js: -------------------------------------------------------------------------------- 1 | /* 2 | 微信阅读2 3 | 需要青龙环境 4 | 入口,微信打开 -> 入口1:https://api.shanghaiqiye.top:10262/yunonline/v1/auth/080bb7730c1c22c0983b4c5755e84762?codeurl=shanghaiqiye.top:10262&codeuserid=2&time=1678618115 5 | 入口2:https://api.caorenkj.top:10252/yunonline/v1/auth/080bb7730c1c22c0983b4c5755e84762?codeurl=caorenkj.top:10252&codeuserid=1&time=1678618115 6 | 7 | 抓包首页 https://erd.jjt2019.top/yunonline/v1/gold?unionid=nonxxxx&time=1678449887000 中的 unionid 8 | 抓包获取文章链接 https://erd.jjt2019.top/yunonline/v1/task 请求体中 secret 9 | 填写变量 jdyuedu ,填写方式 unionid&secret 不要unionid=和secret=,多账户换行隔开 10 | 11 | 目前验证文章不清楚,但每天第一轮必验证,不过验证必黑,建议第一轮读到第三篇文章,建议不要凌晨跑 12 | 13 | 3.12更新:前2篇以及101和102篇文章改为检测文章,遇到不读,请手动阅读 14 | 15 | */ 16 | 17 | const $ = new Env("微信简单阅读"); 18 | const notify = $.isNode() ? require('./sendNotify') : ''; 19 | let envSplitor = ['@', '\n'] 20 | let httpResult, httpReq, httpResp 21 | let ckName = 'jdyuedu' 22 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 23 | let userList = [] 24 | let userIdx = 0 25 | let userCount = 0 26 | var msg = '' 27 | var jiance = 0 //1获取文章 , 0阅读 28 | let newurl = "https://erd.jjt2019.top:10267" 29 | /////////////////////////////////////////////////////////////////// 30 | class UserInfo { 31 | constructor(str) { 32 | //console.log(str) 33 | this.istx = 1 34 | if (str.indexOf('##')!=-1) this.istx=0 35 | this.index = ++userIdx, this.idx = `账号[${this.index}] `, this.unionid = str.split('&')[0], this.secret = str.split('&')[1]//.split('#'), this.u = this.ck[0], this.t = this.ck[1] 36 | } 37 | 38 | async dotask() { 39 | try { 40 | let t = Date.now() 41 | this.ul = newurl+`/yunonline/v1/task`; 42 | let body = 'secret='+this.secret+'&type=read'; 43 | let urlObject = popu(this.ul, body,this.unionid) 44 | await httpRequest('post', urlObject) 45 | let result = httpResult; 46 | //console.log(result) 47 | if ( result.msg == 'success') { 48 | if (jiance == 1) { 49 | console.log( result.data.link) 50 | msg += '\n' + result.data.link + '\n' 51 | } else { 52 | await this.jump(result.data.link.split('redirect_uri=')[1]) 53 | } 54 | 55 | 56 | } else if (result.errcode == 409){ 57 | console.log('下次阅读时间:', result.msg/60,'分钟后') 58 | 59 | } else if (result.errcode == 407){ 60 | console.log(result.msg) 61 | } else { 62 | console.log(result) 63 | } 64 | /* 65 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 66 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 67 | await $.wait(6000), await this.readfinish()); 68 | */ 69 | } catch (e) { 70 | console.log(e) 71 | } finally { 72 | return Promise.resolve(1); 73 | } 74 | } 75 | 76 | async jump(readurl) { 77 | try { 78 | let t = Date.now() 79 | readurl = decodeURIComponent(readurl); 80 | var sj = Math.random() * (7000 - 6000) + 4000 81 | 82 | 83 | this.key = readurl.match(/key=(.*?)&/)[1] 84 | this.state= readurl.match(/state=(.*?)#/)[1] 85 | this.ul = newurl+`/yunonline/v1/jump?key=${this.key}&unionid=${this.unionid}&code=071jHI0w3wTxf03NIp1w36OkoF1jHI0P&state=` + this.state 86 | //console.log(readurl) 87 | 88 | let body = ``; 89 | let urlObject = popu(this.ul, body,this.unionid) 90 | await httpRequest('get', urlObject) 91 | let result = httpResult; 92 | //console.log(result) 93 | //var sj = Math.random() * (8000 - 6000) + 6000 94 | //console.log('等待:'+ sj) 95 | await $.wait(sj) 96 | await this.add_gold() 97 | 98 | /* 99 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 100 | "3" == result.info.type && 1 !== this.dx && (console.log(`已限制阅读 尝试过验证`), this.x = result.info.key, this.c = result.info.url.split("/s/")[1], this.b = 2, 101 | await $.wait(6000), await this.readfinish()); 102 | */ 103 | } catch (e) { 104 | console.log(e) 105 | } finally { 106 | return Promise.resolve(1); 107 | } 108 | } 109 | async add_gold() { 110 | try { 111 | var sj = Math.random() * (7000 - 6000) + 1000 112 | this.url=newurl+'/yunonline/v1/add_gold' 113 | let body = 'unionid=' + this.unionid + '&time=7'; 114 | let urlObject = popu(this.url, body,this.unionid) 115 | //console.log(urlObject) 116 | await httpRequest('post', urlObject) 117 | let result = httpResult; 118 | if (result && result.data) { 119 | console.log('获得',result.data.gold,'金币') 120 | if (result.data.day_read == 100 || result.data.day_read == 101 ) { 121 | console.log('可能是检测文章,请去手动看2-3篇') 122 | msg += `\n======== 账号 ${this.idx} 可能遇到检测文章 ========\n` 123 | msg += '\n前两篇文章请手动阅读\n' 124 | } else{ 125 | await $.wait(sj) 126 | await this.dotask() 127 | } 128 | 129 | 130 | } else { 131 | console.log(result) 132 | } 133 | 134 | /* 135 | "success" == result.msg && console.log(`增加金币-> ${result.info.num} 阅读次数 ${result.info.read_num} 当前金币 ${result.info.read_money}`), 136 | result.code > 200 && (console.log(`已达到阅读量 等待刷新`), this.fx = 1); 137 | */ 138 | } catch (e) { 139 | console.log(e) 140 | } finally { 141 | return Promise.resolve(1); 142 | } 143 | } 144 | async gold() { 145 | try { 146 | let t = Date.now() 147 | let url = newurl+`/yunonline/v1/gold?unionid=${this.unionid}&time=`+t; 148 | let body = ``; 149 | let urlObject = popu(url, body,this.unionid) 150 | //console.log(urlObject) 151 | await httpRequest('get', urlObject) 152 | let result = httpResult; 153 | //console.log(result) 154 | 155 | 156 | if (result && result.data) { 157 | result = result.data 158 | 159 | console.log(`\n今日阅读数量/收益:${result.day_read}/${result.day_gold}金币 `) 160 | console.log(`当前余额:${result.last_gold}金币 `) 161 | this.fb = 1 162 | this.left_gold=result.last_gold 163 | if (result.day_read == 0 || result.day_read == 1) { 164 | console.log('前两篇文章请手动阅读') 165 | this.fb = 0 166 | msg += `\n======== 账号 ${this.idx} 可能遇到检测文章 ========\n` 167 | msg += '\n前两篇文章请手动阅读\n' 168 | 169 | } else if (result.day_read == 100 || result.day_read == 101) { 170 | console.log('101和102可能为检测文章,请手动阅读') 171 | this.fb=0 172 | msg += `\n======== 账号 ${this.idx} 可能遇到检测文章 ========\n` 173 | msg += '\n前两篇文章请手动阅读\n' 174 | } 175 | /* 176 | this.cishu = result.infoView.rest 177 | 178 | if (result.infoView.status != 1) { 179 | this.fb = 1 180 | } 181 | if (result.infoView.status == 3) { 182 | // console.log(result.infoView.msg) 183 | msg += '' 184 | console.log('检测文章,需手动过') 185 | msg += `\n${this.idx} 碰到检测文章\n` 186 | this.fb = 1 187 | 188 | } else if (result.infoView.status == 4) { 189 | console.log(result.infoView.msg) 190 | 191 | } else if (result.infoView.rest == 0){ 192 | console.log(result.infoView.msg) 193 | } 194 | */ 195 | } 196 | } catch (e) { 197 | console.log(e) 198 | } finally { 199 | return Promise.resolve(1); 200 | } 201 | } 202 | 203 | 204 | async withdrawal() { 205 | try { 206 | let t = Date.now() 207 | let url = newurl+`/yunonline/v1/user_gold`; 208 | let body = `unionid=${this.unionid}&request_id=4c33a60c5f1068b83e576ca806bd4b6b&gold=1000`; 209 | let urlObject = popu(url, body,this.unionid) 210 | await httpRequest('post', urlObject) 211 | let result = httpResult; 212 | if (result.msg=='success') { 213 | result = result.data 214 | console.log(`\n转化获得余额 ${result.money}元 \n`) 215 | if (result.money >= 0.3) { 216 | await this.doWithdraw() 217 | } 218 | /* 219 | if (this.f < 3) console.log(`\n 不满足0.3 提现门槛\n`) 220 | this.f >= 3 && this.f < 5 && (this.cash = .3), this.f >= 10 && this.f < 20 && (this.cash = 1), this.f >= 20 && this.f < 50 && (this.cash = 2), 221 | this.f >= 50 && this.f < 100 && (this.cash = 2), this.f >= 100 && this.f < 200 && (this.cash = 10), this.f >= 200 && (this.cash = 20) 222 | if (this.f >= 3) console.log(`\n可以提现 ${result.info.sum}金币 去提现 ${this.cash} 元\n`), await this.exchange() 223 | */ 224 | 225 | }else{ 226 | console.log(result) 227 | } 228 | } catch (e) { 229 | console.log(e) 230 | } finally { 231 | return Promise.resolve(1); 232 | } 233 | } 234 | async doWithdraw(tx) { 235 | try { 236 | 237 | let t = Date.now() 238 | let url = newurl+`/yunonline/v1/withdraw`; 239 | let body = `unionid=${this.unionid}&request_id=4c33a60c5f1068b83e576ca806bd4b6b&ua=2`; 240 | let urlObject = popu(url, body,this.unionid) 241 | await httpRequest('post', urlObject) 242 | let result = httpResult; 243 | console.log(result) 244 | 245 | } catch (e) { 246 | console.log(e) 247 | } finally { 248 | return Promise.resolve(1); 249 | } 250 | } 251 | async task() { 252 | try { 253 | 254 | let abc = [...new Array(15).keys()] 255 | 256 | console.log(`\n=========== ${this.idx} 开始阅读文章 ===========\n`) 257 | await this.gold() 258 | 259 | //console.log(this.fb) 260 | if (this.fb == 1) { 261 | await this.dotask() 262 | await this.gold() 263 | //await $.wait(15000) 264 | 265 | } 266 | if (this.left_gold >= 3000 && this.istx == 1) await this.withdrawal() 267 | 268 | } catch (e) { 269 | console.log(e) 270 | } finally { 271 | return Promise.resolve(1); 272 | } 273 | } 274 | } 275 | 276 | !(async () => { 277 | if (typeof $request !== "undefined") { 278 | await GetRewrite() 279 | } else { 280 | if (!(await checkEnv())) return; 281 | if (userList.length > 0) { 282 | //await gethost() 283 | //console.log('获取到newurl:'+newurl) 284 | for (let user of userList) { 285 | await user.task() 286 | } 287 | if (msg.indexOf('请手动阅读') !=-1) await notify.sendNotify('微信阅读检测文章',msg) 288 | } 289 | } 290 | })() 291 | .catch((e) => console.log(e)) 292 | .finally(() => $.done()) 293 | 294 | /////////////////////////////////////////////////////////////////// 295 | 296 | async function gethost() { 297 | try { 298 | let t = Date.now() 299 | let url = 'https://qun.haozhuang.cn.com/fq_url/rk'; 300 | let body = '' 301 | let urlObject = popugethost(url, body) 302 | await httpRequest('get', urlObject) 303 | let result = httpResult; 304 | //console.log(result) 305 | if (result.jump) { 306 | newurl = result.jump.slice(0,-1) 307 | 308 | } 309 | } catch (e) { 310 | console.log(e) 311 | } finally { 312 | return Promise.resolve(1); 313 | } 314 | } 315 | 316 | async function checkEnv() { 317 | if (userCookie) { 318 | let splitor = envSplitor[0]; 319 | for (let sp of envSplitor) { 320 | if (userCookie.indexOf(sp) > -1) { 321 | splitor = sp; 322 | break; 323 | } 324 | } 325 | for (let userCookies of userCookie.split(splitor)) { 326 | if (userCookies) 327 | userList.push(new UserInfo(userCookies)) 328 | 329 | } 330 | userCount = userList.length 331 | } else { 332 | } 333 | 334 | console.log(`找到[${ckName}] 变量 ${userCount}个账号`) 335 | 336 | 337 | 338 | return true 339 | } 340 | 341 | //////////////////////////////////////////////////////////////////// 342 | function popu(url, body = '',ck) { 343 | //console.log(ck) /?upuid\u003d10314864 344 | let host = url.replace('//', '/').split('/')[1] 345 | let urlObject = { 346 | url: url, 347 | headers: { 348 | "Host": "erd.jjt2019.top:10267", 349 | //"content-length": "50", 350 | "accept": "application/json, text/javascript, */*; q\u003d0.01", 351 | "x-requested-with": "XMLHttpRequest", 352 | "user-agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/5019 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/3684 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/5G Language/zh_CN ABI/arm64", 353 | "content-type": "application/x-www-form-urlencoded; charset\u003dUTF-8", 354 | //"origin": "https://erd.jjt2019.top:10267", 355 | "sec-fetch-site": "same-origin", 356 | "sec-fetch-mode": "cors", 357 | "sec-fetch-dest": "empty", 358 | "referer": "https://erd.jjt2019.top:10267/yunonline/v8623/redirect/156db1c3b5dd01c24254aa07a793ff15?openid\u003doUDcn6KK6c8bQ1VAVgD8PAX0OqEE\u0026unionid\u003d"+ck, 359 | "accept-encoding": "gzip, deflate", 360 | "accept-language": "zh-CN,zh;q\u003d0.9,en-US;q\u003d0.8,en;q\u003d0.7" 361 | }, 362 | timeout: 5000, 363 | } 364 | if (body) { 365 | urlObject.body = body 366 | urlObject.headers['content-length'] = body.length 367 | } 368 | 369 | return urlObject; 370 | } 371 | function popugethost(url, body = '',ck) { 372 | //console.log(ck) 373 | let host = url.replace('//', '/').split('/')[1] 374 | let urlObject = { 375 | url: url, 376 | headers: { 377 | "Host": "qun.haozhuang.cn.com", 378 | "User-Agent": "Mozilla/5.0 (Linux; Android 12; M2012K11AC Build/SKQ1.211006.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.99 XWEB/4425 MMWEBSDK/20221206 Mobile Safari/537.36 MMWEBID/4883 MicroMessenger/8.0.32.2300(0x2800205D) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64", 379 | "Accept": "*/*", 380 | "Origin": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com", 381 | "X-Requested-With": "com.tencent.mm", 382 | "Referer": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com/index.html?upuid\u003d10315076" 383 | }, 384 | timeout: 5000, 385 | } 386 | if (body) { 387 | urlObject.body = body 388 | } 389 | 390 | return urlObject; 391 | } 392 | 393 | async function httpRequest(method, url) { 394 | //console.log(url) 395 | httpResult = null, httpReq = null, httpResp = null; 396 | return new Promise((resolve) => { 397 | $.send(method, url, async (err, req, resp) => { 398 | try { 399 | httpReq = req; 400 | httpResp = resp; 401 | if (err) { 402 | } else { 403 | if (resp.body) { 404 | if (typeof resp.body == "object") { 405 | httpResult = resp.body; 406 | } else { 407 | try { 408 | httpResult = JSON.parse(resp.body); 409 | } catch (e) { 410 | httpResult = resp.body; 411 | } 412 | } 413 | } 414 | } 415 | } catch (e) { 416 | console.log(e); 417 | } finally { 418 | resolve(); 419 | } 420 | }); 421 | }); 422 | } 423 | //////////////////////////////////////////////////////////////////// 424 | function Env(a, b) { 425 | return "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0), new class { 426 | constructor(a, b) { 427 | this.name = a, this.notifyStr = "", this.startTime = (new Date).getTime(), Object.assign(this, b), console.log(`${this.name} 开始运行: 428 | `) 429 | } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getdata(b) { let a = this.getval(b); if (/^@/.test(b)) { let [, c, f] = /^@(.*?)\.(.*?)$/.exec(b), d = c ? this.getval(c) : ""; if (d) try { let e = JSON.parse(d); a = e ? this.lodash_get(e, f, "") : a } catch (g) { a = "" } } return a } setdata(c, d) { let a = !1; if (/^@/.test(d)) { let [, b, e] = /^@(.*?)\.(.*?)$/.exec(d), f = this.getval(b), i = b ? "null" === f ? null : f || "{}" : "{}"; try { let g = JSON.parse(i); this.lodash_set(g, e, c), a = this.setval(JSON.stringify(g), b) } catch (j) { let h = {}; this.lodash_set(h, e, c), a = this.setval(JSON.stringify(h), b) } } else a = this.setval(c, d); return a } getval(a) { return this.isSurge() || this.isLoon() ? $persistentStore.read(a) : this.isQuanX() ? $prefs.valueForKey(a) : this.isNode() ? (this.data = this.loaddata(), this.data[a]) : this.data && this.data[a] || null } setval(b, a) { return this.isSurge() || this.isLoon() ? $persistentStore.write(b, a) : this.isQuanX() ? $prefs.setValueForKey(b, a) : this.isNode() ? (this.data = this.loaddata(), this.data[a] = b, this.writedata(), !0) : this.data && this.data[a] || null } send(b, a, f = () => { }) { if ("get" != b && "post" != b && "put" != b && "delete" != b) { console.log(`无效的http方法:${b}`); return } if ("get" == b && a.headers ? (delete a.headers["Content-Type"], delete a.headers["Content-Length"]) : a.body && a.headers && (a.headers["Content-Type"] || (a.headers["Content-Type"] = "application/x-www-form-urlencoded")), this.isSurge() || this.isLoon()) { this.isSurge() && this.isNeedRewrite && (a.headers = a.headers || {}, Object.assign(a.headers, { "X-Surge-Skip-Scripting": !1 })); let c = { method: b, url: a.url, headers: a.headers, timeout: a.timeout, data: a.body }; "get" == b && delete c.data, $axios(c).then(a => { let { status: b, request: c, headers: d, data: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }).catch(a => console.log(a)) } else if (this.isQuanX()) a.method = b.toUpperCase(), this.isNeedRewrite && (a.opts = a.opts || {}, Object.assign(a.opts, { hints: !1 })), $task.fetch(a).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, a => f(a)); else if (this.isNode()) { this.got = this.got ? this.got : require("got"); let { url: d, ...e } = a; this.instance = this.got.extend({ followRedirect: !1 }), this.instance[b](d, e).then(a => { let { statusCode: b, request: c, headers: d, body: e } = a; f(null, c, { statusCode: b, headers: d, body: e }) }, b => { let { message: c, response: a } = b; f(c, a, a && a.body) }) } } time(a) { let b = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "h+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; for (let c in /(y+)/.test(a) && (a = a.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))), b) new RegExp("(" + c + ")").test(a) && (a = a.replace(RegExp.$1, 1 == RegExp.$1.length ? b[c] : ("00" + b[c]).substr(("" + b[c]).length))); return a } async showmsg() { if (!this.notifyStr) return; let a = this.name + " \u8FD0\u884C\u901A\u77E5\n\n" + this.notifyStr; if ($.isNode()) { var b = require("./sendNotify"); console.log("\n============== \u63A8\u9001 =============="), await b.sendNotify(this.name, a) } else this.msg(a) } logAndNotify(a) { console.log(a), this.notifyStr += a, this.notifyStr += "\n" } msg(d = t, a = "", b = "", e) { let f = a => { if (!a) return a; if ("string" == typeof a) return this.isLoon() ? a : this.isQuanX() ? { "open-url": a } : this.isSurge() ? { url: a } : void 0; if ("object" == typeof a) { if (this.isLoon()) { let b = a.openUrl || a.url || a["open-url"], c = a.mediaUrl || a["media-url"]; return { openUrl: b, mediaUrl: c } } if (this.isQuanX()) { let d = a["open-url"] || a.url || a.openUrl, e = a["media-url"] || a.mediaUrl; return { "open-url": d, "media-url": e } } if (this.isSurge()) return { url: a.url || a.openUrl || a["open-url"] } } }; this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(d, a, b, f(e)) : this.isQuanX() && $notify(d, a, b, f(e))); let c = ["", "============== \u7CFB\u7EDF\u901A\u77E5 =============="]; c.push(d), a && c.push(a), b && c.push(b), console.log(c.join("\n")) } getMin(a, b) { return a < b ? a : b } getMax(a, b) { return a < b ? b : a } padStr(e, b, f = "0") { let a = String(e), g = b > a.length ? b - a.length : 0, c = ""; for (let d = 0; d < g; d++)c += f; return c + a } json2str(b, e, f = !1) { let c = []; for (let d of Object.keys(b).sort()) { let a = b[d]; a && f && (a = encodeURIComponent(a)), c.push(d + "=" + a) } return c.join(e) } str2json(e, f = !1) { let d = {}; for (let a of e.split("#")) { if (!a) continue; let b = a.indexOf("="); if (-1 == b) continue; let g = a.substr(0, b), c = a.substr(b + 1); f && (c = decodeURIComponent(c)), d[g] = c } return d } randomString(d, a = "abcdef0123456789") { let b = ""; for (let c = 0; c < d; c++)b += a.charAt(Math.floor(Math.random() * a.length)); return b } randomList(a) { let b = Math.floor(Math.random() * a.length); return a[b] } wait(a) { return new Promise(b => setTimeout(b, a)) } done(a = {}) { 430 | let b = (new Date).getTime(), c = (b - this.startTime) / 1e3; console.log(` 431 | ${this.name} 运行结束,共运行了 ${c} 秒!`), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(a) 432 | } 433 | }(a, b) 434 | } 435 | -------------------------------------------------------------------------------- /xiaomibbs.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -- coding: utf-8 -- 3 | # ------------------------------- 4 | # @Author : github@wd210010 https://github.com/wd210010/only_for_happy 5 | # @Upadate by Rookie-wb-WH: https://github.com/Rookie-wb-WH/ql_scripts 6 | # @Time : 2023/2/27 13:23 7 | # ------------------------------- 8 | # cron "30 8,10,15 * * *" script-path=xxx.py,tag=匹配cron用 9 | # const $ = new Env('小米社区任务得成长值') 10 | ''' 11 | 2023.11.13 修复签到 需要安装 pycryptodome 依赖 有封号风险 尽量别用 12 | 13 | 小米签到 小米社区任务得成长值 14 | 配置帐号密码 一一对应 按需增删 不对上会出错 若帐号密码填写没有错误 还是报错应该是账号在非常用设备上登录, 需要验证码, 使用该设备安装图形化工具后自行前去验证https://web-alpha.vip.miui.com/page/info/mio/mio/internalTest 图形化工具怎么安装可参考https://cloud.tencent.com/developer/article/2069955 15 | 图形化工具怎么安装可参考:centos7安装图形化界面图文详解 https://cloud.tencent.com/developer/article/2069955 16 | 使用该设备安装图形化工具后自行前去验证 https://web-alpha.vip.miui.com/page/info/mio/mio/internalTest 17 | 青龙变量export mi_account='' export mi_password='' 18 | ''' 19 | 20 | import base64 21 | import binascii 22 | import hashlib 23 | import json 24 | import random 25 | import re 26 | import requests 27 | import string 28 | import time 29 | import os 30 | 31 | from Crypto.Cipher import AES 32 | from Crypto.Cipher import PKCS1_v1_5 33 | from Crypto.PublicKey import RSA 34 | from Crypto.Util.Padding import pad 35 | 36 | mi_account = os.getenv("mi_account").split('&') 37 | mi_password = os.getenv("mi_password").split('&') 38 | 39 | 40 | # 获取 WebKitFormBoundary 随机字符串 41 | def generate_Boundary_random_string(length): 42 | letters_and_digits = string.ascii_letters + string.digits 43 | return ''.join(random.choice(letters_and_digits) for _ in range(length)) 44 | 45 | 46 | # 获取随机字符串 47 | def generate_random_string(length): 48 | s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()-=_+~`{}[]|:<>?/.' 49 | return ''.join(random.choice(s) for _ in range(length)) 50 | 51 | 52 | # AES加密 53 | def aes_encrypt(key, data): 54 | iv = '0102030405060708'.encode('utf-8') 55 | cipher = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv) 56 | padded_data = pad(data.encode('utf-8'), AES.block_size, style='pkcs7') 57 | ciphertext = cipher.encrypt(padded_data) 58 | return base64.b64encode(ciphertext).decode('utf-8') 59 | 60 | 61 | # RSA加密 62 | def rsa_encrypt(key, data): 63 | public_key = RSA.import_key(key) 64 | cipher = PKCS1_v1_5.new(public_key) 65 | ciphertext = cipher.encrypt(base64.b64encode(data.encode('utf-8'))) 66 | return base64.b64encode(ciphertext).decode('utf-8') 67 | 68 | 69 | # 获取cookie 70 | def Phone(account, password): 71 | md5 = hashlib.md5() 72 | md5.update(password.encode()) 73 | Hash = md5.hexdigest() 74 | url = "https://account.xiaomi.com/pass/serviceLoginAuth2" 75 | headers = { 76 | "Content-Type": "application/x-www-form-urlencoded", 77 | "User-Agent": 78 | "Dalvik/2.1.0 (Linux; U; Android 12; M2007J17C Build/SKQ1.211006.001) APP/xiaomi.vipaccount APPV/220301 MK/UmVkbWkgTm90ZSA5IFBybw== PassportSDK/3.7.8 passport-ui/3.7.8", 79 | "Cookie": 80 | "deviceId=X0jMu7b0w-jcne-S; pass_o=2d25bb648d023d7f; sdkVersion=accountsdk-2020.01.09", 81 | "Host": "account.xiaomi.com", 82 | "Connection": "Keep-Alive", 83 | "Accept-Encoding": "gzip" 84 | } 85 | data = { 86 | "cc": "+86", 87 | "qs": "%3F_json%3Dtrue%26sid%3Dmiui_vip%26_locale%3Dzh_CN", 88 | "callback": "https://api.vip.miui.com/sts", 89 | "_json": "true", 90 | "user": account, 91 | "hash": Hash.upper(), 92 | "sid": "miui_vip", 93 | "_sign": "ZJxpm3Q5cu0qDOMkKdWYRPeCwps%3D", 94 | "_locale": "zh_CN" 95 | } 96 | Auth1 = requests.post(url=url, headers=headers, 97 | data=data).text.replace("&&&START&&&", "") 98 | Auth = json.loads(Auth1) 99 | ssecurity = Auth["ssecurity"] 100 | nonce = Auth["nonce"] 101 | sha1 = hashlib.sha1() 102 | Str = "nonce=" + str(nonce) + "&" + ssecurity 103 | sha1.update(Str.encode("utf-8")) 104 | clientSign = base64.encodebytes( 105 | binascii.a2b_hex(sha1.hexdigest().encode("utf-8"))).decode( 106 | encoding="utf-8").strip() 107 | nurl = Auth[ 108 | "location"] + "&_userIdNeedEncrypt=true&clientSign=" + clientSign 109 | 110 | resp = requests.get(url=nurl) 111 | return requests.utils.dict_from_cookiejar(resp.cookies) 112 | 113 | 114 | # 获取签到所需要的Token 115 | def get_token(): 116 | key = generate_random_string(16) 117 | public_key = """-----BEGIN PUBLIC KEY----- 118 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArxfNLkuAQ/BYHzkzVwtu 119 | g+0abmYRBVCEScSzGxJIOsfxVzcuqaKO87H2o2wBcacD3bRHhMjTkhSEqxPjQ/FE 120 | XuJ1cdbmr3+b3EQR6wf/cYcMx2468/QyVoQ7BADLSPecQhtgGOllkC+cLYN6Md34 121 | Uii6U+VJf0p0q/saxUTZvhR2ka9fqJ4+6C6cOghIecjMYQNHIaNW+eSKunfFsXVU 122 | +QfMD0q2EM9wo20aLnos24yDzRjh9HJc6xfr37jRlv1/boG/EABMG9FnTm35xWrV 123 | R0nw3cpYF7GZg13QicS/ZwEsSd4HyboAruMxJBPvK3Jdr4ZS23bpN0cavWOJsBqZ 124 | VwIDAQAB 125 | -----END PUBLIC KEY-----""" 126 | data = '{"type":0,"startTs":' + str(round(time.time() * 1000)) + ',"endTs":' + str(round( 127 | time.time() * 1000)) + ',"env":{"p1":"","p2":"","p3":"","p4":"","p5":"","p6":"","p7":"","p8":"","p9":"","p10":"","p11":"","p12":"","p13":"","p14":"","p15":"","p16":"","p17":"","p18":"","p19":5,"p20":"","p21":"","p22":5,"p23":"","p24":"","p25":"","p26":"","p28":"","p29":"","p30":"","p31":"","p32":"","p33":"","p34":""},"action":{"a1":[],"a2":[],"a3":[],"a4":[],"a5":[],"a6":[],"a7":[],"a8":[],"a9":[],"a10":[],"a11":[],"a12":[],"a13":[],"a14":[]},"force":false,"talkBack":false,"uid":"' + generate_random_string( 128 | 27) + '","nonce":{"t":' + str(round(time.time())) + ',"r":' + str( 129 | round(time.time())) + '},"version":"2.0","scene":"GROW_UP_CHECKIN"}' 130 | s = rsa_encrypt(public_key, key) 131 | d = aes_encrypt(key, data) 132 | url = 'https://verify.sec.xiaomi.com/captcha/v2/data?k=3dc42a135a8d45118034d1ab68213073&locale=zh_CN' 133 | data = {'s': s, 'd': d, 'a': 'GROW_UP_CHECKIN'} 134 | result = requests.post(url=url, data=data).json() 135 | if result['msg'] != '参数错误': 136 | return result['data']['token'] 137 | 138 | for i in range(len(mi_account)): 139 | c_list = [] 140 | for k in range(10): 141 | a = Phone(mi_account[i], mi_password[i]) 142 | if len(a) > 0: 143 | c_list.append(a) 144 | cookie = str(c_list[-1]).replace('{', '').replace('}', '').replace(',', ';').replace(': ', '=').replace('\'', 145 | '').replace( 146 | ' ', '') 147 | miui_vip_ph = "".join(re.findall('miui_vip_ph=(.*?);', cookie, re.S)) 148 | url = 'https://api.vip.miui.com/mtop/planet/vip/user/checkinV2' 149 | params = { 150 | 'ref': 'vipAccountShortcut', 151 | 'pathname': '/mio/checkIn', 152 | 'version': 'dev.231026', 153 | 'miui_vip_ph': miui_vip_ph 154 | } 155 | boundary = 'WebKitFormBoundary' + generate_Boundary_random_string(16) 156 | headers = { 157 | 'Host': 'api.vip.miui.com', 158 | 'Accept': 'application/json', 159 | 'Cookie': f'{cookie}', 160 | 'Content-Type': f'multipart/form-data; boundary=----{boundary}', 161 | 'Origin': 'https://web.vip.miui.com', 162 | 'Referer': 'https://web.vip.miui.com/' 163 | } 164 | formData = { 165 | 'miui_vip_ph': miui_vip_ph, 166 | 'token': get_token() 167 | } 168 | multipart_data = [] 169 | for key, value in formData.items(): 170 | multipart_data.append(f'------{boundary}\r\nContent-Disposition: form-data; name="{key}"\r\n\r\n{value}\r\n') 171 | multipart_data.append(f'------{boundary}--\r\n') 172 | user_url = 'https://api.vip.miui.com/api/community/user/home/page' 173 | html = requests.post(url=url, headers=headers, params=params, data=''.join(multipart_data)).json() 174 | html_user = requests.get(url=user_url, headers=headers) 175 | result_user = json.loads(html_user.text) 176 | userId = result_user['entity']['userId'] 177 | print('*************' + '\n' + f'开始第{i + 1}个账号签到' + '\n') 178 | print('userId: ' + userId + ' 用户名: ' + result_user['entity']['userName'] + ' 段位: ' + 179 | result_user['entity']['userGrowLevelInfo']['showLevel']) 180 | if html['status'] == 200: 181 | print("签到成功:获得成长值+" + str(html['entity'])) 182 | elif html['status'] == 401: 183 | print("签到失败:Cookie失效") 184 | else: 185 | print("签到失败:" + str(html['message'])) 186 | 187 | # 点赞任务 188 | print('开始加入点赞任务>>>>') 189 | for a in range(2): 190 | dzurl = 'https://api.vip.miui.com/mtop/planet/vip/content/announceThumbUp' 191 | dz_data = { 192 | 'postId': '36625780', 193 | 'sign': '36625780', 194 | 'timestamp': int(round(time.time() * 1000)) 195 | } 196 | dz_html = requests.get(url=dzurl, headers=headers, data=dz_data) 197 | dz_result = json.loads(dz_html.text) 198 | if dz_result['status'] == 200: 199 | print('点赞帖子成功成功') 200 | time.sleep(1) 201 | # 加入圈子 202 | print('开始加入圈子任务>>>>') 203 | unfollow_url = 'https://api.vip.miui.com/api/community/board/unfollow?boardId=558495' 204 | html_unfollow = requests.get(url=unfollow_url, headers=headers) 205 | result_unfollow = json.loads(html_user.text) 206 | if result_unfollow['status'] == 200: 207 | print('退出圈子成功') 208 | time.sleep(1) 209 | 210 | follow_url = 'https://api.vip.miui.com/api/community/board/follow?boardId=558495' 211 | html_follow = requests.get(url=follow_url, headers=headers) 212 | result_follow = json.loads(html_user.text) 213 | if result_follow['status'] == 200: 214 | print('加入圈子成功') 215 | time.sleep(1) 216 | 217 | # 浏览主页 218 | info_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={userId}&action=BROWSE_SPECIAL_PAGES_USER_HOME' 219 | html_info = requests.get(url=info_url, headers=headers) 220 | time.sleep(12) 221 | result_info = json.loads(html_info.text) 222 | if result_info['status'] == 200: 223 | print('浏览主页成功,获得积分: ' + str(result_info['entity']['score'])) 224 | else: 225 | print(result_info['message'] + ',今日已达上限') 226 | 227 | # 浏览专题 228 | print('开始浏览专题任务>>>>') 229 | llzt_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={userId}&action=BROWSE_SPECIAL_PAGES_SPECIAL_PAGE' 230 | html_llzt = requests.get(url=llzt_url, headers=headers) 231 | time.sleep(12) 232 | result_llzt = json.loads(html_llzt.text) 233 | # print(result_llzt) 234 | if result_llzt['status'] == 200: 235 | print('浏览主页成功,获得积分: ' + str(result_llzt['entity']['score'])) 236 | else: 237 | print(result_llzt['message'] + ',今日已达上限') 238 | 239 | # 浏览帖子 240 | print('开始浏览帖子任务>>>>') 241 | for a in range(3): 242 | watch_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={userId}&action=BROWSE_POST_10S' 243 | html_watch = requests.get(url=watch_url, headers=headers) 244 | time.sleep(12) 245 | result_watch = json.loads(html_watch.text) 246 | # print(result_watch) 247 | if result_watch['status'] == 200: 248 | print('浏览帖子成功,获得积分: ' + str(result_watch['entity']['score'])) 249 | else: 250 | print(result_watch['message'] + ',今日已达上限') 251 | # 拔萝卜 252 | carroturl = 'https://api.vip.miui.com/api/carrot/pull' 253 | resp_carrot = requests.post(url=carroturl, headers=headers, params=params) 254 | r_json = resp_carrot.json() 255 | if r_json['code'] == 401: 256 | print("社区拔萝卜失败:Cookie无效") 257 | elif r_json['code'] != 200: 258 | print("社区拔萝卜失败:" + str(r_json['entity']['message'])) 259 | print("社区拔萝卜结果:" + str(r_json['entity']['message'])) 260 | money_count = r_json['entity']['header']['moneyCount'] 261 | print("当前金币数:" + str(money_count)) 262 | -------------------------------------------------------------------------------- /xiaomibbs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -- coding: utf-8 -- 3 | # ------------------------------- 4 | # @Author : github@wd210010 https://github.com/wd210010/just_for_happy 5 | # @Upadate by Rookie-wb-WH: https://github.com/Rookie-wb-WH/ql_scripts 6 | # @Time : 2023/2/27 13:23 7 | # ------------------------------- 8 | # cron "30 8,10,15 * * *" script-path=xxx.py,tag=匹配cron用 9 | # const $ = new Env('小米社区任务得成长值') 10 | ''' 11 | 2023.11.13 修复签到 需要安装 pycryptodome 依赖 12 | 13 | 小米签到 小米社区任务得成长值 14 | 配置帐号密码 一一对应 按需增删 不对上会出错 若帐号密码填写没有错误 还是报错应该是账号在非常用设备上登录, 需要验证码, 使用该设备安装图形化工具后自行前去验证https://web-alpha.vip.miui.com/page/info/mio/mio/internalTest 图形化工具怎么安装可参考https://cloud.tencent.com/developer/article/2069955 15 | 青龙变量export mi_account='' export mi_password='' 16 | 青龙变量 mi_account mi_password 17 | ''' 18 | 19 | import base64 20 | import binascii 21 | import hashlib 22 | import json 23 | import random 24 | import re 25 | import requests 26 | import string 27 | import time 28 | import os 29 | 30 | from Crypto.Cipher import AES 31 | from Crypto.Cipher import PKCS1_v1_5 32 | from Crypto.PublicKey import RSA 33 | from Crypto.Util.Padding import pad 34 | 35 | mi_account = os.getenv("mi_account").split('&') 36 | mi_password = os.getenv("mi_password").split('&') 37 | 38 | 39 | # 获取 WebKitFormBoundary 随机字符串 40 | def generate_Boundary_random_string(length): 41 | letters_and_digits = string.ascii_letters + string.digits 42 | return ''.join(random.choice(letters_and_digits) for _ in range(length)) 43 | 44 | 45 | # 获取随机字符串 46 | def generate_random_string(length): 47 | s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()-=_+~`{}[]|:<>?/.' 48 | return ''.join(random.choice(s) for _ in range(length)) 49 | 50 | 51 | # AES加密 52 | def aes_encrypt(key, data): 53 | iv = '0102030405060708'.encode('utf-8') 54 | cipher = AES.new(key.encode('utf-8'), AES.MODE_CBC, iv) 55 | padded_data = pad(data.encode('utf-8'), AES.block_size, style='pkcs7') 56 | ciphertext = cipher.encrypt(padded_data) 57 | return base64.b64encode(ciphertext).decode('utf-8') 58 | 59 | 60 | # RSA加密 61 | def rsa_encrypt(key, data): 62 | public_key = RSA.import_key(key) 63 | cipher = PKCS1_v1_5.new(public_key) 64 | ciphertext = cipher.encrypt(base64.b64encode(data.encode('utf-8'))) 65 | return base64.b64encode(ciphertext).decode('utf-8') 66 | 67 | 68 | # 获取cookie 69 | def Phone(account, password): 70 | md5 = hashlib.md5() 71 | md5.update(password.encode()) 72 | Hash = md5.hexdigest() 73 | url = "https://account.xiaomi.com/pass/serviceLoginAuth2" 74 | headers = { 75 | "Content-Type": "application/x-www-form-urlencoded", 76 | "User-Agent": 77 | "Dalvik/2.1.0 (Linux; U; Android 12; M2007J17C Build/SKQ1.211006.001) APP/xiaomi.vipaccount APPV/220301 MK/UmVkbWkgTm90ZSA5IFBybw== PassportSDK/3.7.8 passport-ui/3.7.8", 78 | "Cookie": 79 | "deviceId=X0jMu7b0w-jcne-S; pass_o=2d25bb648d023d7f; sdkVersion=accountsdk-2020.01.09", 80 | "Host": "account.xiaomi.com", 81 | "Connection": "Keep-Alive", 82 | "Accept-Encoding": "gzip" 83 | } 84 | data = { 85 | "cc": "+86", 86 | "qs": "%3F_json%3Dtrue%26sid%3Dmiui_vip%26_locale%3Dzh_CN", 87 | "callback": "https://api.vip.miui.com/sts", 88 | "_json": "true", 89 | "user": account, 90 | "hash": Hash.upper(), 91 | "sid": "miui_vip", 92 | "_sign": "ZJxpm3Q5cu0qDOMkKdWYRPeCwps%3D", 93 | "_locale": "zh_CN" 94 | } 95 | Auth1 = requests.post(url=url, headers=headers, 96 | data=data).text.replace("&&&START&&&", "") 97 | Auth = json.loads(Auth1) 98 | ssecurity = Auth["ssecurity"] 99 | nonce = Auth["nonce"] 100 | sha1 = hashlib.sha1() 101 | Str = "nonce=" + str(nonce) + "&" + ssecurity 102 | sha1.update(Str.encode("utf-8")) 103 | clientSign = base64.encodebytes( 104 | binascii.a2b_hex(sha1.hexdigest().encode("utf-8"))).decode( 105 | encoding="utf-8").strip() 106 | nurl = Auth[ 107 | "location"] + "&_userIdNeedEncrypt=true&clientSign=" + clientSign 108 | 109 | resp = requests.get(url=nurl) 110 | return requests.utils.dict_from_cookiejar(resp.cookies) 111 | 112 | 113 | # 获取签到所需要的Token 114 | def get_token(): 115 | key = generate_random_string(16) 116 | public_key = """-----BEGIN PUBLIC KEY----- 117 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArxfNLkuAQ/BYHzkzVwtu 118 | g+0abmYRBVCEScSzGxJIOsfxVzcuqaKO87H2o2wBcacD3bRHhMjTkhSEqxPjQ/FE 119 | XuJ1cdbmr3+b3EQR6wf/cYcMx2468/QyVoQ7BADLSPecQhtgGOllkC+cLYN6Md34 120 | Uii6U+VJf0p0q/saxUTZvhR2ka9fqJ4+6C6cOghIecjMYQNHIaNW+eSKunfFsXVU 121 | +QfMD0q2EM9wo20aLnos24yDzRjh9HJc6xfr37jRlv1/boG/EABMG9FnTm35xWrV 122 | R0nw3cpYF7GZg13QicS/ZwEsSd4HyboAruMxJBPvK3Jdr4ZS23bpN0cavWOJsBqZ 123 | VwIDAQAB 124 | -----END PUBLIC KEY-----""" 125 | data = '{"type":0,"startTs":' + str(round(time.time() * 1000)) + ',"endTs":' + str(round( 126 | time.time() * 1000)) + ',"env":{"p1":"","p2":"","p3":"","p4":"","p5":"","p6":"","p7":"","p8":"","p9":"","p10":"","p11":"","p12":"","p13":"","p14":"","p15":"","p16":"","p17":"","p18":"","p19":5,"p20":"","p21":"","p22":5,"p23":"","p24":"","p25":"","p26":"","p28":"","p29":"","p30":"","p31":"","p32":"","p33":"","p34":""},"action":{"a1":[],"a2":[],"a3":[],"a4":[],"a5":[],"a6":[],"a7":[],"a8":[],"a9":[],"a10":[],"a11":[],"a12":[],"a13":[],"a14":[]},"force":false,"talkBack":false,"uid":"' + generate_random_string( 127 | 27) + '","nonce":{"t":' + str(round(time.time())) + ',"r":' + str( 128 | round(time.time())) + '},"version":"2.0","scene":"GROW_UP_CHECKIN"}' 129 | s = rsa_encrypt(public_key, key) 130 | d = aes_encrypt(key, data) 131 | url = 'https://verify.sec.xiaomi.com/captcha/v2/data?k=3dc42a135a8d45118034d1ab68213073&locale=zh_CN' 132 | data = {'s': s, 'd': d, 'a': 'GROW_UP_CHECKIN'} 133 | result = requests.post(url=url, data=data).json() 134 | if result['msg'] != '参数错误': 135 | return result['data']['token'] 136 | 137 | for i in range(len(mi_account)): 138 | c_list = [] 139 | for k in range(10): 140 | a = Phone(mi_account[i], mi_password[i]) 141 | if len(a) > 0: 142 | c_list.append(a) 143 | cookie = str(c_list[-1]).replace('{', '').replace('}', '').replace(',', ';').replace(': ', '=').replace('\'', 144 | '').replace( 145 | ' ', '') 146 | miui_vip_ph = "".join(re.findall('miui_vip_ph=(.*?);', cookie, re.S)) 147 | url = 'https://api.vip.miui.com/mtop/planet/vip/user/checkinV2' 148 | params = { 149 | 'ref': 'vipAccountShortcut', 150 | 'pathname': '/mio/checkIn', 151 | 'version': 'dev.231026', 152 | 'miui_vip_ph': miui_vip_ph 153 | } 154 | boundary = 'WebKitFormBoundary' + generate_Boundary_random_string(16) 155 | headers = { 156 | 'Host': 'api.vip.miui.com', 157 | 'Accept': 'application/json', 158 | 'Cookie': f'{cookie}', 159 | 'Content-Type': f'multipart/form-data; boundary=----{boundary}', 160 | 'Origin': 'https://web.vip.miui.com', 161 | 'Referer': 'https://web.vip.miui.com/' 162 | } 163 | formData = { 164 | 'miui_vip_ph': miui_vip_ph, 165 | 'token': get_token() 166 | } 167 | multipart_data = [] 168 | for key, value in formData.items(): 169 | multipart_data.append(f'------{boundary}\r\nContent-Disposition: form-data; name="{key}"\r\n\r\n{value}\r\n') 170 | multipart_data.append(f'------{boundary}--\r\n') 171 | user_url = 'https://api.vip.miui.com/api/community/user/home/page' 172 | html = requests.post(url=url, headers=headers, params=params, data=''.join(multipart_data)).json() 173 | html_user = requests.get(url=user_url, headers=headers) 174 | result_user = json.loads(html_user.text) 175 | userId = result_user['entity']['userId'] 176 | print('*************' + '\n' + f'开始第{i + 1}个账号签到' + '\n') 177 | print('userId: ' + userId + ' 用户名: ' + result_user['entity']['userName'] + ' 段位: ' + 178 | result_user['entity']['userGrowLevelInfo']['showLevel']) 179 | if html['status'] == 200: 180 | print("签到成功:获得成长值+" + str(html['entity'])) 181 | elif html['status'] == 401: 182 | print("签到失败:Cookie失效") 183 | else: 184 | print("签到失败:" + str(html['message'])) 185 | 186 | # 点赞任务 187 | print('开始加入点赞任务>>>>') 188 | for a in range(2): 189 | dzurl = 'https://api.vip.miui.com/mtop/planet/vip/content/announceThumbUp' 190 | dz_data = { 191 | 'postId': '36625780', 192 | 'sign': '36625780', 193 | 'timestamp': int(round(time.time() * 1000)) 194 | } 195 | dz_html = requests.get(url=dzurl, headers=headers, data=dz_data) 196 | dz_result = json.loads(dz_html.text) 197 | if dz_result['status'] == 200: 198 | print('点赞帖子成功成功') 199 | time.sleep(1) 200 | # 加入圈子 201 | print('开始加入圈子任务>>>>') 202 | unfollow_url = 'https://api.vip.miui.com/api/community/board/unfollow?boardId=558495' 203 | html_unfollow = requests.get(url=unfollow_url, headers=headers) 204 | result_unfollow = json.loads(html_user.text) 205 | if result_unfollow['status'] == 200: 206 | print('退出圈子成功') 207 | time.sleep(1) 208 | 209 | follow_url = 'https://api.vip.miui.com/api/community/board/follow?boardId=558495' 210 | html_follow = requests.get(url=follow_url, headers=headers) 211 | result_follow = json.loads(html_user.text) 212 | if result_follow['status'] == 200: 213 | print('加入圈子成功') 214 | time.sleep(1) 215 | 216 | # 浏览主页 217 | info_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={userId}&action=BROWSE_SPECIAL_PAGES_USER_HOME' 218 | html_info = requests.get(url=info_url, headers=headers) 219 | time.sleep(12) 220 | result_info = json.loads(html_info.text) 221 | if result_info['status'] == 200: 222 | print('浏览主页成功,获得积分: ' + str(result_info['entity']['score'])) 223 | else: 224 | print(result_info['message'] + ',今日已达上限') 225 | 226 | # 浏览专题 227 | print('开始浏览专题任务>>>>') 228 | llzt_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={userId}&action=BROWSE_SPECIAL_PAGES_SPECIAL_PAGE' 229 | html_llzt = requests.get(url=llzt_url, headers=headers) 230 | time.sleep(12) 231 | result_llzt = json.loads(html_llzt.text) 232 | # print(result_llzt) 233 | if result_llzt['status'] == 200: 234 | print('浏览主页成功,获得积分: ' + str(result_llzt['entity']['score'])) 235 | else: 236 | print(result_llzt['message'] + ',今日已达上限') 237 | 238 | # 浏览帖子 239 | print('开始浏览帖子任务>>>>') 240 | for a in range(3): 241 | watch_url = f'https://api.vip.miui.com/mtop/planet/vip/member/addCommunityGrowUpPointByAction?userId={userId}&action=BROWSE_POST_10S' 242 | html_watch = requests.get(url=watch_url, headers=headers) 243 | time.sleep(12) 244 | result_watch = json.loads(html_watch.text) 245 | # print(result_watch) 246 | if result_watch['status'] == 200: 247 | print('浏览帖子成功,获得积分: ' + str(result_watch['entity']['score'])) 248 | else: 249 | print(result_watch['message'] + ',今日已达上限') 250 | # 拔萝卜 251 | carroturl = 'https://api.vip.miui.com/api/carrot/pull' 252 | resp_carrot = requests.post(url=carroturl, headers=headers, params=params) 253 | r_json = resp_carrot.json() 254 | if r_json['code'] == 401: 255 | print("社区拔萝卜失败:Cookie无效") 256 | elif r_json['code'] != 200: 257 | print("社区拔萝卜失败:" + str(r_json['entity']['message'])) 258 | print("社区拔萝卜结果:" + str(r_json['entity']['message'])) 259 | money_count = r_json['entity']['header']['moneyCount'] 260 | print("当前金币数:" + str(money_count)) 261 | -------------------------------------------------------------------------------- /xmbs.js: -------------------------------------------------------------------------------- 1 | 2 | 1 3 | /** 4 | 2 5 | * @ 临渊 6 | 3 7 | * 功能:小米运动刷步数 8 | 4 9 | * 日期:6-6 10 | 5 11 | * 变量格式:export xmbs='小米运动&密码&步数@xxx ' 多个账号用@分割 12 | 6 13 | * 定时一天一次 14 | 7 15 | * 更新成换行登录 16 | 8 17 | */ 18 | 9 19 | 20 | 10 21 | const $ = new Env('小米步数'); 22 | 11 23 | const notify = $.isNode() ? require('./sendNotify') : ''; 24 | 12 25 | const Notify = 1; //0为关闭通知,1为打开通知,默认为1 26 | 13 27 | const debug = 0; //0为关闭调试,1为打开调试,默认为0 28 | 14 29 | ////////////////////// 30 | 15 31 | let xmbs = ($.isNode() ? process.env.xmbs : $.getdata("xmbs")) || ""; 32 | 16 33 | let xmbsArr = []; 34 | 17 35 | let data = ''; 36 | 18 37 | let msg = ''; 38 | 19 39 | let back = 0; 40 | 20 41 | 42 | 21 43 | 44 | 22 45 | !(async () => { 46 | 23 47 | 48 | 24 49 | if (!(await Envs())) 50 | 25 51 | return; 52 | 26 53 | else { 54 | 27 55 | 56 | 28 57 | 58 | 29 59 | 60 | 30 61 | console.log(`\n\n========================================= \n脚本执行 - 北京时间(UTC+8):${new Date( 62 | 31 63 | new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 64 | 32 65 | 8 * 60 * 60 * 1000).toLocaleString()} \n=========================================\n`); 66 | 33 67 | 68 | 34 69 | 70 | 35 71 | console.log(`\n=================== 共找到 ${xmbsArr.length} 个账号 ===================`) 72 | 36 73 | 74 | 37 75 | if (debug) { 76 | 38 77 | console.log(`【debug】 这是你的全部账号数组:\n ${xmbsArr}`); 78 | 39 79 | } 80 | 40 81 | 82 | 41 83 | 84 | 42 85 | for (let index = 0; index < xmbsArr.length; index++) { 86 | 43 87 | 88 | 44 89 | 90 | 45 91 | let num = index + 1 92 | 46 93 | console.log(`\n========= 开始【第 ${num} 个账号】=========\n`) 94 | 47 95 | 96 | 48 97 | bs = xmbsArr[index].split('&'); 98 | -------------------------------------------------------------------------------- /xqz.js: -------------------------------------------------------------------------------- 1 | /* 2 | @肥皂 3.22 闲趣赚 一天0.1-0.4或者更高(根据用户等级增加任务次数) 3 | 3.24 更新加入用户余额和信息。。。。 4 | 苹果&安卓下载地址:复制链接到微信打开 5 | 新人进去直接秒到账两个0.3.。。。(微信登录)花两分钟再完成下新人任务,大概秒到微信3元左右 6 | 感觉看账号等级,我的小号进去只能做五个任务,大号可以做十个。 7 | 建议做一下里面的任务,单价还是不错的,做完等级升上来了挂脚本收益也多一点。 8 | 抓取域名 wap.quxianzhuan.com 抓取cookie的全部数据。。 9 | 青龙变量 xqzck 多账户@隔开 10 | 更新加入用户余额和信息。。。。 11 | */ 12 | var _0xodm='jsjiami.com.v6',_0xodm_=['_0xodm'],_0x47f7=[_0xodm,'IsOGIMKifQ==','PMOQw4A=','w4c3f8O7wrQ=','ZemVnOi3vei3rOS4jeWLp++9mQ==','WBDCuiI=','wpDCpicUwr8=','wqjplb7otprotZrkua7liKjvvbo=','w5/DocKtEwc=','eDHCiUIhHwVmw7DCvMK4axzDjsOiwqLCjy/Dp8KrDsOww68wwoJbwrQ6w48aUDkJ','acKCVMOEBQ==','F1rDqsKSwowJw5XDgsOrw5XDg0NzS8Kdw4FGwrrCpQvDgsK6Bg3CsWDDg8KUcMKFwrLDuC8nwoE3MMKmwrczw5jCu8KJwrdEw6LCqMOdU8ORw6p3woLCihjDmsKrSFrDjlNGQ8KmQBHCkgYxCsOQwr8Ow4bCo19uwp7DvcOaV8KnRcKNKMOPUUg1w5HDtcKTAMOSw6LDtAs2RsOJw7xNOHzClcKEw7sywo7CgsODBk/Dr3EOdcKjD8Ktwrhpw7gLwpwNJcKMwopDw6QNdSbCvXjCjEMlwo5Jdj1RwopQQwHDtH3DtsOLwrksw6ltNg7CshZfK2p+w5IywoNDXsOHwrDCtgXDhMOqwrLCrsKLw4oIw5HDlMOOwqsOw4vCoMKVZsOYw7Ehw5TDqsOpwpLCksKPcC3CjMKgFg7CkS1pFMOzRH8oMcKxfcOLw4sIw7jCjDjCgsK6XsOSw6PDkjTDvcOUb8O8WMKMw5R9HsKmwrjDgsKrw5chwq9DaFYfwpDDtDrDo3JiDDNbw7/Cg8Kiw4FSw7vDg8OfJiI+N8OwZTzDsMKUw7rCsgoAworCozjDvMKqCsKow4XCjcK+wp4lwr/DhSkmw7x0wo7Cj8OOfBIRwoVywoJOw49lZQnDt2RGQMKIEsK5PHBdWcKJIsKqwqY8L8O5w5VdKsKsSX9OwpdDw6rCvsO9wooBGMK8aMO5FRdOwoEjJMKUwrsjdCPCpMKdRMO4wopQbsOxw6zCl8KVwq/CuTwbf8KTwpF1FWxgIHklwqIQcMKFwo0UwoBxw7lqwqjDtcK5QsKzw7PCpcOqRsOGw7BbLiXDqMOwQj3CqExPwqocKyjDncKLw6LCpsOkwqEJwp9HworCrcOAwo/DusKAEsOHwrJ3w7fCllUPTMONw6HCjgXCpiLDjcOhwqPCgA3DusOrwrgDw7bChsK7wqlPw5lzw6PDmsKUw5cew4HCjDbCmx/CmMONwqB9U0UcwpvDg3zDqwkOw5cZw40/GMO5w47DvnbCvRNEwosMPSdPw6B5w4ouw6oPwp7Dj0lWBMOKw7lsbx7ClsK6wqdAwr9bF8KUfw3DksKQJj4NwqR3wqnDpjZFw5vDsgTCjTbCggLCpRoAw6zCmBw8w60Sw6vClRDCsMKAw7TDsVTDlmE9w6bCicKmw519VVHCs1IKwqrClk/DmMOYOGzCuyNZwqBdVMKOw47CnsKswprDhkbCtDTCghQbTsK6UsOWw7nCtlkXwqNpAAzDlg7Cun3Ct8OFwpw9woIPCMKhwownwoVPQ8KTQDHCgz/DoXcyL2ZBwqhXw5bDrMOvFmnDncKow4XCk8OCwojCjF3CjCB7w6/CqyfClGsfw7F4IQ9FwoNFw7dhbMKON3QOLMKIwpDClTIHa8OAwrjDmV3Cv2oaIMOxw4LClygnE1x2MDjDlUNFwrAdw7zDlSPDusKXKmFXw4VHRMOUAEwOwpfDjDcabnLDiMK2C2gcwq/DrgBEw63Dm8OBwpoEwoBFTMOwwojCnWDDiWDCmMK1AMOoTjhBw4hHw7/CgHRYwrw0HcKbwpM5wrQbBhJcYcKjwrkqQcOEw7cAw6Irw4XDn05kwoBuw7p6HA3CuMOVMQ==','w7Y0Cw==','Uh5uD8KS','W+mVs+i0qui2oOmesuS4t+eUp+aIt++/j+ODhQ==','a8OiVcK4Og==','TR50CMKVw4g=','6Zej6La76LeZA8KIwr1A','wozCnsKAw6hmMQ==','w4M9VmF5wr54IyM=','w5I9ZQ==','w5TDp8KOPyA=','wp7DmcK2w7TCk8KzwpzDmEo=','w5HDgD8rwp4=','HyjChcOHJQ==','QT7CuhjCoQ==','dTNXIcKc','w5QCSmYm','w68eZsOew5E=','w7AMaw==','wo/CoRQtwrjCpE10w5Vawoshwr4o5Yee','w7AGYkkiwpc=','5Lme6Lac5YyVejfCogJmIsK8FgXCmFtsBsKt','w7YgeGRc','F8Ouw6bCi8KO','wo3ClC4Aw6Q=','GcO3BcKFew==','HcOPMMOSwpkr','w5rDni3DqMO8','Az7DrA==','fuW+uuWkqeOBh+mXqOi0rOi1tQ==','wrPCthITw48=','PsOww45ww5k=','w4fDtinDiTA=','PcOdJg==','wp3plK7oto7otrbpnabkuIXnlrzmioTvv6XjgY0=','44K5wrhGwrDljYbmjaPnjKPkv5rpoa7jgI0=','cyTCiVE6','w4TDtwzDlcObw4E=','w4bDo1dl','wrrCiMKiw7dw','aCLDtcOhWA==','w7nDh8KM','YOmUrOi3gei3ieS4tuWKh++9kg==','wrLCrAIGw4TCvXrDm8KwwqwKw7PDvcKqVMOHTMO9I3otIcOow6hrG0xhwpHDu8OJwpUtMijDkA7DhEDCi18hWy1ZwoEAb8KLw5DCgnDCkcO7F8Kfw6pQw7vCjMKTDB5Mbj8=','HzDDuRAM','wrjCsMKZ','elDDkl9n','XlAwBcKa','PgzCocOLDw==','w4DDl1srYQ==','w6/DqVREQg==','PMObw5wUKQ==','EMKcwp1ybg==','56+75bybA0jnp5fnubXnu4Hku7/kuoHku7bliq0=','w47DuEFpSw==','wqPDrsKhw7PCsw==','eA7Cp8OJFA==','w5nDpXBJWw==','w6fDgcKbNB8=','dyDChMOUJFk4bnY7wq4fBULCksKFw4ROw708wp/DksK7bHA9C8O0RsKyHcO9wr7Cun1RwrTCsgrDo14XFHPCm8OQQMOKw5M=','e8OEw6/DgE5hwoDDk8O3woE=','wroFY1w7wpdUwoHCtcKP','w7zChg80wod0w7BUwrQ=','wq/CusKeTA==','EMOGw47CkMKT','BUZabMK3','GcObwpY0cg==','44C+UcO+duWMguaMu+eMo+S+j+mhuOOCig==','ejFsjigbbaCUmiuU.coDSKm.WGtWv6=='];if(function(_0x2d158c,_0x5267c3,_0x228c42){function _0x247644(_0x3a135d,_0x2a2af7,_0x49ff78,_0x19dbdb,_0x48e387,_0x1d2c4f){_0x2a2af7=_0x2a2af7>>0x8,_0x48e387='po';var _0x2c4df0='shift',_0x4548da='push',_0x1d2c4f='';if(_0x2a2af7<_0x3a135d){while(--_0x3a135d){_0x19dbdb=_0x2d158c[_0x2c4df0]();if(_0x2a2af7===_0x3a135d&&_0x1d2c4f===''&&_0x1d2c4f['length']===0x1){_0x2a2af7=_0x19dbdb,_0x49ff78=_0x2d158c[_0x48e387+'p']();}else if(_0x2a2af7&&_0x49ff78['replace'](/[eFgbbCUuUDSKWGtW=]/g,'')===_0x2a2af7){_0x2d158c[_0x4548da](_0x19dbdb);}}_0x2d158c[_0x4548da](_0x2d158c[_0x2c4df0]());}return 0xd98cb;};return _0x247644(++_0x5267c3,_0x228c42)>>_0x5267c3^_0x228c42;}(_0x47f7,0xfa,0xfa00),_0x47f7){_0xodm_=_0x47f7['length']^0xfa;};function _0x39d2(_0x14a187,_0x2c8b59){_0x14a187=~~'0x'['concat'](_0x14a187['slice'](0x1));var _0x1dcceb=_0x47f7[_0x14a187];if(_0x39d2['cyBWSE']===undefined){(function(){var _0x5620f1=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x28fd2d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x5620f1['atob']||(_0x5620f1['atob']=function(_0x36d503){var _0x27a8c2=String(_0x36d503)['replace'](/=+$/,'');for(var _0x14c4b5=0x0,_0x398741,_0x2e0bac,_0x341908=0x0,_0x13699b='';_0x2e0bac=_0x27a8c2['charAt'](_0x341908++);~_0x2e0bac&&(_0x398741=_0x14c4b5%0x4?_0x398741*0x40+_0x2e0bac:_0x2e0bac,_0x14c4b5++%0x4)?_0x13699b+=String['fromCharCode'](0xff&_0x398741>>(-0x2*_0x14c4b5&0x6)):0x0){_0x2e0bac=_0x28fd2d['indexOf'](_0x2e0bac);}return _0x13699b;});}());function _0x145597(_0x433724,_0x2c8b59){var _0x5de13e=[],_0x205ea1=0x0,_0x52aed6,_0x39de4b='',_0x63fd89='';_0x433724=atob(_0x433724);for(var _0x385398=0x0,_0x532dd4=_0x433724['length'];_0x385398<_0x532dd4;_0x385398++){_0x63fd89+='%'+('00'+_0x433724['charCodeAt'](_0x385398)['toString'](0x10))['slice'](-0x2);}_0x433724=decodeURIComponent(_0x63fd89);for(var _0x2218a7=0x0;_0x2218a7<0x100;_0x2218a7++){_0x5de13e[_0x2218a7]=_0x2218a7;}for(_0x2218a7=0x0;_0x2218a7<0x100;_0x2218a7++){_0x205ea1=(_0x205ea1+_0x5de13e[_0x2218a7]+_0x2c8b59['charCodeAt'](_0x2218a7%_0x2c8b59['length']))%0x100;_0x52aed6=_0x5de13e[_0x2218a7];_0x5de13e[_0x2218a7]=_0x5de13e[_0x205ea1];_0x5de13e[_0x205ea1]=_0x52aed6;}_0x2218a7=0x0;_0x205ea1=0x0;for(var _0x3915c7=0x0;_0x3915c7<_0x433724['length'];_0x3915c7++){_0x2218a7=(_0x2218a7+0x1)%0x100;_0x205ea1=(_0x205ea1+_0x5de13e[_0x2218a7])%0x100;_0x52aed6=_0x5de13e[_0x2218a7];_0x5de13e[_0x2218a7]=_0x5de13e[_0x205ea1];_0x5de13e[_0x205ea1]=_0x52aed6;_0x39de4b+=String['fromCharCode'](_0x433724['charCodeAt'](_0x3915c7)^_0x5de13e[(_0x5de13e[_0x2218a7]+_0x5de13e[_0x205ea1])%0x100]);}return _0x39de4b;}_0x39d2['weUfxi']=_0x145597;_0x39d2['eNnPgT']={};_0x39d2['cyBWSE']=!![];}var _0x36f452=_0x39d2['eNnPgT'][_0x14a187];if(_0x36f452===undefined){if(_0x39d2['zGiWHB']===undefined){_0x39d2['zGiWHB']=!![];}_0x1dcceb=_0x39d2['weUfxi'](_0x1dcceb,_0x2c8b59);_0x39d2['eNnPgT'][_0x14a187]=_0x1dcceb;}else{_0x1dcceb=_0x36f452;}return _0x1dcceb;};const $=new Env(_0x39d2('0','XzrC'));let status;status=(status=$[_0x39d2('1','#4H(')](_0x39d2('2','uIh3'))||'1')>0x1?''+status:'';let xqzckArr=[],xqzcount='';let xqzck=($['isNode']()?process[_0x39d2('3','weK&')]['xqzck']:$['getdata']('xqzck'))||'';let xqzid='',xqztk='';!(async()=>{var _0x55a7c1={'orBje':function(_0x3d9df1){return _0x3d9df1();},'WLXvS':function(_0x59adb7,_0x5f06d4,_0x142623){return _0x59adb7(_0x5f06d4,_0x142623);},'mCwUH':function(_0x1c7e11,_0x16d57c){return _0x1c7e11+_0x16d57c;},'HEDSc':function(_0x1f5d99,_0x5cba52){return _0x1f5d99*_0x5cba52;},'rFFxU':function(_0x6159b8,_0x5668d1){return _0x6159b8-_0x5668d1;},'FFWmu':function(_0xcefed9,_0x245794){return _0xcefed9!==_0x245794;},'MyPAY':'VkgaL','nOiNL':function(_0x33e25c){return _0x33e25c();},'JLMMf':'LcqgK','MlTvQ':function(_0x16c644,_0xb3e2de){return _0x16c644!==_0xb3e2de;},'Fooqo':_0x39d2('4','EUbI'),'JpigR':function(_0x52bc02){return _0x52bc02();}};if(typeof $request!==_0x39d2('5','KA3y')){if(_0x55a7c1[_0x39d2('6','%iIs')](_0x55a7c1['MyPAY'],'VkgaL')){_0x55a7c1[_0x39d2('7','v0Nn')](resolve);}else{await _0x55a7c1[_0x39d2('8','GV6i')](xqzck);}}else{if(_0x55a7c1[_0x39d2('9','JUv5')]!==_0x39d2('a','qAxn')){xqzckArr=xqzck[_0x39d2('b','RHFD')]('@');console[_0x39d2('c','qAxn')](_0x39d2('d','z[7J')+xqzckArr[_0x39d2('e','qAxn')]+_0x39d2('f',']!Q4'));for(let _0x2c0f0c=0x0;_0x2c0f0c