jdpro/jd_dplh0708.js

12 lines
148 KiB
JavaScript
Raw Normal View History

2024-07-08 06:20:50 +00:00
/*
一次性手动执行
自行运行有水无水自测
第一个账号助力作者 其他依次助力CK1
注意第一个CK黑号会全部助力所填写的助力码
33 1 8 7 * jd_dplh0708.js
*/
const $ = new Env("大牌0708");
var _0xodw='jsjiami.com.v7';const _0x57b368=_0x5452;(function(_0x55b7b3,_0x3d21a2,_0x4ad6c3,_0x57f517,_0x105763,_0x509f56,_0x44feef){return _0x55b7b3=_0x55b7b3>>0x5,_0x509f56='hs',_0x44feef='hs',function(_0x2bb26b,_0x35f56c,_0x76dab5,_0x24376f,_0x1f01b4){const _0x4ae536=_0x5452;_0x24376f='tfi',_0x509f56=_0x24376f+_0x509f56,_0x1f01b4='up',_0x44feef+=_0x1f01b4,_0x509f56=_0x76dab5(_0x509f56),_0x44feef=_0x76dab5(_0x44feef),_0x76dab5=0x0;const _0x384c50=_0x2bb26b();while(!![]&&--_0x57f517+_0x35f56c){try{_0x24376f=-parseInt(_0x4ae536(0x206,'4ePV'))/0x1+parseInt(_0x4ae536(0x5c3,'FeRx'))/0x2*(-parseInt(_0x4ae536(0xf8,'xzF('))/0x3)+-parseInt(_0x4ae536(0x2df,'pc!u'))/0x4+parseInt(_0x4ae536(0xc2,'080q'))/0x5+parseInt(_0x4ae536(0x1e0,'pc!u'))/0x6*(-parseInt(_0x4ae536(0x2a2,'FYQQ'))/0x7)+parseInt(_0x4ae536(0x3cf,'9gyZ'))/0x8+parseInt(_0x4ae536(0x275,'K7L]'))/0x9;}catch(_0x489531){_0x24376f=_0x76dab5;}finally{_0x1f01b4=_0x384c50[_0x509f56]();if(_0x55b7b3<=_0x57f517)_0x76dab5?_0x105763?_0x24376f=_0x1f01b4:_0x105763=_0x1f01b4:_0x76dab5=_0x1f01b4;else{if(_0x76dab5==_0x105763['replace'](/[RguYNBVdwXDECeLyfbnx=]/g,'')){if(_0x24376f===_0x35f56c){_0x384c50['un'+_0x509f56](_0x1f01b4);break;}_0x384c50[_0x44feef](_0x1f01b4);}}}}}(_0x4ad6c3,_0x3d21a2,function(_0x2c42d3,_0x57e179,_0x1aa1bb,_0x5091bb,_0x5498e5,_0x27f37b,_0x431bca){return _0x57e179='\x73\x70\x6c\x69\x74',_0x2c42d3=arguments[0x0],_0x2c42d3=_0x2c42d3[_0x57e179](''),_0x1aa1bb=`\x72\x65\x76\x65\x72\x73\x65`,_0x2c42d3=_0x2c42d3[_0x1aa1bb]('\x76'),_0x5091bb=`\x6a\x6f\x69\x6e`,(0x1775b9,_0x2c42d3[_0x5091bb](''));});}(0x18a0,0x39b8e,_0x57b7,0xc7),_0x57b7)&&(_0xodw=_0x57b368(0x20b,'*[Rw'));const _0x21cab3=$[_0x57b368(0x4f5,'D1ko')]()?require(_0x57b368(0x4c5,'NJm!')):'',_0x1e7233=$[_0x57b368(0x68e,'080q')]()?require(_0x57b368(0x230,'@lAE')):'',_0x174d58=require(_0x57b368(0x2b2,'pe1D')),_0xbf6e2d=require(_0x57b368(0x2b3,'Y&jz')),_0x51f871=require(_0x57b368(0x78b,'D1ko')),_0x19c211=require(_0x57b368(0x4a2,'CeaR'));let _0x5b40a6=[],_0x1fc6b6='',_0xb09091='',_0x356a26='',_0x22b03b='3';if(process[_0x57b368(0x799,'C]Xc')][_0x57b368(0x173,'OOEh')]){const _0x3f5c48=require(_0x57b368(0x53b,'kYWR'));$[_0x57b368(0x48e,'8!9^')]=_0x3f5c48[_0x57b368(0x245,'pe1D')]($[_0x57b368(0x3c6,'%j^o')][_0x57b368(0x306,'kYWR')]($)),$[_0x57b368(0x51b,'%j^o')]=_0x3f5c48[_0x57b368(0x664,'IM5A')]($[_0x57b368(0x455,'#Pr#')][_0x57b368(0x3da,'xiIS')]($));}if($[_0x57b368(0x40b,'kYWR')]()){Object[_0x57b368(0xd6,'HMPT')](_0x21cab3)[_0x57b368(0x227,'pc!u')](_0x57cf5a=>{const _0x53a1c6=_0x57b368;_0x5b40a6[_0x53a1c6(0x75f,'B@C0')](_0x21cab3[_0x57cf5a]);});if(process[_0x57b368(0x112,'xiIS')][_0x57b368(0x583,'klCo')]&&process[_0x57b368(0x3b3,'EnJB')][_0x57b368(0x4e2,'Y&jz')]===_0x57b368(0x40d,'klCo'))console[_0x57b368(0x489,'IM5A')]=()=>{};}else _0x5b40a6=[$[_0x57b368(0x238,'j3k&')](_0x57b368(0x44d,'*[Rw')),$[_0x57b368(0x12d,'HMPT')](_0x57b368(0x3b1,'@lAE')),...jsonfomat($[_0x57b368(0x4c1,'TDXT')](_0x57b368(0x3a6,'NJm!'))||'[]')[_0x57b368(0x459,'C]Xc')](_0x1d2a20=>_0x1d2a20[_0x57b368(0x6b5,'s]I5')])][_0x57b368(0x47c,'klCo')](_0x2d180b=>!!_0x2d180b);let _0x27567d=process[_0x57b368(0x153,'j3k&')][_0x57b368(0x728,'9gyZ')]||_0x57b368(0x704,'s]I5'),_0x5bf351=process[_0x57b368(0x5cb,'poQC')][_0x57b368(0x590,'%4pi')]||_0x57b368(0x418,'klCo'),_0xc79009=_0x57b368(0x2f9,'fBAr');$[_0x57b368(0x529,'kYWR')]=_0x57b368(0x517,'OOEh'),$[_0x57b368(0x155,'SqHc')]=$[_0x57b368(0x1c8,'j3k&')][_0x57b368(0x403,'TDXT')](/oC[0-9a-z]+/)[0x0],$[_0x57b368(0x345,'8!9^')]=$[_0x57b368(0x613,'TDXT')][_0x57b368(0xf2,'4NsX')](/actId=([0-9a-f]+_\d+)/)[0x1],$[_0x57b368(0x2e1,'#Pr#')]=_0x57b368(0x11b,'9gyZ'),$[_0x57b368(0x154,'fBAr')]=_0x57b368(0x666,'8!9^'),$[_0x57b368(0x34e,'%4pi')]=![];let _0x2d0b14=[_0x57b368(0x1ae,'U97b')];$[_0x57b368(0x5ce,'CeaR')]=_0x2d0b14[_0x4a0ea0(0x0,_0x2d0b14[_0x57b368(0x639,'!s@[')])],$[_0x57b368(0x6ba,'#Pr#')]=process[_0x57b368(0x40f,'U97b')][_0x57b368(0x143,'s]I5')]||'',$[_0x57b368(0x46c,'EnJB')]=![],!(async()=>{const _0x21b50e=_0x57b368,_0x6ac45a={'wufng':_0x21b50e(0x5fd,'080q'),'aeDUJ':_0x21b50e(0x228,'C0Bp'),'vPmvm':_0x21b50e(0x769,'N
function Env(o,t){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((r,i)=>{s.call(this,t,(t,e,s)=>{t?i(t):r(e)})})}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.logLevels={debug:0,info:1,warn:2,error:3},this.logLevelPrefixs={debug:"[DEBUG] ",info:"[INFO] ",warn:"[WARN] ",error:"[ERROR] "},this.logLevel="info",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.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}getEnv(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":void 0}isNode(){return"Node.js"===this.getEnv()}isQuanX(){return"Quantumult X"===this.getEnv()}isSurge(){return"Surge"===this.getEnv()}isLoon(){return"Loon"===this.getEnv()}isShadowrocket(){return"Shadowrocket"===this.getEnv()}isStash(){return"Stash"===this.getEnv()}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null,...s){try{return JSON.stringify(t,...s)}catch{return e}}getjson(t,e){let s=e;if(this.getdata(t))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(r=>{this.get({url:t},(t,e,s)=>r(s))})}runScript(a,o){return new Promise(r=>{let t=this.getdata("@chavy_boxjs_userCfgs.httpapi");t=t&&t.replace(/\n/g,"").trim();var e=(e=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"))?+e:20,[s,i]=(e=o&&o.timeout?o.timeout:e,t.split("@"));this.post({url:`http://${i}/v1/scripting/evaluate`,body:{script_text:a,mock_type:"cron",timeout:e},headers:{"X-Key":s,Accept:"*/*"},timeout:e},(t,e,s)=>r(s))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};this.fs=this.fs||require("fs"),this.path=this.path||require("path");var t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),r=!s&&this.fs.existsSync(e);if(!s&&!r)return{};r=s?t:e;try{return JSON.parse(this.fs.readFileSync(r))}catch(t){return{}}}writedata(){var t,e,s,r,i;this.isNode()&&(this.fs=this.fs||require("fs"),this.path=this.path||require("path"),t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),r=!(s=this.fs.existsSync(t))&&this.fs.existsSync(e),i=JSON.stringify(this.data),!s&&r?this.fs.writeFileSync(e,i):this.fs.writeFileSync(t,i))}lodash_get(t,e,s){let r=t;for(const t of e.replace(/\[(\d+)\]/g,".$1").split("."))if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,r,e){return Object(t)===t&&((r=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g)||[]).slice(0,-1).reduce((t,e,s)=>Object(t[e])===t[e]?t[e]:t[e]=Math.abs(r[s+1])>>0==+r[s+1]?[]:{},t)[r[r.length-1]]=e),t}getdata(t){let e=this.getval(t);if(/^@/.test(t)){var[,s,r]=/^@(.*?)\.(.*?)$/.exec(t);if(s=s?this.getval(s):"")try{const t=JSON.parse(s);e=t?this.lodash_get(t,r,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){var[,r,i]=/^@(.*?)\.(.*?)$/.exec(e),a=this.getval(r),a=r?"null"===a?null:a||"{}":"{}";try{const e=JSON.parse(a);this.lodash_set(e,i,t),s=this.setval(JSON.stringify(e),r)}catch(e){this.lodash_set(a={},i,t),s=this.setval(JSON.stringify(a),r)}}else s=this.setval(t,e);return s}getval(t){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.read(t);case"Quantumult X":return $prefs.valueForKey(t);case"Node.js":return this.data=this.loaddata(),this.data[t];default:return this.data&&this.data[t]||null}}setval(t,e){switch(this.getEnv()){case"Surge":case"Loon":case"Stash":case"Shadowrocket":return $persistentStore.write(t,e);case"Quantumult X":return $prefs.setValueF