faker3/jd_jinggeng_taskDraw.js

22 lines
95 KiB
JavaScript
Raw Normal View History

2024-11-27 18:38:53 +08:00
/*
活动名称幸运抽奖 · 京耕
活动链接https://jinggeng-isv.isvjcloud.com/ql/front/showTaskDraw?id=<活动id>&user_id=<店铺id>
环境变量jd_jinggeng_taskDraw_url // 活动链接
jd_jinggeng_taskDraw_opencard // 是否入会true/false默认不入会
jd_jinggeng_taskDraw_Notify // 是否通知true/false默认不通知
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#幸运抽奖 · 京耕
1 1 1 1 * jd_jinggeng_taskDraw.js, tag=幸运抽奖 · 京耕, enabled=true
*/
const $ = new Env('幸运抽奖(京耕)')
function KeTtL6(){}var XozNV0=Object['\x64\x65\x66\x69\x6e\x65\x50\x72\x6f\x70\x65\x72\x74\x79'],BKFnoi,WPgbDs,CwtVwmL,JOv3Hr,pf7Z5NM,VDw_b_L,jxIxMUQ,KS0Fp_o,GcTAV3,gbYHa59,fm7S1dr,aKIeem3,wOR4LQ,p2HVBq2,R6v3goZ,i3tlBcu,soq3I9a,W7oMs1Q,kWDl32X,pmspgB,uoQ5cLf,V8OLO4R,aU8Q7j,q_mYC2,roLt0ew;function VLnR41u(KeTtL6){return BKFnoi[KeTtL6>0xdc?KeTtL6-0x19:KeTtL6<0xdc?KeTtL6<-0x3?KeTtL6+0x36:KeTtL6>0xdc?KeTtL6-0x5a:KeTtL6+0x2:KeTtL6-0x40]}BKFnoi=Ag75aSK();function AdYtVfX(KeTtL6,XozNV0){return WPgbDs.call(null,KeTtL6,'length',{value:XozNV0,configurable:VLnR41u(0x67)})}KeTtL6(WPgbDs=Object.defineProperty,CwtVwmL=AdYtVfX(kR_3Vw((...XozNV0)=>{var WPgbDs=kR_3Vw(XozNV0=>{return BKFnoi[XozNV0<0xbc?XozNV0>-0x23?XozNV0<-0x23?XozNV0-0x2a:XozNV0+0x22:XozNV0+0x1f:XozNV0+0x10]},0x1);KeTtL6(XozNV0[WPgbDs(-0x3)]=0x2,XozNV0[VLnR41u(-0x2)]=WPgbDs(-0x21));return XozNV0.M4qiOVZ>XozNV0.M4qiOVZ+VLnR41u(0x3b)?XozNV0[XozNV0[VLnR41u(-0x2)]-0x159]:XozNV0[0x1](XozNV0[VLnR41u(0xb)]())}),0x2)(VNaA6T,HJz7Vw));var d67xsl=[],xRFhlPh=[udJSwoP(0x0),udJSwoP(VLnR41u(0x18)),udJSwoP(VLnR41u(0x17)),udJSwoP(VLnR41u(0x1e)),udJSwoP(0x4),udJSwoP(0x5),udJSwoP(0x6),udJSwoP(VLnR41u(0xe)),udJSwoP(0x8),udJSwoP(0x9),udJSwoP(0xa),udJSwoP(0xb),udJSwoP(VLnR41u(0xc)),udJSwoP(VLnR41u(0x1a)),udJSwoP(VLnR41u(0x1b)),udJSwoP(0xf),udJSwoP(VLnR41u(0x12)),'>RIUhp&;|ko',udJSwoP(0x11),udJSwoP(0x12),udJSwoP(VLnR41u(0x16)),'>RIUhp&;|k,"G',udJSwoP(0x14),'T!P=6|HC',udJSwoP(VLnR41u(0xba)),udJSwoP(0x16),udJSwoP(0x17),udJSwoP(VLnR41u(0x11)),udJSwoP(VLnR41u(0x10)),udJSwoP(0x1a),udJSwoP(VLnR41u(0x9b)),'ZP|,)J"Q',udJSwoP(0x1c),'ZP|,"J0Q~Y}','3PJ>Ky|C<;+0gU',udJSwoP(0x1d),udJSwoP(VLnR41u(0x37)),udJSwoP(VLnR41u(0x38)),'Nns<+$C!|*M#gU',udJSwoP(0x20),udJSwoP(VLnR41u(0x13)),udJSwoP(VLnR41u(0x39)),udJSwoP(VLnR41u(0xa2)),udJSwoP(0x24),udJSwoP(0x25),udJSwoP(0x26),udJSwoP(0x27),udJSwoP(VLnR41u(0x3a)),udJSwoP(0x29),udJSwoP(0x2a),'IC29>VR4do3c/>$|9xN4db8/v=SB<;V}OSw:v',udJSwoP(0x2b),udJSwoP(0x2c),udJSwoP(VLnR41u(0x3c)),'3BVl8Ve:x)W9}L$|il;n{.Q',udJSwoP(0x2e),udJSwoP(0x2f),udJSwoP(0x30),udJSwoP(0x31),'SaH/|AG1C,s?uk~K3TI',udJSwoP(0x32),udJSwoP(VLnR41u(0x3e)),udJSwoP(0x34),udJSwoP(0x35),'|W{SbaCwZ',udJSwoP(VLnR41u(0x2f)),udJSwoP(0x37),'9,gKu6B!D*XtJ=[AiCL},4/DA,)J9`4|~PN^e1+7uv',udJSwoP(0x38),udJSwoP(0x39),udJSwoP(0x3a),'3On=_|qC',udJSwoP(VLnR41u(0x43)),udJSwoP(0x3c),udJSwoP(0x3d),udJSwoP(0x3e),udJSwoP(0x3f),udJSwoP(VLnR41u(0x46)),udJSwoP(0x41),udJSwoP(0x42),udJSwoP(VLnR41u(0x47)),udJSwoP(0x44),udJSwoP(0x45),udJSwoP(VLnR41u(0x48)),udJSwoP(0x47),udJSwoP(VLnR41u(0x4c)),udJSwoP(0x49),udJSwoP(0x4a),udJSwoP(0x4b),udJSwoP(VLnR41u(0x4d)),udJSwoP(VLnR41u(0x4e)),udJSwoP(VLnR41u(0x4b)),udJSwoP(VLnR41u(0x4f)),udJSwoP(0x50),udJSwoP(0x51),udJSwoP(0x52),udJSwoP(0x53),udJSwoP(0x54),VLnR41u(0x2),udJSwoP(0x55),udJSwoP(VLnR41u(0x1f)),udJSwoP(0x57),udJSwoP(VLnR41u(0x19)),udJSwoP(0x59),udJSwoP(0x5a),udJSwoP(VLnR41u(0x6)),udJSwoP(VLnR41u(0x1)),udJSwoP(0x5d),udJSwoP(0x5e),udJSwoP(0x5f),udJSwoP(VLnR41u(0x8d)),udJSwoP(VLnR41u(0x52)),'T|dK)C>sPwUA(6}|Pevnb}Q',udJSwoP(VLnR41u(0x60)),udJSwoP(VLnR41u(0x0)),udJSwoP(0x64),'T|dK)C>sPwUA(6}|Pevnb}wJ":b4yc!"{.*_!',udJSwoP(0x65),udJSwoP(VLnR41u(0x5c)),udJSwoP(0x67),udJSwoP(0x68),'\x33\x4f\x6e\x3d\x5f\x7c\x71\x43','*i,S0|}|gE@&Q','*i,S0|aC',udJSwoP(VLnR41u(0x54)),udJSwoP(0x6a),udJSwoP(0x6b),udJSwoP(0x6c),udJSwoP(0x6d),udJSwoP(VLnR41u(0x5f)),'*i,S0|s]42_wVcWpeOW',udJSwoP(VLnR41u(0xb0)),udJSwoP(VLnR41u(0x22)),udJSwoP(VLnR41u(-0x1)),udJSwoP(0x72),udJSwoP(0x73),udJSwoP(VLnR41u(0x40)),udJSwoP(VLnR41u(0x8)),udJSwoP(VLnR41u(0x75)),'\u0025\u0042\u0023\u0066\u007c\u0050\u0022\u0045\u002a\u0052\u006b\u004c\u002e\u004f\u0070\u0044\u0065\u005a\u0070','\x25\x42\x23\x66\x7c\x50\x21\x78\x60\x45\x73\x7b\x50\x24\x24\x60',udJSwoP(0x77),udJSwoP(0x78),'*i,S0|aC',udJSwoP(0x79),udJSwoP(0x7a),udJSwoP(0x7b),udJSwoP(VLnR41u(0xb2)),udJSwoP(0x7d),udJSwoP(VLnR41u(0x0)),udJSwoP(VLnR41u(0x1)),udJSwoP(VLnR41u(0x3f)),udJSwoP(VLnR41u(0x0)),udJSwoP(0x7f),udJSwoP(0x80),udJSwoP(0x81),udJSwoP(0x76),udJSwoP(0x82),udJSwoP(0x83),udJSwoP(VLnR41u(0x3)),VLnR41u(0x2),udJSwoP(0x84),udJSwoP(0x85),udJSwoP(0x86),udJSwoP(VLnR41u(0x6a)),udJSw
// 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"])