KR/jd_opencardL331.js

25 lines
125 KiB
JavaScript
Raw Normal View History

2023-09-04 00:43:24 +08:00
/*
9.4-9.11 感恩有你 99聚惠
开卡脚本,一次性脚本
//export jd_opencard_blacklist="" // 黑名单 用&隔开 pin值
//export JD_LZ_OPENCARD="false" //关闭开卡相关活动运行
//export opencard_draw="3" //抽奖次数 3
入口[ 9.4-9.11 感恩有你 99聚惠 ]
请求太频繁会被黑ip
请更换IP后再执行脚本
cron:11 11 11 11 *
============Quantumultx===============
[task_local]
#9.4-9.11 感恩有你 99聚惠
11 11 11 11 * jd_opencardL331.js, tag=9.4-9.11 感恩有你 99聚惠, enabled=true
*/
const $ = new Env('9.4-9.11 感恩有你 99聚惠')
2023-09-04 01:01:37 +08:00
var version_='jsjiami.com.v7';const i1Illlil=lIiil1iI;(function(iI11li1i,lI1Ii1ii,lIIIll11,lIIi1iii,lIIlIIiI,l1lIi11l,liiiil1i){return iI11li1i=iI11li1i>>0x1,l1lIi11l='hs',liiiil1i='hs',function(IliI1Iii,ii111I1,iI1lIl1l,Il1lI1iI,li1iI1I1){const iI1IIIIi=lIiil1iI;Il1lI1iI='tfi',l1lIi11l=Il1lI1iI+l1lIi11l,li1iI1I1='up',liiiil1i+=li1iI1I1,l1lIi11l=iI1lIl1l(l1lIi11l),liiiil1i=iI1lIl1l(liiiil1i),iI1lIl1l=0x0;const li11il1l=IliI1Iii();while(!![]&&--lIIi1iii+ii111I1){try{Il1lI1iI=-parseInt(iI1IIIIi(0x12a,'j#%d'))/0x1*(-parseInt(iI1IIIIi(0x310,'tYdP'))/0x2)+parseInt(iI1IIIIi(0x31d,'RQiF'))/0x3+parseInt(iI1IIIIi(0x51a,'LyXL'))/0x4*(parseInt(iI1IIIIi(0x5e9,'g6iH'))/0x5)+-parseInt(iI1IIIIi(0x1e6,'&*Rt'))/0x6*(parseInt(iI1IIIIi(0x378,'KPb9'))/0x7)+parseInt(iI1IIIIi(0x25a,'1$Xu'))/0x8+parseInt(iI1IIIIi(0x5e2,'su9L'))/0x9+-parseInt(iI1IIIIi(0x1de,'UwVi'))/0xa*(parseInt(iI1IIIIi(0x16d,'lor]'))/0xb);}catch(II1ll1I1){Il1lI1iI=iI1lIl1l;}finally{li1iI1I1=li11il1l[l1lIi11l]();if(iI11li1i<=lIIi1iii)iI1lIl1l?lIIlIIiI?Il1lI1iI=li1iI1I1:lIIlIIiI=li1iI1I1:iI1lIl1l=li1iI1I1;else{if(iI1lIl1l==lIIlIIiI['replace'](/[OJRVQTlktLUCwYphxXq=]/g,'')){if(Il1lI1iI===ii111I1){li11il1l['un'+l1lIi11l](li1iI1I1);break;}li11il1l[liiiil1i](li1iI1I1);}}}}}(lIIIll11,lI1Ii1ii,function(iiII1Ill,iIlI1ili,lll1IIiI,II1liiii,l1illI,lI1iiIIi,liIlilIi){return iIlI1ili='\x73\x70\x6c\x69\x74',iiII1Ill=arguments[0x0],iiII1Ill=iiII1Ill[iIlI1ili](''),lll1IIiI=`\x72\x65\x76\x65\x72\x73\x65`,iiII1Ill=iiII1Ill[lll1IIiI]('\x76'),II1liiii=`\x6a\x6f\x69\x6e`,(0x13c75e,iiII1Ill[II1liiii](''));});}(0x198,0xd028e,iillI1II,0xce),iillI1II)&&(version_=iillI1II);const iIiilII=$[i1Illlil(0xd4,'j#%d')]()?require(i1Illlil(0x362,'g*ZD')):'',Ili1IIIi=$['isNode']()?require(i1Illlil(0x407,'#v4j')):'';let l1lIi11=$[i1Illlil(0x410,'LyXL')]()?process['env'][i1Illlil(0x32a,'n9XP')]?process['env'][i1Illlil(0x300,'ieTn')]:'0':$['getdata'](i1Illlil(0x495,'UwVi'))?$[i1Illlil(0x18c,'Rb[M')]('opencard_draw'):'0',l1iii1Ii=$[i1Illlil(0x526,'g*ZD')]()?process['env'][i1Illlil(0x240,'O3ep')]?process[i1Illlil(0x5a4,'&*Rt')][i1Illlil(0x3b2,'W$J^')]:![]:$['getdata']('opencard_addCart')?$['getdata'](i1Illlil(0x336,'KPb9')):![];const iii1Il1I=require(i1Illlil(0x42e,'HJU0')),l1IiIIi1=require('./function/krh5st'),IliIIiiI=require(i1Illlil(0x4ab,'9nis'));let I1lI11ii=i1Illlil(0x227,'j#%d'),iIlllii=[],liIIi1Il='',Iiil1I11={};if($['isNode']()){Object['keys'](iIiilII)[i1Illlil(0x577,'ppF^')](II11II11=>{const illilii=i1Illlil;iIlllii[illilii(0x2fe,'9nis')](iIiilII[II11II11]);});if(process['env'][i1Illlil(0x397,'ieTn')]&&process[i1Illlil(0x291,'SZBH')][i1Illlil(0x120,'HZQ6')]==='false')console['log']=()=>{};}else iIlllii=[$['getdata']('CookieJD'),$['getdata']('CookieJD2'),...I1IIii11($[i1Illlil(0x436,'&2AR')](i1Illlil(0x468,'m#Yl'))||'[]')['map'](iIl11l1i=>iIl11l1i[i1Illlil(0x330,'#v4j')])][i1Illlil(0x50b,'8z7x')](I11Il1iI=>!!I11Il1iI);allMessage='',message='',$['hotFlag']=![],$['outFlag']=![],$[i1Illlil(0x5fd,'T]r4')]=![];let I1iIlII1='',IlIi1Ill='',lll1lIlI=process['env'][i1Illlil(0x5a1,'o8!a')]?process[i1Illlil(0x597,'LyXL')][i1Illlil(0x34a,'4u0y')]:'true',I11IilIl='',IilIIII='';$[i1Illlil(0x2c8,')Gn2')]=process[i1Illlil(0x2c3,'g6iH')][i1Illlil(0x1c3,'3Rz3')]||I11IilIl,$['blacklist']=process[i1Illlil(0x17d,'Rb[M')][i1Illlil(0x29c,'Rb[M')]||IilIIII,IllIilli(),iiIliIli(),$[i1Illlil(0x23d,'g6iH')]=[],!(async()=>{const IiIIIiIl=i1Illlil,iiIi1lI={'ouqjN':function(iii111i1,i11iII1I){return iii111i1===i11iII1I;},'SjAKe':IiIIIiIl(0x46c,'RQiF'),'vPuKP':IiIIIiIl(0x31e,'o8!a'),'ZcpMX':IiIIIiIl(0x306,'h*Et'),'UzxfB':'https://bean.m.jd.com/','hBtHq':function(ll1illl,il1llIl){return ll1illl(il1llIl);},'XqKba':IiIIIiIl(0x428,'9nis'),'FRZrH':IiIIIiIl(0x122,'ppF^'),'VJXLU':function(l11II1II,lliii,il1l11i){return l11II1II(lliii,il1l11i);},'oVXSn':IiIIIiIl(0x189,'SZBH'),'RdmmH':IiIIIiIl(0x5bb,'HJU0'),'mvUxJ':'00de8798c16d46bca107fe4115b8d2ed','HtEKi':IiIIIiIl(0x56c,'m&D8'),'avEIO':function(i1I11lIl,lIiIlili){return i1I11lIl<lIiIlili;},'IfuaC':function(i1ii1Ii1,iiIIl11){return i1ii1Ii1===iiIIl11;},'eMzch':IiIIIiIl(0x1da,'jS8!'),'RZlsc':fun
2023-09-04 00:43:24 +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"])