faker3/jd_gfjd.js

16 lines
87 KiB
JavaScript
Raw Normal View History

2024-09-23 20:27:36 +08:00
/*
活动名称疯一瓜分1亿京豆
环境变量
jd_gfjd_notify // 是否推送通知true/false默认不推送
jd_gfjd_pin // 指定助力账号,多个用@,逗号,换行符分隔,不填写则默认助力全部账号
jd_gfjd_helpnum // 指定助力账号数,默认不启用,值为数字,代表前几账号助力,需自行设置变量
cron:1 1 1 1 *
*/
const $ = new Env('疯一瓜分1亿京豆')
2024-10-02 03:57:22 +08:00
function aPk_NLN(){}var N00fqRy=Object['defineProperty'],UoOoA7,Nw_2fp,yfqrDJh,EDo31I,rU0JmWH,RD_PZv2,jBrsOVG,xFTsV4T,G_5lzx,r6R4Nu,xH_ERj,MgyIMww,EkUsGw,xKexBl,IzVQDmU,Ib9WAX,Wgbmjl;function QXmO4B(aPk_NLN){return UoOoA7[aPk_NLN<0x7c?aPk_NLN+0x48:aPk_NLN+0x3d]}UoOoA7=mbVtTi();function BDH8BIy(aPk_NLN,N00fqRy){Nw_2fp(aPk_NLN,'length',{value:N00fqRy,configurable:!0x0});return aPk_NLN}aPk_NLN(Nw_2fp=Object.defineProperty,yfqrDJh=EcAVtWP((aPk_NLN,N00fqRy)=>{return N00fqRy(aPk_NLN())},0x2)(DBol1W1,FbNz1by));var duaijLo=[],OxllqsZ=[biYIZM(QXmO4B(-0x33)),biYIZM(0x1),biYIZM(QXmO4B(-0x35)),biYIZM(0x3),biYIZM(QXmO4B(-0x34)),biYIZM(0x5),biYIZM(QXmO4B(-0x2e)),biYIZM(QXmO4B(-0x1a)),biYIZM(0x8),biYIZM(0x9),biYIZM(QXmO4B(-0xb)),biYIZM(QXmO4B(-0x22)),biYIZM(0xc),biYIZM(QXmO4B(-0x1c)),biYIZM(QXmO4B(-0x1b)),biYIZM(QXmO4B(-0x2b)),biYIZM(QXmO4B(-0x23)),biYIZM(QXmO4B(-0x3)),'iCn|',biYIZM(0x12),'\x65\x67\x4c\x7c\x76\x6c\x5f\x47','ZgA|',biYIZM(QXmO4B(0xe)),biYIZM(QXmO4B(-0xd)),biYIZM(0x15),'[0RbJ+EL|TgWrJGfblxL|`Cr(O>nBM+vI>z](',biYIZM(QXmO4B(-0x10)),biYIZM(0x17),biYIZM(QXmO4B(-0x47)),biYIZM(QXmO4B(0x40)),biYIZM(QXmO4B(-0x14)),biYIZM(QXmO4B(-0xa)),biYIZM(0x18),biYIZM(0x1c),QXmO4B(-0x48),biYIZM(QXmO4B(0x57)),biYIZM(QXmO4B(-0x7)),QXmO4B(-0x48),biYIZM(QXmO4B(-0x21)),biYIZM(QXmO4B(-0x2f)),biYIZM(0x20),biYIZM(QXmO4B(-0x5)),biYIZM(0x22),biYIZM(0x23),biYIZM(QXmO4B(-0x46)),biYIZM(QXmO4B(-0x41)),biYIZM(0x26),biYIZM(QXmO4B(0x1)),'FAJ!|&yuu;',biYIZM(QXmO4B(-0x47)),biYIZM(QXmO4B(-0x43)),biYIZM(0x28),biYIZM(0x29),'H|g*KU(a<',biYIZM(QXmO4B(0x3)),biYIZM(0x2b),';CA|F$qG','a|MLs}.]<',biYIZM(0x2c),biYIZM(0x2d),biYIZM(0x2e),biYIZM(0x2f),'\x6d\x7c\x54\x6a\x23\x5b\x36\x4b\x40',biYIZM(QXmO4B(0xa)),biYIZM(0x31),biYIZM(QXmO4B(-0x2)),biYIZM(0x33),biYIZM(QXmO4B(0x9)),biYIZM(0x35),'zon|Z{cB;',biYIZM(0x36),biYIZM(0x37),biYIZM(0x38),biYIZM(0x39),biYIZM(0x3a),biYIZM(0x3b),biYIZM(QXmO4B(0xd)),QXmO4B(-0x42),QXmO4B(-0x48),biYIZM(0x24),'4vw|Y#F!;',biYIZM(QXmO4B(-0x45)),biYIZM(0x3e),biYIZM(0x3f),':Cw|z',biYIZM(0x40),biYIZM(0x41),biYIZM(0x42),biYIZM(0x43),'.&@|',biYIZM(0x44),biYIZM(0x45),biYIZM(0x46),biYIZM(0x47),biYIZM(0x48),QXmO4B(-0x48),biYIZM(0x49),biYIZM(QXmO4B(-0x29)),biYIZM(0x4b),biYIZM(0x4c),biYIZM(QXmO4B(0x1b)),biYIZM(0x4e),biYIZM(0x4f),biYIZM(0x50),biYIZM(0x51),biYIZM(0x52),biYIZM(0x53),biYIZM(0x54),biYIZM(QXmO4B(0x18)),'\x4c\x23\x77\x7c\x78\x70\x57\x7a\x35\x68\x4f\x3a\x28\x73\x4c\x6b\x5e\x6a\x62\x7c',QXmO4B(-0x48),biYIZM(QXmO4B(-0x46)),biYIZM(QXmO4B(-0x28)),biYIZM(0x56),biYIZM(QXmO4B(0x14)),biYIZM(0x58),'.&@|',QXmO4B(-0x48),biYIZM(QXmO4B(-0x3e)),biYIZM(0x5a),biYIZM(QXmO4B(-0x45)),biYIZM(0x3e),biYIZM(QXmO4B(-0x3d)),biYIZM(QXmO4B(-0xf)),QXmO4B(-0x48),biYIZM(QXmO4B(-0x46)),biYIZM(QXmO4B(0xf)),biYIZM(QXmO4B(0x17)),QXmO4B(-0x48),biYIZM(0x5e),biYIZM(0x5f),biYIZM(QXmO4B(-0x3c)),biYIZM(QXmO4B(0x20)),biYIZM(0x62),biYIZM(QXmO4B(-0x45)),biYIZM(0x3e),biYIZM(0x63),QXmO4B(-0x3b),biYIZM(0x64),biYIZM(0x65),biYIZM(0x66),biYIZM(0x67),biYIZM(QXmO4B(0x27)),biYIZM(0x69),biYIZM(QXmO4B(-0xc)),biYIZM(QXmO4B(-0x2c)),'4oL|abm!;',biYIZM(QXmO4B(0x2d)),biYIZM(0x6c),biYIZM(0x6d),'&&8FQW|m&hbai',biYIZM(0x6e),biYIZM(0x6f),biYIZM(0x70),biYIZM(QXmO4B(0x30)),QXmO4B(-0x48),biYIZM(QXmO4B(-0x44)),biYIZM(QXmO4B(-0x44)),'\u0022\u0060\u004c\u007c',biYIZM(QXmO4B(-0x36)),biYIZM(0x74),'\x4e\x7c\x31\x46\x43\x66\x25\x47','\x6d\x5f\x6e\x7c\x2a\x48\x4f\x6d\x26\x4a\x37\x36\x62\x7e\x42\x74\x28\x26\x41\x7c\x23\x31\x37\x42\x6f\x32\x7b\x36\x5e\x73\x78\x53\x73\x65\x2f\x54\x23\x7a\x55\x23\x47',biYIZM(QXmO4B(-0x3a)),'se@|','IHw|xF4x5hP7gsu._<HgN','N|1FCf>5qQ2JOKwS,oT',biYIZM(0x76),biYIZM(QXmO4B(0x34)),biYIZM(QXmO4B(0x35)),biYIZM(0x79),'\u005e\u0028\u0041\u007c\u0076\u006c\u0022\u0077\u003c\u006d\u0051\u006e\u002c\u0075\u0030','m_n|*HOm&J76WC',biYIZM(0x7a),biYIZM(0x7b),'st6z{fABgX7auKjB}#9|',biYIZM(QXmO4B(-0x39)),biYIZM(0x7d),biYIZM(QXmO4B(-0x38)),'t#2+h!u^g@8=tV.}QcpM{EM5FMiZ=su9_|[vI~b8W>1;cj#P?(mptb~#v,/[MCP4f=wBXl.!&j"#$sj.AeN|YpSG',biYIZM(0x7f),biYIZM(QXmO4B(-0x2a)),biYIZM(QXmO4B(0x31)),biYIZM(QXmO4B(0x41)),biYIZM(0x83),biYIZM(0x84),biYIZM(0x85),biYIZM(QXmO4B(0x1a)),biYIZM(QXmO4B(0x42)),biYIZM(0x88),biYIZM(0x89),biYI
2024-09-23 20:27:36 +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"])