├── 58tc.js ├── aiqicha.js ├── app_dmdd.js ├── aqc.js ├── bhxcy.js ├── elmV3.js ├── fqxs.js ├── gylm-ym.js ├── haier.js ├── hy.js ├── jd_kww.js ├── jdyd.js ├── jhdxw.js ├── jiniandao.js ├── jrtt.js ├── jrttjsb.js ├── jryc.js ├── jzyl.js ├── ks.js ├── lxzx.js ├── meidi.js ├── meituanV3.js ├── mrdj.js ├── mtsj.js ├── mxbc.js ├── nksp.js ├── nmhntn.js ├── nmhshy.js ├── nmldj.js ├── nmmncjhy.js ├── nmmnshj.js ├── nmxlclub.js ├── pddgy.js ├── qdxw.js ├── qianti.js ├── qk365.js ├── qmgold2.0.js ├── qwyd.js ├── rdxk.js ├── sendNotify.js ├── sfsy.js ├── suboer.js ├── txs.js ├── txsp.js ├── txstockV2.js ├── utils.js ├── wn.js ├── wx-rd.js ├── xbk.js ├── xiaibang.js ├── xmbs.js ├── ydwx.js ├── ylw.js ├── ymxk.js ├── ysf.js ├── yysk.js ├── zbz.js ├── zssq.js ├── 乐玩星球.js ├── 多娇江山.js ├── 沃阅读抽奖.py ├── 消消赚.js ├── 爱海盐.js ├── 联通畅游.py └── 联通阅读.py /aiqicha.js: -------------------------------------------------------------------------------- 1 | /* 2 | cron 0 8,16,21 * * * https://ghproxy.com/github.com/WindFgg/QuantumultX_Conf/blob/main/Scripts/aiqicha.js 爱企查日常任务 3 | 下载地址:https://aiqicha.baidu.com/m/usercenter/inviteCode?uid=xlTM-TogKuTwvdzTq9EFdGvdxrmJpAANFgmd 4 | 5 | 手动抓取CK:https://passport.baidu.com/v2/?login 一个整个ck复制 6 | 每天执行三次 可能有一些任务跑不完 如:高级搜索 浏览监控日报 属正常现象 (百度抽风) 7 | 多账号请用@分割Cookie 格式:ck1@ck2@ck2 青龙变量aqcCookies qx和v2p暂时不可使用 8 | 批量查询任务暂时无法完成 9 | 感谢Wenmoux的爱妻查任务脚本 Wenmoux github地址:https://github.com/Wenmoux/checkbox 作者仅完善和修改 10 | */ 11 | const $ = new Env("爱企查1"); 12 | const axios = require("axios"); 13 | const notify = $.isNode() ? require("./sendNotify") : ""; 14 | aqcookie = $.isNode() ? process.env.aqcCookies : ""; 15 | aqcookieArr = []; 16 | 17 | var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); 18 | let oo = { 19 | CX10002: "每日签到", 20 | CX10001: "每日登陆", 21 | CX11001: "查询企业", 22 | CX11002: "查询老板", 23 | CX11003: "查询老赖", 24 | CX11004: "查询商标", 25 | CX11005: "查询地图", 26 | CX11006: "浏览新闻", 27 | CX11007: "浏览监控日报", 28 | CX11009: "查询关系", 29 | CX11010: "批量查询", 30 | CX12001: "添加监控", 31 | CX12002: "添加关注", 32 | CX12005: "分享任务", 33 | CX12006: "邀请任务", 34 | CX12007: "高级搜索", 35 | CX12008: "高级筛选", 36 | }; 37 | 38 | const headers = { 39 | "User-Agent": 40 | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Safari/537.36", 41 | referer: 42 | "https://aiqicha.baidu.com/m/s?t=3&q=%E5%B0%8F%E7%B1%B3&VNK=e73b55ef", 43 | "X-Requested-With": "XMLHttpRequest", 44 | Host: "aiqicha.baidu.com", 45 | cookie: "", 46 | }; 47 | 48 | function rand() { 49 | let key = ["苹果", "华为", "百度", "一个", "暴风", "王者"]; 50 | let i = Math.floor(Math.random() * key.length); 51 | return key[i]; 52 | } 53 | 54 | function get(api, method, data) { 55 | return new Promise(async (resolve) => { 56 | try { 57 | let url = `https://aiqicha.baidu.com/${api}`; 58 | if (method == "get") 59 | res = await axios.get(url, { 60 | headers, 61 | }); 62 | if (method == "post") 63 | res = await axios.post(url, data, { 64 | headers, 65 | }); 66 | if (res.data.status == 0) console.log(" 操作成功"); 67 | else console.log(" " + res.data.msg); 68 | resolve(res.data); 69 | } catch (err) { 70 | console.log(err); 71 | } 72 | resolve(); 73 | }); 74 | } 75 | 76 | async function getaskList() { 77 | let tres = await get("usercenter/checkTaskStatusAjax", "get"); 78 | let obj = tres.data; 79 | if (tres.status == 0) { 80 | Object.keys(obj).forEach(function (key) { 81 | if (oo[key]) { 82 | let task = obj[key]; 83 | task.title = key; 84 | alltaskList.push(task); 85 | if (task.count == task.totalcount) ytaskList.push(task); 86 | if (task.canClaim != 0) claimList.push(key); 87 | if (task.count != task.totalcount) taskList.push(task); 88 | } 89 | }); 90 | } 91 | console.log( 92 | `共 ${alltaskList.length}任务 已完成 ${ytaskList.length} 任务 可做 ${taskList.length}任务 ${claimList.length}任务可领取奖励` 93 | ); 94 | } 95 | 96 | async function dotask(taskList) { 97 | for (var o of taskList) { 98 | switch (o.title) { 99 | case "CX10002": //每日签到 100 | console.log("开始任务:" + oo[o.title]); 101 | await get(`usercenter/userSignAjax`, "get"); 102 | break; 103 | case "CX10001": //每日登陆 104 | console.log("开始任务:" + oo[o.title]); 105 | break; 106 | case "CX11001": //查询企业 107 | console.log("开始任务:" + oo[o.title]); 108 | await get(`s/getHeadBrandAndPersonAjax?q=${encodeURI(rand())}`, "get"); 109 | await sleep(5000); 110 | break; 111 | case "CX11002": //查询老板 112 | console.log("开始任务:" + oo[o.title]); 113 | await get( 114 | `person/relevantPersonalAjax?page=1&q=${encodeURI(rand())}&size=10`, 115 | "get" 116 | ); 117 | await sleep(5000); 118 | break; 119 | case "CX11003": //查询老赖 120 | console.log("开始任务:" + oo[o.title]); 121 | await get( 122 | `c/dishonestAjax?q=${encodeURI( 123 | rand() 124 | )}&t=8&s=10&p=1&f=%7B%22type%22:%221%22%7D`, 125 | "get" 126 | ); 127 | await sleep(5000); 128 | break; 129 | case "CX11004": //查询商标 130 | console.log("开始任务:" + oo[o.title]); 131 | await get( 132 | `c/markproAjax?q=${encodeURI(rand())}&p=1&s=10&f=%7B%7D&o=%7B%7D`, 133 | "get" 134 | ); 135 | await sleep(5000); 136 | break; 137 | case "CX11005": //查询地图 138 | console.log("开始任务:" + oo[o.title]); 139 | await get( 140 | `map/getAdvanceFilterListAjax?longitude=113.76343399&latitude=23.04302382&distance=2&page=1`, 141 | "get" 142 | ); 143 | await sleep(5000); 144 | break; 145 | case "CX11006": //浏览新闻 146 | console.log("开始任务:" + oo[o.title]); 147 | await get( 148 | "m/getYuqingDetailAjax?yuqingId=993090dcb7574be014599996098459e3", 149 | "get" 150 | ); 151 | break; 152 | case "CX11007": //浏览监控日报 153 | console.log("开始任务:" + oo[o.title]); 154 | let jk = await get( 155 | "zxcenter/monitorDailyReportListAjax?page=1&size=10", 156 | "get" 157 | ); 158 | let list = jk.data.list; 159 | if (list) { 160 | for (p = 0; p < 2 && p < list.length; p++) { 161 | await get( 162 | `zxcenter/monitorDailyReportDetailAjax?reportdate=${list[p].reportDate}`, 163 | "get" 164 | ); 165 | } 166 | } 167 | break; 168 | case "CX11009": //查询关系 169 | console.log("开始任务:" + oo[o.title]); 170 | await get( 171 | `relations/findrelationsAjax?from=e07a8ef1409bff3987f1b28d118ff826&to=6f5966de4af2eb29085ffbcc9cc0116a&pathNum=10`, 172 | "get" 173 | ); 174 | await sleep(5000); 175 | break; 176 | case "CX11010": //批量查询 177 | console.log("开始任务:" + oo[o.title]); 178 | await get( 179 | `batchquery/show?exportkey=xlTM-TogKuTwFXlQeIXL0-Z9C*YO4vCwtkRdM7XV9*7FpZRZtSR8*2qgItOy*xqmSxZSsju-YgmZmd`, 180 | "get" 181 | ); 182 | await sleep(5000); 183 | break; 184 | case "CX12001": //添加监控 185 | console.log("开始任务:" + oo[o.title]); 186 | for (id of [ 187 | 29829264524016, 28696417032417, 31370200772422, 31242153386614, 188 | ]) { 189 | await get(`zxcenter/addMonitorAjax?pid=${id}`, "get"); 190 | } 191 | await get(`zxcenter/addMonitorAjax?pid=29710155220353`, "get"); 192 | await get(`zxcenter/cancelMonitorAjax?pid=29710155220353`, "get"); 193 | await sleep(5000); 194 | break; 195 | case "CX12002": //添加关注 196 | console.log("开始任务:" + oo[o.title]); 197 | await get(`my/addCollectAjax`, "post", `pid=34527616977197`); 198 | await get(`my/delCollectAjax`, "post", `pid=34527616977197`); 199 | await sleep(5000); 200 | break; 201 | case "CX12005": //分享好友 202 | console.log("开始任务:" + oo[o.title]); 203 | let shres = await get(`usercenter/getShareUrlAjax`, "get"); 204 | uid = shres.data.match(/uid=(.+)/); 205 | if (uid) { 206 | uid = uid[1]; 207 | headers["cookie"] = ""; 208 | let t = Date.now(); 209 | headers["referer"] = "https://" + shres.data + "&VNK=" + t; 210 | headers["Zx-Open-Url"] = "https://" + shres.data + "&VNK=" + t; 211 | await get(`m/?uid=${uid}`, "get"); 212 | await get(`m/getuserinfoAjax?uid=${uid}`, "get"); 213 | headers.cookie = aqcookie; 214 | await sleep(500); 215 | } 216 | break; 217 | case "CX12007": //高级搜索 218 | console.log("开始任务:" + oo[o.title]); 219 | await get( 220 | `search/advanceSearchAjax?q=${encodeURI( 221 | rand() 222 | )}&t=11&p=1&s=10&o=0&f=%7B%22searchtype%22:[%221%22]%7D`, 223 | "get" 224 | ); 225 | break; 226 | case "CX12008": //高级筛选 227 | console.log("开始任务:" + oo[o.title]); 228 | await get( 229 | `search/advanceFilterAjax?q=%E7%A6%8F%E5%B7%9E%E6%AF%8F%E6%97%A5&t=0&p=1&s=10&o=0`, 230 | "get" 231 | ); 232 | break; 233 | default: 234 | break; 235 | } 236 | await sleep(5000); 237 | console.log(" 去领取爱豆"); 238 | let clres = await get( 239 | `zxcenter/claimUserTaskAjax?taskCode=${o.title}`, 240 | "get" 241 | ); 242 | if (clres.status == 0) 243 | console.log(` 领取成功!获得${clres.data.totalScore}爱豆r\n`); 244 | } 245 | } 246 | 247 | async function aqc() { 248 | msg = ""; 249 | console.log( 250 | `======== 脚本执行-北京时间(UTC+8):${new Date( 251 | new Date().getTime() + 8 * 60 * 60 * 1000 252 | ).toLocaleString()} =========\n` 253 | ); 254 | if (aqcookieArr) { 255 | console.log("\r\n爱企查cookie数量:" + aqcookieArr.length + ""); 256 | for (a = 0; a < aqcookieArr.length; a++) { 257 | aqcookie = aqcookieArr[a]; 258 | headers.cookie = aqcookie; 259 | ytaskList = []; 260 | taskList = []; 261 | claimList = []; 262 | alltaskList = []; 263 | console.log("\n******账号" + (a + 1) + "开始******\n"); 264 | let logininfo = await get("m/getuserinfoAjax", "get"); 265 | if (logininfo.data.isLogin == 1) { 266 | await getaskList(); 267 | await dotask(taskList); 268 | await dotask(taskList); 269 | await sleep(500); 270 | claimList = []; 271 | await getaskList(); 272 | for (task of claimList) { 273 | console.log(`领取爱豆:${oo[task]}`); 274 | let clres = await get( 275 | `zxcenter/claimUserTaskAjax?taskCode=${task}`, 276 | "get" 277 | ); 278 | if (clres.status == 0) 279 | console.log(`领取成功!获得${clres.data.totalScore}爱豆r\n`); 280 | } 281 | console.log("去查询爱豆积分"); 282 | let userinfo = await get("usercenter/getvipinfoAjax", "get"); 283 | msg += `账号${a + 1}【${logininfo.data.userName}】:共${ 284 | userinfo.data.consume 285 | }爱豆\n`; 286 | } else { 287 | msg = "cookie已失效"; 288 | } 289 | } 290 | } else { 291 | msg += 292 | "请手动抓取cookies"; 293 | } 294 | console.log(msg); 295 | await notify.sendNotify($.name, msg); 296 | return msg; 297 | } 298 | 299 | if (aqcookie) { 300 | if (aqcookie.indexOf("@") != -1) { 301 | aqcookie.split("@").forEach((item) => { 302 | aqcookieArr.push(item); 303 | }); 304 | } else { 305 | aqcookieArr.push(aqcookie); 306 | } 307 | aqc(); 308 | //console.log("爱企查共:" + aqcookieArr.length + "个账号"); 309 | } else { 310 | console.log( 311 | "请手动抓取cookies" 312 | ); 313 | return; 314 | } 315 | 316 | // prettier-ignore 317 | function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 318 | -------------------------------------------------------------------------------- /aqc.js: -------------------------------------------------------------------------------- 1 | /* 2 | cron 28 8,16,21 * * * https://github.com/MooNight16/qinglong-js/edit/main/aqc.js 爱企查2 3 | 下载地址:https://aiqicha.baidu.com/m/usercenter/inviteCode?uid=xlTM-TogKuTwvdzTq9EFdGvdxrmJpAANFgmd 4 | 手动抓取CK:https://passport.baidu.com/v2/?login 一个整个ck复制 5 | 每天执行三次 可能有一些任务跑不完 如:高级搜索 浏览监控日报 属正常现象 (百度抽风) 6 | 多账号请用@分割Cookie 格式:ck1@ck2@ck2 青龙变量aqcCookies qx和v2p暂时不可使用 7 | 批量查询任务暂时无法完成 8 | 感谢Wenmoux的爱妻查任务脚本 Wenmoux github地址:https://github.com/Wenmoux/checkbox 作者仅完善和修改 9 | */ 10 | const $ = new Env("爱企查2"); 11 | const axios = require("axios"); 12 | const notify = $.isNode() ? require("./sendNotify") : ""; 13 | aqcookie = $.isNode() ? process.env.aqcc : ""; 14 | aqcookieArr = []; 15 | 16 | var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); 17 | let oo = { 18 | CX10002: "每日签到", 19 | CX10001: "每日登陆", 20 | CX11001: "查询企业", 21 | CX11002: "查询老板", 22 | CX11003: "查询老赖", 23 | CX11004: "查询商标", 24 | CX11005: "查询地图", 25 | CX11006: "浏览新闻", 26 | CX11007: "浏览监控日报", 27 | CX11009: "查询关系", 28 | CX11010: "批量查询", 29 | CX12001: "添加监控", 30 | CX12002: "添加关注", 31 | CX12005: "分享任务", 32 | CX12006: "邀请任务", 33 | CX12007: "高级搜索", 34 | CX12008: "高级筛选", 35 | }; 36 | 37 | const headers = { 38 | "User-Agent": 39 | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Safari/537.36", 40 | referer: 41 | "https://aiqicha.baidu.com/m/s?t=3&q=%E5%B0%8F%E7%B1%B3&VNK=e73b55ef", 42 | "X-Requested-With": "XMLHttpRequest", 43 | Host: "aiqicha.baidu.com", 44 | cookie: "", 45 | }; 46 | 47 | function rand() { 48 | let key = ["苹果", "华为", "百度", "一个", "暴风", "王者"]; 49 | let i = Math.floor(Math.random() * key.length); 50 | return key[i]; 51 | } 52 | 53 | function get(api, method, data) { 54 | return new Promise(async (resolve) => { 55 | try { 56 | let url = `https://aiqicha.baidu.com/${api}`; 57 | if (method == "get") 58 | res = await axios.get(url, { 59 | headers, 60 | }); 61 | if (method == "post") 62 | res = await axios.post(url, data, { 63 | headers, 64 | }); 65 | if (res.data.status == 0) console.log(" 操作成功"); 66 | else console.log(" " + res.data.msg); 67 | resolve(res.data); 68 | } catch (err) { 69 | console.log(err); 70 | } 71 | resolve(); 72 | }); 73 | } 74 | 75 | async function getaskList() { 76 | let tres = await get("usercenter/checkTaskStatusAjax", "get"); 77 | let obj = tres.data; 78 | if (tres.status == 0) { 79 | Object.keys(obj).forEach(function (key) { 80 | if (oo[key]) { 81 | let task = obj[key]; 82 | task.title = key; 83 | alltaskList.push(task); 84 | if (task.count == task.totalcount) ytaskList.push(task); 85 | if (task.canClaim != 0) claimList.push(key); 86 | if (task.count != task.totalcount) taskList.push(task); 87 | } 88 | }); 89 | } 90 | console.log( 91 | `共 ${alltaskList.length}任务 已完成 ${ytaskList.length} 任务 可做 ${taskList.length}任务 ${claimList.length}任务可领取奖励` 92 | ); 93 | } 94 | 95 | async function dotask(taskList) { 96 | for (var o of taskList) { 97 | switch (o.title) { 98 | case "CX10002": //每日签到 99 | console.log("开始任务:" + oo[o.title]); 100 | await get(`usercenter/userSignAjax`, "get"); 101 | break; 102 | case "CX10001": //每日登陆 103 | console.log("开始任务:" + oo[o.title]); 104 | break; 105 | case "CX11001": //查询企业 106 | console.log("开始任务:" + oo[o.title]); 107 | await get(`s/getHeadBrandAndPersonAjax?q=${encodeURI(rand())}`, "get"); 108 | await sleep(5000); 109 | break; 110 | case "CX11002": //查询老板 111 | console.log("开始任务:" + oo[o.title]); 112 | await get( 113 | `person/relevantPersonalAjax?page=1&q=${encodeURI(rand())}&size=10`, 114 | "get" 115 | ); 116 | await sleep(5000); 117 | break; 118 | case "CX11003": //查询老赖 119 | console.log("开始任务:" + oo[o.title]); 120 | await get( 121 | `c/dishonestAjax?q=${encodeURI( 122 | rand() 123 | )}&t=8&s=10&p=1&f=%7B%22type%22:%221%22%7D`, 124 | "get" 125 | ); 126 | await sleep(5000); 127 | break; 128 | case "CX11004": //查询商标 129 | console.log("开始任务:" + oo[o.title]); 130 | await get( 131 | `c/markproAjax?q=${encodeURI(rand())}&p=1&s=10&f=%7B%7D&o=%7B%7D`, 132 | "get" 133 | ); 134 | await sleep(5000); 135 | break; 136 | case "CX11005": //查询地图 137 | console.log("开始任务:" + oo[o.title]); 138 | await get( 139 | `map/getAdvanceFilterListAjax?longitude=113.76343399&latitude=23.04302382&distance=2&page=1`, 140 | "get" 141 | ); 142 | await sleep(5000); 143 | break; 144 | case "CX11006": //浏览新闻 145 | console.log("开始任务:" + oo[o.title]); 146 | await get( 147 | "m/getYuqingDetailAjax?yuqingId=993090dcb7574be014599996098459e3", 148 | "get" 149 | ); 150 | break; 151 | case "CX11007": //浏览监控日报 152 | console.log("开始任务:" + oo[o.title]); 153 | let jk = await get( 154 | "zxcenter/monitorDailyReportListAjax?page=1&size=10", 155 | "get" 156 | ); 157 | let list = jk.data.list; 158 | if (list) { 159 | for (p = 0; p < 2 && p < list.length; p++) { 160 | await get( 161 | `zxcenter/monitorDailyReportDetailAjax?reportdate=${list[p].reportDate}`, 162 | "get" 163 | ); 164 | } 165 | } 166 | break; 167 | case "CX11009": //查询关系 168 | console.log("开始任务:" + oo[o.title]); 169 | await get( 170 | `relations/findrelationsAjax?from=e07a8ef1409bff3987f1b28d118ff826&to=6f5966de4af2eb29085ffbcc9cc0116a&pathNum=10`, 171 | "get" 172 | ); 173 | await sleep(5000); 174 | break; 175 | case "CX11010": //批量查询 176 | console.log("开始任务:" + oo[o.title]); 177 | await get( 178 | `batchquery/show?exportkey=xlTM-TogKuTwFXlQeIXL0-Z9C*YO4vCwtkRdM7XV9*7FpZRZtSR8*2qgItOy*xqmSxZSsju-YgmZmd`, 179 | "get" 180 | ); 181 | await sleep(5000); 182 | break; 183 | case "CX12001": //添加监控 184 | console.log("开始任务:" + oo[o.title]); 185 | for (id of [ 186 | 29829264524016, 28696417032417, 31370200772422, 31242153386614, 187 | ]) { 188 | await get(`zxcenter/addMonitorAjax?pid=${id}`, "get"); 189 | } 190 | await get(`zxcenter/addMonitorAjax?pid=29710155220353`, "get"); 191 | await get(`zxcenter/cancelMonitorAjax?pid=29710155220353`, "get"); 192 | await sleep(5000); 193 | break; 194 | case "CX12002": //添加关注 195 | console.log("开始任务:" + oo[o.title]); 196 | await get(`my/addCollectAjax`, "post", `pid=34527616977197`); 197 | await get(`my/delCollectAjax`, "post", `pid=34527616977197`); 198 | await sleep(5000); 199 | break; 200 | case "CX12005": //分享好友 201 | console.log("开始任务:" + oo[o.title]); 202 | let shres = await get(`usercenter/getShareUrlAjax`, "get"); 203 | uid = shres.data.match(/uid=(.+)/); 204 | if (uid) { 205 | uid = uid[1]; 206 | headers["cookie"] = ""; 207 | let t = Date.now(); 208 | headers["referer"] = "https://" + shres.data + "&VNK=" + t; 209 | headers["Zx-Open-Url"] = "https://" + shres.data + "&VNK=" + t; 210 | await get(`m/?uid=${uid}`, "get"); 211 | await get(`m/getuserinfoAjax?uid=${uid}`, "get"); 212 | headers.cookie = aqcookie; 213 | await sleep(500); 214 | } 215 | break; 216 | case "CX12007": //高级搜索 217 | console.log("开始任务:" + oo[o.title]); 218 | await get( 219 | `search/advanceSearchAjax?q=${encodeURI( 220 | rand() 221 | )}&t=11&p=1&s=10&o=0&f=%7B%22searchtype%22:[%221%22]%7D`, 222 | "get" 223 | ); 224 | break; 225 | case "CX12008": //高级筛选 226 | console.log("开始任务:" + oo[o.title]); 227 | await get( 228 | `search/advanceFilterAjax?q=%E7%A6%8F%E5%B7%9E%E6%AF%8F%E6%97%A5&t=0&p=1&s=10&o=0`, 229 | "get" 230 | ); 231 | break; 232 | default: 233 | break; 234 | } 235 | await sleep(5000); 236 | console.log(" 去领取爱豆"); 237 | let clres = await get( 238 | `zxcenter/claimUserTaskAjax?taskCode=${o.title}`, 239 | "get" 240 | ); 241 | if (clres.status == 0) 242 | console.log(` 领取成功!获得${clres.data.totalScore}爱豆r\n`); 243 | } 244 | } 245 | 246 | async function aqc() { 247 | msg = ""; 248 | console.log( 249 | `======== 脚本执行-北京时间(UTC+8):${new Date( 250 | new Date().getTime() + 8 * 60 * 60 * 1000 251 | ).toLocaleString()} =========\n` 252 | ); 253 | if (aqcookieArr) { 254 | console.log("\r\n爱企查cookie数量:" + aqcookieArr.length + ""); 255 | for (a = 0; a < aqcookieArr.length; a++) { 256 | aqcookie = aqcookieArr[a]; 257 | headers.cookie = aqcookie; 258 | ytaskList = []; 259 | taskList = []; 260 | claimList = []; 261 | alltaskList = []; 262 | console.log("\n******账号" + (a + 1) + "开始******\n"); 263 | let logininfo = await get("m/getuserinfoAjax", "get"); 264 | if (logininfo.data.isLogin == 1) { 265 | await getaskList(); 266 | await dotask(taskList); 267 | await dotask(taskList); 268 | await sleep(500); 269 | claimList = []; 270 | await getaskList(); 271 | for (task of claimList) { 272 | console.log(`领取爱豆:${oo[task]}`); 273 | let clres = await get( 274 | `zxcenter/claimUserTaskAjax?taskCode=${task}`, 275 | "get" 276 | ); 277 | if (clres.status == 0) 278 | console.log(`领取成功!获得${clres.data.totalScore}爱豆r\n`); 279 | } 280 | console.log("去查询爱豆积分"); 281 | let userinfo = await get("usercenter/getvipinfoAjax", "get"); 282 | msg += `账号${a + 1}【${logininfo.data.userName}】:共${ 283 | userinfo.data.consume 284 | }爱豆\n`; 285 | } else { 286 | msg = "cookie已失效"; 287 | } 288 | } 289 | } else { 290 | msg += 291 | "请手动抓取cookies"; 292 | } 293 | console.log(msg); 294 | await notify.sendNotify($.name, msg); 295 | return msg; 296 | } 297 | 298 | if (aqcookie) { 299 | if (aqcookie.indexOf("@") != -1) { 300 | aqcookie.split("@").forEach((item) => { 301 | aqcookieArr.push(item); 302 | }); 303 | } else { 304 | aqcookieArr.push(aqcookie); 305 | } 306 | aqc(); 307 | //console.log("爱企查共:" + aqcookieArr.length + "个账号"); 308 | } else { 309 | console.log( 310 | "请手动抓取cookies" 311 | ); 312 | return; 313 | } 314 | 315 | // prettier-ignore 316 | function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} 317 | -------------------------------------------------------------------------------- /jdyd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 微信阅读 3 | 阅读入口 微信打开 4 | https://api.djguangt.top:10253/yunonline/v1/auth/19a44bf6f8ad847887d92a6bf96ded99?codeurl=djguangt.top:10253&codeuserid=2&time=1678766540 5 | 6 | 备用入口:https://api.wanglingqing.top:10262/yunonline/v1/auth/19a44bf6f8ad847887d92a6bf96ded99?codeurl=wanglingqing.top:10262&codeuserid=1&time=1678766540 7 | 8 | 捉https://erd.jjt2019.top/yunonline/v1/gold?unionid=nonxxxx&time=1678449887000 中的 unionid 9 | 10 | 捉域名https://erd.jjt2019.top/yunonline/v1/task 11 | 12 | 环境变量名称 jdyuedu 13 | cookie格式unionid&secret 14 | 去掉unionid=和secret=开头 15 | 多个账户换行隔开 16 | 17 | 目前验证文章不清楚 随机检测 18 | 但每天第一轮必验证 19 | 不过验证必黑, 20 | 建议第一轮读到第三篇文章 21 | 建议定时半夜跑 凌晨跑了人太多 22 | 容易黑 23 | cron:44 5-20/2 * * * 24 | */ 25 | 26 | const $ = new Env("微信简单阅读"); 27 | const notify = $.isNode() ? require('./sendNotify') : ''; 28 | let envSplitor = ['@', '\n'] 29 | let httpResult, httpReq, httpResp 30 | let ckName = 'jdyuedu' 31 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 32 | let userList = [] 33 | let userIdx = 0 34 | let userCount = 0 35 | var msg = '' 36 | var jiance = 0 //1获取文章 , 0阅读 37 | let newurl = "https://erd.jjt2019.top:10267" 38 | /////////////////////////////////////////////////////////////////// 39 | class UserInfo { 40 | constructor(str) { 41 | //console.log(str) 42 | this.istx = 1 43 | if (str.indexOf('##')!=-1) this.istx=0 44 | 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] 45 | } 46 | 47 | async dotask() { 48 | try { 49 | let t = Date.now() 50 | this.ul = newurl+`/yunonline/v1/task`; 51 | let body = 'secret='+this.secret+'&type=read'; 52 | let urlObject = popu(this.ul, body,this.unionid) 53 | await httpRequest('post', urlObject) 54 | let result = httpResult; 55 | //console.log(result) 56 | if ( result.msg == 'success') { 57 | if (jiance == 1) { 58 | console.log( result.data.link) 59 | msg += '\n' + result.data.link + '\n' 60 | } else { 61 | await this.jump(result.data.link.split('redirect_uri=')[1]) 62 | } 63 | 64 | 65 | } else if (result.errcode == 409){ 66 | console.log('下次阅读时间:', result.msg/60) 67 | 68 | } else if (result.errcode == 407){ 69 | console.log(result.msg) 70 | } else { 71 | console.log(result) 72 | } 73 | /* 74 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 75 | "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, 76 | await $.wait(6000), await this.readfinish()); 77 | */ 78 | } catch (e) { 79 | console.log(e) 80 | } finally { 81 | return Promise.resolve(1); 82 | } 83 | } 84 | 85 | async jump(readurl) { 86 | try { 87 | let t = Date.now() 88 | readurl = decodeURIComponent(readurl); 89 | var sj = Math.random() * (7000 - 6000) + 4000 90 | 91 | 92 | this.key = readurl.match(/key=(.*?)&/)[1] 93 | this.state= readurl.match(/state=(.*?)#/)[1] 94 | this.ul = newurl+`/yunonline/v1/jump?key=${this.key}&unionid=${this.unionid}&code=071jHI0w3wTxf03NIp1w36OkoF1jHI0P&state=` + this.state 95 | //console.log(this.ul) 96 | 97 | let body = ``; 98 | let urlObject = popu(this.ul, body,this.unionid) 99 | await httpRequest('get', urlObject) 100 | let result = httpResult; 101 | //console.log(result) 102 | //var sj = Math.random() * (8000 - 6000) + 6000 103 | //console.log('等待:'+ sj) 104 | await $.wait(sj) 105 | await this.add_gold() 106 | 107 | /* 108 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 109 | "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, 110 | await $.wait(6000), await this.readfinish()); 111 | */ 112 | } catch (e) { 113 | console.log(e) 114 | } finally { 115 | return Promise.resolve(1); 116 | } 117 | } 118 | async add_gold() { 119 | try { 120 | var sj = Math.random() * (7000 - 6000) + 1000 121 | this.url=newurl+'/yunonline/v1/add_gold' 122 | let body = 'unionid=' + this.unionid + '&time=7'; 123 | let urlObject = popu(this.url, body,this.unionid) 124 | //console.log(urlObject) 125 | await httpRequest('post', urlObject) 126 | let result = httpResult; 127 | if (result && result.data) { 128 | console.log('获得',result.data.gold,) 129 | await $.wait(sj) 130 | await this.dotask() 131 | 132 | } else { 133 | console.log(result) 134 | } 135 | 136 | /* 137 | "success" == result.msg && console.log(`增加金币-> ${result.info.num} 阅读次数 ${result.info.read_num} 当前金币 ${result.info.read_money}`), 138 | result.code > 200 && (console.log(`已达到阅读量 等待刷新`), this.fx = 1); 139 | */ 140 | } catch (e) { 141 | console.log(e) 142 | } finally { 143 | return Promise.resolve(1); 144 | } 145 | } 146 | async gold() { 147 | try { 148 | let t = Date.now() 149 | let url = newurl+`/yunonline/v1/gold?unionid=${this.unionid}&time=`+t; 150 | let body = ``; 151 | let urlObject = popu(url, body,this.unionid) 152 | //console.log(urlObject) 153 | await httpRequest('get', urlObject) 154 | let result = httpResult; 155 | //console.log(result) 156 | 157 | 158 | if (result && result.data) { 159 | result = result.data 160 | 161 | console.log(`\n今日阅读数量/收益:${result.day_read}/${result.day_gold}金币 `) 162 | console.log(`当前余额:${result.last_gold}金币 `) 163 | this.left_gold=result.last_gold 164 | /* 165 | this.cishu = result.infoView.rest 166 | 167 | if (result.infoView.status != 1) { 168 | this.fb = 1 169 | } 170 | if (result.infoView.status == 3) { 171 | // console.log(result.infoView.msg) 172 | msg += '' 173 | console.log('检测文章,需手动过') 174 | msg += `\n${this.idx} 碰到检测文章\n` 175 | this.fb = 1 176 | 177 | } else if (result.infoView.status == 4) { 178 | console.log(result.infoView.msg) 179 | 180 | } else if (result.infoView.rest == 0){ 181 | console.log(result.infoView.msg) 182 | } 183 | */ 184 | } 185 | } catch (e) { 186 | console.log(e) 187 | } finally { 188 | return Promise.resolve(1); 189 | } 190 | } 191 | 192 | 193 | async withdrawal() { 194 | try { 195 | let t = Date.now() 196 | let url = newurl+`/yunonline/v1/user_gold`; 197 | let body = `unionid=${this.unionid}&request_id=4c33a60c5f1068b83e576ca806bd4b6b&gold=1000`; 198 | let urlObject = popu(url, body,this.unionid) 199 | await httpRequest('post', urlObject) 200 | let result = httpResult; 201 | if (result.msg=='success') { 202 | result = result.data 203 | console.log(`\n转化获得余额 ${result.money}元 \n`) 204 | if (result.money >= 0.3) { 205 | await this.doWithdraw() 206 | } 207 | /* 208 | if (this.f < 3) console.log(`\n 不满足0.3 提现门槛\n`) 209 | 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), 210 | this.f >= 50 && this.f < 100 && (this.cash = 2), this.f >= 100 && this.f < 200 && (this.cash = 10), this.f >= 200 && (this.cash = 20) 211 | if (this.f >= 3) console.log(`\n可以提现 ${result.info.sum}金币 去提现 ${this.cash} 元\n`), await this.exchange() 212 | */ 213 | 214 | }else{ 215 | console.log(result) 216 | } 217 | } catch (e) { 218 | console.log(e) 219 | } finally { 220 | return Promise.resolve(1); 221 | } 222 | } 223 | async doWithdraw(tx) { 224 | try { 225 | 226 | let t = Date.now() 227 | let url = newurl+`/yunonline/v1/withdraw`; 228 | let body = `unionid=${this.unionid}&request_id=4c33a60c5f1068b83e576ca806bd4b6b&ua=2`; 229 | let urlObject = popu(url, body,this.unionid) 230 | await httpRequest('post', urlObject) 231 | let result = httpResult; 232 | console.log(result) 233 | 234 | } catch (e) { 235 | console.log(e) 236 | } finally { 237 | return Promise.resolve(1); 238 | } 239 | } 240 | async task() { 241 | try { 242 | 243 | let abc = [...new Array(15).keys()] 244 | msg += `\n======== 账号 ${this.idx} 检测文章 ========\n` 245 | console.log(`\n=========== ${this.idx} 开始阅读文章 ===========\n`) 246 | await this.gold() 247 | await this.dotask() 248 | await this.gold() 249 | //console.log(this.fb) 250 | if (this.fb == 11) { 251 | for (let i = 0;i< 10;i++) { 252 | await this.task() 253 | 254 | /* 255 | break 256 | if (this.dx == 1) break 257 | await this.getreadurl() 258 | if (this.fx == 1) break 259 | */ 260 | } 261 | await this.getreadinfo() 262 | //await $.wait(15000) 263 | 264 | } 265 | if (this.left_gold >= 3000 && this.istx == 1) await this.withdrawal() 266 | 267 | } catch (e) { 268 | console.log(e) 269 | } finally { 270 | return Promise.resolve(1); 271 | } 272 | } 273 | } 274 | 275 | !(async () => { 276 | if (typeof $request !== "undefined") { 277 | await GetRewrite() 278 | } else { 279 | if (!(await checkEnv())) return; 280 | if (userList.length > 0) { 281 | //await gethost() 282 | //console.log('获取到newurl:'+newurl) 283 | for (let user of userList) { 284 | await user.task() 285 | } 286 | if (msg.indexOf('redirect_uri=') !=-1) await notify.sendNotify('微信阅读检测文章',msg) 287 | } 288 | } 289 | })() 290 | .catch((e) => console.log(e)) 291 | .finally(() => $.done()) 292 | 293 | /////////////////////////////////////////////////////////////////// 294 | 295 | async function gethost() { 296 | try { 297 | let t = Date.now() 298 | let url = 'https://qun.haozhuang.cn.com/fq_url/rk'; 299 | let body = '' 300 | let urlObject = popugethost(url, body) 301 | await httpRequest('get', urlObject) 302 | let result = httpResult; 303 | //console.log(result) 304 | if (result.jump) { 305 | newurl = result.jump.slice(0,-1) 306 | 307 | } 308 | } catch (e) { 309 | console.log(e) 310 | } finally { 311 | return Promise.resolve(1); 312 | } 313 | } 314 | 315 | async function checkEnv() { 316 | if (userCookie) { 317 | let splitor = envSplitor[0]; 318 | for (let sp of envSplitor) { 319 | if (userCookie.indexOf(sp) > -1) { 320 | splitor = sp; 321 | break; 322 | } 323 | } 324 | for (let userCookies of userCookie.split(splitor)) { 325 | if (userCookies) 326 | userList.push(new UserInfo(userCookies)) 327 | 328 | } 329 | userCount = userList.length 330 | } else { 331 | } 332 | 333 | console.log(`找到[${ckName}] 变量 ${userCount}个账号`) 334 | 335 | 336 | 337 | return true 338 | } 339 | 340 | //////////////////////////////////////////////////////////////////// 341 | function popu(url, body = '',ck) { 342 | //console.log(ck) /?upuid\u003d10314864 343 | let host = url.replace('//', '/').split('/')[1] 344 | let urlObject = { 345 | url: url, 346 | headers: { 347 | "Host": "erd.jjt2019.top:10267", 348 | //"content-length": "50", 349 | "accept": "application/json, text/javascript, */*; q\u003d0.01", 350 | "x-requested-with": "XMLHttpRequest", 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; charset\u003dUTF-8", 353 | //"origin": "https://erd.jjt2019.top:10267", 354 | "sec-fetch-site": "same-origin", 355 | "sec-fetch-mode": "cors", 356 | "sec-fetch-dest": "empty", 357 | "referer": "https://erd.jjt2019.top:10267/yunonline/v8623/redirect/156db1c3b5dd01c24254aa07a793ff15?openid\u003doUDcn6KK6c8bQ1VAVgD8PAX0OqEE\u0026unionid\u003d"+ck, 358 | "accept-encoding": "gzip, deflate", 359 | "accept-language": "zh-CN,zh;q\u003d0.9,en-US;q\u003d0.8,en;q\u003d0.7" 360 | }, 361 | timeout: 5000, 362 | } 363 | if (body) { 364 | urlObject.body = body 365 | urlObject.headers['content-length'] = body.length 366 | } 367 | 368 | return urlObject; 369 | } 370 | function popugethost(url, body = '',ck) { 371 | //console.log(ck) 372 | let host = url.replace('//', '/').split('/')[1] 373 | let urlObject = { 374 | url: url, 375 | headers: { 376 | "Host": "qun.haozhuang.cn.com", 377 | "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", 378 | "Accept": "*/*", 379 | "Origin": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com", 380 | "X-Requested-With": "com.tencent.mm", 381 | "Referer": "https://kygj0209122405-1316151879.cos.ap-nanjing.myqcloud.com/index.html?upuid\u003d10315076" 382 | }, 383 | timeout: 5000, 384 | } 385 | if (body) { 386 | urlObject.body = body 387 | } 388 | 389 | return urlObject; 390 | } 391 | 392 | async function httpRequest(method, url) { 393 | //console.log(url) 394 | httpResult = null, httpReq = null, httpResp = null; 395 | return new Promise((resolve) => { 396 | $.send(method, url, async (err, req, resp) => { 397 | try { 398 | httpReq = req; 399 | httpResp = resp; 400 | if (err) { 401 | } else { 402 | if (resp.body) { 403 | if (typeof resp.body == "object") { 404 | httpResult = resp.body; 405 | } else { 406 | try { 407 | httpResult = JSON.parse(resp.body); 408 | } catch (e) { 409 | httpResult = resp.body; 410 | } 411 | } 412 | } 413 | } 414 | } catch (e) { 415 | console.log(e); 416 | } finally { 417 | resolve(); 418 | } 419 | }); 420 | }); 421 | } 422 | //////////////////////////////////////////////////////////////////// 423 | function Env(a, b) { 424 | return "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0), new class { 425 | constructor(a, b) { 426 | this.name = a, this.notifyStr = "", this.startTime = (new Date).getTime(), Object.assign(this, b), console.log(`${this.name} 开始运行: 427 | `) 428 | } 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 = {}) { 429 | let b = (new Date).getTime(), c = (b - this.startTime) / 1e3; console.log(` 430 | ${this.name} 运行结束,共运行了 ${c} 秒!`), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(a) 431 | } 432 | }(a, b) 433 | } 434 | -------------------------------------------------------------------------------- /nmldj.js: -------------------------------------------------------------------------------- 1 | /** 2 | *下载地址 https://gu.gkewang.com/front/inviter/register/00l7zZvs?activityCode=INVITECLIE 3 | * 绿地g优app签到 4 | * 邀请码:00l7zZvs 5 | * 定时一次 (第一次手动进一下签到页面) 6 | * ========= 青龙--配置文件 ========= 7 | * 变量格式: export ldgy_hd=手机号&token ,多账号用 换行 或 @ 分割 8 | * 抓app.gkewang.com下body 的token 9 | * 如果是这种格式 %22token%22:%22XXXXXXXXXXXXXXXXXX%22 (只需要XXXXXXXXXXXXXX这部分) 10 | * token有效期未知 11 | */ 12 | 13 | const { log } = require("console"); 14 | const $ = new Env("绿地g优"); 15 | const notify = $.isNode() ? require("./sendNotify") : ""; 16 | const Notify = 1 //0为关闭通知,1为打开通知,默认为1 17 | const debug = 0 //0为关闭调试,1为打开调试,默认为0 18 | //--------------------------------------------------------------------------------------------------------- 19 | let ckStr = ($.isNode() ? process.env.ldgy_hd : $.getdata('ldgy_hd')) || ''; 20 | let msg, ck; 21 | let ck_status = true; 22 | //--------------------------------------------------------------------------------------------------------- 23 | let Change = '无' 24 | //--------------------------------------------------------------------------------------------------------- 25 | 26 | async function tips(ckArr) { 27 | let Version = `\n📌 微信小程序:柠檬玩机` 28 | DoubleLog(`${Version}\n📌 🆙 更新内容: ${Change}`); 29 | DoubleLog(`\n========== 共找到 ${ckArr.length} 个账号 ==========`); 30 | debugLog(`【debug】 这是你的账号数组:\n ${ckArr}`); 31 | } 32 | 33 | !(async () => { 34 | let ckArr = await checkEnv(ckStr, "ldgy_hd"); 35 | await tips(ckArr); 36 | for (let index = 0; index < ckArr.length; index++) { 37 | let num = index + 1; 38 | DoubleLog(`\n-------- 开始【第 ${num} 个账号】--------`); 39 | ck = ckArr[index].split("&"); 40 | debugLog(`【debug】 这是你第 ${num} 账号信息:\n ${ck}`); 41 | await start(); 42 | } 43 | await SendMsg(msg); 44 | 45 | })() 46 | .catch((e) => $.logErr(e)) 47 | .finally(() => $.done()); 48 | 49 | async function start() { 50 | 51 | console.log("\n开始 签到"); 52 | await $.wait(1 * 1000); 53 | await signin(); 54 | await $.wait(2 * 1000); 55 | } 56 | /** 57 | * 签到 httpPost 58 | */ 59 | async function signin() { 60 | let ncstr=randString().toLowerCase(); 61 | let sg=MD5Encrypt('vHSF2oKE8N48aXshyv1sbGdxA1CWKU0HyvYrjMRvHocEfBUKXDDABZx21EvOeTHMItw5FNoM7amaIWe7zQ03tdM6R7F3eyy{"head":{"service":"101212 ","token":"'+ck[1]+'","userCode":"'+ck[0]+'","nonceStr":"'+ncstr+'"},"body":{}}') 62 | let bd=encodeURI('plainText={"head":{"service":"101212+","token":"'+ck[1]+'","userCode":"'+ck[0]+'","nonceStr":"'+ncstr+'"},"body":{}}&cipherText='+sg); 63 | try { 64 | let url = { 65 | url: 'https://app.gkewang.com/jkt/api/app/v2', 66 | headers: { 67 | 'Host':'app.gkewang.com', 68 | 'channel':'CH_BD', 69 | 'bddeviceid':'', 70 | 'version':'2.4.6', 71 | 'User-Agent':'okhttp/3.12.1', 72 | 'Content-Length': '260', 73 | 'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8', 74 | }, 75 | body: bd 76 | }; 77 | let rc = await httpPost(url, `签到`); 78 | 79 | if (rc.msg=='处理成功') { 80 | DoubleLog(rc.result.msg); 81 | await wait(3); 82 | } 83 | if(rc.code==900001) 84 | { 85 | DoubleLog(rc.msg); 86 | } 87 | else console.log(rc); 88 | } catch (error) { 89 | console.log(error); 90 | } 91 | 92 | } 93 | // #region ******************************************************** 固定代码 ******************************************************** 94 | /** 95 | * 变量检查 96 | */ 97 | async function checkEnv(ck, Variables) { 98 | return new Promise((resolve) => { 99 | let ckArr = [] 100 | if (ck) { 101 | if (ck.indexOf("@") !== -1) { 102 | 103 | ck.split("@").forEach((item) => { 104 | ckArr.push(item); 105 | }); 106 | } else if (ck.indexOf("\n") !== -1) { 107 | 108 | ck.split("\n").forEach((item) => { 109 | ckArr.push(item); 110 | }); 111 | } else { 112 | ckArr.push(ck); 113 | } 114 | resolve(ckArr) 115 | } else { 116 | console.log(` ${$.neme}:未填写变量 ${Variables} ,请仔细阅读脚本说明!`) 117 | } 118 | } 119 | ) 120 | } 121 | 122 | function randString(e) 123 | { 124 | e = e || 32; 125 | for (var n = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678", t = n.length, a = "", i = 0; i < e; i++) 126 | a += n.charAt(Math.floor(Math.random() * t)); 127 | return a; 128 | } 129 | 130 | 131 | /** 132 | * 发送消息 133 | */ 134 | async function SendMsg(message) { 135 | if (!message) return; 136 | if (Notify > 0) { 137 | if ($.isNode()) { 138 | var notify = require("./sendNotify"); 139 | await notify.sendNotify($.name, message); 140 | } else { 141 | // $.msg(message); 142 | $.msg($.name, '', message) 143 | } 144 | } else { 145 | console.log(message); 146 | } 147 | } 148 | 149 | /** 150 | * 双平台log输出 151 | */ 152 | function DoubleLog(data) { 153 | if ($.isNode()) { 154 | if (data) { 155 | console.log(` ${data}`); 156 | msg += `\n ${data}`; 157 | } 158 | } else { 159 | console.log(` ${data}`); 160 | msg += `\n ${data}`; 161 | } 162 | 163 | } 164 | 165 | /** 166 | * 等待 X 秒 167 | */ 168 | function wait(n) { 169 | return new Promise(function (resolve) { 170 | setTimeout(resolve, n * 1000); 171 | }); 172 | } 173 | /** 174 | * post请求 175 | */ 176 | async function httpPost(postUrlObject, tip, timeout = 3) { 177 | return new Promise((resolve) => { 178 | let url = postUrlObject; 179 | if (!tip) { 180 | let tmp = arguments.callee.toString(); 181 | let re = /function\s*(\w*)/i; 182 | let matches = re.exec(tmp); 183 | tip = matches[1]; 184 | } 185 | if (debug) { 186 | console.log(`\n 【debug】=============== 这是 ${tip} 请求 url ===============`); 187 | console.log(url); 188 | } 189 | 190 | $.post( 191 | url, 192 | async (err, resp, data) => { 193 | try { 194 | if (debug) { 195 | console.log(`\n\n 【debug】===============这是 ${tip} 返回data==============`); 196 | console.log(data); 197 | console.log(`\n 【debug】=============这是 ${tip} json解析后数据============`); 198 | console.log(JSON.parse(data)); 199 | } 200 | let result = JSON.parse(data); 201 | if (result == undefined) { 202 | return; 203 | } else { 204 | resolve(result); 205 | } 206 | 207 | } catch (e) { 208 | console.log(err, resp); 209 | console.log(`\n ${tip} 失败了!请稍后尝试!!`); 210 | msg = `\n ${tip} 失败了!请稍后尝试!!` 211 | } finally { 212 | resolve(); 213 | } 214 | }, 215 | timeout 216 | ); 217 | }); 218 | } 219 | 220 | /** 221 | * debug调试 222 | */ 223 | function debugLog(...args) { 224 | if (debug) { 225 | console.log(...args); 226 | } 227 | } 228 | 229 | // md5 230 | function MD5Encrypt(a) { function b(a, b) { return a << b | a >>> 32 - b } function c(a, b) { var c, d, e, f, g; return e = 2147483648 & a, f = 2147483648 & b, c = 1073741824 & a, d = 1073741824 & b, g = (1073741823 & a) + (1073741823 & b), c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f } function d(a, b, c) { return a & b | ~a & c } function e(a, b, c) { return a & c | b & ~c } function f(a, b, c) { return a ^ b ^ c } function g(a, b, c) { return b ^ (a | ~c) } function h(a, e, f, g, h, i, j) { return a = c(a, c(c(d(e, f, g), h), j)), c(b(a, i), e) } function i(a, d, f, g, h, i, j) { return a = c(a, c(c(e(d, f, g), h), j)), c(b(a, i), d) } function j(a, d, e, g, h, i, j) { return a = c(a, c(c(f(d, e, g), h), j)), c(b(a, i), d) } function k(a, d, e, f, h, i, j) { return a = c(a, c(c(g(d, e, f), h), j)), c(b(a, i), d) } function l(a) { for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = new Array(f - 1), h = 0, i = 0; c > i;)b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | a.charCodeAt(i) << h, i++; return b = (i - i % 4) / 4, h = i % 4 * 8, g[b] = g[b] | 128 << h, g[f - 2] = c << 3, g[f - 1] = c >>> 29, g } function m(a) { var b, c, d = "", e = ""; for (c = 0; 3 >= c; c++)b = a >>> 8 * c & 255, e = "0" + b.toString(16), d += e.substr(e.length - 2, 2); return d } function n(a) { a = a.replace(/\r\n/g, "\n"); for (var b = "", c = 0; c < a.length; c++) { var d = a.charCodeAt(c); 128 > d ? b += String.fromCharCode(d) : d > 127 && 2048 > d ? (b += String.fromCharCode(d >> 6 | 192), b += String.fromCharCode(63 & d | 128)) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128), b += String.fromCharCode(63 & d | 128)) } return b } var o, p, q, r, s, t, u, v, w, x = [], y = 7, z = 12, A = 17, B = 22, C = 5, D = 9, E = 14, F = 20, G = 4, H = 11, I = 16, J = 23, K = 6, L = 10, M = 15, N = 21; for (a = n(a), x = l(a), t = 1732584193, u = 4023233417, v = 2562383102, w = 271733878, o = 0; o < x.length; o += 16)p = t, q = u, r = v, s = w, t = h(t, u, v, w, x[o + 0], y, 3614090360), w = h(w, t, u, v, x[o + 1], z, 3905402710), v = h(v, w, t, u, x[o + 2], A, 606105819), u = h(u, v, w, t, x[o + 3], B, 3250441966), t = h(t, u, v, w, x[o + 4], y, 4118548399), w = h(w, t, u, v, x[o + 5], z, 1200080426), v = h(v, w, t, u, x[o + 6], A, 2821735955), u = h(u, v, w, t, x[o + 7], B, 4249261313), t = h(t, u, v, w, x[o + 8], y, 1770035416), w = h(w, t, u, v, x[o + 9], z, 2336552879), v = h(v, w, t, u, x[o + 10], A, 4294925233), u = h(u, v, w, t, x[o + 11], B, 2304563134), t = h(t, u, v, w, x[o + 12], y, 1804603682), w = h(w, t, u, v, x[o + 13], z, 4254626195), v = h(v, w, t, u, x[o + 14], A, 2792965006), u = h(u, v, w, t, x[o + 15], B, 1236535329), t = i(t, u, v, w, x[o + 1], C, 4129170786), w = i(w, t, u, v, x[o + 6], D, 3225465664), v = i(v, w, t, u, x[o + 11], E, 643717713), u = i(u, v, w, t, x[o + 0], F, 3921069994), t = i(t, u, v, w, x[o + 5], C, 3593408605), w = i(w, t, u, v, x[o + 10], D, 38016083), v = i(v, w, t, u, x[o + 15], E, 3634488961), u = i(u, v, w, t, x[o + 4], F, 3889429448), t = i(t, u, v, w, x[o + 9], C, 568446438), w = i(w, t, u, v, x[o + 14], D, 3275163606), v = i(v, w, t, u, x[o + 3], E, 4107603335), u = i(u, v, w, t, x[o + 8], F, 1163531501), t = i(t, u, v, w, x[o + 13], C, 2850285829), w = i(w, t, u, v, x[o + 2], D, 4243563512), v = i(v, w, t, u, x[o + 7], E, 1735328473), u = i(u, v, w, t, x[o + 12], F, 2368359562), t = j(t, u, v, w, x[o + 5], G, 4294588738), w = j(w, t, u, v, x[o + 8], H, 2272392833), v = j(v, w, t, u, x[o + 11], I, 1839030562), u = j(u, v, w, t, x[o + 14], J, 4259657740), t = j(t, u, v, w, x[o + 1], G, 2763975236), w = j(w, t, u, v, x[o + 4], H, 1272893353), v = j(v, w, t, u, x[o + 7], I, 4139469664), u = j(u, v, w, t, x[o + 10], J, 3200236656), t = j(t, u, v, w, x[o + 13], G, 681279174), w = j(w, t, u, v, x[o + 0], H, 3936430074), v = j(v, w, t, u, x[o + 3], I, 3572445317), u = j(u, v, w, t, x[o + 6], J, 76029189), t = j(t, u, v, w, x[o + 9], G, 3654602809), w = j(w, t, u, v, x[o + 12], H, 3873151461), v = j(v, w, t, u, x[o + 15], I, 530742520), u = j(u, v, w, t, x[o + 2], J, 3299628645), t = k(t, u, v, w, x[o + 0], K, 4096336452), w = k(w, t, u, v, x[o + 7], L, 1126891415), v = k(v, w, t, u, x[o + 14], M, 2878612391), u = k(u, v, w, t, x[o + 5], N, 4237533241), t = k(t, u, v, w, x[o + 12], K, 1700485571), w = k(w, t, u, v, x[o + 3], L, 2399980690), v = k(v, w, t, u, x[o + 10], M, 4293915773), u = k(u, v, w, t, x[o + 1], N, 2240044497), t = k(t, u, v, w, x[o + 8], K, 1873313359), w = k(w, t, u, v, x[o + 15], L, 4264355552), v = k(v, w, t, u, x[o + 6], M, 2734768916), u = k(u, v, w, t, x[o + 13], N, 1309151649), t = k(t, u, v, w, x[o + 4], K, 4149444226), w = k(w, t, u, v, x[o + 11], L, 3174756917), v = k(v, w, t, u, x[o + 2], M, 718787259), u = k(u, v, w, t, x[o + 9], N, 3951481745), t = c(t, p), u = c(u, q), v = c(v, r), w = c(w, s); var O = m(t) + m(u) + m(v) + m(w); return O.toLowerCase() } 231 | 232 | // 完整 Env 233 | function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } 234 | 235 | //#endregion 236 | -------------------------------------------------------------------------------- /qwyd.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | 微信阅读 4 | 阅读入口,复制链接微信打开 5 | https://sgyd.twyd.site/user?refererUserUuid=b247b189704f4ff5bea792425c87bd56 6 | 7 | 变量名称:qwyd 8 | 9 | 抓包获取cookie ,关键词_JSID= 10 | 多账号换行或者@隔开 11 | _JSID@_JSID@_JSID 12 | 13 | 每1小时刷新一轮25篇文章 14 | 定时一小时一次 一天跑6次 15 | 检测不知道,待测试... 16 | cron:17 5-15 * * * 17 | 绑定二维码后自动提现 18 | * 19 | *    ┏┓   ┏┓ 20 | *   ┏┛┻━━━┛┻┓ 21 | *   ┃       ┃   22 | *   ┃   ━   ┃ 23 | *   ┃ ┳┛ ┗┳ ┃ 24 | *   ┃       ┃ 25 | *   ┃   ┻   ┃ 26 | *   ┃       ┃ 27 | *   ┗━┓   ┏━┛ 28 | *     ┃   ┃神兽保佑 29 | *     ┃   ┃代码无BUG! 30 | *     ┃   ┗━━━┓ 31 | *     ┃       ┣┓ 32 | *     ┃       ┏┛ 33 | *     ┗┓┓┏━┳┓┏┛ 34 | *      ┃┫┫ ┃┫┫ 35 | *      ┗┻┛ ┗┻┛ 36 | * 37 | * 38 | */ 39 | 40 | 41 | const $ = new Env("趣味阅读"); 42 | const notify = $.isNode() ? require('./sendNotify') : ''; 43 | let envSplitor = ['@', '\n'] 44 | let httpResult, httpReq, httpResp 45 | let ckName = 'qwyd' 46 | let userCookie = ($.isNode() ? process.env[ckName] : $.getdata(ckName)) || ''; 47 | let userList = [] 48 | let userIdx = 0 49 | let userCount = 0 50 | var msg = '' 51 | let newurl = "https://sg.dgtzyd.cn" 52 | /////////////////////////////////////////////////////////////////// 53 | class UserInfo { 54 | constructor(str, id) { 55 | this.index = ++userIdx, 56 | this.idx = `账号[${this.index}] `, 57 | this.ck = "_JSID=" + str//.split('#'), this.u = this.ck[0], this.t = this.ck[1] 58 | this.userid = id 59 | } 60 | 61 | async getreadurl() { 62 | try { 63 | //用户领取任务 64 | let t = Date.now() 65 | // this.ul = newurl; 66 | let url = newurl + "/user/getUserTaskInfo?typeCode=mpArticleReader&t=" + t; 67 | let urlObject = popu(url, '', this.ck) 68 | await httpRequest('get', urlObject) 69 | let result = httpResult; 70 | if (result.success && !result.msg) { 71 | // console.log(result.msg + ",任务id:" + result.data.user_task_id) 72 | await this.read(result.token) 73 | } 74 | else { 75 | console.log(result.msg) 76 | } 77 | /* 78 | "1" == result.info.type && 1 !== this.dx && (console.log(`文章获取成功 `), this.b = 1, await $.wait(1000), await this.readfinish()), 79 | "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, 80 | await $.wait(6000), await this.readfinish()); 81 | */ 82 | } catch (e) { 83 | console.log(e) 84 | } 85 | } 86 | 87 | //提交任务 88 | async read(token) { 89 | try { 90 | //readurl = decodeURIComponent(readurl); 91 | let t = Date.now() 92 | let url = `${newurl}/reader/goMpArticle?token=${token}&_t=${t}`; 93 | let urlObject = popu(url, '', this.ck) 94 | await httpRequest('get', urlObject) 95 | let result = httpResult; 96 | if (result) { 97 | console.log(result); 98 | if (result.indexOf("提示信息") > -1) { 99 | return; 100 | } 101 | else if (result.indexOf("