faker3/jd_gfjd.js

17 lines
85 KiB
JavaScript
Raw Permalink 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亿京豆')
2025-01-06 14:09:02 +08:00
function DHGul2I(){}var Bkfpr8t=Object['defineProperty'],nXdu28,JQMVhYv,mlGrWO,Vs2DV20,j82Azq,qiOmMK,OvXzuD,sAtdLB,J7DSBRU,WohndXS,tdJNHL,ubMmJL,emogJ9,Mh4D57,GipXKQd,_O34KI,zia7BO,KRDfg4,uj1h0k,dWCwd2h;function luvgJ1m(DHGul2I){return nXdu28[DHGul2I>0xcb?DHGul2I-0xd:DHGul2I-0x51]}DHGul2I(nXdu28=ubdzRDJ(),JQMVhYv=kxOVm3((DHGul2I,Bkfpr8t)=>{return Bkfpr8t(DHGul2I())},0x2)(wwQJCE,nZN3kO));var H7LFMk=[],tQs2NZb=[xWWbOG(luvgJ1m(0x5d)),'\x7c\x37\x78\x69\x25',xWWbOG(luvgJ1m(0x6a)),xWWbOG(0x2),xWWbOG(0x3),'\u0028\u003d\u006d\u0034\u0058','\u0057\u006e\u002f\u006d\u004b\u007e\u002e\u0066\u0068\u0032\u0074\u002a\u0055\u007e\u0026\u007d\u007a\u0079\u003d\u0034\u0045\u0074\u0050\u0053\u0050',xWWbOG(luvgJ1m(0x66)),xWWbOG(luvgJ1m(0x6c)),xWWbOG(luvgJ1m(0x5f)),'Wn/mK~.f"{Aewg.W[Up',xWWbOG(0x7),'\x58\x21\x70\x34\x7c\x47\x30',xWWbOG(0x8),'\u004b\u0067\u004c\u004f',xWWbOG(0x9),'\u0031\u006b\u003c\u004f\u0034\u0068\u0021\u0044','dkaO',xWWbOG(luvgJ1m(0x61)),xWWbOG(0xb),'\x6f\x50\x48\x2e\x62','doKzCHG*8M1,#C[0zue*8V2#b].f^)H$R.|(b','\u0036\u0074\u0066\u004f\u0025',xWWbOG(0xc),'\x72\x60\x74\x3e\x4a\x5b\x2b\x61\x2a\x33\x45\x6a\x6b\x2a\x6b\x3f\x69\x4b','E6lC,8WD','\x2a\x31\x4e\x43\x6f\x2f\x2b\x2b\x6b\x73',xWWbOG(luvgJ1m(0x74)),xWWbOG(luvgJ1m(0x56)),'\x43\x67\x2b\x6e\x48\x56\x69\x75',xWWbOG(0xf),'Dlh.Th0','\x47\x7d\x23\x3d\x56\x46\x72\x66\x39\x71\x75\x6c\x43\x7a\x4b\x55\x5b\x55\x42\x6b\x5d\x55\x56\x65\x72\x76\x37','\u006c\u0042\u0043\u004f','\x44\x67\x78\x34\x58',xWWbOG(luvgJ1m(0x65)),'\x54\x47\x45\x55\x2e\x79\x2f\x6a\x23\x74\x4c\x65\x25\x4d\x62\x2f\x52\x42\x67','\x72\x60\x49\x69\x5e\x4c\x3f\x64\x35\x23\x56\x75\x6b\x2a\x54\x3f\x66\x4b','\x52\x6c\x24\x6f\x69\x7c\x46\x63','oRYTkPW',xWWbOG(luvgJ1m(0x6e)),'V_kb*zW',xWWbOG(0x12),'\x6c\x56\x46\x6f\x60\x3a\x58\x6d\x6d\x24','\u007d\u0079\u0053\u0036\u0075\u003f\u006b\u0034\u0056\u0055\u0025\u0062\u0052\u0056\u0052\u0023\u0054\u0065','\x25\x76\x49\x2f\x70\x7c\x22\x63',xWWbOG(luvgJ1m(0x72)),'\x65\x31\x5f\x74\x72',xWWbOG(0x14),'\x5a\x53\x3a\x54\x26\x7a\x77\x3c\x6d\x59\x4f\x5d\x52\x7b\x45\x32\x5a\x53\x3a\x54\x26\x7a\x77\x3c\x6d\x59\x4f\x5d\x52\x7b\x45\x32\x5a\x53\x3a\x54\x26\x7a\x77\x3c\x6d\x59\x4f\x5d\x52\x7b\x45\x32\x4c\x65','\u0039\u0040\u0042\u0036\u006c\u0039\u0057','\x74\x4e\x34\x4a\x62\x3f\x64\x63','\u0046\u0079\u0031\u0036\u0067\u0053\u0064\u006b\u0074',xWWbOG(luvgJ1m(0x71)),'\u002e\u0049\u004d\u0074\u003b\u0054\u0046\u0046\u0023\u0068','2174[G|QVay_?g','\x46\x6e\x4b\x55\x37\x65\x3d\x39','\x38\x40\x24\x41\x35','\u007d\u0079\u0066\u0061\u0075\u0050\u005e\u0048\u003e\u0037\u0038\u0033\u0065','\u0025\u0060\u004c\u004f\u0064\u0074\u005a\u002b\u004d','\x7e\x7b\x28\x3e\x21\x75\x57','\u0042\u0031\u003e\u0054\u0052','\u002f\u0070\u0074\u003e\u0055\u0075\u0030','\u006c\u0042\u0056\u006a\u0035\u004c\u0021\u0044','\u0031\u006b\u0053\u0034\u0073\u002e\u004b\u006f\u0050','\x54\x42\x53\x34\x58',luvgJ1m(0x57),'\x58\x42\x7e\x4f\x2b\x68\x2f\x4c\x4d',xWWbOG(0xf),'\u0056\u006b\u0049\u0069\u002b\u0068\u0030',luvgJ1m(0x54),luvgJ1m(0x55),'\u004b\u0067\u0053\u0034\u002a\u0074\u007d\u0044','\x78\x67\x66\x4f\x25','lBVj7>+fn$$mMc','\x22\x71\x65\x6f\x5f\x22\x51\x25\x54\x71\x3c\x52\x69\x63','\x7c\x3d\x58\x56\x35\x68\x59\x65\x68\x61\x29','\u006b\u0042\u002b\u003a\u004c\u0047\u0047\u0051\u0040\u0073\u003a','\u006c\u0042\u0043\u004f','+vS4)>rD',xWWbOG(luvgJ1m(0x73)),'\u0079\u006e\u003a\u007b\u002c\u007e\u0047\u0044\u007d\u0031\u0064\u007c\u0069\u0067',xWWbOG(luvgJ1m(0x51)),'NV(Cc8po]s',xWWbOG(0x17),'\x7c\x3d\x58\x56\x35\x68\x36\x25\x54\x71\x2a',xWWbOG(0x18),xWWbOG(0x19),'\x79\x6e\x7a\x7b\x41\x75\x76\x55\x31\x7b','\u004d\u0060\u006c\u0076\u007c\u007e\u0076\u006f\u005d\u007b','ak|/XV8!10',xWWbOG(0x1a),xWWbOG(0x1b),xWWbOG(luvgJ1m(0x52)),xWWbOG(luvgJ1m(0x51)),'\u0076\u002b\u0041\u0076\u0058\u0034\u0057\u0026\u0053\u0035\u0073\u0056\u0074\u0063\u0069\u0047\u003f\u0034\u003c\u0073\u002c\u004a\u0072\u0035\u006f\u0075\u007e\u002b\u0043\u003b\u007a\u0023\u003a\u0060\u0056\u0037\u0031\u0068\u007c\u0043\u0035\u0051\u002b\u0068\u0022\u0034\u006a\u0064\u002f\u003f\u007d\u0036\u006a','PC6:wHh9y','\u0031\u006b\u006f\u0069','\u006f\u007b\u0074\
2024-11-12 11:17:55 +08:00
// 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"])