KR/jd_opencardL345.js

25 lines
119 KiB
JavaScript
Raw Normal View History

/*
11.1-11.11 精致专场 与你相惠
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 11.1-11.11 精致专场 与你相惠 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#11.1-11.11 精致专场 与你相惠
1 1 1 1 * jd_opencardL345.js, tag=11.1-11.11 精致专场 与你相惠, enabled=true
*/
const $ = new Env('11.1-11.11 精致专场 与你相惠')
2023-11-08 22:50:47 +08:00
var version_='jsjiami.com.v7';const iiiIl=iii1II;(function(lII1ii,lII1il,Il1Iii,Ii1iI,Il1Iil,ilI,iIIlI){return lII1ii=lII1ii>>0x6,ilI='hs',iIIlI='hs',function(i1li1l,l11I1,iiIli1,il11i1,iII1i1){const ilii11=iii1II;il11i1='tfi',ilI=il11i1+ilI,iII1i1='up',iIIlI+=iII1i1,ilI=iiIli1(ilI),iIIlI=iiIli1(iIIlI),iiIli1=0x0;const l11II=i1li1l();while(!![]&&--Ii1iI+l11I1){try{il11i1=-parseInt(ilii11(0x3b9,'[9GY'))/0x1*(-parseInt(ilii11(0x2d7,'FPf8'))/0x2)+-parseInt(ilii11(0x12d,'yCiO'))/0x3*(parseInt(ilii11(0x3bb,'QpfU'))/0x4)+-parseInt(ilii11(0x133,'TWjI'))/0x5*(parseInt(ilii11(0x494,'&B(m'))/0x6)+parseInt(ilii11(0x44d,'g4^F'))/0x7*(-parseInt(ilii11(0xba,'Moe3'))/0x8)+parseInt(ilii11(0x5a5,'gGo$'))/0x9+-parseInt(ilii11(0x33d,'J7Ae'))/0xa*(parseInt(ilii11(0x38e,'0rJ3'))/0xb)+parseInt(ilii11(0xbc,'[9GY'))/0xc;}catch(ili){il11i1=iiIli1;}finally{iII1i1=l11II[ilI]();if(lII1ii<=Ii1iI)iiIli1?Il1Iil?il11i1=iII1i1:Il1Iil=iII1i1:iiIli1=iII1i1;else{if(iiIli1==Il1Iil['replace'](/[JKgFHXWPYOwRqthruIC=]/g,'')){if(il11i1===l11I1){l11II['un'+ilI](iII1i1);break;}l11II[iIIlI](iII1i1);}}}}}(Il1Iii,lII1il,function(iIIl1,ill,lIli,ilii1I,Ii1i1,lIll,iiiIi){return ill='\x73\x70\x6c\x69\x74',iIIl1=arguments[0x0],iIIl1=iIIl1[ill](''),lIli=`\x72\x65\x76\x65\x72\x73\x65`,iIIl1=iIIl1[lIli]('\x76'),ilii1I=`\x6a\x6f\x69\x6e`,(0x146a29,iIIl1[ilii1I](''));});}(0x3280,0x64bd4,Iii11l,0xcc),Iii11l)&&(version_=iiiIl(0x35f,'v)Yb'));const I1li1I=$['isNode']()?require(iiiIl(0x2d5,'jkBm')):'',IIiII=$[iiiIl(0x4e3,'@lCn')]()?require('./sendNotify'):'';let iiiI=$[iiiIl(0x1e6,'T7]C')]()?process[iiiIl(0x477,'UiUy')]['opencard_draw']?process[iiiIl(0x150,'jkBm')][iiiIl(0x48e,'3n#0')]:'0':$[iiiIl(0x459,'$93x')](iiiIl(0x5fe,'7sGV'))?$['getdata']('opencard_draw'):'0',I1li11=$['isNode']()?process[iiiIl(0x46f,'WKg&')]['opencard_addCart']?process[iiiIl(0x477,'UiUy')][iiiIl(0x2a6,'QpfU')]:![]:$[iiiIl(0x2cb,'Viug')]('opencard_addCart')?$['getdata'](iiiIl(0x507,'oiCn')):![];const II1iIl=require(iiiIl(0x2b2,'2nT*')),II1iIi=require(iiiIl(0x312,'[sYK')),iI1iI=require('./function/jdCommon'),Ii11I1=require(iiiIl(0xff,'g4^F'));let li1IiI='https://lzdz1-isv.isvjcloud.com',Illl=[],Illi='',l1IiiI={};if($[iiiIl(0x604,'FPf8')]()){Object[iiiIl(0x43f,'Viug')](I1li1I)['forEach'](iil1=>{const iiIliI=iiiIl;Illl[iiIliI(0x3b5,'6qoI')](I1li1I[iil1]);});if(process[iiiIl(0x2a9,'kQz^')][iiiIl(0x577,'J7Ae')]&&process[iiiIl(0x215,'@lCn')][iiiIl(0x151,'tlSr')]==='false')console['log']=()=>{};}else Illl=[$[iiiIl(0x186,'KaoL')](iiiIl(0x28e,'qMT]')),$[iiiIl(0x575,'2Gns')](iiiIl(0x55b,'UMYU')),...l1IilI($[iiiIl(0x567,'yCiO')](iiiIl(0x53c,'oiCn'))||'[]')[iiiIl(0x427,'qMT]')](iiIIiI=>iiIIiI['cookie'])][iiiIl(0x211,'2Gns')](i1liII=>!!i1liII);allMessage='',message='',$[iiiIl(0x2ce,'QWi4')]=![],$[iiiIl(0x2e0,'z]gD')]=![],$[iiiIl(0x45e,'J7Ae')]=![];function Iii11l(){const il11iI=(function(){return[...[version_,'IrjwXsKjtPiamgiw.YcorWmF.Juv7OKRqHrCtuRh==','W51hmSoSWRZcKsm','WQZdVKS','W7JcOwLDWQ3dJ8onWRBdGsfPrCoTW6e','WRpdOuFcSN7cG2ddRNG','BZ/cHmksuW','WQNcPIySWPW','DH51W4JdMG','WQ7dMSkTuSoT','W53cHLBcSGNdQCo1W6/cTea','WQddPLq','WONdImkBBCoCW4NdQmoYmCk2W5dcQCk/Bmk5W6Kll8o9WPDVW4RdRcnXW41gW4LfBW','8lo3O++5ICkk5lUd5lMB5lQZ','WPxcRw01W7FcMx3dI3BdU8oqW6GFCSkZq8kZ','fg1PW6VdIG','WRRcLGeIWQS','WQVdIbjLWR5MWRyYCgWIz+s8UoMbGEIVJ+s7Kmkz','tWT0h2i','W4hcM0ddOe/dQmoNySkFiq','WPtcN03dULa','6i615y69WQxcI1zVW7dcSbmiWQpcRmkPnEwNS+I2TG','W6ykW7RdMwBcJCkbWRi4y2pdGMW','ySofWQ/dP8o5','Cd7cP8kZq2NcTLi','5RE+5yIG5BEq57Iw5P23','g8k8WONcR0dcT8k2CW','WONdRLhcOSkWqsPfC8orztNcVHPkW4hdTG','WP3dMCo2WOxcMW','ymogWRhdOCoYWPy','khhcUcag','buXCW6pdUmo9W5tcRNjXWPZcUZtdPmk8WQ4','ketdLa','W7BdJSk1lmkQ','WP0kdColW405W6xdHW3dOmozW4Oy','WOVcT8orW7uA','W5VcRhO9W6C','dmocsCoiW7hdI0JcQq','kslcJ8ozW7tcT8ouF8kIWRxdVgJdHCk/','FSkyWQeowG','n8kKcCoqb8kSWPhdVG','W6RcG0NcPmop','nCogW4NdIWq','W6SjtG','yXJcSCkisq','DGH4W4NdI8kx','WPVcPM0','WQ7dPK3cOem','DJXxW7ZdJq','8lIoJM7MGB3LLPdOJ4FLVRpLR5tNI4pdHG','W7VcTgjuWPRdHG','W6qbW7FdJW','b1RcSbq2','W69ZphLIfW','WQJdS0NcHJ7cT8oCW7HG','nCk2WRNdPW','W4tcHLhcUJm','WRhdMmoSWRBcJG','W5CprW','CqFcT8kFqq','fSkrWOxdG1BdUSoYWQddGmkKWOpdG
// 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"])