faker3/jd_wyw_help.js

22 lines
89 KiB
JavaScript
Raw Normal View History

2024-08-21 11:15:26 +08:00
/*
2024-09-24 15:55:14 +08:00
活动名称玩一玩助力
活动入口APP-我的-更多工具-玩一玩
活动建议定时自行修改奖票有效期2个月
活动变量
jd_wyw_help_helpnum // 指定助力账号数默认助力前1账号需要助力其他请自行设置变量
jd_wyw_help_pin // 指定助力账号pin多个用@进行分割
jd_wyw_notify // 是否推送通知true/false默认不推送
jd_wyw_pinFilter // 账号pin过滤多个用@进行分割
2024-09-26 16:43:38 +08:00
jd_wyw_code // 指定助力码,不填默认助力全部账号(多个助力码用英文逗号,@,换行分割)
2024-09-24 15:55:14 +08:00
注释
指定助力账号优先级高于指定助力账号数若同时指定则优先助力指定账号
cron:1 1 1 1 *
2024-08-21 11:15:26 +08:00
*/
2024-09-24 15:55:14 +08:00
const $ = new Env('玩一玩助力')
2024-09-26 16:43:38 +08:00
function RNVMTV(){}var WS9n_v=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],nBQlGhj,mR3V1z,X19eQk,gLfp2V,TsBDbB,ZwDL6w,L3L1Ej,vFG2cBN,aXnI_i,WlcRRw,UeFF714,oqJlYLt,JrXtfnw,ylxWde,kRJiEc4,zrfnrvM,CMe7fLH,Q_jos1P,z9bvgz,SHmcSt,CkSblQj;function qVxz4Hc(RNVMTV){return nBQlGhj[RNVMTV>0x3d?RNVMTV>0x10e?RNVMTV+0x5d:RNVMTV>0x10e?RNVMTV+0x16:RNVMTV>0x3d?RNVMTV-0x3e:RNVMTV+0x1d:RNVMTV-0x4f]}nBQlGhj=WmHavRp();function R2_scCF(RNVMTV,WS9n_v){return mR3V1z.call(qVxz4Hc(0xbb),RNVMTV,qVxz4Hc(0x4e),{value:WS9n_v,configurable:qVxz4Hc(0xb1)})}RNVMTV(mR3V1z=Object.defineProperty,X19eQk=a9HsFu((RNVMTV,WS9n_v)=>{return WS9n_v(RNVMTV())},0x2)(KQY111,_OWQQW));var EJJiQv=[],vdvA1bG=[QczVjly(qVxz4Hc(0x4c)),QczVjly(qVxz4Hc(0x50)),QczVjly(qVxz4Hc(0x68)),QczVjly(qVxz4Hc(0x4f)),QczVjly(qVxz4Hc(0x5b)),QczVjly(qVxz4Hc(0x63)),QczVjly(qVxz4Hc(0x55)),QczVjly(0x7),QczVjly(qVxz4Hc(0x5d)),'\x6a\x2f\x67\x39\x6a\x64\x4e\x6d\x58\x3d\x36\x7a\x7e\x4f\x64\x61\x7c\x36\x65\x46\x61\x23\x5e\x51\x52\x26\x4c\x38\x4e','j/g9jdNmX=6z~OUj%46#i2SQRv(I|jz$',QczVjly(0x9),QczVjly(qVxz4Hc(0x64)),QczVjly(0xb),QczVjly(0xc),QczVjly(0xd),'\x7c\x4a\x5d\x62\x3c\x78\x21','j/g9jdNmX=6z~Oda|64%31#7X]',QczVjly(qVxz4Hc(0x5f)),QczVjly(qVxz4Hc(0x54)),QczVjly(0x10),QczVjly(0x11),QczVjly(0x12),QczVjly(0x13),QczVjly(qVxz4Hc(0x6d)),QczVjly(0x15),QczVjly(qVxz4Hc(0x5a)),QczVjly(0x17),QczVjly(0x18),QczVjly(0x19),QczVjly(0x1a),QczVjly(qVxz4Hc(0x78)),QczVjly(0x1c),QczVjly(0x1d),QczVjly(qVxz4Hc(0x3f)),QczVjly(qVxz4Hc(0x3e)),QczVjly(0x20),QczVjly(0x21),QczVjly(0x22),QczVjly(0x23),QczVjly(qVxz4Hc(0x3e)),QczVjly(0x24),QczVjly(0x25),QczVjly(0x26),QczVjly(0x1a),QczVjly(0x27),QczVjly(0x28),QczVjly(qVxz4Hc(0x7a)),QczVjly(0x2a),'\u007c\u006b\u0026\u0066\u007a\u0063\u0065\u006e\u005e\u0070\u0053\u0045\u0024\u0022\u002f\u005a\u0021\u0050\u004e\u002b\u0047\u0028\u007b\u007b\u006b\u006f',QczVjly(0x2b),QczVjly(qVxz4Hc(0x7f)),QczVjly(0x2d),QczVjly(0x2e),QczVjly(0x2f),QczVjly(0x30),QczVjly(qVxz4Hc(0x8c)),QczVjly(0x32),QczVjly(0x33),'"n,%.|Y99&',QczVjly(qVxz4Hc(0x82)),QczVjly(qVxz4Hc(0x3e)),QczVjly(0x35),QczVjly(0x36),QczVjly(0x37),QczVjly(0x38),QczVjly(qVxz4Hc(0x85)),QczVjly(qVxz4Hc(0x86)),QczVjly(0x3b),QczVjly(0x3c),'PL357|Y99&',QczVjly(0x3d),QczVjly(0x3e),QczVjly(qVxz4Hc(0x58)),'|k&fzcx*',QczVjly(qVxz4Hc(0x59)),QczVjly(0x41),QczVjly(0x42),QczVjly(0x43),QczVjly(0x44),QczVjly(0x45),QczVjly(qVxz4Hc(0x84)),QczVjly(qVxz4Hc(0x88)),QczVjly(0x48),QczVjly(0x49),QczVjly(0x4a),QczVjly(qVxz4Hc(0x8a)),QczVjly(0x21),QczVjly(0x4c),QczVjly(0x4d),QczVjly(qVxz4Hc(0x95)),QczVjly(0x4f),QczVjly(qVxz4Hc(0x40)),QczVjly(0x51),QczVjly(0x24),QczVjly(0x2a),QczVjly(0x52),QczVjly(qVxz4Hc(0x97)),QczVjly(0x54),'%Pq!|J_>?C7C1',QczVjly(0x55),QczVjly(0x56),'1P^|<0Ji.n',QczVjly(qVxz4Hc(0x98)),QczVjly(0x58),'\u0029\u002e\u0052\u007c\u0069\u0044\u004e',QczVjly(0x59),QczVjly(0x5a),QczVjly(0x5b),'1P^|',QczVjly(0x24),QczVjly(0x2a),QczVjly(0x24),QczVjly(0x24),'"n,%.|Y99&',QczVjly(qVxz4Hc(0x9e)),QczVjly(qVxz4Hc(0x3f)),QczVjly(qVxz4Hc(0x3e)),QczVjly(0x5d),QczVjly(0x5e),QczVjly(0x5f),QczVjly(0x60),QczVjly(qVxz4Hc(0x45)),QczVjly(0x5a),QczVjly(qVxz4Hc(0xa0)),QczVjly(0x62),QczVjly(0x63),QczVjly(0x64),QczVjly(qVxz4Hc(0x41)),QczVjly(qVxz4Hc(0x42)),QczVjly(qVxz4Hc(0x40)),QczVjly(0x51),QczVjly(0x64),QczVjly(qVxz4Hc(0x41)),QczVjly(0x65),QczVjly(qVxz4Hc(0xa3)),QczVjly(0x67),QczVjly(0x68),QczVjly(0x64),QczVjly(qVxz4Hc(0x41)),QczVjly(qVxz4Hc(0x42)),QczVjly(0x69),QczVjly(0x6a),QczVjly(0x44),QczVjly(qVxz4Hc(0x43)),QczVjly(qVxz4Hc(0x44)),QczVjly(0x6c),QczVjly(qVxz4Hc(0xa2)),QczVjly(0x6e),QczVjly(0x6f),QczVjly(0x70),QczVjly(qVxz4Hc(0x43)),QczVjly(qVxz4Hc(0x44)),QczVjly(0x6c),QczVjly(0x6d),QczVjly(0x21),QczVjly(qVxz4Hc(0xad)),QczVjly(0x72),QczVjly(qVxz4Hc(0xae)),QczVjly(0x74),QczVjly(qVxz4Hc(0x49)),QczVjly(0x76),QczVjly(0x77),QczVjly(qVxz4Hc(0xbe)),QczVjly(0x79),QczVjly(0x7a),QczVjly(0x7b),QczVjly(qVxz4Hc(0x60)),QczVjly(0x7d),QczVjly(0x7e),'\x5f\x7c\x76\x6e\x60\x76\x38\x54\x5d\x60\x71\x50\x58',QczVjly(0x7f),QczVjly(0x80),QczVjly(qVxz4Hc(0x4a)),QczVjly(0x82),QczVjly(0x83),QczVjly(qVxz4Hc(0x72)),QczVjly(0x85),QczVjly(0x86),Q
2024-09-24 15:55:14 +08:00
// prettier-ignore
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"])