faker3/jd_jinggeng_sign.js

22 lines
85 KiB
JavaScript
Raw Normal View History

2024-11-27 18:38:53 +08:00
/*
活动名称签到有礼 · 京耕
活动链接https://jinggeng-isv.isvjcloud.com/ql/front/showSign?id=<活动id>&user_id=<店铺id>
环境变量jd_jinggeng_sign_url // 活动链接
jd_jinggeng_sign_opencard // 是否入会true/false默认不入会
jd_jinggeng_sign_Notify // 是否通知true/false默认不通知
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#签到有礼 · 京耕
1 1 1 1 * jd_jinggeng_sign.js, tag=签到有礼 · 京耕, enabled=true
*/
const $ = new Env('签到有礼(京耕)')
function MAskQz(){}var RxLarR=Object['defineProperty'],jTbwpm7,a_vCO2,Q5EbXs,zt8goB,WA1cQjY,J3PIFA,zKp8yc,QqcLB95,gxFTlQ,UCKkM6W,bPEBES,U1oHa_,Vf8sNtj,TRDTcF,eC4O0Xx,Mv0GH9I,Z9OK_Z,Yr4qyM,opvK_r,SxHyejC;function Y69d8kC(MAskQz){return jTbwpm7[MAskQz>-0x53?MAskQz+0x52:MAskQz-0x62]}jTbwpm7=ETHoTT();function hVDyMBK(MAskQz,RxLarR){var Q5EbXs=zlD1we(MAskQz=>{return jTbwpm7[MAskQz>0x2f?MAskQz<0x2f?MAskQz+0x55:MAskQz<0x109?MAskQz-0x30:MAskQz+0x10:MAskQz-0x49]},0x1);return a_vCO2(MAskQz,Q5EbXs(0x30),{value:RxLarR,configurable:Y69d8kC(0x1c)})}MAskQz(a_vCO2=Object.defineProperty,Q5EbXs=hVDyMBK(zlD1we((...RxLarR)=>{var a_vCO2=zlD1we(RxLarR=>{return jTbwpm7[RxLarR>0xe3?RxLarR-0x21:RxLarR>0xe3?RxLarR-0x38:RxLarR<0xe3?RxLarR-0xa:RxLarR-0x4e]},0x1);MAskQz(RxLarR[Y69d8kC(-0x52)]=0x2,RxLarR[a_vCO2(0xb)]=RxLarR[0x1]);return RxLarR[Y69d8kC(-0x51)](RxLarR[0x0]())}),Y69d8kC(-0x33))(qhAyKW,RMoPud));var _iG_Ab=[],JMBMN0F=[puKow1(0x0),puKow1(0x1),puKow1(0x2),puKow1(0x3),puKow1(0x4),puKow1(0x5),puKow1(0x6),puKow1(0x7),puKow1(Y69d8kC(-0x26)),puKow1(Y69d8kC(-0x2f)),puKow1(Y69d8kC(-0x14)),puKow1(Y69d8kC(-0x31)),puKow1(0xc),puKow1(0xd),puKow1(Y69d8kC(-0x20)),puKow1(Y69d8kC(-0x3f)),puKow1(Y69d8kC(0x30)),puKow1(Y69d8kC(-0x1d)),puKow1(0x12),puKow1(Y69d8kC(-0x1b)),puKow1(0x14),puKow1(Y69d8kC(-0x2b)),puKow1(0x16),puKow1(0x17),puKow1(Y69d8kC(0x49)),puKow1(0x19),puKow1(0x1a),puKow1(0x1b),puKow1(0x1c),puKow1(0x1d),puKow1(0x1e),puKow1(0x1f),puKow1(0x20),puKow1(0x21),puKow1(0x22),puKow1(0x23),puKow1(Y69d8kC(0x5e)),puKow1(Y69d8kC(-0x16)),puKow1(Y69d8kC(-0x15)),puKow1(Y69d8kC(-0x51)),puKow1(Y69d8kC(-0x3a)),puKow1(Y69d8kC(-0x2a)),puKow1(0x2a),puKow1(0x2b),puKow1(0x2c),puKow1(Y69d8kC(-0x12)),puKow1(Y69d8kC(0x7d)),'\u002b\u0043\u0050\u0032\u0079\u0059\u003d\u0029\u006c\u005a\u006a\u0030\u0056\u002c\u0052\u0073\u007c\u0065\u0042\u0051',puKow1(0x2f),puKow1(Y69d8kC(-0x10)),puKow1(Y69d8kC(-0xf)),'+CP2yY=)lZh5V,jIa]D:CzxlICUV+rzfpQ^T7N|xBo',puKow1(Y69d8kC(-0xe)),'Vm_L>|7',puKow1(0x33),puKow1(Y69d8kC(0x6)),puKow1(0x35),puKow1(0x36),puKow1(0x37),puKow1(Y69d8kC(0x64)),puKow1(Y69d8kC(-0xd)),puKow1(Y69d8kC(-0x45)),puKow1(0x3b),puKow1(Y69d8kC(0x1e)),puKow1(Y69d8kC(-0x49)),puKow1(Y69d8kC(-0xc)),puKow1(0x3f),'4)%>J$g:*~]pA&|YuD[#)x@*Y)UA4kxiZ82S{(mPJ^',puKow1(0x40),puKow1(0x41),'ew7:E/|3}UpL/1>$cC^',puKow1(0x42),puKow1(Y69d8kC(-0x2e)),puKow1(Y69d8kC(-0xb)),puKow1(0x45),puKow1(0x46),puKow1(0x47),puKow1(0x48),puKow1(0x49),puKow1(0x4a),puKow1(0x4b),puKow1(0x4c),puKow1(0x4d),puKow1(0x4e),puKow1(0x4f),puKow1(0x50),puKow1(0x51),puKow1(0x52),'\u0061\u0058\u0074\u007c\u0057\u0056\u007e\u0043\u0043\u0047',puKow1(Y69d8kC(-0x8)),puKow1(0x54),puKow1(0x55),puKow1(0x56),puKow1(0x57),puKow1(Y69d8kC(-0x28)),puKow1(Y69d8kC(-0x24)),puKow1(0x5a),puKow1(0x5b),puKow1(0x5c),'\u0031\u0058\u0063\u0041\u0064\u007c\u0075\u0049\u002f',puKow1(Y69d8kC(0x4)),puKow1(Y69d8kC(-0x50)),puKow1(0x5f),puKow1(0x60),'\u006e\u0045\u003d\u0056\u0057\u007c\u005f\u002a\u0023',puKow1(0x61),puKow1(0x3d),puKow1(0x62),puKow1(0x51),puKow1(Y69d8kC(-0x4d)),'\x5a\x2a\x77\x38\x3f\x30\x60\x69\x7c\x25\x44\x35\x54\x6d\x2c\x41\x26\x57\x40\x3b\x63\x6b\x77\x36',puKow1(0x64),puKow1(Y69d8kC(0x11)),Y69d8kC(-0x4e),'nfJ2U]?SQ&^I|Y:fQ>~d9:&Vb39ze})b%`ZMSM&BD',puKow1(Y69d8kC(-0x47)),puKow1(0x63),'nfJ2U]?SQ&^I|Y:fQ>~d9:&Vb39ze})b%`ZM)',puKow1(0x66),puKow1(Y69d8kC(-0x44)),puKow1(0x44),puKow1(Y69d8kC(0x1d)),puKow1(0x69),puKow1(Y69d8kC(-0x4c)),puKow1(Y69d8kC(0x12)),puKow1(Y69d8kC(-0x48)),puKow1(0x6c),puKow1(Y69d8kC(-0x4b)),puKow1(Y69d8kC(0x13)),puKow1(0x6f),puKow1(Y69d8kC(0x10)),puKow1(0x51),puKow1(0x63),puKow1(Y69d8kC(0x15)),puKow1(Y69d8kC(-0x35)),puKow1(Y69d8kC(-0x4a)),'\x41\x3b\x7c\x6f\x21\x65\x38\x5d',puKow1(0x74),'Vs|o!e8]',puKow1(0x75),puKow1(0x76),puKow1(0x77),'3Et|>',puKow1(0x2c),puKow1(Y69d8kC(-0x50)),puKow1(0x78),puKow1(0x79),puKow1(Y69d8kC(-0x46)),'aH5|~',puKow1(0x65),puKow1(Y69d8kC(-0x4f)),puKow1(Y69d8kC(-0x4f)),puKow1(0x7b),puKow1(0x7c),puKow1(0x60),puKow1(0x5e),puKow1(0x7d),puKow1(0x64),Y69d8kC(-0x4e),puKow1(0x7e),puKow1(0x60),puKow1(0x7f),puKow1(Y69d8kC(-0x4d)),puKow1(Y69d8kC(-0x40)),puKow1(Y69d8kC(0x19)),puKow1(Y69d8kC(-0x4c)),
// 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"])