jdpro/jd_Surprise_Red.js

12 lines
67 KiB
JavaScript
Raw Normal View History

2024-09-01 08:07:54 +00:00
/*
活动名称惊喜红包一次性
cron:15 12 1 9 *
*/
const $ = new Env('惊喜红包一次性')
function vGPcBs(){}var QpGYSRZ=Object['defineProperty'],EP7GbTv,A1gdLUI,IyjaGmN,jeAJpTF,sa0KEkn,PfR1stL,PAgWTOG,nuEp0Mf,d4ktK1,h_jmj94,ry3ucH,V8gcsq,JgOhqA,ul9BGcO,B8A4Z1,zi1aHb,ubLHij,BR2Nrk;function Zzjprs5(vGPcBs){return EP7GbTv[vGPcBs>0x2a?vGPcBs>0x2a?vGPcBs-0x2b:vGPcBs-0x32:vGPcBs-0x1c]}EP7GbTv=mQCMTyf();function jTJEG5(vGPcBs,QpGYSRZ){var IyjaGmN=DEF8wtH(vGPcBs=>{return EP7GbTv[vGPcBs<0x1f?vGPcBs-0x42:vGPcBs<0x1f?vGPcBs+0x32:vGPcBs>0x1f?vGPcBs<0xa0?vGPcBs-0x20:vGPcBs+0x2e:vGPcBs+0x1d]},0x1);A1gdLUI(vGPcBs,IyjaGmN(0x25),{value:QpGYSRZ,configurable:!0x0});return vGPcBs}vGPcBs(A1gdLUI=Object.defineProperty,IyjaGmN=DEF8wtH((vGPcBs,QpGYSRZ)=>{return QpGYSRZ(vGPcBs())},0x2)(Kgg1yWc,DLmX8e));var AnwGJEs=[],rpEqA0=[jWgofv(Zzjprs5(0x3a)),jWgofv(0x1),jWgofv(0x2),jWgofv(Zzjprs5(0x32)),jWgofv(Zzjprs5(0x38)),jWgofv(Zzjprs5(0x31)),'E|&hP&Pg|`Q6S.kQX|&hV@,cH5w3/G','\u0045\u007c\u0026\u0068\u0050\u0026\u0050\u0067\u007c\u0060\u0051\u0036\u0053\u002e\u006b\u0051\u0058\u007c\u0040\u0037\u0064\u0048\u0035\u0037\u005f\u0053\u002f\u004e\u0066\u006c','\u006d\u0064\u006e\u006c\u007c','E|&hP&Pg|`Q6S.kQX|a$XML$FU[','E|&hP&Pg|`Q6S.kQX|a$uML$FU[',jWgofv(Zzjprs5(0x4f)),'\u0045\u007c\u0026\u0068\u0050\u0026\u0050\u0067\u007e\u0053',jWgofv(0x7),jWgofv(Zzjprs5(0x4a)),jWgofv(0x9),jWgofv(Zzjprs5(0x5b)),jWgofv(0xb),jWgofv(Zzjprs5(0x41)),jWgofv(0xd),jWgofv(Zzjprs5(0x2b)),jWgofv(Zzjprs5(0x54)),jWgofv(0x10),jWgofv(0x11),jWgofv(0x12),jWgofv(Zzjprs5(0x2b)),jWgofv(0x13),jWgofv(Zzjprs5(0x61)),jWgofv(0x15),jWgofv(Zzjprs5(0x76)),jWgofv(0x17),jWgofv(0x18),jWgofv(0x19),jWgofv(0x1a),jWgofv(0x1b),jWgofv(0x1c),'\x6d\x68\x5f\x2a\x6e\x79\x7b\x64\x42\x41\x7a\x21\x32\x6e\x3d\x7a\x66\x25\x60\x7c\x48\x5e\x71\x24\x54\x69\x5b\x57\x34\x33\x39\x40\x6a\x55\x6c\x7d\x60\x6f\x5a\x2e\x7a\x4d\x2f\x6b\x5d\x31\x58\x52\x4c\x4b\x25\x26\x7d',jWgofv(Zzjprs5(0x42)),jWgofv(Zzjprs5(0x67)),jWgofv(Zzjprs5(0x84)),jWgofv(Zzjprs5(0x68)),jWgofv(0x21),jWgofv(0xe),jWgofv(0x22),jWgofv(0x23),jWgofv(0x24),jWgofv(0x25),jWgofv(0x26),jWgofv(0x27),jWgofv(0x28),jWgofv(0x29),jWgofv(Zzjprs5(0x6c)),jWgofv(0x2b),jWgofv(0x2c),jWgofv(0x2d),jWgofv(0x1c),jWgofv(Zzjprs5(0x71)),jWgofv(0x14),jWgofv(0x2e),jWgofv(Zzjprs5(0x34)),'2%a?~k^+q|Q8_w',jWgofv(0x30),jWgofv(Zzjprs5(0x6a)),jWgofv(Zzjprs5(0x6b)),jWgofv(Zzjprs5(0x69)),jWgofv(0x34),jWgofv(Zzjprs5(0x4c)),jWgofv(Zzjprs5(0x2f)),jWgofv(0x37),jWgofv(0x38),jWgofv(Zzjprs5(0x74)),jWgofv(0x3a),jWgofv(0x3b),jWgofv(Zzjprs5(0x2c)),jWgofv(0x3d),jWgofv(Zzjprs5(0x37)),jWgofv(Zzjprs5(0x3e)),jWgofv(Zzjprs5(0x2e)),jWgofv(Zzjprs5(0x73)),jWgofv(0x41),'Q32Bp4;6}+|D0$Cv]f~R7o>>3Y',jWgofv(Zzjprs5(0x2c)),jWgofv(0x42),'\u007b\u005b\u0043\u0048\u0024\u0026\u007c\u0052\u0069\u0053\u0050\u0035\u007a\u0077\u0056\u0075\u0029\u007c\u002e\u0059\u0037',jWgofv(0x43),jWgofv(Zzjprs5(0x65)),jWgofv(0x44),jWgofv(0x45),jWgofv(0x46),jWgofv(0x47),jWgofv(0x48),jWgofv(0x49),jWgofv(0x4a),jWgofv(Zzjprs5(0x2d)),jWgofv(0x4c),jWgofv(Zzjprs5(0x2d)),jWgofv(0x4d),jWgofv(0x4e),jWgofv(0x4f),jWgofv(Zzjprs5(0xa2)),jWgofv(Zzjprs5(0x2e)),jWgofv(0x51),jWgofv(0x52),jWgofv(0x53),jWgofv(0x1c),jWgofv(Zzjprs5(0x82)),jWgofv(Zzjprs5(0x83)),jWgofv(0x56),jWgofv(Zzjprs5(0x85)),jWgofv(0x36),jWgofv(Zzjprs5(0x49)),jWgofv(0x59),jWgofv(Zzjprs5(0x87)),jWgofv(Zzjprs5(0x47)),jWgofv(Zzjprs5(0x5e)),jWgofv(0x5d),jWgofv(0x5e),jWgofv(Zzjprs5(0x89)),jWgofv(0x60),jWgofv(0x61),jWgofv(Zzjprs5(0x8a)),jWgofv(Zzjprs5(0x8b)),jWgofv(0x64),jWgofv(0x65),jWgofv(0x66),jWgofv(0x67),jWgofv(Zzjprs5(0x8c)),'+|}w=D5OT0]wb$}[]83nHi||mx[p1u',jWgofv(0x69),jWgofv(0x6a),jWgofv(0x6b),jWgofv(Zzjprs5(0x7e)),jWgofv(0x6d),jWgofv(0x6e),jWgofv(Zzjprs5(0x92)),jWgofv(0x70),jWgofv(0x71),jWgofv(0x72),jWgofv(0x73),jWgofv(Zzjprs5(0x7b)),jWgofv(Zzjprs5(0x2f)),jWgofv(0x75),jWgofv(Zzjprs5(0x93)),jWgofv(0x77),jWgofv(Zzjprs5(0x94)),jWgofv(0x79),jWgofv(Zzjprs5(0x95)),jWgofv(Zzjprs5(0x88)),jWgofv(Zzjprs5(0x62)),jWgofv(0x7d),'\x65\x29\x51\x48\x7c\x34\x53\x67',jWgofv(Zzjprs5(0x39)),jWgofv(0x7f),jWgofv(Zzjprs5(0x3b)),'4[p_BZR={gxKyC>|Q{',jWgofv(0x81),jWgofv(0x82),jWgofv(Zzjprs5(0x79)),'\u0067\u0034\u0059\u007a\u0022\u0024\u003a\u0074\u0066\u0042\u0056\u0036\u0066\u006d\u004f\u0043\u007e
// 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"])