faker3/jd_jdgift.js

13 lines
66 KiB
JavaScript
Raw Permalink Normal View History

2024-08-20 18:15:20 +08:00
/*
活动名称多单有礼一次性
cron:1 1 1 1 *
*/
const $ = new Env('多单有礼一次性')
function RdDuAN(){}var iJyRwD=Object['defineProperty'],KUw3M1,qBNIaE_,mIBAx1q,oxQVnH,wBfa5iQ,wKOuwv,HXVrgX,EbvC5W,F6Ecxv8,NLHTnsa,N8eephD,efZQNN,ozckXBm,V6rqo4,fK04R6I,wlSEMss,Fw0SCcp,uDkhuz6,Gpx_xW;function nSZV4W(RdDuAN){return KUw3M1[RdDuAN<-0x43?RdDuAN+0x20:RdDuAN+0x42]}KUw3M1=cHHZQVq.call(this);function ZQhZev_(RdDuAN,iJyRwD){return qBNIaE_(RdDuAN,nSZV4W(-0x2f),{value:iJyRwD,configurable:!0x0})}RdDuAN(qBNIaE_=Object.defineProperty,mIBAx1q=ZQhZev_(ZONZGNC((...iJyRwD)=>{var qBNIaE_=ZONZGNC(iJyRwD=>{return KUw3M1[iJyRwD<-0x27?iJyRwD+0x49:iJyRwD+0x26]},0x1);RdDuAN(iJyRwD.length=qBNIaE_(-0x25),iJyRwD[0x56]=iJyRwD[0x1]);return iJyRwD[0x56](iJyRwD[nSZV4W(-0x42)]())}),0x2)(X0Dj5Y1,EHvQnJm));var RHbweey=[],nyewXG3=[f9IFDOU(nSZV4W(-0x42)),f9IFDOU(0x1),f9IFDOU(nSZV4W(-0x41)),f9IFDOU(nSZV4W(-0x3c)),f9IFDOU(nSZV4W(-0x3b)),f9IFDOU(0x5),f9IFDOU(nSZV4W(-0x34)),f9IFDOU(nSZV4W(-0x26)),'fp.T1e!|',f9IFDOU(0x8),f9IFDOU(0x9),f9IFDOU(0xa),f9IFDOU(nSZV4W(-0x12)),f9IFDOU(nSZV4W(-0x33)),f9IFDOU(nSZV4W(-0x3e)),nSZV4W(-0x3f),f9IFDOU(nSZV4W(-0x27)),f9IFDOU(0xf),f9IFDOU(nSZV4W(-0x30)),'<mv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|A?]j=HX+o',f9IFDOU(nSZV4W(0x2f)),f9IFDOU(nSZV4W(-0x6)),f9IFDOU(0x78),f9IFDOU(nSZV4W(0x30)),f9IFDOU(nSZV4W(0x29)),f9IFDOU(0x7b),'.WFtO2X`"7d]C@U<k1|7]N7a0Dh6@EovV^Jx}NY+a;TbIHd9(^o',f9IFDOU(nSZV4W(0x2a)),f9IFDOU(0x7d),f9IFDOU(0x7e),f9IFDOU(0x7f),f9IFDOU(nSZV4W(-0x35)),f9IFDOU(0x81),f9IFDOU(0x82),f9IFDOU(0x2c),f9IFDOU(0x83),f9IFDOU(0x83),f9IFDOU(nSZV4W(0x2b)),f9IFDOU(nSZV4W(0x2c)),f9IFDOU(nSZV4W(0x2d)),f9IFDOU(nSZV4W(-0x5)),f9IFDOU(0x88),f9IFDOU(nSZV4W(0x38)),f9IFDOU(nSZV4W(0x31)),f9IFDOU(nSZV4W(0x23)),f9IFDOU(0x8c),f9IFDOU(0x8d),f9IFDOU(nSZV4W(-0x20)),f9IFDOU(nSZV4W(0x42)),'PLlpdz_aPm|$}$T.}hc',f9IFDOU(0x90),f9IFDOU(0x91),f9IFDOU(0x92),'dd6x4|Se',f9IFDOU(nSZV4W(0x33)),f9IFDOU(0x94),f9IFDOU(0x95),f9IFDOU(nSZV4W(0x24)),f9IFDOU(0x97),f9IFDOU(0x98),f9IFDOU(nSZV4W(0x3b)
// 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"])