KR/jd_opencardL349.js

25 lines
118 KiB
JavaScript
Raw Normal View History

2023-12-07 00:46:28 +08:00
/*
12.7-12.13 冬日焕新 暖心加倍
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 12.7-12.13 冬日焕新 暖心加倍 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#12.7-12.13 冬日焕新 暖心加倍
1 1 1 1 * jd_opencardL349.js, tag=12.7-12.13 冬日焕新 暖心加倍, enabled=true
*/
const $ = new Env('12.7-12.13 冬日焕新 暖心加倍')
2023-12-08 00:40:24 +08:00
var il='jsjiami.com.v7';const l1III1=iii1II;(function(lIll,iiiIi,ilii11,iiiIl,iiIliI,liIiIl,lII11){return lIll=lIll>>0x4,liIiIl='hs',lII11='hs',function(illiI1,iIll1i,iIll1l,iIIii,ilIl1l){const IIilli=iii1II;iIIii='tfi',liIiIl=iIIii+liIiIl,ilIl1l='up',lII11+=ilIl1l,liIiIl=iIll1l(liIiIl),lII11=iIll1l(lII11),iIll1l=0x0;const Ii1l1=illiI1();while(!![]&&--iiiIl+iIll1i){try{iIIii=parseInt(IIilli(0x526,'!REX'))/0x1*(-parseInt(IIilli(0x699,'!qKG'))/0x2)+parseInt(IIilli(0x5c9,'P]Ds'))/0x3+-parseInt(IIilli(0x5c6,'lMp]'))/0x4*(-parseInt(IIilli(0x212,'1&E!'))/0x5)+parseInt(IIilli(0x56c,'!qKG'))/0x6+parseInt(IIilli(0x415,'1^DC'))/0x7*(-parseInt(IIilli(0x35d,'!hxS'))/0x8)+parseInt(IIilli(0x4ea,'7Nk['))/0x9+-parseInt(IIilli(0x624,'lMp]'))/0xa;}catch(Il1IlI){iIIii=iIll1l;}finally{ilIl1l=Ii1l1[liIiIl]();if(lIll<=iiiIl)iIll1l?iiIliI?iIIii=ilIl1l:iiIliI=ilIl1l:iIll1l=ilIl1l;else{if(iIll1l==iiIliI['replace'](/[NVAJqwyCYnMTWUhrIP=]/g,'')){if(iIIii===iIll1i){Ii1l1['un'+liIiIl](ilIl1l);break;}Ii1l1[lII11](ilIl1l);}}}}}(ilii11,iiiIi,function(l11Ii,iIll11,IIilll,iIIil,lli1Ii,lli1Il,l11Il){return iIll11='\x73\x70\x6c\x69\x74',l11Ii=arguments[0x0],l11Ii=l11Ii[iIll11](''),IIilll=`\x72\x65\x76\x65\x72\x73\x65`,l11Ii=l11Ii[IIilll]('\x76'),iIIil=`\x6a\x6f\x69\x6e`,(0x14ac4b,l11Ii[iIIil](''));});}(0xcd0,0x352d9,Iii11l,0xcf),Iii11l)&&(il=Iii11l);const i1liI1=$['isNode']()?require(l1III1(0x5b0,'Nd[y')):'',l1IilI=$[l1III1(0x607,'tAXr')]()?require(l1III1(0x200,'P]Ds')):'';let ll1I1i=$[l1III1(0x2b3,'*OQH')]()?process[l1III1(0x652,'Rl0t')][l1III1(0x44a,'y(ta')]?process[l1III1(0x352,'5kK!')][l1III1(0x1bc,'1ic[')]:'0':$[l1III1(0x3cc,'7Nk[')]('opencard_draw')?$[l1III1(0x3fc,'%w^w')]('opencard_draw'):'0',iiiiII=$['isNode']()?process[l1III1(0x3fe,'1^DC')]['opencard_addCart']?process['env'][l1III1(0x274,'wj3D')]:![]:$[l1III1(0x5a3,'rPAc')](l1III1(0x5c0,'GCYV'))?$[l1III1(0x583,'1m^n')](l1III1(0x5c0,'GCYV')):![];const ll1I1l=process['env'][l1III1(0x52b,'$#%s')]==='true',iilI=require(l1III1(0x4d4,'LlBx')),IIilI1=require(l1III1(0x3df,'7yFI')),li1Il1=require(l1III1(0x2d9,'WGbo')),i1ii1I=require(l1III1(0x295,'!hxS'));let iil1=l1III1(0x21d,'lMp]'),iiIIiI=[],i1liII='',ilII1i={};if($['isNode']()){Object[l1III1(0x1b5,'u)fT')](i1liI1)['forEach'](IIi11I=>{iiIIiI['push'](i1liI1[IIi11I]);});if(process['env'][l1III1(0x2cf,'Iwy1')]&&process['env'][l1III1(0x64b,'1&E!')]==='false')console[l1III1(0x5b3,'z)cU')]=()=>{};}else iiIIiI=[$[l1III1(0x3f5,'7yFI')](l1III1(0x6ec,'wj3D')),$[l1III1(0x2ef,'Q%J!')]('CookieJD2'),...iiIIil($[l1III1(0x392,'GCYV')](l1III1(0x3d6,'*OQH'))||'[]')['map'](iiIIlI=>iiIIlI[l1III1(0x18f,'Ry!d')])]['filter'](IIl1II=>!!IIl1II);function iii1II(_0x13f87e,_0x515eb5){const _0x74586e=Iii11l();return iii1II=function(_0x2ee21c,_0x42f272){_0x2ee21c=_0x2ee21c-0x173;let _0x560cee=_0x74586e[_0x2ee21c];if(iii1II['LRidhD']===undefined){var _0xc230f7=function(_0xeba999){const _0x273726='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x37325b='',_0x2668a2='';for(let _0x1de44d=0x0,_0x3b9f03,_0xc5b321,_0x485a66=0x0;_0xc5b321=_0xeba999['charAt'](_0x485a66++);~_0xc5b321&&(_0x3b9f03=_0x1de44d%0x4?_0x3b9f03*0x40+_0xc5b321:_0xc5b321,_0x1de44d++%0x4)?_0x37325b+=String['fromCharCode'](0xff&_0x3b9f03>>(-0x2*_0x1de44d&0x6)):0x0){_0xc5b321=_0x273726['indexOf'](_0xc5b321);}for(let _0x40f0b2=0x0,_0x24518e=_0x37325b['length'];_0x40f0b2<_0x24518e;_0x40f0b2++){_0x2668a2+='%'+('00'+_0x37325b['charCodeAt'](_0x40f0b2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2668a2);};const _0x493dfe=function(_0x36cfc9,_0x58548f){let _0xb3419f=[],_0x291c5e=0x0,_0x3adfd4,_0x549acc='';_0x36cfc9=_0xc230f7(_0x36cfc9);let _0x4fbded;for(_0x4fbded=0x0;_0x4fbded<0x100;_0x4fbded++){_0xb3419f[_0x4fbded]=_0x4fbded;}for(_0x4fbded=0x0;_0x4fbded<0x100;_0x4fbded++){_0x291c5e=(_0x291c5e+_0xb3419f[_0x4fbded]+_0x58548f['charCodeAt'](_0x4fbded%_0x58548f['length']))%0x100,_0x3adfd4=_0xb3419f[_0x4fbded],_0xb3419f[_0x4fbded]=_0xb3419f[_0x291c5e],_0xb3419f[_0x291c5e]=_0x3adfd4;}_0x4fbded=0x0,_0x291c5e=0x0;for(let _0x1f2745=0x0;_0x1f2745<_0x36cfc9['length'];_0x1f2745++){_0x4fbded=(
2023-12-07 00:46:28 +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"])