2023-07-27 16:14:01 +08:00
|
|
|
|
/*
|
|
|
|
|
入会开卡领取礼包(通用)
|
|
|
|
|
|
|
|
|
|
VENDER_ID // venderId或vendorId的值,多个用&、@或逗号连接,但是不要混用
|
2023-10-22 11:05:48 +08:00
|
|
|
|
OPENCARD_BEAN="" 最小入会值 (默认2)
|
2023-07-27 16:14:01 +08:00
|
|
|
|
OPENCARD_QZ="true" 填写此变量强制开卡,不填写不开启
|
|
|
|
|
|
|
|
|
|
cron:11 11 11 11 *
|
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
|
|
|
|
#入会开卡领取礼包(通用)
|
|
|
|
|
11 11 11 11 * jd_OpenCard_Force.js, tag=入会开卡领取礼包(通用), enabled=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('入会开卡领取礼包');
|
|
|
|
|
|
2023-10-22 11:05:48 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const i1iilI1=lII11Ii;(function(li11l1Il,lI1Ilil1,ill1llIl,iliIi1l,l1111iII,Il11ili1,I1Iilil1){return li11l1Il=li11l1Il>>0x4,Il11ili1='hs',I1Iilil1='hs',function(iiil1II1,liilil11,ll1IIiII,ilIi11lI,lIll1Iil){const I11IIl1i=lII11Ii;ilIi11lI='tfi',Il11ili1=ilIi11lI+Il11ili1,lIll1Iil='up',I1Iilil1+=lIll1Iil,Il11ili1=ll1IIiII(Il11ili1),I1Iilil1=ll1IIiII(I1Iilil1),ll1IIiII=0x0;const li1lI1lI=iiil1II1();while(!![]&&--iliIi1l+liilil11){try{ilIi11lI=-parseInt(I11IIl1i(0x1f7,'&83('))/0x1+parseInt(I11IIl1i(0x2d9,'un&t'))/0x2*(-parseInt(I11IIl1i(0x2bc,'[kLa'))/0x3)+parseInt(I11IIl1i(0x2db,'xZHu'))/0x4*(parseInt(I11IIl1i(0x18d,')p2I'))/0x5)+-parseInt(I11IIl1i(0x29c,'fgu#'))/0x6*(-parseInt(I11IIl1i(0x1ab,'wjat'))/0x7)+parseInt(I11IIl1i(0x2a5,'1l$b'))/0x8*(-parseInt(I11IIl1i(0x2c8,'9@ZW'))/0x9)+parseInt(I11IIl1i(0x2b9,'ua2T'))/0xa*(-parseInt(I11IIl1i(0x20a,'aJ@M'))/0xb)+-parseInt(I11IIl1i(0x174,'5JmL'))/0xc*(-parseInt(I11IIl1i(0x2df,'aA5^'))/0xd);}catch(IIliIlll){ilIi11lI=ll1IIiII;}finally{lIll1Iil=li1lI1lI[Il11ili1]();if(li11l1Il<=iliIi1l)ll1IIiII?l1111iII?ilIi11lI=lIll1Iil:l1111iII=lIll1Iil:ll1IIiII=lIll1Iil;else{if(ll1IIiII==l1111iII['replace'](/[NCGtrTlQhySOYIXFdeMDp=]/g,'')){if(ilIi11lI===liilil11){li1lI1lI['un'+Il11ili1](lIll1Iil);break;}li1lI1lI[I1Iilil1](lIll1Iil);}}}}}(ill1llIl,lI1Ilil1,function(iil1IiI,ii1IIIii,I1l1IlI1,liIiIlIi,Ii1lIii1,llIilli,i1I1lI1l){return ii1IIIii='\x73\x70\x6c\x69\x74',iil1IiI=arguments[0x0],iil1IiI=iil1IiI[ii1IIIii](''),I1l1IlI1=`\x72\x65\x76\x65\x72\x73\x65`,iil1IiI=iil1IiI[I1l1IlI1]('\x76'),liIiIlIi=`\x6a\x6f\x69\x6e`,(0x143d49,iil1IiI[liIiIlIi](''));});}(0xbe0,0xe243d,iiIllI,0xc0),iiIllI)&&(version_=iiIllI);const lliii=$[i1iilI1(0x158,'jYId')]()?require(i1iilI1(0x29d,'jYId')):'',ililillI=require(i1iilI1(0x254,'64GY')),II1liiii=require(i1iilI1(0x166,'(U6k')),ii1I11Il=require(i1iilI1(0x228,'un&t')),l111I1Il=process[i1iilI1(0x203,'1l$b')]['OPENCARD_BEAN']||'2',Ill11I11=process[i1iilI1(0x1cc,'yIV8')][i1iilI1(0x1c1,'&83(')]===i1iilI1(0x1e8,'a1G#')?!![]:![];let l1iI1lI=[];if(process[i1iilI1(0x190,'[kLa')][i1iilI1(0x2d2,'qFTQ')]){if(process['env']['VENDER_ID']['indexOf']('&')>-0x1)l1iI1lI=process[i1iilI1(0x1a9,'y)Iy')][i1iilI1(0x159,'*RJ^')]['split']('&');else{if(process[i1iilI1(0x2c1,'81AG')][i1iilI1(0x28f,'x*6B')]['indexOf']('@')>-0x1)l1iI1lI=process[i1iilI1(0x267,'s1#z')][i1iilI1(0x16a,'1l$b')][i1iilI1(0x211,'x*6B')]('@');else process['env'][i1iilI1(0x220,'81AG')][i1iilI1(0x2e2,'aA5^')](',')>-0x1?l1iI1lI=process['env'][i1iilI1(0x2b4,'ua2T')][i1iilI1(0x1e5,'mIas')](','):l1iI1lI=[process[i1iilI1(0x203,'1l$b')]['VENDER_ID']];}}let il1lIIll=[],l1iliiIl='';function lII11Ii(_0x958ea8,_0x551996){const _0x2a1a06=iiIllI();return lII11Ii=function(_0x18c5e4,_0x3c545d){_0x18c5e4=_0x18c5e4-0x153;let _0xfae47d=_0x2a1a06[_0x18c5e4];if(lII11Ii['MvVVnX']===undefined){var _0x2b0675=function(_0x2effac){const _0x475907='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31fda7='',_0x82a84d='';for(let _0xdfeab2=0x0,_0x237ff8,_0x1bd3cb,_0x5b8699=0x0;_0x1bd3cb=_0x2effac['charAt'](_0x5b8699++);~_0x1bd3cb&&(_0x237ff8=_0xdfeab2%0x4?_0x237ff8*0x40+_0x1bd3cb:_0x1bd3cb,_0xdfeab2++%0x4)?_0x31fda7+=String['fromCharCode'](0xff&_0x237ff8>>(-0x2*_0xdfeab2&0x6)):0x0){_0x1bd3cb=_0x475907['indexOf'](_0x1bd3cb);}for(let _0x169466=0x0,_0x293d1f=_0x31fda7['length'];_0x169466<_0x293d1f;_0x169466++){_0x82a84d+='%'+('00'+_0x31fda7['charCodeAt'](_0x169466)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x82a84d);};const _0x4df999=function(_0x92429c,_0x509693){let _0x190d72=[],_0x59c297=0x0,_0x41576a,_0x7d0a07='';_0x92429c=_0x2b0675(_0x92429c);let _0x4e979e;for(_0x4e979e=0x0;_0x4e979e<0x100;_0x4e979e++){_0x190d72[_0x4e979e]=_0x4e979e;}for(_0x4e979e=0x0;_0x4e979e<0x100;_0x4e979e++){_0x59c297=(_0x59c297+_0x190d72[_0x4e979e]+_0x509693['charCodeAt'](_0x4e979e%_0x509693['length']))%0x100,_0x41576a=_0x190d72[_0x4e979e],_0x190d72[_0x4e979e]=_0x190d72[_0x59c297],_0x190d72[_0x59c297]=_0x41576a;}_0x4e979e=0x0,_0x59c297=0x0;for(let _0x5374d5=0x0;_0x5374d5<_0x92429c['length'];_0x5374d5++)
|
2023-07-27 16:14:01 +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"])
|