faker3/jd_gfjd.js

16 lines
110 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-11-04 10:33:35 +08:00
function Wnf6K4(){}var noQfb2A=Object['defineProperty'],ApslPpB,AQmCr6,sM1GBS,NyaPpd,wnYbkz,Hb24j5,B07Gdgv,s9urVOg,KsHP39Q,E_BbMiC,VJJ48i,vbtSBTf,lVNHITO,k0Rcjmk,cSRXQf,vy7GJ7S,WioFzmY,r0tpGN,VKbaLK3,ipZuJs;function oPBVwQ5(Wnf6K4){return ApslPpB[Wnf6K4>0x14f?Wnf6K4-0x1e:Wnf6K4<0x53?Wnf6K4+0x5b:Wnf6K4>0x14f?Wnf6K4-0x4f:Wnf6K4<0x53?Wnf6K4-0x12:Wnf6K4-0x54]}ApslPpB=d2oK4Z();function qBUOl6(Wnf6K4,noQfb2A){AQmCr6(Wnf6K4,oPBVwQ5(0x6b),{value:noQfb2A,configurable:!0x0});return Wnf6K4}Wnf6K4(AQmCr6=Object.defineProperty,sM1GBS=xIT3lxl((Wnf6K4,noQfb2A)=>{return noQfb2A(Wnf6K4())},0x2)(pHq31i,oxQWGTU));var rKWBJr=[],a7E1ih=[kcaBqWj(oPBVwQ5(0x74)),kcaBqWj(oPBVwQ5(0x65)),kcaBqWj(0x2),kcaBqWj(0x3),kcaBqWj(0x4),kcaBqWj(oPBVwQ5(0x5f)),kcaBqWj(oPBVwQ5(0x6c)),kcaBqWj(0x7),kcaBqWj(0x8),kcaBqWj(0x9),kcaBqWj(0xa),kcaBqWj(0xb),kcaBqWj(0xc),kcaBqWj(oPBVwQ5(0x7b)),kcaBqWj(0xe),k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0x6f),kcaBqWj(0x76),kcaBqWj(oPBVwQ5(0x5b)),kcaBqWj(oPBVwQ5(0x94)),kcaBqWj(oPBVwQ5(0xdd)),kcaBqWj(0x7a),kcaBqWj(oPBVwQ5(0x5c)),kcaBqWj(0x7c),kcaBqWj(0x7d),kcaBqWj(oPBVwQ5(0x95)),kcaBqWj(0x7f),kcaBqWj(oPBVwQ5(0x6a)),kcaBqWj(oPBVwQ5(0xe1)),kcaBqWj(oPBVwQ5(0xe3)),kcaBqWj(0x83),kcaBqWj(0x84),kcaBqWj(oPBVwQ5(0x5d)),kcaBqWj(oPBVwQ5(0xe4)),kcaBqWj(0x87),kcaBqWj(oPBVwQ5(0x56)),kcaBqWj(0x20),kcaBqWj(0x88),kcaBqWj(0x88),kcaBqWj(oPBVwQ5(0xe8)),kcaBqWj(0x8a),kcaBqWj(oPBVwQ5(0xe9)),kcaBqWj(oPBVwQ5(0xea)),kcaBqWj(0x8d),kcaBqWj(oPBVwQ5(0xeb)),kcaBqWj(0x8f),kcaBqWj(0x90),kcaBqWj(oPBVwQ5(0x6f)),kcaBqWj(oPBVwQ5(0xe7)),kcaBqWj(oPBVwQ5(0xec)),kcaBqWj(0x94),kcaBqWj(0x95),kcaBqWj(oPBVwQ5(0x64)),kcaBqWj(0x97),kcaBqWj(oPBVwQ5(0xee)),kcaBqWj(oPBVwQ5(0xce)),kcaBqWj(0x9a),kcaBqWj(oPBVwQ5(0xef)),kcaBqWj(0x9c),kcaBqWj(0x9d),kcaBqWj(oPBVwQ5(0x60)),kcaBqWj(0x9f),kcaBqWj(oPBVwQ5(0xf0)),kcaBqWj(0xa1),kcaBqWj(0xa2),'%I/.v9|Hns4Nt{p^XB',kcaBqWj(0xa3),kcaBqWj(oPBVwQ5(0xf2)),kcaBqWj(0xa5),kcaBqWj(0xa6),kcaBqWj(0xa7),kcaBqWj(0xa8),k
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"])