2023-10-24 01:14:23 +08:00
|
|
|
|
/*
|
|
|
|
|
10.24-10.31 预售来袭 多重好礼
|
|
|
|
|
开卡脚本,一次性脚本
|
|
|
|
|
|
|
|
|
|
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
|
|
|
|
|
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
|
|
|
|
|
//export opencard_draw="3" //抽奖次数 3
|
|
|
|
|
————————————————
|
|
|
|
|
入口:[ 10.24-10.31 预售来袭 多重好礼 ]
|
|
|
|
|
|
|
|
|
|
请求太频繁会被黑ip
|
|
|
|
|
请更换IP后再执行脚本
|
|
|
|
|
cron:11 11 11 11 *
|
|
|
|
|
============Quantumultx===============
|
|
|
|
|
[task_local]
|
|
|
|
|
#10.24-10.31 预售来袭 多重好礼
|
|
|
|
|
11 11 11 11 * jd_opencardL339.js, tag=10.24-10.31 预售来袭 多重好礼, enabled=true
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
const $ = new Env('10.24-10.31 预售来袭 多重好礼')
|
2023-10-24 11:50:24 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const lIi1lii1=lI1Ii1lI;function lI1Ii1lI(_0x504d9f,_0x2e7de3){const _0x530867=lIil1Il();return lI1Ii1lI=function(_0x4ea17e,_0x125a31){_0x4ea17e=_0x4ea17e-0x123;let _0x117c70=_0x530867[_0x4ea17e];if(lI1Ii1lI['ckNdph']===undefined){var _0x352553=function(_0x310a50){const _0x569bcd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x67229f='',_0xc1be4f='';for(let _0x1a8024=0x0,_0x2330d5,_0xd5f896,_0x1f7052=0x0;_0xd5f896=_0x310a50['charAt'](_0x1f7052++);~_0xd5f896&&(_0x2330d5=_0x1a8024%0x4?_0x2330d5*0x40+_0xd5f896:_0xd5f896,_0x1a8024++%0x4)?_0x67229f+=String['fromCharCode'](0xff&_0x2330d5>>(-0x2*_0x1a8024&0x6)):0x0){_0xd5f896=_0x569bcd['indexOf'](_0xd5f896);}for(let _0x540701=0x0,_0x10723b=_0x67229f['length'];_0x540701<_0x10723b;_0x540701++){_0xc1be4f+='%'+('00'+_0x67229f['charCodeAt'](_0x540701)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc1be4f);};const _0x240a0d=function(_0x5a81df,_0x33387f){let _0x2363cc=[],_0xc1938e=0x0,_0xee107d,_0x1fa874='';_0x5a81df=_0x352553(_0x5a81df);let _0x2dde53;for(_0x2dde53=0x0;_0x2dde53<0x100;_0x2dde53++){_0x2363cc[_0x2dde53]=_0x2dde53;}for(_0x2dde53=0x0;_0x2dde53<0x100;_0x2dde53++){_0xc1938e=(_0xc1938e+_0x2363cc[_0x2dde53]+_0x33387f['charCodeAt'](_0x2dde53%_0x33387f['length']))%0x100,_0xee107d=_0x2363cc[_0x2dde53],_0x2363cc[_0x2dde53]=_0x2363cc[_0xc1938e],_0x2363cc[_0xc1938e]=_0xee107d;}_0x2dde53=0x0,_0xc1938e=0x0;for(let _0x28e1b8=0x0;_0x28e1b8<_0x5a81df['length'];_0x28e1b8++){_0x2dde53=(_0x2dde53+0x1)%0x100,_0xc1938e=(_0xc1938e+_0x2363cc[_0x2dde53])%0x100,_0xee107d=_0x2363cc[_0x2dde53],_0x2363cc[_0x2dde53]=_0x2363cc[_0xc1938e],_0x2363cc[_0xc1938e]=_0xee107d,_0x1fa874+=String['fromCharCode'](_0x5a81df['charCodeAt'](_0x28e1b8)^_0x2363cc[(_0x2363cc[_0x2dde53]+_0x2363cc[_0xc1938e])%0x100]);}return _0x1fa874;};lI1Ii1lI['GIXuct']=_0x240a0d,_0x504d9f=arguments,lI1Ii1lI['ckNdph']=!![];}const _0x52ee5f=_0x530867[0x0],_0x9690d4=_0x4ea17e+_0x52ee5f,_0x3c6588=_0x504d9f[_0x9690d4];return!_0x3c6588?(lI1Ii1lI['kLVUvK']===undefined&&(lI1Ii1lI['kLVUvK']=!![]),_0x117c70=lI1Ii1lI['GIXuct'](_0x117c70,_0x125a31),_0x504d9f[_0x9690d4]=_0x117c70):_0x117c70=_0x3c6588,_0x117c70;},lI1Ii1lI(_0x504d9f,_0x2e7de3);}(function(ii1Iil1,illi1il,II1iIil,iI111Ii1,l1lIIll1,IIlIi11I,ilil1ili){return ii1Iil1=ii1Iil1>>0x8,IIlIi11I='hs',ilil1ili='hs',function(li1lI1I,lliliilI,IIIiii11,lIlIIIiI,I1I1I){const Iilli11=lI1Ii1lI;lIlIIIiI='tfi',IIlIi11I=lIlIIIiI+IIlIi11I,I1I1I='up',ilil1ili+=I1I1I,IIlIi11I=IIIiii11(IIlIi11I),ilil1ili=IIIiii11(ilil1ili),IIIiii11=0x0;const ilIiiIi1=li1lI1I();while(!![]&&--iI111Ii1+lliliilI){try{lIlIIIiI=-parseInt(Iilli11(0x453,'v*l('))/0x1*(-parseInt(Iilli11(0x127,'JKEh'))/0x2)+-parseInt(Iilli11(0x662,'aDck'))/0x3*(parseInt(Iilli11(0x4a4,'y3rA'))/0x4)+-parseInt(Iilli11(0x44b,'JKEh'))/0x5+parseInt(Iilli11(0x5d7,'jcrD'))/0x6*(-parseInt(Iilli11(0x610,'IGeG'))/0x7)+-parseInt(Iilli11(0x2ae,'wYeP'))/0x8+-parseInt(Iilli11(0x1c7,'g*Y^'))/0x9+-parseInt(Iilli11(0x351,'pmo6'))/0xa*(-parseInt(Iilli11(0x5d1,'2nl)'))/0xb);}catch(I1il11II){lIlIIIiI=IIIiii11;}finally{I1I1I=ilIiiIi1[IIlIi11I]();if(ii1Iil1<=iI111Ii1)IIIiii11?l1lIIll1?lIlIIIiI=I1I1I:l1lIIll1=I1I1I:IIIiii11=I1I1I;else{if(IIIiii11==l1lIIll1['replace'](/[YCNfkGqHMKXwtIpJFW=]/g,'')){if(lIlIIIiI===lliliilI){ilIiiIi1['un'+IIlIi11I](I1I1I);break;}ilIiiIi1[ilil1ili](I1I1I);}}}}}(II1iIil,illi1il,function(lll1Iill,IlIlI1ll,lilI1liI,lli11I,llIlIIii,i11I1I11,IiiIiil1){return IlIlI1ll='\x73\x70\x6c\x69\x74',lll1Iill=arguments[0x0],lll1Iill=lll1Iill[IlIlI1ll](''),lilI1liI=`\x72\x65\x76\x65\x72\x73\x65`,lll1Iill=lll1Iill[lilI1liI]('\x76'),lli11I=`\x6a\x6f\x69\x6e`,(0x144293,lll1Iill[lli11I](''));});}(0xc500,0x90204,lIil1Il,0xc7),lIil1Il)&&(version_=lIil1Il);const i1IllII=$[lIi1lii1(0x1ec,'$6XR')]()?require(lIi1lii1(0x234,'y0A7')):'',il1I111l=$['isNode']()?require(lIi1lii1(0x32c,'JKEh')):'';let I1iii1I1=$[lIi1lii1(0x1d4,'pmo6')]()?process[lIi1lii1(0x239,'wYeP')][lIi1lii1(0x2ab,'%*u7')]?process[lIi1lii1(0x189,'1y2m')][lIi1lii1(0x690,'wYeP')]:'0':$['getdata'](lIi1lii1(0x619,'2nl)'))?$[lIi1lii1(0x2ca,'C
|
2023-10-24 01:14:23 +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"])
|