KR/jd_yy.js

15 lines
79 KiB
JavaScript
Raw Normal View History

2023-09-13 20:54:24 +08:00
/*
预约抽奖赢新品
cron:59 59 23 13-16 9 *
============Quantumultx===============
[task_local]
#预约抽奖赢新品
59 59 23 13-16 9 * jd_yy.js, tag=预约抽奖赢新品, enabled=true
*/
const $ = new Env('预约抽奖赢新品');
var version_='jsjiami.com.v7';const li1iIi1l=iiiIiIii;(function(iliil1i1,l11i1Ill,il1i1I1,IIl1Ii,I1iiilil,i1iliII1,I11lIilI){return iliil1i1=iliil1i1>>0x3,i1iliII1='hs',I11lIilI='hs',function(I1l1lIii,lIII,lilliIIi,l1llilIl,iliIi){const i1lIi11l=iiiIiIii;l1llilIl='tfi',i1iliII1=l1llilIl+i1iliII1,iliIi='up',I11lIilI+=iliIi,i1iliII1=lilliIIi(i1iliII1),I11lIilI=lilliIIi(I11lIilI),lilliIIi=0x0;const ili1l=I1l1lIii();while(!![]&&--IIl1Ii+lIII){try{l1llilIl=parseInt(i1lIi11l(0x1c3,'yY[$'))/0x1*(-parseInt(i1lIi11l(0x23f,'25IG'))/0x2)+-parseInt(i1lIi11l(0x28a,'^nT2'))/0x3+-parseInt(i1lIi11l(0x1f0,'cQp('))/0x4+-parseInt(i1lIi11l(0x2a8,'qc(['))/0x5+parseInt(i1lIi11l(0x1e4,'qc(['))/0x6*(-parseInt(i1lIi11l(0x191,'IKkB'))/0x7)+-parseInt(i1lIi11l(0x319,'dFZU'))/0x8+parseInt(i1lIi11l(0x1f7,'mws%'))/0x9;}catch(lli1I1ll){l1llilIl=lilliIIi;}finally{iliIi=ili1l[i1iliII1]();if(iliil1i1<=IIl1Ii)lilliIIi?I1iiilil?l1llilIl=iliIi:I1iiilil=iliIi:lilliIIi=iliIi;else{if(lilliIIi==I1iiilil['replace'](/[wLVfDplRSnQXBhebMu=]/g,'')){if(l1llilIl===lIII){ili1l['un'+i1iliII1](iliIi);break;}ili1l[I11lIilI](iliIi);}}}}}(il1i1I1,l11i1Ill,function(Iil1IlI,ilIilll1,il11iIii,l1iII1il,liilil1I,i1llIlII,li1liil1){return ilIilll1='\x73\x70\x6c\x69\x74',Iil1IlI=arguments[0x0],Iil1IlI=Iil1IlI[ilIilll1](''),il11iIii=`\x72\x65\x76\x65\x72\x73\x65`,Iil1IlI=Iil1IlI[il11iIii]('\x76'),l1iII1il=`\x6a\x6f\x69\x6e`,(0x13e147,Iil1IlI[l1iII1il](''));});}(0x610,0xac558,iillii1I,0xc4),iillii1I)&&(version_=iillii1I);const l1lillll=$[li1iIi1l(0x3bd,'S%D5')]()?require(li1iIi1l(0x44f,'1]7W')):'',ii1l1111=$[li1iIi1l(0x218,'3tyF')]()?require('./jdCookie.js'):'',lIlIiII=require(li1iIi1l(0x223,'qc(['));let l1l1I11I='https://szxyun-rc.isvjcloud.com',Ili111l1=[],ilI1i1ii='',ii1ll1l1='',ililIiI='';if($[li1iIi1l(0x29c,'Ux]Z')]()){if(process[li1iIi1l(0x475,'x)*Q')][li1iIi1l(0x336,'2!!0')])$[li1iIi1l(0x222,'q8km')]=process[li1iIi1l(0x42d,'ni]i')][li1iIi1l(0x492,'BSZr')];if(JSON[li1iIi1l(0x482,'IKkB')](process[li1iIi1l(0x29f,'q@hF')])[li1iIi1l(0x37d,'^N]k')]('GITHUB')>-0x1)process[li1iIi1l(0x3e5,'[TYI')](0x0);Object[li1iIi1l(0x24e,'4E)C')](ii1l1111)[li1iIi1l(0x229,'dFZU')](I1iiiiI1=>{const iiililil=li1iIi1l;Ili111l1[iiililil(0x2d2,'x1Cu')](ii1l1111[I1iiiiI1]);});if(process[li1iIi1l(0x1f3,'25IG')][li1iIi1l(0x44e,'n8Ww')]&&process[li1iIi1l(0x32c,'2!!0')][li1iIi1l(0x2bd,'ni]i')]===li1iIi1l(0x3ec,'^N]k'))console['log']=()=>{};}else Ili111l1=[$[li1iIi1l(0x460,'yY[$')]('CookieJD'),$[li1iIi1l(0x33c,'Q3(R')](li1iIi1l(0x3f1,'QV8Z')),...$[li1iIi1l(0x205,'yY[$')]($[li1iIi1l(0x408,'m%Py')](li1iIi1l(0x33f,']RUQ'))||'[]')[li1iIi1l(0x2b9,'i%r9')](li1ll11I=>li1ll11I['cookie'])][li1iIi1l(0x3ed,'NIo4')](i1lIi1I=>!!i1lIi1I);let IiI11iii=typeof $request!==li1iIi1l(0x37a,'qQ53');IiI11iii&&(GetCookie(),$['done']());function iiiIiIii(_0x597c81,_0x1ec25a){const _0x555eb9=iillii1I();return iiiIiIii=function(_0x3ff6c7,_0x4bfe41){_0x3ff6c7=_0x3ff6c7-0x17a;let _0x8f43f8=_0x555eb9[_0x3ff6c7];if(iiiIiIii['stZiwR']===undefined){var _0x1f3b43=function(_0x2a68f9){const _0x391c1e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1d33f2='',_0x5483df='';for(let _0x1858c9=0x0,_0x4c4157,_0x1b1776,_0x4c789a=0x0;_0x1b1776=_0x2a68f9['charAt'](_0x4c789a++);~_0x1b1776&&(_0x4c4157=_0x1858c9%0x4?_0x4c4157*0x40+_0x1b1776:_0x1b1776,_0x1858c9++%0x4)?_0x1d33f2+=String['fromCharCode'](0xff&_0x4c4157>>(-0x2*_0x1858c9&0x6)):0x0){_0x1b1776=_0x391c1e['indexOf'](_0x1b1776);}for(let _0x4fde2b=0x0,_0x554566=_0x1d33f2['length'];_0x4fde2b<_0x554566;_0x4fde2b++){_0x5483df+='%'+('00'+_0x1d33f2['charCodeAt'](_0x4fde2b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5483df);};const _0x41b58f=function(_0xe4292,_0x265340){let _0x2316c6=[],_0x154c75=0x0,_0x55b738,_0x2d75bd='';_0xe4292=_0x1f3b43(_0xe4292);let _0x152cb6;for(_0x152cb6=0x0;_0x152cb6<0x100;_0x152cb6++){_0x2316c6[_0x152cb6]=_0x152cb6;}for(_0x152cb6=0x0;_0x152cb6<0x100;_0x152cb6++){_0x154c75=(_0x154c75+_0x2316c6[_0x152cb6]+_0x265340['charCodeAt'](_0x152cb6%_0x265340['length']))%0x100,_0x55b738=_0x2316c6[_0x152cb6],_0x2316c6[_0x152cb6]=_0x2316c6[_0x154c75]
// 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"])