faker3/jd_gfjd.js

17 lines
95 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亿京豆')
function rR5uq9(){}var k_kZaC=Object['defineProperty'],OK4RP4,MmnxBRZ,XXjSa4m,aon9fa,N4rYv8F,Rq862B,UtfI7GF,feCEbhW,_oM_pGy,pQjAQdn,FaiWfD,Kn4MVR,JHHMpB3,SCDW95,Le6LkDl,OzU5me,CLsdDT;function oa6HBqh(rR5uq9){return OK4RP4[rR5uq9>0x10e?rR5uq9+0x61:rR5uq9-0x16]}OK4RP4=CfwzbYS();function W7ocYl(rR5uq9,k_kZaC){return MmnxBRZ.call(null,rR5uq9,oa6HBqh(0x16),{value:k_kZaC,configurable:oa6HBqh(0x58)})}rR5uq9(MmnxBRZ=Object.defineProperty,XXjSa4m=W7ocYl(E4mppIw((...k_kZaC)=>{var MmnxBRZ=E4mppIw(k_kZaC=>{return OK4RP4[k_kZaC>0xfe?k_kZaC-0x4b:k_kZaC-0x6]},0x1);rR5uq9(k_kZaC[MmnxBRZ(0x6)]=0x2,k_kZaC.I8IIcaG=k_kZaC[0x1]);return k_kZaC.I8IIcaG(k_kZaC[0x0]())}),oa6HBqh(0x17))(tM0QSm,R0BofV));var CoSLaf=[],feO_E1=[fh4rFc(0x0),fh4rFc(oa6HBqh(0x3b)),'`M7|7:<@e',fh4rFc(oa6HBqh(0x17)),fh4rFc(oa6HBqh(0x31)),fh4rFc(0x4),fh4rFc(oa6HBqh(0x3e)),fh4rFc(oa6HBqh(0x2d)),fh4rFc(oa6HBqh(0x30)),fh4rFc(oa6HBqh(0x61)),fh4rFc(oa6HBqh(0x46)),fh4rFc(oa6HBqh(0x4c)),fh4rFc(0xb),fh4rFc(0xc),fh4rFc(0xd),fh4rFc(oa6HBqh(0x49)),fh4rFc(0xf),fh4rFc(0x10),fh4rFc(0x11),fh4rFc(0x12),fh4rFc(0x13),fh4rFc(oa6HBqh(0x50)),fh4rFc(0x15),fh4rFc(oa6HBqh(0x42)),fh4rFc(oa6HBqh(0xdc)),fh4rFc(0x18),fh4rFc(0x19),fh4rFc(oa6HBqh(0xa1)),fh4rFc(0x1b),fh4rFc(0x1c),fh4rFc(oa6HBqh(0x52)),fh4rFc(oa6HBqh(0x53)),fh4rFc(0x1f),fh4rFc(0x20),fh4rFc(oa6HBqh(0x18)),oa6HBqh(0x1f),fh4rFc(oa6HBqh(0x21)),fh4rFc(oa6HBqh(0x56)),fh4rFc(0x20),fh4rFc(oa6HBqh(0x18)),'~^J*4|2y',fh4rFc(0x24),fh4rFc(0x25),'wEw"Iz6+;^1BvUmxv=~|Ks!}zX=',fh4rFc(0x24),fh4rFc(oa6HBqh(0xb6)),fh4rFc(0x27),fh4rFc(0x28),fh4rFc(oa6HBqh(0x59)),'t5v0[|@y',fh4rFc(oa6HBqh(0x19)),fh4rFc(0x2b),fh4rFc(0x2c),fh4rFc(oa6HBqh(0x5c)),'f4Q|vG}x',fh4rFc(oa6HBqh(0x1e)),fh4rFc(0x2f),fh4rFc(0x30),'f4Q|vGDjj+',fh4rFc(oa6HBqh(0x5e)),'gMbGYN|@6',fh4rFc(oa6HBqh(0x51)),fh4rFc(0x33),fh4rFc(oa6HBqh(0x60)),fh4rFc(oa6HBqh(0xea)),fh4rFc(oa6HBqh(0x62)),fh4rFc(oa6HBqh(0x20)),fh4rFc(0x38),fh4rFc(oa6HBqh(0x88)),fh4rFc(0x3a),fh4rFc(0x3b),fh4rFc(0x3c),fh4rFc(0x3d),'4SU|`wFx',fh4rFc(0x3e),'\u004d\u0055\u0077\u0048\u0029\u003f\u0060\u003a\u006b\u0058\u0067\u007c\u0061\u003d',fh4rFc(oa6HB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Bqh(0x1b)),fh4rFc(0x24),fh4rFc(oa6HBqh(0x96)),fh4rFc(0x76),'Dtz`4|b1h^Nwp7',fh4rFc(oa6HBqh(0x9b)),fh4rFc(oa6HBqh(0x1c)),fh4rFc(oa6HBqh(0x1b)),fh4rFc(0x2a),'\u0044\u0074\u007a\u0060\u0034\u007c\u0062\u0031\u0068\u005e\u004e\u0077\u0070\u0037',fh4rFc(0x78),fh4rFc(oa6HBqh(0x1c)),fh4rFc(0x24),fh4rFc(oa6HBqh(0x19)),fh4rFc(oa6HBqh(0xa2)),fh4rFc(0x7a),'\u0044\u0074\u007a\u0060\u0034\u007c\u0062\u0031\u0066\u0042\u0036\u0059\u003b\u0043\u0064\u0050\u0021\u005e\u003b',fh4rFc(oa6HBqh(0x1b)),fh4rFc(oa6HBqh(0x76)),fh4rFc(0x7c),fh4rFc(oa6HBqh(0x23)),fh4rFc(oa6HBqh(0xb7)),fh4rFc(oa6HBqh(0xb8)),'Dtz`4|b1h^Nwp7',fh4rFc(0x80),'fdhGPc|@CwtkH7}2S^Yo5#Uy','\x60\x21\x69\x71\x2b\x60\x78\x55\x7c\x48\x54\x6b\x55\x63\x75\x32',fh4rFc(0x81),fh4rFc(oa6HBqh(0xba)),fh4rFc(0x83),fh4rFc(oa6HBqh(0x24)),fh4rFc(0x85),fh4rFc(0x86),fh4rFc(oa6HBqh(0x1d)),fh4rFc(0x87),fh4rFc(0x88),fh4rFc(0x89),'}}A"q|/G}VHOK',fh4rFc(0x8a),fh4rF
// 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"])