faker3/jd_gfjd.js

16 lines
90 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
活动名称疯一瓜分1亿京豆
环境变量
jd_gfjd_notify // 是否推送通知true/false默认不推送
jd_gfjd_pin // 指定助力账号,多个用@,逗号,换行符分隔,不填写则默认助力全部账号
jd_gfjd_helpnum // 指定助力账号数,默认不启用,值为数字,代表前几账号助力,需自行设置变量
cron:1 1 1 1 *
*/
const $ = new Env('疯一瓜分1亿京豆')
2024-11-18 18:53:57 +08:00
function Uk7IYZa(){}var MVLYHh=Object['defineProperty'],fWoAUp,mOVF7EQ,D5vbLY,uLR1Nd,dqrTJGp,Nm9ORy,ZHBt84M,krQGwu,b2hyCV,fs2Xky0,pmEArvK,rkt1c5V,PO7aL4,lfzpx_,NS9wbX,IxnIGQ,l2lpvGo,b0Itpt;function Ypr1Pn(Uk7IYZa){return fWoAUp[Uk7IYZa<0x148?Uk7IYZa>0x5d?Uk7IYZa-0x5e:Uk7IYZa+0x43:Uk7IYZa+0x33]}fWoAUp=bJMomLy();function U8I35V(Uk7IYZa,MVLYHh){return mOVF7EQ(Uk7IYZa,Ypr1Pn(0x74),{value:MVLYHh,configurable:Ypr1Pn(0xb5)})}Uk7IYZa(mOVF7EQ=Object.defineProperty,D5vbLY=scfLju((Uk7IYZa,MVLYHh)=>{return MVLYHh(Uk7IYZa())},0x2)(xE8d03Z,WUZBvHq));var txm0Zh8=[],UizoI4a=[KiW9pU(Ypr1Pn(0x79)),KiW9pU(0x1),KiW9pU(Ypr1Pn(0x8f)),KiW9pU(Ypr1Pn(0x7b)),KiW9pU(Ypr1Pn(0x8d)),KiW9pU(Ypr1Pn(0x75)),KiW9pU(Ypr1Pn(0xc0)),'ns|X',KiW9pU(Ypr1Pn(0x84)),KiW9pU(0x8),KiW9pU(Ypr1Pn(0x95)),KiW9pU(Ypr1Pn(0xe2)),'>:6OK&xQeq*%|&gY2(7kn*a9a','\u003e\u003a\u0036\u004f\u004b\u0026\u0078\u0051\u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ined"!=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"])