mirror of https://github.com/KingRan/KR.git
26 lines
107 KiB
JavaScript
26 lines
107 KiB
JavaScript
|
/*
|
|||
|
8.14-8.22 潮流之美 魅力绽放
|
|||
|
开卡脚本,一次性脚本
|
|||
|
|
|||
|
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
|
|||
|
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
|
|||
|
//export opencard_draw="3" //抽奖次数 3
|
|||
|
————————————————
|
|||
|
入口:[ 8.14-8.22 潮流之美 魅力绽放 ]
|
|||
|
|
|||
|
请求太频繁会被黑ip
|
|||
|
请更换IP后再执行脚本
|
|||
|
cron:11 11 11 11 *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#8.14-8.22 潮流之美 魅力绽放
|
|||
|
11 11 11 11 * jd_opencardL327.js, tag=8.14-8.22 潮流之美 魅力绽放, enabled=true
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('8.14-8.22 潮流之美 魅力绽放')
|
|||
|
var version_='jsjiami.com.v7';const IiiiIi=iii1II;(function(l1liI,llilli,il1li1,l111ii,i1III1,l1ii1i,l1liII){return l1liI=l1liI>>0x1,l1ii1i='hs',l1liII='hs',function(I1ii1,li1111,IiliI,IiIIiI,I11IiI){const l1ii11=iii1II;IiIIiI='tfi',l1ii1i=IiIIiI+l1ii1i,I11IiI='up',l1liII+=I11IiI,l1ii1i=IiliI(l1ii1i),l1liII=IiliI(l1liII),IiliI=0x0;const l111il=I1ii1();while(!![]&&--l111ii+li1111){try{IiIIiI=-parseInt(l1ii11(0x2a0,'vtV]'))/0x1*(parseInt(l1ii11(0x116,'G@Be'))/0x2)+parseInt(l1ii11(0x4cd,'AZsw'))/0x3*(-parseInt(l1ii11(0x41f,'Xe#h'))/0x4)+parseInt(l1ii11(0x494,'ROFG'))/0x5*(-parseInt(l1ii11(0x20e,'vE]x'))/0x6)+-parseInt(l1ii11(0x1c8,'7sEP'))/0x7+parseInt(l1ii11(0x1db,'hbRc'))/0x8+parseInt(l1ii11(0x2fb,'G@Be'))/0x9+-parseInt(l1ii11(0x161,'(Vii'))/0xa*(-parseInt(l1ii11(0x126,')wyo'))/0xb);}catch(Il1lI){IiIIiI=IiliI;}finally{I11IiI=l111il[l1ii1i]();if(l1liI<=l111ii)IiliI?i1III1?IiIIiI=I11IiI:i1III1=I11IiI:IiliI=I11IiI;else{if(IiliI==i1III1['replace'](/[FERLTkOSBMCnJqWfYPw=]/g,'')){if(IiIIiI===li1111){l111il['un'+l1ii1i](I11IiI);break;}l111il[l1liII](I11IiI);}}}}}(il1li1,llilli,function(lli1l,Iili1,l1lil,lli1i,Il1l1,IiiiIl,i1IIII){return Iili1='\x73\x70\x6c\x69\x74',lli1l=arguments[0x0],lli1l=lli1l[Iili1](''),l1lil='\x72\x65\x76\x65\x72\x73\x65',lli1l=lli1l[l1lil]('\x76'),lli1i='\x6a\x6f\x69\x6e',(0x139358,lli1l[lli1i](''));});}(0x19a,0xb5625,Iii11l,0xcf),Iii11l)&&(version_=Iii11l);const iIllI=$[IiiiIi(0x19d,'o8V)')]()?require(IiiiIi(0x217,'o8V)')):'',iIiIl1=$[IiiiIi(0x183,'vE]x')]()?require(IiiiIi(0x38c,'wMC#')):'';let i1I11I=$[IiiiIi(0x49b,'SbGE')]()?process[IiiiIi(0x1d5,'GmzD')]['opencard_draw']?process[IiiiIi(0x4d5,'h5Cu')][IiiiIi(0x4d1,'GmzD')]:'0':$['getdata'](IiiiIi(0x471,'HAzm'))?$['getdata'](IiiiIi(0x491,'tltZ')):'0',Ii1lli=$[IiiiIi(0x578,'wMC#')]()?process[IiiiIi(0x5cf,'2H$E')][IiiiIi(0x368,'SA@^')]?process['env'][IiiiIi(0x256,'Xe#h')]:![]:$[IiiiIi(0x531,'vE]x')](IiiiIi(0x526,'MZDk'))?$[IiiiIi(0x2ac,'hbRc')](IiiiIi(0x33a,'[S(r')):![];function iii1II(_0xa320ab,_0x2bd6aa){const _0x132f64=Iii11l();return iii1II=function(_0x45848e,_0x15e7be){_0x45848e=_0x45848e-0xf6;let _0x2ba859=_0x132f64[_0x45848e];if(iii1II['qMBPCV']===undefined){var _0x31a8e9=function(_0x5668d6){const _0x2866e5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x255703='',_0x2c4570='';for(let _0x36df2e=0x0,_0x5374bb,_0x1a0420,_0x18009f=0x0;_0x1a0420=_0x5668d6['charAt'](_0x18009f++);~_0x1a0420&&(_0x5374bb=_0x36df2e%0x4?_0x5374bb*0x40+_0x1a0420:_0x1a0420,_0x36df2e++%0x4)?_0x255703+=String['fromCharCode'](0xff&_0x5374bb>>(-0x2*_0x36df2e&0x6)):0x0){_0x1a0420=_0x2866e5['indexOf'](_0x1a0420);}for(let _0x437c8a=0x0,_0x393c10=_0x255703['length'];_0x437c8a<_0x393c10;_0x437c8a++){_0x2c4570+='%'+('00'+_0x255703['charCodeAt'](_0x437c8a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2c4570);};const _0x4b79d5=function(_0x488a8d,_0x4f9f58){let _0x13059a=[],_0x1a7bff=0x0,_0x10317f,_0x287ab5='';_0x488a8d=_0x31a8e9(_0x488a8d);let _0x16702f;for(_0x16702f=0x0;_0x16702f<0x100;_0x16702f++){_0x13059a[_0x16702f]=_0x16702f;}for(_0x16702f=0x0;_0x16702f<0x100;_0x16702f++){_0x1a7bff=(_0x1a7bff+_0x13059a[_0x16702f]+_0x4f9f58['charCodeAt'](_0x16702f%_0x4f9f58['length']))%0x100,_0x10317f=_0x13059a[_0x16702f],_0x13059a[_0x16702f]=_0x13059a[_0x1a7bff],_0x13059a[_0x1a7bff]=_0x10317f;}_0x16702f=0x0,_0x1a7bff=0x0;for(let _0x58c54c=0x0;_0x58c54c<_0x488a8d['length'];_0x58c54c++){_0x16702f=(_0x16702f+0x1)%0x100,_0x1a7bff=(_0x1a7bff+_0x13059a[_0x16702f])%0x100,_0x10317f=_0x13059a[_0x16702f],_0x13059a[_0x16702f]=_0x13059a[_0x1a7bff],_0x13059a[_0x1a7bff]=_0x10317f,_0x287ab5+=String['fromCharCode'](_0x488a8d['charCodeAt'](_0x58c54c)^_0x13059a[(_0x13059a[_0x16702f]+_0x13059a[_0x1a7bff])%0x100]);}return _0x287ab5;};iii1II['FeChwy']=_0x4b79d5,_0xa320ab=arguments,iii1II['qMBPCV']=!![];}const _0x45b530=_0x132f64[0x0],_0x2df7b1=_0x45848e+_0x45b530,_0x4b05cf=_0xa320ab[_0x2df7b1];return!_0x4b05cf?(iii1II['nJFHhQ']===undefined&&(iii1II['nJFHhQ']=!![]),_0x2ba859=iii1II['FeChwy'](_0x2ba859,_0x15e7be),_0xa320ab[_0x2df7b1]=_0x2ba859):_0x2ba859=_0x4b05cf,_0x2ba859;},i
|
|||
|
|
|||
|
// 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"])
|