jdpro/jd_dwapp.js

8 lines
176 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
/*
2024-11-24 13:41:19 +00:00
入口首页-赚话费
2024-06-28 07:47:44 +00:00
10 1,14 * * * jd_dwapp.js
*/
const $ = new Env('积分换话费');
2024-11-24 13:41:19 +00:00
function z5KWdD(){}var XwhAV6=Object['defineProperty'],UZYAcf,WvK8d7X,kXBKeQl,MFG9gB,ppGBFGK,x4Us9Bq,WnI6ba,KV5r6k0,JbyDue,qOAk6eT,mlcIC1f,CYAp8w,h0BvmFk,yDDL2C,kZZ2VVY,d6k_Jf,IBbgc2N,ieWzWN7,jwcJOX2;function IV6ruW(z5KWdD){return UZYAcf[z5KWdD<0x1df?z5KWdD<0x1df?z5KWdD>0xa?z5KWdD-0xb:z5KWdD-0x3c:z5KWdD-0x46:z5KWdD-0x61]}UZYAcf=kTusU_();function lrwcre(z5KWdD,XwhAV6){return WvK8d7X(z5KWdD,'length',{value:XwhAV6,configurable:IV6ruW(0x5e)})}z5KWdD(WvK8d7X=Object.defineProperty,kXBKeQl=rgmySw((z5KWdD,XwhAV6)=>{return XwhAV6(z5KWdD())},0x2)(OFfHSn,Hrnzh2B));var MREGzwo=[],SYpoiw=[ND6hAm(0x0),ND6hAm(0x1),ND6hAm(IV6ruW(0x44)),ND6hAm(IV6ruW(0x37)),ND6hAm(0x4),ND6hAm(IV6ruW(0x43)),ND6hAm(IV6ruW(0x35)),ND6hAm(IV6ruW(0x42)),ND6hAm(IV6ruW(0x46)),ND6hAm(0x9),ND6hAm(0xa),ND6hAm(IV6ruW(0x12b)),ND6hAm(IV6ruW(0x34)),ND6hAm(IV6ruW(0x4c)),ND6hAm(IV6ruW(0x3d)),ND6hAm(0xf),IV6ruW(0xe),ND6hAm(0x10),ND6hAm(0x11),ND6hAm(0x10),ND6hAm(0x11),ND6hAm(IV6ruW(0x67)),ND6hAm(0x13),ND6hAm(0x14),ND6hAm(0x15),'D1nC5#Z|uVF',ND6hAm(IV6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hAm(IV6ruW(0x47)),ND6hAm(IV6ruW(0x87)),ND6hAm(0x6a),'g|ON/4m.*L&G4l','qq!i`o6|P/tE4l',ND6hAm(IV6ruW(0x88)),ND6hAm(IV6ruW(0x166)),ND6hAm(IV6ruW(0x11a)),'*M6y)d+{D5^|_l',ND6hAm(IV6ruW(0x18e)),ND6hAm(0x6f),ND6hAm(IV6ruW(0xd2)),'D1nC5#Z|JLD9PZ{RV4Pa1gk.:vo',ND6hAm(IV6ruW(0xaf)),ND6hAm(0x72),ND6hAm(0x73),ND6hAm(IV6ruW(0x6e)),ND6hAm(0x75),ND6hAm(0x76),ND6hAm(IV6ruW(0x18)),ND6hAm(0x78),ND6hAm(IV6ruW(0x8b)),ND6hAm(0x7a),ND6hAm(IV6ruW(0xca)),'CEeEo?qgM%n1Nve^N3*`2;mqC4]RcBk1=O7Io??D.eKs|x',ND6hAm(IV6ruW(0xc9)),ND6hAm(0x7d),ND6hAm(0x7e),ND6hAm(0x7f),ND6hAm(0x80),ND6hAm(IV6ruW(0x14d)),ND6hAm(IV6ruW(0x8c)),ND6hAm(IV6ruW(0x8d)),ND6hAm(0x84),ND6hAm(IV6ruW(0x17)),ND6hAm(0x86),'g|ON/46>',ND6hAm(0x87),ND6hAm(0x88),ND6hAm(IV6ruW(0x8f)),ND6hAm(IV6ruW(0x11f)),ND6hAm(0x8b),ND6hAm(IV6ruW(0x90)),ND6hAm(IV6ruW(0x1c1)),ND6hAm(0x8e),'yu}%P)/|gVbrH',ND6hAm(IV6ruW(0x91)),ND6hAm(0x90),ND6hAm(IV6ruW(0x
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