faker3/jd_gfjd.js

16 lines
101 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-12-23 10:46:04 +08:00
function O5FtND(){}var nITyOTK=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],bxZfu05,vz50_ye,VBnl6Z,yhc4_g,FJom1Bu,TpdAoQ,mgYJ5dv,dRJRd4Z,m8jMdA,tk5eKOe,FO_y81,fyNQczw,m6HKS46,fOJAdl,ifB1dQb,kRSqqy,zXGqMf,gLGdbP;function fcF7Tx(O5FtND){return bxZfu05[O5FtND>0x1f?O5FtND<0x93?O5FtND>0x93?O5FtND-0x56:O5FtND<0x1f?O5FtND+0x53:O5FtND-0x20:O5FtND-0x3d:O5FtND-0x27]}O5FtND(bxZfu05=LiWr8v(),vz50_ye=LQkv0B((O5FtND,nITyOTK)=>{return nITyOTK(O5FtND())},0x2)(WpGHQI,tLJ1fzb));var ceHAhC=[],ekhcKln=['\x55\x3a\x40\x4e\x64\x54\x73\x7c',m03qJm(fcF7Tx(0x31)),'mr/c','\x5f\x66\x3b\x51\x43\x29\x3d\x33\x35\x32\x7b\x6a\x3e\x32\x43\x6c\x74\x43','\x5f\x66\x3b\x51\x43\x29\x3d\x33\x35\x32\x38\x6a\x3e\x32\x43\x6c\x74\x43','%7QN^',m03qJm(fcF7Tx(0x36)),m03qJm(0x2),m03qJm(0x3),m03qJm(0x4),'\u005f\u0066\u003b\u0051\u0043\u0029\u003d\u0033\u0035\u0032\u0024\u0061\u0065\u0073\u003d\u005f\u0068\u002f\u006f','\u005f\u0066\u003b\u0051\u0043\u0029\u003d\u0033\u0035\u0032\u0078\u0064\u003e\u0029\u0043\u002f\u007a\u005a\u002b\u0040\u0059','\u005e\u0021\u006f\u004e\u004a\u0028\u0075',m03qJm(0x5),'CsDG',m03qJm(0x6),m03qJm(0x7),m03qJm(0x8),'\x45\x57\x36\x68\x59','\x31\x62\x58\x47','\x6b\x73\x48\x4e\x5e',m03qJm(fcF7Tx(0x39)),'\x5a\x3f\x33\x47\x34',m03qJm(fcF7Tx(0x35)),'\u0023\u0057\u003f\u002c\u0045\u0068\u0074\u0055\u0038\u005d\u006d\u0022\u0078\u0038\u0078\u007a\u0063\u0043','\u002c\u007b\u0079\u0050\u006f\u003d\u0077\u0042',m03qJm(0xb),'\u0059\u004b\u0053\u0063\u0078',m03qJm(fcF7Tx(0x20)),m03qJm(fcF7Tx(0x21)),'\u0067\u003c\u0058\u0047','\u006b\u0067\u0049\u003d\u0054\u0049\u0075','\x7e\x49\x37\x29\x3c\x51\x4e\x64\x38\x4b\x73\x4c\x38\x73\x4c\x34\x74\x79\x62\x30\x5d\x26\x51\x43\x63\x30\x37','g<XG','\x6b\x73\x48\x4e\x5e','\u003e\u003c\u005e\u0062\u0054',m03qJm(0xe),m03qJm(0xf),m03qJm(0x10),m03qJm(fcF7Tx(0x22)),m03qJm(0x12),m03qJm(0x13),m03qJm(0x14),'\u0067\u0062\u002b\u0040\u0057\u0030\u005e\u0051\u0051\u0036',m03qJm(fcF7Tx(0x20)),m03qJm(fcF7Tx(0x21)),m03qJm(0x15),'\u0044\u0040\u0033\u007d\u0037','\x23\x57\x50\x4e\x7e\x3b\x71\x33\x4f',m03qJm(0x16),'\u0036\u0030\u007c\u0053\u0033\u0036\u0049',m03qJm(0x17),m03qJm(0x18),'\u0047\u003a\u006b\u0066\u0074\u0031\u007c\u0052','\x52\x38\x56\x53\x45\x73\x48\x48\x3f\x2c',m03qJm(fcF7Tx(0x42)),fcF7Tx(0x23),'\x2a\x4c\x57\x6a\x3f','_)#UnMq6`!gND','\x34\x57\x44\x47\x7e\x3f\x59\x74\x4f','\x56\x6e\x46\x53\x7c\x45\x75','\u0059\u004b\u0053\u0063\u0078','\u003b\u006f\u003f\u002c\u002f\u0041\u0075','\u0067\u003c\u0062\u0022\u003e\u0044\u0021\u006b','\u0072\u0078\u0050\u004e\u0077\u003d\u0043\u0040\u0070',m03qJm(0x1a),'#W:c^h;a_UbAx8Tz3C',fcF7Tx(0x2a),m03qJm(fcF7Tx(0x25)),m03qJm(fcF7Tx(0x22)),m03qJm(0x1c),m03qJm(0x1d),m03qJm(0x1e),fcF7Tx(0x2b),m03qJm(0x1f),'5{a@d5|4T{*Mcn',m03qJm(fcF7Tx(0x4a)),'\u0078\u003c\u0074\u0030\u0044\u0028\u0028\u007c\u0069\u0077\u0030',m03qJm(0x1b),fcF7Tx(0x23),'\x60\x6f\x53\x63\x6c\x44\x70\x28\x3c\x7b\x40\x38\x3e\x32\x49\x5f\x34\x3c\x6f',m03qJm(0x21),m03qJm(fcF7Tx(0x49)),'\x42\x61\x2b\x73\x65\x41\x64\x24\x2f\x2e','d/TNM,Bk','\u003f\u0033\u004e\u0061\u003e\u0066\u007b\u005e\u007c\u0035\u0046','\x4e\x70\x2b\x73\x2b\x63\x42\x4b\x4b\x4c',m03qJm(fcF7Tx(0x48)),'\x4c\x66\x26\x32\x24\x41\x4b\x2f\x72\x32','\x74\x70\x52\x49\x3f\x39\x49\x24\x2f\x3a',']w7ftq0Xz2',m03qJm(fcF7Tx(0x38)),fcF7Tx(0x28),'rxK,vqP(!$O~oBG^yZo',fcF7Tx(0x27),'\x4b\x74\x24\x4b\x5e\x4e\x5f\x60\x50\x3e\x77\x62\x3f\x6e\x63\x28\x7a\x4e\x2a\x77\x76\x45\x23\x3e\x40\x41\x29\x74\x58\x7d\x26\x6a\x30\x57\x62\x31\x72\x49\x4a\x58\x3e\x7c\x74\x49\x35\x4e\x22\x7e\x3b\x7a\x79\x5a\x22',fcF7Tx(0x24),'rx@c','@2?giSVttN1d[qUD[g%o|AQk>|4;k','\u0035\u004c\u0061\u0040\u0022\u0049\u006c\u0061\u002f\u0050','D9{3{zW~~H','\x2a\x5a\x33\x47\x4c\x3d\x2c\x34\x51\x36\x41\x48\x52\x38\x2a\x26\x7c\x31\x24\x47','\x2f\x3c\x6d\x63',m03qJm(0x25),m03qJm(fcF7Tx(0x4e)),'\x72\x35\x78\x72\x6f\x36\x5f\x3b\x72\x41','J$3s',m03qJm(0x11),fcF7Tx(0x24),m03qJm(0x27),m03qJm(0x28),'@)Ewcn5d','\x34\x4c\x30\x2e\x5f\x52\x48\x46\x68\x21\x74\x69\x66\x7a\x73\x44\x26\x78\x66','M3ruN:cL+b$BntZ>QvOSuyEzf#','\u0050\u0047\u006e\u005e','\x5a\x53\x76\x6e\x65\x5a\x5f\x5
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"])