mirror of https://github.com/KingRan/KR.git
32 lines
152 KiB
JavaScript
32 lines
152 KiB
JavaScript
|
/*
|
|||
|
活动名称:店铺抽奖 · 超级无线
|
|||
|
活动链接:https://lzkj-isv.isvjcloud.com/lzclient/<活动id>/cjwx/common/entry.html?activityId=<活动id>&gameType=<玩法类型>
|
|||
|
https://lzkj-isv.isvjcloud.com/wxDrawActivity/activity/activity?activityId=<活动id>
|
|||
|
https://cjhy-isv.isvjcloud.com/wxDrawActivity/activity/activity?activityId=<活动id>
|
|||
|
环境变量:LUCK_DRAW_URL // 活动链接
|
|||
|
LUCK_DRAW_OPENCARD // 是否开卡,默认不开卡
|
|||
|
LUCK_DRAW_NOTIFY // 是否推送通知,默认不推送 抽中才会推送,空气不推送
|
|||
|
LUCK_DRAW_NUM //运行账号数量,默认运行前7
|
|||
|
LUCK_DRAW_WAIT // 账号间延迟,默认 3秒
|
|||
|
LUCK_DRAW_Number // 连续无次数跳出,默认 5 次,火爆账号请设置黑名单,否则也会占用次数
|
|||
|
LUCK_DRAW_BLACKLIST 黑名单 用&隔开 pin值
|
|||
|
JD_LZ_OPEN // 是否开启LZ活动运行,默认运行
|
|||
|
JD_CJ_OPEN // 是否开启CJ活动运行,默认运行
|
|||
|
|
|||
|
只有在没有抽奖次数的情况下才会去做任务获取
|
|||
|
|
|||
|
2023/3/19 连续无次数跳出,默认 5 次,火爆账号请设置黑名单,否则也会占用次数
|
|||
|
|
|||
|
cron:1 1 1 1 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#店铺抽奖通用活动-加密
|
|||
|
1 1 1 1 * jd_luck_draw.js, tag=店铺抽奖通用活动-加密, enabled=true
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env("店铺抽奖通用活动-加密");
|
|||
|
|
|||
|
var version_='jsjiami.com.v7';const iIl1il=iii1II;(function(Iil11l,iI1iii,iI1iil,lIIIIl,l1iI,II111i,Illill){return Iil11l=Iil11l>>0x8,II111i='hs',Illill='hs',function(II111l,I1Iil,i1iiii,i1iiil,I11iiI){const Iiil11=iii1II;i1iiil='tfi',II111i=i1iiil+II111i,I11iiI='up',Illill+=I11iiI,II111i=i1iiii(II111i),Illill=i1iiii(Illill),i1iiii=0x0;const I1Iii=II111l();while(!![]&&--lIIIIl+I1Iil){try{i1iiil=parseInt(Iiil11(0x1db,'2CwY'))/0x1*(-parseInt(Iiil11(0x41d,'(7bS'))/0x2)+-parseInt(Iiil11(0x2e4,'7Gz9'))/0x3*(-parseInt(Iiil11(0x374,'ciHL'))/0x4)+parseInt(Iiil11(0x33c,'(7bS'))/0x5+-parseInt(Iiil11(0x68c,'xINY'))/0x6*(parseInt(Iiil11(0x2e7,'Ld@a'))/0x7)+-parseInt(Iiil11(0x270,'iGHZ'))/0x8*(-parseInt(Iiil11(0x4e2,'7Gz9'))/0x9)+parseInt(Iiil11(0x7bb,'Cviq'))/0xa*(-parseInt(Iiil11(0x49d,'I^)8'))/0xb)+parseInt(Iiil11(0x2b4,'[KWL'))/0xc*(parseInt(Iiil11(0x194,'pZPf'))/0xd);}catch(I1IlI){i1iiil=i1iiii;}finally{I11iiI=I1Iii[II111i]();if(Iil11l<=lIIIIl)i1iiii?l1iI?i1iiil=I11iiI:l1iI=I11iiI:i1iiii=I11iiI;else{if(i1iiii==l1iI['replace'](/[MHAeUOfQIupPXKxErNnCGLD=]/g,'')){if(i1iiil===I1Iil){I1Iii['un'+II111i](I11iiI);break;}I1Iii[Illill](I11iiI);}}}}}(iI1iil,iI1iii,function(ii11I1,IillI1,ili1ll,iIl1ii,I1l1il,lii1II,ili1li){return IillI1='\x73\x70\x6c\x69\x74',ii11I1=arguments[0x0],ii11I1=ii11I1[IillI1](''),ili1ll='\x72\x65\x76\x65\x72\x73\x65',ii11I1=ii11I1[ili1ll]('\x76'),iIl1ii='\x6a\x6f\x69\x6e',(0x136384,ii11I1[iIl1ii](''));});}(0xc600,0xec5cf,Iii11l,0xc8),Iii11l)&&(version_=Iii11l);const iIl11l=$[iIl1il(0x333,'pRv6')]()?require(iIl1il(0x3ee,'iGHZ')):'',I1ii=$[iIl1il(0x35e,'iGHZ')]()?require(iIl1il(0x4ac,'UmY&')):'',I1il=require(iIl1il(0x41a,'8%&B')),I1Iiil=require(iIl1il(0x55b,'L4lP')),I1Iiii=require(iIl1il(0x763,'bHBP')),lIIliI=require(iIl1il(0x547,'pRv6'));let IiI111=process[iIl1il(0x24e,'tLLo')][iIl1il(0x565,'pZPf')]?process[iIl1il(0xfb,'zmvb')][iIl1il(0x61b,'pRv6')]:'',i11llI=process['env'][iIl1il(0x1b3,'iGHZ')]?process[iIl1il(0x7c4,'xINY')][iIl1il(0x574,'2G3u')]:iIl1il(0x1bd,'8%&B'),iIIi1=process[iIl1il(0x20a,'mz%p')]['LUCK_DRAW_OPENCARD']?process[iIl1il(0x77a,'x4@7')][iIl1il(0x2d9,'Ld@a')]:'false';const iIiIIl=process['env'][iIl1il(0x3ea,'yAJ)')]?process[iIl1il(0x59f,'n)jo')]['WX_ADDRESS']:'',iIiIIi=process[iIl1il(0x118,']els')][iIl1il(0x49c,'ciHL')]?process['env'][iIl1il(0x502,'vqxW')]:'';let IlIill=0x7;process['env'][iIl1il(0x29e,'UmY&')]&&process[iIl1il(0x59f,'n)jo')][iIl1il(0xc7,'$Jm8')]!=0x7&&(IlIill=process['env'][iIl1il(0x666,'8%&B')]);let iiI1I1=process[iIl1il(0x354,'L4lP')][iIl1il(0x3b3,'rmgl')]?process[iIl1il(0x774,'3iz]')][iIl1il(0x146,'Dy7Y')]:'3',IlIili=process[iIl1il(0x412,'wBFa')]['LUCK_DRAW_Number']?process[iIl1il(0x6ba,')KoW')][iIl1il(0x46a,'J^gC')]:'5',I1iI=!![],I1IiiI={},iI1i11='',lIIli1=[],iIl11i='',i11ll1='',iIiIII='';messageTitle='';if($[iIl1il(0x70e,'S3C[')]()){if(JSON['stringify'](process[iIl1il(0x77a,'x4@7')])[iIl1il(0x252,'(7bS')]('GITHUB')>-0x1)process['exit'](0x0);Object[iIl1il(0x528,'tLLo')](I1ii)[iIl1il(0x4a4,'Cviq')](iI11i=>{const IlI1II=iIl1il;lIIli1[IlI1II(0x134,'bHBP')](I1ii[iI11i]);});if(process[iIl1il(0x7ae,'ciHL')]['JD_DEBUG']&&process[iIl1il(0x51a,'I^)8')][iIl1il(0x110,'iGHZ')]===iIl1il(0x181,'mz%p'))console['log']=()=>{};}else lIIli1=[$[iIl1il(0x537,'$8xj')](iIl1il(0x6db,'CAj]')),$['getdata'](iIl1il(0x408,'I^)8')),...$['toObj']($[iIl1il(0x4e3,']els')](iIl1il(0x301,'zmvb'))||'[]')['map'](I1Iili=>I1Iili[iIl1il(0x358,'5(h7')])][iIl1il(0x317,'w&s[')](ilIIII=>!!ilIIII);let I1lI=process[iIl1il(0x5fe,'UmY&')][iIl1il(0x438,'x4@7')]?process[iIl1il(0x7ae,'ciHL')][iIl1il(0x645,'(7bS')]:iIl1il(0x5e7,'tLLo'),iIlIl=process[iIl1il(0x6ba,')KoW')][iIl1il(0x563,')KoW')]?process[iIl1il(0x51a,'I^)8')][iIl1il(0x724,'UmY&')]:iIl1il(0x2e3,'ciHL'),iIlIi='',iIl111='';$[iIl1il(0x6ac,'Sha#')]=process[iIl1il(0x341,'8%&B')]['LUCK_DRAW_WHITELIST']||iIlIi,$[iIl1il(0x468,'9qLb')]=process[iIl1il(0x2cb,'%b%^')][iIl1il(0x722,'oXIa')]||iIl111,i11li1(),lIIlll();if(IiI111){const I1li=iIl1il(0x526,'bHBP')[iIl1il(0x22b,'wBFa')]('|');let iIllIi=0x0;while(!![]){switch(I1li[iIllIi++]){case'0':if($[iIl1il(0x38f,'bHBP')]==null){consol
|
|||
|
|
|||
|
// 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"])
|