mirror of
https://github.com/shufflewzc/faker3.git
synced 2025-01-10 16:29:13 +08:00
15 lines
137 KiB
JavaScript
15 lines
137 KiB
JavaScript
|
/*
|
|||
|
东东农场内部水滴互助 jd_fruit_help.js
|
|||
|
|
|||
|
活动入口:京东APP我的-更多工具-东东农场
|
|||
|
|
|||
|
cron "20 4,16 * * *" script-path=jd_fruit_help.js,tag=东东农场内部互助
|
|||
|
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('东东农场内部水滴互助')
|
|||
|
function nWO_D7(){}var LNkG4a=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],BXexbI,S6YOp3R,VTtLCB,hCjY5H,vIT8Dx,tvMj3P,p9J3Zm,hvzoPI0,vDRl05,_R9xKy0,RmtIJqy,KR2ei0p,_WKrHwM,j_g5uL,MQojpn,aICu06,Z6ahHl,kcJ0k9_,IweZUTO,gF6CTjI,_dxvI5,RXrk57e,ubQBYJq,v_Mbyi,or9P_D;function g2H9z4(nWO_D7){return BXexbI[nWO_D7>0x54?nWO_D7<0x199?nWO_D7-0x55:nWO_D7-0x57:nWO_D7-0x1]}BXexbI=ECT5esZ();function nQuYY8(nWO_D7,LNkG4a){return S6YOp3R(nWO_D7,g2H9z4(0x55),{value:LNkG4a,configurable:g2H9z4(0xb4)})}nWO_D7(S6YOp3R=Object.defineProperty,VTtLCB=nQuYY8(b8FmC9N((...LNkG4a)=>{var S6YOp3R=b8FmC9N(LNkG4a=>{return BXexbI[LNkG4a<0x58?LNkG4a-0x1a:LNkG4a-0x59]},0x1);nWO_D7(LNkG4a[g2H9z4(0x55)]=0x2,LNkG4a[S6YOp3R(0x5b)]=LNkG4a[0x0]);return LNkG4a[g2H9z4(0x56)](LNkG4a[0x36]())}),g2H9z4(0x9b))(imMxQpg,g_hNOdd));var eEVsDvs=[],o3M1Xmz=[wiqTif(0x0),wiqTif(g2H9z4(0x56)),'\u0023\u007c\u0034\u004e\u0044\u0074\u0033\u0047\u0066',wiqTif(0x2),wiqTif(0x3),wiqTif(g2H9z4(0x8d)),wiqTif(g2H9z4(0x8a)),wiqTif(0x6),wiqTif(0x7),wiqTif(g2H9z4(0x98)),wiqTif(0x9),wiqTif(0xa),wiqTif(g2H9z4(0xfe)),wiqTif(0xc),wiqTif(0xd),wiqTif(0xe),wiqTif(0xf),wiqTif(g2H9z4(0xad)),wiqTif(0x11),wiqTif(0x12),wiqTif(0x13),'x|S~7uJh)7','x|S~7uZC',wiqTif(0x14),'x|S~7uO4Tm$',wiqTif(0x15),wiqTif(0x16),wiqTif(g2H9z4(0xb1)),wiqTif(0x18),wiqTif(0x12),wiqTif(g2H9z4(0x82)),wiqTif(g2H9z4(0x83)),wiqTif(0x19),wiqTif(0x13),wiqTif(0x1a),wiqTif(g2H9z4(0x90)),wiqTif(0x1c),wiqTif(0x1d),wiqTif(0x1e),wiqTif(g2H9z4(0x106)),wiqTif(0x20),wiqTif(g2H9z4(0x11b)),wiqTif(0x22),wiqTif(0x23),wiqTif(0x24),wiqTif(g2H9z4(0xb6)),wiqTif(g2H9z4(0xb7)),wiqTif(g2H9z4(0xb8)),wiqTif(g2H9z4(0x8b)),wiqTif(g2H9z4(0x88)),wiqTif(0x2a),'\u004c\u007c\u0070\u003a\u0032\u003e\u0075\u0042\u0072\u005b\u0025\u006f\u004b\u007b\u005b\u0045\u007a\u0039\u0030\u0054\u0051\u004b\u007d\u0023\u003b\u0025\u0053\u0025\u004e',wiqTif(0x2b),wiqTif(0x2c),wiqTif(0x2d),wiqTif(0x2e),wiqTif(0x2f),wiqTif(0x30),wiqTif(0x31),wiqTif(g2H9z4(0x6f)),wiqTif(0x33),wiqTif(0x34),wiqTif(g2H9z4(0x5b)),'vC%#pt:|"SUzDpKk#Wn|"elD}~+b#:%%mmUp@iWfExmMqgBv{=S~7uJh#x"i?~4hTw_wn*=>:4%lU*_kV7O%859z:r:LhL73dB]l3KD6O',wiqTif(g2H9z4(0x57)),wiqTif(g2H9z4(0x58)),'zT`tGKmq_xEpm(aLIMyo9CT=.;_:%`Wly{_ZmNKrX/6Qs@%%RBDAJKH|Ed1]CJU??,6EA]tP4_9#vV=kssM|iRr&tjbN>SN',wiqTif(0x38),wiqTif(g2H9z4(0x59)),wiqTif(g2H9z4(0x5a)),wiqTif(0x3b),wiqTif(0x3c),wiqTif(0x3d),wiqTif(0x3e),wiqTif(g2H9z4(0x58)),wiqTif(0x3f),wiqTif(0x40),wiqTif(g2H9z4(0xbe)),wiqTif(g2H9z4(0x91)),wiqTif(0x43),wiqTif(g2H9z4(0x5c)),wiqTif(0x43),wiqTif(0x45),wiqTif(0x46),'zT`tyrC.$xL$?~[I|MR[_l4j=%b;y^ZdzORyfi"l[n0W_ru2MaBmIKbODd9j.EQvWQ)','zT`tyrC.$xL$?~[I|MR[_l4j|Z',wiqTif(g2H9z4(0x9f)),wiqTif(0x48),'zT`tW1+^_dGhpgjvZ0ZDt|D6p{[h_uLl[EK<b^KrX/<ZCL^(D^(pEK@%ldd2MPHL64b$XC4{M+~@+Y}w,E<<*GOzD/:L:i.pVTy_G])',wiqTif(0x49),wiqTif(g2H9z4(0x59)),wiqTif(g2H9z4(0x5a)),wiqTif(0x3b),wiqTif(g2H9z4(0x61)),wiqTif(g2H9z4(0x95)),wiqTif(0x34),wiqTif(g2H9z4(0x5b)),wiqTif(0x4a),wiqTif(g2H9z4(0xa5)),wiqTif(0x36),wiqTif(0x4c),wiqTif(0x4d),wiqTif(g2H9z4(0x5e)),wiqTif(0x43),wiqTif(g2H9z4(0x78)),wiqTif(0x4c),wiqTif(0x35),wiqTif(g2H9z4(0x14a)),wiqTif(0x35),wiqTif(g2H9z4(0xc3)),wiqTif(0x52),wiqTif(0x3a),wiqTif(0x3c),wiqTif(0x38),wiqTif(0x53),wiqTif(g2H9z4(0x5f)),wiqTif(0x55),wiqTif(0x56),wiqTif(0x57),wiqTif(g2H9z4(0x5c)),wiqTif(g2H9z4(0x58)),wiqTif(g2H9z4(0x5b)),wiqTif(g2H9z4(0xc8)),wiqTif(0x59),wiqTif(0x5a),wiqTif(g2H9z4(0x58)),wiqTif(g2H9z4(0x97)),wiqTif(g2H9z4(0x5d)),wiqTif(g2H9z4(0x60)),wiqTif(g2H9z4(0x9e)),wiqTif(0x5d),wiqTif(g2H9z4(0x5d)),wiqTif(g2H9z4(0x62)),wiqTif(g2H9z4(0x5e)),wiqTif(0x5a),wiqTif(0x43),wiqTif(0x5e),wiqTif(g2H9z4(0xd1)),wiqTif(0x5b),wiqTif(0x60),wiqTif(0x61),wiqTif(g2H9z4(0xd3)),wiqTif(0x63),wiqTif(0x64),wiqTif(g2H9z4(0xd5)),'Q^t+gux/:4Ki<{L|b{t+*k)',wiqTif(0x66),'{ku_eSa5)uP@vagkODn|w^N','Rf?|+=dFH/Q^%ny3LN',wiqTif(0x67),wiqTif(g2H9z4(0xdb)),';k6p,|^>C',wiqTif(0x55),wiqTif(g2H9z4(0x5f)),wiqTif(g2H9z4(0x63)),wiqTif(g2H9z4(0x60)),wiqTif(0x6a),wiqTif(0x6b),wiqTif(g2H9z4(0xdc)),wiqTif(g2H9z4(0x64)),wiqTif(g2H9z4(0x65)),wiqTif(g2H9z4(0x61)),wiqTif(0x6f),wiqTif(g2H9z4(0x67)),wiqTif(g2H9z4(0x66
|
|||
|
// 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"])
|