mirror of https://github.com/6dylan6/jdpro.git
8 lines
151 KiB
JavaScript
8 lines
151 KiB
JavaScript
|
/*
|
||
|
|
||
|
*/
|
||
|
|
||
|
const $ = new Env('接龙车抢888元超市卡')
|
||
|
var _0xodc='jsjiami.com.v7';const _0x44d033=_0x44c3;(function(_0x47341e,_0x17d7d7,_0x23815d,_0x543416,_0x407c74,_0x18f953,_0x5f343f){return _0x47341e=_0x47341e>>0x1,_0x18f953='hs',_0x5f343f='hs',function(_0x4cd793,_0x3bb42c,_0x15cdf3,_0x212202,_0x1e27e0){const _0x4edf80=_0x44c3;_0x212202='tfi',_0x18f953=_0x212202+_0x18f953,_0x1e27e0='up',_0x5f343f+=_0x1e27e0,_0x18f953=_0x15cdf3(_0x18f953),_0x5f343f=_0x15cdf3(_0x5f343f),_0x15cdf3=0x0;const _0x1ac586=_0x4cd793();while(!![]&&--_0x543416+_0x3bb42c){try{_0x212202=-parseInt(_0x4edf80(0x5fe,'qFd3'))/0x1*(-parseInt(_0x4edf80(0x6ca,'lQei'))/0x2)+-parseInt(_0x4edf80(0x372,'tzRo'))/0x3*(-parseInt(_0x4edf80(0x376,'Hh&e'))/0x4)+parseInt(_0x4edf80(0x4be,'lQei'))/0x5+parseInt(_0x4edf80(0x4a2,'aNH9'))/0x6+-parseInt(_0x4edf80(0x2f4,'mbyd'))/0x7*(parseInt(_0x4edf80(0x154,'o(ul'))/0x8)+-parseInt(_0x4edf80(0xb6,'hL(r'))/0x9+-parseInt(_0x4edf80(0x707,'OVNU'))/0xa;}catch(_0x9736a5){_0x212202=_0x15cdf3;}finally{_0x1e27e0=_0x1ac586[_0x18f953]();if(_0x47341e<=_0x543416)_0x15cdf3?_0x407c74?_0x212202=_0x1e27e0:_0x407c74=_0x1e27e0:_0x15cdf3=_0x1e27e0;else{if(_0x15cdf3==_0x407c74['replace'](/[ukHEypSTXeFGbDOVltMn=]/g,'')){if(_0x212202===_0x3bb42c){_0x1ac586['un'+_0x18f953](_0x1e27e0);break;}_0x1ac586[_0x5f343f](_0x1e27e0);}}}}}(_0x23815d,_0x17d7d7,function(_0x41616f,_0x66ac7e,_0x10e782,_0x4aca6f,_0x5729ba,_0x193406,_0x31045d){return _0x66ac7e='\x73\x70\x6c\x69\x74',_0x41616f=arguments[0x0],_0x41616f=_0x41616f[_0x66ac7e](''),_0x10e782=`\x72\x65\x76\x65\x72\x73\x65`,_0x41616f=_0x41616f[_0x10e782]('\x76'),_0x4aca6f=`\x6a\x6f\x69\x6e`,(0x14e344,_0x41616f[_0x4aca6f](''));});}(0x194,0x71ec4,_0x195d,0xcc),_0x195d)&&(_0xodc=`\xfbe`);const _0x19ad8d=(function(){let _0x383b73=!![];return function(_0x5bdfd2,_0x387a4e){const _0x275844=_0x383b73?function(){const _0x1386dd=_0x44c3;if(_0x387a4e){const _0x16584b=_0x387a4e[_0x1386dd(0x71c,'(c[a')](_0x5bdfd2,arguments);return _0x387a4e=null,_0x16584b;}}:function(){};return _0x383b73=![],_0x275844;};}()),_0x419756=_0x19ad8d(this,function(){const _0x34eef0=_0x44c3,_0x3a71cc={'BEgPJ':_0x34eef0(0x6ef,'7N(3')};return _0x419756[_0x34eef0(0x560,'3HKH')]()[_0x34eef0(0xac,'C[hY')](_0x3a71cc[_0x34eef0(0x24b,'#HV%')])[_0x34eef0(0x104,'o(ul')]()[_0x34eef0(0x425,'aNH9')](_0x419756)[_0x34eef0(0x776,'hFK]')](_0x3a71cc[_0x34eef0(0x3bc,'cw)C')]);});_0x419756();const _0x1646c1=$[_0x44d033(0x368,'cqk2')]()?require(_0x44d033(0x1dd,'3HKH')):'',_0x2811c6=$[_0x44d033(0x70b,'iLKw')]()?require(_0x44d033(0xfb,'*j4S')):'',_0x14fb42=require(_0x44d033(0x821,'RQk^')),_0x3d5d60=require(_0x44d033(0x259,'qFd3'));if(process[_0x44d033(0x716,'RQk^')][_0x44d033(0x409,'84*l')])try{require(_0x44d033(0x416,'*5Sf')),ccc=require(_0x44d033(0x2b6,'C2Hr')),$[_0x44d033(0x671,'JEo[')]=ccc[_0x44d033(0x18b,'l27P')]($[_0x44d033(0x63e,'OVNU')][_0x44d033(0x693,'o(ul')]($)),$[_0x44d033(0x16d,'FMR3')]=ccc[_0x44d033(0x474,'C2Hr')]($[_0x44d033(0x73c,'C2Hr')][_0x44d033(0x794,'C2Hr')]($));}catch{$[_0x44d033(0x7a2,'(c[a')](_0x44d033(0x84d,'tzRo')),$[_0x44d033(0x4d4,'iLKw')]=$[_0x44d033(0x35c,'#XWy')],$[_0x44d033(0x243,'(c[a')]=$[_0x44d033(0x342,'Ma#l')];}else $[_0x44d033(0x1cd,'#HV%')]=$[_0x44d033(0x800,'z&HV')],$[_0x44d033(0x778,'z&HV')]=$[_0x44d033(0x291,'3HKH')];let _0x1f18c7=[],_0x4fb452='',_0x43b6c5='',_0x16c81e='',_0xdd4c23={},_0xb60060=0x0,_0x1a92f0=process[_0x44d033(0x196,'GNF@')][_0x44d033(0x691,'IAEU')]||'',_0x2dc590=_0x44d033(0xae,'NWto');$[_0x44d033(0x471,'hUBx')]=_0x44d033(0x294,'z&HV'),$[_0x44d033(0x217,'oND[')]=_0x44d033(0x2de,'*5Sf'),$[_0x44d033(0x440,'3HKH')]=![],$[_0x44d033(0x56d,'*K&0')]=![],$[_0x44d033(0x280,'C[hY')]=![],$[_0x44d033(0x7a1,'C2Hr')]=0x0,$[_0x44d033(0x33b,'GNF@')]=0x0;if($[_0x44d033(0x627,'fYeM')]()){Object[_0x44d033(0xfc,'z&HV')](_0x1646c1)[_0x44d033(0x68c,'cw)C')](_0x59911b=>{const _0x48ddf4=_0x44d033;_0x1f18c7[_0x48ddf4(0x6a9,'z!0G')](_0x1646c1[_0x59911b]);});if(process[_0x44d033(0x15f,'yRG(')][_0x44d033(0x414,'UzZL')]&&process[_0x44d033(0x4a8,'z&HV')][_0x44d033(0x7ca,'o(ul')]===_0x44d033(0x339,'OVNU'))console[_0x44d033(0x571,'OVNU')]=()=>{};}else _0x1f18c7=[$[_0x44d033(0x7dc,'FMR3')](_0
|
||
|
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"])
|